@salutejs/plasma-new-hope 0.336.0-canary.2222.17612018746.0 → 0.336.0-canary.2224.17723650459.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Autocomplete/Autocomplete.css +3 -0
- package/cjs/components/CodeField/CodeField.css +7 -6
- package/cjs/components/CodeField/CodeField.js +63 -27
- package/cjs/components/CodeField/CodeField.js.map +1 -1
- package/cjs/components/CodeField/CodeField.styles.js +7 -1
- package/cjs/components/CodeField/CodeField.styles.js.map +1 -1
- package/cjs/components/CodeField/{CodeField.styles_ebdpd0.css → CodeField.styles_14p25hi.css} +1 -0
- package/cjs/components/CodeField/hooks/useWebOTP.js +95 -0
- package/cjs/components/CodeField/hooks/useWebOTP.js.map +1 -0
- package/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/cjs/components/CodeField/utils/handleCodeError.js.map +1 -1
- package/cjs/components/CodeField/utils/handleItemError.js +14 -4
- package/cjs/components/CodeField/utils/handleItemError.js.map +1 -1
- package/cjs/components/CodeField/utils/isWebOTPSupported.js +10 -0
- package/cjs/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +3 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +54 -56
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +3 -0
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +3 -0
- package/cjs/components/Drawer/Drawer.css +2 -2
- package/cjs/components/Drawer/Drawer.js +7 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +2 -10
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/{es/components/Drawer/Drawer.styles_pltzxq.css → cjs/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +0 -10
- package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +3 -0
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
- package/cjs/components/Popover/Popover.js +4 -1
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Range/Range.css +3 -0
- package/cjs/components/Select/Select.css +3 -0
- package/cjs/components/Select/Select.js +23 -11
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +1 -4
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +3 -0
- package/cjs/components/Select/ui/Target/Target.js +0 -2
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -49
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Slider/Slider.css +3 -0
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
- package/cjs/components/Switch/Switch.css +6 -6
- package/cjs/components/Switch/Switch.js +5 -2
- package/cjs/components/Switch/Switch.js.map +1 -1
- package/cjs/components/Switch/Switch.styles.js +1 -1
- package/cjs/components/Switch/Switch.styles.js.map +1 -1
- package/cjs/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
- package/cjs/components/Switch/Switch.tokens.js +2 -1
- package/cjs/components/Switch/Switch.tokens.js.map +1 -1
- package/cjs/components/Table/Table.css +3 -0
- package/cjs/components/Table/ui/Cell/Cell.css +3 -0
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +3 -0
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +3 -0
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
- package/cjs/components/TextField/TextField.js +19 -3
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +86 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +25 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
- package/cjs/index.css +18 -14
- package/emotion/cjs/components/CodeField/CodeField.js +61 -23
- package/emotion/cjs/components/CodeField/CodeField.styles.js +18 -11
- package/emotion/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
- package/emotion/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/emotion/cjs/components/CodeField/utils/handleItemError.js +12 -3
- package/emotion/cjs/components/CodeField/utils/index.js +4 -0
- package/emotion/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +57 -64
- package/emotion/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/cjs/components/Drawer/Drawer.js +4 -13
- package/emotion/cjs/components/Drawer/Drawer.styles.js +4 -7
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/emotion/cjs/components/Popover/Popover.js +3 -1
- package/emotion/cjs/components/Select/Select.js +26 -9
- package/emotion/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/cjs/components/Select/ui/Target/Target.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/emotion/cjs/components/Select/utils/index.js +0 -4
- package/emotion/cjs/components/Switch/Switch.js +4 -2
- package/emotion/cjs/components/Switch/Switch.styles.js +11 -11
- package/emotion/cjs/components/Switch/Switch.tokens.js +2 -1
- package/emotion/cjs/components/TextField/TextField.js +20 -4
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +49 -0
- package/emotion/cjs/components/TextField/ui/index.js +12 -3
- package/emotion/cjs/examples/components/Range/Range.config.js +8 -7
- package/emotion/es/components/CodeField/CodeField.js +64 -26
- package/emotion/es/components/CodeField/CodeField.styles.js +15 -11
- package/emotion/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/emotion/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/emotion/es/components/CodeField/utils/handleItemError.js +12 -3
- package/emotion/es/components/CodeField/utils/index.js +1 -0
- package/emotion/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +58 -65
- package/emotion/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/es/components/Drawer/Drawer.js +5 -9
- package/emotion/es/components/Drawer/Drawer.styles.js +5 -8
- package/emotion/es/components/Drawer/Drawer.tokens.js +0 -9
- package/emotion/es/components/Popover/Popover.js +4 -2
- package/emotion/es/components/Select/Select.js +26 -9
- package/emotion/es/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/es/components/Select/ui/Target/Target.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/emotion/es/components/Select/utils/index.js +0 -1
- package/emotion/es/components/Switch/Switch.js +4 -2
- package/emotion/es/components/Switch/Switch.styles.js +11 -11
- package/emotion/es/components/Switch/Switch.tokens.js +2 -1
- package/emotion/es/components/TextField/TextField.js +21 -5
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +27 -0
- package/emotion/es/components/TextField/ui/index.js +1 -0
- package/emotion/es/examples/components/Range/Range.config.js +8 -7
- package/es/components/Autocomplete/Autocomplete.css +3 -0
- package/es/components/CodeField/CodeField.css +7 -6
- package/es/components/CodeField/CodeField.js +66 -30
- package/es/components/CodeField/CodeField.js.map +1 -1
- package/es/components/CodeField/CodeField.styles.js +7 -2
- package/es/components/CodeField/CodeField.styles.js.map +1 -1
- package/es/components/CodeField/{CodeField.styles_ebdpd0.css → CodeField.styles_14p25hi.css} +1 -0
- package/es/components/CodeField/hooks/useWebOTP.js +91 -0
- package/es/components/CodeField/hooks/useWebOTP.js.map +1 -0
- package/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/es/components/CodeField/utils/handleCodeError.js.map +1 -1
- package/es/components/CodeField/utils/handleItemError.js +14 -4
- package/es/components/CodeField/utils/handleItemError.js.map +1 -1
- package/es/components/CodeField/utils/isWebOTPSupported.js +6 -0
- package/es/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +3 -0
- package/es/components/Combobox/ComboboxNew/Combobox.js +55 -57
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +3 -0
- package/es/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +3 -0
- package/es/components/Drawer/Drawer.css +2 -2
- package/es/components/Drawer/Drawer.js +6 -8
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +2 -10
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/{cjs/components/Drawer/Drawer.styles_pltzxq.css → es/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/es/components/Drawer/Drawer.tokens.js +1 -10
- package/es/components/Drawer/Drawer.tokens.js.map +1 -1
- package/es/components/Pagination/Pagination.css +3 -0
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
- package/es/components/Popover/Popover.js +4 -1
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Range/Range.css +3 -0
- package/es/components/Select/Select.css +3 -0
- package/es/components/Select/Select.js +23 -11
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +1 -4
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +3 -0
- package/es/components/Select/ui/Target/Target.js +0 -2
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -50
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Slider/Slider.css +3 -0
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
- package/es/components/Switch/Switch.css +6 -6
- package/es/components/Switch/Switch.js +5 -2
- package/es/components/Switch/Switch.js.map +1 -1
- package/es/components/Switch/Switch.styles.js +1 -1
- package/es/components/Switch/Switch.styles.js.map +1 -1
- package/es/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
- package/es/components/Switch/Switch.tokens.js +2 -1
- package/es/components/Switch/Switch.tokens.js.map +1 -1
- package/es/components/Table/Table.css +3 -0
- package/es/components/Table/ui/Cell/Cell.css +3 -0
- package/es/components/Table/ui/EditableCell/EditableCell.css +3 -0
- package/es/components/Table/ui/HeadCell/HeadCell.css +3 -0
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
- package/es/components/TextField/TextField.js +19 -3
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +21 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
- package/es/index.css +18 -14
- package/package.json +2 -2
- package/styled-components/cjs/components/CodeField/CodeField.js +61 -23
- package/styled-components/cjs/components/CodeField/CodeField.styles.js +14 -5
- package/styled-components/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
- package/styled-components/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/cjs/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/cjs/components/CodeField/utils/index.js +4 -0
- package/styled-components/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +57 -64
- package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/cjs/components/Drawer/Drawer.js +4 -13
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +4 -14
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/styled-components/cjs/components/Popover/Popover.js +3 -1
- package/styled-components/cjs/components/Select/Select.js +26 -9
- package/styled-components/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/cjs/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/styled-components/cjs/components/Select/utils/index.js +0 -4
- package/styled-components/cjs/components/Switch/Switch.js +4 -2
- package/styled-components/cjs/components/Switch/Switch.styles.js +9 -8
- package/styled-components/cjs/components/Switch/Switch.tokens.js +2 -1
- package/styled-components/cjs/components/TextField/TextField.js +19 -3
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +114 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -3
- package/styled-components/cjs/examples/components/Range/Range.config.js +46 -0
- package/styled-components/es/components/CodeField/CodeField.js +64 -26
- package/styled-components/es/components/CodeField/CodeField.styles.js +11 -5
- package/styled-components/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/styled-components/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/es/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/es/components/CodeField/utils/index.js +1 -0
- package/styled-components/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +58 -65
- package/styled-components/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/es/components/Drawer/Drawer.js +5 -9
- package/styled-components/es/components/Drawer/Drawer.styles.js +5 -15
- package/styled-components/es/components/Drawer/Drawer.tokens.js +0 -9
- package/styled-components/es/components/Popover/Popover.js +4 -2
- package/styled-components/es/components/Select/Select.js +26 -9
- package/styled-components/es/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/es/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/styled-components/es/components/Select/utils/index.js +0 -1
- package/styled-components/es/components/Switch/Switch.js +4 -2
- package/styled-components/es/components/Switch/Switch.styles.js +9 -8
- package/styled-components/es/components/Switch/Switch.tokens.js +2 -1
- package/styled-components/es/components/TextField/TextField.js +20 -4
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +92 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/examples/components/Range/Range.config.js +46 -0
- package/types/components/CodeField/CodeField.d.ts.map +1 -1
- package/types/components/CodeField/CodeField.styles.d.ts +1 -0
- package/types/components/CodeField/CodeField.styles.d.ts.map +1 -1
- package/types/components/CodeField/hooks/useWebOTP.d.ts +20 -0
- package/types/components/CodeField/hooks/useWebOTP.d.ts.map +1 -0
- package/types/components/CodeField/utils/handleCodeError.d.ts +2 -2
- package/types/components/CodeField/utils/handleCodeError.d.ts.map +1 -1
- package/types/components/CodeField/utils/handleItemError.d.ts +3 -2
- package/types/components/CodeField/utils/handleItemError.d.ts.map +1 -1
- package/types/components/CodeField/utils/index.d.ts +1 -0
- package/types/components/CodeField/utils/index.d.ts.map +1 -1
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts +2 -0
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +0 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +0 -2
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts +1 -2
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +0 -9
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +0 -16
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
- package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +0 -1
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +1 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/index.d.ts +0 -1
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/components/Switch/Switch.d.ts.map +1 -1
- package/types/components/Switch/Switch.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.tokens.d.ts +1 -0
- package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
- package/types/components/Switch/Switch.types.d.ts +5 -0
- package/types/components/Switch/Switch.types.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +21 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +3 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +1 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -1
- package/types/examples/components/Drawer/Drawer.d.ts +0 -1
- package/types/examples/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/components/Range/Range.config.d.ts +1 -0
- package/types/examples/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/components/Range/Range.d.ts +1 -0
- package/types/examples/components/Range/Range.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -17
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/cjs/components/Select/utils/getRemovedElement.js +0 -17
- package/cjs/components/Select/utils/getRemovedElement.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/emotion/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/emotion/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/emotion/es/components/Select/utils/getRemovedElement.js +0 -10
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -13
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/es/components/Select/utils/getRemovedElement.js +0 -13
- package/es/components/Select/utils/getRemovedElement.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/styled-components/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/styled-components/es/components/Select/utils/getRemovedElement.js +0 -10
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts.map +0 -1
- package/types/components/Select/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Select/utils/getRemovedElement.d.ts.map +0 -1
|
@@ -6,9 +6,6 @@ function _array_like_to_array(arr, len) {
|
|
|
6
6
|
function _array_with_holes(arr) {
|
|
7
7
|
if (Array.isArray(arr)) return arr;
|
|
8
8
|
}
|
|
9
|
-
function _array_without_holes(arr) {
|
|
10
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
11
|
-
}
|
|
12
9
|
function _define_property(obj, key, value) {
|
|
13
10
|
if (key in obj) {
|
|
14
11
|
Object.defineProperty(obj, key, {
|
|
@@ -22,9 +19,6 @@ function _define_property(obj, key, value) {
|
|
|
22
19
|
}
|
|
23
20
|
return obj;
|
|
24
21
|
}
|
|
25
|
-
function _iterable_to_array(iter) {
|
|
26
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
27
|
-
}
|
|
28
22
|
function _iterable_to_array_limit(arr, i) {
|
|
29
23
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
30
24
|
if (_i == null) return;
|
|
@@ -52,9 +46,6 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
52
46
|
function _non_iterable_rest() {
|
|
53
47
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
54
48
|
}
|
|
55
|
-
function _non_iterable_spread() {
|
|
56
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
|
-
}
|
|
58
49
|
function _object_spread(target) {
|
|
59
50
|
for(var i = 1; i < arguments.length; i++){
|
|
60
51
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -124,9 +115,6 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
124
115
|
function _sliced_to_array(arr, i) {
|
|
125
116
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
126
117
|
}
|
|
127
|
-
function _to_consumable_array(arr) {
|
|
128
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
129
|
-
}
|
|
130
118
|
function _type_of(obj) {
|
|
131
119
|
"@swc/helpers - typeof";
|
|
132
120
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
@@ -147,7 +135,7 @@ import { sizeToIconSize } from "../../Select/utils";
|
|
|
147
135
|
import { classes } from "./Combobox.tokens";
|
|
148
136
|
import { FloatingPopover } from "./FloatingPopover";
|
|
149
137
|
import { useKeyNavigation, getItemByFocused } from "./hooks/useKeyboardNavigation";
|
|
150
|
-
import { initialItemsTransform, updateAncestors, updateDescendants, updateSingleAncestors, filterItems, getItemId,
|
|
138
|
+
import { initialItemsTransform, updateAncestors, updateDescendants, updateSingleAncestors, filterItems, getItemId, getTextValue } from "./utils";
|
|
151
139
|
import { Inner, StyledTextField, VirtualList, SelectAll } from "./ui";
|
|
152
140
|
import { pathReducer, focusedPathReducer } from "./reducers";
|
|
153
141
|
import { getPathMap, getTreeMaps } from "./hooks/getPathMaps";
|
|
@@ -218,7 +206,7 @@ import { Context } from "./Combobox.context";
|
|
|
218
206
|
return getTreeMaps(transformedItems);
|
|
219
207
|
}, [
|
|
220
208
|
items
|
|
221
|
-
]),
|
|
209
|
+
]), 2), valueToCheckedMap = _useMemo[0], valueToItemMap = _useMemo[1];
|
|
222
210
|
var _useState = _sliced_to_array(useState(getTextValue(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
|
|
223
211
|
var _useState1 = _sliced_to_array(useState(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
|
|
224
212
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
@@ -306,39 +294,18 @@ import { Context } from "./Combobox.context";
|
|
|
306
294
|
}
|
|
307
295
|
};
|
|
308
296
|
// Обработчик чипов
|
|
309
|
-
var
|
|
297
|
+
var handleChipClick = function(chip) {
|
|
310
298
|
if (!Array.isArray(value)) return;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
var resultValues = _to_consumable_array(value);
|
|
315
|
-
value.forEach(function(_, index) {
|
|
299
|
+
if (isTargetAmount) {
|
|
300
|
+
// При закрытии чипа в режиме isTargetAmount в value оставляем только disabled-элементы
|
|
301
|
+
onChange(value.filter(function(val) {
|
|
316
302
|
var _valueToItemMap_get;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
var labelAfterRenderValue = renderValue(label ? labelToItemMap.get(label) : {
|
|
320
|
-
value: stringValue,
|
|
321
|
-
label: stringValue.toString()
|
|
322
|
-
});
|
|
323
|
-
if (!chipLabels.includes(labelAfterRenderValue)) {
|
|
324
|
-
resultValues.splice(index, 1);
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
var removedItemValue = getRemovedElement(value, resultValues, isTargetAmount);
|
|
328
|
-
onChange(resultValues, removedItemValue ? valueToItemMap.get(removedItemValue) || {
|
|
329
|
-
value: removedItemValue,
|
|
330
|
-
label: removedItemValue.toString()
|
|
331
|
-
} : null);
|
|
303
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
304
|
+
}));
|
|
332
305
|
} else {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
});
|
|
337
|
-
var removedItemValue1 = getRemovedElement(value, newValues, isTargetAmount);
|
|
338
|
-
onChange(newValues, removedItemValue1 ? valueToItemMap.get(removedItemValue1) || {
|
|
339
|
-
value: removedItemValue1,
|
|
340
|
-
label: removedItemValue1.toString()
|
|
341
|
-
} : null);
|
|
306
|
+
onChange(value.filter(function(val) {
|
|
307
|
+
return val !== chip.value;
|
|
308
|
+
}), valueToItemMap.get(chip.value) || null);
|
|
342
309
|
}
|
|
343
310
|
};
|
|
344
311
|
// Обработчик открытия/закрытия выпадающего списка
|
|
@@ -368,14 +335,32 @@ import { Context } from "./Combobox.context";
|
|
|
368
335
|
return;
|
|
369
336
|
}
|
|
370
337
|
var checkedCopy = new Map(checked);
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
338
|
+
switch(checkedCopy.get(item.value)){
|
|
339
|
+
// Если чекбокс в состоянии indeterminate
|
|
340
|
+
case 'indeterminate':
|
|
341
|
+
{
|
|
342
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
// Если чекбокс в состоянии checked
|
|
346
|
+
case true:
|
|
347
|
+
{
|
|
348
|
+
updateDescendants(item, checkedCopy, false, valueToItemMap);
|
|
349
|
+
checkedCopy.set(item.value, false);
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
// Если чекбокс в состоянии unchecked
|
|
353
|
+
case false:
|
|
354
|
+
{
|
|
355
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
356
|
+
checkedCopy.set(item.value, true);
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
default:
|
|
360
|
+
{
|
|
361
|
+
break;
|
|
362
|
+
}
|
|
377
363
|
}
|
|
378
|
-
updateAncestors(item, checkedCopy);
|
|
379
364
|
var newValues = [];
|
|
380
365
|
valueToItemMap.forEach(function(item, key) {
|
|
381
366
|
if (checkedCopy.get(key)) {
|
|
@@ -442,20 +427,28 @@ import { Context } from "./Combobox.context";
|
|
|
442
427
|
if (value.length === 0) return [];
|
|
443
428
|
if (isTargetAmount) {
|
|
444
429
|
return [
|
|
445
|
-
|
|
430
|
+
{
|
|
431
|
+
value: '_removeAll',
|
|
432
|
+
label: "Выбрано ".concat(targetAmount || value.length),
|
|
433
|
+
disabled: value.every(function(val) {
|
|
434
|
+
var _valueToItemMap_get;
|
|
435
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
436
|
+
})
|
|
437
|
+
}
|
|
446
438
|
];
|
|
447
439
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
440
|
+
return value.map(function(value) {
|
|
441
|
+
var _valueToItemMap_get, _valueToItemMap_get1;
|
|
442
|
+
var currentLabel = renderValue ? renderValue(valueToItemMap.get(value) || {
|
|
443
|
+
value: value,
|
|
444
|
+
label: value
|
|
445
|
+
}) : ((_valueToItemMap_get = valueToItemMap.get(value)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.label) || value.toString();
|
|
446
|
+
return {
|
|
447
|
+
value: value,
|
|
448
|
+
label: currentLabel,
|
|
449
|
+
disabled: ((_valueToItemMap_get1 = valueToItemMap.get(value)) === null || _valueToItemMap_get1 === void 0 ? void 0 : _valueToItemMap_get1.disabled) || false
|
|
450
|
+
};
|
|
451
|
+
});
|
|
459
452
|
}
|
|
460
453
|
return [];
|
|
461
454
|
};
|
|
@@ -612,8 +605,8 @@ import { Context } from "./Combobox.context";
|
|
|
612
605
|
keepPlaceholder: keepPlaceholder
|
|
613
606
|
}, multiple ? {
|
|
614
607
|
enumerationType: 'chip',
|
|
615
|
-
|
|
616
|
-
|
|
608
|
+
_chips: getChips(),
|
|
609
|
+
_onChipClick: handleChipClick
|
|
617
610
|
} : {
|
|
618
611
|
enumerationType: 'plain'
|
|
619
612
|
}, rest), {
|
|
@@ -24,16 +24,14 @@ export var getPathMap = function(items) {
|
|
|
24
24
|
export var getTreeMaps = function(items) {
|
|
25
25
|
var valueToCheckedMap = new Map();
|
|
26
26
|
var valueToItemMap = new Map();
|
|
27
|
-
var labelToItemMap = new Map();
|
|
28
27
|
var rec = function(items) {
|
|
29
28
|
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
30
29
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
|
31
|
-
var value = item.value,
|
|
30
|
+
var value = item.value, innerItems = item.items;
|
|
32
31
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
|
33
32
|
valueToCheckedMap.set(value, false);
|
|
34
33
|
if (isEmpty(innerItems) || !innerItems) {
|
|
35
34
|
valueToItemMap.set(value, item);
|
|
36
|
-
labelToItemMap.set(label, item);
|
|
37
35
|
} else {
|
|
38
36
|
rec(innerItems, currIndex);
|
|
39
37
|
}
|
|
@@ -42,7 +40,6 @@ export var getTreeMaps = function(items) {
|
|
|
42
40
|
rec(items);
|
|
43
41
|
return [
|
|
44
42
|
valueToCheckedMap,
|
|
45
|
-
valueToItemMap
|
|
46
|
-
labelToItemMap
|
|
43
|
+
valueToItemMap
|
|
47
44
|
];
|
|
48
45
|
};
|
|
@@ -5,5 +5,4 @@ export { updateSingleAncestors } from "./updateSingleAncestors";
|
|
|
5
5
|
export { sizeToIconSize } from "./sizeToIconSize";
|
|
6
6
|
export { filterItems } from "./filterItems";
|
|
7
7
|
export { getItemId } from "./getItemId";
|
|
8
|
-
export { getRemovedElement } from "./getRemovedElement";
|
|
9
8
|
export { getTextValue } from "./getTextValue";
|
|
@@ -325,16 +325,6 @@ export var datePickerRangeRoot = function(Root) {
|
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
327
|
var isCalendarOpen = ((firstInputRef === null || firstInputRef === void 0 ? void 0 : (_firstInputRef_current = firstInputRef.current) === null || _firstInputRef_current === void 0 ? void 0 : _firstInputRef_current.contains((event === null || event === void 0 ? void 0 : event.target) || null)) || (secondInputRef === null || secondInputRef === void 0 ? void 0 : (_secondInputRef_current = secondInputRef.current) === null || _secondInputRef_current === void 0 ? void 0 : _secondInputRef_current.contains((event === null || event === void 0 ? void 0 : event.target) || null))) && (event === null || event === void 0 ? void 0 : event.code) !== keys.Escape ? true : currentOpened;
|
|
328
|
-
if (!isCalendarOpen) {
|
|
329
|
-
if (calendarFirstValue && !calendarSecondValue) {
|
|
330
|
-
var _secondInputRef_current1;
|
|
331
|
-
secondInputRef === null || secondInputRef === void 0 ? void 0 : (_secondInputRef_current1 = secondInputRef.current) === null || _secondInputRef_current1 === void 0 ? void 0 : _secondInputRef_current1.focus();
|
|
332
|
-
}
|
|
333
|
-
if (calendarSecondValue && !calendarFirstValue) {
|
|
334
|
-
var _firstInputRef_current1;
|
|
335
|
-
firstInputRef === null || firstInputRef === void 0 ? void 0 : (_firstInputRef_current1 = firstInputRef.current) === null || _firstInputRef_current1 === void 0 ? void 0 : _firstInputRef_current1.focus();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
328
|
if (!isCalendarOpen) {
|
|
339
329
|
setSecondTextFieldClicked(false);
|
|
340
330
|
}
|
|
@@ -373,28 +363,40 @@ export var datePickerRangeRoot = function(Root) {
|
|
|
373
363
|
}, commonArgs)), endOriginalDate = _getFormattedDates1.originalDate;
|
|
374
364
|
if (!calendarFirstValue && correctStartDates.calendar) {
|
|
375
365
|
startOriginalDate = new Date(correctStartDates.calendar);
|
|
366
|
+
}
|
|
367
|
+
if (!calendarSecondValue && correctEndDates.calendar) {
|
|
368
|
+
endOriginalDate = new Date(correctEndDates.calendar);
|
|
369
|
+
}
|
|
370
|
+
var _getSortedValues = _sliced_to_array(getSortedValues([
|
|
371
|
+
startOriginalDate,
|
|
372
|
+
endOriginalDate
|
|
373
|
+
]), 2), startValue = _getSortedValues[0], endValue = _getSortedValues[1];
|
|
374
|
+
var _getFormattedDates2 = getFormattedDates(_object_spread({
|
|
375
|
+
value: startValue,
|
|
376
|
+
delimiter: dateFormatDelimiter
|
|
377
|
+
}, commonArgs)), formattedFirstDate = _getFormattedDates2.formattedDate, originalFirstDate = _getFormattedDates2.originalDate, isoFirstDate = _getFormattedDates2.isoDate;
|
|
378
|
+
var _getFormattedDates3 = getFormattedDates(_object_spread({
|
|
379
|
+
value: endValue,
|
|
380
|
+
delimiter: dateFormatDelimiter
|
|
381
|
+
}, commonArgs)), formattedSecondDate = _getFormattedDates3.formattedDate, originalSecondDate = _getFormattedDates3.originalDate, isoSecondDate = _getFormattedDates3.isoDate;
|
|
382
|
+
if (formattedFirstDate !== inputFirstValue) {
|
|
376
383
|
if (onChangeFirstValue) {
|
|
377
|
-
onChangeFirstValue(event,
|
|
384
|
+
onChangeFirstValue(event, formattedFirstDate, originalFirstDate, isoFirstDate);
|
|
378
385
|
}
|
|
379
386
|
if (onCommitFirstDate) {
|
|
380
|
-
var dateInfo = getFirstQuarterInfo(
|
|
381
|
-
onCommitFirstDate(
|
|
387
|
+
var dateInfo = originalFirstDate ? getFirstQuarterInfo(originalFirstDate) : undefined;
|
|
388
|
+
onCommitFirstDate(formattedFirstDate, false, true, dateInfo, originalFirstDate, isoFirstDate);
|
|
382
389
|
}
|
|
383
390
|
}
|
|
384
|
-
if (
|
|
385
|
-
endOriginalDate = new Date(correctEndDates.calendar);
|
|
391
|
+
if (formattedSecondDate !== inputSecondValue) {
|
|
386
392
|
if (onChangeSecondValue) {
|
|
387
|
-
onChangeSecondValue(event,
|
|
393
|
+
onChangeSecondValue(event, formattedSecondDate, originalSecondDate, isoSecondDate);
|
|
388
394
|
}
|
|
389
395
|
if (onCommitSecondDate) {
|
|
390
|
-
var dateInfo1 = getSecondQuarterInfo(
|
|
391
|
-
onCommitSecondDate(
|
|
396
|
+
var dateInfo1 = originalSecondDate ? getSecondQuarterInfo(originalSecondDate) : undefined;
|
|
397
|
+
onCommitSecondDate(formattedSecondDate, false, true, dateInfo1, originalSecondDate, isoSecondDate);
|
|
392
398
|
}
|
|
393
399
|
}
|
|
394
|
-
var _getSortedValues = _sliced_to_array(getSortedValues([
|
|
395
|
-
startOriginalDate,
|
|
396
|
-
endOriginalDate
|
|
397
|
-
]), 2), startValue = _getSortedValues[0], endValue = _getSortedValues[1];
|
|
398
400
|
setFirstInputValue(startValue);
|
|
399
401
|
setSecondInputValue(endValue);
|
|
400
402
|
outerHandler === null || outerHandler === void 0 ? void 0 : outerHandler(event);
|
|
@@ -54,9 +54,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
54
54
|
return target;
|
|
55
55
|
}
|
|
56
56
|
import React, { forwardRef, useMemo } from "react";
|
|
57
|
-
import cls from "classnames";
|
|
58
57
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
59
|
-
import { getSizeValueFromProp, safeUseId } from "../../utils";
|
|
58
|
+
import { cx, getSizeValueFromProp, safeUseId } from "../../utils";
|
|
60
59
|
import { usePopupContext } from "../Popup";
|
|
61
60
|
import { Overlay } from "../Overlay";
|
|
62
61
|
import { DEFAULT_Z_INDEX } from "../Popup/utils";
|
|
@@ -71,7 +70,7 @@ import { useDrawer } from "./hooks";
|
|
|
71
70
|
// issue #823
|
|
72
71
|
export var drawerRoot = function(Root) {
|
|
73
72
|
return /*#__PURE__*/ forwardRef(function(_param, outerRef) {
|
|
74
|
-
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef,
|
|
73
|
+
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
75
74
|
"id",
|
|
76
75
|
"zIndex",
|
|
77
76
|
"popupInfo",
|
|
@@ -85,7 +84,6 @@ export var drawerRoot = function(Root) {
|
|
|
85
84
|
"opened",
|
|
86
85
|
"initialFocusRef",
|
|
87
86
|
"focusAfterRef",
|
|
88
|
-
"animationInfo",
|
|
89
87
|
"className",
|
|
90
88
|
"customBackgroundColor",
|
|
91
89
|
"customContentBackgroundColor",
|
|
@@ -135,11 +133,10 @@ export var drawerRoot = function(Root) {
|
|
|
135
133
|
onClose();
|
|
136
134
|
}
|
|
137
135
|
};
|
|
138
|
-
var _obj;
|
|
139
136
|
return /*#__PURE__*/ React.createElement(StyledPopup, _object_spread({
|
|
140
137
|
id: innerId,
|
|
141
138
|
ref: asModal ? innerRef : outerRef,
|
|
142
|
-
className:
|
|
139
|
+
className: cx(placementClass),
|
|
143
140
|
opened: innerIsOpen,
|
|
144
141
|
zIndex: zIndex,
|
|
145
142
|
placement: placement,
|
|
@@ -149,7 +146,6 @@ export var drawerRoot = function(Root) {
|
|
|
149
146
|
height: innerHeight,
|
|
150
147
|
offset: offset,
|
|
151
148
|
withAnimation: true,
|
|
152
|
-
drawerAnimationInfo: animationInfo,
|
|
153
149
|
overlay: asModal && /*#__PURE__*/ React.createElement(Root, {
|
|
154
150
|
view: view
|
|
155
151
|
}, /*#__PURE__*/ React.createElement(Overlay, {
|
|
@@ -162,7 +158,6 @@ export var drawerRoot = function(Root) {
|
|
|
162
158
|
onOverlayClick: onDrawerOverlayKeyDown
|
|
163
159
|
}))
|
|
164
160
|
}, rest), /*#__PURE__*/ React.createElement(Root, {
|
|
165
|
-
className: classes.panel,
|
|
166
161
|
view: view,
|
|
167
162
|
size: size,
|
|
168
163
|
style: {
|
|
@@ -174,7 +169,8 @@ export var drawerRoot = function(Root) {
|
|
|
174
169
|
width: innerWidth,
|
|
175
170
|
height: innerHeight,
|
|
176
171
|
customBackgroundColor: customBackgroundColor,
|
|
177
|
-
customContentBackgroundColor: customContentBackgroundColor
|
|
172
|
+
customContentBackgroundColor: customContentBackgroundColor,
|
|
173
|
+
className: className
|
|
178
174
|
}, children)));
|
|
179
175
|
});
|
|
180
176
|
};
|
|
@@ -2,7 +2,7 @@ import styled from "@emotion/styled";
|
|
|
2
2
|
import { component, mergeConfig } from "../../engines";
|
|
3
3
|
import { popupClasses, popupConfig } from "../Popup";
|
|
4
4
|
import { panelTokens, panelConfig } from "../Panel";
|
|
5
|
-
import { classes,
|
|
5
|
+
import { classes, tokens } from "./Drawer.tokens";
|
|
6
6
|
var mergedPanelConfig = mergeConfig(panelConfig);
|
|
7
7
|
var Panel = component(mergedPanelConfig);
|
|
8
8
|
var Popup = component(popupConfig);
|
|
@@ -58,11 +58,11 @@ var getAnimationStyles = function() {
|
|
|
58
58
|
}, '');
|
|
59
59
|
};
|
|
60
60
|
export var StyledPanel = /*#__PURE__*/ styled(Panel, {
|
|
61
|
-
target: "
|
|
61
|
+
target: "esjpvmp0",
|
|
62
62
|
label: "StyledPanel"
|
|
63
|
-
})(panelTokens.closeColor, ":var(", tokens.closeIconColor, ");", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
63
|
+
})(panelTokens.closeColor, ":var(", tokens.closeIconColor, ");", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyJdLCJzb3Vy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9wdXBDbGFzc2VzLnJvb3R9IHtcbiAgICAgICAgICAgICAgICBhbmltYXRpb246ICR7cGxhY2VtZW50fVNob3dBbmltYXRpb24gMC4ycyBmb3J3YXJkcztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJiYuJHtwb3B1cENsYXNzZXMuZW5kQW5pbWF0aW9ufSAuJHtwb3B1cENsYXNzZXMucm9vdH0ge1xuICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogJHtwbGFjZW1lbnR9SGlkZUFuaW1hdGlvbiAwLjJzIGZvcndhcmRzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBAa2V5ZnJhbWVzICR7cGxhY2VtZW50fVNob3dBbmltYXRpb24ge1xuICAgICAgICAgICAgICAgIDAlIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAke2FuaW1hdGlvblZhcmlhbnRzW3BsYWNlbWVudF0uc2hvdy5zdGFydH07XG4gICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6IDA7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgMTAwJSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogJHthbmltYXRpb25WYXJpYW50c1twbGFjZW1lbnRdLnNob3cuZW5kfTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIEBrZXlmcmFtZXMgJHtwbGFjZW1lbnR9SGlkZUFuaW1hdGlvbiB7XG4gICAgICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06ICR7YW5pbWF0aW9uVmFyaWFudHNbcGxhY2VtZW50XS5oaWRlLnN0YXJ0fTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAxMDAlIHtcbiAgICAgICAgICAgICAg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3YXJkcztcbiAgICB9XG5cbiAgICBAa2V5ZnJhbWVzIGZhZGVJbiB7XG4gICAgICAgIGZyb20ge1xuICAgICAgICAgICAgb3BhY2l0eTogMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRvIHtcbiAgICAgICAgICAgIG9wYWNpdHk6IDE7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBAa2V5ZnJhbWVzIGZhZGVPdXQge1xuICAgICAgICBmcm9tIHtcbiAgICAgICAgICAgIG9wYWNpdHk6IDE7XG4gICAgICAgIH1cblxuICAgICAgICB0byB7XG4gICAgICAgICAgICBvcGFjaXR5OiAwO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgJiYgLiR7cG9wdXBDbGFzc2VzLnJvb3R9LCAmJiAuJHtwb3B1cENsYXNzZXMucm9vdH0gPiBkaXYge1xuICAgICAgICB3aWR0aDogJHsoeyB3aWR0aCB9KSA9PiB3aWR0aCB8fCAnYXV0byd9O1xuICAgICAgICBoZWlnaHQ6ICR7KHsgaGVpZ2h0IH0pID0+IGhlaWdodCB8fCAnYXV0byd9O1xuICAgIH1cblxuICAgICR7Z2V0QW5pbWF0aW9uU3R5bGVzKCl9XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9HMkIifQ== */");
|
|
64
64
|
export var StyledPopup = /*#__PURE__*/ styled(Popup, {
|
|
65
|
-
target: "
|
|
65
|
+
target: "esjpvmp1",
|
|
66
66
|
label: "StyledPopup"
|
|
67
67
|
})("&&.", classes.overlay, "{animation:fadeIn 0.2s forwards;scrollbar-gutter:stable;}&&.", popupClasses.endAnimation, " .", classes.overlay, "{animation:fadeOut 0.2s forwards;}@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}@keyframes fadeOut{from{opacity:1;}to{opacity:0;}}&& .", popupClasses.root, ",&& .", popupClasses.root, " > div{width:", function(param) {
|
|
68
68
|
var width = param.width;
|
|
@@ -70,7 +70,4 @@ export var StyledPopup = /*#__PURE__*/ styled(Popup, {
|
|
|
70
70
|
}, ";height:", function(param) {
|
|
71
71
|
var height = param.height;
|
|
72
72
|
return height || 'auto';
|
|
73
|
-
}, ";}", getAnimationStyles(), "
|
|
74
|
-
var drawerAnimationInfo = param.drawerAnimationInfo;
|
|
75
|
-
return (drawerAnimationInfo === null || drawerAnimationInfo === void 0 ? void 0 : drawerAnimationInfo.enter) || "var(".concat(privateTokens.enterAnimation, ")");
|
|
76
|
-
}, ";}}&.", classes.exitCustomAnimation, "{&&.", popupClasses.endAnimation, " .", popupClasses.root, "{animation:var(", privateTokens.customExitAnimation, ");}}", "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGNvbXBvbmVudCwgbWVyZ2VDb25maWcgfSBmcm9tICcuLi8uLi9lbmdpbmVzJztcbmltcG9ydCB7IHBvcHVwQ2xhc3NlcywgcG9wdXBDb25maWcgfSBmcm9tICcuLi9Qb3B1cCc7XG5pbXBvcnQgeyBwYW5lbFRva2VucywgcGFuZWxDb25maWcgfSBmcm9tICcuLi9QYW5lbCc7XG5cbmltcG9ydCB0eXBlIHsgRHJhd2VyQW5pbWF0aW9uSW5mbywgRHJhd2VyUGxhY2VtZW50IH0gZnJvbSAnLi9EcmF3ZXIudHlwZXMnO1xuaW1wb3J0IHsgY2xhc3NlcywgcHJpdmF0ZVRva2VucywgdG9rZW5zIH0gZnJvbSAnLi9EcmF3ZXIudG9rZW5zJztcblxuY29uc3QgbWVyZ2VkUGFuZWxDb25maWcgPSBtZXJnZUNvbmZpZyhwYW5lbENvbmZpZyk7XG5jb25zdCBQYW5lbCA9IGNvbXBvbmVudChtZXJnZWRQYW5lbENvbmZpZyk7XG5cbmNvbnN0IFBvcHVwID0gY29tcG9uZW50KHBvcHVwQ29uZmlnKTtcblxuY29uc3QgYW5pbWF0aW9uVmFyaWFudHMgPSB7XG4gICAgcmlnaHQ6IHtcbiAgICAgICAgc2hvdzoge1xuICAgICAgICAgICAgc3RhcnQ6ICd0cmFuc2xhdGUoMTAwJSwgLTUwJSknLFxuICAgICAgICAgICAgZW5kOiAndHJhbnNsYXRlKDAsIC01MCUpJyxcbiAgICAgICAgfSxcbiAgICAgICAgaGlkZToge1xuICAgICAgICAgICAgc3RhcnQ6ICd0cmFuc2xhdGUoMCwgLTUwJSknLFxuICAgICAgICAgICAgZW5kOiAndHJhbnNsYXRlKDEwMCUsIC01MCUpJyxcbiAgICAgICAgfSxcbiAgICB9LFxuICAgIGJvdHRvbToge1xuICAgICAgICBzaG93OiB7XG4gICAgICAgICAgICBzdGFydDogJ3RyYW5zbGF0ZSgtNTAlLCAxMDAlKScsXG4gICAgICAgICAgICBlbmQ6ICd0cmFuc2xhdGUoLTUwJSwgMCknLFxuICAgICAgICB9LFxuICAgICAgICBoaWRlOiB7XG4gICAgICAgICAgICBzdGFydDogJ3RyYW5zbGF0ZSgtNTAlLCAwKScsXG4gICAgICAgICAgICBlbmQ6ICd0cmFuc2xhdGUoLTUwJSwgMTAwJSknLFxuICAgICAgICB9LFxuICAgIH0sXG4gICAgbGVmdDoge1xuICAgICAgICBzaG93OiB7XG4gICAgICAgICAgICBzdGFydDogJ3RyYW5zbGF0ZSgtMTAwJSwgLTUwJSknLFxuICAgICAgICAgICAgZW5kOiAndHJhbnNsYXRlKDAsIC01MCUpJyxcbiAgICAgICAgfSxcbiAgICAgICAgaGlkZToge1xuICAgICAgICAgICAgc3RhcnQ6ICd0cmFuc2xhdGUoMCwgLTUwJSknLFxuICAgICAgICAgICAgZW5kOiAndHJhbnNsYXRlKC0xM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0uc2hvdy5zdGFydH07XG4gICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6IDA7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgMTAwJSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogJHthbmltYXRpb25WYXJpYW50c1twbGFjZW1lbnRdLnNob3cuZW5kfTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIEBrZXlmcmFtZXMgJHtwbGFjZW1lbnR9SGlkZUFuaW1hdGlvbiB7XG4gICAgICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06ICR7YW5pbWF0aW9uVmFyaWFudHNbcGxhY2VtZW50XS5oaWRlLnN0YXJ0fTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAxMDAlIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAke2FuaW1hdGlvblZhcmlhbnRzW3BsYWNlbWVudF0uaGlkZS5lbmR9O1xuICAgICAgICAgICAgICAgICAgICBvcGFjaXR5OiAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIGA7XG5cbmNvbnN0IGdldEFuaW1hdGlvblN0eWxlcyA9ICgpID0+IHtcbiAgICByZXR1cm4gT2JqZWN0LmtleXMoYW5pbWF0aW9uVmFyaWFudHMpLnJlZHVjZSgoYWNjLCBwbGFjZW1lbnQpID0+IHtcbiAgICAgICAgYWNjICs9IHRlbXBsYXRlQW5pbWF0aW9uU3R5bGUocGxhY2VtZW50IGFzIERyYXdlclBsYWNlbWVudCk7XG4gICAgICAgIHJldHVybiBhY2M7XG4gICAgfSwgJycpO1xufTtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFBhbm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Mucm9vdH0gPiBkaXYge1xuICAgICAgICB3aWR0aDogJHsoeyB3aWR0aCB9KSA9PiB3aWR0aCB8fCAnYXV0byd9O1xuICAgICAgICBoZWlnaHQ6ICR7KHsgaGVpZ2h0IH0pID0+IGhlaWdodCB8fCAnYXV0byd9O1xuICAgIH1cblxuICAgICR7Z2V0QW5pbWF0aW9uU3R5bGVzKCl9XG5cbiAgICAmLiR7Y2xhc3Nlcy5lbnRlckN1c3RvbUFuaW1hdGlvbn0ge1xuICAgICAgICAmJiAuJHtwb3B1cENsYXNzZXMucm9vdH0ge1xuICAgICAgICAgICAgYW5pbWF0aW9uOiAkeyh7IGRyYXdlckFuaW1hdGlvbkluZm8gfSkgPT5cbiAgICAgICAgICAgICAgICBkcmF3ZXJBbmltYXRpb25JbmZvPy5lbnRlciB8fCBgdmFyKCR7cHJpdmF0ZVRva2Vucy5lbnRlckFuaW1hdGlvbn0pYH07XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAmLiR7Y2xhc3Nlcy5leGl0Q3VzdG9tQW5pbWF0aW9ufSB7XG4gICAgICAgICYmLiR7cG9wdXBDbGFzc2VzLmVuZEFuaW1hdGlvbn0gLiR7cG9wdXBDbGFzc2VzLnJvb3R9IHtcbiAgICAgICAgICAgIGFuaW1hdGlvbjogdmFyKCR7cHJpdmF0ZVRva2Vucy5jdXN0b21FeGl0QW5pbWF0aW9ufSk7XG4gICAgICAgIH1cbiAgICB9XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdHMkIifQ== */");
|
|
73
|
+
}, ";}", getAnimationStyles(), "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyIsInNvdXJjZXMiOlsic3JjLWVtb3Rpb24vY29tcG9uZW50cy9EcmF3ZXIvRHJhd2VyLnN0eWxlcy50cyJdLCJzb3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cG9wdXBDbGFzc2VzLnJvb3R9IHtcbiAgICAgICAgICAgICAgICBhbmltYXRpb246ICR7cGxhY2VtZW50fVNob3dBbmltYXRpb24gMC4ycyBmb3J3YXJkcztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJiYuJHtwb3B1cENsYXNzZXMuZW5kQW5pbWF0aW9ufSAuJHtwb3B1cENsYXNzZXMucm9vdH0ge1xuICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogJHtwbGFjZW1lbnR9SGlkZUFuaW1hdGlvbiAwLjJzIGZvcndhcmRzO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBAa2V5ZnJhbWVzICR7cGxhY2VtZW50fVNob3dBbmltYXRpb24ge1xuICAgICAgICAgICAgICAgIDAlIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtOiAke2FuaW1hdGlvblZhcmlhbnRzW3BsYWNlbWVudF0uc2hvdy5zdGFydH07XG4gICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6IDA7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgMTAwJSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogJHthbmltYXRpb25WYXJpYW50c1twbGFjZW1lbnRdLnNob3cuZW5kfTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIEBrZXlmcmFtZXMgJHtwbGFjZW1lbnR9SGlkZUFuaW1hdGlvbiB7XG4gICAgICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2Zvcm06ICR7YW5pbWF0aW9uVmFyaWFudHNbcGxhY2VtZW50XS5oaWRlLnN0YXJ0fTtcbiAgICAgICAgICAgICAgICAgICAgb3BhY2l0eTogMTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAxMDAlIHtcbiAgICAgICAgICAgIC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3J3YXJkcztcbiAgICB9XG5cbiAgICBAa2V5ZnJhbWVzIGZhZGVJbiB7XG4gICAgICAgIGZyb20ge1xuICAgICAgICAgICAgb3BhY2l0eTogMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRvIHtcbiAgICAgICAgICAgIG9wYWNpdHk6IDE7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBAa2V5ZnJhbWVzIGZhZGVPdXQge1xuICAgICAgICBmcm9tIHtcbiAgICAgICAgICAgIG9wYWNpdHk6IDE7XG4gICAgICAgIH1cblxuICAgICAgICB0byB7XG4gICAgICAgICAgICBvcGFjaXR5OiAwO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgJiYgLiR7cG9wdXBDbGFzc2VzLnJvb3R9LCAmJiAuJHtwb3B1cENsYXNzZXMucm9vdH0gPiBkaXYge1xuICAgICAgICB3aWR0aDogJHsoeyB3aWR0aCB9KSA9PiB3aWR0aCB8fCAnYXV0byd9O1xuICAgICAgICBoZWlnaHQ6ICR7KHsgaGVpZ2h0IH0pID0+IGhlaWdodCB8fCAnYXV0byd9O1xuICAgIH1cblxuICAgICR7Z2V0QW5pbWF0aW9uU3R5bGVzKCl9XG5gO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXdHMkIifQ== */");
|
|
@@ -3,9 +3,6 @@ export var classes = {
|
|
|
3
3
|
header: 'drawer-header',
|
|
4
4
|
footer: 'drawer-footer',
|
|
5
5
|
overlay: 'drawer-overlay',
|
|
6
|
-
panel: 'drawer-panel',
|
|
7
|
-
enterCustomAnimation: 'drawer-enter-custom-animation',
|
|
8
|
-
exitCustomAnimation: 'drawer-exit-custom-animation',
|
|
9
6
|
horizontal: 'drawer-horizontal',
|
|
10
7
|
hasHeader: 'drawer-has-header',
|
|
11
8
|
isRightClose: 'drawer-right-close-button',
|
|
@@ -14,12 +11,6 @@ export var classes = {
|
|
|
14
11
|
rightPlacement: 'drawer-right-placement',
|
|
15
12
|
leftPlacement: 'drawer-left-placement'
|
|
16
13
|
};
|
|
17
|
-
export var privateTokens = {
|
|
18
|
-
enterAnimation: '--plasma__private-drawer-enter-animation',
|
|
19
|
-
exitAnimation: '--plasma__private-drawer-exit-animation',
|
|
20
|
-
customEnterAnimation: '--plasma__private-drawer-custom-enter-animation',
|
|
21
|
-
customExitAnimation: '--plasma__private-drawer-custom-exit-animation'
|
|
22
|
-
};
|
|
23
14
|
export var tokens = {
|
|
24
15
|
drawerOverlayWithBlurColor: '--plasma-drawer-overlay-with-blur-color',
|
|
25
16
|
drawerOverlayColor: '--plasma-drawer-overlay-color',
|
|
@@ -131,7 +131,7 @@ import React, { useRef, useCallback, useEffect, useState, forwardRef, isValidEle
|
|
|
131
131
|
import { usePopper } from "react-popper";
|
|
132
132
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
133
133
|
import { useFocusTrap } from "../../hooks";
|
|
134
|
-
import { cx } from "../../utils";
|
|
134
|
+
import { cx, safeUseId } from "../../utils";
|
|
135
135
|
import { Portal } from "../Portal";
|
|
136
136
|
import { base as viewCSS } from "./variations/_view/base";
|
|
137
137
|
import { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from "./Popover.styles";
|
|
@@ -176,6 +176,7 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
|
176
176
|
var portalRef = useRef(null);
|
|
177
177
|
var targetRef = useRef(null);
|
|
178
178
|
var trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);
|
|
179
|
+
var uuid = safeUseId();
|
|
179
180
|
var popoverForkRef = useForkRef(popoverRef, trapRef);
|
|
180
181
|
var _useState = _sliced_to_array(useState(null), 2), arrowElement = _useState[0], setArrowElement = _useState[1];
|
|
181
182
|
var _useState1 = _sliced_to_array(useState(false), 2), forceRender = _useState1[1];
|
|
@@ -326,8 +327,9 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
|
326
327
|
portal = rootRef.current;
|
|
327
328
|
}
|
|
328
329
|
if (!portal) {
|
|
330
|
+
var portalId = "".concat(POPOVER_PORTAL_ID, "-").concat(uuid);
|
|
329
331
|
portal = document.createElement('div');
|
|
330
|
-
portal.setAttribute('id',
|
|
332
|
+
portal.setAttribute('id', portalId);
|
|
331
333
|
if (typeof frame === 'string' && frame !== 'document') {
|
|
332
334
|
var _document_getElementById;
|
|
333
335
|
(_document_getElementById = document.getElementById(frame)) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.appendChild(portal);
|
|
@@ -199,7 +199,7 @@ import { Context } from "./Select.context";
|
|
|
199
199
|
items
|
|
200
200
|
]);
|
|
201
201
|
// Создаем структуры для быстрой работы с деревом
|
|
202
|
-
var _usePathMaps = _sliced_to_array(usePathMaps(transformedItems),
|
|
202
|
+
var _usePathMaps = _sliced_to_array(usePathMaps(transformedItems), 4), pathMap = _usePathMaps[0], focusedToValueMap = _usePathMaps[1], valueToCheckedMap = _usePathMaps[2], valueToItemMap = _usePathMaps[3];
|
|
203
203
|
var _useState = _sliced_to_array(useState(props.multiselect ? [] : ''), 2), internalValue = _useState[0], setInternalValue = _useState[1];
|
|
204
204
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
205
205
|
var floatingPopoverRef = useRef(null);
|
|
@@ -287,14 +287,32 @@ import { Context } from "./Select.context";
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
var checkedCopy = new Map(checked);
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
290
|
+
switch(checkedCopy.get(item.value)){
|
|
291
|
+
// Если чекбокс в состоянии indeterminate
|
|
292
|
+
case 'indeterminate':
|
|
293
|
+
{
|
|
294
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
// Если чекбокс в состоянии checked
|
|
298
|
+
case true:
|
|
299
|
+
{
|
|
300
|
+
updateDescendants(item, checkedCopy, false, valueToItemMap);
|
|
301
|
+
checkedCopy.set(item.value, false);
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
// Если чекбокс в состоянии unchecked
|
|
305
|
+
case false:
|
|
306
|
+
{
|
|
307
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
308
|
+
checkedCopy.set(item.value, true);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
default:
|
|
312
|
+
{
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
296
315
|
}
|
|
297
|
-
updateAncestors(item, checkedCopy);
|
|
298
316
|
var newValues = [];
|
|
299
317
|
valueToItemMap.forEach(function(item, key) {
|
|
300
318
|
if (checkedCopy.get(key)) {
|
|
@@ -485,7 +503,6 @@ import { Context } from "./Select.context";
|
|
|
485
503
|
activeDescendantItemValue: activeDescendantItemValue,
|
|
486
504
|
isTargetAmount: isTargetAmount,
|
|
487
505
|
onChange: onChange,
|
|
488
|
-
labelToItemMap: labelToItemMap,
|
|
489
506
|
chipView: chipView,
|
|
490
507
|
separator: separator,
|
|
491
508
|
requiredProps: requiredProps,
|
|
@@ -5,18 +5,16 @@ export var usePathMaps = function(items) {
|
|
|
5
5
|
var focusedToValueMap = new Map();
|
|
6
6
|
var valueToCheckedMap = new Map();
|
|
7
7
|
var valueToItemMap = new Map();
|
|
8
|
-
var labelToItemMap = new Map();
|
|
9
8
|
pathMap.set('root', (items === null || items === void 0 ? void 0 : items.length) || 0);
|
|
10
9
|
var rec = function(items) {
|
|
11
10
|
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
12
11
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
|
13
|
-
var value = item.value,
|
|
12
|
+
var value = item.value, innerItems = item.items;
|
|
14
13
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
|
15
14
|
focusedToValueMap.set(currIndex, item);
|
|
16
15
|
valueToCheckedMap.set(value, false);
|
|
17
16
|
if (isEmpty(innerItems) || !innerItems) {
|
|
18
17
|
valueToItemMap.set(value, item);
|
|
19
|
-
labelToItemMap.set(label, item);
|
|
20
18
|
} else {
|
|
21
19
|
pathMap.set(value, innerItems.length);
|
|
22
20
|
rec(innerItems, currIndex);
|
|
@@ -28,7 +26,6 @@ export var usePathMaps = function(items) {
|
|
|
28
26
|
pathMap,
|
|
29
27
|
focusedToValueMap,
|
|
30
28
|
valueToCheckedMap,
|
|
31
|
-
valueToItemMap
|
|
32
|
-
labelToItemMap
|
|
29
|
+
valueToItemMap
|
|
33
30
|
];
|
|
34
31
|
};
|
|
@@ -2,7 +2,7 @@ import React, { forwardRef } from "react";
|
|
|
2
2
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
3
3
|
import { Button, Textfield } from "./ui";
|
|
4
4
|
export var Target = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
5
|
-
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange,
|
|
5
|
+
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange, chipView = param.chipView, separator = param.separator, requiredProps = param.requiredProps, hintProps = param.hintProps;
|
|
6
6
|
var buttonRef = useForkRef(ref, inputWrapperRef);
|
|
7
7
|
if (selectProps.renderTarget) {
|
|
8
8
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -47,7 +47,6 @@ export var Target = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
47
47
|
valueToItemMap: valueToItemMap,
|
|
48
48
|
renderValue: renderValue,
|
|
49
49
|
onChange: onChange,
|
|
50
|
-
labelToItemMap: labelToItemMap,
|
|
51
50
|
chipView: chipView,
|
|
52
51
|
requiredProps: requiredProps,
|
|
53
52
|
hintProps: hintProps,
|