@salutejs/plasma-new-hope 0.270.0-canary.1744.13385332397.0 → 0.270.0-canary.1770.13386075549.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +2 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +1 -1
- package/cjs/components/Pagination/Pagination.css +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
- package/cjs/components/Range/Range.css +2 -2
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Range/Range.tokens.js +2 -0
- package/cjs/components/Range/Range.tokens.js.map +1 -1
- package/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/cjs/components/Range/variations/_readonly/base.js.map +1 -1
- package/cjs/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
- package/cjs/components/Select/Select.css +1 -1
- package/cjs/components/Select/ui/Target/Target.css +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
- package/cjs/components/Slider/Slider.css +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
- package/cjs/components/TextArea/TextArea.js +9 -7
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
- package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
- package/cjs/components/TextArea/variations/_read-only/base.js +9 -0
- package/cjs/components/TextArea/variations/_read-only/base.js.map +1 -0
- package/cjs/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
- package/cjs/index.css +4 -2
- package/emotion/cjs/components/Range/Range.styles.js +10 -10
- package/emotion/cjs/components/Range/Range.tokens.js +2 -0
- package/emotion/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/emotion/cjs/components/TextArea/TextArea.js +10 -8
- package/emotion/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/TextArea/variations/_read-only/base.js +10 -0
- package/emotion/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/emotion/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
- package/emotion/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/emotion/cjs/components/_Icon/Icons/IconLock.js +29 -0
- package/emotion/cjs/components/_Icon/index.js +7 -0
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Range/Range.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/emotion/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/cjs/examples/plasma_b2c/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Range/Range.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +22 -22
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/emotion/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/cjs/examples/plasma_web/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/es/components/Range/Range.styles.js +10 -10
- package/emotion/es/components/Range/Range.tokens.js +2 -0
- package/emotion/es/components/Range/variations/_readonly/base.js +1 -1
- package/emotion/es/components/TextArea/TextArea.js +6 -4
- package/emotion/es/components/TextArea/TextArea.tokens.js +3 -0
- package/emotion/es/components/TextArea/variations/_clear/base.js +1 -1
- package/emotion/es/components/TextArea/variations/_read-only/base.js +4 -0
- package/emotion/es/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
- package/emotion/es/components/_Icon/Icon.assets/Lock.js +19 -0
- package/emotion/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/emotion/es/components/_Icon/Icons/IconLock.js +22 -0
- package/emotion/es/components/_Icon/index.js +1 -0
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/Range/Range.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +17 -14
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +22 -22
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/emotion/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/es/examples/plasma_b2c/components/Tokens/Tokens.styles.js +14 -14
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Range/Range.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +22 -22
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/emotion/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/emotion/es/examples/plasma_web/components/Tokens/Tokens.styles.js +14 -14
- package/es/components/Autocomplete/Autocomplete.css +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +2 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +2 -2
- package/es/components/DatePicker/SingleDate/SingleDate.css +1 -1
- package/es/components/Pagination/Pagination.css +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +1 -1
- package/es/components/Range/Range.css +2 -2
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Range/Range.tokens.js +2 -0
- package/es/components/Range/Range.tokens.js.map +1 -1
- package/es/components/Range/variations/_readonly/base.js +1 -1
- package/es/components/Range/variations/_readonly/base.js.map +1 -1
- package/es/components/Range/variations/_readonly/{base_8q1gx8.css → base_1jlqwtc.css} +1 -1
- package/es/components/Select/Select.css +1 -1
- package/es/components/Select/ui/Target/Target.css +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +1 -1
- package/es/components/Slider/Slider.css +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +1 -1
- package/es/components/TextArea/TextArea.js +9 -7
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/TextArea.tokens.js +3 -0
- package/es/components/TextArea/TextArea.tokens.js.map +1 -1
- package/es/components/TextArea/variations/_clear/base.js.map +1 -1
- package/es/components/TextArea/variations/_read-only/base.js +5 -0
- package/es/components/TextArea/variations/_read-only/base.js.map +1 -0
- package/es/components/TextArea/variations/_read-only/base_om8eo9.css +1 -0
- package/es/components/TextField/TextField.tokens.js +1 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base.js +1 -1
- package/es/components/TextField/variations/_read-only/base.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base_sr3to2.css +1 -0
- package/es/index.css +4 -2
- package/package.json +5 -5
- package/styled-components/cjs/components/Range/Range.tokens.js +2 -0
- package/styled-components/cjs/components/Range/variations/_readonly/base.js +1 -1
- package/styled-components/cjs/components/TextArea/TextArea.js +9 -7
- package/styled-components/cjs/components/TextArea/TextArea.tokens.js +3 -0
- package/styled-components/cjs/components/TextArea/variations/_read-only/base.js +10 -0
- package/styled-components/cjs/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/Lock.js +26 -0
- package/styled-components/cjs/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/styled-components/cjs/components/_Icon/Icons/IconLock.js +29 -0
- package/styled-components/cjs/components/_Icon/index.js +7 -0
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/styled-components/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/cjs/examples/plasma_b2c/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -7
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/styled-components/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/cjs/examples/plasma_web/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/es/components/Range/Range.tokens.js +2 -0
- package/styled-components/es/components/Range/variations/_readonly/base.js +1 -1
- package/styled-components/es/components/TextArea/TextArea.js +5 -3
- package/styled-components/es/components/TextArea/TextArea.tokens.js +3 -0
- package/styled-components/es/components/TextArea/variations/_read-only/base.js +4 -0
- package/styled-components/es/components/TextArea/variations/_read-only/tokens.json +1 -0
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
- package/styled-components/es/components/_Icon/Icon.assets/Lock.js +19 -0
- package/styled-components/es/components/_Icon/Icons/IconChevronLeft.js +8 -3
- package/styled-components/es/components/_Icon/Icons/IconLock.js +22 -0
- package/styled-components/es/components/_Icon/index.js +1 -0
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +3 -0
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +7 -7
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +92 -26
- package/styled-components/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/es/examples/plasma_b2c/components/Tokens/Tokens.styles.js +2 -2
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Range/Range.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +71 -20
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -7
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +85 -25
- package/styled-components/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +22 -28
- package/styled-components/es/examples/plasma_web/components/Tokens/Tokens.styles.js +2 -2
- package/types/components/Range/Range.tokens.d.ts +2 -0
- package/types/components/Range/Range.tokens.d.ts.map +1 -1
- package/types/components/Range/variations/_readonly/base.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts +3 -2
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.tokens.d.ts +3 -0
- package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
- package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
- package/types/components/TextArea/variations/_read-only/base.d.ts +2 -0
- package/types/components/TextArea/variations/_read-only/base.d.ts.map +1 -0
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/Lock.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/Lock.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconChevronLeft.d.ts.map +1 -1
- package/types/components/_Icon/Icons/IconLock.d.ts +4 -0
- package/types/components/_Icon/Icons/IconLock.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +1 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +3 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +3 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
- package/es/components/TextField/variations/_read-only/base_oizdmx.css +0 -1
@@ -33,12 +33,12 @@ var config = exports.config = {
|
|
33
33
|
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
34
34
|
},
|
35
35
|
chipView: {
|
36
|
-
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-active);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-secondary);", ":
|
37
|
-
secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":
|
38
|
-
accent: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent-hover);", ":var(--on-dark-text-primary);", ":var(--surface-accent-active);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":
|
39
|
-
positive: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive-hover);", ":var(--on-dark-text-primary);", ":var(--surface-positive-active);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":
|
40
|
-
warning: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning-hover);", ":var(--on-dark-text-primary);", ":var(--surface-warning-active);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":
|
41
|
-
negative: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative-hover);", ":var(--on-dark-text-primary);", ":var(--surface-negative-active);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":
|
36
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--surface-solid-default-active);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly),
|
37
|
+
secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly),
|
38
|
+
accent: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent-hover);", ":var(--on-dark-text-primary);", ":var(--surface-accent-active);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--surface-accent);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly),
|
39
|
+
positive: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive-hover);", ":var(--on-dark-text-primary);", ":var(--surface-positive-active);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly),
|
40
|
+
warning: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning-hover);", ":var(--on-dark-text-primary);", ":var(--surface-warning-active);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--surface-warning);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly),
|
41
|
+
negative: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative-hover);", ":var(--on-dark-text-primary);", ":var(--surface-negative-active);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--surface-negative);", ":var(--on-dark-text-primary);", ":var(--on-dark-text-secondary);", ":1;"], _TextField.textFieldTokens.chipColor, _TextField.textFieldTokens.chipBackground, _TextField.textFieldTokens.chipColorHover, _TextField.textFieldTokens.chipBackgroundHover, _TextField.textFieldTokens.chipColorActive, _TextField.textFieldTokens.chipBackgroundActive, _TextField.textFieldTokens.chipBackgroundReadOnly, _TextField.textFieldTokens.chipColorReadOnly, _TextField.textFieldTokens.chipBackgroundReadOnlyHover, _TextField.textFieldTokens.chipColorReadOnlyHover, _TextField.textFieldTokens.chipCloseIconColor, _TextField.textFieldTokens.chipOpacityReadonly)
|
42
42
|
},
|
43
43
|
hintView: {
|
44
44
|
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-solid-card-brightness);", ":var(--shadow-down-hard-m,0px 4px 12px 0px rgba(0,0,0,0.16),0px 1px 4px 0px rgba(0,0,0,0.08));", ":var(--text-primary);", ":var(--surface-solid-card);"], _TextField.textFieldTokens.tooltipBackgroundColor, _TextField.textFieldTokens.tooltipBoxShadow, _TextField.textFieldTokens.tooltipColor, _TextField.textFieldTokens.tooltipArrowBackground)
|
@@ -51,7 +51,7 @@ var config = exports.config = {
|
|
51
51
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _TextField.textFieldTokens.disabledOpacity)
|
52
52
|
},
|
53
53
|
readOnly: {
|
54
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-
|
54
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-primary);"], _TextField.textFieldTokens.readOnlyOpacity, _TextField.textFieldTokens.colorReadOnly, _TextField.textFieldTokens.backgroundColorReadOnly, _TextField.textFieldTokens.placeholderColorReadOnly, _TextField.textFieldTokens.leftHelperColorReadOnly, _TextField.textFieldTokens.titleCaptionColorReadOnly, _TextField.textFieldTokens.labelColorReadOnly, _TextField.textFieldTokens.dividerColorReadOnly)
|
55
55
|
}
|
56
56
|
}
|
57
57
|
};
|
package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx
CHANGED
@@ -4,7 +4,7 @@ import { action } from '@storybook/addon-actions';
|
|
4
4
|
import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
5
5
|
|
6
6
|
import { WithTheme } from '../../../_helpers';
|
7
|
-
import { IconCross } from '../../../../components/_Icon';
|
7
|
+
import { IconCross, IconLock } from '../../../../components/_Icon';
|
8
8
|
import type { PopoverPlacement } from '../Popover/Popover';
|
9
9
|
|
10
10
|
import { TextField } from './TextField';
|
@@ -21,8 +21,8 @@ const chipViews = ['default', 'secondary', 'accent', 'positive', 'warning', 'neg
|
|
21
21
|
const hintViews = ['default'];
|
22
22
|
const hintSizes = ['m', 's'];
|
23
23
|
const hintTriggers = ['hover', 'click'];
|
24
|
-
const labelPlacements = ['outer', 'inner'];
|
25
24
|
const hintTargetPlacements = ['outer', 'inner'];
|
25
|
+
const labelPlacements = ['outer', 'inner'];
|
26
26
|
const placements: Array<PopoverPlacement> = [
|
27
27
|
'top',
|
28
28
|
'top-start',
|
@@ -43,6 +43,16 @@ const placements: Array<PopoverPlacement> = [
|
|
43
43
|
'auto',
|
44
44
|
];
|
45
45
|
|
46
|
+
const getIcon = (IconComponent: React.ReactElement, size: string, readOnly = false) => {
|
47
|
+
const iconSize = size === 'xs' ? 'xs' : 's';
|
48
|
+
|
49
|
+
if (readOnly) {
|
50
|
+
return <IconLock size={iconSize} color="var(--text-secondary)" style={{ opacity: 0.4 }} />;
|
51
|
+
}
|
52
|
+
|
53
|
+
return <IconComponent size={iconSize} color="inherit" />;
|
54
|
+
};
|
55
|
+
|
46
56
|
const meta: Meta<typeof TextField> = {
|
47
57
|
title: 'b2c/Data Entry/TextField',
|
48
58
|
component: TextField,
|
@@ -58,19 +68,28 @@ const meta: Meta<typeof TextField> = {
|
|
58
68
|
control: {
|
59
69
|
type: 'boolean',
|
60
70
|
},
|
61
|
-
if: {
|
71
|
+
if: {
|
72
|
+
arg: 'optional',
|
73
|
+
truthy: false,
|
74
|
+
},
|
62
75
|
},
|
63
76
|
optional: {
|
64
77
|
control: {
|
65
78
|
type: 'boolean',
|
66
79
|
},
|
67
|
-
if: {
|
80
|
+
if: {
|
81
|
+
arg: 'required',
|
82
|
+
truthy: false,
|
83
|
+
},
|
68
84
|
},
|
69
85
|
hasDivider: {
|
70
86
|
control: {
|
71
87
|
type: 'boolean',
|
72
88
|
},
|
73
|
-
if: {
|
89
|
+
if: {
|
90
|
+
arg: 'clear',
|
91
|
+
truthy: true,
|
92
|
+
},
|
74
93
|
},
|
75
94
|
view: {
|
76
95
|
options: views,
|
@@ -93,7 +112,10 @@ const meta: Meta<typeof TextField> = {
|
|
93
112
|
control: {
|
94
113
|
type: 'boolean',
|
95
114
|
},
|
96
|
-
if: {
|
115
|
+
if: {
|
116
|
+
arg: 'labelPlacement',
|
117
|
+
eq: 'inner',
|
118
|
+
},
|
97
119
|
},
|
98
120
|
size: {
|
99
121
|
options: sizes,
|
@@ -101,53 +123,83 @@ const meta: Meta<typeof TextField> = {
|
|
101
123
|
type: 'inline-radio',
|
102
124
|
},
|
103
125
|
},
|
126
|
+
titleCaption: {
|
127
|
+
control: { type: 'text' },
|
128
|
+
},
|
129
|
+
leftHelper: {
|
130
|
+
control: { type: 'text' },
|
131
|
+
},
|
104
132
|
hintText: {
|
105
133
|
control: { type: 'text' },
|
106
|
-
if: {
|
134
|
+
if: {
|
135
|
+
arg: 'hasHint',
|
136
|
+
truthy: true,
|
137
|
+
},
|
107
138
|
},
|
108
139
|
hintView: {
|
109
140
|
options: hintViews,
|
110
141
|
control: {
|
111
142
|
type: 'select',
|
112
143
|
},
|
113
|
-
if: {
|
144
|
+
if: {
|
145
|
+
arg: 'hasHint',
|
146
|
+
truthy: true,
|
147
|
+
},
|
114
148
|
},
|
115
149
|
hintSize: {
|
116
150
|
options: hintSizes,
|
117
151
|
control: {
|
118
152
|
type: 'select',
|
119
153
|
},
|
120
|
-
if: {
|
154
|
+
if: {
|
155
|
+
arg: 'hasHint',
|
156
|
+
truthy: true,
|
157
|
+
},
|
121
158
|
},
|
122
159
|
hintTargetPlacement: {
|
123
160
|
options: hintTargetPlacements,
|
124
161
|
control: {
|
125
162
|
type: 'inline-radio',
|
126
163
|
},
|
127
|
-
if: {
|
164
|
+
if: {
|
165
|
+
arg: 'hasHint',
|
166
|
+
truthy: true,
|
167
|
+
},
|
128
168
|
},
|
129
169
|
hintTrigger: {
|
130
170
|
options: hintTriggers,
|
131
171
|
control: {
|
132
172
|
type: 'inline-radio',
|
133
173
|
},
|
134
|
-
if: {
|
174
|
+
if: {
|
175
|
+
arg: 'hasHint',
|
176
|
+
truthy: true,
|
177
|
+
},
|
135
178
|
},
|
136
179
|
hintPlacement: {
|
137
180
|
options: placements,
|
138
181
|
control: {
|
139
182
|
type: 'select',
|
140
183
|
},
|
141
|
-
if: {
|
184
|
+
if: {
|
185
|
+
arg: 'hasHint',
|
186
|
+
truthy: true,
|
187
|
+
},
|
142
188
|
mappers: placements,
|
143
189
|
},
|
144
190
|
hintHasArrow: {
|
145
191
|
control: { type: 'boolean' },
|
146
|
-
if: {
|
192
|
+
if: {
|
193
|
+
arg: 'hasHint',
|
194
|
+
truthy: true,
|
195
|
+
},
|
147
196
|
},
|
148
197
|
hintWidth: {
|
149
198
|
control: { type: 'text' },
|
150
|
-
if: {
|
199
|
+
if: {
|
200
|
+
arg: 'hasHint',
|
201
|
+
truthy: true,
|
202
|
+
},
|
151
203
|
},
|
152
204
|
chipType: {
|
153
205
|
control: 'select',
|
@@ -183,19 +235,28 @@ type StoryPropsDefault = Omit<
|
|
183
235
|
enableContentRight: boolean;
|
184
236
|
};
|
185
237
|
|
186
|
-
const StoryDemo = ({ enableContentLeft, enableContentRight, view, ...rest }: StoryPropsDefault) => {
|
238
|
+
const StoryDemo = ({ enableContentLeft, enableContentRight, view, readOnly, ...rest }: StoryPropsDefault) => {
|
187
239
|
const [text, setText] = useState('Значение поля');
|
188
240
|
|
189
|
-
const
|
241
|
+
const contentRight = enableContentRight || readOnly ? getIcon(IconCross, rest.size, readOnly) : undefined;
|
190
242
|
|
191
243
|
return (
|
192
|
-
<div
|
244
|
+
<div
|
245
|
+
style={{
|
246
|
+
display: 'flex',
|
247
|
+
flexDirection: 'column',
|
248
|
+
gap: '2rem',
|
249
|
+
width: '70%',
|
250
|
+
margin: '0 auto',
|
251
|
+
}}
|
252
|
+
>
|
193
253
|
<TextField
|
194
254
|
{...rest}
|
195
255
|
enumerationType="plain"
|
196
256
|
value={text}
|
197
|
-
|
198
|
-
|
257
|
+
readOnly={readOnly}
|
258
|
+
contentLeft={enableContentLeft ? getIcon(IconPlaceholder, rest.size) : undefined}
|
259
|
+
contentRight={contentRight}
|
199
260
|
view={view}
|
200
261
|
onChange={(e) => {
|
201
262
|
setText(e.target.value);
|
@@ -211,9 +272,10 @@ const StoryDemo = ({ enableContentLeft, enableContentRight, view, ...rest }: Sto
|
|
211
272
|
label="Uncontrolled TextField"
|
212
273
|
defaultValue="Дефолтное значение"
|
213
274
|
enumerationType="plain"
|
214
|
-
contentLeft={enableContentLeft ?
|
215
|
-
contentRight={
|
275
|
+
contentLeft={enableContentLeft ? getIcon(IconPlaceholder, rest.size) : undefined}
|
276
|
+
contentRight={contentRight}
|
216
277
|
view={view}
|
278
|
+
readOnly={readOnly}
|
217
279
|
onFocus={onFocus}
|
218
280
|
onBlur={onBlur}
|
219
281
|
onSearch={onSearch}
|
@@ -285,10 +347,10 @@ type StoryPropsChips = Omit<
|
|
285
347
|
enableContentRight: boolean;
|
286
348
|
};
|
287
349
|
|
288
|
-
const StoryChips = ({ enableContentLeft, enableContentRight, view, ...rest }: StoryPropsChips) => {
|
350
|
+
const StoryChips = ({ enableContentLeft, enableContentRight, view, readOnly, ...rest }: StoryPropsChips) => {
|
289
351
|
const [text, setText] = useState('Значение поля');
|
290
352
|
|
291
|
-
const
|
353
|
+
const contentRight = enableContentRight || readOnly ? getIcon(IconCross, rest.size, readOnly) : undefined;
|
292
354
|
|
293
355
|
const validateChip = (value) => (value === '1 value' ? { view: 'negative' } : {});
|
294
356
|
|
@@ -297,9 +359,10 @@ const StoryChips = ({ enableContentLeft, enableContentRight, view, ...rest }: St
|
|
297
359
|
{...rest}
|
298
360
|
enumerationType="chip"
|
299
361
|
value={text}
|
300
|
-
contentLeft={enableContentLeft ?
|
301
|
-
contentRight={
|
362
|
+
contentLeft={enableContentLeft ? getIcon(IconPlaceholder, rest.size) : undefined}
|
363
|
+
contentRight={contentRight}
|
302
364
|
view={view}
|
365
|
+
readOnly={readOnly}
|
303
366
|
onChange={(e) => {
|
304
367
|
setText(e.target.value);
|
305
368
|
onChange(e.target.value);
|
@@ -308,7 +371,10 @@ const StoryChips = ({ enableContentLeft, enableContentRight, view, ...rest }: St
|
|
308
371
|
onBlur={onBlur}
|
309
372
|
onChangeChips={onChipsChange}
|
310
373
|
chipValidator={validateChip}
|
311
|
-
style={{
|
374
|
+
style={{
|
375
|
+
width: '70%',
|
376
|
+
margin: '0 auto',
|
377
|
+
}}
|
312
378
|
/>
|
313
379
|
);
|
314
380
|
};
|
@@ -69,11 +69,11 @@ const StoryDemo = ({ context }) => {
|
|
69
69
|
|
70
70
|
return (
|
71
71
|
<>
|
72
|
-
{Object.entries(groupedTokens).map(([category,
|
72
|
+
{Object.entries(groupedTokens).map(([category, value]) => (
|
73
73
|
<CategoryContainer key={category}>
|
74
74
|
<Category>{category}</Category>
|
75
75
|
<Accordion view="clear" size="s" stretching="filled" defaultActiveEventKey={[0]}>
|
76
|
-
{Object.entries(
|
76
|
+
{Object.entries(value).map(([subcategory, value2], index) => (
|
77
77
|
<StyledAccordionItem
|
78
78
|
key={subcategory}
|
79
79
|
eventKey={index}
|
@@ -85,37 +85,31 @@ const StoryDemo = ({ context }) => {
|
|
85
85
|
<ColorCircle disableShadow />
|
86
86
|
Color
|
87
87
|
</ColumnTitle>
|
88
|
-
<ColumnTitle>Tone</ColumnTitle>
|
89
88
|
<ColumnTitle>Opacity</ColumnTitle>
|
90
89
|
</AccordionInfo>
|
91
90
|
}
|
92
91
|
>
|
93
92
|
<TokenInfoWrapper>
|
94
|
-
{Object.entries(
|
95
|
-
|
96
|
-
<
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
</TokenInfo>
|
115
|
-
<TokenInfo className="no-interaction">{opacity?.parsedAlpha}</TokenInfo>
|
116
|
-
</AccordionInfo>
|
117
|
-
),
|
118
|
-
)}
|
93
|
+
{Object.entries(value2).map(([token, { value: value3, opacity }]) => (
|
94
|
+
<AccordionInfo key={token}>
|
95
|
+
<TokenInfo className="copy" onClick={() => copyToClipboard(token)}>
|
96
|
+
{token}
|
97
|
+
</TokenInfo>
|
98
|
+
<TokenInfo
|
99
|
+
className="color copy"
|
100
|
+
onClick={() => copyToClipboard(value3, opacity?.alpha)}
|
101
|
+
>
|
102
|
+
<ColorCircle background={value3} />
|
103
|
+
<div>
|
104
|
+
{value3.includes('gradient') ? 'Градиент' : value3}
|
105
|
+
{opacity && <OpacityPart>{opacity.alpha}</OpacityPart>}
|
106
|
+
</div>
|
107
|
+
</TokenInfo>
|
108
|
+
{opacity && (
|
109
|
+
<TokenInfo className="opacity">{opacity.parsedAlpha}</TokenInfo>
|
110
|
+
)}
|
111
|
+
</AccordionInfo>
|
112
|
+
))}
|
119
113
|
</TokenInfoWrapper>
|
120
114
|
</StyledAccordionItem>
|
121
115
|
))}
|
@@ -16,7 +16,7 @@ var Category = exports.Category = /*#__PURE__*/_styledComponents["default"].h2.w
|
|
16
16
|
})(["margin:0 0 1.125rem 1.5rem;", ";"], _mixins.h2);
|
17
17
|
var AccordionInfo = exports.AccordionInfo = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
18
18
|
componentId: "plasma-new-hope__sc-19i9718-2"
|
19
|
-
})(["display:grid;grid-template-columns:18rem 7.938rem
|
19
|
+
})(["display:grid;grid-template-columns:18rem 7.938rem 3.813rem;grid-column-gap:1.5rem;font-family:var(--plasma-typo-body-m-font-family);font-size:var(--plasma-typo-body-m-font-size);font-style:var(--plasma-typo-body-m-font-style);font-weight:var(--plasma-typo-body-m-font-weight);letter-spacing:var(--plasma-typo-body-m-letter-spacing);line-height:var(--plasma-typo-body-m-line-height);"]);
|
20
20
|
var Subcategory = exports.Subcategory = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
21
21
|
componentId: "plasma-new-hope__sc-19i9718-3"
|
22
22
|
})(["color:var(--text-secondary);"]);
|
@@ -34,7 +34,7 @@ var OpacityPart = exports.OpacityPart = /*#__PURE__*/_styledComponents["default"
|
|
34
34
|
})(["color:var(--text-secondary);padding-left:0.125rem;"]);
|
35
35
|
var TokenInfo = exports.TokenInfo = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
36
36
|
componentId: "plasma-new-hope__sc-19i9718-8"
|
37
|
-
})(["color:var(--text-paragraph);cursor:default;&.copy{cursor:copy;}&.color{display:flex;align-items:center;gap:0.5rem;}&.
|
37
|
+
})(["color:var(--text-paragraph);cursor:default;&.copy{cursor:copy;}&.color{display:flex;align-items:center;gap:0.5rem;}&.opacity{text-align:right;}&:not(.opacity):hover{color:var(--text-paragraph-hover);", "{color:var(--text-paragraph-hover);}}&:not(.opacity):active{color:var(--text-paragraph-active);", "{color:var(--text-secondary-active);}}"], OpacityPart, OpacityPart);
|
38
38
|
var ColorCircle = exports.ColorCircle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
39
39
|
componentId: "plasma-new-hope__sc-19i9718-9"
|
40
40
|
})(["width:1.25rem;height:1.25rem;border-radius:50%;background:", ";box-shadow:", ";"], function (props) {
|
package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { ComponentProps, useEffect, useRef, useState } from 'react';
|
2
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
3
3
|
import { action } from '@storybook/addon-actions';
|
4
|
-
import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
4
|
+
import { disableProps, IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
5
5
|
|
6
6
|
import { WithTheme } from '../../../_helpers';
|
7
7
|
import { IconButton } from '../IconButton/IconButton';
|
@@ -25,7 +25,7 @@ var config = exports.config = {
|
|
25
25
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _Range.rangeTokens.disabledOpacity)
|
26
26
|
},
|
27
27
|
readOnly: {
|
28
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-clear);", ":var(--surface-transparent-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-
|
28
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-clear);", ":var(--surface-transparent-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);", ":0.4;", ":0.4;", ":var(--text-primary);", ":transparent;", ":var(--text-secondary);"], _Range.rangeTokens.backgroundReadOnly, _Range.rangeTokens.borderColorReadOnly, _Range.rangeTokens.labelColorReadOnly, _Range.rangeTokens.leftHelperColorReadOnly, _Range.rangeTokens.dividerColorReadOnly, _Range.rangeTokens.dividerOpacityReadOnly, _Range.rangeTokens.rightContentOpacityReadOnly, _Range.rangeTokens.textFieldColorReadOnly, _Range.rangeTokens.textFieldBackgroundColorReadOnly, _Range.rangeTokens.textFieldPlaceholderColorReadOnly)
|
29
29
|
}
|
30
30
|
}
|
31
31
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { ChangeEvent, ComponentProps, Dispatch, SetStateAction, useState } from 'react';
|
2
2
|
import type { StoryObj, Meta } from '@storybook/react';
|
3
3
|
import { action } from '@storybook/addon-actions';
|
4
|
-
import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
4
|
+
import { disableProps, IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
5
5
|
|
6
6
|
import { WithTheme } from '../../../_helpers';
|
7
7
|
import { IconChevronLeft } from '../../../../components/_Icon';
|
@@ -45,7 +45,10 @@ const meta: Meta<typeof Range> = {
|
|
45
45
|
control: {
|
46
46
|
type: 'select',
|
47
47
|
},
|
48
|
-
if: {
|
48
|
+
if: {
|
49
|
+
arg: 'required',
|
50
|
+
truthy: true,
|
51
|
+
},
|
49
52
|
},
|
50
53
|
...disableProps(['view']),
|
51
54
|
},
|
@@ -76,10 +79,14 @@ const getSizeForIcon = (size) => {
|
|
76
79
|
return size;
|
77
80
|
};
|
78
81
|
|
79
|
-
const ActionButton = ({ size }) => {
|
82
|
+
const ActionButton = ({ size, readOnly }) => {
|
80
83
|
return (
|
81
|
-
<IconButton view="clear" size={size}>
|
82
|
-
<IconChevronLeft
|
84
|
+
<IconButton view="clear" size={size} disabled={readOnly}>
|
85
|
+
<IconChevronLeft
|
86
|
+
color={readOnly ? 'var(--text-secondary)' : 'inherit'}
|
87
|
+
size={getSizeForIcon(size)}
|
88
|
+
style={{ transform: 'rotate(180deg)' }}
|
89
|
+
/>
|
83
90
|
</IconButton>
|
84
91
|
);
|
85
92
|
};
|
@@ -115,7 +122,7 @@ const StoryDefault = ({
|
|
115
122
|
firstValue={firstValue}
|
116
123
|
secondValue={secondValue}
|
117
124
|
contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
|
118
|
-
contentRight={enableContentRight ? <ActionButton size={size} /> : undefined}
|
125
|
+
contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
|
119
126
|
firstTextfieldContentLeft={
|
120
127
|
enableFirstTextfieldContentLeft ? <IconPlaceholder size={iconSize} /> : undefined
|
121
128
|
}
|
@@ -266,7 +273,7 @@ const StoryDemo = ({ enableContentLeft, enableContentRight, size, ...rest }: Sto
|
|
266
273
|
firstValueSuccess={firstValueSuccess}
|
267
274
|
secondValueSuccess={secondValueSuccess}
|
268
275
|
contentLeft={enableContentLeft ? <IconPlaceholder size={iconSize} /> : undefined}
|
269
|
-
contentRight={enableContentRight ? <ActionButton size={size} /> : undefined}
|
276
|
+
contentRight={enableContentRight ? <ActionButton size={size} readOnly={rest.readOnly} /> : undefined}
|
270
277
|
onChangeFirstValue={(e) => {
|
271
278
|
handleChangeValue(
|
272
279
|
e,
|