@salutejs/plasma-new-hope 0.336.0-canary.2222.17612018746.0 → 0.336.0-canary.2222.17765869189.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 +65 -66
- 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/Pagination/Pagination.css +15 -10
- package/cjs/components/Pagination/Pagination.js +57 -5
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Pagination/Pagination.styles.js +19 -7
- package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
- package/{es/components/Pagination/Pagination.styles_ska0td.css → cjs/components/Pagination/Pagination.styles_qhyqps.css} +5 -3
- package/cjs/components/Pagination/Pagination.tokens.js +3 -0
- package/cjs/components/Pagination/Pagination.tokens.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_89ax1q.css → PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
- 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 +35 -21
- 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 +20 -4
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- package/cjs/components/TextField/TextField.tokens.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/components/Tree/Tree.css +7 -6
- package/cjs/components/Tree/Tree.js +42 -1
- package/cjs/components/Tree/Tree.js.map +1 -1
- package/cjs/components/Tree/Tree.styles.js +17 -2
- package/cjs/components/Tree/Tree.styles.js.map +1 -1
- package/cjs/components/Tree/Tree.styles_1bw3k0r.css +8 -0
- package/cjs/components/Tree/Tree.tokens.js +5 -2
- package/cjs/components/Tree/Tree.tokens.js.map +1 -1
- package/cjs/components/Tree/utils/traverseTree.js +3 -3
- package/cjs/components/Tree/utils/traverseTree.js.map +1 -1
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/index.js.map +1 -1
- package/cjs/index.css +35 -28
- 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 +67 -74
- 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/Pagination/Pagination.js +53 -5
- package/emotion/cjs/components/Pagination/Pagination.styles.js +28 -14
- package/emotion/cjs/components/Pagination/Pagination.tokens.js +3 -0
- package/emotion/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -6
- package/emotion/cjs/components/Popover/Popover.js +3 -1
- package/emotion/cjs/components/Select/Select.js +36 -19
- 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 +21 -5
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- 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/components/Tree/Tree.js +31 -1
- package/emotion/cjs/components/Tree/Tree.styles.js +23 -13
- package/emotion/cjs/components/Tree/Tree.tokens.js +5 -2
- package/emotion/cjs/components/Tree/utils/traverseTree.js +3 -3
- package/emotion/cjs/examples/components/Combobox/Combobox.js +0 -15
- package/emotion/cjs/examples/components/Pagination/Pagination.config.js +12 -12
- package/emotion/cjs/examples/components/Range/Range.config.js +8 -7
- package/emotion/cjs/examples/components/Tree/Tree.config.js +5 -5
- 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 +68 -75
- 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/Pagination/Pagination.js +55 -7
- package/emotion/es/components/Pagination/Pagination.styles.js +23 -15
- package/emotion/es/components/Pagination/Pagination.tokens.js +3 -0
- package/emotion/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +6 -6
- package/emotion/es/components/Popover/Popover.js +4 -2
- package/emotion/es/components/Select/Select.js +36 -19
- 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 +22 -6
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- 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/components/Tree/Tree.js +32 -2
- package/emotion/es/components/Tree/Tree.styles.js +20 -13
- package/emotion/es/components/Tree/Tree.tokens.js +5 -2
- package/emotion/es/components/Tree/utils/traverseTree.js +3 -3
- package/emotion/es/examples/components/Pagination/Pagination.config.js +12 -12
- package/emotion/es/examples/components/Range/Range.config.js +8 -7
- package/emotion/es/examples/components/Tree/Tree.config.js +5 -5
- 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 +66 -67
- 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/Pagination/Pagination.css +15 -10
- package/es/components/Pagination/Pagination.js +59 -7
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/Pagination/Pagination.styles.js +18 -8
- package/es/components/Pagination/Pagination.styles.js.map +1 -1
- package/{cjs/components/Pagination/Pagination.styles_ska0td.css → es/components/Pagination/Pagination.styles_qhyqps.css} +5 -3
- package/es/components/Pagination/Pagination.tokens.js +3 -0
- package/es/components/Pagination/Pagination.tokens.js.map +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.css +3 -3
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js.map +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/{PaginationQuickJumpToPage.styles_89ax1q.css → PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
- 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 +35 -21
- 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 +20 -4
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.tokens.js +1 -0
- package/es/components/TextField/TextField.tokens.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/components/Tree/Tree.css +7 -6
- package/es/components/Tree/Tree.js +43 -2
- package/es/components/Tree/Tree.js.map +1 -1
- package/es/components/Tree/Tree.styles.js +17 -3
- package/es/components/Tree/Tree.styles.js.map +1 -1
- package/es/components/Tree/Tree.styles_1bw3k0r.css +8 -0
- package/es/components/Tree/Tree.tokens.js +5 -2
- package/es/components/Tree/Tree.tokens.js.map +1 -1
- package/es/components/Tree/utils/traverseTree.js +3 -3
- package/es/components/Tree/utils/traverseTree.js.map +1 -1
- package/es/engines/common.js.map +1 -1
- package/es/engines/index.js.map +1 -1
- package/es/index.css +35 -28
- package/package.json +4 -4
- 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 +67 -74
- 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/Pagination/Pagination.js +53 -5
- package/styled-components/cjs/components/Pagination/Pagination.styles.js +39 -12
- package/styled-components/cjs/components/Pagination/Pagination.tokens.js +3 -0
- package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +5 -5
- package/styled-components/cjs/components/Popover/Popover.js +3 -1
- package/styled-components/cjs/components/Select/Select.js +36 -19
- 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 +20 -4
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- 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/components/Tree/Tree.js +31 -1
- package/styled-components/cjs/components/Tree/Tree.styles.js +24 -8
- package/styled-components/cjs/components/Tree/Tree.tokens.js +5 -2
- package/styled-components/cjs/components/Tree/utils/traverseTree.js +3 -3
- package/styled-components/cjs/examples/components/Pagination/Pagination.config.js +18 -11
- package/styled-components/cjs/examples/components/Range/Range.config.js +46 -0
- package/styled-components/cjs/examples/components/Tree/Tree.config.js +6 -2
- 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 +68 -75
- 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/Pagination/Pagination.js +55 -7
- package/styled-components/es/components/Pagination/Pagination.styles.js +34 -13
- package/styled-components/es/components/Pagination/Pagination.tokens.js +3 -0
- package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.js +5 -5
- package/styled-components/es/components/Popover/Popover.js +4 -2
- package/styled-components/es/components/Select/Select.js +36 -19
- 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 +21 -5
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- 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/components/Tree/Tree.js +32 -2
- package/styled-components/es/components/Tree/Tree.styles.js +21 -8
- package/styled-components/es/components/Tree/Tree.tokens.js +5 -2
- package/styled-components/es/components/Tree/utils/traverseTree.js +3 -3
- package/styled-components/es/examples/components/Combobox/Combobox.js +7 -0
- package/styled-components/es/examples/components/Pagination/Pagination.config.js +18 -11
- package/styled-components/es/examples/components/Range/Range.config.js +46 -0
- package/styled-components/es/examples/components/Tree/Tree.config.js +6 -2
- 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/Pagination/Pagination.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.styles.d.ts +2 -0
- package/types/components/Pagination/Pagination.styles.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.tokens.d.ts +3 -0
- package/types/components/Pagination/Pagination.tokens.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.types.d.ts +6 -0
- package/types/components/Pagination/Pagination.types.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles.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/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.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/components/Tree/Tree.d.ts +3 -3
- package/types/components/Tree/Tree.d.ts.map +1 -1
- package/types/components/Tree/Tree.styles.d.ts +3 -0
- package/types/components/Tree/Tree.styles.d.ts.map +1 -1
- package/types/components/Tree/Tree.tokens.d.ts +3 -0
- package/types/components/Tree/Tree.tokens.d.ts.map +1 -1
- package/types/components/Tree/Tree.types.d.ts +50 -1
- package/types/components/Tree/Tree.types.d.ts.map +1 -1
- package/types/components/Tree/utils/traverseTree.d.ts.map +1 -1
- package/types/engines/common.d.ts +3 -3
- package/types/engines/common.d.ts.map +1 -1
- package/types/engines/index.d.ts +1 -1
- package/types/engines/index.d.ts.map +1 -1
- package/types/engines/types.d.ts +4 -0
- package/types/engines/types.d.ts.map +1 -1
- package/types/examples/components/Pagination/Pagination.config.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/types/examples/components/Tree/Tree.config.d.ts.map +1 -1
- package/types/examples/components/Tree/Tree.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/cjs/components/Tree/Tree.styles_6sla5y.css +0 -7
- 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/es/components/Tree/Tree.styles_6sla5y.css +0 -7
- 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
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
2
|
+
try {
|
|
3
|
+
var info = gen[key](arg);
|
|
4
|
+
var value = info.value;
|
|
5
|
+
} catch (error) {
|
|
6
|
+
reject(error);
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (info.done) {
|
|
10
|
+
resolve(value);
|
|
11
|
+
} else {
|
|
12
|
+
Promise.resolve(value).then(_next, _throw);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function _async_to_generator(fn) {
|
|
16
|
+
return function() {
|
|
17
|
+
var self = this, args = arguments;
|
|
18
|
+
return new Promise(function(resolve, reject) {
|
|
19
|
+
var gen = fn.apply(self, args);
|
|
20
|
+
function _next(value) {
|
|
21
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
22
|
+
}
|
|
23
|
+
function _throw(err) {
|
|
24
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
25
|
+
}
|
|
26
|
+
_next(undefined);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function _instanceof(left, right) {
|
|
31
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
32
|
+
return !!right[Symbol.hasInstance](left);
|
|
33
|
+
} else {
|
|
34
|
+
return left instanceof right;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function _ts_generator(thisArg, body) {
|
|
38
|
+
var f, y, t, _ = {
|
|
39
|
+
label: 0,
|
|
40
|
+
sent: function() {
|
|
41
|
+
if (t[0] & 1) throw t[1];
|
|
42
|
+
return t[1];
|
|
43
|
+
},
|
|
44
|
+
trys: [],
|
|
45
|
+
ops: []
|
|
46
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
47
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
48
|
+
return this;
|
|
49
|
+
}), g;
|
|
50
|
+
function verb(n) {
|
|
51
|
+
return function(v) {
|
|
52
|
+
return step([
|
|
53
|
+
n,
|
|
54
|
+
v
|
|
55
|
+
]);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function step(op) {
|
|
59
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
60
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
61
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
62
|
+
if (y = 0, t) op = [
|
|
63
|
+
op[0] & 2,
|
|
64
|
+
t.value
|
|
65
|
+
];
|
|
66
|
+
switch(op[0]){
|
|
67
|
+
case 0:
|
|
68
|
+
case 1:
|
|
69
|
+
t = op;
|
|
70
|
+
break;
|
|
71
|
+
case 4:
|
|
72
|
+
_.label++;
|
|
73
|
+
return {
|
|
74
|
+
value: op[1],
|
|
75
|
+
done: false
|
|
76
|
+
};
|
|
77
|
+
case 5:
|
|
78
|
+
_.label++;
|
|
79
|
+
y = op[1];
|
|
80
|
+
op = [
|
|
81
|
+
0
|
|
82
|
+
];
|
|
83
|
+
continue;
|
|
84
|
+
case 7:
|
|
85
|
+
op = _.ops.pop();
|
|
86
|
+
_.trys.pop();
|
|
87
|
+
continue;
|
|
88
|
+
default:
|
|
89
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
90
|
+
_ = 0;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
94
|
+
_.label = op[1];
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
98
|
+
_.label = t[1];
|
|
99
|
+
t = op;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
if (t && _.label < t[2]) {
|
|
103
|
+
_.label = t[2];
|
|
104
|
+
_.ops.push(op);
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
if (t[2]) _.ops.pop();
|
|
108
|
+
_.trys.pop();
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
op = body.call(thisArg, _);
|
|
112
|
+
} catch (e) {
|
|
113
|
+
op = [
|
|
114
|
+
6,
|
|
115
|
+
e
|
|
116
|
+
];
|
|
117
|
+
y = 0;
|
|
118
|
+
} finally{
|
|
119
|
+
f = t = 0;
|
|
120
|
+
}
|
|
121
|
+
if (op[0] & 5) throw op[1];
|
|
122
|
+
return {
|
|
123
|
+
value: op[0] ? op[1] : void 0,
|
|
124
|
+
done: true
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
129
|
+
import { getCodeValue, isWebOTPSupported } from "../utils";
|
|
130
|
+
var isOTPCredential = function(credential) {
|
|
131
|
+
return credential !== null && 'code' in credential;
|
|
132
|
+
};
|
|
133
|
+
export var useWebOTP = function(param) {
|
|
134
|
+
var codeString = param.codeString, enableSMSAutoRead = param.enableSMSAutoRead, disabled = param.disabled, codeLength = param.codeLength, codeSetter = param.codeSetter, onFullCodeEnter = param.onFullCodeEnter;
|
|
135
|
+
var abortControllerRef = useRef(null);
|
|
136
|
+
var startWebOTPListener = useCallback(function() {
|
|
137
|
+
return _async_to_generator(function() {
|
|
138
|
+
var otp, otpCode, newCode, err;
|
|
139
|
+
return _ts_generator(this, function(_state) {
|
|
140
|
+
switch(_state.label){
|
|
141
|
+
case 0:
|
|
142
|
+
if (!enableSMSAutoRead || disabled || !isWebOTPSupported()) {
|
|
143
|
+
return [
|
|
144
|
+
2
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
if (abortControllerRef.current) {
|
|
148
|
+
abortControllerRef.current.abort();
|
|
149
|
+
}
|
|
150
|
+
abortControllerRef.current = new AbortController();
|
|
151
|
+
_state.label = 1;
|
|
152
|
+
case 1:
|
|
153
|
+
_state.trys.push([
|
|
154
|
+
1,
|
|
155
|
+
3,
|
|
156
|
+
,
|
|
157
|
+
4
|
|
158
|
+
]);
|
|
159
|
+
return [
|
|
160
|
+
4,
|
|
161
|
+
navigator.credentials.get({
|
|
162
|
+
otp: {
|
|
163
|
+
transport: [
|
|
164
|
+
'sms'
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
signal: abortControllerRef.current.signal
|
|
168
|
+
})
|
|
169
|
+
];
|
|
170
|
+
case 2:
|
|
171
|
+
otp = _state.sent();
|
|
172
|
+
if (otp && isOTPCredential(otp) && otp.code) {
|
|
173
|
+
otpCode = otp.code;
|
|
174
|
+
if (otpCode.length === codeLength) {
|
|
175
|
+
newCode = getCodeValue(codeLength, otpCode);
|
|
176
|
+
codeSetter(newCode);
|
|
177
|
+
if (onFullCodeEnter) {
|
|
178
|
+
onFullCodeEnter(otpCode);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return [
|
|
183
|
+
3,
|
|
184
|
+
4
|
|
185
|
+
];
|
|
186
|
+
case 3:
|
|
187
|
+
err = _state.sent();
|
|
188
|
+
if (_instanceof(err, DOMException)) {
|
|
189
|
+
if (err.name !== 'AbortError' && err.name !== 'NotAllowedError') {
|
|
190
|
+
console.warn('Web OTP API error:', err);
|
|
191
|
+
}
|
|
192
|
+
} else if (_instanceof(err, Error)) {
|
|
193
|
+
console.warn('Web OTP API error:', err);
|
|
194
|
+
} else {
|
|
195
|
+
console.warn('Unknown Web OTP API error:', err);
|
|
196
|
+
}
|
|
197
|
+
return [
|
|
198
|
+
3,
|
|
199
|
+
4
|
|
200
|
+
];
|
|
201
|
+
case 4:
|
|
202
|
+
return [
|
|
203
|
+
2
|
|
204
|
+
];
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
})();
|
|
208
|
+
}, [
|
|
209
|
+
enableSMSAutoRead,
|
|
210
|
+
disabled,
|
|
211
|
+
codeLength,
|
|
212
|
+
onFullCodeEnter
|
|
213
|
+
]);
|
|
214
|
+
var stopWebOTPListener = useCallback(function() {
|
|
215
|
+
if (abortControllerRef.current) {
|
|
216
|
+
abortControllerRef.current.abort();
|
|
217
|
+
abortControllerRef.current = null;
|
|
218
|
+
}
|
|
219
|
+
}, []);
|
|
220
|
+
useEffect(function() {
|
|
221
|
+
if (isWebOTPSupported() && codeString === '' && enableSMSAutoRead && !disabled) {
|
|
222
|
+
startWebOTPListener();
|
|
223
|
+
} else {
|
|
224
|
+
stopWebOTPListener();
|
|
225
|
+
}
|
|
226
|
+
return function() {
|
|
227
|
+
stopWebOTPListener();
|
|
228
|
+
};
|
|
229
|
+
}, [
|
|
230
|
+
codeString,
|
|
231
|
+
enableSMSAutoRead,
|
|
232
|
+
disabled,
|
|
233
|
+
startWebOTPListener,
|
|
234
|
+
stopWebOTPListener
|
|
235
|
+
]);
|
|
236
|
+
};
|
|
@@ -27,7 +27,7 @@ import { classes } from "../CodeField.tokens";
|
|
|
27
27
|
import { ANIMATION_TIMEOUT } from "./constants";
|
|
28
28
|
import { getCodeValue } from "./initialValuesHelper";
|
|
29
29
|
export var handleCodeError = function(param) {
|
|
30
|
-
var codeLength = param.codeLength, codeErrorBehavior = param.codeErrorBehavior, currentCode = param.currentCode, inputRefs = param.inputRefs, inputContainerRef = param.inputContainerRef, captionRef = param.captionRef,
|
|
30
|
+
var codeLength = param.codeLength, codeErrorBehavior = param.codeErrorBehavior, currentCode = param.currentCode, inputRefs = param.inputRefs, inputContainerRef = param.inputContainerRef, captionRef = param.captionRef, setInnerValue = param.setInnerValue, codeSetter = param.codeSetter;
|
|
31
31
|
if (!inputContainerRef.current) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
@@ -41,7 +41,7 @@ export var handleCodeError = function(param) {
|
|
|
41
41
|
var newCode = _to_consumable_array(currentCode);
|
|
42
42
|
newCode.pop();
|
|
43
43
|
codeSetter(newCode);
|
|
44
|
-
|
|
44
|
+
setInnerValue(currentCode);
|
|
45
45
|
(_inputContainerRef_current = inputContainerRef.current) === null || _inputContainerRef_current === void 0 ? void 0 : _inputContainerRef_current.classList.remove(classes.codeErrorAnimation);
|
|
46
46
|
setTimeout(function() {
|
|
47
47
|
var _inputRefs_current_, _inputRefs_current_1;
|
|
@@ -26,14 +26,17 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
26
26
|
import { classes } from "../CodeField.tokens";
|
|
27
27
|
import { ANIMATION_TIMEOUT } from "./constants";
|
|
28
28
|
export var handleItemError = function(param) {
|
|
29
|
-
var currentSymbol = param.currentSymbol, itemErrorBehavior = param.itemErrorBehavior, index = param.index, newCode = param.newCode, inputRefs = param.inputRefs,
|
|
29
|
+
var currentSymbol = param.currentSymbol, itemErrorBehavior = param.itemErrorBehavior, index = param.index, newCode = param.newCode, inputRefs = param.inputRefs, setInnerValue = param.setInnerValue, codeSetter = param.codeSetter, onChange = param.onChange;
|
|
30
30
|
if (!inputRefs.current[index] || currentSymbol === ' ') {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
switch(itemErrorBehavior){
|
|
34
34
|
case 'keep':
|
|
35
35
|
var _inputRefs_current_index;
|
|
36
|
-
|
|
36
|
+
setInnerValue(newCode);
|
|
37
|
+
if (onChange) {
|
|
38
|
+
onChange(newCode.join(''));
|
|
39
|
+
}
|
|
37
40
|
(_inputRefs_current_index = inputRefs.current[index]) === null || _inputRefs_current_index === void 0 ? void 0 : _inputRefs_current_index.classList.add(classes.itemError, classes.itemErrorAnimation);
|
|
38
41
|
setTimeout(function() {
|
|
39
42
|
var _inputRefs_current_index;
|
|
@@ -47,11 +50,17 @@ export var handleItemError = function(param) {
|
|
|
47
50
|
case 'forbid-enter':
|
|
48
51
|
newCode[index] = '';
|
|
49
52
|
codeSetter(newCode);
|
|
53
|
+
if (onChange) {
|
|
54
|
+
onChange(newCode.join(''));
|
|
55
|
+
}
|
|
50
56
|
break;
|
|
51
57
|
case 'remove-symbol':
|
|
52
58
|
default:
|
|
53
59
|
var _inputRefs_current_index1;
|
|
54
|
-
|
|
60
|
+
setInnerValue(newCode);
|
|
61
|
+
if (onChange) {
|
|
62
|
+
onChange(newCode.join(''));
|
|
63
|
+
}
|
|
55
64
|
(_inputRefs_current_index1 = inputRefs.current[index]) === null || _inputRefs_current_index1 === void 0 ? void 0 : _inputRefs_current_index1.classList.add(classes.itemError, classes.itemErrorFade, classes.itemErrorAnimation);
|
|
56
65
|
setTimeout(function() {
|
|
57
66
|
var _inputRefs_current_index;
|
|
@@ -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,10 +206,11 @@ 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;
|
|
213
|
+
var rootRef = useRef(null);
|
|
225
214
|
var inputRef = useRef(null);
|
|
226
215
|
var floatingPopoverRef = useRef(null);
|
|
227
216
|
var inputForkRef = useForkRef(inputRef, ref);
|
|
@@ -256,15 +245,7 @@ import { Context } from "./Combobox.context";
|
|
|
256
245
|
if (!isCurrentListOpen || alwaysOpened) {
|
|
257
246
|
return;
|
|
258
247
|
}
|
|
259
|
-
|
|
260
|
-
type: 'reset'
|
|
261
|
-
});
|
|
262
|
-
dispatchFocusedPath({
|
|
263
|
-
type: 'reset'
|
|
264
|
-
});
|
|
265
|
-
if (onToggle) {
|
|
266
|
-
onToggle(false);
|
|
267
|
-
}
|
|
248
|
+
handleListToggle(false);
|
|
268
249
|
// Возвращаем актуальное значение поля ввода после закрытия выпадающего списка.
|
|
269
250
|
setTextValue(getTextValue(multiple, value, valueToItemMap, renderValue));
|
|
270
251
|
}, floatingPopoverRef);
|
|
@@ -306,39 +287,18 @@ import { Context } from "./Combobox.context";
|
|
|
306
287
|
}
|
|
307
288
|
};
|
|
308
289
|
// Обработчик чипов
|
|
309
|
-
var
|
|
290
|
+
var handleChipClick = function(chip) {
|
|
310
291
|
if (!Array.isArray(value)) return;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
var resultValues = _to_consumable_array(value);
|
|
315
|
-
value.forEach(function(_, index) {
|
|
292
|
+
if (isTargetAmount) {
|
|
293
|
+
// При закрытии чипа в режиме isTargetAmount в value оставляем только disabled-элементы
|
|
294
|
+
onChange(value.filter(function(val) {
|
|
316
295
|
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);
|
|
296
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
297
|
+
}));
|
|
332
298
|
} 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);
|
|
299
|
+
onChange(value.filter(function(val) {
|
|
300
|
+
return val !== chip.value;
|
|
301
|
+
}), valueToItemMap.get(chip.value) || null);
|
|
342
302
|
}
|
|
343
303
|
};
|
|
344
304
|
// Обработчик открытия/закрытия выпадающего списка
|
|
@@ -351,12 +311,18 @@ import { Context } from "./Combobox.context";
|
|
|
351
311
|
type: 'opened_first_level'
|
|
352
312
|
});
|
|
353
313
|
} else {
|
|
314
|
+
var _rootRef_current;
|
|
354
315
|
dispatchFocusedPath({
|
|
355
316
|
type: 'reset'
|
|
356
317
|
});
|
|
357
318
|
dispatchPath({
|
|
358
319
|
type: 'reset'
|
|
359
320
|
});
|
|
321
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
322
|
+
var el = rootRef === null || rootRef === void 0 ? void 0 : (_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.querySelector('.input-scrollable-wrapper');
|
|
323
|
+
if (multiple && value.length > 0 && el) {
|
|
324
|
+
el.scrollLeft = 0;
|
|
325
|
+
}
|
|
360
326
|
}
|
|
361
327
|
if (onToggle) {
|
|
362
328
|
onToggle(opened);
|
|
@@ -368,14 +334,32 @@ import { Context } from "./Combobox.context";
|
|
|
368
334
|
return;
|
|
369
335
|
}
|
|
370
336
|
var checkedCopy = new Map(checked);
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
337
|
+
switch(checkedCopy.get(item.value)){
|
|
338
|
+
// Если чекбокс в состоянии indeterminate
|
|
339
|
+
case 'indeterminate':
|
|
340
|
+
{
|
|
341
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
// Если чекбокс в состоянии checked
|
|
345
|
+
case true:
|
|
346
|
+
{
|
|
347
|
+
updateDescendants(item, checkedCopy, false, valueToItemMap);
|
|
348
|
+
checkedCopy.set(item.value, false);
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
// Если чекбокс в состоянии unchecked
|
|
352
|
+
case false:
|
|
353
|
+
{
|
|
354
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
355
|
+
checkedCopy.set(item.value, true);
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
default:
|
|
359
|
+
{
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
377
362
|
}
|
|
378
|
-
updateAncestors(item, checkedCopy);
|
|
379
363
|
var newValues = [];
|
|
380
364
|
valueToItemMap.forEach(function(item, key) {
|
|
381
365
|
if (checkedCopy.get(key)) {
|
|
@@ -442,20 +426,28 @@ import { Context } from "./Combobox.context";
|
|
|
442
426
|
if (value.length === 0) return [];
|
|
443
427
|
if (isTargetAmount) {
|
|
444
428
|
return [
|
|
445
|
-
|
|
429
|
+
{
|
|
430
|
+
value: '_removeAll',
|
|
431
|
+
label: "Выбрано ".concat(targetAmount || value.length),
|
|
432
|
+
disabled: value.every(function(val) {
|
|
433
|
+
var _valueToItemMap_get;
|
|
434
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
435
|
+
})
|
|
436
|
+
}
|
|
446
437
|
];
|
|
447
438
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
439
|
+
return value.map(function(value) {
|
|
440
|
+
var _valueToItemMap_get, _valueToItemMap_get1;
|
|
441
|
+
var currentLabel = renderValue ? renderValue(valueToItemMap.get(value) || {
|
|
442
|
+
value: value,
|
|
443
|
+
label: value
|
|
444
|
+
}) : ((_valueToItemMap_get = valueToItemMap.get(value)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.label) || value.toString();
|
|
445
|
+
return {
|
|
446
|
+
value: value,
|
|
447
|
+
label: currentLabel,
|
|
448
|
+
disabled: ((_valueToItemMap_get1 = valueToItemMap.get(value)) === null || _valueToItemMap_get1 === void 0 ? void 0 : _valueToItemMap_get1.disabled) || false
|
|
449
|
+
};
|
|
450
|
+
});
|
|
459
451
|
}
|
|
460
452
|
return [];
|
|
461
453
|
};
|
|
@@ -541,7 +533,8 @@ import { Context } from "./Combobox.context";
|
|
|
541
533
|
readOnly: readOnly,
|
|
542
534
|
name: name,
|
|
543
535
|
hintView: hintView,
|
|
544
|
-
hintSize: hintSize
|
|
536
|
+
hintSize: hintSize,
|
|
537
|
+
ref: rootRef
|
|
545
538
|
}, name && /*#__PURE__*/ React.createElement(SelectNative, {
|
|
546
539
|
items: valueToItemMap,
|
|
547
540
|
name: name,
|
|
@@ -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);
|