@salutejs/plasma-new-hope 0.336.0-canary.2227.17672582071.0 → 0.336.0-canary.2228.17762482450.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/Attach/Attach.css +9 -7
- package/cjs/components/Attach/Attach.js +13 -59
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/Attach.styles.js +21 -9
- package/cjs/components/Attach/Attach.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.styles_pso18d.css +7 -0
- package/cjs/components/Attach/utils/getFileicon.js +2 -2
- package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
- package/cjs/components/Attach/variations/_helperTextView/base.js +1 -1
- package/cjs/components/Attach/variations/_helperTextView/base_1tgnvl9.css +1 -0
- package/cjs/components/Attach/variations/_size/base.js +1 -1
- package/cjs/components/Attach/variations/_size/base.js.map +1 -1
- package/cjs/components/Attach/variations/_size/{base_a4eelx.css → base_909kyb.css} +1 -1
- 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/cjs/components/Pagination/{Pagination.styles_ska0td.css → 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 +44 -35
- package/emotion/cjs/components/Attach/Attach.js +12 -51
- package/emotion/cjs/components/Attach/Attach.styles.js +28 -13
- package/emotion/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/emotion/cjs/components/Attach/utils/index.js +2 -10
- package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
- 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/Pagination/Pagination.config.js +12 -12
- package/emotion/cjs/examples/components/Tree/Tree.config.js +5 -5
- package/emotion/es/components/Attach/Attach.js +16 -55
- package/emotion/es/components/Attach/Attach.styles.js +20 -11
- package/emotion/es/components/Attach/utils/getFileicon.js +1 -1
- package/emotion/es/components/Attach/utils/index.js +1 -3
- package/emotion/es/components/Attach/variations/_size/base.js +2 -2
- 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/Combobox/Combobox.js +7 -0
- package/emotion/es/examples/components/Pagination/Pagination.config.js +12 -12
- package/emotion/es/examples/components/Tree/Tree.config.js +5 -5
- package/es/components/Attach/Attach.css +9 -7
- package/es/components/Attach/Attach.js +17 -63
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/Attach.styles.js +19 -9
- package/es/components/Attach/Attach.styles.js.map +1 -1
- package/es/components/Attach/Attach.styles_pso18d.css +7 -0
- package/es/components/Attach/utils/getFileicon.js +2 -2
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/variations/_helperTextView/base.js +1 -1
- package/es/components/Attach/variations/_helperTextView/base_1tgnvl9.css +1 -0
- package/es/components/Attach/variations/_size/base.js +1 -1
- package/es/components/Attach/variations/_size/base.js.map +1 -1
- package/es/components/Attach/variations/_size/{base_a4eelx.css → base_909kyb.css} +1 -1
- 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/es/components/Pagination/{Pagination.styles_ska0td.css → 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 +44 -35
- package/package.json +4 -4
- package/styled-components/cjs/components/Attach/Attach.js +12 -51
- package/styled-components/cjs/components/Attach/Attach.styles.js +31 -11
- package/styled-components/cjs/components/Attach/utils/getFileicon.js +3 -3
- package/styled-components/cjs/components/Attach/utils/index.js +2 -10
- package/styled-components/cjs/components/Attach/variations/_size/base.js +1 -1
- 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/Tree/Tree.config.js +6 -2
- package/styled-components/es/components/Attach/Attach.js +16 -55
- package/styled-components/es/components/Attach/Attach.styles.js +23 -9
- package/styled-components/es/components/Attach/utils/getFileicon.js +1 -1
- package/styled-components/es/components/Attach/utils/index.js +1 -3
- package/styled-components/es/components/Attach/variations/_size/base.js +2 -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 +0 -7
- package/styled-components/es/examples/components/Pagination/Pagination.config.js +18 -11
- package/styled-components/es/examples/components/Tree/Tree.config.js +6 -2
- package/types/components/Attach/Attach.d.ts.map +1 -1
- package/types/components/Attach/Attach.styles.d.ts +3 -1
- package/types/components/Attach/Attach.styles.d.ts.map +1 -1
- package/types/components/Attach/Attach.types.d.ts +7 -0
- package/types/components/Attach/Attach.types.d.ts.map +1 -1
- package/types/components/Attach/utils/getFileicon.d.ts +1 -1
- package/types/components/Attach/utils/index.d.ts +1 -3
- package/types/components/Attach/utils/index.d.ts.map +1 -1
- 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/Attach/Attach.d.ts.map +1 -1
- package/types/examples/components/Pagination/Pagination.config.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/Attach/Attach.styles_1w3ga58.css +0 -5
- package/cjs/components/Attach/utils/addSeparator.js +0 -18
- package/cjs/components/Attach/utils/addSeparator.js.map +0 -1
- package/cjs/components/Attach/utils/index.js +0 -8
- package/cjs/components/Attach/utils/index.js.map +0 -1
- package/cjs/components/Attach/variations/_helperTextView/base_1vgke1p.css +0 -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/Attach/utils/addSeparator.js +0 -20
- 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/Attach/utils/addSeparator.js +0 -10
- package/emotion/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/emotion/es/components/Select/utils/getRemovedElement.js +0 -10
- package/es/components/Attach/Attach.styles_1w3ga58.css +0 -5
- package/es/components/Attach/utils/addSeparator.js +0 -14
- package/es/components/Attach/utils/addSeparator.js.map +0 -1
- package/es/components/Attach/utils/index.js +0 -4
- package/es/components/Attach/utils/index.js.map +0 -1
- package/es/components/Attach/variations/_helperTextView/base_1vgke1p.css +0 -1
- 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/Attach/utils/addSeparator.js +0 -20
- 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/Attach/utils/addSeparator.js +0 -10
- 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/Attach/utils/addSeparator.d.ts +0 -2
- package/types/components/Attach/utils/addSeparator.d.ts.map +0 -1
- 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,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);
|
|
@@ -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,
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
import { buttonConfig, buttonTokens } from "../Button";
|
|
3
3
|
import { buttonGroupConfig, buttonGroupTokens } from "../ButtonGroup";
|
|
4
4
|
import { component, mergeConfig } from "../../engines";
|
|
5
|
-
import { addFocus } from "../../mixins";
|
|
5
|
+
import { addFocus, applyEllipsis } from "../../mixins";
|
|
6
6
|
import { classes, tokens } from "./Pagination.tokens";
|
|
7
7
|
var mergedButtonConfig = mergeConfig(buttonConfig);
|
|
8
8
|
var Button = component(mergedButtonConfig);
|
|
@@ -10,37 +10,39 @@ var mergedButtonGroupConfig = mergeConfig(buttonGroupConfig);
|
|
|
10
10
|
var ButtonGroup = component(mergedButtonGroupConfig);
|
|
11
11
|
export var PaginationRoot = styled.div.withConfig({
|
|
12
12
|
displayName: "Pagination.styles__PaginationRoot",
|
|
13
|
-
componentId: "sc-
|
|
13
|
+
componentId: "sc-ec0762a3-0"
|
|
14
14
|
})([
|
|
15
15
|
"display:flex;color:var(",
|
|
16
16
|
");&.",
|
|
17
|
-
"{
|
|
18
|
-
"{
|
|
17
|
+
"{flex-direction:column;gap:0.5rem;justify-content:flex-start;}&.",
|
|
18
|
+
"{width:100%;justify-content:space-between;flex:0 0 100%;gap:1rem;flex-wrap:nowrap;}"
|
|
19
19
|
], tokens.paginationColor, classes.compactType, classes.defaultType);
|
|
20
20
|
export var PaginationPages = styled.div.withConfig({
|
|
21
21
|
displayName: "Pagination.styles__PaginationPages",
|
|
22
|
-
componentId: "sc-
|
|
22
|
+
componentId: "sc-ec0762a3-1"
|
|
23
23
|
})([
|
|
24
|
-
"display:flex;align-items:center;gap:0.25rem;
|
|
24
|
+
"display:flex;align-items:center;gap:0.25rem;flex-shrink:0;"
|
|
25
25
|
]);
|
|
26
26
|
export var PaginationActions = styled.div.withConfig({
|
|
27
27
|
displayName: "Pagination.styles__PaginationActions",
|
|
28
|
-
componentId: "sc-
|
|
28
|
+
componentId: "sc-ec0762a3-2"
|
|
29
29
|
})([
|
|
30
|
-
"display:flex;justify-content:space-between;flex-grow:1;gap:
|
|
30
|
+
"display:flex;justify-content:space-between;flex-grow:1;align-items:center;gap:var(",
|
|
31
|
+
");flex-shrink:1;&.",
|
|
32
|
+
"{flex-direction:row;width:100%;flex-wrap:wrap;}&.",
|
|
31
33
|
"{flex-direction:row;}&.",
|
|
32
34
|
"{flex-direction:row-reverse;}&.",
|
|
33
35
|
"{flex-direction:row;}"
|
|
34
|
-
], classes.compactType, classes.withHasPerPageSelect, classes.withHasQuickJump);
|
|
36
|
+
], tokens.paginationHelperTextGap, classes.compactType, classes.defaultType, classes.withHasPerPageSelect, classes.withHasQuickJump);
|
|
35
37
|
export var PaginationSection = styled.div.withConfig({
|
|
36
38
|
displayName: "Pagination.styles__PaginationSection",
|
|
37
|
-
componentId: "sc-
|
|
39
|
+
componentId: "sc-ec0762a3-3"
|
|
38
40
|
})([
|
|
39
41
|
"display:flex;gap:0.125rem;"
|
|
40
42
|
]);
|
|
41
43
|
export var PaginationButtonGroup = styled(ButtonGroup).withConfig({
|
|
42
44
|
displayName: "Pagination.styles__PaginationButtonGroup",
|
|
43
|
-
componentId: "sc-
|
|
45
|
+
componentId: "sc-ec0762a3-4"
|
|
44
46
|
})([
|
|
45
47
|
"",
|
|
46
48
|
":var(",
|
|
@@ -82,7 +84,7 @@ export var PaginationButtonGroup = styled(ButtonGroup).withConfig({
|
|
|
82
84
|
], buttonGroupTokens.buttonColor, tokens.buttonColor, buttonGroupTokens.buttonBackgroundColor, tokens.buttonBackgroundColor, buttonGroupTokens.buttonColorHover, tokens.buttonHoverColor, buttonGroupTokens.buttonBackgroundColorHover, tokens.buttonBackgroundColorHover, buttonGroupTokens.buttonColorActive, tokens.buttonActiveColor, buttonGroupTokens.buttonBackgroundColorActive, tokens.buttonBackgroundColorActive, buttonGroupTokens.buttonFontFamily, tokens.paginationFontFamily, buttonGroupTokens.buttonFontSize, tokens.paginationFontSize, buttonGroupTokens.buttonFontStyle, tokens.paginationFontStyle, buttonGroupTokens.buttonFontWeight, tokens.paginationFontWeight, buttonGroupTokens.buttonLetterSpacing, tokens.paginationLetterSpacing, buttonGroupTokens.buttonLineHeight, tokens.paginationLineHeight, buttonGroupTokens.buttonWidth, tokens.buttonWidth, buttonGroupTokens.buttonHeight, tokens.buttonHeight, buttonGroupTokens.buttonDefaultRadius, tokens.buttonRadius, buttonGroupTokens.buttonSideRadius, tokens.buttonRadius, buttonGroupTokens.buttonSegmentedRadius, tokens.buttonRadius, buttonGroupTokens.buttonRadiusCircle, tokens.buttonRadius);
|
|
83
85
|
export var PaginationButton = styled(Button).withConfig({
|
|
84
86
|
displayName: "Pagination.styles__PaginationButton",
|
|
85
|
-
componentId: "sc-
|
|
87
|
+
componentId: "sc-ec0762a3-5"
|
|
86
88
|
})([
|
|
87
89
|
"",
|
|
88
90
|
":var(",
|
|
@@ -148,10 +150,29 @@ export var PaginationButton = styled(Button).withConfig({
|
|
|
148
150
|
}));
|
|
149
151
|
export var PaginationShorter = styled(PaginationButton).withConfig({
|
|
150
152
|
displayName: "Pagination.styles__PaginationShorter",
|
|
151
|
-
componentId: "sc-
|
|
153
|
+
componentId: "sc-ec0762a3-6"
|
|
152
154
|
})([
|
|
153
155
|
"",
|
|
154
156
|
":var(",
|
|
155
157
|
");",
|
|
156
158
|
":0;"
|
|
157
159
|
], buttonTokens.buttonWidth, tokens.buttonWidthShorter, buttonTokens.buttonPadding);
|
|
160
|
+
export var PaginationActionsLeft = styled.div.withConfig({
|
|
161
|
+
displayName: "Pagination.styles__PaginationActionsLeft",
|
|
162
|
+
componentId: "sc-ec0762a3-7"
|
|
163
|
+
})([
|
|
164
|
+
"display:flex;align-items:center;flex-wrap:wrap;gap:var(",
|
|
165
|
+
");.",
|
|
166
|
+
" &{min-width:0;flex-wrap:nowrap;flex-shrink:1;}"
|
|
167
|
+
], tokens.paginationHelperTextGap, classes.defaultType);
|
|
168
|
+
export var PaginationHelperText = styled.div.withConfig({
|
|
169
|
+
displayName: "Pagination.styles__PaginationHelperText",
|
|
170
|
+
componentId: "sc-ec0762a3-8"
|
|
171
|
+
})([
|
|
172
|
+
"color:var(",
|
|
173
|
+
");&.",
|
|
174
|
+
"{min-width:0;",
|
|
175
|
+
" flex-shrink:1;}&.",
|
|
176
|
+
"{",
|
|
177
|
+
"}"
|
|
178
|
+
], tokens.paginationHelperTextColor, classes.defaultType, applyEllipsis(), classes.ellipsisText, applyEllipsis());
|
|
@@ -4,6 +4,7 @@ export var classes = {
|
|
|
4
4
|
actions: 'pagination-actions',
|
|
5
5
|
perPage: 'pagination-perpage-select',
|
|
6
6
|
quickJump: 'pagination-quick-jump-page',
|
|
7
|
+
ellipsisText: 'pagination-ellipsis-text',
|
|
7
8
|
selectWrapper: 'pagination-select-wrapper',
|
|
8
9
|
defaultType: 'pagination-type-default',
|
|
9
10
|
compactType: 'pagination-type-compact',
|
|
@@ -17,6 +18,8 @@ export var classes = {
|
|
|
17
18
|
export var tokens = {
|
|
18
19
|
paginationWidth: '--plasma-pagination-width',
|
|
19
20
|
paginationColor: '--plasma-pagination-color',
|
|
21
|
+
paginationHelperTextColor: '--plasma-pagination-helper-text-color',
|
|
22
|
+
paginationHelperTextGap: '--plasma-pagination-helper-text-gap',
|
|
20
23
|
buttonBackgroundColor: '--plasma-pagination-button-bg-color',
|
|
21
24
|
buttonBackgroundColorHover: '--plasma-pagination-button-bg-color-hover',
|
|
22
25
|
buttonBackgroundColorActive: '--plasma-pagination-button-bg-color-active',
|
|
@@ -2,9 +2,9 @@ import styled from "styled-components";
|
|
|
2
2
|
import { tokens } from "../../Pagination.tokens";
|
|
3
3
|
export var QuickJumpToPageRoot = styled.div.withConfig({
|
|
4
4
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageRoot",
|
|
5
|
-
componentId: "sc-
|
|
5
|
+
componentId: "sc-d437c7e1-0"
|
|
6
6
|
})([
|
|
7
|
-
"display:flex;align-items:center;gap:0.5rem;font-family:var(",
|
|
7
|
+
"display:flex;align-items:center;gap:0.5rem;flex-shrink:0;font-family:var(",
|
|
8
8
|
");font-size:var(",
|
|
9
9
|
");font-style:var(",
|
|
10
10
|
");font-weight:var(",
|
|
@@ -14,13 +14,13 @@ export var QuickJumpToPageRoot = styled.div.withConfig({
|
|
|
14
14
|
], tokens.paginationFontFamily, tokens.paginationFontSize, tokens.paginationFontStyle, tokens.paginationFontWeight, tokens.paginationLetterSpacing, tokens.paginationLineHeight);
|
|
15
15
|
export var QuickJumpToPageTypography = styled.div.withConfig({
|
|
16
16
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageTypography",
|
|
17
|
-
componentId: "sc-
|
|
17
|
+
componentId: "sc-d437c7e1-1"
|
|
18
18
|
})([
|
|
19
|
-
""
|
|
19
|
+
"white-space:nowrap;"
|
|
20
20
|
]);
|
|
21
21
|
export var QuickJumpToPageInput = styled.input.withConfig({
|
|
22
22
|
displayName: "PaginationQuickJumpToPage.styles__QuickJumpToPageInput",
|
|
23
|
-
componentId: "sc-
|
|
23
|
+
componentId: "sc-d437c7e1-2"
|
|
24
24
|
})([
|
|
25
25
|
"background:var(",
|
|
26
26
|
");color:var(",
|