@salutejs/sdds-cs 0.317.1-canary.2008.15410012369.0 → 0.317.1-canary.2013.15560496949.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Accordion/Accordion.d.ts +9 -10
- package/components/Attach/Attach.d.ts +158 -159
- package/components/Autocomplete/Autocomplete.d.ts +352 -353
- package/components/Avatar/Avatar.d.ts +46 -47
- package/components/AvatarGroup/AvatarGroup.d.ts +1 -2
- package/components/Badge/Badge.d.ts +40 -41
- package/components/Breadcrumbs/Breadcrumbs.d.ts +3 -4
- package/components/Button/Button.d.ts +71 -71
- package/components/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/components/Card/Card.d.ts +5 -6
- package/components/Carousel/Carousel.config.d.ts +14 -0
- package/components/Carousel/Carousel.config.js +23 -0
- package/components/Carousel/Carousel.d.ts +9 -0
- package/components/Carousel/Carousel.js +10 -0
- package/components/Carousel/index.d.ts +2 -0
- package/components/Carousel/index.js +19 -0
- package/components/Cell/Cell.d.ts +19 -20
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/Chip/Chip.d.ts +0 -1
- package/components/ChipGroup/ChipGroup.d.ts +0 -1
- package/components/Combobox/Combobox.config.js +3 -3
- package/components/Combobox/Combobox.d.ts +975 -951
- package/components/Counter/Counter.d.ts +0 -1
- package/components/DatePicker/DatePicker.d.ts +52 -54
- package/components/Divider/Divider.d.ts +0 -1
- package/components/Drawer/Drawer.d.ts +18 -19
- package/components/Dropdown/Dropdown.d.ts +52 -52
- package/components/Dropzone/Dropzone.d.ts +15 -16
- package/components/EmptyState/EmptyState.d.ts +0 -1
- package/components/Flow/Flow.d.ts +1 -2
- package/components/Grid/Grid.d.ts +0 -1
- package/components/IconButton/IconButton.d.ts +35 -36
- package/components/Image/Image.d.ts +3 -4
- package/components/Indicator/Indicator.d.ts +0 -1
- package/components/Link/Link.d.ts +1 -2
- package/components/Mask/Mask.d.ts +224 -225
- package/components/Notification/Notification.d.ts +7 -6
- package/components/Notification/Notification.js +3 -21
- package/components/Notification/index.d.ts +3 -2
- package/components/Notification/index.js +4 -3
- package/components/NumberFormat/NumberFormat.d.ts +1 -1
- package/components/NumberInput/NumberInput.d.ts +38 -39
- package/components/Pagination/Pagination.d.ts +0 -1
- package/components/Popover/Popover.d.ts +0 -1
- package/components/Price/Price.d.ts +0 -1
- package/components/Progress/Progress.d.ts +0 -1
- package/components/Radiobox/Radiobox.d.ts +1 -1
- package/components/Range/Range.d.ts +105 -106
- package/components/Rating/Rating.d.ts +13 -14
- package/components/Segment/Segment.d.ts +8 -9
- package/components/Select/Select.config.js +3 -3
- package/components/Select/Select.d.ts +247 -244
- package/components/Sheet/Sheet.d.ts +0 -1
- package/components/Skeleton/Skeleton.d.ts +4 -5
- package/components/Slider/Slider.d.ts +96 -105
- package/components/Spinner/Spinner.d.ts +9 -14
- package/components/Steps/Steps.d.ts +0 -1
- package/components/Switch/Switch.d.ts +1 -1
- package/components/Table/Table.config.js +3 -3
- package/components/Table/Table.d.ts +0 -1
- package/components/Tabs/TabItem.d.ts +23 -23
- package/components/Tabs/Tabs.d.ts +1 -1
- package/components/TextArea/TextArea.d.ts +205 -206
- package/components/TextField/TextField.d.ts +224 -225
- package/components/Toast/Toast.d.ts +0 -1
- package/components/ToastNew/ToastNew.d.ts +1 -1
- package/components/Tokens/Colors/Colors.styles.d.ts +25 -26
- package/components/Tokens/Typography/Typography.styles.d.ts +23 -24
- package/components/Toolbar/Toolbar.d.ts +5 -6
- package/components/Tree/Tree.d.ts +0 -1
- package/components/Typography/Typography.d.ts +204 -205
- package/components/ViewContainer/ViewContainer.d.ts +0 -1
- package/emotion/cjs/components/Carousel/Carousel.config.js +23 -0
- package/emotion/cjs/components/Carousel/Carousel.js +10 -0
- package/emotion/cjs/components/Carousel/Carousel.stories.tsx +138 -0
- package/emotion/cjs/components/Carousel/index.js +19 -0
- package/emotion/cjs/components/Combobox/Combobox.config.js +3 -3
- package/emotion/cjs/components/Combobox/Combobox.stories.tsx +186 -0
- package/emotion/cjs/components/DatePicker/DatePicker.stories.tsx +10 -2
- package/emotion/cjs/components/Notification/Notification.js +3 -21
- package/emotion/cjs/components/Notification/Notification.stories.tsx +3 -8
- package/emotion/cjs/components/Notification/index.js +4 -3
- package/emotion/cjs/components/Select/Select.config.js +3 -3
- package/emotion/cjs/components/Select/Select.stories.tsx +186 -0
- package/emotion/cjs/components/Table/Table.config.js +3 -3
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Carousel/Carousel.config.js +17 -0
- package/emotion/es/components/Carousel/Carousel.js +5 -0
- package/emotion/es/components/Carousel/Carousel.stories.tsx +138 -0
- package/emotion/es/components/Carousel/index.js +2 -0
- package/emotion/es/components/Combobox/Combobox.config.js +3 -3
- package/emotion/es/components/Combobox/Combobox.stories.tsx +186 -0
- package/emotion/es/components/DatePicker/DatePicker.stories.tsx +10 -2
- package/emotion/es/components/Notification/Notification.js +4 -5
- package/emotion/es/components/Notification/Notification.stories.tsx +3 -8
- package/emotion/es/components/Notification/index.js +2 -1
- package/emotion/es/components/Select/Select.config.js +3 -3
- package/emotion/es/components/Select/Select.stories.tsx +186 -0
- package/emotion/es/components/Table/Table.config.js +3 -3
- package/emotion/es/index.js +1 -0
- package/es/components/Carousel/Carousel.config.js +17 -0
- package/es/components/Carousel/Carousel.js +5 -0
- package/es/components/Carousel/index.js +2 -0
- package/es/components/Combobox/Combobox.config.js +3 -3
- package/es/components/Notification/Notification.js +4 -5
- package/es/components/Notification/index.js +2 -1
- package/es/components/Select/Select.config.js +3 -3
- package/es/components/Table/Table.config.js +3 -3
- package/es/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +11 -0
- package/mixins/index.d.ts +1 -2
- package/package.json +7 -7
@@ -9,11 +9,11 @@ export var config = {
|
|
9
9
|
},
|
10
10
|
variations: {
|
11
11
|
view: {
|
12
|
-
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-primary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-accent);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-accent);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--outline-solid-primary-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--text-secondary);\n ", ": var(--text-secondary-hover);\n ", ": var(--text-secondary-active);\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-hover);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-active);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": 0.72;\n ", ": var(--surface-solid-primary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n "])), tokens.textFieldColor, tokens.textFieldClearColor, tokens.textFieldPlaceholderColor, tokens.textFieldPlaceholderColorFocus, tokens.textFieldClearPlaceholderColor, tokens.textFieldClearPlaceholderColorFocus, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldBorderColor, tokens.textFieldBorderColorHover, tokens.textFieldBorderColorFocus, tokens.textFieldContentSlotColor, tokens.textFieldContentSlotColorHover, tokens.textFieldContentSlotColorActive, tokens.textFieldContentSlotRightColor, tokens.textFieldContentSlotRightColorHover, tokens.textFieldContentSlotRightColorActive, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly, tokens.dropdownBorderColor, tokens.disclosureIconColor, tokens.disclosureIconColorHover, tokens.itemBackgroundHover),
|
13
|
-
negative: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-primary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-accent);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--text-negative);\n ", ": var(--text-accent);\n\n ", ": var(--outline-negative);\n ", ": var(--outline-negative-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--text-secondary);\n ", ": var(--text-secondary-hover);\n ", ": var(--text-secondary-active);\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-hover);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-active);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": 0.72;\n ", ": var(--surface-solid-primary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n "])), tokens.textFieldColor, tokens.textFieldClearColor, tokens.textFieldPlaceholderColor, tokens.textFieldPlaceholderColorFocus, tokens.textFieldClearPlaceholderColor, tokens.textFieldClearPlaceholderColorFocus, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldBorderColor, tokens.textFieldBorderColorHover, tokens.textFieldBorderColorFocus, tokens.textFieldContentSlotColor, tokens.textFieldContentSlotColorHover, tokens.textFieldContentSlotColorActive, tokens.textFieldContentSlotRightColor, tokens.textFieldContentSlotRightColorHover, tokens.textFieldContentSlotRightColorActive, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly, tokens.dropdownBorderColor, tokens.disclosureIconColor, tokens.disclosureIconColorHover, tokens.itemBackgroundHover)
|
12
|
+
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-primary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-accent);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-accent);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--outline-solid-primary-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--text-secondary);\n ", ": var(--text-secondary-hover);\n ", ": var(--text-secondary-active);\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-hover);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-active);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": 0.72;\n ", ": var(--surface-solid-primary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n\n ", ": var(--surface-solid-primary);\n "])), tokens.textFieldColor, tokens.textFieldClearColor, tokens.textFieldPlaceholderColor, tokens.textFieldPlaceholderColorFocus, tokens.textFieldClearPlaceholderColor, tokens.textFieldClearPlaceholderColorFocus, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldBorderColor, tokens.textFieldBorderColorHover, tokens.textFieldBorderColorFocus, tokens.textFieldContentSlotColor, tokens.textFieldContentSlotColorHover, tokens.textFieldContentSlotColorActive, tokens.textFieldContentSlotRightColor, tokens.textFieldContentSlotRightColorHover, tokens.textFieldContentSlotRightColorActive, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly, tokens.dropdownBorderColor, tokens.disclosureIconColor, tokens.disclosureIconColorHover, tokens.itemBackgroundHover, tokens.dividerColor),
|
13
|
+
negative: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-primary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n ", ": var(--text-secondary);\n ", ": var(--text-tertiary);\n\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-accent);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--text-negative);\n ", ": var(--text-accent);\n\n ", ": var(--outline-negative);\n ", ": var(--outline-negative-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--text-secondary);\n ", ": var(--text-secondary-hover);\n ", ": var(--text-secondary-active);\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-hover);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary-active);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": var(--surface-transparent-secondary);\n ", ": var(--text-primary);\n ", ": 0.72;\n ", ": var(--surface-solid-primary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n\n ", ": var(--surface-solid-primary);\n "])), tokens.textFieldColor, tokens.textFieldClearColor, tokens.textFieldPlaceholderColor, tokens.textFieldPlaceholderColorFocus, tokens.textFieldClearPlaceholderColor, tokens.textFieldClearPlaceholderColorFocus, tokens.textFieldBackgroundColor, tokens.textFieldBackgroundColorFocus, tokens.textFieldCaretColor, tokens.textFieldTextBeforeColor, tokens.textFieldTextAfterColor, tokens.textFieldLabelColor, tokens.textFieldLeftHelperColor, tokens.textFieldFocusColor, tokens.textFieldBorderColor, tokens.textFieldBorderColorHover, tokens.textFieldBorderColorFocus, tokens.textFieldContentSlotColor, tokens.textFieldContentSlotColorHover, tokens.textFieldContentSlotColorActive, tokens.textFieldContentSlotRightColor, tokens.textFieldContentSlotRightColorHover, tokens.textFieldContentSlotRightColorActive, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, tokens.textFieldChipCloseIconColor, tokens.textFieldChipColor, tokens.textFieldChipBackground, tokens.textFieldChipColorHover, tokens.textFieldChipBackgroundHover, tokens.textFieldChipColorActive, tokens.textFieldChipBackgroundActive, tokens.textFieldChipBackgroundReadOnly, tokens.textFieldChipColorReadOnly, tokens.textFieldChipBackgroundReadOnlyHover, tokens.textFieldChipColorReadOnlyHover, tokens.textFieldChipOpacityReadonly, tokens.dropdownBorderColor, tokens.disclosureIconColor, tokens.disclosureIconColorHover, tokens.itemBackgroundHover, tokens.dividerColor)
|
14
14
|
},
|
15
15
|
size: {
|
16
|
-
s: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 2.5rem;\n ", ": 0.6875rem 0.75rem 0.6875rem 0.75rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.125rem;\n\n ", ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ", ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n\n ", ": 0 0.25rem 0 0;\n ", ": 0 0 0 0.25rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0.5rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.25rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.3125rem 0 0 0;\n ", ": 1.0625rem 0 0.3125rem 0;\n\n ", ": 0.375rem;\n ", ": 0.375rem;\n ", ": 0 0 0 0;\n ", ": 0.3125rem auto auto -0.6875rem;\n ", ": 0 0 auto auto;\n ", ": 0.25rem -0.625rem auto auto;\n ", ": 1.063rem auto auto -0.75rem;\n ", ": 1.063rem -0.75rem auto auto;\n ", ": 1.063rem -2.125rem auto auto;\n\n ", ": 0.25rem;\n ", ": 0.25rem;\n ", ": auto;\n ", ": 1.75rem;\n ", ": 0 0.5rem 0 0.75rem;\n ", ": 0.375rem;\n ", ": 0rem;\n ", ": 1rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.625rem 0.875rem 0.625rem 0.875rem;\n ", ": 0.125rem;\n ", ": 0.75rem;\n\n ", ": 1.5rem;\n ", ": 0.5rem 0.75rem;\n ", ": 0.25rem 0.75rem;\n ", ": 0.5rem;\n ", ": 1.5rem;\n ", ": 1rem;\n ", ": 0 0.375rem 0 0;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0.125rem;\n ", ": 0.375rem;\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 1.25rem;\n ", ": 0.875rem;\n ", ": 0.375rem;\n ", ": 0.25rem;\n ", ": var(--text-accent);\n ", ": var(--on-dark-text-primary);\n ", ": none;\n ", ": 0.125rem;\n ", ": var(--outline-accent);\n\n ", ": 0.375rem;\n ", ": 0.0625rem;\n "])), tokens.textFieldHeight, tokens.textFieldPadding, tokens.textFieldPaddingWithChips, tokens.textFieldBorderRadius, tokens.textFieldBorderWidth, tokens.textFieldLeftContentMargin, tokens.textFieldRightContentMargin, tokens.textFieldTextBeforeMargin, tokens.textFieldTextAfterMargin, tokens.textFieldFontFamily, tokens.textFieldFontSize, tokens.textFieldFontStyle, tokens.textFieldFontWeight, tokens.textFieldLetterSpacing, tokens.textFieldLineHeight, tokens.textFieldLabelOffset, tokens.textFieldLabelFontFamily, tokens.textFieldLabelFontSize, tokens.textFieldLabelFontStyle, tokens.textFieldLabelFontWeight, tokens.textFieldLabelLetterSpacing, tokens.textFieldLabelLineHeight, tokens.textFieldLeftHelperOffset, tokens.textFieldLeftHelperFontFamily, tokens.textFieldLeftHelperFontSize, tokens.textFieldLeftHelperFontStyle, tokens.textFieldLeftHelperFontWeight, tokens.textFieldLeftHelperLetterSpacing, tokens.textFieldLeftHelperLineHeight, tokens.textFieldLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, tokens.textFieldIndicatorSizeInner, tokens.textFieldIndicatorSizeOuter, tokens.textFieldIndicatorLabelPlacementInner, tokens.textFieldIndicatorLabelPlacementOuter, tokens.textFieldIndicatorLabelPlacementInnerRight, tokens.textFieldIndicatorLabelPlacementOuterRight, tokens.textFieldClearIndicatorLabelPlacementInner, tokens.textFieldClearIndicatorLabelPlacementInnerRight, tokens.textFieldClearIndicatorHintInnerRight, tokens.textFieldChipGap, tokens.textFieldChipBorderRadius, tokens.textFieldChipWidth, tokens.textFieldChipHeight, tokens.textFieldChipPadding, tokens.textFieldChipClearContentMarginLeft, tokens.textFieldChipClearContentMarginRight, tokens.textFieldChipCloseIconSize, tokens.textFieldChipFontFamily, tokens.textFieldChipFontSize, tokens.textFieldChipFontStyle, tokens.textFieldChipFontWeight, tokens.textFieldChipLetterSpacing, tokens.textFieldChipLineHeight, tokens.emptyStatePadding, tokens.padding, tokens.borderRadius, tokens.itemHeight, tokens.itemPadding, tokens.itemPaddingTight, tokens.itemBorderRadius, tokens.itemIconSize, tokens.itemIconSizeTight, tokens.itemIconMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, tokens.cellPadding, tokens.cellPaddingLeftContent, tokens.cellPaddingContent, tokens.cellPaddingRightContent, tokens.cellTextboxGap, tokens.cellGap, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.checkboxTriggerSize, tokens.checkboxTriggerSizeTight, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderRadiusTight, tokens.checkboxFillColor, tokens.checkboxIconColor, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderColor, tokens.indicatorSize, tokens.dropdownBorderWidth)
|
16
|
+
s: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 2.5rem;\n ", ": 0.6875rem 0.75rem 0.6875rem 0.75rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.125rem;\n\n ", ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ", ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n\n ", ": 0 0.25rem 0 0;\n ", ": 0 0 0 0.25rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0.5rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.25rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.3125rem 0 0 0;\n ", ": 1.0625rem 0 0.3125rem 0;\n\n ", ": 0.375rem;\n ", ": 0.375rem;\n ", ": 0 0 0 0;\n ", ": 0.3125rem auto auto -0.6875rem;\n ", ": 0 0 auto auto;\n ", ": 0.25rem -0.625rem auto auto;\n ", ": 1.063rem auto auto -0.75rem;\n ", ": 1.063rem -0.75rem auto auto;\n ", ": 1.063rem -2.125rem auto auto;\n\n ", ": 0.25rem;\n ", ": 0.25rem;\n ", ": auto;\n ", ": 1.75rem;\n ", ": 0 0.5rem 0 0.75rem;\n ", ": 0.375rem;\n ", ": 0rem;\n ", ": 1rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.625rem 0.875rem 0.625rem 0.875rem;\n ", ": 0.125rem;\n ", ": 0.75rem;\n\n ", ": 1.5rem;\n ", ": 0.5rem 0.75rem;\n ", ": 0.25rem 0.75rem;\n ", ": 0.5rem;\n ", ": 1.5rem;\n ", ": 1rem;\n ", ": 0 0.375rem 0 0;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0.125rem;\n ", ": 0.375rem;\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 1.25rem;\n ", ": 0.875rem;\n ", ": 0.375rem;\n ", ": 0.25rem;\n ", ": var(--text-accent);\n ", ": var(--on-dark-text-primary);\n ", ": none;\n ", ": 0.125rem;\n ", ": var(--outline-accent);\n\n ", ": 0.375rem;\n ", ": 0.0625rem;\n\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.25rem;\n ", ": 0.25rem;\n "])), tokens.textFieldHeight, tokens.textFieldPadding, tokens.textFieldPaddingWithChips, tokens.textFieldBorderRadius, tokens.textFieldBorderWidth, tokens.textFieldLeftContentMargin, tokens.textFieldRightContentMargin, tokens.textFieldTextBeforeMargin, tokens.textFieldTextAfterMargin, tokens.textFieldFontFamily, tokens.textFieldFontSize, tokens.textFieldFontStyle, tokens.textFieldFontWeight, tokens.textFieldLetterSpacing, tokens.textFieldLineHeight, tokens.textFieldLabelOffset, tokens.textFieldLabelFontFamily, tokens.textFieldLabelFontSize, tokens.textFieldLabelFontStyle, tokens.textFieldLabelFontWeight, tokens.textFieldLabelLetterSpacing, tokens.textFieldLabelLineHeight, tokens.textFieldLeftHelperOffset, tokens.textFieldLeftHelperFontFamily, tokens.textFieldLeftHelperFontSize, tokens.textFieldLeftHelperFontStyle, tokens.textFieldLeftHelperFontWeight, tokens.textFieldLeftHelperLetterSpacing, tokens.textFieldLeftHelperLineHeight, tokens.textFieldLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, tokens.textFieldIndicatorSizeInner, tokens.textFieldIndicatorSizeOuter, tokens.textFieldIndicatorLabelPlacementInner, tokens.textFieldIndicatorLabelPlacementOuter, tokens.textFieldIndicatorLabelPlacementInnerRight, tokens.textFieldIndicatorLabelPlacementOuterRight, tokens.textFieldClearIndicatorLabelPlacementInner, tokens.textFieldClearIndicatorLabelPlacementInnerRight, tokens.textFieldClearIndicatorHintInnerRight, tokens.textFieldChipGap, tokens.textFieldChipBorderRadius, tokens.textFieldChipWidth, tokens.textFieldChipHeight, tokens.textFieldChipPadding, tokens.textFieldChipClearContentMarginLeft, tokens.textFieldChipClearContentMarginRight, tokens.textFieldChipCloseIconSize, tokens.textFieldChipFontFamily, tokens.textFieldChipFontSize, tokens.textFieldChipFontStyle, tokens.textFieldChipFontWeight, tokens.textFieldChipLetterSpacing, tokens.textFieldChipLineHeight, tokens.emptyStatePadding, tokens.padding, tokens.borderRadius, tokens.itemHeight, tokens.itemPadding, tokens.itemPaddingTight, tokens.itemBorderRadius, tokens.itemIconSize, tokens.itemIconSizeTight, tokens.itemIconMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, tokens.cellPadding, tokens.cellPaddingLeftContent, tokens.cellPaddingContent, tokens.cellPaddingRightContent, tokens.cellTextboxGap, tokens.cellGap, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.checkboxTriggerSize, tokens.checkboxTriggerSizeTight, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderRadiusTight, tokens.checkboxFillColor, tokens.checkboxIconColor, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderColor, tokens.indicatorSize, tokens.dropdownBorderWidth, tokens.dividerMarginTop, tokens.dividerMarginRight, tokens.dividerMarginBottom, tokens.dividerMarginLeft, tokens.dividerMarginTopTight, tokens.dividerMarginBottomTight)
|
17
17
|
},
|
18
18
|
labelPlacement: {
|
19
19
|
inner: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--plasma-input-label-color, var(--plasma-input-placeholder-color, var(--plasma-colors-secondary)));\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n "])), tokens.textFieldPlaceholderColor, tokens.textFieldLabelInnerFontFamily, tokens.textFieldLabelInnerFontSize, tokens.textFieldLabelInnerFontStyle, tokens.textFieldLabelInnerFontWeight, tokens.textFieldLabelInnerLetterSpacing, tokens.textFieldLabelInnerLineHeight),
|
@@ -8,6 +8,8 @@ import { Combobox } from './Combobox';
|
|
8
8
|
|
9
9
|
type StorySelectProps = ComponentProps<typeof Combobox> & {
|
10
10
|
enableContentLeft?: boolean;
|
11
|
+
selectAllLabel?: string;
|
12
|
+
selectAllSticky?: boolean;
|
11
13
|
};
|
12
14
|
|
13
15
|
const view = ['default', 'negative'];
|
@@ -416,3 +418,187 @@ const MultipleStory = (args: StorySelectProps) => {
|
|
416
418
|
export const Multiple: StoryObj<StorySelectProps> = {
|
417
419
|
render: (args) => <MultipleStory {...args} />,
|
418
420
|
};
|
421
|
+
|
422
|
+
const flatItems = [
|
423
|
+
{
|
424
|
+
value: 'north_america',
|
425
|
+
label: 'Северная Америка',
|
426
|
+
},
|
427
|
+
{
|
428
|
+
value: 'rio_de_janeiro',
|
429
|
+
label: 'Рио-де-Жанейро',
|
430
|
+
},
|
431
|
+
{
|
432
|
+
value: 'sao_paulo',
|
433
|
+
label: 'Сан-Паулу',
|
434
|
+
},
|
435
|
+
{
|
436
|
+
value: 'buenos_aires',
|
437
|
+
label: 'Буэнос-Айрес',
|
438
|
+
},
|
439
|
+
{
|
440
|
+
value: 'cordoba',
|
441
|
+
label: 'Кордова',
|
442
|
+
},
|
443
|
+
{
|
444
|
+
value: 'bogota',
|
445
|
+
label: 'Богота',
|
446
|
+
},
|
447
|
+
{
|
448
|
+
value: 'medellin',
|
449
|
+
label: 'Медельин',
|
450
|
+
},
|
451
|
+
{
|
452
|
+
value: 'paris',
|
453
|
+
label: 'Париж',
|
454
|
+
},
|
455
|
+
{
|
456
|
+
value: 'lyon',
|
457
|
+
label: 'Лион',
|
458
|
+
},
|
459
|
+
{
|
460
|
+
value: 'berlin',
|
461
|
+
label: 'Берлин',
|
462
|
+
},
|
463
|
+
{
|
464
|
+
value: 'munich',
|
465
|
+
label: 'Мюнхен',
|
466
|
+
},
|
467
|
+
{
|
468
|
+
value: 'rome',
|
469
|
+
label: 'Рим',
|
470
|
+
},
|
471
|
+
{
|
472
|
+
value: 'milan',
|
473
|
+
label: 'Милан',
|
474
|
+
},
|
475
|
+
{
|
476
|
+
value: 'madrid',
|
477
|
+
label: 'Мадрид',
|
478
|
+
},
|
479
|
+
{
|
480
|
+
value: 'barcelona',
|
481
|
+
label: 'Барселона',
|
482
|
+
},
|
483
|
+
{
|
484
|
+
value: 'london',
|
485
|
+
label: 'Лондон',
|
486
|
+
},
|
487
|
+
{
|
488
|
+
value: 'manchester',
|
489
|
+
label: 'Манчестер',
|
490
|
+
},
|
491
|
+
{
|
492
|
+
value: 'beijing',
|
493
|
+
label: 'Пекин',
|
494
|
+
},
|
495
|
+
{
|
496
|
+
value: 'shanghai',
|
497
|
+
label: 'Шанхай',
|
498
|
+
},
|
499
|
+
{
|
500
|
+
value: 'tokyo',
|
501
|
+
label: 'Токио',
|
502
|
+
},
|
503
|
+
{
|
504
|
+
value: 'osaka',
|
505
|
+
label: 'Осака',
|
506
|
+
},
|
507
|
+
{
|
508
|
+
value: 'delhi',
|
509
|
+
label: 'Дели',
|
510
|
+
},
|
511
|
+
{
|
512
|
+
value: 'mumbai',
|
513
|
+
label: 'Мумбаи',
|
514
|
+
},
|
515
|
+
{
|
516
|
+
value: 'seoul',
|
517
|
+
label: 'Сеул',
|
518
|
+
},
|
519
|
+
{
|
520
|
+
value: 'busan',
|
521
|
+
label: 'Пусан',
|
522
|
+
},
|
523
|
+
{
|
524
|
+
value: 'bangkok',
|
525
|
+
label: 'Бангкок',
|
526
|
+
},
|
527
|
+
{
|
528
|
+
value: 'phuket',
|
529
|
+
label: 'Пхукет',
|
530
|
+
},
|
531
|
+
{
|
532
|
+
value: 'africa',
|
533
|
+
label: 'Африка',
|
534
|
+
},
|
535
|
+
];
|
536
|
+
|
537
|
+
const SelectAllStory = (args: StorySelectProps) => {
|
538
|
+
const [value, setValue] = useState([]);
|
539
|
+
const [checked, setChecked] = useState(false);
|
540
|
+
const [indeterminate, setIndeterminate] = useState(false);
|
541
|
+
|
542
|
+
const handleClick = () => {
|
543
|
+
if (checked && !indeterminate) {
|
544
|
+
setValue([]);
|
545
|
+
} else {
|
546
|
+
setValue(flatItems.map((item) => item.value));
|
547
|
+
}
|
548
|
+
};
|
549
|
+
|
550
|
+
React.useEffect(() => {
|
551
|
+
if (value.length === 0) {
|
552
|
+
setChecked(false);
|
553
|
+
setIndeterminate(false);
|
554
|
+
} else if (value.length === flatItems.length) {
|
555
|
+
setChecked(true);
|
556
|
+
setIndeterminate(false);
|
557
|
+
} else {
|
558
|
+
setChecked(true);
|
559
|
+
setIndeterminate(true);
|
560
|
+
}
|
561
|
+
}, [value]);
|
562
|
+
|
563
|
+
return (
|
564
|
+
<div style={{ width: '400px' }}>
|
565
|
+
<Combobox
|
566
|
+
placeholder="Placeholder"
|
567
|
+
multiple
|
568
|
+
items={flatItems}
|
569
|
+
value={value}
|
570
|
+
onChange={setValue}
|
571
|
+
listOverflow="auto"
|
572
|
+
listMaxHeight="300px"
|
573
|
+
selectAllOptions={{
|
574
|
+
sticky: args?.selectAllSticky || false,
|
575
|
+
label: args?.selectAllLabel,
|
576
|
+
checked,
|
577
|
+
indeterminate,
|
578
|
+
onClick: handleClick,
|
579
|
+
}}
|
580
|
+
/>
|
581
|
+
</div>
|
582
|
+
);
|
583
|
+
};
|
584
|
+
|
585
|
+
export const SelectAll: StoryObj<StorySelectProps> = {
|
586
|
+
render: (args) => <SelectAllStory {...args} />,
|
587
|
+
argTypes: {
|
588
|
+
selectAllSticky: {
|
589
|
+
control: 'boolean',
|
590
|
+
},
|
591
|
+
selectAllLabel: {
|
592
|
+
control: 'text',
|
593
|
+
},
|
594
|
+
},
|
595
|
+
args: {
|
596
|
+
selectAllSticky: false,
|
597
|
+
selectAllLabel: 'Выбрать все',
|
598
|
+
},
|
599
|
+
parameters: {
|
600
|
+
controls: {
|
601
|
+
include: ['selectAllSticky', 'selectAllLabel'],
|
602
|
+
},
|
603
|
+
},
|
604
|
+
};
|
@@ -107,7 +107,10 @@ const StoryDefault = ({
|
|
107
107
|
contentRight={enableContentRight ? <IconCalendarOutline size={iconSize} /> : undefined}
|
108
108
|
onBlur={onBlur}
|
109
109
|
onFocus={onFocus}
|
110
|
-
onToggle={(is) =>
|
110
|
+
onToggle={(is) => {
|
111
|
+
setIsOpen(is);
|
112
|
+
onToggle(is);
|
113
|
+
}}
|
111
114
|
onChangeValue={onChangeValue}
|
112
115
|
onCommitDate={onCommitDate}
|
113
116
|
{...rest}
|
@@ -143,6 +146,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
143
146
|
includeEdgeDates: true,
|
144
147
|
min: new Date(2024, 1, 1),
|
145
148
|
max: new Date(2024, 12, 29),
|
149
|
+
closeAfterDateSelect: true,
|
146
150
|
maskWithFormat: false,
|
147
151
|
required: false,
|
148
152
|
requiredPlacement: 'right',
|
@@ -238,7 +242,10 @@ const StoryRange = ({
|
|
238
242
|
secondTextfieldTextBefore={
|
239
243
|
showDefaultTextBefore ? secondTextfieldTextBefore || 'ПО' : secondTextfieldTextBefore
|
240
244
|
}
|
241
|
-
onToggle={(is) =>
|
245
|
+
onToggle={(is) => {
|
246
|
+
setIsOpen(is);
|
247
|
+
onToggle(is);
|
248
|
+
}}
|
242
249
|
onChangeFirstValue={onChangeFirstValue}
|
243
250
|
onChangeSecondValue={onChangeSecondValue}
|
244
251
|
{...dividerIconProps}
|
@@ -275,6 +282,7 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
275
282
|
includeEdgeDates: true,
|
276
283
|
min: new Date(2024, 1, 1),
|
277
284
|
max: new Date(2024, 12, 29),
|
285
|
+
closeAfterDateSelect: true,
|
278
286
|
renderFromDate: new Date(2024, 4, 14),
|
279
287
|
maskWithFormat: false,
|
280
288
|
required: false,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { notificationConfig, NotificationsProvider as Provider, component, mergeConfig } from '@salutejs/plasma-new-hope/emotion';
|
3
3
|
import { config } from './Notification.config';
|
4
|
-
export { modalClasses } from '../Modal';
|
5
4
|
var mergedConfig = /*#__PURE__*/mergeConfig(notificationConfig, config);
|
6
|
-
export var
|
5
|
+
export var NotificationNewHope = /*#__PURE__*/component(mergedConfig);
|
6
|
+
export var Notification = NotificationNewHope;
|
7
7
|
export var NotificationsProvider = function NotificationsProvider(_ref) {
|
8
8
|
var children = _ref.children,
|
9
9
|
_ref$frame = _ref.frame,
|
@@ -16,5 +16,4 @@ export var NotificationsProvider = function NotificationsProvider(_ref) {
|
|
16
16
|
placement: placement,
|
17
17
|
UNSAFE_SSR_ENABLED: UNSAFE_SSR_ENABLED
|
18
18
|
}, children);
|
19
|
-
};
|
20
|
-
export { addNotification, closeNotification };
|
19
|
+
};
|
@@ -4,19 +4,14 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
4
4
|
import { IconDisclosureRight, IconSber } from '@salutejs/plasma-icons';
|
5
5
|
import { disableProps, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
6
6
|
import { action } from '@storybook/addon-actions';
|
7
|
+
import { addNotification } from '@salutejs/plasma-new-hope';
|
8
|
+
import type { NotificationIconPlacement, NotificationLayout } from '@salutejs/plasma-new-hope';
|
7
9
|
|
8
10
|
import { Button } from '../Button/Button';
|
9
11
|
import { Modal } from '../Modal/Modal';
|
10
12
|
import { PopupProvider } from '../Popup';
|
11
13
|
|
12
|
-
import {
|
13
|
-
Notification,
|
14
|
-
NotificationsProvider,
|
15
|
-
NotificationPlacement,
|
16
|
-
NotificationIconPlacement,
|
17
|
-
NotificationLayout,
|
18
|
-
addNotification,
|
19
|
-
} from './Notification';
|
14
|
+
import { Notification, NotificationsProvider, NotificationPlacement } from './Notification';
|
20
15
|
|
21
16
|
const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
22
17
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
@@ -1 +1,2 @@
|
|
1
|
-
export { NotificationsProvider, Notification
|
1
|
+
export { NotificationsProvider, Notification } from './Notification';
|
2
|
+
export { addNotification, closeNotification } from '@salutejs/plasma-new-hope/emotion';
|
@@ -11,11 +11,11 @@ export var config = {
|
|
11
11
|
},
|
12
12
|
variations: {
|
13
13
|
view: {
|
14
|
-
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--outline-solid-primary);\n ", ": var(--outline-solid-primary-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n ", ": var(--text-primary);\n ", ": var(--text-primary-hover);\n ", ": var(--text-primary-hover);\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--surface-solid-primary-active);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n ", ": 1;\n ", ": var(--text-secondary);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--text-primary);\n "])), selectTokens.textFieldColor, selectTokens.textFieldPlaceholderColor, selectTokens.textFieldBackgroundColor, selectTokens.textFieldBackgroundColorFocus, selectTokens.textFieldLabelColor, selectTokens.textFieldLeftHelperColor, selectTokens.textFieldContentSlotColor, selectTokens.textFieldBorderColor, selectTokens.textFieldBorderColorHover, selectTokens.textFieldBorderColorFocus, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, selectTokens.buttonColor, selectTokens.buttonColorHover, selectTokens.buttonColorActive, selectTokens.buttonArrowColor, selectTokens.buttonArrowColorHover, selectTokens.buttonArrowColorActive, selectTokens.buttonBackgroundColor, selectTokens.buttonBackgroundColorHover, selectTokens.buttonBackgroundColorActive, selectTokens.disclosureIconColor, selectTokens.disclosureIconColorHover, selectTokens.itemBackgroundHover, selectTokens.itemDisabledOpacity, selectTokens.itemDisabledColor, selectTokens.dropdownBorderColor, selectTokens.checkboxIconColor),
|
15
|
-
negative: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-primary);\n ", ": var(--text-negative);\n ", ": var(--text-secondary);\n ", ": var(--outline-negative);\n ", ": var(--outline-negative-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n ", ": var(--text-primary);\n ", ": var(--text-primary-hover);\n ", ": var(--text-primary-hover);\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--surface-solid-primary-active);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n ", ": 1;\n ", ": var(--text-secondary);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--text-accent);\n "])), selectTokens.textFieldColor, selectTokens.textFieldPlaceholderColor, selectTokens.textFieldBackgroundColor, selectTokens.textFieldBackgroundColorFocus, selectTokens.textFieldLabelColor, selectTokens.textFieldLeftHelperColor, selectTokens.textFieldContentSlotColor, selectTokens.textFieldBorderColor, selectTokens.textFieldBorderColorHover, selectTokens.textFieldBorderColorFocus, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, selectTokens.buttonColor, selectTokens.buttonColorHover, selectTokens.buttonColorActive, selectTokens.buttonArrowColor, selectTokens.buttonArrowColorHover, selectTokens.buttonArrowColorActive, selectTokens.buttonBackgroundColor, selectTokens.buttonBackgroundColorHover, selectTokens.buttonBackgroundColorActive, selectTokens.disclosureIconColor, selectTokens.disclosureIconColorHover, selectTokens.itemBackgroundHover, selectTokens.itemDisabledOpacity, selectTokens.itemDisabledColor, selectTokens.dropdownBorderColor, selectTokens.checkboxIconColor)
|
14
|
+
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--text-secondary);\n ", ": var(--outline-solid-primary);\n ", ": var(--outline-solid-primary-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n ", ": var(--text-primary);\n ", ": var(--text-primary-hover);\n ", ": var(--text-primary-hover);\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--surface-solid-primary-active);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n ", ": 1;\n ", ": var(--text-secondary);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--text-primary);\n\n ", ": var(--surface-solid-primary);\n "])), selectTokens.textFieldColor, selectTokens.textFieldPlaceholderColor, selectTokens.textFieldBackgroundColor, selectTokens.textFieldBackgroundColorFocus, selectTokens.textFieldLabelColor, selectTokens.textFieldLeftHelperColor, selectTokens.textFieldContentSlotColor, selectTokens.textFieldBorderColor, selectTokens.textFieldBorderColorHover, selectTokens.textFieldBorderColorFocus, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, selectTokens.buttonColor, selectTokens.buttonColorHover, selectTokens.buttonColorActive, selectTokens.buttonArrowColor, selectTokens.buttonArrowColorHover, selectTokens.buttonArrowColorActive, selectTokens.buttonBackgroundColor, selectTokens.buttonBackgroundColorHover, selectTokens.buttonBackgroundColorActive, selectTokens.disclosureIconColor, selectTokens.disclosureIconColorHover, selectTokens.itemBackgroundHover, selectTokens.itemDisabledOpacity, selectTokens.itemDisabledColor, selectTokens.dropdownBorderColor, selectTokens.checkboxIconColor, tokens.dividerColor),
|
15
|
+
negative: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--text-primary);\n ", ": var(--text-secondary);\n ", ": var(--surface-solid-card);\n ", ": var(--surface-solid-card);\n ", ": var(--text-primary);\n ", ": var(--text-negative);\n ", ": var(--text-secondary);\n ", ": var(--outline-negative);\n ", ": var(--outline-negative-hover);\n ", ": var(--outline-accent);\n\n ", ": var(--surface-negative);\n ", ": var(--text-tertiary);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--text-accent-active);\n ", ": var(--text-primary);\n ", ": var(--text-primary-hover);\n ", ": var(--text-primary-hover);\n ", ": var(--surface-solid-primary);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--surface-solid-primary-active);\n\n ", ": var(--text-accent);\n ", ": #1A9E32;\n ", ": var(--surface-transparent-accent);\n ", ": 1;\n ", ": var(--text-secondary);\n\n ", ": var(--outline-solid-primary);\n ", ": var(--text-accent);\n\n ", ": var(--surface-solid-primary);\n "])), selectTokens.textFieldColor, selectTokens.textFieldPlaceholderColor, selectTokens.textFieldBackgroundColor, selectTokens.textFieldBackgroundColorFocus, selectTokens.textFieldLabelColor, selectTokens.textFieldLeftHelperColor, selectTokens.textFieldContentSlotColor, selectTokens.textFieldBorderColor, selectTokens.textFieldBorderColorHover, selectTokens.textFieldBorderColorFocus, tokens.textFieldIndicatorColor, tokens.textFieldOptionalColor, selectTokens.buttonColor, selectTokens.buttonColorHover, selectTokens.buttonColorActive, selectTokens.buttonArrowColor, selectTokens.buttonArrowColorHover, selectTokens.buttonArrowColorActive, selectTokens.buttonBackgroundColor, selectTokens.buttonBackgroundColorHover, selectTokens.buttonBackgroundColorActive, selectTokens.disclosureIconColor, selectTokens.disclosureIconColorHover, selectTokens.itemBackgroundHover, selectTokens.itemDisabledOpacity, selectTokens.itemDisabledColor, selectTokens.dropdownBorderColor, selectTokens.checkboxIconColor, tokens.dividerColor)
|
16
16
|
},
|
17
17
|
size: {
|
18
|
-
s: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 2.5rem;\n ", ": 0.6875rem 0.875rem 0.6875rem 0.875rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.125rem;\n\n ", ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ", ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n\n ", ": 0 0.25rem 0 0;\n ", ": 0 0 0 0.25rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0.5rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.25rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.3125rem 0 0 0;\n ", ": 1.0625rem 0 0.3125rem 0;\n\n ", ": 0.375rem;\n ", ": 0.375rem;\n ", ": 0 0 0 0;\n ", ": 0.3125rem auto auto -0.6875rem;\n ", ": 0 0 auto auto;\n ", ": 0.25rem -0.625rem auto auto;\n ", ": 1.063rem auto auto -0.75rem;\n ", ": 1.063rem -0.75rem auto auto;\n ", ": 1.063rem -2.125rem auto auto;\n\n ", ": 0.25rem;\n ", ": 0.25rem;\n ", ": auto;\n ", ": 1.75rem;\n ", ": 0 0.5rem 0 0.75rem;\n ", ": 0.375rem;\n ", ": 0rem;\n ", ": 1rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0 -0.125rem 0 0.25rem;\n ", ": 2.5rem;\n ", ": 1rem 0 1rem;\n\n ", ": 0.125rem;\n ", ": 0.75rem;\n\n ", ": 0.125rem;\n\n ", ": 1.5rem;\n ", ": 0.5rem 0.5rem;\n ", ": 0.25rem 0.5rem;\n ", ": 0.5rem;\n ", ": 1.5rem;\n ", ": 1rem;\n ", ": 0 0.5rem 0 0;\n\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0.125rem;\n ", ": 0.375rem;\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 1.25rem;\n ", ": 0.875rem;\n ", ": 0.375rem;\n ", ": 0.25rem;\n ", ": var(--text-primary);\n ", ": var(--on-dark-text-primary);\n ", ": var(--outline-accent);\n ", ": transparent;\n ", ": 0.125rem;\n\n ", ": 0.375rem;\n "])), tokens.textFieldHeight, tokens.textFieldPadding, tokens.textFieldPaddingWithChips, tokens.textFieldBorderRadius, tokens.textFieldBorderWidth, tokens.textFieldLeftContentMargin, tokens.textFieldRightContentMargin, tokens.textFieldTextBeforeMargin, tokens.textFieldTextAfterMargin, tokens.textFieldFontFamily, tokens.textFieldFontSize, tokens.textFieldFontStyle, tokens.textFieldFontWeight, tokens.textFieldLetterSpacing, tokens.textFieldLineHeight, tokens.textFieldLabelOffset, tokens.textFieldLabelFontFamily, tokens.textFieldLabelFontSize, tokens.textFieldLabelFontStyle, tokens.textFieldLabelFontWeight, tokens.textFieldLabelLetterSpacing, tokens.textFieldLabelLineHeight, tokens.textFieldLeftHelperOffset, tokens.textFieldLeftHelperFontFamily, tokens.textFieldLeftHelperFontSize, tokens.textFieldLeftHelperFontStyle, tokens.textFieldLeftHelperFontWeight, tokens.textFieldLeftHelperLetterSpacing, tokens.textFieldLeftHelperLineHeight, tokens.textFieldLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, tokens.textFieldIndicatorSizeInner, tokens.textFieldIndicatorSizeOuter, tokens.textFieldIndicatorLabelPlacementInner, tokens.textFieldIndicatorLabelPlacementOuter, tokens.textFieldIndicatorLabelPlacementInnerRight, tokens.textFieldIndicatorLabelPlacementOuterRight, tokens.textFieldClearIndicatorLabelPlacementInner, tokens.textFieldClearIndicatorLabelPlacementInnerRight, tokens.textFieldClearIndicatorHintInnerRight, tokens.textFieldChipGap, tokens.textFieldChipBorderRadius, tokens.textFieldChipWidth, tokens.textFieldChipHeight, tokens.textFieldChipPadding, tokens.textFieldChipClearContentMarginLeft, tokens.textFieldChipClearContentMarginRight, tokens.textFieldChipCloseIconSize, tokens.textFieldChipFontFamily, tokens.textFieldChipFontSize, tokens.textFieldChipFontStyle, tokens.textFieldChipFontWeight, tokens.textFieldChipLetterSpacing, tokens.textFieldChipLineHeight, tokens.buttonArrowMargin, tokens.targetHeight, tokens.buttonPadding, tokens.padding, tokens.borderRadius, tokens.dropdownBorderWidth, tokens.itemHeight, tokens.itemPadding, tokens.itemPaddingTight, tokens.itemBorderRadius, tokens.itemIconSize, tokens.itemIconSizeTight, tokens.itemIconMargin, tokens.cellPadding, tokens.cellPaddingLeftContent, tokens.cellPaddingContent, tokens.cellPaddingRightContent, tokens.cellTextboxGap, tokens.cellGap, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, tokens.checkboxTriggerSize, tokens.checkboxTriggerSizeTight, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderRadiusTight, tokens.checkboxFillColor, tokens.checkboxIconColor, tokens.checkboxTriggerBorderColor, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerBorderWidth, tokens.indicatorSize)
|
18
|
+
s: /*#__PURE__*/css(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 2.5rem;\n ", ": 0.6875rem 0.875rem 0.6875rem 0.875rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.125rem;\n\n ", ": -0.1875rem 0.25rem -0.1875rem -0.125rem;\n ", ": -0.1875rem -0.125rem -0.1875rem 0.75rem;\n\n ", ": 0 0.25rem 0 0;\n ", ": 0 0 0 0.25rem;\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 0.5rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.25rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0.3125rem 0 0 0;\n ", ": 1.0625rem 0 0.3125rem 0;\n\n ", ": 0.375rem;\n ", ": 0.375rem;\n ", ": 0 0 0 0;\n ", ": 0.3125rem auto auto -0.6875rem;\n ", ": 0 0 auto auto;\n ", ": 0.25rem -0.625rem auto auto;\n ", ": 1.063rem auto auto -0.75rem;\n ", ": 1.063rem -0.75rem auto auto;\n ", ": 1.063rem -2.125rem auto auto;\n\n ", ": 0.25rem;\n ", ": 0.25rem;\n ", ": auto;\n ", ": 1.75rem;\n ", ": 0 0.5rem 0 0.75rem;\n ", ": 0.375rem;\n ", ": 0rem;\n ", ": 1rem;\n ", ": var(--plasma-typo-body-s-font-family);\n ", ": var(--plasma-typo-body-s-font-size);\n ", ": var(--plasma-typo-body-s-font-style);\n ", ": var(--plasma-typo-body-s-font-weight);\n ", ": var(--plasma-typo-body-s-letter-spacing);\n ", ": var(--plasma-typo-body-s-line-height);\n\n ", ": 0 -0.125rem 0 0.25rem;\n ", ": 2.5rem;\n ", ": 1rem 0 1rem;\n\n ", ": 0.125rem;\n ", ": 0.75rem;\n\n ", ": 0.125rem;\n\n ", ": 1.5rem;\n ", ": 0.5rem 0.5rem;\n ", ": 0.25rem 0.5rem;\n ", ": 0.5rem;\n ", ": 1.5rem;\n ", ": 1rem;\n ", ": 0 0.5rem 0 0;\n\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0rem;\n ", ": 0.125rem;\n ", ": 0.375rem;\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": var(--plasma-typo-body-m-font-family);\n ", ": var(--plasma-typo-body-m-font-size);\n ", ": var(--plasma-typo-body-m-font-style);\n ", ": var(--plasma-typo-body-m-font-weight);\n ", ": var(--plasma-typo-body-m-letter-spacing);\n ", ": var(--plasma-typo-body-m-line-height);\n\n ", ": 1.25rem;\n ", ": 0.875rem;\n ", ": 0.375rem;\n ", ": 0.25rem;\n ", ": var(--text-primary);\n ", ": var(--on-dark-text-primary);\n ", ": var(--outline-accent);\n ", ": transparent;\n ", ": 0.125rem;\n\n ", ": 0.375rem;\n\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.375rem;\n ", ": 0.75rem;\n ", ": 0.25rem;\n ", ": 0.25rem;\n "])), tokens.textFieldHeight, tokens.textFieldPadding, tokens.textFieldPaddingWithChips, tokens.textFieldBorderRadius, tokens.textFieldBorderWidth, tokens.textFieldLeftContentMargin, tokens.textFieldRightContentMargin, tokens.textFieldTextBeforeMargin, tokens.textFieldTextAfterMargin, tokens.textFieldFontFamily, tokens.textFieldFontSize, tokens.textFieldFontStyle, tokens.textFieldFontWeight, tokens.textFieldLetterSpacing, tokens.textFieldLineHeight, tokens.textFieldLabelOffset, tokens.textFieldLabelFontFamily, tokens.textFieldLabelFontSize, tokens.textFieldLabelFontStyle, tokens.textFieldLabelFontWeight, tokens.textFieldLabelLetterSpacing, tokens.textFieldLabelLineHeight, tokens.textFieldLeftHelperOffset, tokens.textFieldLeftHelperFontFamily, tokens.textFieldLeftHelperFontSize, tokens.textFieldLeftHelperFontStyle, tokens.textFieldLeftHelperFontWeight, tokens.textFieldLeftHelperLetterSpacing, tokens.textFieldLeftHelperLineHeight, tokens.textFieldLabelInnerPadding, tokens.textFieldContentLabelInnerPadding, tokens.textFieldIndicatorSizeInner, tokens.textFieldIndicatorSizeOuter, tokens.textFieldIndicatorLabelPlacementInner, tokens.textFieldIndicatorLabelPlacementOuter, tokens.textFieldIndicatorLabelPlacementInnerRight, tokens.textFieldIndicatorLabelPlacementOuterRight, tokens.textFieldClearIndicatorLabelPlacementInner, tokens.textFieldClearIndicatorLabelPlacementInnerRight, tokens.textFieldClearIndicatorHintInnerRight, tokens.textFieldChipGap, tokens.textFieldChipBorderRadius, tokens.textFieldChipWidth, tokens.textFieldChipHeight, tokens.textFieldChipPadding, tokens.textFieldChipClearContentMarginLeft, tokens.textFieldChipClearContentMarginRight, tokens.textFieldChipCloseIconSize, tokens.textFieldChipFontFamily, tokens.textFieldChipFontSize, tokens.textFieldChipFontStyle, tokens.textFieldChipFontWeight, tokens.textFieldChipLetterSpacing, tokens.textFieldChipLineHeight, tokens.buttonArrowMargin, tokens.targetHeight, tokens.buttonPadding, tokens.padding, tokens.borderRadius, tokens.dropdownBorderWidth, tokens.itemHeight, tokens.itemPadding, tokens.itemPaddingTight, tokens.itemBorderRadius, tokens.itemIconSize, tokens.itemIconSizeTight, tokens.itemIconMargin, tokens.cellPadding, tokens.cellPaddingLeftContent, tokens.cellPaddingContent, tokens.cellPaddingRightContent, tokens.cellTextboxGap, tokens.cellGap, tokens.cellTitleFontFamily, tokens.cellTitleFontSize, tokens.cellTitleFontStyle, tokens.cellTitleFontWeight, tokens.cellTitleLetterSpacing, tokens.cellTitleLineHeight, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.fontLetterSpacing, tokens.fontLineHeight, tokens.checkboxTriggerSize, tokens.checkboxTriggerSizeTight, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderRadiusTight, tokens.checkboxFillColor, tokens.checkboxIconColor, tokens.checkboxTriggerBorderColor, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerBorderWidth, tokens.indicatorSize, tokens.dividerMarginTop, tokens.dividerMarginRight, tokens.dividerMarginBottom, tokens.dividerMarginLeft, tokens.dividerMarginTopTight, tokens.dividerMarginBottomTight)
|
19
19
|
},
|
20
20
|
labelPlacement: {
|
21
21
|
inner: /*#__PURE__*/css(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--plasma-input-label-color, var(--plasma-input-placeholder-color, var(--plasma-colors-secondary)));\n ", ": var(--plasma-typo-body-xs-font-family);\n ", ": var(--plasma-typo-body-xs-font-size);\n ", ": var(--plasma-typo-body-xs-font-style);\n ", ": var(--plasma-typo-body-xs-font-weight);\n ", ": var(--plasma-typo-body-xs-letter-spacing);\n ", ": var(--plasma-typo-body-xs-line-height);\n "])), tokens.textFieldPlaceholderColor, tokens.textFieldLabelInnerFontFamily, tokens.textFieldLabelInnerFontSize, tokens.textFieldLabelInnerFontStyle, tokens.textFieldLabelInnerFontWeight, tokens.textFieldLabelInnerLetterSpacing, tokens.textFieldLabelInnerLineHeight),
|
@@ -9,6 +9,8 @@ import { Select } from './Select';
|
|
9
9
|
|
10
10
|
type StorySelectProps = ComponentProps<typeof Select> & {
|
11
11
|
enableContentLeft?: boolean;
|
12
|
+
selectAllLabel?: string;
|
13
|
+
selectAllSticky?: boolean;
|
12
14
|
};
|
13
15
|
|
14
16
|
const view = ['default', 'negative'];
|
@@ -454,3 +456,187 @@ const PredefinedStory = ({ enableContentLeft, ...args }: StorySelectProps) => {
|
|
454
456
|
export const Predefined: StoryObj<StorySelectProps> = {
|
455
457
|
render: (args) => <PredefinedStory {...args} />,
|
456
458
|
};
|
459
|
+
|
460
|
+
const flatItems = [
|
461
|
+
{
|
462
|
+
value: 'north_america',
|
463
|
+
label: 'Северная Америка',
|
464
|
+
},
|
465
|
+
{
|
466
|
+
value: 'rio_de_janeiro',
|
467
|
+
label: 'Рио-де-Жанейро',
|
468
|
+
},
|
469
|
+
{
|
470
|
+
value: 'sao_paulo',
|
471
|
+
label: 'Сан-Паулу',
|
472
|
+
},
|
473
|
+
{
|
474
|
+
value: 'buenos_aires',
|
475
|
+
label: 'Буэнос-Айрес',
|
476
|
+
},
|
477
|
+
{
|
478
|
+
value: 'cordoba',
|
479
|
+
label: 'Кордова',
|
480
|
+
},
|
481
|
+
{
|
482
|
+
value: 'bogota',
|
483
|
+
label: 'Богота',
|
484
|
+
},
|
485
|
+
{
|
486
|
+
value: 'medellin',
|
487
|
+
label: 'Медельин',
|
488
|
+
},
|
489
|
+
{
|
490
|
+
value: 'paris',
|
491
|
+
label: 'Париж',
|
492
|
+
},
|
493
|
+
{
|
494
|
+
value: 'lyon',
|
495
|
+
label: 'Лион',
|
496
|
+
},
|
497
|
+
{
|
498
|
+
value: 'berlin',
|
499
|
+
label: 'Берлин',
|
500
|
+
},
|
501
|
+
{
|
502
|
+
value: 'munich',
|
503
|
+
label: 'Мюнхен',
|
504
|
+
},
|
505
|
+
{
|
506
|
+
value: 'rome',
|
507
|
+
label: 'Рим',
|
508
|
+
},
|
509
|
+
{
|
510
|
+
value: 'milan',
|
511
|
+
label: 'Милан',
|
512
|
+
},
|
513
|
+
{
|
514
|
+
value: 'madrid',
|
515
|
+
label: 'Мадрид',
|
516
|
+
},
|
517
|
+
{
|
518
|
+
value: 'barcelona',
|
519
|
+
label: 'Барселона',
|
520
|
+
},
|
521
|
+
{
|
522
|
+
value: 'london',
|
523
|
+
label: 'Лондон',
|
524
|
+
},
|
525
|
+
{
|
526
|
+
value: 'manchester',
|
527
|
+
label: 'Манчестер',
|
528
|
+
},
|
529
|
+
{
|
530
|
+
value: 'beijing',
|
531
|
+
label: 'Пекин',
|
532
|
+
},
|
533
|
+
{
|
534
|
+
value: 'shanghai',
|
535
|
+
label: 'Шанхай',
|
536
|
+
},
|
537
|
+
{
|
538
|
+
value: 'tokyo',
|
539
|
+
label: 'Токио',
|
540
|
+
},
|
541
|
+
{
|
542
|
+
value: 'osaka',
|
543
|
+
label: 'Осака',
|
544
|
+
},
|
545
|
+
{
|
546
|
+
value: 'delhi',
|
547
|
+
label: 'Дели',
|
548
|
+
},
|
549
|
+
{
|
550
|
+
value: 'mumbai',
|
551
|
+
label: 'Мумбаи',
|
552
|
+
},
|
553
|
+
{
|
554
|
+
value: 'seoul',
|
555
|
+
label: 'Сеул',
|
556
|
+
},
|
557
|
+
{
|
558
|
+
value: 'busan',
|
559
|
+
label: 'Пусан',
|
560
|
+
},
|
561
|
+
{
|
562
|
+
value: 'bangkok',
|
563
|
+
label: 'Бангкок',
|
564
|
+
},
|
565
|
+
{
|
566
|
+
value: 'phuket',
|
567
|
+
label: 'Пхукет',
|
568
|
+
},
|
569
|
+
{
|
570
|
+
value: 'africa',
|
571
|
+
label: 'Африка',
|
572
|
+
},
|
573
|
+
];
|
574
|
+
|
575
|
+
const SelectAllStory = (args: StorySelectProps) => {
|
576
|
+
const [value, setValue] = useState([]);
|
577
|
+
const [checked, setChecked] = useState(false);
|
578
|
+
const [indeterminate, setIndeterminate] = useState(false);
|
579
|
+
|
580
|
+
const handleClick = () => {
|
581
|
+
if (checked && !indeterminate) {
|
582
|
+
setValue([]);
|
583
|
+
} else {
|
584
|
+
setValue(flatItems.map((item) => item.value));
|
585
|
+
}
|
586
|
+
};
|
587
|
+
|
588
|
+
React.useEffect(() => {
|
589
|
+
if (value.length === 0) {
|
590
|
+
setChecked(false);
|
591
|
+
setIndeterminate(false);
|
592
|
+
} else if (value.length === flatItems.length) {
|
593
|
+
setChecked(true);
|
594
|
+
setIndeterminate(false);
|
595
|
+
} else {
|
596
|
+
setChecked(true);
|
597
|
+
setIndeterminate(true);
|
598
|
+
}
|
599
|
+
}, [value]);
|
600
|
+
|
601
|
+
return (
|
602
|
+
<div style={{ width: '400px' }}>
|
603
|
+
<Select
|
604
|
+
placeholder="Placeholder"
|
605
|
+
multiselect
|
606
|
+
items={flatItems}
|
607
|
+
value={value}
|
608
|
+
onChange={setValue}
|
609
|
+
listOverflow="auto"
|
610
|
+
listMaxHeight="300px"
|
611
|
+
selectAllOptions={{
|
612
|
+
sticky: args?.selectAllSticky || false,
|
613
|
+
label: args?.selectAllLabel,
|
614
|
+
checked,
|
615
|
+
indeterminate,
|
616
|
+
onClick: handleClick,
|
617
|
+
}}
|
618
|
+
/>
|
619
|
+
</div>
|
620
|
+
);
|
621
|
+
};
|
622
|
+
|
623
|
+
export const SelectAll: StoryObj<StorySelectProps> = {
|
624
|
+
render: (args) => <SelectAllStory {...args} />,
|
625
|
+
argTypes: {
|
626
|
+
selectAllSticky: {
|
627
|
+
control: 'boolean',
|
628
|
+
},
|
629
|
+
selectAllLabel: {
|
630
|
+
control: 'text',
|
631
|
+
},
|
632
|
+
},
|
633
|
+
args: {
|
634
|
+
selectAllSticky: false,
|
635
|
+
selectAllLabel: 'Выбрать все',
|
636
|
+
},
|
637
|
+
parameters: {
|
638
|
+
controls: {
|
639
|
+
include: ['selectAllSticky', 'selectAllLabel'],
|
640
|
+
},
|
641
|
+
},
|
642
|
+
};
|