@salutejs/plasma-new-hope 0.338.0-canary.2277.18274788623.0 → 0.338.0-canary.2280.18389973911.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/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -8
- package/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.css +11 -11
- package/cjs/components/Chip/Chip.css +7 -7
- package/cjs/components/Chip/Chip.js +6 -4
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Chip/Chip.styles.js +1 -1
- package/cjs/components/Chip/Chip.styles.js.map +1 -1
- package/cjs/components/Chip/{Chip.styles_fnd4j5.css → Chip.styles_d9y94l.css} +1 -1
- package/cjs/components/Chip/Chip.tokens.js +1 -0
- package/cjs/components/Chip/Chip.tokens.js.map +1 -1
- package/cjs/components/Chip/variations/_disabled/base.js +1 -1
- package/cjs/components/Chip/variations/_disabled/base.js.map +1 -1
- package/{es/components/Chip/variations/_disabled/base_rmcs0j.css → cjs/components/Chip/variations/_disabled/base_1j4s925.css} +1 -1
- package/cjs/components/Chip/variations/_readonly/base.js +1 -1
- package/cjs/components/Chip/variations/_readonly/base.js.map +1 -1
- package/{es/components/Chip/variations/_readonly/base_1nfit77.css → cjs/components/Chip/variations/_readonly/base_1xublmy.css} +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +12 -12
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -3
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/{es/components/Combobox/ComboboxNew/ui/Target/Target.styles_1c4vtoy.css → cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles_ycaw31.css} +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +7 -7
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.css +7 -7
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.css +7 -7
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +11 -11
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +11 -11
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +11 -11
- package/cjs/components/Drawer/Drawer.js +1 -4
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Modal/Modal.css +2 -2
- package/cjs/components/Modal/Modal.js +5 -4
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +15 -15
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +15 -15
- package/cjs/components/Popup/Popup.styles.js +2 -3
- package/cjs/components/Popup/Popup.styles.js.map +1 -1
- package/cjs/components/Range/Range.css +11 -11
- package/cjs/components/Select/Select.css +15 -15
- package/cjs/components/Select/Select.js +2 -2
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.tokens.js +2 -0
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +15 -15
- package/cjs/components/Select/ui/Target/Target.js +2 -1
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +15 -15
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +4 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +13 -13
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1mikp58.css → Textfield.styles_19e9015.css} +1 -1
- package/cjs/components/Slider/Slider.css +11 -11
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +11 -11
- package/cjs/components/Table/Table.css +15 -15
- package/cjs/components/Table/ui/Cell/Cell.css +15 -15
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +15 -15
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +15 -15
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +15 -15
- package/cjs/components/TextField/TextField.js +8 -4
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.tokens.js +2 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/hooks/useKeyNavigation.js +15 -6
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +9 -9
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/{TextFieldChip.styles_14q069b.css → TextFieldChip.styles_8puilg.css} +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +11 -11
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +26 -12
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +33 -2
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/{TextFieldChipNew.styles_y9tozi.css → TextFieldChipNew.styles_1hj7e4k.css} +1 -1
- package/cjs/components/TimePicker/TimePicker.css +11 -11
- package/cjs/components/Tree/utils/traverseTree.js +1 -1
- package/cjs/components/Tree/utils/traverseTree.js.map +1 -1
- package/cjs/index.css +16 -16
- package/cjs/index.js +0 -2
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Chip/Chip.js +9 -5
- package/emotion/cjs/components/Chip/Chip.styles.js +9 -9
- package/emotion/cjs/components/Chip/Chip.tokens.js +1 -0
- package/emotion/cjs/components/Chip/variations/_disabled/base.js +2 -1
- package/emotion/cjs/components/Chip/variations/_readonly/base.js +2 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -3
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +2 -2
- package/emotion/cjs/components/Drawer/Drawer.js +1 -3
- package/emotion/cjs/components/Modal/Modal.js +7 -6
- package/emotion/cjs/components/Popup/Popup.styles.js +13 -13
- package/emotion/cjs/components/ProgressBarCircular/ProgressBarCircular.js +182 -0
- package/emotion/cjs/components/ProgressBarCircular/ProgressBarCircular.styles.js +13 -0
- package/emotion/cjs/components/ProgressBarCircular/ProgressBarCircular.tokens.js +39 -0
- package/emotion/cjs/components/ProgressBarCircular/ProgressBarCircular.types.js +4 -0
- package/emotion/cjs/components/ProgressBarCircular/index.js +23 -0
- package/emotion/cjs/components/ProgressBarCircular/variations/_size/base.js +12 -0
- package/emotion/cjs/components/ProgressBarCircular/variations/_view/base.js +12 -0
- package/emotion/cjs/components/Scrollbar/Scrollbar.js +423 -0
- package/emotion/cjs/components/Scrollbar/Scrollbar.styles.js +59 -0
- package/emotion/cjs/components/Scrollbar/Scrollbar.tokens.js +39 -0
- package/emotion/cjs/components/Scrollbar/Scrollbar.types.js +4 -0
- package/emotion/cjs/components/Scrollbar/index.js +26 -0
- package/emotion/cjs/components/Scrollbar/utils.js +87 -0
- package/emotion/cjs/components/Scrollbar/variations/_size/base.js +12 -0
- package/emotion/cjs/components/Scrollbar/variations/_view/base.js +12 -0
- package/emotion/cjs/components/Select/Select.js +3 -2
- package/emotion/cjs/components/Select/Select.tokens.js +2 -0
- package/emotion/cjs/components/Select/ui/Target/Target.js +2 -1
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +9 -9
- package/emotion/cjs/components/TextField/TextField.js +10 -5
- package/emotion/cjs/components/TextField/TextField.tokens.js +2 -0
- package/emotion/cjs/components/TextField/hooks/useKeyNavigation.js +11 -4
- package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +5 -5
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +74 -10
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +18 -5
- package/emotion/cjs/components/Tree/utils/traverseTree.js +1 -1
- package/emotion/cjs/components/_Icon/index.js +4 -0
- package/emotion/cjs/examples/components/Chip/Chip.config.js +14 -14
- package/emotion/cjs/examples/components/Combobox/Combobox.config.js +15 -15
- package/emotion/cjs/examples/components/Combobox/Combobox.js +15 -0
- package/emotion/cjs/examples/components/ProgressBarCircular/ProgressBarCircular.config.js +36 -0
- package/emotion/cjs/examples/components/ProgressBarCircular/ProgressBarCircular.js +15 -0
- package/emotion/cjs/examples/components/Scrollbar/Scrollbar.config.js +32 -0
- package/emotion/cjs/examples/components/Scrollbar/Scrollbar.js +15 -0
- package/emotion/cjs/examples/components/Select/Select.config.js +24 -24
- package/emotion/cjs/examples/components/TextField/TextField.config.js +23 -23
- package/emotion/cjs/mixins/addScrollbar.js +24 -0
- package/emotion/cjs/mixins/index.js +0 -1
- package/emotion/es/components/Chip/Chip.js +9 -5
- package/emotion/es/components/Chip/Chip.styles.js +9 -9
- package/emotion/es/components/Chip/Chip.tokens.js +1 -0
- package/emotion/es/components/Chip/variations/_disabled/base.js +2 -1
- package/emotion/es/components/Chip/variations/_readonly/base.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +5 -3
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/emotion/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +2 -2
- package/emotion/es/components/Drawer/Drawer.js +1 -3
- package/emotion/es/components/Modal/Modal.js +6 -5
- package/emotion/es/components/Popup/Popup.styles.js +13 -13
- package/emotion/es/components/ProgressBarCircular/ProgressBarCircular.js +123 -0
- package/emotion/es/components/ProgressBarCircular/ProgressBarCircular.styles.js +3 -0
- package/emotion/es/components/ProgressBarCircular/ProgressBarCircular.tokens.js +21 -0
- package/emotion/es/components/ProgressBarCircular/ProgressBarCircular.types.js +1 -0
- package/emotion/es/components/ProgressBarCircular/index.js +2 -0
- package/emotion/es/components/ProgressBarCircular/variations/_size/base.js +2 -0
- package/emotion/es/components/ProgressBarCircular/variations/_view/base.js +2 -0
- package/emotion/es/components/Scrollbar/Scrollbar.js +359 -0
- package/emotion/es/components/Scrollbar/Scrollbar.styles.js +24 -0
- package/emotion/es/components/Scrollbar/Scrollbar.tokens.js +21 -0
- package/emotion/es/components/Scrollbar/Scrollbar.types.js +1 -0
- package/emotion/es/components/Scrollbar/index.js +2 -0
- package/emotion/es/components/Scrollbar/utils.js +69 -0
- package/emotion/es/components/Scrollbar/variations/_size/base.js +2 -0
- package/emotion/es/components/Scrollbar/variations/_view/base.js +2 -0
- package/emotion/es/components/Select/Select.js +3 -2
- package/emotion/es/components/Select/Select.tokens.js +2 -0
- package/emotion/es/components/Select/ui/Target/Target.js +2 -1
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +9 -9
- package/emotion/es/components/TextField/TextField.js +10 -5
- package/emotion/es/components/TextField/TextField.tokens.js +2 -0
- package/emotion/es/components/TextField/hooks/useKeyNavigation.js +11 -4
- package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +5 -5
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +74 -10
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +18 -5
- package/emotion/es/components/Tree/utils/traverseTree.js +1 -1
- package/emotion/es/components/_Icon/index.js +1 -0
- package/emotion/es/examples/components/Chip/Chip.config.js +14 -14
- package/emotion/es/examples/components/Combobox/Combobox.config.js +15 -15
- package/emotion/es/examples/components/Combobox/Combobox.js +7 -0
- package/emotion/es/examples/components/ProgressBarCircular/ProgressBarCircular.config.js +26 -0
- package/emotion/es/examples/components/ProgressBarCircular/ProgressBarCircular.js +5 -0
- package/emotion/es/examples/components/Scrollbar/Scrollbar.config.js +22 -0
- package/emotion/es/examples/components/Scrollbar/Scrollbar.js +5 -0
- package/emotion/es/examples/components/Select/Select.config.js +24 -24
- package/emotion/es/examples/components/TextField/TextField.config.js +23 -23
- package/emotion/es/mixins/addScrollbar.js +6 -0
- package/emotion/es/mixins/index.js +0 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +1 -8
- package/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.css +11 -11
- package/es/components/Chip/Chip.css +7 -7
- package/es/components/Chip/Chip.js +6 -4
- package/es/components/Chip/Chip.js.map +1 -1
- package/es/components/Chip/Chip.styles.js +1 -1
- package/es/components/Chip/Chip.styles.js.map +1 -1
- package/es/components/Chip/{Chip.styles_fnd4j5.css → Chip.styles_d9y94l.css} +1 -1
- package/es/components/Chip/Chip.tokens.js +1 -0
- package/es/components/Chip/Chip.tokens.js.map +1 -1
- package/es/components/Chip/variations/_disabled/base.js +1 -1
- package/es/components/Chip/variations/_disabled/base.js.map +1 -1
- package/{cjs/components/Chip/variations/_disabled/base_rmcs0j.css → es/components/Chip/variations/_disabled/base_1j4s925.css} +1 -1
- package/es/components/Chip/variations/_readonly/base.js +1 -1
- package/es/components/Chip/variations/_readonly/base.js.map +1 -1
- package/{cjs/components/Chip/variations/_readonly/base_1nfit77.css → es/components/Chip/variations/_readonly/base_1xublmy.css} +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +12 -12
- package/es/components/Combobox/ComboboxNew/Combobox.js +6 -3
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/{cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles_1c4vtoy.css → es/components/Combobox/ComboboxNew/ui/Target/Target.styles_ycaw31.css} +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +7 -7
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.css +7 -7
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.css +7 -7
- package/es/components/DatePicker/RangeDate/RangeDate.css +11 -11
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +11 -11
- package/es/components/DatePicker/SingleDate/SingleDate.css +11 -11
- package/es/components/Drawer/Drawer.js +1 -4
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Modal/Modal.css +2 -2
- package/es/components/Modal/Modal.js +5 -4
- package/es/components/Modal/Modal.js.map +1 -1
- package/es/components/Pagination/Pagination.css +15 -15
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +15 -15
- package/es/components/Popup/Popup.styles.js +2 -3
- package/es/components/Popup/Popup.styles.js.map +1 -1
- package/es/components/Range/Range.css +11 -11
- package/es/components/Select/Select.css +15 -15
- package/es/components/Select/Select.js +2 -2
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.tokens.js +2 -0
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +15 -15
- package/es/components/Select/ui/Target/Target.js +2 -1
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +15 -15
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +4 -2
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +13 -13
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1mikp58.css → Textfield.styles_19e9015.css} +1 -1
- package/es/components/Slider/Slider.css +11 -11
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +11 -11
- package/es/components/Table/Table.css +15 -15
- package/es/components/Table/ui/Cell/Cell.css +15 -15
- package/es/components/Table/ui/EditableCell/EditableCell.css +15 -15
- package/es/components/Table/ui/HeadCell/HeadCell.css +15 -15
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +15 -15
- package/es/components/TextField/TextField.js +8 -4
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.tokens.js +2 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/hooks/useKeyNavigation.js +15 -6
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +9 -9
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/{TextFieldChip.styles_14q069b.css → TextFieldChip.styles_8puilg.css} +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +11 -11
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +26 -12
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +33 -2
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/{TextFieldChipNew.styles_y9tozi.css → TextFieldChipNew.styles_1hj7e4k.css} +1 -1
- package/es/components/TimePicker/TimePicker.css +11 -11
- package/es/components/Tree/utils/traverseTree.js +1 -1
- package/es/components/Tree/utils/traverseTree.js.map +1 -1
- package/es/index.css +16 -16
- package/es/index.js +0 -1
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Chip/Chip.js +9 -5
- package/styled-components/cjs/components/Chip/Chip.styles.js +7 -6
- package/styled-components/cjs/components/Chip/Chip.tokens.js +1 -0
- package/styled-components/cjs/components/Chip/variations/_disabled/base.js +6 -2
- package/styled-components/cjs/components/Chip/variations/_readonly/base.js +6 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +6 -2
- package/styled-components/cjs/components/Drawer/Drawer.js +1 -3
- package/styled-components/cjs/components/Modal/Modal.js +7 -6
- package/styled-components/cjs/components/Popup/Popup.styles.js +7 -7
- package/styled-components/cjs/components/ProgressBarCircular/ProgressBarCircular.js +182 -0
- package/styled-components/cjs/components/ProgressBarCircular/ProgressBarCircular.styles.js +32 -0
- package/styled-components/cjs/components/ProgressBarCircular/ProgressBarCircular.tokens.js +39 -0
- package/styled-components/cjs/components/ProgressBarCircular/ProgressBarCircular.types.js +4 -0
- package/styled-components/cjs/components/ProgressBarCircular/index.js +23 -0
- package/styled-components/cjs/components/ProgressBarCircular/variations/_size/base.js +14 -0
- package/styled-components/cjs/components/ProgressBarCircular/variations/_view/base.js +14 -0
- package/styled-components/cjs/components/Scrollbar/Scrollbar.js +423 -0
- package/styled-components/cjs/components/Scrollbar/Scrollbar.styles.js +121 -0
- package/styled-components/cjs/components/Scrollbar/Scrollbar.tokens.js +39 -0
- package/styled-components/cjs/components/Scrollbar/Scrollbar.types.js +4 -0
- package/styled-components/cjs/components/Scrollbar/index.js +26 -0
- package/styled-components/cjs/components/Scrollbar/utils.js +87 -0
- package/styled-components/cjs/components/Scrollbar/variations/_size/base.js +14 -0
- package/styled-components/cjs/components/Scrollbar/variations/_view/base.js +14 -0
- package/styled-components/cjs/components/Select/Select.js +3 -2
- package/styled-components/cjs/components/Select/Select.tokens.js +2 -0
- package/styled-components/cjs/components/Select/ui/Target/Target.js +2 -1
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +11 -5
- package/styled-components/cjs/components/TextField/TextField.js +9 -4
- package/styled-components/cjs/components/TextField/TextField.tokens.js +2 -0
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +11 -4
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +5 -3
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +74 -10
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +28 -5
- package/styled-components/cjs/components/Tree/utils/traverseTree.js +1 -1
- package/styled-components/cjs/components/_Icon/index.js +4 -0
- package/styled-components/cjs/examples/components/Chip/Chip.config.js +24 -12
- package/styled-components/cjs/examples/components/Combobox/Combobox.config.js +12 -4
- package/styled-components/cjs/examples/components/Combobox/Combobox.js +0 -15
- package/styled-components/cjs/examples/components/ProgressBarCircular/ProgressBarCircular.config.js +138 -0
- package/styled-components/cjs/examples/components/ProgressBarCircular/ProgressBarCircular.js +15 -0
- package/styled-components/cjs/examples/components/Scrollbar/Scrollbar.config.js +93 -0
- package/styled-components/cjs/examples/components/Scrollbar/Scrollbar.js +15 -0
- package/styled-components/cjs/examples/components/Select/Select.config.js +10 -4
- package/styled-components/cjs/examples/components/TextField/TextField.config.js +18 -6
- package/styled-components/cjs/mixins/addScrollbar.js +24 -0
- package/styled-components/cjs/mixins/index.js +0 -1
- package/styled-components/es/components/Chip/Chip.js +9 -5
- package/styled-components/es/components/Chip/Chip.styles.js +7 -6
- package/styled-components/es/components/Chip/Chip.tokens.js +1 -0
- package/styled-components/es/components/Chip/variations/_disabled/base.js +6 -2
- package/styled-components/es/components/Chip/variations/_readonly/base.js +6 -2
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +5 -3
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +2 -0
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +6 -2
- package/styled-components/es/components/Drawer/Drawer.js +1 -3
- package/styled-components/es/components/Modal/Modal.js +6 -5
- package/styled-components/es/components/Popup/Popup.styles.js +7 -7
- package/styled-components/es/components/ProgressBarCircular/ProgressBarCircular.js +123 -0
- package/styled-components/es/components/ProgressBarCircular/ProgressBarCircular.styles.js +22 -0
- package/styled-components/es/components/ProgressBarCircular/ProgressBarCircular.tokens.js +21 -0
- package/styled-components/es/components/ProgressBarCircular/ProgressBarCircular.types.js +1 -0
- package/styled-components/es/components/ProgressBarCircular/index.js +2 -0
- package/styled-components/es/components/ProgressBarCircular/variations/_size/base.js +4 -0
- package/styled-components/es/components/ProgressBarCircular/variations/_view/base.js +4 -0
- package/styled-components/es/components/Scrollbar/Scrollbar.js +359 -0
- package/styled-components/es/components/Scrollbar/Scrollbar.styles.js +51 -0
- package/styled-components/es/components/Scrollbar/Scrollbar.tokens.js +21 -0
- package/styled-components/es/components/Scrollbar/Scrollbar.types.js +1 -0
- package/styled-components/es/components/Scrollbar/index.js +2 -0
- package/styled-components/es/components/Scrollbar/utils.js +69 -0
- package/styled-components/es/components/Scrollbar/variations/_size/base.js +4 -0
- package/styled-components/es/components/Scrollbar/variations/_view/base.js +4 -0
- package/styled-components/es/components/Select/Select.js +3 -2
- package/styled-components/es/components/Select/Select.tokens.js +2 -0
- package/styled-components/es/components/Select/ui/Target/Target.js +2 -1
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +11 -5
- package/styled-components/es/components/TextField/TextField.js +9 -4
- package/styled-components/es/components/TextField/TextField.tokens.js +2 -0
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +11 -4
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +5 -3
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +74 -10
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +28 -5
- package/styled-components/es/components/Tree/utils/traverseTree.js +1 -1
- package/styled-components/es/components/_Icon/index.js +1 -0
- package/styled-components/es/examples/components/Chip/Chip.config.js +24 -12
- package/styled-components/es/examples/components/Combobox/Combobox.config.js +12 -4
- package/styled-components/es/examples/components/ProgressBarCircular/ProgressBarCircular.config.js +128 -0
- package/styled-components/es/examples/components/ProgressBarCircular/ProgressBarCircular.js +5 -0
- package/styled-components/es/examples/components/Scrollbar/Scrollbar.config.js +83 -0
- package/styled-components/es/examples/components/Scrollbar/Scrollbar.js +5 -0
- package/styled-components/es/examples/components/Select/Select.config.js +10 -4
- package/styled-components/es/examples/components/TextField/TextField.config.js +18 -6
- package/styled-components/es/mixins/addScrollbar.js +6 -0
- package/styled-components/es/mixins/index.js +0 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +8 -8
- package/types/components/Chip/Chip.d.ts.map +1 -1
- package/types/components/Chip/Chip.styles.d.ts.map +1 -1
- package/types/components/Chip/Chip.tokens.d.ts +1 -0
- package/types/components/Chip/Chip.tokens.d.ts.map +1 -1
- package/types/components/Chip/Chip.types.d.ts +1 -1
- package/types/components/Chip/variations/_disabled/base.d.ts.map +1 -1
- package/types/components/Chip/variations/_readonly/base.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts +2 -2
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +2 -0
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +9 -0
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +8 -8
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts +6 -6
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +8 -8
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Modal/Modal.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +12 -6
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Popup/Popup.types.d.ts +1 -8
- package/types/components/Popup/Popup.types.d.ts.map +1 -1
- package/types/components/ProgressBarCircular/ProgressBarCircular.d.ts +23 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.styles.d.ts +2 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.styles.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.tokens.d.ts +22 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.tokens.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.types.d.ts +31 -0
- package/types/components/ProgressBarCircular/ProgressBarCircular.types.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/index.d.ts +4 -0
- package/types/components/ProgressBarCircular/index.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/variations/_size/base.d.ts +2 -0
- package/types/components/ProgressBarCircular/variations/_size/base.d.ts.map +1 -0
- package/types/components/ProgressBarCircular/variations/_view/base.d.ts +2 -0
- package/types/components/ProgressBarCircular/variations/_view/base.d.ts.map +1 -0
- package/types/components/Radiobox/Radiobox.d.ts +2 -2
- package/types/components/Range/Range.styles.d.ts +8 -8
- package/types/components/Scrollbar/Scrollbar.d.ts +23 -0
- package/types/components/Scrollbar/Scrollbar.d.ts.map +1 -0
- package/types/components/Scrollbar/Scrollbar.styles.d.ts +7 -0
- package/types/components/Scrollbar/Scrollbar.styles.d.ts.map +1 -0
- package/types/components/Scrollbar/Scrollbar.tokens.d.ts +22 -0
- package/types/components/Scrollbar/Scrollbar.tokens.d.ts.map +1 -0
- package/types/components/Scrollbar/Scrollbar.types.d.ts +52 -0
- package/types/components/Scrollbar/Scrollbar.types.d.ts.map +1 -0
- package/types/components/Scrollbar/index.d.ts +4 -0
- package/types/components/Scrollbar/index.d.ts.map +1 -0
- package/types/components/Scrollbar/utils.d.ts +7 -0
- package/types/components/Scrollbar/utils.d.ts.map +1 -0
- package/types/components/Scrollbar/variations/_size/base.d.ts +2 -0
- package/types/components/Scrollbar/variations/_size/base.d.ts.map +1 -0
- package/types/components/Scrollbar/variations/_view/base.d.ts +2 -0
- package/types/components/Scrollbar/variations/_view/base.d.ts.map +1 -0
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +2 -0
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +7 -0
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +2 -1
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +3 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +8 -8
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/getView.d.ts +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +8 -8
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts +12 -6
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +2 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/hooks/useKeyNavigation.d.ts +11 -2
- package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +2 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +3 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -1
- package/types/components/TimePicker/TimePicker.styles.d.ts +8 -8
- package/types/components/Tree/utils/traverseTree.d.ts.map +1 -1
- package/types/components/_Icon/index.d.ts +1 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/components/Autocomplete/Autocomplete.d.ts +8 -8
- package/types/examples/components/Chip/Chip.config.d.ts.map +1 -1
- package/types/examples/components/Combobox/Combobox.config.d.ts.map +1 -1
- package/types/examples/components/Combobox/Combobox.d.ts +24 -0
- package/types/examples/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/components/Combobox/Legacy/Combobox.d.ts +2 -2
- package/types/examples/components/DatePicker/DatePicker.d.ts +3 -3
- package/types/examples/components/Mask/Mask.d.ts +8 -8
- package/types/examples/components/NumberFormat/NumberFormat.d.ts +8 -8
- package/types/examples/components/NumberInput/NumberInput.d.ts +2 -2
- package/types/examples/components/ProgressBarCircular/ProgressBarCircular.config.d.ts +25 -0
- package/types/examples/components/ProgressBarCircular/ProgressBarCircular.config.d.ts.map +1 -0
- package/types/examples/components/ProgressBarCircular/ProgressBarCircular.d.ts +19 -0
- package/types/examples/components/ProgressBarCircular/ProgressBarCircular.d.ts.map +1 -0
- package/types/examples/components/Radiobox/Radiobox.d.ts +2 -2
- package/types/examples/components/Scrollbar/Scrollbar.config.d.ts +21 -0
- package/types/examples/components/Scrollbar/Scrollbar.config.d.ts.map +1 -0
- package/types/examples/components/Scrollbar/Scrollbar.d.ts +15 -0
- package/types/examples/components/Scrollbar/Scrollbar.d.ts.map +1 -0
- package/types/examples/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/components/Select/Select.d.ts +12 -6
- package/types/examples/components/Select/Select.d.ts.map +1 -1
- package/types/examples/components/TextArea/TextArea.d.ts +8 -8
- package/types/examples/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/components/TextField/TextField.d.ts +8 -8
- package/types/examples/components/Tokens/Colors/Colors.styles.d.ts +1 -1
- package/types/examples/components/Tokens/Typography/Typography.styles.d.ts +1 -1
- package/types/mixins/addScrollbar.d.ts +3 -0
- package/types/mixins/addScrollbar.d.ts.map +1 -0
- package/types/mixins/index.d.ts +0 -1
- package/types/mixins/index.d.ts.map +1 -1
- package/types/types/InputHTMLAttributes.d.ts +9 -3
- package/types/types/InputHTMLAttributes.d.ts.map +1 -1
- package/types/types/TextareaHTMLAttributes.d.ts +9 -3
- package/types/types/TextareaHTMLAttributes.d.ts.map +1 -1
- package/cjs/mixins/applyDisabled.js +0 -22
- package/cjs/mixins/applyDisabled.js.map +0 -1
- package/emotion/cjs/mixins/applyDisabled.js +0 -47
- package/emotion/es/mixins/applyDisabled.js +0 -39
- package/es/mixins/applyDisabled.js +0 -18
- package/es/mixins/applyDisabled.js.map +0 -1
- package/styled-components/cjs/mixins/applyDisabled.js +0 -23
- package/styled-components/es/mixins/applyDisabled.js +0 -15
- package/types/mixins/applyDisabled.d.ts +0 -14
- package/types/mixins/applyDisabled.d.ts.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import { classes, tokens } from "./ProgressBarCircular.tokens";
|
|
3
|
+
export var base = css([
|
|
4
|
+
"position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(",
|
|
5
|
+
");height:var(",
|
|
6
|
+
");.",
|
|
7
|
+
"{width:100%;height:100%;}.",
|
|
8
|
+
"{fill:none;stroke:var(",
|
|
9
|
+
");stroke-width:var(",
|
|
10
|
+
");}.",
|
|
11
|
+
"{fill:none;stroke:var(",
|
|
12
|
+
");stroke-width:var(",
|
|
13
|
+
");stroke-linecap:round;transition:stroke-dashoffset 0.3s ease-in-out;}.",
|
|
14
|
+
"{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(",
|
|
15
|
+
");font-family:var(",
|
|
16
|
+
");font-size:var(",
|
|
17
|
+
");font-style:var(",
|
|
18
|
+
");font-weight:var(",
|
|
19
|
+
");letter-spacing:var(",
|
|
20
|
+
");line-height:var(",
|
|
21
|
+
");display:flex;align-items:center;justify-content:center;}"
|
|
22
|
+
], tokens.width, tokens.height, classes.svg, classes.backgroundCircle, tokens.backgroundStroke, tokens.backgroundStrokeWidth, classes.progressCircle, tokens.progressStroke, tokens.progressStrokeWidth, classes.content, tokens.contentColor, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export var classes = {
|
|
2
|
+
svg: '--plasma-progressbar-circular-svg',
|
|
3
|
+
backgroundCircle: '--plasma-progressbar-circular-background-circle',
|
|
4
|
+
progressCircle: '--plasma-progressbar-circular-progress-circle',
|
|
5
|
+
content: '--plasma-progressbar-circular-content'
|
|
6
|
+
};
|
|
7
|
+
export var tokens = {
|
|
8
|
+
width: '--plasma-progressbar-circular-width',
|
|
9
|
+
height: '--plasma-progressbar-circular-height',
|
|
10
|
+
backgroundStroke: '--plasma-progressbar-circular-background-stroke',
|
|
11
|
+
backgroundStrokeWidth: '--plasma-progressbar-circular-background-stroke-width',
|
|
12
|
+
progressStroke: '--plasma-progressbar-circular-progress-stroke',
|
|
13
|
+
progressStrokeWidth: '--plasma-progressbar-circular-progress-stroke-width',
|
|
14
|
+
contentColor: '--plasma-progressbar-circular-content-color',
|
|
15
|
+
contentFontFamily: '--plasma-progressbar-circular-content-font-family',
|
|
16
|
+
contentFontSize: '--plasma-progressbar-circular-content-font-size',
|
|
17
|
+
contentFontStyle: '--plasma-progressbar-circular-content-font-style',
|
|
18
|
+
contentFontWeight: '--plasma-progressbar-circular-content-font-weight',
|
|
19
|
+
contentLetterSpacing: '--plasma-progressbar-circular-content-letter-spacing',
|
|
20
|
+
contentLineHeight: '--plasma-progressbar-circular-content-line-height'
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/* eslint-disable */ function _array_like_to_array(arr, len) {
|
|
2
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
+
return arr2;
|
|
5
|
+
}
|
|
6
|
+
function _array_with_holes(arr) {
|
|
7
|
+
if (Array.isArray(arr)) return arr;
|
|
8
|
+
}
|
|
9
|
+
function _define_property(obj, key, value) {
|
|
10
|
+
if (key in obj) {
|
|
11
|
+
Object.defineProperty(obj, key, {
|
|
12
|
+
value: value,
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
obj[key] = value;
|
|
19
|
+
}
|
|
20
|
+
return obj;
|
|
21
|
+
}
|
|
22
|
+
function _iterable_to_array_limit(arr, i) {
|
|
23
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
24
|
+
if (_i == null) return;
|
|
25
|
+
var _arr = [];
|
|
26
|
+
var _n = true;
|
|
27
|
+
var _d = false;
|
|
28
|
+
var _s, _e;
|
|
29
|
+
try {
|
|
30
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
31
|
+
_arr.push(_s.value);
|
|
32
|
+
if (i && _arr.length === i) break;
|
|
33
|
+
}
|
|
34
|
+
} catch (err) {
|
|
35
|
+
_d = true;
|
|
36
|
+
_e = err;
|
|
37
|
+
} finally{
|
|
38
|
+
try {
|
|
39
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
40
|
+
} finally{
|
|
41
|
+
if (_d) throw _e;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return _arr;
|
|
45
|
+
}
|
|
46
|
+
function _non_iterable_rest() {
|
|
47
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
|
+
}
|
|
49
|
+
function _object_spread(target) {
|
|
50
|
+
for(var i = 1; i < arguments.length; i++){
|
|
51
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
52
|
+
var ownKeys = Object.keys(source);
|
|
53
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
54
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
55
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
ownKeys.forEach(function(key) {
|
|
59
|
+
_define_property(target, key, source[key]);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return target;
|
|
63
|
+
}
|
|
64
|
+
function ownKeys(object, enumerableOnly) {
|
|
65
|
+
var keys = Object.keys(object);
|
|
66
|
+
if (Object.getOwnPropertySymbols) {
|
|
67
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
68
|
+
if (enumerableOnly) {
|
|
69
|
+
symbols = symbols.filter(function(sym) {
|
|
70
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
keys.push.apply(keys, symbols);
|
|
74
|
+
}
|
|
75
|
+
return keys;
|
|
76
|
+
}
|
|
77
|
+
function _object_spread_props(target, source) {
|
|
78
|
+
source = source != null ? source : {};
|
|
79
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
80
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
81
|
+
} else {
|
|
82
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
83
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return target;
|
|
87
|
+
}
|
|
88
|
+
function _object_without_properties(source, excluded) {
|
|
89
|
+
if (source == null) return {};
|
|
90
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
91
|
+
var key, i;
|
|
92
|
+
if (Object.getOwnPropertySymbols) {
|
|
93
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
94
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
95
|
+
key = sourceSymbolKeys[i];
|
|
96
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
97
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
|
+
target[key] = source[key];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return target;
|
|
102
|
+
}
|
|
103
|
+
function _object_without_properties_loose(source, excluded) {
|
|
104
|
+
if (source == null) return {};
|
|
105
|
+
var target = {};
|
|
106
|
+
var sourceKeys = Object.keys(source);
|
|
107
|
+
var key, i;
|
|
108
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
109
|
+
key = sourceKeys[i];
|
|
110
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
111
|
+
target[key] = source[key];
|
|
112
|
+
}
|
|
113
|
+
return target;
|
|
114
|
+
}
|
|
115
|
+
function _sliced_to_array(arr, i) {
|
|
116
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
117
|
+
}
|
|
118
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
119
|
+
if (!o) return;
|
|
120
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
121
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
122
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
123
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
124
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
125
|
+
}
|
|
126
|
+
import React, { forwardRef, useRef, useState, useEffect } from "react";
|
|
127
|
+
import cls from "classnames";
|
|
128
|
+
import { base as sizeCSS } from "./variations/_size/base";
|
|
129
|
+
import { base as viewCSS } from "./variations/_view/base";
|
|
130
|
+
import { base, StyledScrollBar, StyledContainer, StyledContent, StyledTrack, StyledThumb } from "./Scrollbar.styles";
|
|
131
|
+
import { classes } from "./Scrollbar.tokens";
|
|
132
|
+
import { parseOffset, calculateScrollbar } from "./utils";
|
|
133
|
+
var MIN_SCROLLBAR_TRACK_HEIGHT = 20;
|
|
134
|
+
export var scrollbarRoot = function(Root) {
|
|
135
|
+
return /*#__PURE__*/ forwardRef(function(_param, ref) {
|
|
136
|
+
var className = _param.className, _param_view = _param.view, view = _param_view === void 0 ? 'default' : _param_view, _param_size = _param.size, size = _param_size === void 0 ? 'm' : _param_size, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_offset = _param.offset, offset = _param_offset === void 0 ? '4px' : _param_offset, _param_autoHide = _param.autoHide, autoHide = _param_autoHide === void 0 ? true : _param_autoHide, _param_autoHideDelay = _param.autoHideDelay, autoHideDelay = _param_autoHideDelay === void 0 ? 2000 : _param_autoHideDelay, style = _param.style, children = _param.children, rest = _object_without_properties(_param, [
|
|
137
|
+
"className",
|
|
138
|
+
"view",
|
|
139
|
+
"size",
|
|
140
|
+
"placement",
|
|
141
|
+
"offset",
|
|
142
|
+
"autoHide",
|
|
143
|
+
"autoHideDelay",
|
|
144
|
+
"style",
|
|
145
|
+
"children"
|
|
146
|
+
]);
|
|
147
|
+
var containerRef = useRef(null);
|
|
148
|
+
var contentRef = useRef(null);
|
|
149
|
+
var trackRef = useRef(null);
|
|
150
|
+
var thumbRef = useRef(null);
|
|
151
|
+
var hideTimeoutRef = useRef(null);
|
|
152
|
+
var isInitializedRef = useRef(false);
|
|
153
|
+
var _useState = _sliced_to_array(useState({
|
|
154
|
+
isVisible: false,
|
|
155
|
+
thumbHeight: 0,
|
|
156
|
+
thumbPosition: 0,
|
|
157
|
+
isDragging: false
|
|
158
|
+
}), 2), scrollbarState = _useState[0], setScrollbarState = _useState[1];
|
|
159
|
+
var parsedOffset = parseOffset(offset);
|
|
160
|
+
var updateScrollbar = function() {
|
|
161
|
+
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
162
|
+
var container = containerRef.current;
|
|
163
|
+
if (!container) return;
|
|
164
|
+
var _calculateScrollbar = calculateScrollbar(container, parsedOffset, MIN_SCROLLBAR_TRACK_HEIGHT), thumbHeight = _calculateScrollbar.thumbHeight, thumbPosition = _calculateScrollbar.thumbPosition;
|
|
165
|
+
setScrollbarState(function(prevState) {
|
|
166
|
+
if (prevState.thumbHeight === thumbHeight && prevState.thumbPosition === thumbPosition && prevState.isVisible === (show || prevState.isVisible)) {
|
|
167
|
+
return prevState;
|
|
168
|
+
}
|
|
169
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
170
|
+
thumbHeight: thumbHeight,
|
|
171
|
+
thumbPosition: thumbPosition,
|
|
172
|
+
isVisible: show || prevState.isVisible
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
var clearHideTimeout = function() {
|
|
177
|
+
if (hideTimeoutRef.current) {
|
|
178
|
+
clearTimeout(hideTimeoutRef.current);
|
|
179
|
+
hideTimeoutRef.current = null;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
var showScrollbarWithDelay = function() {
|
|
183
|
+
clearHideTimeout();
|
|
184
|
+
updateScrollbar(true);
|
|
185
|
+
if (autoHide) {
|
|
186
|
+
hideTimeoutRef.current = window.setTimeout(function() {
|
|
187
|
+
setScrollbarState(function(prevState) {
|
|
188
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
189
|
+
isVisible: false
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
}, autoHideDelay);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
var handleScroll = function() {
|
|
196
|
+
showScrollbarWithDelay();
|
|
197
|
+
updateScrollbar();
|
|
198
|
+
};
|
|
199
|
+
var handleMouseEnter = function() {
|
|
200
|
+
showScrollbarWithDelay();
|
|
201
|
+
};
|
|
202
|
+
var handleScrollbarDrag = function(e) {
|
|
203
|
+
e.preventDefault();
|
|
204
|
+
e.stopPropagation();
|
|
205
|
+
var thumb = e.currentTarget;
|
|
206
|
+
var track = thumb.parentElement;
|
|
207
|
+
var container = containerRef.current;
|
|
208
|
+
if (!container || !track) return;
|
|
209
|
+
clearHideTimeout();
|
|
210
|
+
var startY = e.clientY;
|
|
211
|
+
var startThumbPosition = parseFloat(thumb.style.top || '0');
|
|
212
|
+
var trackRect = track.getBoundingClientRect();
|
|
213
|
+
var trackHeight = trackRect.height;
|
|
214
|
+
var thumbHeight = thumb.offsetHeight;
|
|
215
|
+
var scrollHeight = container.scrollHeight, clientHeight = container.clientHeight;
|
|
216
|
+
var maxScroll = scrollHeight - clientHeight;
|
|
217
|
+
var handleMouseMove = function(moveEvent) {
|
|
218
|
+
var deltaY = moveEvent.clientY - startY;
|
|
219
|
+
var newThumbPosition = Math.max(0, Math.min(trackHeight - thumbHeight, startThumbPosition + deltaY));
|
|
220
|
+
var scrollPercentage = newThumbPosition / (trackHeight - thumbHeight);
|
|
221
|
+
var newScrollTop = scrollPercentage * maxScroll;
|
|
222
|
+
container.scrollTop = newScrollTop;
|
|
223
|
+
setScrollbarState(function(prevState) {
|
|
224
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
225
|
+
thumbPosition: newThumbPosition,
|
|
226
|
+
isDragging: true,
|
|
227
|
+
isVisible: true
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
var handleMouseUp = function() {
|
|
232
|
+
document.removeEventListener('mousemove', handleMouseMove);
|
|
233
|
+
document.removeEventListener('mouseup', handleMouseUp);
|
|
234
|
+
setScrollbarState(function(prevState) {
|
|
235
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
236
|
+
isDragging: false
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
showScrollbarWithDelay();
|
|
240
|
+
};
|
|
241
|
+
document.addEventListener('mousemove', handleMouseMove);
|
|
242
|
+
document.addEventListener('mouseup', handleMouseUp);
|
|
243
|
+
};
|
|
244
|
+
var handleTrackClick = function(e) {
|
|
245
|
+
e.preventDefault();
|
|
246
|
+
e.stopPropagation();
|
|
247
|
+
var track = e.currentTarget;
|
|
248
|
+
var container = containerRef.current;
|
|
249
|
+
if (!container || !track) return;
|
|
250
|
+
if (thumbRef.current && thumbRef.current.contains(e.target)) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
clearHideTimeout();
|
|
254
|
+
var trackRect = track.getBoundingClientRect();
|
|
255
|
+
var clickY = e.clientY - trackRect.top;
|
|
256
|
+
var trackHeight = trackRect.height;
|
|
257
|
+
var thumbHeight = scrollbarState.thumbHeight;
|
|
258
|
+
var scrollHeight = container.scrollHeight, clientHeight = container.clientHeight;
|
|
259
|
+
var maxScroll = scrollHeight - clientHeight;
|
|
260
|
+
if (maxScroll <= 0) return;
|
|
261
|
+
var newThumbPosition = clickY - thumbHeight / 2;
|
|
262
|
+
newThumbPosition = Math.max(0, Math.min(trackHeight - thumbHeight, newThumbPosition));
|
|
263
|
+
var scrollPercentage = newThumbPosition / (trackHeight - thumbHeight);
|
|
264
|
+
var newScrollTop = scrollPercentage * maxScroll;
|
|
265
|
+
container.scrollTop = newScrollTop;
|
|
266
|
+
setScrollbarState(function(prevState) {
|
|
267
|
+
return _object_spread_props(_object_spread({}, prevState), {
|
|
268
|
+
thumbPosition: newThumbPosition,
|
|
269
|
+
isVisible: true
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
showScrollbarWithDelay();
|
|
273
|
+
};
|
|
274
|
+
useEffect(function() {
|
|
275
|
+
var container = containerRef.current;
|
|
276
|
+
if (!container) return;
|
|
277
|
+
if (!isInitializedRef.current) {
|
|
278
|
+
updateScrollbar();
|
|
279
|
+
isInitializedRef.current = true;
|
|
280
|
+
}
|
|
281
|
+
container.addEventListener('scroll', handleScroll);
|
|
282
|
+
container.addEventListener('mouseenter', handleMouseEnter);
|
|
283
|
+
var resizeObserver = new ResizeObserver(function() {
|
|
284
|
+
updateScrollbar();
|
|
285
|
+
});
|
|
286
|
+
if (contentRef.current) {
|
|
287
|
+
resizeObserver.observe(contentRef.current);
|
|
288
|
+
}
|
|
289
|
+
return function() {
|
|
290
|
+
container.removeEventListener('scroll', handleScroll);
|
|
291
|
+
container.removeEventListener('mouseenter', handleMouseEnter);
|
|
292
|
+
resizeObserver.disconnect();
|
|
293
|
+
clearHideTimeout();
|
|
294
|
+
};
|
|
295
|
+
}, []);
|
|
296
|
+
useEffect(function() {
|
|
297
|
+
updateScrollbar();
|
|
298
|
+
}, [
|
|
299
|
+
children,
|
|
300
|
+
offset
|
|
301
|
+
]);
|
|
302
|
+
var _obj;
|
|
303
|
+
return /*#__PURE__*/ React.createElement(Root, _object_spread({
|
|
304
|
+
view: view,
|
|
305
|
+
size: size,
|
|
306
|
+
className: cls(classes.scrollBarRoot, className),
|
|
307
|
+
ref: ref
|
|
308
|
+
}, rest), /*#__PURE__*/ React.createElement(StyledScrollBar, {
|
|
309
|
+
className: cls((_obj = {}, _define_property(_obj, classes.scrollBarVisible, scrollbarState.isVisible), _define_property(_obj, classes.scrollBarDragging, scrollbarState.isDragging), _obj)),
|
|
310
|
+
style: _object_spread_props(_object_spread({}, style), {
|
|
311
|
+
'--scrollbar-offset-top': parsedOffset.top,
|
|
312
|
+
'--scrollbar-offset-right': parsedOffset.right,
|
|
313
|
+
'--scrollbar-offset-bottom': parsedOffset.bottom,
|
|
314
|
+
'--scrollbar-offset-left': parsedOffset.left
|
|
315
|
+
}),
|
|
316
|
+
"data-placement": placement,
|
|
317
|
+
"data-size": size,
|
|
318
|
+
"data-view": view
|
|
319
|
+
}, /*#__PURE__*/ React.createElement(StyledContainer, {
|
|
320
|
+
ref: containerRef,
|
|
321
|
+
className: classes.scrollBarContainer,
|
|
322
|
+
"data-placement": placement
|
|
323
|
+
}, /*#__PURE__*/ React.createElement(StyledContent, {
|
|
324
|
+
ref: contentRef,
|
|
325
|
+
className: classes.scrollBarContent
|
|
326
|
+
}, children)), /*#__PURE__*/ React.createElement(StyledTrack, {
|
|
327
|
+
ref: trackRef,
|
|
328
|
+
className: cls(classes.scrollBarTrack, _define_property({}, classes.scrollBarTrackVisible, scrollbarState.isVisible)),
|
|
329
|
+
"data-placement": placement,
|
|
330
|
+
onMouseDown: handleTrackClick
|
|
331
|
+
}, /*#__PURE__*/ React.createElement(StyledThumb, {
|
|
332
|
+
ref: thumbRef,
|
|
333
|
+
className: classes.scrollBarThumb,
|
|
334
|
+
style: {
|
|
335
|
+
height: "".concat(scrollbarState.thumbHeight, "px"),
|
|
336
|
+
top: "".concat(scrollbarState.thumbPosition, "px")
|
|
337
|
+
},
|
|
338
|
+
onMouseDown: handleScrollbarDrag
|
|
339
|
+
}))));
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
export var scrollbarConfig = {
|
|
343
|
+
name: 'Scrollbar',
|
|
344
|
+
tag: 'div',
|
|
345
|
+
layout: scrollbarRoot,
|
|
346
|
+
base: base,
|
|
347
|
+
variations: {
|
|
348
|
+
view: {
|
|
349
|
+
css: viewCSS
|
|
350
|
+
},
|
|
351
|
+
size: {
|
|
352
|
+
css: sizeCSS
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
defaults: {
|
|
356
|
+
size: 'm',
|
|
357
|
+
view: 'default'
|
|
358
|
+
}
|
|
359
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { css } from "styled-components";
|
|
3
|
+
import { tokens, classes } from "./Scrollbar.tokens";
|
|
4
|
+
export var base = css([
|
|
5
|
+
"display:flex;position:relative;width:100%;height:100%;"
|
|
6
|
+
]);
|
|
7
|
+
export var StyledScrollBar = styled.div.withConfig({
|
|
8
|
+
displayName: "Scrollbar.styles__StyledScrollBar",
|
|
9
|
+
componentId: "sc-d13e1ac1-0"
|
|
10
|
+
})([
|
|
11
|
+
"position:relative;width:var(",
|
|
12
|
+
",100%);height:var(",
|
|
13
|
+
",100%);overflow:hidden;&.",
|
|
14
|
+
"{.",
|
|
15
|
+
"{opacity:1;pointer-events:auto;}}&.",
|
|
16
|
+
"{.",
|
|
17
|
+
"{background-color:var(",
|
|
18
|
+
") !important;}}"
|
|
19
|
+
], tokens.width, tokens.height, classes.scrollBarVisible, classes.scrollBarTrack, classes.scrollBarDragging, classes.scrollBarThumb, tokens.thumbColorActive);
|
|
20
|
+
export var StyledContainer = styled.div.withConfig({
|
|
21
|
+
displayName: "Scrollbar.styles__StyledContainer",
|
|
22
|
+
componentId: "sc-d13e1ac1-1"
|
|
23
|
+
})([
|
|
24
|
+
"width:100%;height:100%;overflow:auto;overflow:overlay;scrollbar-width:none;-ms-overflow-style:none;box-sizing:border-box;&::-webkit-scrollbar{display:none;width:0;height:0;}"
|
|
25
|
+
]);
|
|
26
|
+
export var StyledContent = styled.div.withConfig({
|
|
27
|
+
displayName: "Scrollbar.styles__StyledContent",
|
|
28
|
+
componentId: "sc-d13e1ac1-2"
|
|
29
|
+
})([
|
|
30
|
+
"min-height:100%;box-sizing:border-box;width:100%;"
|
|
31
|
+
]);
|
|
32
|
+
export var StyledTrack = styled.div.withConfig({
|
|
33
|
+
displayName: "Scrollbar.styles__StyledTrack",
|
|
34
|
+
componentId: "sc-d13e1ac1-3"
|
|
35
|
+
})([
|
|
36
|
+
"position:absolute;width:var(",
|
|
37
|
+
");opacity:0;transition:opacity 0.3s ease;pointer-events:none;z-index:10;background:var(",
|
|
38
|
+
");border-radius:var(",
|
|
39
|
+
");top:var(--scrollbar-offset-top,0);bottom:var(--scrollbar-offset-bottom,0);&[data-placement='left']{left:var(--scrollbar-offset-left,0);}&[data-placement='right']{right:var(--scrollbar-offset-right,0);}&.",
|
|
40
|
+
"{opacity:1;pointer-events:auto;}"
|
|
41
|
+
], tokens.trackWidth, tokens.trackColor, tokens.trackBorderRadius, classes.scrollBarTrackVisible);
|
|
42
|
+
export var StyledThumb = styled.div.withConfig({
|
|
43
|
+
displayName: "Scrollbar.styles__StyledThumb",
|
|
44
|
+
componentId: "sc-d13e1ac1-4"
|
|
45
|
+
})([
|
|
46
|
+
"position:absolute;left:0;width:100%;background:var(",
|
|
47
|
+
");border-radius:var(",
|
|
48
|
+
");cursor:pointer;transition:background-color 0.2s ease;box-sizing:border-box;&:hover{background:var(",
|
|
49
|
+
");}&:active{background:var(",
|
|
50
|
+
");}"
|
|
51
|
+
], tokens.thumbColor, tokens.thumbBorderRadius, tokens.thumbColorHover, tokens.thumbColorActive);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export var tokens = {
|
|
2
|
+
width: '--scrollbar-width',
|
|
3
|
+
height: '--scrollbar-height',
|
|
4
|
+
trackWidth: '--scrollbar-track-width',
|
|
5
|
+
trackColor: '--scrollbar-track-color',
|
|
6
|
+
trackBorderRadius: '--scrollbar-track-border-radius',
|
|
7
|
+
thumbColor: '--scrollbar-thumb-color',
|
|
8
|
+
thumbColorHover: '--scrollbar-thumb-color-hover',
|
|
9
|
+
thumbColorActive: '--scrollbar-thumb-color-active',
|
|
10
|
+
thumbBorderRadius: '--scrollbar-thumb-border-radius'
|
|
11
|
+
};
|
|
12
|
+
export var classes = {
|
|
13
|
+
scrollBarRoot: 'scrollbar-root',
|
|
14
|
+
scrollBarContainer: 'scrollbar-container',
|
|
15
|
+
scrollBarContent: 'scrollbar-content',
|
|
16
|
+
scrollBarTrack: 'scrollbar-track',
|
|
17
|
+
scrollBarThumb: 'scrollbar-thumb',
|
|
18
|
+
scrollBarVisible: 'scrollbar-visible',
|
|
19
|
+
scrollBarDragging: 'scrollbar-dragging',
|
|
20
|
+
scrollBarTrackVisible: 'scrollbar-track-visible'
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export var parseOffset = function(offset) {
|
|
2
|
+
if (!offset) {
|
|
3
|
+
return {
|
|
4
|
+
top: '0',
|
|
5
|
+
right: '0',
|
|
6
|
+
bottom: '0',
|
|
7
|
+
left: '0'
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
var offsetString = typeof offset === 'number' ? "".concat(offset, "px") : offset;
|
|
11
|
+
var parts = offsetString.split(/\s+/).filter(Boolean);
|
|
12
|
+
switch(parts.length){
|
|
13
|
+
case 1:
|
|
14
|
+
return {
|
|
15
|
+
top: parts[0],
|
|
16
|
+
right: parts[0],
|
|
17
|
+
bottom: parts[0],
|
|
18
|
+
left: parts[0]
|
|
19
|
+
};
|
|
20
|
+
case 2:
|
|
21
|
+
return {
|
|
22
|
+
top: parts[0],
|
|
23
|
+
right: parts[1],
|
|
24
|
+
bottom: parts[0],
|
|
25
|
+
left: parts[1]
|
|
26
|
+
};
|
|
27
|
+
case 3:
|
|
28
|
+
return {
|
|
29
|
+
top: parts[0],
|
|
30
|
+
right: parts[1],
|
|
31
|
+
bottom: parts[2],
|
|
32
|
+
left: parts[1]
|
|
33
|
+
};
|
|
34
|
+
case 4:
|
|
35
|
+
return {
|
|
36
|
+
top: parts[0],
|
|
37
|
+
right: parts[1],
|
|
38
|
+
bottom: parts[2],
|
|
39
|
+
left: parts[3]
|
|
40
|
+
};
|
|
41
|
+
default:
|
|
42
|
+
return {
|
|
43
|
+
top: '0',
|
|
44
|
+
right: '0',
|
|
45
|
+
bottom: '0',
|
|
46
|
+
left: '0'
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export var calculateScrollbar = function(container, parsedOffset) {
|
|
51
|
+
var minScrollbarTrackHeight = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 20;
|
|
52
|
+
if (!container) {
|
|
53
|
+
return {
|
|
54
|
+
thumbHeight: 0,
|
|
55
|
+
thumbPosition: 0
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var scrollTop = container.scrollTop, scrollHeight = container.scrollHeight, clientHeight = container.clientHeight;
|
|
59
|
+
var topOffset = parseFloat(parsedOffset.top) || 0;
|
|
60
|
+
var bottomOffset = parseFloat(parsedOffset.bottom) || 0;
|
|
61
|
+
var trackHeight = clientHeight - topOffset - bottomOffset;
|
|
62
|
+
var thumbHeight = Math.max(trackHeight / scrollHeight * trackHeight, minScrollbarTrackHeight);
|
|
63
|
+
var maxScroll = scrollHeight - clientHeight;
|
|
64
|
+
var thumbPosition = maxScroll > 0 ? scrollTop / maxScroll * (trackHeight - thumbHeight) : 0;
|
|
65
|
+
return {
|
|
66
|
+
thumbHeight: thumbHeight,
|
|
67
|
+
thumbPosition: thumbPosition
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -121,7 +121,7 @@ import { Context } from "./Select.context";
|
|
|
121
121
|
return /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
122
122
|
var _getItemByFocused;
|
|
123
123
|
var // eslint-disable-block @typescript-eslint/ban-ts-comment
|
|
124
|
-
id = props.id, outerValue = props.value, outerOnChange = props.onChange, _props_target = props.target, target = _props_target === void 0 ? 'textfield-like' : _props_target, items = props.items, _props_placement = props.placement, placement = _props_placement === void 0 ? 'bottom' : _props_placement, label = props.label, labelPlacement = props.labelPlacement, placeholder = props.placeholder, helperText = props.helperText, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_readOnly = props.readOnly, readOnly = _props_readOnly === void 0 ? false : _props_readOnly, outerView = props.view, size = props.size, listOverflow = props.listOverflow, listHeight = props.listHeight, listMaxHeight = props.listMaxHeight, listWidth = props.listWidth, contentLeft = props.contentLeft, onScrollBottom = props.onScrollBottom, onScroll = props.onScroll, chipView = props.chipView, _props_variant = props.variant, variant = _props_variant === void 0 ? 'normal' : _props_variant, portal = props.portal, renderValue = props.renderValue, renderItem = props.renderItem, status = props.status, onItemSelect = props.onItemSelect, separator = props.separator, outerCloseAfterSelect = props.closeAfterSelect, isTargetAmount = props.isTargetAmount, beforeList = props.beforeList, afterList = props.afterList, zIndex = props.zIndex, name = props.name, defaultValue = props.defaultValue, _props_virtual = props.virtual, virtual = _props_virtual === void 0 ? false : _props_virtual, onToggle = props.onToggle, chipType = props.chipType, multiselect = props.multiselect, _props_mode = props.mode, mode = _props_mode === void 0 ? 'default' : _props_mode, // @ts-ignore
|
|
124
|
+
id = props.id, outerValue = props.value, outerOnChange = props.onChange, _props_target = props.target, target = _props_target === void 0 ? 'textfield-like' : _props_target, items = props.items, _props_placement = props.placement, placement = _props_placement === void 0 ? 'bottom' : _props_placement, label = props.label, labelPlacement = props.labelPlacement, placeholder = props.placeholder, helperText = props.helperText, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, _props_readOnly = props.readOnly, readOnly = _props_readOnly === void 0 ? false : _props_readOnly, outerView = props.view, size = props.size, listOverflow = props.listOverflow, listHeight = props.listHeight, listMaxHeight = props.listMaxHeight, listWidth = props.listWidth, contentLeft = props.contentLeft, onScrollBottom = props.onScrollBottom, onScroll = props.onScroll, chipView = props.chipView, _props_variant = props.variant, variant = _props_variant === void 0 ? 'normal' : _props_variant, portal = props.portal, renderValue = props.renderValue, renderItem = props.renderItem, status = props.status, onItemSelect = props.onItemSelect, separator = props.separator, outerCloseAfterSelect = props.closeAfterSelect, isTargetAmount = props.isTargetAmount, beforeList = props.beforeList, afterList = props.afterList, zIndex = props.zIndex, name = props.name, defaultValue = props.defaultValue, _props_virtual = props.virtual, virtual = _props_virtual === void 0 ? false : _props_virtual, onToggle = props.onToggle, chipType = props.chipType, multiselect = props.multiselect, _props_mode = props.mode, mode = _props_mode === void 0 ? 'default' : _props_mode, chipClickArea = props.chipClickArea, // @ts-ignore
|
|
125
125
|
_offset = props._offset, // Извлекаем пропсы для required и hint, чтобы они не попадали в DOM.
|
|
126
126
|
// @ts-ignore
|
|
127
127
|
required = props.required, // @ts-ignore
|
|
@@ -178,6 +178,7 @@ import { Context } from "./Select.context";
|
|
|
178
178
|
"chipType",
|
|
179
179
|
"multiselect",
|
|
180
180
|
"mode",
|
|
181
|
+
"chipClickArea",
|
|
181
182
|
"_offset",
|
|
182
183
|
"required",
|
|
183
184
|
"requiredPlacement",
|
|
@@ -402,7 +403,7 @@ import { Context } from "./Select.context";
|
|
|
402
403
|
// В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.
|
|
403
404
|
// Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.
|
|
404
405
|
useLayoutEffect(function() {
|
|
405
|
-
var checkedCopy = new Map(
|
|
406
|
+
var checkedCopy = new Map(valueToCheckedMap);
|
|
406
407
|
checkedCopy.forEach(function(_, key) {
|
|
407
408
|
checkedCopy.set(key, false);
|
|
408
409
|
});
|
|
@@ -195,6 +195,8 @@ export var tokens = {
|
|
|
195
195
|
textFieldChipBackgroundActive: '--plasma-select-textfield-chip-background-active',
|
|
196
196
|
textFieldChipColorActive: '--plasma-select-textfield-chip-color-active',
|
|
197
197
|
textFieldChipCloseIconColor: '--plasma-select-textfield-chip-close-icons-color',
|
|
198
|
+
textFieldChipCloseIconColorHover: '--plasma-select-textfield-chip-close-icons-color-hover',
|
|
199
|
+
textFieldChipCloseIconColorReadonly: '--plasma-select-textfield-chip-close-icons-color-readonly',
|
|
198
200
|
textFieldChipOutlineSize: '--plasma-select-textfield-chip-outline-size',
|
|
199
201
|
textFieldChipWidth: '--plasma-select-textfield-chip-width',
|
|
200
202
|
textFieldChipPadding: '--plasma-select-textfield-chip-padding',
|
|
@@ -50,6 +50,7 @@ export var Target = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
50
50
|
chipView: chipView,
|
|
51
51
|
requiredProps: requiredProps,
|
|
52
52
|
hintProps: hintProps,
|
|
53
|
-
chipType: selectProps.chipType
|
|
53
|
+
chipType: selectProps.chipType,
|
|
54
|
+
chipClickArea: selectProps.chipClickArea
|
|
54
55
|
});
|
|
55
56
|
});
|
|
@@ -62,7 +62,7 @@ import { sizeToIconSize, getItemId } from "../../../../utils";
|
|
|
62
62
|
import { classes } from "../../../../Select.tokens";
|
|
63
63
|
import { IconArrowWrapper, StyledArrow, StyledTextField, StyledLeftHelper } from "./Textfield.styles";
|
|
64
64
|
export var Textfield = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
65
|
-
var inputWrapperRef = param.inputWrapperRef, opened = param.opened, multiselect = param.multiselect, value = param.value, label = param.label, labelPlacement = param.labelPlacement, keepPlaceholder = param.keepPlaceholder, placeholder = param.placeholder, onKeyDown = param.onKeyDown, size = param.size, view = param.view, contentLeft = param.contentLeft, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, disabled = param.disabled, readOnly = param.readOnly, isTargetAmount = param.isTargetAmount, valueToItemMap = param.valueToItemMap, renderValue = param.renderValue, onChange = param.onChange, chipView = param.chipView, requiredProps = param.requiredProps, chipType = param.chipType, hintProps = param.hintProps;
|
|
65
|
+
var inputWrapperRef = param.inputWrapperRef, opened = param.opened, multiselect = param.multiselect, value = param.value, label = param.label, labelPlacement = param.labelPlacement, keepPlaceholder = param.keepPlaceholder, placeholder = param.placeholder, onKeyDown = param.onKeyDown, size = param.size, view = param.view, contentLeft = param.contentLeft, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, disabled = param.disabled, readOnly = param.readOnly, isTargetAmount = param.isTargetAmount, valueToItemMap = param.valueToItemMap, renderValue = param.renderValue, onChange = param.onChange, chipView = param.chipView, requiredProps = param.requiredProps, chipType = param.chipType, hintProps = param.hintProps, chipClickArea = param.chipClickArea;
|
|
66
66
|
var withArrowInverse = opened ? classes.arrowInverse : undefined;
|
|
67
67
|
var getValue = function() {
|
|
68
68
|
var _valueToItemMap_get;
|
|
@@ -159,7 +159,8 @@ export var Textfield = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
159
159
|
}, multiselect ? {
|
|
160
160
|
enumerationType: 'chip',
|
|
161
161
|
_chips: getChips(),
|
|
162
|
-
|
|
162
|
+
_onChipCloseClick: handleChipClick,
|
|
163
|
+
_chipClickArea: chipClickArea,
|
|
163
164
|
chipType: chipType,
|
|
164
165
|
chipView: chipView
|
|
165
166
|
} : {
|