@salutejs/sdds-cs 0.319.0-canary.2010.15854111527.0 → 0.319.0-canary.2016.15703018170.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.config.js +19 -101
- package/components/Accordion/Accordion.js +12 -18
- package/components/Accordion/index.js +14 -15
- package/components/Attach/Attach.config.js +26 -267
- package/components/Attach/Attach.js +11 -11
- package/components/Attach/index.js +7 -6
- package/components/Autocomplete/Autocomplete.config.js +30 -247
- package/components/Autocomplete/Autocomplete.js +7 -11
- package/components/Autocomplete/index.js +7 -6
- package/components/Avatar/Avatar.config.js +31 -197
- package/components/Avatar/Avatar.js +7 -19
- package/components/Avatar/index.js +7 -6
- package/components/AvatarGroup/AvatarGroup.js +6 -10
- package/components/AvatarGroup/index.js +7 -6
- package/components/Badge/Badge.config.js +30 -145
- package/components/Badge/Badge.js +11 -11
- package/components/Badge/index.js +7 -6
- package/components/Breadcrumbs/Breadcrumbs.config.js +18 -60
- package/components/Breadcrumbs/Breadcrumbs.js +12 -12
- package/components/Breadcrumbs/index.js +7 -6
- package/components/Button/Button.config.js +30 -174
- package/components/Button/Button.js +41 -146
- package/components/Button/index.js +7 -6
- package/components/ButtonBase/index.js +7 -6
- package/components/ButtonGroup/ButtonGroup.config.js +38 -228
- package/components/ButtonGroup/ButtonGroup.js +11 -11
- package/components/ButtonGroup/index.js +7 -6
- package/components/Calendar/Calendar.js +18 -39
- package/components/Calendar/CalendarBase.config.js +18 -128
- package/components/Calendar/CalendarDouble.config.js +18 -128
- package/components/Calendar/index.js +32 -24
- package/components/Card/Card.config.js +20 -81
- package/components/Card/Card.js +23 -22
- package/components/Card/index.js +20 -18
- package/components/Cell/Cell.config.js +16 -110
- package/components/Cell/Cell.js +12 -12
- package/components/Cell/index.js +33 -25
- package/components/Checkbox/Checkbox.config.js +25 -104
- package/components/Checkbox/Checkbox.js +11 -12
- package/components/Checkbox/index.js +7 -6
- package/components/Chip/Chip.config.js +25 -162
- package/components/Chip/Chip.js +12 -12
- package/components/Chip/index.js +7 -6
- package/components/ChipGroup/ChipGroup.config.js +24 -127
- package/components/ChipGroup/ChipGroup.js +7 -11
- package/components/ChipGroup/index.js +7 -6
- package/components/Combobox/Combobox.config.js +30 -313
- package/components/Combobox/Combobox.d.ts +24 -24
- package/components/Combobox/Combobox.js +15 -50
- package/components/Combobox/index.js +7 -6
- package/components/Counter/Counter.config.js +21 -95
- package/components/Counter/Counter.js +11 -11
- package/components/Counter/index.js +15 -16
- package/components/DatePicker/DatePicker.config.js +24 -264
- package/components/DatePicker/DatePicker.js +9 -21
- package/components/DatePicker/index.js +27 -22
- package/components/Divider/Divider.config.js +27 -109
- package/components/Divider/Divider.js +11 -11
- package/components/Divider/index.js +15 -16
- package/components/Drawer/Drawer.config.js +22 -79
- package/components/Drawer/Drawer.js +29 -31
- package/components/Drawer/index.js +26 -21
- package/components/Dropdown/Dropdown.config.js +18 -94
- package/components/Dropdown/Dropdown.js +15 -50
- package/components/Dropdown/index.js +7 -6
- package/components/Dropzone/Dropzone.config.js +21 -86
- package/components/Dropzone/Dropzone.js +7 -11
- package/components/Dropzone/index.js +21 -19
- package/components/EmptyState/EmptyState.config.js +18 -114
- package/components/EmptyState/EmptyState.js +7 -19
- package/components/EmptyState/index.js +7 -6
- package/components/Flow/Flow.config.js +7 -11
- package/components/Flow/Flow.js +7 -11
- package/components/Flow/index.js +7 -6
- package/components/Grid/Grid.config.js +19 -71
- package/components/Grid/Grid.js +18 -21
- package/components/Grid/index.js +20 -18
- package/components/IconButton/IconButton.config.js +28 -146
- package/components/IconButton/IconButton.js +12 -12
- package/components/IconButton/index.js +7 -6
- package/components/Image/Image.component-test.js +92 -0
- package/components/Image/Image.js +11 -11
- package/components/Image/index.js +7 -6
- package/components/Indicator/Indicator.config.js +26 -138
- package/components/Indicator/Indicator.js +7 -19
- package/components/Indicator/index.js +7 -6
- package/components/Link/Link.config.js +29 -214
- package/components/Link/Link.js +11 -12
- package/components/Link/index.js +7 -6
- package/components/Mask/Mask.js +6 -10
- package/components/Mask/index.js +7 -6
- package/components/Modal/Modal.config.js +15 -47
- package/components/Modal/Modal.js +12 -12
- package/components/Modal/index.js +15 -16
- package/components/Notification/Notification.config.js +26 -163
- package/components/Notification/Notification.js +23 -38
- package/components/Notification/index.js +27 -22
- package/components/NumberFormat/NumberFormat.js +13 -10
- package/components/NumberFormat/index.js +7 -6
- package/components/NumberInput/NumberInput.config.js +34 -154
- package/components/NumberInput/NumberInput.js +7 -11
- package/components/NumberInput/index.js +21 -19
- package/components/Overlay/index.js +7 -6
- package/components/Pagination/Pagination.component-test.js +298 -0
- package/components/Pagination/Pagination.config.js +26 -139
- package/components/Pagination/Pagination.js +12 -12
- package/components/Pagination/index.js +7 -6
- package/components/Popover/Popover.config.js +15 -43
- package/components/Popover/Popover.js +7 -11
- package/components/Popover/index.js +7 -6
- package/components/Popup/Popup.js +10 -10
- package/components/Popup/index.js +27 -22
- package/components/Portal/index.js +7 -6
- package/components/Price/Price.config.js +11 -15
- package/components/Price/Price.js +12 -12
- package/components/Price/index.js +15 -16
- package/components/Progress/Progress.config.js +21 -95
- package/components/Progress/Progress.js +8 -12
- package/components/Progress/index.js +7 -6
- package/components/Radiobox/Radiobox.config.js +31 -106
- package/components/Radiobox/Radiobox.d.ts +28 -2
- package/components/Radiobox/Radiobox.js +16 -19
- package/components/Radiobox/index.js +14 -15
- package/components/Range/Range.config.js +24 -157
- package/components/Range/Range.js +11 -11
- package/components/Range/index.js +15 -16
- package/components/Rating/Rating.config.js +20 -117
- package/components/Rating/Rating.js +7 -11
- package/components/Rating/index.js +21 -19
- package/components/SSRProvider/index.js +7 -6
- package/components/Segment/Segment.js +32 -27
- package/components/Segment/SegmentGroup.config.js +34 -130
- package/components/Segment/SegmentItem.config.js +25 -124
- package/components/Segment/index.js +26 -21
- package/components/Select/Select.config.js +35 -305
- package/components/Select/Select.d.ts +6 -6
- package/components/Select/Select.js +15 -50
- package/components/Select/index.js +7 -6
- package/components/Sheet/Sheet.config.js +18 -63
- package/components/Sheet/Sheet.js +12 -12
- package/components/Sheet/index.js +15 -16
- package/components/Skeleton/LineSkeleton.config.js +31 -230
- package/components/Skeleton/Skeleton.js +20 -25
- package/components/Skeleton/index.js +26 -21
- package/components/Slider/Slider.component-test.js +223 -0
- package/components/Slider/Slider.config.js +22 -147
- package/components/Slider/Slider.js +13 -12
- package/components/Slider/index.js +7 -6
- package/components/Spinner/Spinner.config.js +23 -107
- package/components/Spinner/Spinner.js +15 -23
- package/components/Spinner/index.js +7 -6
- package/components/Steps/Steps.config.js +18 -105
- package/components/Steps/Steps.js +8 -12
- package/components/Steps/index.js +7 -6
- package/components/Switch/Switch.config.js +31 -149
- package/components/Switch/Switch.js +8 -12
- package/components/Switch/index.js +7 -6
- package/components/Table/Table.config.js +21 -257
- package/components/Table/Table.js +12 -12
- package/components/Table/index.js +7 -6
- package/components/Tabs/TabItem.js +21 -26
- package/components/Tabs/Tabs.js +21 -26
- package/components/Tabs/TabsController.js +16 -15
- package/components/Tabs/horizontal/HorizontalTabItem.config.js +30 -230
- package/components/Tabs/horizontal/HorizontalTabs.config.js +37 -266
- package/components/Tabs/index.js +35 -27
- package/components/Tabs/vertical/VerticalTabItem.config.js +24 -125
- package/components/Tabs/vertical/VerticalTabs.config.js +24 -98
- package/components/TextArea/TextArea.config.js +42 -367
- package/components/TextArea/TextArea.js +12 -12
- package/components/TextArea/index.js +7 -6
- package/components/TextField/TextField.config.js +40 -338
- package/components/TextField/TextField.js +11 -11
- package/components/TextField/index.js +15 -16
- package/components/Toast/Toast.config.js +35 -127
- package/components/Toast/Toast.js +14 -26
- package/components/Toast/index.js +20 -18
- package/components/ToastNew/ToastNew.config.js +21 -80
- package/components/ToastNew/ToastNew.js +8 -20
- package/components/ToastNew/index.js +14 -15
- package/components/Tokens/Colors/Colors.styles.d.ts +1 -1
- package/components/Tokens/Colors/Colors.styles.js +51 -147
- package/components/Tokens/NumberTokens/NumberTokens.styles.js +23 -70
- package/components/Tokens/Typography/Typography.styles.d.ts +1 -1
- package/components/Tokens/Typography/Typography.styles.js +76 -204
- package/components/Toolbar/Toolbar.config.js +18 -57
- package/components/Toolbar/Toolbar.js +13 -21
- package/components/Toolbar/index.js +21 -19
- package/components/Tooltip/Tooltip.config.js +19 -71
- package/components/Tooltip/Tooltip.js +7 -11
- package/components/Tooltip/index.js +7 -6
- package/components/Tree/Tree.config.js +18 -83
- package/components/Tree/Tree.js +7 -11
- package/components/Tree/index.js +7 -6
- package/components/Typography/Body.config.js +47 -161
- package/components/Typography/Dspl.config.js +31 -105
- package/components/Typography/Heading.config.js +47 -161
- package/components/Typography/Text.config.js +39 -133
- package/components/Typography/Typography.js +59 -116
- package/components/Typography/index.js +106 -62
- package/components/ViewContainer/ViewContainer.config.js +14 -46
- package/components/ViewContainer/ViewContainer.js +7 -11
- package/components/ViewContainer/index.js +7 -6
- package/emotion/cjs/components/Accordion/Accordion.config.js +19 -101
- package/emotion/cjs/components/Accordion/Accordion.js +12 -18
- package/emotion/cjs/components/Accordion/Accordion.stories.tsx +159 -0
- package/emotion/cjs/components/Accordion/index.js +14 -15
- package/emotion/cjs/components/Attach/Attach.config.js +26 -267
- package/emotion/cjs/components/Attach/Attach.js +11 -11
- package/emotion/cjs/components/Attach/Attach.stories.tsx +157 -0
- package/emotion/cjs/components/Attach/index.js +7 -6
- package/emotion/cjs/components/Autocomplete/Autocomplete.config.js +30 -247
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -11
- package/emotion/cjs/components/Autocomplete/Autocomplete.stories.tsx +170 -0
- package/emotion/cjs/components/Autocomplete/index.js +7 -6
- package/emotion/cjs/components/Avatar/Avatar.config.js +31 -197
- package/emotion/cjs/components/Avatar/Avatar.js +7 -19
- package/emotion/cjs/components/Avatar/Avatar.stories.tsx +74 -0
- package/emotion/cjs/components/Avatar/index.js +7 -6
- package/emotion/cjs/components/AvatarGroup/AvatarGroup.js +6 -10
- package/emotion/cjs/components/AvatarGroup/AvatarGroup.stories.tsx +71 -0
- package/emotion/cjs/components/AvatarGroup/index.js +7 -6
- package/emotion/cjs/components/Badge/Badge.config.js +30 -145
- package/emotion/cjs/components/Badge/Badge.js +11 -11
- package/emotion/cjs/components/Badge/Badge.stories.tsx +87 -0
- package/emotion/cjs/components/Badge/index.js +7 -6
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.config.js +18 -60
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +12 -12
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.stories.tsx +82 -0
- package/emotion/cjs/components/Breadcrumbs/index.js +7 -6
- package/emotion/cjs/components/Button/Button.config.js +30 -174
- package/emotion/cjs/components/Button/Button.js +41 -146
- package/emotion/cjs/components/Button/Button.stories.tsx +212 -0
- package/emotion/cjs/components/Button/index.js +7 -6
- package/emotion/cjs/components/ButtonBase/index.js +7 -6
- package/emotion/cjs/components/ButtonGroup/ButtonGroup.config.js +38 -228
- package/emotion/cjs/components/ButtonGroup/ButtonGroup.js +11 -11
- package/emotion/cjs/components/ButtonGroup/ButtonGroup.stories.tsx +109 -0
- package/emotion/cjs/components/ButtonGroup/index.js +7 -6
- package/emotion/cjs/components/Calendar/Calendar.js +18 -39
- package/emotion/cjs/components/Calendar/Calendar.stories.tsx +304 -0
- package/emotion/cjs/components/Calendar/CalendarBase.config.js +18 -128
- package/emotion/cjs/components/Calendar/CalendarDouble.config.js +18 -128
- package/emotion/cjs/components/Calendar/index.js +32 -24
- package/emotion/cjs/components/Card/Card.config.js +20 -81
- package/emotion/cjs/components/Card/Card.js +23 -22
- package/emotion/cjs/components/Card/Card.stories.tsx +281 -0
- package/emotion/cjs/components/Card/index.js +20 -18
- package/emotion/cjs/components/Cell/Cell.config.js +16 -110
- package/emotion/cjs/components/Cell/Cell.js +12 -12
- package/emotion/cjs/components/Cell/Cell.stories.tsx +97 -0
- package/emotion/cjs/components/Cell/index.js +33 -25
- package/emotion/cjs/components/Checkbox/Checkbox.config.js +25 -104
- package/emotion/cjs/components/Checkbox/Checkbox.js +11 -12
- package/emotion/cjs/components/Checkbox/Checkbox.stories.tsx +232 -0
- package/emotion/cjs/components/Checkbox/index.js +7 -6
- package/emotion/cjs/components/Chip/Chip.config.js +25 -162
- package/emotion/cjs/components/Chip/Chip.js +12 -12
- package/emotion/cjs/components/Chip/Chip.stories.tsx +93 -0
- package/emotion/cjs/components/Chip/index.js +7 -6
- package/emotion/cjs/components/ChipGroup/ChipGroup.config.js +24 -127
- package/emotion/cjs/components/ChipGroup/ChipGroup.js +7 -11
- package/emotion/cjs/components/ChipGroup/ChipGroup.stories.tsx +79 -0
- package/emotion/cjs/components/ChipGroup/index.js +7 -6
- package/emotion/cjs/components/Combobox/Combobox.config.js +30 -313
- package/emotion/cjs/components/Combobox/Combobox.js +15 -50
- package/emotion/cjs/components/Combobox/Combobox.stories.tsx +604 -0
- package/emotion/cjs/components/Combobox/index.js +7 -6
- package/emotion/cjs/components/Counter/Counter.config.js +21 -95
- package/emotion/cjs/components/Counter/Counter.js +11 -11
- package/emotion/cjs/components/Counter/Counter.stories.tsx +34 -0
- package/emotion/cjs/components/Counter/index.js +15 -16
- package/emotion/cjs/components/DatePicker/DatePicker.config.js +24 -264
- package/emotion/cjs/components/DatePicker/DatePicker.js +9 -21
- package/emotion/cjs/components/DatePicker/DatePicker.stories.tsx +309 -0
- package/emotion/cjs/components/DatePicker/index.js +27 -22
- package/emotion/cjs/components/Divider/Divider.config.js +27 -109
- package/emotion/cjs/components/Divider/Divider.js +11 -11
- package/emotion/cjs/components/Divider/Divider.stories.tsx +58 -0
- package/emotion/cjs/components/Divider/index.js +15 -16
- package/emotion/cjs/components/Drawer/Drawer.config.js +22 -79
- package/emotion/cjs/components/Drawer/Drawer.js +29 -31
- package/emotion/cjs/components/Drawer/Drawer.stories.tsx +217 -0
- package/emotion/cjs/components/Drawer/index.js +26 -21
- package/emotion/cjs/components/Dropdown/Dropdown.config.js +18 -94
- package/emotion/cjs/components/Dropdown/Dropdown.js +15 -50
- package/emotion/cjs/components/Dropdown/Dropdown.stories.tsx +331 -0
- package/emotion/cjs/components/Dropdown/index.js +7 -6
- package/emotion/cjs/components/Dropzone/Dropzone.config.js +21 -86
- package/emotion/cjs/components/Dropzone/Dropzone.js +7 -11
- package/emotion/cjs/components/Dropzone/Dropzone.stories.tsx +58 -0
- package/emotion/cjs/components/Dropzone/index.js +21 -19
- package/emotion/cjs/components/EmptyState/EmptyState.config.js +18 -114
- package/emotion/cjs/components/EmptyState/EmptyState.js +7 -19
- package/emotion/cjs/components/EmptyState/EmptyState.stories.tsx +43 -0
- package/emotion/cjs/components/EmptyState/index.js +7 -6
- package/emotion/cjs/components/Flow/Flow.config.js +7 -11
- package/emotion/cjs/components/Flow/Flow.js +7 -11
- package/emotion/cjs/components/Flow/Flow.stories.tsx +133 -0
- package/emotion/cjs/components/Flow/index.js +7 -6
- package/emotion/cjs/components/Grid/Grid.config.js +19 -71
- package/emotion/cjs/components/Grid/Grid.js +18 -21
- package/emotion/cjs/components/Grid/Grid.stories.tsx +119 -0
- package/emotion/cjs/components/Grid/index.js +20 -18
- package/emotion/cjs/components/IconButton/IconButton.config.js +28 -146
- package/emotion/cjs/components/IconButton/IconButton.js +12 -12
- package/emotion/cjs/components/IconButton/IconButton.stories.tsx +94 -0
- package/emotion/cjs/components/IconButton/index.js +7 -6
- package/emotion/cjs/components/Image/Image.component-test.js +91 -0
- package/emotion/cjs/components/Image/Image.js +11 -11
- package/emotion/cjs/components/Image/Image.stories.tsx +44 -0
- package/emotion/cjs/components/Image/index.js +7 -6
- package/emotion/cjs/components/Indicator/Indicator.config.js +26 -138
- package/emotion/cjs/components/Indicator/Indicator.js +7 -19
- package/emotion/cjs/components/Indicator/Indicator.stories.tsx +34 -0
- package/emotion/cjs/components/Indicator/index.js +7 -6
- package/emotion/cjs/components/Link/Link.config.js +29 -214
- package/emotion/cjs/components/Link/Link.js +11 -12
- package/emotion/cjs/components/Link/Link.stories.tsx +57 -0
- package/emotion/cjs/components/Link/index.js +7 -6
- package/emotion/cjs/components/Mask/Mask.js +6 -10
- package/emotion/cjs/components/Mask/Mask.stories.tsx +176 -0
- package/emotion/cjs/components/Mask/index.js +7 -6
- package/emotion/cjs/components/Modal/Modal.config.js +15 -47
- package/emotion/cjs/components/Modal/Modal.js +12 -12
- package/emotion/cjs/components/Modal/Modal.stories.tsx +426 -0
- package/emotion/cjs/components/Modal/index.js +15 -16
- package/emotion/cjs/components/Notification/Notification.config.js +26 -163
- package/emotion/cjs/components/Notification/Notification.js +23 -38
- package/emotion/cjs/components/Notification/Notification.stories.tsx +221 -0
- package/emotion/cjs/components/Notification/index.js +27 -22
- package/emotion/cjs/components/NumberFormat/NumberFormat.js +13 -10
- package/emotion/cjs/components/NumberFormat/NumberFormat.stories.tsx +186 -0
- package/emotion/cjs/components/NumberFormat/index.js +7 -6
- package/emotion/cjs/components/NumberInput/NumberInput.config.js +34 -154
- package/emotion/cjs/components/NumberInput/NumberInput.js +7 -11
- package/emotion/cjs/components/NumberInput/NumberInput.stories.tsx +81 -0
- package/emotion/cjs/components/NumberInput/index.js +21 -19
- package/emotion/cjs/components/Overlay/Overlay.stories.tsx +76 -0
- package/emotion/cjs/components/Overlay/index.js +7 -6
- package/emotion/cjs/components/Pagination/Pagination.component-test.js +298 -0
- package/emotion/cjs/components/Pagination/Pagination.config.js +26 -139
- package/emotion/cjs/components/Pagination/Pagination.js +12 -12
- package/emotion/cjs/components/Pagination/Pagination.stories.tsx +139 -0
- package/emotion/cjs/components/Pagination/index.js +7 -6
- package/emotion/cjs/components/Popover/Popover.config.js +15 -43
- package/emotion/cjs/components/Popover/Popover.js +7 -11
- package/emotion/cjs/components/Popover/Popover.stories.tsx +127 -0
- package/emotion/cjs/components/Popover/index.js +7 -6
- package/emotion/cjs/components/Popover/style.css +4 -0
- package/emotion/cjs/components/Popup/Popup.js +10 -10
- package/emotion/cjs/components/Popup/Popup.stories.tsx +171 -0
- package/emotion/cjs/components/Popup/index.js +27 -22
- package/emotion/cjs/components/Portal/Portal.stories.tsx +57 -0
- package/emotion/cjs/components/Portal/index.js +7 -6
- package/emotion/cjs/components/Price/Price.config.js +11 -15
- package/emotion/cjs/components/Price/Price.js +12 -12
- package/emotion/cjs/components/Price/Price.stories.tsx +34 -0
- package/emotion/cjs/components/Price/index.js +15 -16
- package/emotion/cjs/components/Progress/Progress.config.js +21 -95
- package/emotion/cjs/components/Progress/Progress.js +8 -12
- package/emotion/cjs/components/Progress/Progress.stories.tsx +32 -0
- package/emotion/cjs/components/Progress/index.js +7 -6
- package/emotion/cjs/components/Radiobox/Radiobox.config.js +31 -106
- package/emotion/cjs/components/Radiobox/Radiobox.js +16 -19
- package/emotion/cjs/components/Radiobox/Radiobox.stories.tsx +139 -0
- package/emotion/cjs/components/Radiobox/index.js +14 -15
- package/emotion/cjs/components/Range/Range.config.js +24 -157
- package/emotion/cjs/components/Range/Range.js +11 -11
- package/emotion/cjs/components/Range/Range.stories.tsx +343 -0
- package/emotion/cjs/components/Range/index.js +15 -16
- package/emotion/cjs/components/Rating/Rating.config.js +20 -117
- package/emotion/cjs/components/Rating/Rating.js +7 -11
- package/emotion/cjs/components/Rating/Rating.stories.tsx +125 -0
- package/emotion/cjs/components/Rating/index.js +21 -19
- package/emotion/cjs/components/SSRProvider/index.js +7 -6
- package/emotion/cjs/components/Segment/Segment.js +32 -27
- package/emotion/cjs/components/Segment/Segment.stories.tsx +162 -0
- package/emotion/cjs/components/Segment/SegmentGroup.config.js +34 -130
- package/emotion/cjs/components/Segment/SegmentItem.config.js +25 -124
- package/emotion/cjs/components/Segment/index.js +26 -21
- package/emotion/cjs/components/Select/Select.config.js +35 -305
- package/emotion/cjs/components/Select/Select.js +15 -50
- package/emotion/cjs/components/Select/Select.stories.tsx +642 -0
- package/emotion/cjs/components/Select/index.js +7 -6
- package/emotion/cjs/components/Select/style.css +37 -0
- package/emotion/cjs/components/Sheet/Sheet.config.js +18 -63
- package/emotion/cjs/components/Sheet/Sheet.js +12 -12
- package/emotion/cjs/components/Sheet/Sheet.stories.tsx +361 -0
- package/emotion/cjs/components/Sheet/index.js +15 -16
- package/emotion/cjs/components/Skeleton/LineSkeleton.config.js +31 -230
- package/emotion/cjs/components/Skeleton/Skeleton.js +20 -25
- package/emotion/cjs/components/Skeleton/Skeleton.stories.tsx +116 -0
- package/emotion/cjs/components/Skeleton/index.js +26 -21
- package/emotion/cjs/components/Slider/Slider.component-test.js +223 -0
- package/emotion/cjs/components/Slider/Slider.config.js +22 -147
- package/emotion/cjs/components/Slider/Slider.js +13 -12
- package/emotion/cjs/components/Slider/Slider.stories.tsx +277 -0
- package/emotion/cjs/components/Slider/index.js +7 -6
- package/emotion/cjs/components/Spinner/Spinner.config.js +23 -107
- package/emotion/cjs/components/Spinner/Spinner.js +15 -23
- package/emotion/cjs/components/Spinner/Spinner.stories.tsx +109 -0
- package/emotion/cjs/components/Spinner/index.js +7 -6
- package/emotion/cjs/components/Steps/Steps.config.js +18 -105
- package/emotion/cjs/components/Steps/Steps.js +8 -12
- package/emotion/cjs/components/Steps/Steps.stories.tsx +191 -0
- package/emotion/cjs/components/Steps/index.js +7 -6
- package/emotion/cjs/components/Switch/Switch.config.js +31 -149
- package/emotion/cjs/components/Switch/Switch.js +8 -12
- package/emotion/cjs/components/Switch/Switch.stories.tsx +100 -0
- package/emotion/cjs/components/Switch/index.js +7 -6
- package/emotion/cjs/components/Table/Table.config.js +21 -257
- package/emotion/cjs/components/Table/Table.js +12 -12
- package/emotion/cjs/components/Table/Table.stories.tsx +551 -0
- package/emotion/cjs/components/Table/index.js +7 -6
- package/emotion/cjs/components/Tabs/TabItem.js +21 -26
- package/emotion/cjs/components/Tabs/Tabs.js +21 -26
- package/emotion/cjs/components/Tabs/Tabs.stories.tsx +639 -0
- package/emotion/cjs/components/Tabs/TabsController.js +16 -15
- package/emotion/cjs/components/Tabs/horizontal/HorizontalTabItem.config.js +30 -230
- package/emotion/cjs/components/Tabs/horizontal/HorizontalTabs.config.js +37 -266
- package/emotion/cjs/components/Tabs/index.js +35 -27
- package/emotion/cjs/components/Tabs/vertical/VerticalTabItem.config.js +24 -125
- package/emotion/cjs/components/Tabs/vertical/VerticalTabs.config.js +24 -98
- package/emotion/cjs/components/TextArea/TextArea.config.js +42 -367
- package/emotion/cjs/components/TextArea/TextArea.js +12 -12
- package/emotion/cjs/components/TextArea/TextArea.stories.tsx +228 -0
- package/emotion/cjs/components/TextArea/index.js +7 -6
- package/emotion/cjs/components/TextField/TextField.config.js +40 -338
- package/emotion/cjs/components/TextField/TextField.js +11 -11
- package/emotion/cjs/components/TextField/TextField.stories.tsx +260 -0
- package/emotion/cjs/components/TextField/index.js +15 -16
- package/emotion/cjs/components/Toast/Toast.config.js +35 -127
- package/emotion/cjs/components/Toast/Toast.js +14 -26
- package/emotion/cjs/components/Toast/Toast.stories.tsx +156 -0
- package/emotion/cjs/components/Toast/index.js +20 -18
- package/emotion/cjs/components/ToastNew/ToastNew.config.js +21 -80
- package/emotion/cjs/components/ToastNew/ToastNew.js +8 -20
- package/emotion/cjs/components/ToastNew/ToastNew.stories.tsx +87 -0
- package/emotion/cjs/components/ToastNew/index.js +14 -15
- package/emotion/cjs/components/Tokens/Colors/Colors.stories.tsx +196 -0
- package/emotion/cjs/components/Tokens/Colors/Colors.styles.js +27 -147
- package/emotion/cjs/components/Tokens/NumberTokens/CornerRadius.stories.tsx +93 -0
- package/emotion/cjs/components/Tokens/NumberTokens/NumberTokens.styles.js +13 -70
- package/emotion/cjs/components/Tokens/NumberTokens/Spacing.stories.tsx +93 -0
- package/emotion/cjs/components/Tokens/Typography/Typography.stories.tsx +277 -0
- package/emotion/cjs/components/Tokens/Typography/Typography.styles.js +44 -204
- package/emotion/cjs/components/Toolbar/Toolbar.config.js +18 -57
- package/emotion/cjs/components/Toolbar/Toolbar.js +13 -21
- package/emotion/cjs/components/Toolbar/Toolbar.stories.tsx +64 -0
- package/emotion/cjs/components/Toolbar/index.js +21 -19
- package/emotion/cjs/components/Tooltip/Tooltip.config.js +19 -71
- package/emotion/cjs/components/Tooltip/Tooltip.js +7 -11
- package/emotion/cjs/components/Tooltip/Tooltip.stories.tsx +152 -0
- package/emotion/cjs/components/Tooltip/index.js +7 -6
- package/emotion/cjs/components/Tree/Tree.config.js +18 -83
- package/emotion/cjs/components/Tree/Tree.js +7 -11
- package/emotion/cjs/components/Tree/Tree.stories.tsx +146 -0
- package/emotion/cjs/components/Tree/index.js +7 -6
- package/emotion/cjs/components/Typography/Body.config.js +47 -161
- package/emotion/cjs/components/Typography/Dspl.config.js +31 -105
- package/emotion/cjs/components/Typography/Heading.config.js +47 -161
- package/emotion/cjs/components/Typography/Text.config.js +39 -133
- package/emotion/cjs/components/Typography/Typography.js +59 -116
- package/emotion/cjs/components/Typography/Typography.stories.tsx +243 -0
- package/emotion/cjs/components/Typography/index.js +106 -62
- package/emotion/cjs/components/ViewContainer/ViewContainer.config.js +14 -46
- package/emotion/cjs/components/ViewContainer/ViewContainer.js +7 -11
- package/emotion/cjs/components/ViewContainer/index.js +7 -6
- package/emotion/cjs/index.js +729 -82
- package/emotion/cjs/mixins/index.js +20 -61
- package/emotion/cjs/tokens/index.js +255 -126
- package/emotion/es/components/Accordion/Accordion.config.js +14 -92
- package/emotion/es/components/Accordion/Accordion.js +3 -3
- package/emotion/es/components/Accordion/Accordion.stories.tsx +159 -0
- package/emotion/es/components/Accordion/index.js +1 -1
- package/emotion/es/components/Attach/Attach.config.js +21 -258
- package/emotion/es/components/Attach/Attach.js +4 -2
- package/emotion/es/components/Attach/Attach.stories.tsx +157 -0
- package/emotion/es/components/Attach/index.js +1 -1
- package/emotion/es/components/Autocomplete/Autocomplete.config.js +25 -238
- package/emotion/es/components/Autocomplete/Autocomplete.js +2 -2
- package/emotion/es/components/Autocomplete/Autocomplete.stories.tsx +170 -0
- package/emotion/es/components/Autocomplete/index.js +1 -1
- package/emotion/es/components/Avatar/Avatar.config.js +26 -188
- package/emotion/es/components/Avatar/Avatar.js +3 -3
- package/emotion/es/components/Avatar/Avatar.stories.tsx +74 -0
- package/emotion/es/components/Avatar/index.js +1 -1
- package/emotion/es/components/AvatarGroup/AvatarGroup.js +2 -2
- package/emotion/es/components/AvatarGroup/AvatarGroup.stories.tsx +71 -0
- package/emotion/es/components/AvatarGroup/index.js +1 -1
- package/emotion/es/components/Badge/Badge.config.js +25 -136
- package/emotion/es/components/Badge/Badge.js +4 -2
- package/emotion/es/components/Badge/Badge.stories.tsx +87 -0
- package/emotion/es/components/Badge/index.js +1 -1
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.config.js +13 -51
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +5 -3
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.stories.tsx +82 -0
- package/emotion/es/components/Breadcrumbs/index.js +1 -1
- package/emotion/es/components/Button/Button.config.js +25 -165
- package/emotion/es/components/Button/Button.js +28 -89
- package/emotion/es/components/Button/Button.stories.tsx +212 -0
- package/emotion/es/components/Button/index.js +1 -1
- package/emotion/es/components/ButtonBase/index.js +1 -1
- package/emotion/es/components/ButtonGroup/ButtonGroup.config.js +33 -219
- package/emotion/es/components/ButtonGroup/ButtonGroup.js +4 -2
- package/emotion/es/components/ButtonGroup/ButtonGroup.stories.tsx +109 -0
- package/emotion/es/components/ButtonGroup/index.js +1 -1
- package/emotion/es/components/Calendar/Calendar.js +12 -12
- package/emotion/es/components/Calendar/Calendar.stories.tsx +304 -0
- package/emotion/es/components/Calendar/CalendarBase.config.js +13 -119
- package/emotion/es/components/Calendar/CalendarDouble.config.js +13 -119
- package/emotion/es/components/Calendar/index.js +1 -1
- package/emotion/es/components/Card/Card.config.js +15 -72
- package/emotion/es/components/Card/Card.js +6 -4
- package/emotion/es/components/Card/Card.stories.tsx +281 -0
- package/emotion/es/components/Card/index.js +1 -1
- package/emotion/es/components/Cell/Cell.config.js +11 -101
- package/emotion/es/components/Cell/Cell.js +5 -3
- package/emotion/es/components/Cell/Cell.stories.tsx +97 -0
- package/emotion/es/components/Cell/index.js +1 -1
- package/emotion/es/components/Checkbox/Checkbox.config.js +20 -95
- package/emotion/es/components/Checkbox/Checkbox.js +4 -3
- package/emotion/es/components/Checkbox/Checkbox.stories.tsx +232 -0
- package/emotion/es/components/Checkbox/index.js +1 -1
- package/emotion/es/components/Chip/Chip.config.js +20 -153
- package/emotion/es/components/Chip/Chip.js +5 -3
- package/emotion/es/components/Chip/Chip.stories.tsx +93 -0
- package/emotion/es/components/Chip/index.js +1 -1
- package/emotion/es/components/ChipGroup/ChipGroup.config.js +19 -118
- package/emotion/es/components/ChipGroup/ChipGroup.js +2 -2
- package/emotion/es/components/ChipGroup/ChipGroup.stories.tsx +79 -0
- package/emotion/es/components/ChipGroup/index.js +1 -1
- package/emotion/es/components/Combobox/Combobox.config.js +25 -304
- package/emotion/es/components/Combobox/Combobox.js +9 -36
- package/emotion/es/components/Combobox/Combobox.stories.tsx +604 -0
- package/emotion/es/components/Combobox/index.js +1 -1
- package/emotion/es/components/Counter/Counter.config.js +16 -86
- package/emotion/es/components/Counter/Counter.js +4 -2
- package/emotion/es/components/Counter/Counter.stories.tsx +34 -0
- package/emotion/es/components/Counter/index.js +1 -1
- package/emotion/es/components/DatePicker/DatePicker.config.js +19 -255
- package/emotion/es/components/DatePicker/DatePicker.js +4 -4
- package/emotion/es/components/DatePicker/DatePicker.stories.tsx +309 -0
- package/emotion/es/components/DatePicker/index.js +1 -1
- package/emotion/es/components/Divider/Divider.config.js +22 -100
- package/emotion/es/components/Divider/Divider.js +4 -2
- package/emotion/es/components/Divider/Divider.stories.tsx +58 -0
- package/emotion/es/components/Divider/index.js +1 -1
- package/emotion/es/components/Drawer/Drawer.config.js +17 -70
- package/emotion/es/components/Drawer/Drawer.js +16 -8
- package/emotion/es/components/Drawer/Drawer.stories.tsx +217 -0
- package/emotion/es/components/Drawer/index.js +1 -1
- package/emotion/es/components/Dropdown/Dropdown.config.js +13 -85
- package/emotion/es/components/Dropdown/Dropdown.js +9 -36
- package/emotion/es/components/Dropdown/Dropdown.stories.tsx +331 -0
- package/emotion/es/components/Dropdown/index.js +1 -1
- package/emotion/es/components/Dropzone/Dropzone.config.js +16 -77
- package/emotion/es/components/Dropzone/Dropzone.js +2 -2
- package/emotion/es/components/Dropzone/Dropzone.stories.tsx +58 -0
- package/emotion/es/components/Dropzone/index.js +1 -1
- package/emotion/es/components/EmptyState/EmptyState.config.js +13 -105
- package/emotion/es/components/EmptyState/EmptyState.js +2 -2
- package/emotion/es/components/EmptyState/EmptyState.stories.tsx +43 -0
- package/emotion/es/components/EmptyState/index.js +1 -1
- package/emotion/es/components/Flow/Flow.config.js +3 -3
- package/emotion/es/components/Flow/Flow.js +2 -2
- package/emotion/es/components/Flow/Flow.stories.tsx +133 -0
- package/emotion/es/components/Flow/index.js +1 -1
- package/emotion/es/components/Grid/Grid.config.js +14 -62
- package/emotion/es/components/Grid/Grid.js +2 -2
- package/emotion/es/components/Grid/Grid.stories.tsx +119 -0
- package/emotion/es/components/Grid/index.js +1 -1
- package/emotion/es/components/IconButton/IconButton.config.js +23 -137
- package/emotion/es/components/IconButton/IconButton.js +5 -3
- package/emotion/es/components/IconButton/IconButton.stories.tsx +94 -0
- package/emotion/es/components/IconButton/index.js +1 -1
- package/emotion/es/components/Image/Image.component-test.js +85 -0
- package/emotion/es/components/Image/Image.js +5 -3
- package/emotion/es/components/Image/Image.stories.tsx +44 -0
- package/emotion/es/components/Image/index.js +1 -1
- package/emotion/es/components/Indicator/Indicator.config.js +21 -129
- package/emotion/es/components/Indicator/Indicator.js +3 -3
- package/emotion/es/components/Indicator/Indicator.stories.tsx +34 -0
- package/emotion/es/components/Indicator/index.js +1 -1
- package/emotion/es/components/Link/Link.config.js +24 -205
- package/emotion/es/components/Link/Link.js +4 -3
- package/emotion/es/components/Link/Link.stories.tsx +57 -0
- package/emotion/es/components/Link/index.js +1 -1
- package/emotion/es/components/Mask/Mask.js +1 -1
- package/emotion/es/components/Mask/Mask.stories.tsx +176 -0
- package/emotion/es/components/Mask/index.js +1 -1
- package/emotion/es/components/Modal/Modal.config.js +10 -38
- package/emotion/es/components/Modal/Modal.js +5 -3
- package/emotion/es/components/Modal/Modal.stories.tsx +426 -0
- package/emotion/es/components/Modal/index.js +1 -1
- package/emotion/es/components/Notification/Notification.config.js +21 -154
- package/emotion/es/components/Notification/Notification.js +15 -11
- package/emotion/es/components/Notification/Notification.stories.tsx +221 -0
- package/emotion/es/components/Notification/index.js +1 -1
- package/emotion/es/components/NumberFormat/NumberFormat.js +9 -1
- package/emotion/es/components/NumberFormat/NumberFormat.stories.tsx +186 -0
- package/emotion/es/components/NumberFormat/index.js +1 -1
- package/emotion/es/components/NumberInput/NumberInput.config.js +29 -145
- package/emotion/es/components/NumberInput/NumberInput.js +2 -2
- package/emotion/es/components/NumberInput/NumberInput.stories.tsx +81 -0
- package/emotion/es/components/NumberInput/index.js +1 -1
- package/emotion/es/components/Overlay/Overlay.stories.tsx +76 -0
- package/emotion/es/components/Overlay/index.js +1 -1
- package/emotion/es/components/Pagination/Pagination.component-test.js +293 -0
- package/emotion/es/components/Pagination/Pagination.config.js +21 -130
- package/emotion/es/components/Pagination/Pagination.js +5 -3
- package/emotion/es/components/Pagination/Pagination.stories.tsx +139 -0
- package/emotion/es/components/Pagination/index.js +1 -1
- package/emotion/es/components/Popover/Popover.config.js +10 -34
- package/emotion/es/components/Popover/Popover.js +2 -2
- package/emotion/es/components/Popover/Popover.stories.tsx +127 -0
- package/emotion/es/components/Popover/index.js +1 -1
- package/emotion/es/components/Popover/style.css +4 -0
- package/emotion/es/components/Popup/Popup.js +4 -2
- package/emotion/es/components/Popup/Popup.stories.tsx +171 -0
- package/emotion/es/components/Popup/index.js +1 -1
- package/emotion/es/components/Portal/Portal.stories.tsx +57 -0
- package/emotion/es/components/Portal/index.js +1 -1
- package/emotion/es/components/Price/Price.config.js +7 -7
- package/emotion/es/components/Price/Price.js +5 -3
- package/emotion/es/components/Price/Price.stories.tsx +34 -0
- package/emotion/es/components/Price/index.js +1 -1
- package/emotion/es/components/Progress/Progress.config.js +16 -86
- package/emotion/es/components/Progress/Progress.js +3 -3
- package/emotion/es/components/Progress/Progress.stories.tsx +32 -0
- package/emotion/es/components/Progress/index.js +1 -1
- package/emotion/es/components/Radiobox/Radiobox.config.js +26 -97
- package/emotion/es/components/Radiobox/Radiobox.js +5 -4
- package/emotion/es/components/Radiobox/Radiobox.stories.tsx +139 -0
- package/emotion/es/components/Radiobox/index.js +1 -1
- package/emotion/es/components/Range/Range.config.js +19 -148
- package/emotion/es/components/Range/Range.js +4 -2
- package/emotion/es/components/Range/Range.stories.tsx +343 -0
- package/emotion/es/components/Range/index.js +1 -1
- package/emotion/es/components/Rating/Rating.config.js +15 -108
- package/emotion/es/components/Rating/Rating.js +2 -2
- package/emotion/es/components/Rating/Rating.stories.tsx +125 -0
- package/emotion/es/components/Rating/index.js +1 -1
- package/emotion/es/components/SSRProvider/index.js +1 -1
- package/emotion/es/components/Segment/Segment.js +10 -5
- package/emotion/es/components/Segment/Segment.stories.tsx +162 -0
- package/emotion/es/components/Segment/SegmentGroup.config.js +29 -121
- package/emotion/es/components/Segment/SegmentItem.config.js +20 -115
- package/emotion/es/components/Segment/index.js +1 -1
- package/emotion/es/components/Select/Select.config.js +29 -295
- package/emotion/es/components/Select/Select.js +9 -36
- package/emotion/es/components/Select/Select.stories.tsx +642 -0
- package/emotion/es/components/Select/index.js +1 -1
- package/emotion/es/components/Select/style.css +37 -0
- package/emotion/es/components/Sheet/Sheet.config.js +13 -54
- package/emotion/es/components/Sheet/Sheet.js +5 -3
- package/emotion/es/components/Sheet/Sheet.stories.tsx +361 -0
- package/emotion/es/components/Sheet/index.js +1 -1
- package/emotion/es/components/Skeleton/LineSkeleton.config.js +26 -221
- package/emotion/es/components/Skeleton/Skeleton.js +4 -4
- package/emotion/es/components/Skeleton/Skeleton.stories.tsx +116 -0
- package/emotion/es/components/Skeleton/index.js +1 -1
- package/emotion/es/components/Slider/Slider.component-test.js +220 -0
- package/emotion/es/components/Slider/Slider.config.js +17 -138
- package/emotion/es/components/Slider/Slider.js +5 -3
- package/emotion/es/components/Slider/Slider.stories.tsx +277 -0
- package/emotion/es/components/Slider/index.js +1 -1
- package/emotion/es/components/Spinner/Spinner.config.js +18 -98
- package/emotion/es/components/Spinner/Spinner.js +6 -8
- package/emotion/es/components/Spinner/Spinner.stories.tsx +109 -0
- package/emotion/es/components/Spinner/index.js +1 -1
- package/emotion/es/components/Steps/Steps.config.js +13 -96
- package/emotion/es/components/Steps/Steps.js +3 -3
- package/emotion/es/components/Steps/Steps.stories.tsx +191 -0
- package/emotion/es/components/Steps/index.js +1 -1
- package/emotion/es/components/Switch/Switch.config.js +26 -140
- package/emotion/es/components/Switch/Switch.js +3 -3
- package/emotion/es/components/Switch/Switch.stories.tsx +100 -0
- package/emotion/es/components/Switch/index.js +1 -1
- package/emotion/es/components/Table/Table.config.js +16 -248
- package/emotion/es/components/Table/Table.js +5 -3
- package/emotion/es/components/Table/Table.stories.tsx +551 -0
- package/emotion/es/components/Table/index.js +1 -1
- package/emotion/es/components/Tabs/TabItem.js +11 -10
- package/emotion/es/components/Tabs/Tabs.js +11 -10
- package/emotion/es/components/Tabs/Tabs.stories.tsx +639 -0
- package/emotion/es/components/Tabs/TabsController.js +7 -5
- package/emotion/es/components/Tabs/horizontal/HorizontalTabItem.config.js +25 -221
- package/emotion/es/components/Tabs/horizontal/HorizontalTabs.config.js +32 -257
- package/emotion/es/components/Tabs/index.js +1 -1
- package/emotion/es/components/Tabs/vertical/VerticalTabItem.config.js +19 -116
- package/emotion/es/components/Tabs/vertical/VerticalTabs.config.js +19 -89
- package/emotion/es/components/TextArea/TextArea.config.js +37 -358
- package/emotion/es/components/TextArea/TextArea.js +5 -3
- package/emotion/es/components/TextArea/TextArea.stories.tsx +228 -0
- package/emotion/es/components/TextArea/index.js +1 -1
- package/emotion/es/components/TextField/TextField.config.js +35 -329
- package/emotion/es/components/TextField/TextField.js +4 -2
- package/emotion/es/components/TextField/TextField.stories.tsx +260 -0
- package/emotion/es/components/TextField/index.js +1 -1
- package/emotion/es/components/Toast/Toast.config.js +30 -118
- package/emotion/es/components/Toast/Toast.js +4 -4
- package/emotion/es/components/Toast/Toast.stories.tsx +156 -0
- package/emotion/es/components/Toast/index.js +1 -1
- package/emotion/es/components/ToastNew/ToastNew.config.js +16 -71
- package/emotion/es/components/ToastNew/ToastNew.js +3 -3
- package/emotion/es/components/ToastNew/ToastNew.stories.tsx +87 -0
- package/emotion/es/components/ToastNew/index.js +1 -1
- package/emotion/es/components/Tokens/Colors/Colors.stories.tsx +196 -0
- package/emotion/es/components/Tokens/Colors/Colors.styles.js +19 -90
- package/emotion/es/components/Tokens/NumberTokens/CornerRadius.stories.tsx +93 -0
- package/emotion/es/components/Tokens/NumberTokens/NumberTokens.styles.js +8 -37
- package/emotion/es/components/Tokens/NumberTokens/Spacing.stories.tsx +93 -0
- package/emotion/es/components/Tokens/Typography/Typography.stories.tsx +277 -0
- package/emotion/es/components/Tokens/Typography/Typography.styles.js +36 -135
- package/emotion/es/components/Toolbar/Toolbar.config.js +13 -48
- package/emotion/es/components/Toolbar/Toolbar.js +6 -4
- package/emotion/es/components/Toolbar/Toolbar.stories.tsx +64 -0
- package/emotion/es/components/Toolbar/index.js +1 -1
- package/emotion/es/components/Tooltip/Tooltip.config.js +14 -62
- package/emotion/es/components/Tooltip/Tooltip.js +2 -2
- package/emotion/es/components/Tooltip/Tooltip.stories.tsx +152 -0
- package/emotion/es/components/Tooltip/index.js +1 -1
- package/emotion/es/components/Tree/Tree.config.js +13 -74
- package/emotion/es/components/Tree/Tree.js +2 -2
- package/emotion/es/components/Tree/Tree.stories.tsx +146 -0
- package/emotion/es/components/Tree/index.js +1 -1
- package/emotion/es/components/Typography/Body.config.js +38 -131
- package/emotion/es/components/Typography/Dspl.config.js +24 -83
- package/emotion/es/components/Typography/Heading.config.js +38 -131
- package/emotion/es/components/Typography/Text.config.js +31 -107
- package/emotion/es/components/Typography/Typography.js +35 -35
- package/emotion/es/components/Typography/Typography.stories.tsx +243 -0
- package/emotion/es/components/Typography/index.js +1 -1
- package/emotion/es/components/ViewContainer/ViewContainer.config.js +8 -36
- package/emotion/es/components/ViewContainer/ViewContainer.js +2 -2
- package/emotion/es/components/ViewContainer/index.js +1 -1
- package/emotion/es/index.js +1 -2
- package/emotion/es/mixins/index.js +1 -1
- package/emotion/es/tokens/index.js +1 -1
- package/es/components/Accordion/Accordion.config.js +14 -92
- package/es/components/Accordion/Accordion.js +3 -3
- package/es/components/Accordion/index.js +1 -1
- package/es/components/Attach/Attach.config.js +21 -258
- package/es/components/Attach/Attach.js +4 -2
- package/es/components/Attach/index.js +1 -1
- package/es/components/Autocomplete/Autocomplete.config.js +25 -238
- package/es/components/Autocomplete/Autocomplete.js +2 -2
- package/es/components/Autocomplete/index.js +1 -1
- package/es/components/Avatar/Avatar.config.js +26 -188
- package/es/components/Avatar/Avatar.js +3 -3
- package/es/components/Avatar/index.js +1 -1
- package/es/components/AvatarGroup/AvatarGroup.js +2 -2
- package/es/components/AvatarGroup/index.js +1 -1
- package/es/components/Badge/Badge.config.js +25 -136
- package/es/components/Badge/Badge.js +4 -2
- package/es/components/Badge/index.js +1 -1
- package/es/components/Breadcrumbs/Breadcrumbs.config.js +13 -51
- package/es/components/Breadcrumbs/Breadcrumbs.js +5 -3
- package/es/components/Breadcrumbs/index.js +1 -1
- package/es/components/Button/Button.config.js +25 -165
- package/es/components/Button/Button.js +28 -89
- package/es/components/Button/index.js +1 -1
- package/es/components/ButtonBase/index.js +1 -1
- package/es/components/ButtonGroup/ButtonGroup.config.js +33 -219
- package/es/components/ButtonGroup/ButtonGroup.js +4 -2
- package/es/components/ButtonGroup/index.js +1 -1
- package/es/components/Calendar/Calendar.js +12 -12
- package/es/components/Calendar/CalendarBase.config.js +13 -119
- package/es/components/Calendar/CalendarDouble.config.js +13 -119
- package/es/components/Calendar/index.js +1 -1
- package/es/components/Card/Card.config.js +15 -72
- package/es/components/Card/Card.js +6 -4
- package/es/components/Card/index.js +1 -1
- package/es/components/Cell/Cell.config.js +11 -101
- package/es/components/Cell/Cell.js +5 -3
- package/es/components/Cell/index.js +1 -1
- package/es/components/Checkbox/Checkbox.config.js +20 -95
- package/es/components/Checkbox/Checkbox.js +4 -3
- package/es/components/Checkbox/index.js +1 -1
- package/es/components/Chip/Chip.config.js +20 -153
- package/es/components/Chip/Chip.js +5 -3
- package/es/components/Chip/index.js +1 -1
- package/es/components/ChipGroup/ChipGroup.config.js +19 -118
- package/es/components/ChipGroup/ChipGroup.js +2 -2
- package/es/components/ChipGroup/index.js +1 -1
- package/es/components/Combobox/Combobox.config.js +25 -304
- package/es/components/Combobox/Combobox.js +9 -36
- package/es/components/Combobox/index.js +1 -1
- package/es/components/Counter/Counter.config.js +16 -86
- package/es/components/Counter/Counter.js +4 -2
- package/es/components/Counter/index.js +1 -1
- package/es/components/DatePicker/DatePicker.config.js +19 -255
- package/es/components/DatePicker/DatePicker.js +4 -4
- package/es/components/DatePicker/index.js +1 -1
- package/es/components/Divider/Divider.config.js +22 -100
- package/es/components/Divider/Divider.js +4 -2
- package/es/components/Divider/index.js +1 -1
- package/es/components/Drawer/Drawer.config.js +17 -70
- package/es/components/Drawer/Drawer.js +16 -8
- package/es/components/Drawer/index.js +1 -1
- package/es/components/Dropdown/Dropdown.config.js +13 -85
- package/es/components/Dropdown/Dropdown.js +9 -36
- package/es/components/Dropdown/index.js +1 -1
- package/es/components/Dropzone/Dropzone.config.js +16 -77
- package/es/components/Dropzone/Dropzone.js +2 -2
- package/es/components/Dropzone/index.js +1 -1
- package/es/components/EmptyState/EmptyState.config.js +13 -105
- package/es/components/EmptyState/EmptyState.js +2 -2
- package/es/components/EmptyState/index.js +1 -1
- package/es/components/Flow/Flow.config.js +3 -3
- package/es/components/Flow/Flow.js +2 -2
- package/es/components/Flow/index.js +1 -1
- package/es/components/Grid/Grid.config.js +14 -62
- package/es/components/Grid/Grid.js +2 -2
- package/es/components/Grid/index.js +1 -1
- package/es/components/IconButton/IconButton.config.js +23 -137
- package/es/components/IconButton/IconButton.js +5 -3
- package/es/components/IconButton/index.js +1 -1
- package/es/components/Image/Image.component-test.js +86 -0
- package/es/components/Image/Image.js +5 -3
- package/es/components/Image/index.js +1 -1
- package/es/components/Indicator/Indicator.config.js +21 -129
- package/es/components/Indicator/Indicator.js +3 -3
- package/es/components/Indicator/index.js +1 -1
- package/es/components/Link/Link.config.js +24 -205
- package/es/components/Link/Link.js +4 -3
- package/es/components/Link/index.js +1 -1
- package/es/components/Mask/Mask.js +1 -1
- package/es/components/Mask/index.js +1 -1
- package/es/components/Modal/Modal.config.js +10 -38
- package/es/components/Modal/Modal.js +5 -3
- package/es/components/Modal/index.js +1 -1
- package/es/components/Notification/Notification.config.js +21 -154
- package/es/components/Notification/Notification.js +15 -11
- package/es/components/Notification/index.js +1 -1
- package/es/components/NumberFormat/NumberFormat.js +9 -1
- package/es/components/NumberFormat/index.js +1 -1
- package/es/components/NumberInput/NumberInput.config.js +29 -145
- package/es/components/NumberInput/NumberInput.js +2 -2
- package/es/components/NumberInput/index.js +1 -1
- package/es/components/Overlay/index.js +1 -1
- package/es/components/Pagination/Pagination.component-test.js +293 -0
- package/es/components/Pagination/Pagination.config.js +21 -130
- package/es/components/Pagination/Pagination.js +5 -3
- package/es/components/Pagination/index.js +1 -1
- package/es/components/Popover/Popover.config.js +10 -34
- package/es/components/Popover/Popover.js +2 -2
- package/es/components/Popover/index.js +1 -1
- package/es/components/Popup/Popup.js +4 -2
- package/es/components/Popup/index.js +1 -1
- package/es/components/Portal/index.js +1 -1
- package/es/components/Price/Price.config.js +7 -7
- package/es/components/Price/Price.js +5 -3
- package/es/components/Price/index.js +1 -1
- package/es/components/Progress/Progress.config.js +16 -86
- package/es/components/Progress/Progress.js +3 -3
- package/es/components/Progress/index.js +1 -1
- package/es/components/Radiobox/Radiobox.config.js +26 -97
- package/es/components/Radiobox/Radiobox.js +5 -4
- package/es/components/Radiobox/index.js +1 -1
- package/es/components/Range/Range.config.js +19 -148
- package/es/components/Range/Range.js +4 -2
- package/es/components/Range/index.js +1 -1
- package/es/components/Rating/Rating.config.js +15 -108
- package/es/components/Rating/Rating.js +2 -2
- package/es/components/Rating/index.js +1 -1
- package/es/components/SSRProvider/index.js +1 -1
- package/es/components/Segment/Segment.js +10 -5
- package/es/components/Segment/SegmentGroup.config.js +29 -121
- package/es/components/Segment/SegmentItem.config.js +20 -115
- package/es/components/Segment/index.js +1 -1
- package/es/components/Select/Select.config.js +29 -295
- package/es/components/Select/Select.js +9 -36
- package/es/components/Select/index.js +1 -1
- package/es/components/Sheet/Sheet.config.js +13 -54
- package/es/components/Sheet/Sheet.js +5 -3
- package/es/components/Sheet/index.js +1 -1
- package/es/components/Skeleton/LineSkeleton.config.js +26 -221
- package/es/components/Skeleton/Skeleton.js +4 -4
- package/es/components/Skeleton/index.js +1 -1
- package/es/components/Slider/Slider.component-test.js +220 -0
- package/es/components/Slider/Slider.config.js +17 -138
- package/es/components/Slider/Slider.js +5 -3
- package/es/components/Slider/index.js +1 -1
- package/es/components/Spinner/Spinner.config.js +18 -98
- package/es/components/Spinner/Spinner.js +6 -8
- package/es/components/Spinner/index.js +1 -1
- package/es/components/Steps/Steps.config.js +13 -96
- package/es/components/Steps/Steps.js +3 -3
- package/es/components/Steps/index.js +1 -1
- package/es/components/Switch/Switch.config.js +26 -140
- package/es/components/Switch/Switch.js +3 -3
- package/es/components/Switch/index.js +1 -1
- package/es/components/Table/Table.config.js +16 -248
- package/es/components/Table/Table.js +5 -3
- package/es/components/Table/index.js +1 -1
- package/es/components/Tabs/TabItem.js +11 -10
- package/es/components/Tabs/Tabs.js +11 -10
- package/es/components/Tabs/TabsController.js +7 -5
- package/es/components/Tabs/horizontal/HorizontalTabItem.config.js +25 -221
- package/es/components/Tabs/horizontal/HorizontalTabs.config.js +32 -257
- package/es/components/Tabs/index.js +1 -1
- package/es/components/Tabs/vertical/VerticalTabItem.config.js +19 -116
- package/es/components/Tabs/vertical/VerticalTabs.config.js +19 -89
- package/es/components/TextArea/TextArea.config.js +37 -358
- package/es/components/TextArea/TextArea.js +5 -3
- package/es/components/TextArea/index.js +1 -1
- package/es/components/TextField/TextField.config.js +35 -329
- package/es/components/TextField/TextField.js +4 -2
- package/es/components/TextField/index.js +1 -1
- package/es/components/Toast/Toast.config.js +30 -118
- package/es/components/Toast/Toast.js +4 -4
- package/es/components/Toast/index.js +1 -1
- package/es/components/ToastNew/ToastNew.config.js +16 -71
- package/es/components/ToastNew/ToastNew.js +3 -3
- package/es/components/ToastNew/index.js +1 -1
- package/es/components/Tokens/Colors/Colors.styles.js +43 -90
- package/es/components/Tokens/NumberTokens/NumberTokens.styles.js +18 -37
- package/es/components/Tokens/Typography/Typography.styles.js +68 -135
- package/es/components/Toolbar/Toolbar.config.js +13 -48
- package/es/components/Toolbar/Toolbar.js +6 -4
- package/es/components/Toolbar/index.js +1 -1
- package/es/components/Tooltip/Tooltip.config.js +14 -62
- package/es/components/Tooltip/Tooltip.js +2 -2
- package/es/components/Tooltip/index.js +1 -1
- package/es/components/Tree/Tree.config.js +13 -74
- package/es/components/Tree/Tree.js +2 -2
- package/es/components/Tree/index.js +1 -1
- package/es/components/Typography/Body.config.js +38 -131
- package/es/components/Typography/Dspl.config.js +24 -83
- package/es/components/Typography/Heading.config.js +38 -131
- package/es/components/Typography/Text.config.js +31 -107
- package/es/components/Typography/Typography.js +35 -35
- package/es/components/Typography/index.js +1 -1
- package/es/components/ViewContainer/ViewContainer.config.js +8 -36
- package/es/components/ViewContainer/ViewContainer.js +2 -2
- package/es/components/ViewContainer/index.js +1 -1
- package/es/index.js +1 -2
- package/es/mixins/index.js +1 -1
- package/es/tokens/index.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +729 -82
- package/mixins/index.js +20 -61
- package/package.json +12 -12
- package/tokens/index.js +255 -126
- package/components/Carousel/Carousel.config.d.ts +0 -14
- package/components/Carousel/Carousel.config.js +0 -62
- package/components/Carousel/Carousel.d.ts +0 -9
- package/components/Carousel/Carousel.js +0 -14
- package/components/Carousel/index.d.ts +0 -2
- package/components/Carousel/index.js +0 -20
- package/emotion/cjs/components/Carousel/Carousel.config.js +0 -62
- package/emotion/cjs/components/Carousel/Carousel.js +0 -14
- package/emotion/cjs/components/Carousel/index.js +0 -20
- package/emotion/cjs/helpers/index.js +0 -25
- package/emotion/es/components/Carousel/Carousel.config.js +0 -52
- package/emotion/es/components/Carousel/Carousel.js +0 -5
- package/emotion/es/components/Carousel/index.js +0 -2
- package/es/components/Carousel/Carousel.config.js +0 -52
- package/es/components/Carousel/Carousel.js +0 -5
- package/es/components/Carousel/index.js +0 -2
- /package/emotion/{es/helpers/index.js → cjs/helpers/index.ts} +0 -0
- /package/{es/helpers/index.js → emotion/es/helpers/index.ts} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
import { component, mergeConfig, showToast as showToastOriginal, toastContainerConfig } from '@salutejs/plasma-new-hope/emotion';
|
2
2
|
import { config } from './ToastNew.config';
|
3
|
-
var mergedConfig = mergeConfig(toastContainerConfig, config);
|
4
|
-
export var ToastContainer = component(mergedConfig);
|
3
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(toastContainerConfig, config);
|
4
|
+
export var ToastContainer = /*#__PURE__*/component(mergedConfig);
|
5
5
|
var showToast = showToastOriginal;
|
6
|
-
export { showToast };
|
6
|
+
export { showToast };
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
2
|
+
import React, { ComponentProps } from 'react';
|
3
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import { IconDone } from '@salutejs/plasma-icons';
|
5
|
+
|
6
|
+
import { Button } from '../Button';
|
7
|
+
|
8
|
+
import { ToastContainer, showToast } from './ToastNew';
|
9
|
+
|
10
|
+
const views = ['default'];
|
11
|
+
const sizes = ['s'];
|
12
|
+
const positions = ['top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'];
|
13
|
+
|
14
|
+
const meta: Meta<typeof ToastContainer> = {
|
15
|
+
title: 'Overlay/Toast',
|
16
|
+
component: ToastContainer,
|
17
|
+
decorators: [InSpacingDecorator],
|
18
|
+
argTypes: {
|
19
|
+
view: {
|
20
|
+
options: views,
|
21
|
+
control: {
|
22
|
+
type: 'select',
|
23
|
+
},
|
24
|
+
},
|
25
|
+
size: {
|
26
|
+
options: sizes,
|
27
|
+
control: {
|
28
|
+
type: 'select',
|
29
|
+
},
|
30
|
+
},
|
31
|
+
pilled: {
|
32
|
+
control: { type: 'boolean' },
|
33
|
+
},
|
34
|
+
hasClose: {
|
35
|
+
control: { type: 'boolean' },
|
36
|
+
},
|
37
|
+
enableContentLeft: {
|
38
|
+
control: { type: 'boolean' },
|
39
|
+
},
|
40
|
+
width: {
|
41
|
+
control: { type: 'text' },
|
42
|
+
},
|
43
|
+
textColor: {
|
44
|
+
control: { type: 'text' },
|
45
|
+
},
|
46
|
+
duration: {
|
47
|
+
control: { type: 'number' },
|
48
|
+
},
|
49
|
+
position: {
|
50
|
+
options: positions,
|
51
|
+
control: {
|
52
|
+
type: 'select',
|
53
|
+
},
|
54
|
+
},
|
55
|
+
},
|
56
|
+
};
|
57
|
+
|
58
|
+
export default meta;
|
59
|
+
|
60
|
+
type StoryPropsDefault = ComponentProps<typeof ToastContainer> & {
|
61
|
+
enableContentLeft?: boolean;
|
62
|
+
};
|
63
|
+
|
64
|
+
const StoryDefault = (args: StoryPropsDefault) => {
|
65
|
+
const handleShowToast = () => {
|
66
|
+
showToast('Текст всплывающего уведомления');
|
67
|
+
};
|
68
|
+
|
69
|
+
return (
|
70
|
+
<div>
|
71
|
+
<ToastContainer {...args} contentLeft={args.enableContentLeft && <IconDone size="s" color="inherit" />} />
|
72
|
+
|
73
|
+
<Button onClick={handleShowToast}>Показать тост</Button>
|
74
|
+
</div>
|
75
|
+
);
|
76
|
+
};
|
77
|
+
|
78
|
+
export const Default: StoryObj<StoryPropsDefault> = {
|
79
|
+
args: {
|
80
|
+
view: 'default',
|
81
|
+
size: 's',
|
82
|
+
pilled: false,
|
83
|
+
hasClose: true,
|
84
|
+
enableContentLeft: true,
|
85
|
+
},
|
86
|
+
render: StoryDefault,
|
87
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export { ToastContainer, showToast } from './ToastNew';
|
1
|
+
export { ToastContainer, showToast } from './ToastNew';
|
@@ -0,0 +1,196 @@
|
|
1
|
+
import React, { FC } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { sdds_cs__light } from '@salutejs/sdds-themes/es/themes';
|
4
|
+
import { InSpacingDecorator, getGroupedTokens, upperFirstLetter } from '@salutejs/plasma-sb-utils';
|
5
|
+
import type { GroupedTokens, TokenData } from '@salutejs/plasma-sb-utils';
|
6
|
+
import { cx } from '@salutejs/plasma-new-hope';
|
7
|
+
|
8
|
+
import { Accordion } from '../../Accordion/Accordion';
|
9
|
+
import { ToastProvider, useToast } from '../../Toast/Toast';
|
10
|
+
import { SegmentGroup } from '../../Segment/Segment';
|
11
|
+
import type { ShowToastArgs } from '../../Toast';
|
12
|
+
import { SegmentProvider, useSegment } from '../../Segment';
|
13
|
+
|
14
|
+
import {
|
15
|
+
AccordionInfo,
|
16
|
+
ColorCircle,
|
17
|
+
ColorTokensWrapper,
|
18
|
+
ColumnTitle,
|
19
|
+
StyledAccordionItem,
|
20
|
+
StyledSegmentItem,
|
21
|
+
Subcategory,
|
22
|
+
SubthemeSwitcher,
|
23
|
+
TokenInfoWrapper,
|
24
|
+
ColorTokenDataWrapper,
|
25
|
+
StateDataWrapper,
|
26
|
+
TokenInfo,
|
27
|
+
OpacityPart,
|
28
|
+
} from './Colors.styles';
|
29
|
+
|
30
|
+
type ColorTokenDataProps = {
|
31
|
+
token: string;
|
32
|
+
tokenData: Omit<TokenData, 'states'>;
|
33
|
+
copyToClipboard: (value: string, opacity?: string | null) => Promise<void>;
|
34
|
+
className?: string;
|
35
|
+
initialTokenName?: string;
|
36
|
+
};
|
37
|
+
|
38
|
+
const meta: Meta = {
|
39
|
+
title: 'Tokens/Colors',
|
40
|
+
decorators: [InSpacingDecorator],
|
41
|
+
};
|
42
|
+
|
43
|
+
export default meta;
|
44
|
+
|
45
|
+
const themes: Record<string, GroupedTokens> = {
|
46
|
+
'sdds-srvc:light': getGroupedTokens(sdds_cs__light[0]),
|
47
|
+
};
|
48
|
+
|
49
|
+
const ColorTokenData: FC<ColorTokenDataProps> = ({
|
50
|
+
token,
|
51
|
+
tokenData,
|
52
|
+
copyToClipboard,
|
53
|
+
className,
|
54
|
+
initialTokenName,
|
55
|
+
}) => {
|
56
|
+
const { value, opacity, tone, colorName } = tokenData;
|
57
|
+
|
58
|
+
return (
|
59
|
+
<AccordionInfo>
|
60
|
+
<TokenInfo className={cx('copy', className)} onClick={() => copyToClipboard(initialTokenName || token)}>
|
61
|
+
{token}
|
62
|
+
</TokenInfo>
|
63
|
+
<TokenInfo
|
64
|
+
className={cx('color', colorName && 'copy')}
|
65
|
+
onClick={() => Boolean(colorName) && copyToClipboard(value, opacity?.alpha)}
|
66
|
+
>
|
67
|
+
<ColorCircle background={value + (opacity?.alpha || '')} />
|
68
|
+
<div>{value.includes('gradient') ? 'Градиент' : colorName || ''}</div>
|
69
|
+
</TokenInfo>
|
70
|
+
<TokenInfo className="no-interaction">{tone !== 'none' && tone}</TokenInfo>
|
71
|
+
<TokenInfo className="no-interaction">{opacity?.parsedAlpha}</TokenInfo>
|
72
|
+
<TokenInfo className="color copy hex" onClick={() => copyToClipboard(value, opacity?.alpha)}>
|
73
|
+
<div>
|
74
|
+
{value.includes('gradient') ? '' : value}
|
75
|
+
{opacity && <OpacityPart>{opacity.alpha}</OpacityPart>}
|
76
|
+
</div>
|
77
|
+
</TokenInfo>
|
78
|
+
</AccordionInfo>
|
79
|
+
);
|
80
|
+
};
|
81
|
+
|
82
|
+
const StoryDemoColor = ({ context }) => {
|
83
|
+
const groupedTokens = themes[context.globals.theme];
|
84
|
+
const { showToast } = useToast();
|
85
|
+
const { selectedSegmentItems } = useSegment();
|
86
|
+
const toastData = {
|
87
|
+
view: 'default',
|
88
|
+
size: 'm',
|
89
|
+
hasClose: true,
|
90
|
+
fade: false,
|
91
|
+
position: 'bottom',
|
92
|
+
offset: 0,
|
93
|
+
timeout: 3000,
|
94
|
+
role: 'alert',
|
95
|
+
} as ShowToastArgs;
|
96
|
+
|
97
|
+
const copyToClipboard = async (value: string, opacity?: string | null) => {
|
98
|
+
try {
|
99
|
+
await navigator.clipboard.writeText(value + (opacity || ''));
|
100
|
+
|
101
|
+
showToast({
|
102
|
+
...toastData,
|
103
|
+
text: 'Скопировано',
|
104
|
+
});
|
105
|
+
} catch (err) {
|
106
|
+
showToast({
|
107
|
+
...toastData,
|
108
|
+
text: 'Ошибка при копировании текста',
|
109
|
+
});
|
110
|
+
}
|
111
|
+
};
|
112
|
+
|
113
|
+
if (!groupedTokens || !groupedTokens[selectedSegmentItems[0]]) {
|
114
|
+
return null;
|
115
|
+
}
|
116
|
+
|
117
|
+
const subcategories = groupedTokens[selectedSegmentItems[0]];
|
118
|
+
|
119
|
+
return (
|
120
|
+
<ColorTokensWrapper>
|
121
|
+
<SubthemeSwitcher>
|
122
|
+
<SegmentGroup view="clear" size="xs" hasBackground pilled>
|
123
|
+
{Object.entries(groupedTokens).map(([category]) => (
|
124
|
+
<StyledSegmentItem key={`label_${category}`} value={category} view="default" pilled>
|
125
|
+
{category}
|
126
|
+
</StyledSegmentItem>
|
127
|
+
))}
|
128
|
+
</SegmentGroup>
|
129
|
+
</SubthemeSwitcher>
|
130
|
+
<Accordion view="clear" size="s" stretching="filled" defaultActiveEventKey={[0]}>
|
131
|
+
{Object.entries(subcategories).map(([subcategory, subcategoryTokens], index) => (
|
132
|
+
<StyledAccordionItem
|
133
|
+
key={subcategory}
|
134
|
+
eventKey={index}
|
135
|
+
type="arrow"
|
136
|
+
title={
|
137
|
+
<AccordionInfo>
|
138
|
+
<Subcategory>{subcategory}/</Subcategory>
|
139
|
+
<ColumnTitle className="color">
|
140
|
+
<ColorCircle disableShadow />
|
141
|
+
Color
|
142
|
+
</ColumnTitle>
|
143
|
+
<ColumnTitle>Tone</ColumnTitle>
|
144
|
+
<ColumnTitle>Opacity</ColumnTitle>
|
145
|
+
<ColumnTitle className="hex">Hex</ColumnTitle>
|
146
|
+
</AccordionInfo>
|
147
|
+
}
|
148
|
+
>
|
149
|
+
<TokenInfoWrapper>
|
150
|
+
{Object.entries(subcategoryTokens).map(([_, { states, ...tokenData }]) => {
|
151
|
+
return (
|
152
|
+
tokenData.value !== 'undefined' && (
|
153
|
+
<ColorTokenDataWrapper>
|
154
|
+
<ColorTokenData
|
155
|
+
key={tokenData.fullTokenName}
|
156
|
+
token={tokenData.fullTokenName}
|
157
|
+
tokenData={tokenData}
|
158
|
+
copyToClipboard={copyToClipboard}
|
159
|
+
/>
|
160
|
+
{states && Object.keys(states).length > 0 && (
|
161
|
+
<StateDataWrapper>
|
162
|
+
{Object.entries(states).map(([state, stateTokenData]) => (
|
163
|
+
<ColorTokenData
|
164
|
+
key={state}
|
165
|
+
token={state}
|
166
|
+
tokenData={stateTokenData}
|
167
|
+
copyToClipboard={copyToClipboard}
|
168
|
+
className="state"
|
169
|
+
initialTokenName={
|
170
|
+
tokenData.fullTokenName + upperFirstLetter(state)
|
171
|
+
}
|
172
|
+
/>
|
173
|
+
))}
|
174
|
+
</StateDataWrapper>
|
175
|
+
)}
|
176
|
+
</ColorTokenDataWrapper>
|
177
|
+
)
|
178
|
+
);
|
179
|
+
})}
|
180
|
+
</TokenInfoWrapper>
|
181
|
+
</StyledAccordionItem>
|
182
|
+
))}
|
183
|
+
</Accordion>
|
184
|
+
</ColorTokensWrapper>
|
185
|
+
);
|
186
|
+
};
|
187
|
+
|
188
|
+
export const Default: StoryObj = {
|
189
|
+
render: (_, context) => (
|
190
|
+
<ToastProvider>
|
191
|
+
<SegmentProvider defaultSelected={['Default']} singleSelectedRequired>
|
192
|
+
<StoryDemoColor context={context} />
|
193
|
+
</SegmentProvider>
|
194
|
+
</ToastProvider>
|
195
|
+
),
|
196
|
+
};
|
@@ -1,94 +1,23 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import styled from 'styled-components';
|
2
4
|
import { segmentTokens } from '@salutejs/plasma-new-hope';
|
3
5
|
import { AccordionItem } from '../../Accordion';
|
4
6
|
import { SegmentItem } from '../../Segment/Segment';
|
5
|
-
export var ColorTokensWrapper = styled.div.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
"
|
10
|
-
]);
|
11
|
-
export var
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
]);
|
17
|
-
export var
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
":1.75rem;",
|
23
|
-
":0.375rem 0.5rem;"
|
24
|
-
], segmentTokens.itemHeight, segmentTokens.itemPilledPadding);
|
25
|
-
export var AccordionInfo = styled.div.withConfig({
|
26
|
-
displayName: "Colors.styles__AccordionInfo",
|
27
|
-
componentId: "sc-998f2ec3-3"
|
28
|
-
})([
|
29
|
-
"display:grid;grid-template-columns:16.75rem 9.938rem 2.375rem 3.813rem 9.313rem;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);"
|
30
|
-
]);
|
31
|
-
export var Subcategory = styled.div.withConfig({
|
32
|
-
displayName: "Colors.styles__Subcategory",
|
33
|
-
componentId: "sc-998f2ec3-4"
|
34
|
-
})([
|
35
|
-
"color:var(--text-secondary);"
|
36
|
-
]);
|
37
|
-
export var ColumnTitle = styled.div.withConfig({
|
38
|
-
displayName: "Colors.styles__ColumnTitle",
|
39
|
-
componentId: "sc-998f2ec3-5"
|
40
|
-
})([
|
41
|
-
"color:var(--text-tertiary);transition:opacity 0.2s;&.color{display:flex;align-items:center;gap:2.5rem;}&.hex{padding-left:3.75rem;}"
|
42
|
-
]);
|
43
|
-
export var StyledAccordionItem = styled(AccordionItem).withConfig({
|
44
|
-
displayName: "Colors.styles__StyledAccordionItem",
|
45
|
-
componentId: "sc-998f2ec3-6"
|
46
|
-
})([
|
47
|
-
"--plasma-accordion-item-padding:0;--plasma-accordion-item-padding-vertical:0;border-bottom:unset;width:50.375rem;div > div > div > svg{color:var(--text-secondary);}.accordion-item-body{margin-bottom:2.375rem;padding-top:0.125rem;transition:margin-bottom 0.2s,padding-top 0.2s;}[aria-expanded]{margin-bottom:1rem;}[aria-expanded='false']{margin-bottom:1.125rem;",
|
48
|
-
" ",
|
49
|
-
"{opacity:0;}}[aria-expanded='false'] + div > .accordion-item-body{margin:0;padding:0;}"
|
50
|
-
], AccordionInfo, ColumnTitle);
|
51
|
-
export var TokenInfoWrapper = styled.div.withConfig({
|
52
|
-
displayName: "Colors.styles__TokenInfoWrapper",
|
53
|
-
componentId: "sc-998f2ec3-7"
|
54
|
-
})([
|
55
|
-
"display:flex;flex-direction:column;gap:0.75rem;margin-top:-0.125rem;"
|
56
|
-
]);
|
57
|
-
export var ColorTokenDataWrapper = styled.div.withConfig({
|
58
|
-
displayName: "Colors.styles__ColorTokenDataWrapper",
|
59
|
-
componentId: "sc-998f2ec3-8"
|
60
|
-
})([
|
61
|
-
"display:flex;flex-direction:column;gap:0.5rem;"
|
62
|
-
]);
|
63
|
-
export var StateDataWrapper = styled.div.withConfig({
|
64
|
-
displayName: "Colors.styles__StateDataWrapper",
|
65
|
-
componentId: "sc-998f2ec3-9"
|
66
|
-
})([
|
67
|
-
"display:flex;flex-direction:column;gap:0.5rem;margin-bottom:0.75rem;"
|
68
|
-
]);
|
69
|
-
export var OpacityPart = styled.span.withConfig({
|
70
|
-
displayName: "Colors.styles__OpacityPart",
|
71
|
-
componentId: "sc-998f2ec3-10"
|
72
|
-
})([
|
73
|
-
"color:var(--text-secondary);padding-left:0.125rem;"
|
74
|
-
]);
|
75
|
-
export var TokenInfo = styled.div.withConfig({
|
76
|
-
displayName: "Colors.styles__TokenInfo",
|
77
|
-
componentId: "sc-998f2ec3-11"
|
78
|
-
})([
|
79
|
-
"color:var(--text-paragraph);cursor:default;&.copy{cursor:copy;}&.color{display:flex;align-items:center;gap:2.5rem;}&.no-interaction{text-align:right;}&.hex{padding-left:3.75rem;}&:not(.no-interaction):hover{color:var(--text-paragraph-hover);",
|
80
|
-
"{color:var(--text-paragraph-hover);}}&:not(.no-interaction):active{color:var(--text-paragraph-active);",
|
81
|
-
"{color:var(--text-secondary-active);}}&.state{padding-left:1.5rem;color:var(--text-secondary);&:hover{color:var(--text-secondary);}&:active{color:var(--text-secondary-active);}}"
|
82
|
-
], OpacityPart, OpacityPart);
|
83
|
-
export var ColorCircle = styled.div.withConfig({
|
84
|
-
displayName: "Colors.styles__ColorCircle",
|
85
|
-
componentId: "sc-998f2ec3-12"
|
86
|
-
})([
|
87
|
-
"width:1.25rem;height:1.25rem;border-radius:50%;background:",
|
88
|
-
";box-shadow:",
|
89
|
-
";"
|
90
|
-
], function(props) {
|
91
|
-
return props.background || 'transparent';
|
92
|
-
}, function(props) {
|
93
|
-
return props.disableShadow ? 'none' : 'inset 0px 0px 0px 1px rgba(8, 8, 8, 0.12)';
|
94
|
-
});
|
7
|
+
export var ColorTokensWrapper = /*#__PURE__*/styled.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n padding-top: 1.5rem;\n width: 100%;\n"])));
|
8
|
+
export var SubthemeSwitcher = /*#__PURE__*/styled.div(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n margin: -0.5rem auto 2.5rem auto;\n width: fit-content;\n\n position: relative;\n\n &:before {\n content: '\u041F\u043E\u0434\u0442\u0435\u043C\u0430';\n position: absolute;\n top: 50%;\n transform: translate(-100%, -50%);\n left: -0.75rem;\n color: var(--text-tertiary);\n\n font-family: var(--plasma-typo-body-xs-font-family);\n font-size: var(--plasma-typo-body-xs-font-size);\n font-style: var(--plasma-typo-body-xs-font-style);\n font-weight: var(--plasma-typo-body-xs-font-weight);\n bold-font-weight: var(--plasma-typo-body-xs-bold-font-weight);\n letter-spacing: var(--plasma-typo-body-xs-letter-spacing);\n line-height: var(--plasma-typo-body-xs-line-height);\n }\n"])));
|
9
|
+
export var StyledSegmentItem = /*#__PURE__*/styled(SegmentItem)(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 1.75rem;\n ", ": 0.375rem 0.5rem;\n"])), segmentTokens.itemHeight, segmentTokens.itemPilledPadding);
|
10
|
+
export var AccordionInfo = /*#__PURE__*/styled.div(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: 16.75rem 9.938rem 2.375rem 3.813rem 9.313rem;\n grid-column-gap: 1.5rem;\n\n font-family: var(--plasma-typo-body-m-font-family);\n font-size: var(--plasma-typo-body-m-font-size);\n font-style: var(--plasma-typo-body-m-font-style);\n font-weight: var(--plasma-typo-body-m-font-weight);\n letter-spacing: var(--plasma-typo-body-m-letter-spacing);\n line-height: var(--plasma-typo-body-m-line-height);\n"])));
|
11
|
+
export var Subcategory = /*#__PURE__*/styled.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n color: var(--text-secondary);\n"])));
|
12
|
+
export var ColumnTitle = /*#__PURE__*/styled.div(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n color: var(--text-tertiary);\n transition: opacity 0.2s;\n\n &.color {\n display: flex;\n align-items: center;\n gap: 2.5rem;\n }\n\n &.hex {\n padding-left: 3.75rem;\n }\n"])));
|
13
|
+
export var StyledAccordionItem = /*#__PURE__*/styled(AccordionItem)(_templateObject7 || (_templateObject7 = /*#__PURE__*/_taggedTemplateLiteral(["\n --plasma-accordion-item-padding: 0;\n --plasma-accordion-item-padding-vertical: 0;\n\n border-bottom: unset;\n width: 50.375rem;\n\n div > div > div > svg {\n color: var(--text-secondary);\n }\n\n .accordion-item-body {\n margin-bottom: 2.375rem;\n padding-top: 0.125rem;\n transition: margin-bottom 0.2s, padding-top 0.2s;\n }\n\n [aria-expanded] {\n margin-bottom: 1rem;\n }\n\n [aria-expanded='false'] {\n margin-bottom: 1.125rem;\n\n ", " ", " {\n opacity: 0;\n }\n }\n\n [aria-expanded='false'] + div > .accordion-item-body {\n margin: 0;\n padding: 0;\n }\n"])), AccordionInfo, ColumnTitle);
|
14
|
+
export var TokenInfoWrapper = /*#__PURE__*/styled.div(_templateObject8 || (_templateObject8 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n margin-top: -0.125rem;\n"])));
|
15
|
+
export var ColorTokenDataWrapper = /*#__PURE__*/styled.div(_templateObject9 || (_templateObject9 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n"])));
|
16
|
+
export var StateDataWrapper = /*#__PURE__*/styled.div(_templateObject10 || (_templateObject10 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n margin-bottom: 0.75rem;\n"])));
|
17
|
+
export var OpacityPart = /*#__PURE__*/styled.span(_templateObject11 || (_templateObject11 = /*#__PURE__*/_taggedTemplateLiteral(["\n color: var(--text-secondary);\n padding-left: 0.125rem;\n"])));
|
18
|
+
export var TokenInfo = /*#__PURE__*/styled.div(_templateObject12 || (_templateObject12 = /*#__PURE__*/_taggedTemplateLiteral(["\n color: var(--text-paragraph);\n\n cursor: default;\n\n &.copy {\n cursor: copy;\n }\n\n &.color {\n display: flex;\n align-items: center;\n gap: 2.5rem;\n }\n\n &.no-interaction {\n text-align: right;\n }\n\n &.hex {\n padding-left: 3.75rem;\n }\n\n &:not(.no-interaction):hover {\n color: var(--text-paragraph-hover);\n\n ", " {\n color: var(--text-paragraph-hover);\n }\n }\n\n &:not(.no-interaction):active {\n color: var(--text-paragraph-active);\n\n ", " {\n color: var(--text-secondary-active);\n }\n }\n\n &.state {\n padding-left: 1.5rem;\n color: var(--text-secondary);\n\n &:hover {\n color: var(--text-secondary);\n }\n\n &:active {\n color: var(--text-secondary-active);\n }\n }\n"])), OpacityPart, OpacityPart);
|
19
|
+
export var ColorCircle = /*#__PURE__*/styled.div(_templateObject13 || (_templateObject13 = /*#__PURE__*/_taggedTemplateLiteral(["\n width: 1.25rem;\n height: 1.25rem;\n border-radius: 50%;\n\n background: ", ";\n box-shadow: ", ";\n"])), function (props) {
|
20
|
+
return props.background || 'transparent';
|
21
|
+
}, function (props) {
|
22
|
+
return props.disableShadow ? 'none' : 'inset 0px 0px 0px 1px rgba(8, 8, 8, 0.12)';
|
23
|
+
});
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { sdds_cs__light } from '@salutejs/sdds-themes/es/themes';
|
4
|
+
import { InSpacingDecorator, getGroupedSpacingTokens } from '@salutejs/plasma-sb-utils';
|
5
|
+
import type { GroupedNumberTokens } from '@salutejs/plasma-sb-utils';
|
6
|
+
|
7
|
+
import { ToastProvider, useToast } from '../../Toast/Toast';
|
8
|
+
import type { ShowToastArgs } from '../../Toast';
|
9
|
+
|
10
|
+
import {
|
11
|
+
TokenData,
|
12
|
+
TokenDataHeader,
|
13
|
+
TokenInfo,
|
14
|
+
TokensDataWrapper,
|
15
|
+
TokensTitle,
|
16
|
+
TokensWrapper,
|
17
|
+
} from './NumberTokens.styles';
|
18
|
+
|
19
|
+
const meta: Meta = {
|
20
|
+
title: 'Tokens/Spacing',
|
21
|
+
decorators: [InSpacingDecorator],
|
22
|
+
};
|
23
|
+
|
24
|
+
export default meta;
|
25
|
+
|
26
|
+
const themes: Record<string, GroupedNumberTokens> = {
|
27
|
+
'sdds-srvc:light': getGroupedSpacingTokens(sdds_cs__light[0]),
|
28
|
+
};
|
29
|
+
|
30
|
+
const StoryDemo = ({ context }) => {
|
31
|
+
const groupedTokens = themes[context.globals.theme];
|
32
|
+
const { showToast } = useToast();
|
33
|
+
const toastData = {
|
34
|
+
view: 'default',
|
35
|
+
size: 'm',
|
36
|
+
hasClose: true,
|
37
|
+
fade: false,
|
38
|
+
position: 'bottom',
|
39
|
+
offset: 0,
|
40
|
+
timeout: 3000,
|
41
|
+
role: 'alert',
|
42
|
+
} as ShowToastArgs;
|
43
|
+
|
44
|
+
const copyToClipboard = async (value: string, opacity?: string | null) => {
|
45
|
+
try {
|
46
|
+
await navigator.clipboard.writeText(value + (opacity || ''));
|
47
|
+
|
48
|
+
showToast({
|
49
|
+
...toastData,
|
50
|
+
text: 'Скопировано',
|
51
|
+
});
|
52
|
+
} catch (err) {
|
53
|
+
showToast({
|
54
|
+
...toastData,
|
55
|
+
text: 'Ошибка при копировании текста',
|
56
|
+
});
|
57
|
+
}
|
58
|
+
};
|
59
|
+
|
60
|
+
if (!groupedTokens) {
|
61
|
+
return null;
|
62
|
+
}
|
63
|
+
|
64
|
+
return (
|
65
|
+
<TokensWrapper>
|
66
|
+
<TokensTitle>Spacing</TokensTitle>
|
67
|
+
<TokensDataWrapper>
|
68
|
+
<TokenDataHeader>
|
69
|
+
<TokenInfo>Token/</TokenInfo>
|
70
|
+
<TokenInfo className="value">px</TokenInfo>
|
71
|
+
</TokenDataHeader>
|
72
|
+
<TokenData>
|
73
|
+
{Object.entries(groupedTokens).map(([tokenName, tokenValue]) => (
|
74
|
+
<>
|
75
|
+
<TokenInfo onClick={() => copyToClipboard(tokenName)}>{tokenName}</TokenInfo>
|
76
|
+
<TokenInfo className="value" onClick={() => copyToClipboard(tokenValue)}>
|
77
|
+
{tokenValue}
|
78
|
+
</TokenInfo>
|
79
|
+
</>
|
80
|
+
))}
|
81
|
+
</TokenData>
|
82
|
+
</TokensDataWrapper>
|
83
|
+
</TokensWrapper>
|
84
|
+
);
|
85
|
+
};
|
86
|
+
|
87
|
+
export const Default: StoryObj = {
|
88
|
+
render: (_, context) => (
|
89
|
+
<ToastProvider>
|
90
|
+
<StoryDemo context={context} />
|
91
|
+
</ToastProvider>
|
92
|
+
),
|
93
|
+
};
|
@@ -1,38 +1,9 @@
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
1
3
|
import styled from 'styled-components';
|
2
|
-
export var TokensWrapper = styled.div.
|
3
|
-
|
4
|
-
|
5
|
-
})(
|
6
|
-
|
7
|
-
]);
|
8
|
-
export var TokensTitle = styled.h2.withConfig({
|
9
|
-
displayName: "NumberTokens.styles__TokensTitle",
|
10
|
-
componentId: "sc-5cff0c2a-1"
|
11
|
-
})([
|
12
|
-
"margin:0;font-family:var(--plasma-typo-h2-font-family);font-size:var(--plasma-typo-h2-font-size);font-style:var(--plasma-typo-h2-font-style);font-weight:var(--plasma-typo-h2-font-weight);letter-spacing:var(--plasma-typo-h2-letter-spacing);line-height:var(--plasma-typo-h2-line-height);"
|
13
|
-
]);
|
14
|
-
export var TokensDataWrapper = styled.div.withConfig({
|
15
|
-
displayName: "NumberTokens.styles__TokensDataWrapper",
|
16
|
-
componentId: "sc-5cff0c2a-2"
|
17
|
-
})([
|
18
|
-
"display:flex;flex-direction:column;gap:1rem;"
|
19
|
-
]);
|
20
|
-
export var TokenInfo = styled.p.withConfig({
|
21
|
-
displayName: "NumberTokens.styles__TokenInfo",
|
22
|
-
componentId: "sc-5cff0c2a-3"
|
23
|
-
})([
|
24
|
-
"margin:0;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);cursor:copy;color:var(--text-paragraph);&.value{text-align:end;}&:hover{color:var(--text-paragraph-hover);}&:active{color:var(--text-paragraph-active);}"
|
25
|
-
]);
|
26
|
-
export var TokenData = styled.div.withConfig({
|
27
|
-
displayName: "NumberTokens.styles__TokenData",
|
28
|
-
componentId: "sc-5cff0c2a-4"
|
29
|
-
})([
|
30
|
-
"display:grid;grid-template-columns:16.75rem 3.813rem;column-gap:1.5rem;row-gap:0.75rem;"
|
31
|
-
]);
|
32
|
-
export var TokenDataHeader = styled(TokenData).withConfig({
|
33
|
-
displayName: "NumberTokens.styles__TokenDataHeader",
|
34
|
-
componentId: "sc-5cff0c2a-5"
|
35
|
-
})([
|
36
|
-
"",
|
37
|
-
"{color:var(--text-secondary);cursor:default;pointer-events:none;&:hover{color:var(--text-secondary);}&:active{color:var(--text-secondary);}}"
|
38
|
-
], TokenInfo);
|
4
|
+
export var TokensWrapper = /*#__PURE__*/styled.div(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n margin-top: 1.5rem;\n margin-left: 3rem;\n\n display: flex;\n flex-direction: column;\n gap: 2rem;\n"])));
|
5
|
+
export var TokensTitle = /*#__PURE__*/styled.h2(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n margin: 0;\n font-family: var(--plasma-typo-h2-font-family);\n font-size: var(--plasma-typo-h2-font-size);\n font-style: var(--plasma-typo-h2-font-style);\n font-weight: var(--plasma-typo-h2-font-weight);\n letter-spacing: var(--plasma-typo-h2-letter-spacing);\n line-height: var(--plasma-typo-h2-line-height);\n"])));
|
6
|
+
export var TokensDataWrapper = /*#__PURE__*/styled.div(_templateObject3 || (_templateObject3 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 1rem;\n"])));
|
7
|
+
export var TokenInfo = /*#__PURE__*/styled.p(_templateObject4 || (_templateObject4 = /*#__PURE__*/_taggedTemplateLiteral(["\n margin: 0;\n font-family: var(--plasma-typo-body-m-font-family);\n font-size: var(--plasma-typo-body-m-font-size);\n font-style: var(--plasma-typo-body-m-font-style);\n font-weight: var(--plasma-typo-body-m-font-weight);\n letter-spacing: var(--plasma-typo-body-m-letter-spacing);\n line-height: var(--plasma-typo-body-m-line-height);\n cursor: copy;\n\n color: var(--text-paragraph);\n\n &.value {\n text-align: end;\n }\n\n &:hover {\n color: var(--text-paragraph-hover);\n }\n\n &:active {\n color: var(--text-paragraph-active);\n }\n"])));
|
8
|
+
export var TokenData = /*#__PURE__*/styled.div(_templateObject5 || (_templateObject5 = /*#__PURE__*/_taggedTemplateLiteral(["\n display: grid;\n grid-template-columns: 16.75rem 3.813rem;\n column-gap: 1.5rem;\n row-gap: 0.75rem;\n"])));
|
9
|
+
export var TokenDataHeader = /*#__PURE__*/styled(TokenData)(_templateObject6 || (_templateObject6 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", " {\n color: var(--text-secondary);\n cursor: default;\n pointer-events: none;\n\n &:hover {\n color: var(--text-secondary);\n }\n\n &:active {\n color: var(--text-secondary);\n }\n }\n"])), TokenInfo);
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { sdds_cs__light } from '@salutejs/sdds-themes/es/themes';
|
4
|
+
import { InSpacingDecorator, getGroupedCornerRadiusTokens } from '@salutejs/plasma-sb-utils';
|
5
|
+
import type { GroupedNumberTokens } from '@salutejs/plasma-sb-utils';
|
6
|
+
|
7
|
+
import { ToastProvider, useToast } from '../../Toast/Toast';
|
8
|
+
import type { ShowToastArgs } from '../../Toast';
|
9
|
+
|
10
|
+
import {
|
11
|
+
TokenData,
|
12
|
+
TokenDataHeader,
|
13
|
+
TokenInfo,
|
14
|
+
TokensDataWrapper,
|
15
|
+
TokensTitle,
|
16
|
+
TokensWrapper,
|
17
|
+
} from './NumberTokens.styles';
|
18
|
+
|
19
|
+
const meta: Meta = {
|
20
|
+
title: 'Tokens/Corner Radius',
|
21
|
+
decorators: [InSpacingDecorator],
|
22
|
+
};
|
23
|
+
|
24
|
+
export default meta;
|
25
|
+
|
26
|
+
const themes: Record<string, GroupedNumberTokens> = {
|
27
|
+
'sdds-srvc:light': getGroupedCornerRadiusTokens(sdds_cs__light[0]),
|
28
|
+
};
|
29
|
+
|
30
|
+
const StoryDemo = ({ context }) => {
|
31
|
+
const groupedTokens = themes[context.globals.theme];
|
32
|
+
const { showToast } = useToast();
|
33
|
+
const toastData = {
|
34
|
+
view: 'default',
|
35
|
+
size: 'm',
|
36
|
+
hasClose: true,
|
37
|
+
fade: false,
|
38
|
+
position: 'bottom',
|
39
|
+
offset: 0,
|
40
|
+
timeout: 3000,
|
41
|
+
role: 'alert',
|
42
|
+
} as ShowToastArgs;
|
43
|
+
|
44
|
+
const copyToClipboard = async (value: string, opacity?: string | null) => {
|
45
|
+
try {
|
46
|
+
await navigator.clipboard.writeText(value + (opacity || ''));
|
47
|
+
|
48
|
+
showToast({
|
49
|
+
...toastData,
|
50
|
+
text: 'Скопировано',
|
51
|
+
});
|
52
|
+
} catch (err) {
|
53
|
+
showToast({
|
54
|
+
...toastData,
|
55
|
+
text: 'Ошибка при копировании текста',
|
56
|
+
});
|
57
|
+
}
|
58
|
+
};
|
59
|
+
|
60
|
+
if (!groupedTokens) {
|
61
|
+
return null;
|
62
|
+
}
|
63
|
+
|
64
|
+
return (
|
65
|
+
<TokensWrapper>
|
66
|
+
<TokensTitle>CornerRadius</TokensTitle>
|
67
|
+
<TokensDataWrapper>
|
68
|
+
<TokenDataHeader>
|
69
|
+
<TokenInfo>Token/</TokenInfo>
|
70
|
+
<TokenInfo className="value">px</TokenInfo>
|
71
|
+
</TokenDataHeader>
|
72
|
+
<TokenData>
|
73
|
+
{Object.entries(groupedTokens).map(([tokenName, tokenValue]) => (
|
74
|
+
<>
|
75
|
+
<TokenInfo onClick={() => copyToClipboard(tokenName)}>{tokenName}</TokenInfo>
|
76
|
+
<TokenInfo className="value" onClick={() => copyToClipboard(tokenValue)}>
|
77
|
+
{tokenValue}
|
78
|
+
</TokenInfo>
|
79
|
+
</>
|
80
|
+
))}
|
81
|
+
</TokenData>
|
82
|
+
</TokensDataWrapper>
|
83
|
+
</TokensWrapper>
|
84
|
+
);
|
85
|
+
};
|
86
|
+
|
87
|
+
export const Default: StoryObj = {
|
88
|
+
render: (_, context) => (
|
89
|
+
<ToastProvider>
|
90
|
+
<StoryDemo context={context} />
|
91
|
+
</ToastProvider>
|
92
|
+
),
|
93
|
+
};
|