Skip to content

Commit

Permalink
Revert "Feat/redesign for corp (#1341)"
Browse files Browse the repository at this point in the history
This reverts commit bf32737.
  • Loading branch information
fulcanellee committed Sep 2, 2024
1 parent d9a31d6 commit 4146fb8
Show file tree
Hide file tree
Showing 43 changed files with 53 additions and 297 deletions.
23 changes: 0 additions & 23 deletions .changeset/loud-plants-judge.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports[`CalendarRange Display tests should match snapshot 1`] = `
>
<button
aria-label="Предыдущий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-previous-day"
type="button"
>
Expand Down Expand Up @@ -81,7 +81,7 @@ exports[`CalendarRange Display tests should match snapshot 1`] = `
</span>
<button
aria-label="Следующий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-next-day"
type="button"
>
Expand Down Expand Up @@ -964,7 +964,7 @@ exports[`CalendarRange Display tests should match snapshot 1`] = `
>
<button
aria-label="Предыдущий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-previous-day"
type="button"
>
Expand Down Expand Up @@ -997,7 +997,7 @@ exports[`CalendarRange Display tests should match snapshot 1`] = `
</span>
<button
aria-label="Следующий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-next-day"
type="button"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/calendar/src/__snapshots__/Component.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3412,7 +3412,7 @@ exports[`Calendar Display tests should match selectorView="month-only" snapshot
>
<button
aria-label="Предыдущий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-previous-day"
type="button"
>
Expand Down Expand Up @@ -3445,7 +3445,7 @@ exports[`Calendar Display tests should match selectorView="month-only" snapshot
</span>
<button
aria-label="Следующий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-next-day"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`PeriodSlider empty PeriodSlider empty PeriodSlider default title snapsh
>
<button
aria-label="Предыдущий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-previous-day"
disabled=""
type="button"
Expand Down Expand Up @@ -43,7 +43,7 @@ exports[`PeriodSlider empty PeriodSlider empty PeriodSlider default title snapsh
</span>
<button
aria-label="Следующий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-next-day"
disabled=""
type="button"
Expand Down Expand Up @@ -83,7 +83,7 @@ exports[`PeriodSlider empty PeriodSlider empty PeriodSlider specific title snaps
>
<button
aria-label="Предыдущий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-previous-day"
disabled=""
type="button"
Expand Down Expand Up @@ -117,7 +117,7 @@ exports[`PeriodSlider empty PeriodSlider empty PeriodSlider specific title snaps
</span>
<button
aria-label="Следующий период"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component border-32"
class="component text size-48 hug size-48 component text component text cc-icon-button arrow primary component"
data-test-id="period-slider-btn-next-day"
disabled=""
type="button"
Expand Down
4 changes: 0 additions & 4 deletions packages/code-input/src/components/input/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
ref={ref}
className={cn(styles.input, stylesInput.component, {
[styles.hasError]: error,
[stylesInput.hasError]: error,

[styles.disabled]: disabled,
[stylesInput.disabled]: disabled,

[styles.compact]: compact,
[stylesInput.compact]: Boolean(stylesInput.compact) && compact,
})}
Expand Down
14 changes: 0 additions & 14 deletions packages/code-input/src/desktop/desktop.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,4 @@

.component {
background-color: var(--code-input-bg-color);
box-shadow: var(--code-input-box-shadow);
border-radius: var(--code-input-border-radius);

&.disabled {
box-shadow: var(--code-input-disabled-box-shadow);
}

&.hasError {
box-shadow: var(--code-input-error-box-shadow);
}

&:not(.disabled):not(.hasError):hover {
box-shadow: var(--code-input-box-shadow-hover);
}
}
11 changes: 0 additions & 11 deletions packages/code-input/src/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,4 @@
--code-input-bg-color: var(--form-control-bg-color);
--code-input-mobile-bg-color: var(--color-light-neutral-translucent-100);
--code-input-error-bg-color: var(--color-light-status-muted-negative);
--code-input-box-shadow: none;
--code-input-disabled-box-shadow: none;

/* border */
--code-input-border-radius: var(--border-radius-4);

/* hover */
--code-input-box-shadow-hover: none;

/* error */
--code-input-error-box-shadow: none;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Object {
</div>
<a
aria-label="скачать"
class="component text size-48 hug size-48 component text component text cc-icon-button download primary component border-24"
class="component text size-48 hug size-48 component text component text cc-icon-button download primary component"
download="новое_название_файла"
href="/link"
>
Expand Down Expand Up @@ -78,7 +78,7 @@ Object {
</a>
<button
aria-label="удалить"
class="component text size-48 hug size-48 component text component text cc-icon-button delete primary component border-24"
class="component text size-48 hug size-48 component text component text cc-icon-button delete primary component"
type="button"
>
<span
Expand Down Expand Up @@ -152,7 +152,7 @@ Object {
</div>
<a
aria-label="скачать"
class="component text size-48 hug size-48 component text component text cc-icon-button download primary component border-24"
class="component text size-48 hug size-48 component text component text cc-icon-button download primary component"
download="новое_название_файла"
href="/link"
>
Expand Down Expand Up @@ -180,7 +180,7 @@ Object {
</a>
<button
aria-label="удалить"
class="component text size-48 hug size-48 component text component text cc-icon-button delete primary component border-24"
class="component text size-48 hug size-48 component text component text cc-icon-button delete primary component"
type="button"
>
<span
Expand Down
24 changes: 0 additions & 24 deletions packages/form-control/src/Component.screenshots.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,27 +141,3 @@ describe('FormControl | screenshots hint and error', () => {
['default', 'site', 'mobile'].forEach((theme) => testCase(theme, colors));
});
});

describe('FormControl | screenshots theme corp', () => {
screenshotTesting({
cases: [
[
'sprite',
createSpriteStorybookUrl({
componentName: 'FormControl',
knobs: {
block: true,
size: [48, 56, 64, 72],
disabled: [false, true],
error: ['', 'Error'],
},
size: { width: 350, height: 150 },
}),
],
],
screenshotOpts: {
fullPage: true,
},
theme: 'corp',
})();
});

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,10 @@ export const BaseFormControl = React.forwardRef<HTMLDivElement, BaseFormControlP
[commonStyles.disabled]: disabled || readOnly,
[colorCommonStyles[colors].disabled]: disabled || readOnly,
[colorStyles[colors].disabled]: disabled || readOnly,

[commonStyles.filled]: filled,
[commonStyles.hasInnerLabel]: label && labelView === 'inner',

[commonStyles.focused]: focused,
[colorCommonStyles[colors].focused]: focused,
[colorStyles[colors].focused]: focused,

[commonStyles.hasError]: error,
[colorCommonStyles[colors].hasError]: error,
[colorStyles[colors].hasError]:
Expand Down
10 changes: 2 additions & 8 deletions packages/form-control/src/desktop/default.desktop.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@
background-color: var(--form-control-bg-color);
}

.inner:not(.focused):not(.hasError):not(.disabled) {
box-shadow: var(--form-control-box-shadow);

&:hover {
box-shadow: var(--form-control-box-shadow-hover);
}
}

.inner.hasError {
background-color: var(--form-control-error-bg-color);
}

/* DISABLED STATE */

.disabled.hasError {
box-shadow: var(--form-control-error-disabled-shadow);
}
2 changes: 0 additions & 2 deletions packages/form-control/src/vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
--form-control-inverted-color: var(--color-light-text-primary-inverted);
--form-control-inverted-label-color: var(--color-light-text-secondary-inverted);
--form-control-inverted-hint-color: var(--color-light-text-secondary-inverted);
--form-control-box-shadow: none;

/* disabled */
--form-control-disabled-bg-color: var(--color-light-neutral-translucent-100);
Expand Down Expand Up @@ -40,7 +39,6 @@
/* hover */
--form-control-hover-bg-color: var(--color-light-neutral-translucent-100);
--form-control-inverted-hover-bg-color: var(--color-light-neutral-translucent-100-inverted);
--form-control-box-shadow-hover: none;

/* error */
--form-control-error-color: var(--color-light-text-negative);
Expand Down
5 changes: 1 addition & 4 deletions packages/icon-button/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import cn from 'classnames';

import { Button, ButtonProps } from '@alfalab/core-components-button';

import { transformSize } from './helpers/transformSize';

import defaultColors from './default.module.css';
import styles from './index.module.css';
import invertedColors from './inverted.module.css';
Expand Down Expand Up @@ -101,13 +99,12 @@ export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
className,
colorStyles[colors][view],
colorStyles[colors].component,
styles[`border-${transformSize(size)}`],
{
[colorStyles[colors].loader]: restProps.loading,
[colorStyles[colors].transparentBg]: transparentBg,
},
)}
size='s' /** todo рассмотреть возможность динамического изменения размера */
size='s'
>
<span
className={cn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Object {
"baseElement": <body>
<div>
<a
class="component text size-48 hug size-48 component text component text cc-icon-button primary component border-48"
class="component text size-48 hug size-48 component text component text cc-icon-button primary component"
data-test-id="test-id"
href="http://example.com"
>
Expand Down Expand Up @@ -36,7 +36,7 @@ Object {
</body>,
"container": <div>
<a
class="component text size-48 hug size-48 component text component text cc-icon-button primary component border-48"
class="component text size-48 hug size-48 component text component text cc-icon-button primary component"
data-test-id="test-id"
href="http://example.com"
>
Expand Down Expand Up @@ -123,7 +123,7 @@ Object {
"baseElement": <body>
<div>
<button
class="component text size-48 hug size-48 component text component text cc-icon-button primary component border-48"
class="component text size-48 hug size-48 component text component text cc-icon-button primary component"
type="button"
>
<span
Expand Down Expand Up @@ -152,7 +152,7 @@ Object {
</body>,
"container": <div>
<button
class="component text size-48 hug size-48 component text component text cc-icon-button primary component border-48"
class="component text size-48 hug size-48 component text component text cc-icon-button primary component"
type="button"
>
<span
Expand Down
14 changes: 0 additions & 14 deletions packages/icon-button/src/helpers/transformSize.ts

This file was deleted.

Loading

0 comments on commit 4146fb8

Please sign in to comment.