@salutejs/plasma-new-hope 0.336.0-canary.2214.17665690388.0 → 0.336.0-canary.2214.17729218564.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/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 +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/components/Tree/Tree.css +7 -7
- package/cjs/components/Tree/Tree.styles.js +1 -1
- package/cjs/components/Tree/Tree.styles.js.map +1 -1
- package/cjs/components/Tree/Tree.styles_1bw3k0r.css +8 -0
- package/cjs/index.css +35 -29
- 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/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 +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/components/Tree/Tree.styles.js +15 -15
- 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/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/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 +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/components/Tree/Tree.styles.js +15 -15
- package/emotion/es/examples/components/Combobox/Combobox.js +0 -7
- package/emotion/es/examples/components/Pagination/Pagination.config.js +12 -12
- 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/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 +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/components/Tree/Tree.css +7 -7
- package/es/components/Tree/Tree.styles.js +1 -1
- package/es/components/Tree/Tree.styles.js.map +1 -1
- package/es/components/Tree/Tree.styles_1bw3k0r.css +8 -0
- package/es/index.css +35 -29
- 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/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 +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/components/Tree/Tree.styles.js +9 -9
- package/styled-components/cjs/examples/components/Combobox/Combobox.js +15 -0
- 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/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/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 +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/components/Tree/Tree.styles.js +9 -9
- package/styled-components/es/examples/components/Combobox/Combobox.js +0 -7
- 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/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/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/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/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_1dzmptg.css +0 -8
- 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_1dzmptg.css +0 -8
- 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);
|
|
@@ -99,9 +99,10 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
99
99
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
100
100
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
101
101
|
}
|
|
102
|
-
import React, { useState, forwardRef, Fragment } from "react";
|
|
102
|
+
import React, { useState, forwardRef, Fragment, useRef, useEffect } from "react";
|
|
103
|
+
import { useForkRef } from "@salutejs/plasma-core";
|
|
103
104
|
import { cx, isNumber } from "../../utils";
|
|
104
|
-
import { PaginationPages, PaginationActions, PaginationButton, PaginationSection, PaginationButtonGroup, PaginationRoot, PaginationShorter } from "./Pagination.styles";
|
|
105
|
+
import { PaginationPages, PaginationActions, PaginationButton, PaginationSection, PaginationButtonGroup, PaginationRoot, PaginationShorter, PaginationActionsLeft, PaginationHelperText } from "./Pagination.styles";
|
|
105
106
|
import { getSections, defaultValues } from "./utils";
|
|
106
107
|
import { base as viewCSS } from "./variations/_view/base";
|
|
107
108
|
import { base as typeCSS } from "./variations/_type/base";
|
|
@@ -111,9 +112,11 @@ import { PaginationQuickJumpToPage } from "./ui/PaginationQuickJumpToPage/Pagina
|
|
|
111
112
|
import { PaginationSelectPerPage } from "./ui/PaginationSelectPerPage/PaginationSelectPerPage";
|
|
112
113
|
export var paginationRoot = function(Root) {
|
|
113
114
|
return /*#__PURE__*/ forwardRef(function(_param, ref) {
|
|
114
|
-
var outerValue = _param.value, defaultValue = _param.defaultValue, outerPerPage = _param.perPage, defaultPerPage = _param.defaultPerPage, _param_slots = _param.slots, slots = _param_slots === void 0 ? defaultValues.slots : _param_slots, view = _param.view, viewCurrentPage = _param.viewCurrentPage, _param_type = _param.type, type = _param_type === void 0 ? defaultValues.type : _param_type, size = _param.size, _param_pilled = _param.pilled, pilled = _param_pilled === void 0 ? defaultValues.pilled : _param_pilled, _param_square = _param.square, square = _param_square === void 0 ? defaultValues.square : _param_square, _param_disabledPages = _param.disabledPages, disabledPages = _param_disabledPages === void 0 ? defaultValues.disabledPages : _param_disabledPages, _param_count = _param.count, count = _param_count === void 0 ? defaultValues.value : _param_count, _param_hasQuickJump = _param.hasQuickJump, hasQuickJump = _param_hasQuickJump === void 0 ? defaultValues.hasQuickJump : _param_hasQuickJump, _param_hasPerPage = _param.hasPerPage, hasPerPage = _param_hasPerPage === void 0 ? defaultValues.hasPerPage : _param_hasPerPage, _param_perPageList = _param.perPageList, perPageList = _param_perPageList === void 0 ? defaultValues.perPageList : _param_perPageList, _param_isCommonButtonStyles = _param.isCommonButtonStyles, isCommonButtonStyles = _param_isCommonButtonStyles === void 0 ? defaultValues.isCommonButtonStyles : _param_isCommonButtonStyles, _param_placeholderQuickJump = _param.placeholderQuickJump, placeholderQuickJump = _param_placeholderQuickJump === void 0 ? defaultValues.placeholderQuickJump : _param_placeholderQuickJump, _param_textQuickJump = _param.textQuickJump, textQuickJump = _param_textQuickJump === void 0 ? defaultValues.textQuickJump : _param_textQuickJump, _param_textPerPage = _param.textPerPage, textPerPage = _param_textPerPage === void 0 ? defaultValues.textPerPage : _param_textPerPage, leftContent = _param.leftContent, rightContent = _param.rightContent, _param_listWidth = _param.listWidth, listWidth = _param_listWidth === void 0 ? 'fit-content' : _param_listWidth, onChangePageValue = _param.onChangePageValue, onChangePerPageValue = _param.onChangePerPageValue, onChange = _param.onChange, rest = _object_without_properties(_param, [
|
|
115
|
+
var outerValue = _param.value, defaultValue = _param.defaultValue, helperText = _param.helperText, singleLine = _param.singleLine, outerPerPage = _param.perPage, defaultPerPage = _param.defaultPerPage, _param_slots = _param.slots, slots = _param_slots === void 0 ? defaultValues.slots : _param_slots, view = _param.view, viewCurrentPage = _param.viewCurrentPage, _param_type = _param.type, type = _param_type === void 0 ? defaultValues.type : _param_type, size = _param.size, _param_pilled = _param.pilled, pilled = _param_pilled === void 0 ? defaultValues.pilled : _param_pilled, _param_square = _param.square, square = _param_square === void 0 ? defaultValues.square : _param_square, _param_disabledPages = _param.disabledPages, disabledPages = _param_disabledPages === void 0 ? defaultValues.disabledPages : _param_disabledPages, _param_count = _param.count, count = _param_count === void 0 ? defaultValues.value : _param_count, _param_hasQuickJump = _param.hasQuickJump, hasQuickJump = _param_hasQuickJump === void 0 ? defaultValues.hasQuickJump : _param_hasQuickJump, _param_hasPerPage = _param.hasPerPage, hasPerPage = _param_hasPerPage === void 0 ? defaultValues.hasPerPage : _param_hasPerPage, _param_perPageList = _param.perPageList, perPageList = _param_perPageList === void 0 ? defaultValues.perPageList : _param_perPageList, _param_isCommonButtonStyles = _param.isCommonButtonStyles, isCommonButtonStyles = _param_isCommonButtonStyles === void 0 ? defaultValues.isCommonButtonStyles : _param_isCommonButtonStyles, _param_placeholderQuickJump = _param.placeholderQuickJump, placeholderQuickJump = _param_placeholderQuickJump === void 0 ? defaultValues.placeholderQuickJump : _param_placeholderQuickJump, _param_textQuickJump = _param.textQuickJump, textQuickJump = _param_textQuickJump === void 0 ? defaultValues.textQuickJump : _param_textQuickJump, _param_textPerPage = _param.textPerPage, textPerPage = _param_textPerPage === void 0 ? defaultValues.textPerPage : _param_textPerPage, leftContent = _param.leftContent, rightContent = _param.rightContent, _param_listWidth = _param.listWidth, listWidth = _param_listWidth === void 0 ? 'fit-content' : _param_listWidth, onChangePageValue = _param.onChangePageValue, onChangePerPageValue = _param.onChangePerPageValue, onChange = _param.onChange, rest = _object_without_properties(_param, [
|
|
115
116
|
"value",
|
|
116
117
|
"defaultValue",
|
|
118
|
+
"helperText",
|
|
119
|
+
"singleLine",
|
|
117
120
|
"perPage",
|
|
118
121
|
"defaultPerPage",
|
|
119
122
|
"slots",
|
|
@@ -143,11 +146,16 @@ export var paginationRoot = function(Root) {
|
|
|
143
146
|
var pageValue = outerValue !== null && outerValue !== void 0 ? outerValue : pageInner;
|
|
144
147
|
var _useState1 = _sliced_to_array(useState(hasPerPage ? defaultPerPage || defaultValues.perPage : undefined), 2), perPageInner = _useState1[0], setPerPageInner = _useState1[1];
|
|
145
148
|
var perPageValue = outerPerPage !== null && outerPerPage !== void 0 ? outerPerPage : perPageInner;
|
|
149
|
+
var pagesRef = useRef(null);
|
|
150
|
+
var _useState2 = _sliced_to_array(useState(0), 2), pagesWidth = _useState2[0], setPagesWidth = _useState2[1];
|
|
151
|
+
var _useState3 = _sliced_to_array(useState(0), 2), rootWidth = _useState3[0], setRootWidth = _useState3[1];
|
|
152
|
+
var rootRef = useRef(null);
|
|
153
|
+
var forkRef = useForkRef(rootRef, ref);
|
|
146
154
|
var pages = Math.ceil(count / (perPageValue || 1));
|
|
147
155
|
var sections = getSections(pageValue, pages, slots);
|
|
148
156
|
var typeClass = classes["".concat(type, "Type")];
|
|
149
157
|
var roundedClass = pilled ? 'circle-circle' : 'square-square';
|
|
150
|
-
var withHasPerPageSelect = hasPerPage ? classes.withHasPerPageSelect : undefined;
|
|
158
|
+
var withHasPerPageSelect = hasPerPage && !helperText ? classes.withHasPerPageSelect : undefined;
|
|
151
159
|
var withHasQuickJump = hasQuickJump ? classes.withHasQuickJump : undefined;
|
|
152
160
|
var disabled = disabledPages.map(function(el) {
|
|
153
161
|
return isNumber(el) ? Number(el) : null;
|
|
@@ -185,15 +193,43 @@ export var paginationRoot = function(Root) {
|
|
|
185
193
|
var isActiveButton = function(checkPage) {
|
|
186
194
|
return pageValue === checkPage ? classes.paginationPageButtonActive : '';
|
|
187
195
|
};
|
|
196
|
+
useEffect(function() {
|
|
197
|
+
var observers = [];
|
|
198
|
+
if (pagesRef.current) {
|
|
199
|
+
var pagesObserver = new ResizeObserver(function(entries) {
|
|
200
|
+
var newWidth = entries[0].contentRect.width;
|
|
201
|
+
setPagesWidth(newWidth);
|
|
202
|
+
});
|
|
203
|
+
pagesObserver.observe(pagesRef.current);
|
|
204
|
+
observers.push(pagesObserver);
|
|
205
|
+
}
|
|
206
|
+
if (rootRef.current) {
|
|
207
|
+
var rootObserver = new ResizeObserver(function(entries) {
|
|
208
|
+
var newWidth = entries[0].contentRect.width;
|
|
209
|
+
setRootWidth(newWidth);
|
|
210
|
+
});
|
|
211
|
+
rootObserver.observe(rootRef.current);
|
|
212
|
+
observers.push(rootObserver);
|
|
213
|
+
}
|
|
214
|
+
return function() {
|
|
215
|
+
observers.forEach(function(observer) {
|
|
216
|
+
return observer.disconnect();
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
}, [
|
|
220
|
+
type
|
|
221
|
+
]);
|
|
188
222
|
return /*#__PURE__*/ React.createElement(Root, _object_spread({
|
|
189
223
|
size: size,
|
|
190
224
|
view: view,
|
|
191
225
|
viewCurrentPage: viewCurrentPage,
|
|
192
226
|
className: cx(classes.wrapper, typeClass),
|
|
193
|
-
ref:
|
|
227
|
+
ref: forkRef
|
|
194
228
|
}, rest), /*#__PURE__*/ React.createElement(PaginationRoot, {
|
|
195
229
|
className: typeClass
|
|
196
|
-
}, /*#__PURE__*/ React.createElement(PaginationPages,
|
|
230
|
+
}, /*#__PURE__*/ React.createElement(PaginationPages, {
|
|
231
|
+
ref: pagesRef
|
|
232
|
+
}, leftContent && /*#__PURE__*/ React.createElement(PaginationButtonGroup, {
|
|
197
233
|
isCommonButtonStyles: isCommonButtonStyles
|
|
198
234
|
}, leftContent), sections && sections.map(function(section, indexSection) {
|
|
199
235
|
return /*#__PURE__*/ React.createElement(Fragment, {
|
|
@@ -217,12 +253,24 @@ export var paginationRoot = function(Root) {
|
|
|
217
253
|
}), rightContent && /*#__PURE__*/ React.createElement(PaginationButtonGroup, {
|
|
218
254
|
isCommonButtonStyles: isCommonButtonStyles
|
|
219
255
|
}, rightContent)), /*#__PURE__*/ React.createElement(PaginationActions, {
|
|
256
|
+
style: type === 'compact' ? {
|
|
257
|
+
minWidth: '0px'
|
|
258
|
+
} : {
|
|
259
|
+
width: "calc(100% - ".concat(pagesWidth, "px)")
|
|
260
|
+
},
|
|
220
261
|
className: cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)
|
|
262
|
+
}, /*#__PURE__*/ React.createElement(PaginationActionsLeft, {
|
|
263
|
+
className: typeClass
|
|
221
264
|
}, hasQuickJump && /*#__PURE__*/ React.createElement(PaginationQuickJumpToPage, {
|
|
222
265
|
placeholderQuickJump: placeholderQuickJump,
|
|
223
266
|
textQuickJump: textQuickJump,
|
|
224
267
|
onChangeValue: handleSetPage
|
|
225
|
-
}),
|
|
268
|
+
}), helperText && /*#__PURE__*/ React.createElement(PaginationHelperText, {
|
|
269
|
+
className: cx(typeClass, singleLine ? classes.ellipsisText : ''),
|
|
270
|
+
style: {
|
|
271
|
+
maxWidth: rootWidth
|
|
272
|
+
}
|
|
273
|
+
}, helperText)), hasPerPage && /*#__PURE__*/ React.createElement(PaginationSelectPerPage, {
|
|
226
274
|
textPerPage: textPerPage,
|
|
227
275
|
perPageValue: perPageValue,
|
|
228
276
|
perPageList: perPageList,
|