@salutejs/plasma-new-hope 0.191.2-canary.1557.11803291365.0 → 0.192.0-canary.1550.11799501370.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +21 -22
- package/cjs/components/Breadcrumbs/Breadcrumbs.css +3 -3
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
- package/cjs/components/Breadcrumbs/utils/index.css +3 -3
- package/cjs/components/Cell/Cell.js +3 -1
- package/cjs/components/Cell/Cell.js.map +1 -1
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
- package/cjs/components/Chip/Chip.js +3 -1
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +21 -22
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
- package/cjs/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +21 -22
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +21 -22
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +21 -22
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +21 -22
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +21 -22
- package/cjs/components/Dropdown/FloatingPopover.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +86 -37
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +86 -37
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +3 -0
- package/cjs/components/Range/Range.css +21 -22
- package/cjs/components/Select/FloatingPopover.js +87 -0
- package/cjs/components/Select/FloatingPopover.js.map +1 -0
- package/cjs/components/Select/Select.css +83 -34
- package/cjs/components/Select/Select.js +179 -139
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +17 -50
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/Select.styles_1p5c9p3.css +2 -0
- package/cjs/components/Select/Select.tokens.js +122 -78
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -72
- package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +4 -1
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +83 -34
- package/cjs/components/Select/ui/Inner/Inner.js +9 -9
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +83 -34
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +20 -12
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +34 -51
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_1x4bzlm.css +9 -0
- package/cjs/components/Select/ui/Target/Target.css +58 -17
- package/cjs/components/Select/ui/Target/Target.js +34 -16
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.css +5 -5
- package/cjs/components/Select/ui/Target/ui/Button/Button.js +10 -14
- package/cjs/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +5 -0
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +53 -38
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +84 -97
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +38 -103
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +3 -0
- package/cjs/components/Select/utils/getFallbackPlacements.js +15 -0
- package/cjs/components/Select/utils/getFallbackPlacements.js.map +1 -0
- package/cjs/components/Select/utils/getItemId.js +10 -0
- package/cjs/components/Select/utils/getItemId.js.map +1 -0
- package/cjs/components/Select/utils/getPlacement.js +13 -0
- package/cjs/components/Select/utils/getPlacement.js.map +1 -0
- package/cjs/components/Select/utils/getView.js +2 -2
- package/cjs/components/Select/utils/getView.js.map +1 -1
- package/cjs/components/Slider/Slider.css +21 -22
- package/cjs/components/Slider/components/Double/Double.css +21 -22
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +21 -22
- package/cjs/components/Switch/Switch.css +7 -11
- package/cjs/components/Switch/Switch.js +7 -16
- package/cjs/components/Switch/Switch.js.map +1 -1
- package/cjs/components/Switch/Switch.styles.js +4 -16
- package/cjs/components/Switch/Switch.styles.js.map +1 -1
- package/cjs/components/Switch/Switch.styles_1kk0qzz.css +4 -0
- package/cjs/components/Switch/Switch.tokens.js +0 -11
- package/cjs/components/Switch/Switch.tokens.js.map +1 -1
- package/cjs/components/Switch/_focused/base.js +1 -1
- package/cjs/components/Switch/_focused/{base_sz3n0x.css → base_j4murk.css} +1 -1
- package/cjs/components/Switch/_size/base.js +1 -1
- package/cjs/components/Switch/_size/base.js.map +1 -1
- package/cjs/components/Switch/_size/base_1rjzpi4.css +1 -0
- package/cjs/components/Switch/_view/base.js +1 -1
- package/cjs/components/Switch/_view/base.js.map +1 -1
- package/cjs/components/Switch/_view/base_1mtyz12.css +1 -0
- package/cjs/components/TextField/TextField.js +11 -2
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +14 -22
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/{es/components/TextField/TextField.styles_grgg7q.css → cjs/components/TextField/TextField.styles_j7dqpn.css} +6 -7
- package/cjs/components/TextField/TextField.tokens.js +2 -1
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.css +20 -21
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/cjs/components/TextField/variations/_clear/base.js +1 -1
- package/cjs/components/TextField/variations/_clear/{base_1i91sjp.css → base_1396md2.css} +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
- package/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/cjs/components/TextField/variations/_read-only/{base_17ypmu7.css → base_1jvcf9a.css} +1 -1
- package/cjs/components/TextField/variations/_size/base.js +1 -1
- package/cjs/components/TextField/variations/_size/{base_1xdmaqh.css → base_1tei47x.css} +1 -1
- package/cjs/components/TextField/variations/_view/base.js +1 -1
- package/cjs/components/TextField/variations/_view/{base_qhyte8.css → base_8ogww5.css} +1 -1
- package/cjs/index.css +56 -75
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/cjs/utils/fixedForwardRef.js +12 -0
- package/cjs/utils/fixedForwardRef.js.map +1 -0
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
- package/emotion/cjs/components/Cell/Cell.js +3 -1
- package/emotion/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/emotion/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/emotion/cjs/components/Chip/Chip.js +3 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +19 -5
- package/emotion/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/emotion/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
- package/emotion/cjs/components/Select/FloatingPopover.js +91 -0
- package/emotion/cjs/components/Select/Select.js +177 -136
- package/emotion/cjs/components/Select/Select.styles.js +13 -31
- package/emotion/cjs/components/Select/Select.tokens.js +125 -60
- package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -73
- package/emotion/cjs/components/Select/hooks/usePathMaps.js +4 -1
- package/emotion/cjs/components/Select/reducers/index.js +0 -11
- package/emotion/cjs/components/Select/ui/Inner/Inner.js +9 -9
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +19 -12
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +27 -50
- package/emotion/cjs/components/Select/ui/Target/Target.js +38 -18
- package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.js +13 -16
- package/emotion/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +88 -99
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +27 -74
- package/emotion/cjs/components/Select/utils/getFallbackPlacements.js +14 -0
- package/emotion/cjs/components/Select/utils/getItemId.js +9 -0
- package/emotion/cjs/components/Select/utils/getPlacement.js +12 -0
- package/emotion/cjs/components/Select/utils/getView.js +2 -2
- package/emotion/cjs/components/Select/utils/index.js +22 -1
- package/emotion/cjs/components/Switch/Switch.js +8 -17
- package/emotion/cjs/components/Switch/Switch.styles.js +5 -21
- package/emotion/cjs/components/Switch/Switch.template-doc.mdx +1 -37
- package/emotion/cjs/components/Switch/Switch.tokens.js +0 -11
- package/emotion/cjs/components/Switch/_size/base.js +1 -1
- package/emotion/cjs/components/Switch/_view/base.js +1 -1
- package/emotion/cjs/components/TextField/TextField.js +12 -3
- package/emotion/cjs/components/TextField/TextField.styles.js +36 -40
- package/emotion/cjs/components/TextField/TextField.tokens.js +2 -1
- package/emotion/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/Select/Select.config.js +28 -20
- package/emotion/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +4 -11
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -7
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/emotion/cjs/examples/plasma_web/components/Select/Select.config.js +28 -20
- package/emotion/cjs/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +4 -11
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -14
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/emotion/cjs/index.js +11 -0
- package/emotion/cjs/types/DistributiveOmit.js +5 -0
- package/emotion/cjs/types/DistributivePick.js +5 -0
- package/emotion/cjs/utils/fixedForwardRef.js +11 -0
- package/emotion/cjs/utils/index.js +9 -1
- package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
- package/emotion/es/components/Cell/Cell.js +3 -1
- package/emotion/es/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/emotion/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/emotion/es/components/Chip/Chip.js +3 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/emotion/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
- package/emotion/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/emotion/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +3 -3
- package/emotion/es/components/Select/FloatingPopover.js +84 -0
- package/emotion/es/components/Select/Select.js +182 -141
- package/emotion/es/components/Select/Select.styles.js +12 -30
- package/emotion/es/components/Select/Select.tokens.js +125 -60
- package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +18 -72
- package/emotion/es/components/Select/hooks/usePathMaps.js +4 -1
- package/emotion/es/components/Select/reducers/index.js +1 -2
- package/emotion/es/components/Select/ui/Inner/Inner.js +10 -10
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +22 -15
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.styles.js +26 -49
- package/emotion/es/components/Select/ui/Target/Target.js +35 -17
- package/emotion/es/components/Select/ui/Target/ui/Button/Button.js +11 -16
- package/emotion/es/components/Select/ui/Target/ui/Button/Button.styles.js +6 -6
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +27 -74
- package/emotion/es/components/Select/utils/getFallbackPlacements.js +8 -0
- package/emotion/es/components/Select/utils/getItemId.js +3 -0
- package/emotion/es/components/Select/utils/getPlacement.js +6 -0
- package/emotion/es/components/Select/utils/getView.js +2 -2
- package/emotion/es/components/Select/utils/index.js +4 -1
- package/emotion/es/components/Switch/Switch.js +4 -13
- package/emotion/es/components/Switch/Switch.styles.js +4 -20
- package/emotion/es/components/Switch/Switch.template-doc.mdx +1 -37
- package/emotion/es/components/Switch/Switch.tokens.js +0 -11
- package/emotion/es/components/Switch/_size/base.js +2 -2
- package/emotion/es/components/Switch/_view/base.js +2 -2
- package/emotion/es/components/TextField/TextField.js +12 -3
- package/emotion/es/components/TextField/TextField.styles.js +36 -40
- package/emotion/es/components/TextField/TextField.tokens.js +2 -1
- package/emotion/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/es/examples/plasma_b2c/components/Select/Select.config.js +29 -21
- package/emotion/es/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +4 -11
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -7
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/emotion/es/examples/plasma_web/components/Select/Select.config.js +29 -21
- package/emotion/es/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
- package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +4 -11
- package/emotion/es/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -14
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/emotion/es/index.js +1 -0
- package/emotion/es/types/DistributiveOmit.js +1 -0
- package/emotion/es/types/DistributivePick.js +1 -0
- package/emotion/es/utils/fixedForwardRef.js +4 -0
- package/emotion/es/utils/index.js +2 -1
- package/es/components/Autocomplete/Autocomplete.css +21 -22
- package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
- package/es/components/Breadcrumbs/utils/index.css +3 -3
- package/es/components/Cell/Cell.js +3 -1
- package/es/components/Cell/Cell.js.map +1 -1
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
- package/es/components/Chip/Chip.js +3 -1
- package/es/components/Chip/Chip.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +21 -22
- package/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/es/components/Combobox/ComboboxNew/Combobox.tokens.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
- package/es/components/Combobox/ComboboxNew/FloatingPopover.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +21 -22
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +21 -22
- package/es/components/DatePicker/RangeDate/RangeDate.css +21 -22
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +21 -22
- package/es/components/DatePicker/SingleDate/SingleDate.css +21 -22
- package/es/components/Dropdown/FloatingPopover.js.map +1 -1
- package/es/components/Pagination/Pagination.css +86 -37
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +86 -37
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_10zfeps.css +3 -0
- package/es/components/Range/Range.css +21 -22
- package/es/components/Select/FloatingPopover.js +83 -0
- package/es/components/Select/FloatingPopover.js.map +1 -0
- package/es/components/Select/Select.css +83 -34
- package/es/components/Select/Select.js +182 -142
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +18 -48
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/Select.styles_1p5c9p3.css +2 -0
- package/es/components/Select/Select.tokens.js +123 -78
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/hooks/useKeyboardNavigation.js +19 -73
- package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +4 -1
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +83 -34
- package/es/components/Select/ui/Inner/Inner.js +10 -10
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.css +83 -34
- package/es/components/Select/ui/Inner/ui/Item/Item.js +22 -14
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +33 -50
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles_1x4bzlm.css +9 -0
- package/es/components/Select/ui/Target/Target.css +58 -17
- package/es/components/Select/ui/Target/Target.js +35 -17
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.css +5 -5
- package/es/components/Select/ui/Target/ui/Button/Button.js +11 -15
- package/es/components/Select/ui/Target/ui/Button/Button.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.styles_10g64me.css +5 -0
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +53 -38
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +39 -95
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_q4kc1p.css +3 -0
- package/es/components/Select/utils/getFallbackPlacements.js +11 -0
- package/es/components/Select/utils/getFallbackPlacements.js.map +1 -0
- package/es/components/Select/utils/getItemId.js +6 -0
- package/es/components/Select/utils/getItemId.js.map +1 -0
- package/es/components/Select/utils/getPlacement.js +9 -0
- package/es/components/Select/utils/getPlacement.js.map +1 -0
- package/es/components/Select/utils/getView.js +2 -2
- package/es/components/Select/utils/getView.js.map +1 -1
- package/es/components/Slider/Slider.css +21 -22
- package/es/components/Slider/components/Double/Double.css +21 -22
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +21 -22
- package/es/components/Switch/Switch.css +7 -11
- package/es/components/Switch/Switch.js +8 -17
- package/es/components/Switch/Switch.js.map +1 -1
- package/es/components/Switch/Switch.styles.js +5 -15
- package/es/components/Switch/Switch.styles.js.map +1 -1
- package/es/components/Switch/Switch.styles_1kk0qzz.css +4 -0
- package/es/components/Switch/Switch.tokens.js +0 -11
- package/es/components/Switch/Switch.tokens.js.map +1 -1
- package/es/components/Switch/_focused/base.js +1 -1
- package/es/components/Switch/_focused/{base_sz3n0x.css → base_j4murk.css} +1 -1
- package/es/components/Switch/_size/base.js +1 -1
- package/es/components/Switch/_size/base.js.map +1 -1
- package/es/components/Switch/_size/base_1rjzpi4.css +1 -0
- package/es/components/Switch/_view/base.js +1 -1
- package/es/components/Switch/_view/base.js.map +1 -1
- package/es/components/Switch/_view/base_1mtyz12.css +1 -0
- package/es/components/TextField/TextField.js +11 -2
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +14 -22
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/{cjs/components/TextField/TextField.styles_grgg7q.css → es/components/TextField/TextField.styles_j7dqpn.css} +6 -7
- package/es/components/TextField/TextField.tokens.js +2 -1
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.css +20 -21
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/es/components/TextField/variations/_clear/base.js +1 -1
- package/es/components/TextField/variations/_clear/{base_1i91sjp.css → base_1396md2.css} +1 -1
- package/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base_gttvto.css +1 -0
- package/es/components/TextField/variations/_read-only/base.js +1 -1
- package/es/components/TextField/variations/_read-only/{base_17ypmu7.css → base_1jvcf9a.css} +1 -1
- package/es/components/TextField/variations/_size/base.js +1 -1
- package/es/components/TextField/variations/_size/{base_1xdmaqh.css → base_1tei47x.css} +1 -1
- package/es/components/TextField/variations/_view/base.js +1 -1
- package/es/components/TextField/variations/_view/{base_qhyte8.css → base_8ogww5.css} +1 -1
- package/es/index.css +56 -75
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/utils/fixedForwardRef.js +8 -0
- package/es/utils/fixedForwardRef.js.map +1 -0
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
- package/styled-components/cjs/components/Cell/Cell.js +3 -1
- package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/styled-components/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/styled-components/cjs/components/Chip/Chip.js +3 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/FloatingPopover.js +19 -5
- package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/styled-components/cjs/components/Select/FloatingPopover.js +91 -0
- package/styled-components/cjs/components/Select/Select.js +177 -136
- package/styled-components/cjs/components/Select/Select.styles.js +12 -27
- package/styled-components/cjs/components/Select/Select.tokens.js +125 -60
- package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +19 -73
- package/styled-components/cjs/components/Select/hooks/usePathMaps.js +4 -1
- package/styled-components/cjs/components/Select/reducers/index.js +0 -11
- package/styled-components/cjs/components/Select/ui/Inner/Inner.js +9 -9
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +19 -12
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +20 -26
- package/styled-components/cjs/components/Select/ui/Target/Target.js +38 -18
- package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.js +13 -16
- package/styled-components/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +88 -99
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +23 -61
- package/styled-components/cjs/components/Select/utils/getFallbackPlacements.js +14 -0
- package/styled-components/cjs/components/Select/utils/getItemId.js +9 -0
- package/styled-components/cjs/components/Select/utils/getPlacement.js +12 -0
- package/styled-components/cjs/components/Select/utils/getView.js +2 -2
- package/styled-components/cjs/components/Select/utils/index.js +22 -1
- package/styled-components/cjs/components/Switch/Switch.js +8 -17
- package/styled-components/cjs/components/Switch/Switch.styles.js +5 -11
- package/styled-components/cjs/components/Switch/Switch.template-doc.mdx +1 -37
- package/styled-components/cjs/components/Switch/Switch.tokens.js +0 -11
- package/styled-components/cjs/components/Switch/_size/base.js +1 -1
- package/styled-components/cjs/components/Switch/_view/base.js +1 -1
- package/styled-components/cjs/components/TextField/TextField.js +11 -2
- package/styled-components/cjs/components/TextField/TextField.styles.js +12 -15
- package/styled-components/cjs/components/TextField/TextField.tokens.js +2 -1
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.config.js +28 -20
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +2 -9
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -7
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/styled-components/cjs/examples/plasma_web/components/Select/Select.config.js +28 -20
- package/styled-components/cjs/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +2 -9
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -14
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/cjs/types/DistributiveOmit.js +5 -0
- package/styled-components/cjs/types/DistributivePick.js +5 -0
- package/styled-components/cjs/utils/fixedForwardRef.js +11 -0
- package/styled-components/cjs/utils/index.js +9 -1
- package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
- package/styled-components/es/components/Cell/Cell.js +3 -1
- package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.js +7 -1
- package/styled-components/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -1
- package/styled-components/es/components/Chip/Chip.js +3 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +0 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.tokens.js +0 -1
- package/styled-components/es/components/Combobox/ComboboxNew/FloatingPopover.js +18 -4
- package/styled-components/es/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.js +1 -50
- package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/styled-components/es/components/Select/FloatingPopover.js +84 -0
- package/styled-components/es/components/Select/Select.js +182 -141
- package/styled-components/es/components/Select/Select.styles.js +11 -26
- package/styled-components/es/components/Select/Select.tokens.js +125 -60
- package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +18 -72
- package/styled-components/es/components/Select/hooks/usePathMaps.js +4 -1
- package/styled-components/es/components/Select/reducers/index.js +1 -2
- package/styled-components/es/components/Select/ui/Inner/Inner.js +10 -10
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +22 -15
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.styles.js +19 -25
- package/styled-components/es/components/Select/ui/Target/Target.js +35 -17
- package/styled-components/es/components/Select/ui/Target/ui/Button/Button.js +11 -16
- package/styled-components/es/components/Select/ui/Target/ui/Button/Button.styles.js +3 -3
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +86 -99
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +23 -61
- package/styled-components/es/components/Select/utils/getFallbackPlacements.js +8 -0
- package/styled-components/es/components/Select/utils/getItemId.js +3 -0
- package/styled-components/es/components/Select/utils/getPlacement.js +6 -0
- package/styled-components/es/components/Select/utils/getView.js +2 -2
- package/styled-components/es/components/Select/utils/index.js +4 -1
- package/styled-components/es/components/Switch/Switch.js +4 -13
- package/styled-components/es/components/Switch/Switch.styles.js +4 -10
- package/styled-components/es/components/Switch/Switch.template-doc.mdx +1 -37
- package/styled-components/es/components/Switch/Switch.tokens.js +0 -11
- package/styled-components/es/components/Switch/_size/base.js +2 -2
- package/styled-components/es/components/Switch/_view/base.js +2 -2
- package/styled-components/es/components/TextField/TextField.js +11 -2
- package/styled-components/es/components/TextField/TextField.styles.js +12 -15
- package/styled-components/es/components/TextField/TextField.tokens.js +2 -1
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +7 -1
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.config.js +29 -21
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +47 -40
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +2 -9
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +1 -7
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
- package/styled-components/es/examples/plasma_web/components/Select/Select.config.js +29 -21
- package/styled-components/es/examples/plasma_web/components/Select/Select.stories.tsx +47 -40
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +2 -9
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.stories.tsx +1 -14
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
- package/styled-components/es/index.js +1 -0
- package/styled-components/es/types/DistributiveOmit.js +1 -0
- package/styled-components/es/types/DistributivePick.js +1 -0
- package/styled-components/es/utils/fixedForwardRef.js +4 -0
- package/styled-components/es/utils/index.js +2 -1
- package/types/components/Attach/ui/Button/Button.styles.d.ts +2 -2
- package/types/components/Attach/ui/IconButton/IconButton.styles.d.ts +4 -4
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +16 -16
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.d.ts +2 -2
- package/types/components/Cell/Cell.d.ts.map +1 -1
- package/types/components/Cell/ui/CellTextbox/CellTextbox.d.ts.map +1 -1
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.d.ts.map +1 -1
- package/types/components/Chip/Chip.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts +0 -1
- package/types/components/Combobox/ComboboxNew/Combobox.tokens.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/FloatingPopover.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts +1 -3
- package/types/components/Combobox/ComboboxNew/hooks/useKeyboardNavigation.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +16 -16
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +16 -16
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/EmptyState/EmptyState.styles.d.ts +2 -2
- package/types/components/Notification/Notification.styles.d.ts +2 -2
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +2 -2
- package/types/components/Pagination/Pagination.styles.d.ts +4 -4
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +40 -40
- package/types/components/Panel/ui/PanelHeader/PanelHeader.styles.d.ts +2 -2
- package/types/components/Range/Range.styles.d.ts +16 -16
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Select/FloatingPopover.d.ts +5 -0
- package/types/components/Select/FloatingPopover.d.ts.map +1 -0
- package/types/components/Select/Select.d.ts +5 -11
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.styles.d.ts +0 -9
- package/types/components/Select/Select.styles.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +121 -58
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +41 -20
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts +5 -11
- package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
- package/types/components/Select/hooks/usePathMaps.d.ts +2 -1
- package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Select/index.d.ts.map +1 -1
- package/types/components/Select/reducers/index.d.ts +0 -1
- package/types/components/Select/reducers/index.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/Inner.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts +32 -2
- package/types/components/Select/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts +9 -0
- package/types/components/Select/ui/Inner/ui/Item/Item.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +14 -2
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +10 -9
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.styles.d.ts +2 -2
- package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Button/Button.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts +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 +628 -60
- 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 -4
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/getFallbackPlacements.d.ts +4 -0
- package/types/components/Select/utils/getFallbackPlacements.d.ts.map +1 -0
- package/types/components/Select/utils/getItemId.d.ts +2 -0
- package/types/components/Select/utils/getItemId.d.ts.map +1 -0
- package/types/components/Select/utils/getPlacement.d.ts +4 -0
- package/types/components/Select/utils/getPlacement.d.ts.map +1 -0
- package/types/components/Select/utils/getView.d.ts +1 -1
- package/types/components/Select/utils/getView.d.ts.map +1 -1
- package/types/components/Select/utils/index.d.ts +3 -0
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +16 -16
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.d.ts +0 -3
- package/types/components/Switch/Switch.d.ts.map +1 -1
- package/types/components/Switch/Switch.styles.d.ts +0 -2
- package/types/components/Switch/Switch.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.tokens.d.ts +0 -9
- package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
- package/types/components/Switch/Switch.types.d.ts +2 -10
- package/types/components/Switch/Switch.types.d.ts.map +1 -1
- package/types/components/Switch/_size/base.d.ts.map +1 -1
- package/types/components/Switch/_view/base.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +1 -3
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +3 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -1
- package/types/components/Toast/Toast.styles.d.ts +2 -2
- package/types/components/Toast/utils.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Attach/Attach.d.ts +8 -8
- package/types/examples/plasma_b2c/components/Button/Button.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +24 -24
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +16 -16
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Radiobox/Radiobox.d.ts +1 -1
- package/types/examples/plasma_b2c/components/Radiobox/Radiobox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.config.d.ts +15 -7
- package/types/examples/plasma_b2c/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +53 -46
- package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts +0 -7
- package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.d.ts +0 -6
- package/types/examples/plasma_b2c/components/Switch/Switch.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +16 -16
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +16 -16
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Attach/Attach.d.ts +8 -8
- package/types/examples/plasma_web/components/Button/Button.d.ts +2 -2
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +24 -24
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +2 -2
- package/types/examples/plasma_web/components/Mask/Mask.d.ts +16 -16
- package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Radiobox/Radiobox.d.ts +1 -1
- package/types/examples/plasma_web/components/Radiobox/Radiobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.config.d.ts +15 -7
- package/types/examples/plasma_web/components/Select/Select.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.d.ts +53 -46
- package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.config.d.ts +0 -7
- package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.d.ts +0 -6
- package/types/examples/plasma_web/components/Switch/Switch.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +16 -16
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +16 -16
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/types/DistributiveOmit.d.ts +2 -0
- package/types/types/DistributiveOmit.d.ts.map +1 -0
- package/types/types/DistributivePick.d.ts +2 -0
- package/types/types/DistributivePick.d.ts.map +1 -0
- package/types/types/index.d.ts +2 -0
- package/types/types/index.d.ts.map +1 -1
- package/types/utils/fixedForwardRef.d.ts +3 -0
- package/types/utils/fixedForwardRef.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +0 -3
- package/cjs/components/Select/Select.styles_768h42.css +0 -5
- package/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -39
- package/cjs/components/Select/reducers/focusedChipIndexReducer.js.map +0 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +0 -9
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +0 -5
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +0 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +0 -21
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -36
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +0 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -22
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +0 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +0 -1
- package/cjs/components/Select/variations/_size/base.js +0 -9
- package/cjs/components/Select/variations/_size/base.js.map +0 -1
- package/cjs/components/Select/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Select/variations/_view/base.js +0 -9
- package/cjs/components/Select/variations/_view/base.js.map +0 -1
- package/cjs/components/Select/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/Switch/Switch.styles_bei7bh.css +0 -6
- package/cjs/components/Switch/_size/base_1tcl212.css +0 -1
- package/cjs/components/Switch/_toggleSize/base.js +0 -9
- package/cjs/components/Switch/_toggleSize/base.js.map +0 -1
- package/cjs/components/Switch/_toggleSize/base_6i0904.css +0 -1
- package/cjs/components/Switch/_view/base_yxkf3s.css +0 -1
- package/cjs/components/TextField/variations/_label-placement/base_3domm.css +0 -1
- package/emotion/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -38
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -37
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -22
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -16
- package/emotion/cjs/components/Select/variations/_size/base.js +0 -8
- package/emotion/cjs/components/Select/variations/_size/tokens.json +0 -9
- package/emotion/cjs/components/Select/variations/_view/base.js +0 -8
- package/emotion/cjs/components/Select/variations/_view/tokens.json +0 -1
- package/emotion/cjs/components/Switch/_toggleSize/base.js +0 -10
- package/emotion/es/components/Select/reducers/focusedChipIndexReducer.js +0 -32
- package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -28
- package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -15
- package/emotion/es/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -1
- package/emotion/es/components/Select/variations/_size/base.js +0 -2
- package/emotion/es/components/Select/variations/_size/tokens.json +0 -9
- package/emotion/es/components/Select/variations/_view/base.js +0 -2
- package/emotion/es/components/Select/variations/_view/tokens.json +0 -1
- package/emotion/es/components/Switch/_toggleSize/base.js +0 -4
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles_1fesyfv.css +0 -3
- package/es/components/Select/Select.styles_768h42.css +0 -5
- package/es/components/Select/reducers/focusedChipIndexReducer.js +0 -35
- package/es/components/Select/reducers/focusedChipIndexReducer.js.map +0 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles_8oe5oy.css +0 -9
- package/es/components/Select/ui/Target/ui/Button/Button.styles_lxxm4p.css +0 -5
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles_1damf5p.css +0 -12
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.css +0 -21
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -32
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js.map +0 -1
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -18
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +0 -1
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles_1a752pa.css +0 -1
- package/es/components/Select/variations/_size/base.js +0 -5
- package/es/components/Select/variations/_size/base.js.map +0 -1
- package/es/components/Select/variations/_size/base_x642ct.css +0 -1
- package/es/components/Select/variations/_view/base.js +0 -5
- package/es/components/Select/variations/_view/base.js.map +0 -1
- package/es/components/Select/variations/_view/base_x642ct.css +0 -1
- package/es/components/Switch/Switch.styles_bei7bh.css +0 -6
- package/es/components/Switch/_size/base_1tcl212.css +0 -1
- package/es/components/Switch/_toggleSize/base.js +0 -5
- package/es/components/Switch/_toggleSize/base.js.map +0 -1
- package/es/components/Switch/_toggleSize/base_6i0904.css +0 -1
- package/es/components/Switch/_view/base_yxkf3s.css +0 -1
- package/es/components/TextField/variations/_label-placement/base_3domm.css +0 -1
- package/styled-components/cjs/components/Select/reducers/focusedChipIndexReducer.js +0 -38
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -37
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -21
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -16
- package/styled-components/cjs/components/Select/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Select/variations/_size/tokens.json +0 -9
- package/styled-components/cjs/components/Select/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/Select/variations/_view/tokens.json +0 -1
- package/styled-components/cjs/components/Switch/_toggleSize/base.js +0 -10
- package/styled-components/es/components/Select/reducers/focusedChipIndexReducer.js +0 -32
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.js +0 -28
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +0 -14
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/ui/index.js +0 -1
- package/styled-components/es/components/Select/variations/_size/base.js +0 -2
- package/styled-components/es/components/Select/variations/_size/tokens.json +0 -9
- package/styled-components/es/components/Select/variations/_view/base.js +0 -2
- package/styled-components/es/components/Select/variations/_view/tokens.json +0 -1
- package/styled-components/es/components/Switch/_toggleSize/base.js +0 -4
- package/types/components/Select/reducers/focusedChipIndexReducer.d.ts +0 -11
- package/types/components/Select/reducers/focusedChipIndexReducer.d.ts.map +0 -1
- package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts +0 -9
- package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.d.ts.map +0 -1
- package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts +0 -3
- package/types/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.d.ts.map +0 -1
- package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts +0 -2
- package/types/components/Select/ui/Target/ui/Textfield/ui/index.d.ts.map +0 -1
- package/types/components/Select/variations/_size/base.d.ts +0 -2
- package/types/components/Select/variations/_size/base.d.ts.map +0 -1
- package/types/components/Select/variations/_view/base.d.ts +0 -2
- package/types/components/Select/variations/_view/base.d.ts.map +0 -1
- package/types/components/Switch/_toggleSize/base.d.ts +0 -2
- package/types/components/Switch/_toggleSize/base.d.ts.map +0 -1
@@ -4,27 +4,25 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
6
|
var React = require('react');
|
7
|
+
var plasmaCore = require('@salutejs/plasma-core');
|
7
8
|
var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
|
8
9
|
var usePathMaps = require('./hooks/usePathMaps.js');
|
9
10
|
var Select_styles = require('./Select.styles.js');
|
10
|
-
var
|
11
|
-
var base$1 = require('./variations/_size/base.js');
|
11
|
+
var FloatingPopover = require('./FloatingPopover.js');
|
12
12
|
var initialItemsTransform = require('./utils/initialItemsTransform.js');
|
13
13
|
var getInitialValue = require('./utils/getInitialValue.js');
|
14
14
|
var pathReducer = require('./reducers/pathReducer.js');
|
15
15
|
var focusedPathReducer = require('./reducers/focusedPathReducer.js');
|
16
|
-
var focusedChipIndexReducer = require('./reducers/focusedChipIndexReducer.js');
|
17
16
|
var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
18
17
|
var isEmpty = require('../../utils/isEmpty.js');
|
19
18
|
var updateDescendants = require('./utils/updateDescendants.js');
|
20
19
|
var updateAncestors = require('./utils/updateAncestors.js');
|
21
20
|
var updateSingleAncestors = require('./utils/updateSingleAncestors.js');
|
22
|
-
var getView = require('./utils/getView.js');
|
23
|
-
var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
|
24
21
|
var Target = require('./ui/Target/Target.js');
|
25
22
|
var Inner = require('./ui/Inner/Inner.js');
|
23
|
+
var getView = require('./utils/getView.js');
|
26
24
|
|
27
|
-
var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect"];
|
25
|
+
var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect", "isTargetAmount"];
|
28
26
|
var Context = /*#__PURE__*/React.createContext({});
|
29
27
|
|
30
28
|
/**
|
@@ -32,21 +30,21 @@ var Context = /*#__PURE__*/React.createContext({});
|
|
32
30
|
*/
|
33
31
|
var selectRoot = function selectRoot(Root) {
|
34
32
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
33
|
+
var _getItemByFocused;
|
35
34
|
var outerValue = props.value,
|
36
35
|
outerOnChange = props.onChange,
|
37
36
|
_props$target = props.target,
|
38
|
-
|
37
|
+
_target = _props$target === void 0 ? 'textfield-like' : _props$target,
|
39
38
|
items = props.items,
|
40
39
|
_props$placement = props.placement,
|
41
40
|
placement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
42
41
|
label = props.label,
|
43
|
-
|
44
|
-
labelPlacement = _props$labelPlacement === void 0 ? 'outer' : _props$labelPlacement,
|
42
|
+
labelPlacement = props.labelPlacement,
|
45
43
|
placeholder = props.placeholder,
|
46
44
|
helperText = props.helperText,
|
47
45
|
_props$disabled = props.disabled,
|
48
46
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
49
|
-
|
47
|
+
outerView = props.view,
|
50
48
|
size = props.size,
|
51
49
|
listOverflow = props.listOverflow,
|
52
50
|
listHeight = props.listHeight,
|
@@ -61,23 +59,30 @@ var selectRoot = function selectRoot(Root) {
|
|
61
59
|
renderItem = props.renderItem,
|
62
60
|
status = props.status,
|
63
61
|
onItemSelect = props.onItemSelect,
|
62
|
+
separator = props.separator,
|
64
63
|
outerCloseAfterSelect = props.closeAfterSelect,
|
64
|
+
isTargetAmount = props.isTargetAmount,
|
65
65
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
66
66
|
var transformedItems = React.useMemo(function () {
|
67
67
|
return initialItemsTransform.initialItemsTransform(items || []);
|
68
68
|
}, [items]);
|
69
|
+
|
70
|
+
// Создаем структуры для быстрой работы с деревом
|
69
71
|
var _usePathMaps = usePathMaps.usePathMaps(transformedItems),
|
70
|
-
_usePathMaps2 = _rollupPluginBabelHelpers.slicedToArray(_usePathMaps,
|
72
|
+
_usePathMaps2 = _rollupPluginBabelHelpers.slicedToArray(_usePathMaps, 5),
|
71
73
|
pathMap = _usePathMaps2[0],
|
72
74
|
focusedToValueMap = _usePathMaps2[1],
|
73
75
|
valueToCheckedMap = _usePathMaps2[2],
|
74
|
-
valueToItemMap = _usePathMaps2[3]
|
75
|
-
|
76
|
-
var
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
76
|
+
valueToItemMap = _usePathMaps2[3],
|
77
|
+
labelToItemMap = _usePathMaps2[4];
|
78
|
+
var _useState = React.useState(props.multiselect ? [] : ''),
|
79
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
80
|
+
internalValue = _useState2[0],
|
81
|
+
setInternalValue = _useState2[1];
|
82
|
+
var value = outerValue !== null && outerValue !== undefined ? getInitialValue.getInitialValue(outerValue, valueToItemMap) : internalValue;
|
83
|
+
var floatingPopoverRef = React.useRef(null);
|
84
|
+
|
85
|
+
// Состояния дерева элементов
|
81
86
|
var _useReducer = React.useReducer(pathReducer.pathReducer, []),
|
82
87
|
_useReducer2 = _rollupPluginBabelHelpers.slicedToArray(_useReducer, 2),
|
83
88
|
path = _useReducer2[0],
|
@@ -86,23 +91,53 @@ var selectRoot = function selectRoot(Root) {
|
|
86
91
|
_useReducer4 = _rollupPluginBabelHelpers.slicedToArray(_useReducer3, 2),
|
87
92
|
focusedPath = _useReducer4[0],
|
88
93
|
dispatchFocusedPath = _useReducer4[1];
|
89
|
-
var
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
var
|
94
|
-
|
95
|
-
checked = _useState2[0],
|
96
|
-
setChecked = _useState2[1];
|
94
|
+
var _useState3 = React.useState(valueToCheckedMap),
|
95
|
+
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
96
|
+
checked = _useState4[0],
|
97
|
+
setChecked = _useState4[1];
|
98
|
+
var isCurrentListOpen = Boolean(path[0]);
|
99
|
+
var activeDescendantItemValue = ((_getItemByFocused = useKeyboardNavigation.getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value.toString()) || '';
|
97
100
|
var closeAfterSelect = outerCloseAfterSelect !== null && outerCloseAfterSelect !== void 0 ? outerCloseAfterSelect : !props.multiselect;
|
101
|
+
var treeId = plasmaCore.safeUseId();
|
102
|
+
var view = _target === 'textfield-like' && disabled ? 'default' : getView.getView(status, outerView);
|
98
103
|
var targetRef = useOutsideClick.useOutsideClick(function () {
|
99
|
-
if (
|
100
|
-
|
104
|
+
if (!isCurrentListOpen) {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
dispatchPath({
|
108
|
+
type: 'reset'
|
109
|
+
});
|
110
|
+
dispatchFocusedPath({
|
111
|
+
type: 'reset'
|
112
|
+
});
|
113
|
+
}, floatingPopoverRef);
|
114
|
+
var onChange = function onChange(newValue) {
|
115
|
+
if (outerOnChange) {
|
116
|
+
outerOnChange(newValue);
|
117
|
+
}
|
118
|
+
setInternalValue(newValue);
|
119
|
+
};
|
120
|
+
var handleClickArrow = function handleClickArrow() {
|
121
|
+
if (disabled) {
|
122
|
+
return;
|
123
|
+
}
|
124
|
+
if (isCurrentListOpen) {
|
125
|
+
dispatchPath({
|
101
126
|
type: 'reset'
|
102
127
|
});
|
128
|
+
} else {
|
129
|
+
dispatchPath({
|
130
|
+
type: 'opened_first_level'
|
131
|
+
});
|
132
|
+
}
|
133
|
+
dispatchFocusedPath({
|
134
|
+
type: 'reset'
|
135
|
+
});
|
136
|
+
};
|
137
|
+
var handleListToggle = function handleListToggle(opened) {
|
138
|
+
if (disabled) {
|
139
|
+
return;
|
103
140
|
}
|
104
|
-
});
|
105
|
-
var handleToggle = function handleToggle(opened) {
|
106
141
|
if (opened) {
|
107
142
|
dispatchPath({
|
108
143
|
type: 'opened_first_level'
|
@@ -114,39 +149,37 @@ var selectRoot = function selectRoot(Root) {
|
|
114
149
|
dispatchPath({
|
115
150
|
type: 'reset'
|
116
151
|
});
|
117
|
-
dispatchFocusedChipIndex({
|
118
|
-
type: 'reset'
|
119
|
-
});
|
120
152
|
}
|
121
153
|
};
|
122
154
|
var handleCheckboxChange = function handleCheckboxChange(item) {
|
123
|
-
if (props.multiselect) {
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
155
|
+
if (!props.multiselect) {
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
var checkedCopy = new Map(checked);
|
159
|
+
if (!checkedCopy.get(item.value)) {
|
160
|
+
checkedCopy.set(item.value, true);
|
161
|
+
updateDescendants.updateDescendants(item, checkedCopy, true);
|
162
|
+
} else {
|
163
|
+
checkedCopy.set(item.value, false);
|
164
|
+
updateDescendants.updateDescendants(item, checkedCopy, false);
|
165
|
+
}
|
166
|
+
updateAncestors.updateAncestors(item, checkedCopy);
|
167
|
+
var newValues = [];
|
168
|
+
valueToItemMap.forEach(function (item, key) {
|
169
|
+
if (checkedCopy.get(key)) {
|
170
|
+
newValues.push(item.value);
|
131
171
|
}
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
newValues.push(item.value);
|
137
|
-
}
|
172
|
+
});
|
173
|
+
if (closeAfterSelect) {
|
174
|
+
dispatchPath({
|
175
|
+
type: 'reset'
|
138
176
|
});
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
});
|
146
|
-
}
|
147
|
-
if (onChange) {
|
148
|
-
onChange(newValues);
|
149
|
-
}
|
177
|
+
dispatchFocusedPath({
|
178
|
+
type: 'reset'
|
179
|
+
});
|
180
|
+
}
|
181
|
+
if (onChange) {
|
182
|
+
onChange(newValues);
|
150
183
|
}
|
151
184
|
};
|
152
185
|
var handleItemClick = function handleItemClick(item, e) {
|
@@ -155,29 +188,26 @@ var selectRoot = function selectRoot(Root) {
|
|
155
188
|
}
|
156
189
|
if (props.multiselect) {
|
157
190
|
handleCheckboxChange(item);
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
}
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
191
|
+
return;
|
192
|
+
}
|
193
|
+
if (e) {
|
194
|
+
e.stopPropagation();
|
195
|
+
}
|
196
|
+
var isCurrentChecked = checked.get(item.value);
|
197
|
+
if (closeAfterSelect) {
|
198
|
+
dispatchPath({
|
199
|
+
type: 'reset'
|
200
|
+
});
|
201
|
+
dispatchFocusedPath({
|
202
|
+
type: 'reset'
|
203
|
+
});
|
204
|
+
}
|
205
|
+
if (onChange) {
|
206
|
+
onChange(isCurrentChecked ? '' : item.value);
|
207
|
+
}
|
208
|
+
if (onItemSelect) {
|
209
|
+
onItemSelect(item, e);
|
177
210
|
}
|
178
|
-
};
|
179
|
-
var handleChipClick = function handleChipClick(currentValue) {
|
180
|
-
handleCheckboxChange(valueToItemMap.get(currentValue));
|
181
211
|
};
|
182
212
|
var handlePressDown = function handlePressDown(item, e) {
|
183
213
|
if (isEmpty.isEmpty(item.items)) {
|
@@ -194,25 +224,19 @@ var selectRoot = function selectRoot(Root) {
|
|
194
224
|
}
|
195
225
|
};
|
196
226
|
var _useKeyNavigation = useKeyboardNavigation.useKeyNavigation({
|
197
|
-
value: value,
|
198
227
|
focusedPath: focusedPath,
|
199
228
|
dispatchFocusedPath: dispatchFocusedPath,
|
200
229
|
path: path,
|
201
230
|
dispatchPath: dispatchPath,
|
202
231
|
pathMap: pathMap,
|
203
232
|
focusedToValueMap: focusedToValueMap,
|
204
|
-
|
205
|
-
handlePressDown: handlePressDown
|
206
|
-
focusedChipIndex: focusedChipIndex,
|
207
|
-
dispatchFocusedChipIndex: dispatchFocusedChipIndex,
|
208
|
-
valueToItemMap: valueToItemMap,
|
209
|
-
multiselect: props.multiselect,
|
210
|
-
isTargetAmount: props.isTargetAmount
|
233
|
+
handleListToggle: handleListToggle,
|
234
|
+
handlePressDown: handlePressDown
|
211
235
|
}),
|
212
236
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
213
|
-
var isCurrentListOpen = Boolean(path[0]);
|
214
237
|
|
215
|
-
// В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.
|
238
|
+
// В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.
|
239
|
+
// Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.
|
216
240
|
React.useLayoutEffect(function () {
|
217
241
|
var checkedCopy = new Map(checked);
|
218
242
|
checkedCopy.forEach(function (_, key) {
|
@@ -231,13 +255,18 @@ var selectRoot = function selectRoot(Root) {
|
|
231
255
|
}
|
232
256
|
}
|
233
257
|
setChecked(checkedCopy);
|
234
|
-
|
258
|
+
|
259
|
+
// В deps мы кладем именно outerValue и internalValue, а не просто value.
|
260
|
+
// Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
|
261
|
+
// А переменную, содержащую сложные типы данных, нельзя помещать в deps.
|
262
|
+
}, [outerValue, internalValue, items]);
|
235
263
|
return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
236
|
-
|
264
|
+
view: view,
|
237
265
|
size: size,
|
238
|
-
|
239
|
-
chipView: chipView
|
240
|
-
|
266
|
+
labelPlacement: labelPlacement,
|
267
|
+
chipView: chipView,
|
268
|
+
disabled: disabled
|
269
|
+
}, rest), /*#__PURE__*/React.createElement(Context.Provider, {
|
241
270
|
value: {
|
242
271
|
focusedPath: focusedPath,
|
243
272
|
checked: checked,
|
@@ -247,46 +276,63 @@ var selectRoot = function selectRoot(Root) {
|
|
247
276
|
handleItemClick: handleItemClick,
|
248
277
|
variant: variant,
|
249
278
|
renderItem: renderItem,
|
250
|
-
valueToItemMap: valueToItemMap
|
279
|
+
valueToItemMap: valueToItemMap,
|
280
|
+
treeId: treeId
|
251
281
|
}
|
252
|
-
}, /*#__PURE__*/React.createElement(
|
253
|
-
ref:
|
282
|
+
}, /*#__PURE__*/React.createElement(FloatingPopover.FloatingPopover, {
|
283
|
+
ref: floatingPopoverRef,
|
254
284
|
opened: isCurrentListOpen,
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
285
|
+
onToggle: function onToggle(opened) {
|
286
|
+
return opened && handleListToggle(true);
|
287
|
+
},
|
288
|
+
placement: placement,
|
289
|
+
portal: portal,
|
290
|
+
listWidth: listWidth,
|
291
|
+
target: function target(referenceRef) {
|
292
|
+
return /*#__PURE__*/React.createElement(Target.Target, {
|
293
|
+
ref: ref,
|
294
|
+
target: _target,
|
295
|
+
value: value,
|
296
|
+
opened: isCurrentListOpen,
|
297
|
+
valueToItemMap: valueToItemMap,
|
298
|
+
label: label,
|
299
|
+
placeholder: placeholder,
|
300
|
+
onKeyDown: onKeyDown,
|
301
|
+
labelPlacement: labelPlacement,
|
302
|
+
size: size,
|
303
|
+
contentLeft: contentLeft,
|
304
|
+
disabled: disabled,
|
305
|
+
renderValue: renderValue,
|
306
|
+
selectProps: props,
|
307
|
+
inputWrapperRef: referenceRef,
|
308
|
+
multiselect: props.multiselect,
|
309
|
+
view: view,
|
310
|
+
handleClickArrow: handleClickArrow,
|
311
|
+
helperText: helperText,
|
312
|
+
treeId: treeId,
|
313
|
+
activeDescendantItemValue: activeDescendantItemValue,
|
314
|
+
isTargetAmount: isTargetAmount,
|
315
|
+
onChange: onChange,
|
316
|
+
labelToItemMap: labelToItemMap,
|
317
|
+
chipView: chipView,
|
318
|
+
separator: separator
|
319
|
+
});
|
320
|
+
}
|
321
|
+
}, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
322
|
+
view: view,
|
323
|
+
size: size,
|
324
|
+
labelPlacement: labelPlacement,
|
325
|
+
chipView: chipView,
|
326
|
+
disabled: disabled
|
283
327
|
}, rest), /*#__PURE__*/React.createElement(Select_styles.Ul, {
|
284
328
|
role: "tree",
|
285
|
-
id: "
|
329
|
+
id: "".concat(treeId, "_tree_level_1"),
|
330
|
+
"aria-multiselectable": Boolean(props.multiselect),
|
286
331
|
listHeight: listHeight,
|
287
332
|
listOverflow: listOverflow,
|
288
333
|
onScroll: handleScroll,
|
289
|
-
listWidth: listWidth
|
334
|
+
listWidth: listWidth,
|
335
|
+
ref: targetRef
|
290
336
|
}, transformedItems.map(function (item, index) {
|
291
337
|
return /*#__PURE__*/React.createElement(Inner.Inner, {
|
292
338
|
key: "".concat(index, "/0"),
|
@@ -297,7 +343,7 @@ var selectRoot = function selectRoot(Root) {
|
|
297
343
|
index: index,
|
298
344
|
listWidth: listWidth
|
299
345
|
});
|
300
|
-
})))))
|
346
|
+
}))))));
|
301
347
|
});
|
302
348
|
};
|
303
349
|
var selectConfig = {
|
@@ -305,18 +351,12 @@ var selectConfig = {
|
|
305
351
|
tag: 'div',
|
306
352
|
layout: selectRoot,
|
307
353
|
base: Select_styles.base,
|
308
|
-
variations: {
|
309
|
-
view: {
|
310
|
-
css: base.base
|
311
|
-
},
|
312
|
-
size: {
|
313
|
-
css: base$1.base
|
314
|
-
}
|
315
|
-
},
|
354
|
+
variations: {},
|
316
355
|
defaults: {
|
317
356
|
view: 'default',
|
318
|
-
|
319
|
-
|
357
|
+
size: 'm',
|
358
|
+
labelPlacement: 'outer',
|
359
|
+
chipView: 'default'
|
320
360
|
}
|
321
361
|
};
|
322
362
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty, getPlacements } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer, focusedChipIndexReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { StyledPopover, Ul, base, OuterLabel, HelperText } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement = 'outer',\n placeholder,\n helperText,\n disabled = false,\n view,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap] = usePathMaps(transformedItems);\n\n const value = getInitialValue(outerValue, valueToItemMap);\n\n const onChange = (e: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(e as any);\n }\n };\n\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [focusedChipIndex, dispatchFocusedChipIndex] = useReducer(focusedChipIndexReducer, null);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n\n const targetRef = useOutsideClick<HTMLDivElement>(() => {\n if (focusedChipIndex != null) {\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n });\n\n const handleToggle = (opened: boolean) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n dispatchFocusedChipIndex({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (props.multiselect) {\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n } else {\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n }\n };\n\n const handleChipClick = (currentValue: string) => {\n handleCheckboxChange(valueToItemMap.get(currentValue)!);\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n value,\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleToggle,\n handlePressDown,\n focusedChipIndex,\n dispatchFocusedChipIndex,\n valueToItemMap,\n multiselect: props.multiselect,\n isTargetAmount: props.isTargetAmount,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n // В данном эффекте мы следим за изменениями value и вносим коррективы в дерево чекбоксов.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [outerValue, items]);\n\n return (\n <Root ref={ref} size={size} view={status ? getView(status) : view} chipView={chipView} {...(rest as any)}>\n {label && labelPlacement === 'outer' && target !== 'button-like' && <OuterLabel>{label}</OuterLabel>}\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n }}\n >\n <StyledPopover\n ref={targetRef}\n opened={isCurrentListOpen}\n placement={getPlacements(placement)}\n usePortal={Boolean(portal)}\n frame={portal}\n onToggle={handleToggle}\n trigger=\"click\"\n target={\n <Target\n opened={isCurrentListOpen}\n value={value}\n valueToItemMap={valueToItemMap}\n focusedPath={focusedPath}\n focusedToValueMap={focusedToValueMap}\n onChipClick={handleChipClick}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n focusedChipIndex={focusedChipIndex}\n labelPlacement={labelPlacement}\n selectProps={props}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n />\n }\n preventOverflow={false}\n closeOnOverlayClick\n listWidth={listWidth}\n >\n {items && (\n <Root size={size} {...(rest as any)}>\n <Ul\n role=\"tree\"\n id=\"tree_level_1\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n )}\n </StyledPopover>\n </Context.Provider>\n\n {helperText && target === 'textfield-like' && <HelperText>{helperText}</HelperText>}\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n chipView: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","_props$labelPlacement","labelPlacement","placeholder","helperText","_props$disabled","disabled","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","getInitialValue","e","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useReducer5","focusedChipIndexReducer","_useReducer6","focusedChipIndex","dispatchFocusedChipIndex","_useState","useState","_useState2","checked","setChecked","multiselect","targetRef","useOutsideClick","type","handleToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","isEmpty","stopPropagation","isCurrentChecked","handleChipClick","currentValue","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","isTargetAmount","onKeyDown","isCurrentListOpen","Boolean","useLayoutEffect","_","Array","isArray","val","updateSingleAncestors","React","createElement","_extends","getView","OuterLabel","Provider","StyledPopover","getPlacements","usePortal","frame","onToggle","trigger","Target","onChipClick","selectProps","preventOverflow","closeOnOverlayClick","Ul","role","id","onScroll","map","index","Inner","concat","currentLevel","HelperText","selectConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAwBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC7D,IAAA,IACWC,UAAU,GA2BjBF,KAAK,CA3BLG,KAAK,CAAA;MACKC,aAAa,GA0BvBJ,KAAK,CA1BLK,QAAQ,CAAA;MAAAC,aAAA,GA0BRN,KAAK,CAzBLO,MAAM,CAAA;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,aAAA,CAAA;MACzBE,KAAK,GAwBLR,KAAK,CAxBLQ,KAAK,CAAA;MAAAC,gBAAA,GAwBLT,KAAK,CAvBLU,SAAS,CAAA;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,gBAAA,CAAA;MACpBE,KAAK,GAsBLX,KAAK,CAtBLW,KAAK,CAAA;MAAAC,qBAAA,GAsBLZ,KAAK,CArBLa,cAAc,CAAA;AAAdA,MAAAA,cAAc,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,qBAAA,CAAA;MACxBE,WAAW,GAoBXd,KAAK,CApBLc,WAAW,CAAA;MACXC,UAAU,GAmBVf,KAAK,CAnBLe,UAAU,CAAA;MAAAC,eAAA,GAmBVhB,KAAK,CAlBLiB,QAAQ,CAAA;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA,CAAA;MAChBE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,CACD,CACF,CAEC,CACD,CAAC,EAElBP,UAAU,IAAIR,MAAM,KAAK,gBAAgB,iBAAI0G,KAAA,CAAAC,aAAA,CAACyB,wBAAU,EAAE5H,IAAAA,EAAAA,UAAuB,CAChF,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM6H,YAAY,GAAG;AACxBC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElJ,UAAU;AAClBmJ,EAAAA,IAAI,EAAJA,kBAAI;AACJC,EAAAA,UAAU,EAAE;AACR/H,IAAAA,IAAI,EAAE;AACFgI,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDhI,IAAAA,IAAI,EAAE;AACF+H,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNnI,IAAAA,IAAI,EAAE,SAAS;AACfO,IAAAA,QAAQ,EAAE,SAAS;AACnBN,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { isEmpty } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n getView,\n getInitialValue,\n} from './utils';\nimport { Inner, Target } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { usePathMaps } from './hooks/usePathMaps';\nimport { Ul, base } from './Select.styles';\nimport type { ItemContext, MergedSelectProps } from './Select.types';\nimport type { MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список. Поддерживает выбор одного или нескольких значений.\n */\nexport const selectRoot = (Root: RootProps<HTMLButtonElement, Omit<MergedSelectProps, 'items'>>) =>\n forwardRef<HTMLButtonElement, MergedSelectProps>((props, ref) => {\n const {\n value: outerValue,\n onChange: outerOnChange,\n target = 'textfield-like',\n items,\n placement = 'bottom',\n label,\n labelPlacement,\n placeholder,\n helperText,\n disabled = false,\n view: outerView,\n size,\n listOverflow,\n listHeight,\n listWidth,\n contentLeft,\n onScrollBottom,\n chipView,\n variant = 'normal',\n portal,\n renderValue,\n renderItem,\n status,\n onItemSelect,\n separator,\n closeAfterSelect: outerCloseAfterSelect,\n isTargetAmount,\n ...rest\n } = props;\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n // Создаем структуры для быстрой работы с деревом\n const [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, labelToItemMap] = usePathMaps(\n transformedItems,\n );\n\n const [internalValue, setInternalValue] = useState<string | number | Array<string | number>>(\n props.multiselect ? [] : '',\n );\n\n const value =\n outerValue !== null && outerValue !== undefined\n ? getInitialValue(outerValue, valueToItemMap)\n : internalValue;\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value.toString() || '';\n const closeAfterSelect = outerCloseAfterSelect ?? !props.multiselect;\n const treeId = safeUseId();\n const view = target === 'textfield-like' && disabled ? 'default' : getView(status, outerView);\n\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | number | Array<string | number>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n const handleListToggle = (opened: boolean) => {\n if (disabled) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n const handleCheckboxChange = (item: MergedDropdownNodeTransformed) => {\n if (!props.multiselect) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string | number> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n };\n\n const handleItemClick = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (props.multiselect) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const isCurrentChecked = checked.get(item.value);\n\n if (closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n\n if (onItemSelect) {\n onItemSelect(item, e!);\n }\n };\n\n const handlePressDown = (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (props.multiselect) {\n handleCheckboxChange(item);\n }\n };\n\n const handleScroll = (e: React.UIEvent<HTMLUListElement>) => {\n if (!onScrollBottom) return;\n\n const { target } = e;\n\n if (\n (target as HTMLElement).scrollHeight - (target as HTMLElement).scrollTop ===\n (target as HTMLElement).clientHeight\n ) {\n onScrollBottom(e);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value) || typeof value === 'number') {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n\n // В deps мы кладем именно outerValue и internalValue, а не просто value.\n // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.\n // А переменную, содержащую сложные типы данных, нельзя помещать в deps.\n }, [outerValue, internalValue, items]);\n\n return (\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiselect: props.multiselect,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n listWidth={listWidth}\n target={(referenceRef) => (\n <Target\n ref={ref}\n target={target}\n value={value}\n opened={isCurrentListOpen}\n valueToItemMap={valueToItemMap}\n label={label}\n placeholder={placeholder}\n onKeyDown={onKeyDown}\n labelPlacement={labelPlacement}\n size={size}\n contentLeft={contentLeft}\n disabled={disabled}\n renderValue={renderValue}\n selectProps={props}\n inputWrapperRef={referenceRef as React.MutableRefObject<HTMLDivElement>}\n multiselect={props.multiselect}\n view={view}\n handleClickArrow={handleClickArrow}\n helperText={helperText}\n treeId={treeId}\n activeDescendantItemValue={activeDescendantItemValue}\n isTargetAmount={isTargetAmount}\n onChange={onChange}\n labelToItemMap={labelToItemMap}\n chipView={chipView}\n separator={separator}\n />\n )}\n >\n <Root\n view={view}\n size={size}\n labelPlacement={labelPlacement}\n chipView={chipView}\n disabled={disabled}\n {...(rest as any)}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(props.multiselect)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n onScroll={handleScroll}\n listWidth={listWidth}\n ref={targetRef}\n >\n {transformedItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </Root>\n );\n });\n\nexport const selectConfig = {\n name: 'Select',\n tag: 'div',\n layout: selectRoot,\n base,\n variations: {},\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n chipView: 'default',\n },\n};\n"],"names":["Context","createContext","selectRoot","Root","forwardRef","props","ref","_getItemByFocused","outerValue","value","outerOnChange","onChange","_props$target","target","items","_props$placement","placement","label","labelPlacement","placeholder","helperText","_props$disabled","disabled","outerView","view","size","listOverflow","listHeight","listWidth","contentLeft","onScrollBottom","chipView","_props$variant","variant","portal","renderValue","renderItem","status","onItemSelect","separator","outerCloseAfterSelect","closeAfterSelect","isTargetAmount","rest","_objectWithoutProperties","_excluded","transformedItems","useMemo","initialItemsTransform","_usePathMaps","usePathMaps","_usePathMaps2","_slicedToArray","pathMap","focusedToValueMap","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","multiselect","_useState2","internalValue","setInternalValue","undefined","getInitialValue","floatingPopoverRef","useRef","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState3","_useState4","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","toString","treeId","safeUseId","getView","targetRef","useOutsideClick","type","newValue","handleClickArrow","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","get","set","updateDescendants","updateAncestors","newValues","forEach","key","push","handleItemClick","e","isEmpty","stopPropagation","isCurrentChecked","handlePressDown","handleScroll","scrollHeight","scrollTop","clientHeight","_useKeyNavigation","useKeyNavigation","onKeyDown","useLayoutEffect","_","Array","isArray","val","updateSingleAncestors","React","createElement","_extends","Provider","FloatingPopover","onToggle","referenceRef","Target","selectProps","inputWrapperRef","Ul","role","id","concat","onScroll","map","index","Inner","currentLevel","selectConfig","name","tag","layout","base","variations","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAwBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,UAAU,GAAG,SAAbA,UAAUA,CAAIC,IAAoE,EAAA;AAAA,EAAA,oBAC3FC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAC7D,IAAA,IACWC,UAAU,GA4BjBH,KAAK,CA5BLI,KAAK;MACKC,aAAa,GA2BvBL,KAAK,CA3BLM,QAAQ;MAAAC,aAAA,GA2BRP,KAAK,CA1BLQ,MAAM;AAANA,MAAAA,OAAM,GAAAD,aAAA,KAA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