@salutejs/plasma-new-hope 0.336.0-canary.2220.17673344609.0 → 0.336.0-canary.2222.17762952669.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/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.js +11 -10
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/Drawer/Drawer.css +2 -2
- package/cjs/components/Drawer/Drawer.js +10 -7
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +10 -2
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/{es/components/Drawer/Drawer.styles_h5od79.css → cjs/components/Drawer/Drawer.styles_pltzxq.css} +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +10 -0
- package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +12 -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/{es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles_89ax1q.css → cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
- package/cjs/components/Popover/Popover.js +4 -1
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Select/Select.js +12 -10
- package/cjs/components/Select/Select.js.map +1 -1
- 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/TextField/TextField.js +1 -1
- 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/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 +34 -30
- 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 +10 -10
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/cjs/components/Drawer/Drawer.js +13 -4
- package/emotion/cjs/components/Drawer/Drawer.styles.js +7 -4
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +12 -0
- 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 +10 -10
- 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 +2 -2
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/components/Tree/Tree.js +31 -1
- package/emotion/cjs/components/Tree/Tree.styles.js +23 -13
- package/emotion/cjs/components/Tree/Tree.tokens.js +5 -2
- package/emotion/cjs/components/Tree/utils/traverseTree.js +3 -3
- package/emotion/cjs/examples/components/Combobox/Combobox.js +15 -0
- package/emotion/cjs/examples/components/Pagination/Pagination.config.js +12 -12
- package/emotion/cjs/examples/components/Range/Range.config.js +8 -7
- package/emotion/cjs/examples/components/Tree/Tree.config.js +5 -5
- package/emotion/es/components/CodeField/CodeField.js +64 -26
- package/emotion/es/components/CodeField/CodeField.styles.js +15 -11
- package/emotion/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/emotion/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/emotion/es/components/CodeField/utils/handleItemError.js +12 -3
- package/emotion/es/components/CodeField/utils/index.js +1 -0
- package/emotion/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/es/components/Drawer/Drawer.js +9 -5
- package/emotion/es/components/Drawer/Drawer.styles.js +8 -5
- package/emotion/es/components/Drawer/Drawer.tokens.js +9 -0
- 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 +10 -10
- 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 +2 -2
- package/emotion/es/components/TextField/TextField.tokens.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 +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/emotion/es/examples/components/Tree/Tree.config.js +5 -5
- 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.js +11 -10
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/Drawer/Drawer.css +2 -2
- package/es/components/Drawer/Drawer.js +8 -6
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +10 -2
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/{cjs/components/Drawer/Drawer.styles_h5od79.css → es/components/Drawer/Drawer.styles_pltzxq.css} +1 -1
- package/es/components/Drawer/Drawer.tokens.js +10 -1
- package/es/components/Drawer/Drawer.tokens.js.map +1 -1
- package/es/components/Pagination/Pagination.css +12 -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/{cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles_89ax1q.css → es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.styles_1sw6ww1.css} +2 -2
- package/es/components/Popover/Popover.js +4 -1
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Select/Select.js +12 -10
- package/es/components/Select/Select.js.map +1 -1
- 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/TextField/TextField.js +1 -1
- 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/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 +34 -30
- package/package.json +4 -4
- package/styled-components/cjs/components/CodeField/CodeField.js +61 -23
- package/styled-components/cjs/components/CodeField/CodeField.styles.js +14 -5
- package/styled-components/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
- package/styled-components/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/cjs/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/cjs/components/CodeField/utils/index.js +4 -0
- package/styled-components/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/cjs/components/Drawer/Drawer.js +13 -4
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +14 -4
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +12 -0
- 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 +10 -10
- 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 +1 -1
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/components/Tree/Tree.js +31 -1
- package/styled-components/cjs/components/Tree/Tree.styles.js +24 -8
- package/styled-components/cjs/components/Tree/Tree.tokens.js +5 -2
- package/styled-components/cjs/components/Tree/utils/traverseTree.js +3 -3
- package/styled-components/cjs/examples/components/Pagination/Pagination.config.js +18 -11
- package/styled-components/cjs/examples/components/Range/Range.config.js +46 -0
- package/styled-components/cjs/examples/components/Tree/Tree.config.js +6 -2
- package/styled-components/es/components/CodeField/CodeField.js +64 -26
- package/styled-components/es/components/CodeField/CodeField.styles.js +11 -5
- package/styled-components/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/styled-components/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/es/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/es/components/CodeField/utils/index.js +1 -0
- package/styled-components/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +10 -10
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/es/components/Drawer/Drawer.js +9 -5
- package/styled-components/es/components/Drawer/Drawer.styles.js +15 -5
- package/styled-components/es/components/Drawer/Drawer.tokens.js +9 -0
- 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 +10 -10
- 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 +1 -1
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/components/Tree/Tree.js +32 -2
- package/styled-components/es/components/Tree/Tree.styles.js +21 -8
- package/styled-components/es/components/Tree/Tree.tokens.js +5 -2
- package/styled-components/es/components/Tree/utils/traverseTree.js +3 -3
- package/styled-components/es/examples/components/Combobox/Combobox.js +7 -0
- package/styled-components/es/examples/components/Pagination/Pagination.config.js +18 -11
- package/styled-components/es/examples/components/Range/Range.config.js +46 -0
- package/styled-components/es/examples/components/Tree/Tree.config.js +6 -2
- package/types/components/CodeField/CodeField.d.ts.map +1 -1
- package/types/components/CodeField/CodeField.styles.d.ts +1 -0
- package/types/components/CodeField/CodeField.styles.d.ts.map +1 -1
- package/types/components/CodeField/hooks/useWebOTP.d.ts +20 -0
- package/types/components/CodeField/hooks/useWebOTP.d.ts.map +1 -0
- package/types/components/CodeField/utils/handleCodeError.d.ts +2 -2
- package/types/components/CodeField/utils/handleCodeError.d.ts.map +1 -1
- package/types/components/CodeField/utils/handleItemError.d.ts +3 -2
- package/types/components/CodeField/utils/handleItemError.d.ts.map +1 -1
- package/types/components/CodeField/utils/index.d.ts +1 -0
- package/types/components/CodeField/utils/index.d.ts.map +1 -1
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts +2 -0
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +2 -0
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts +2 -1
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +9 -0
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +16 -0
- package/types/components/Drawer/Drawer.types.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/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.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.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/Drawer/Drawer.d.ts +1 -0
- package/types/examples/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/components/Pagination/Pagination.config.d.ts.map +1 -1
- package/types/examples/components/Range/Range.config.d.ts +1 -0
- package/types/examples/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/components/Range/Range.d.ts +1 -0
- package/types/examples/components/Range/Range.d.ts.map +1 -1
- package/types/examples/components/Tree/Tree.config.d.ts.map +1 -1
- package/types/examples/components/Tree/Tree.d.ts.map +1 -1
- package/cjs/components/Tree/Tree.styles_6sla5y.css +0 -7
- package/es/components/Tree/Tree.styles_6sla5y.css +0 -7
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useWebOTP", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useWebOTP;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
14
|
+
try {
|
|
15
|
+
var info = gen[key](arg);
|
|
16
|
+
var value = info.value;
|
|
17
|
+
} catch (error) {
|
|
18
|
+
reject(error);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (info.done) {
|
|
22
|
+
resolve(value);
|
|
23
|
+
} else {
|
|
24
|
+
Promise.resolve(value).then(_next, _throw);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function _async_to_generator(fn) {
|
|
28
|
+
return function() {
|
|
29
|
+
var self = this, args = arguments;
|
|
30
|
+
return new Promise(function(resolve, reject) {
|
|
31
|
+
var gen = fn.apply(self, args);
|
|
32
|
+
function _next(value) {
|
|
33
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
34
|
+
}
|
|
35
|
+
function _throw(err) {
|
|
36
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
37
|
+
}
|
|
38
|
+
_next(undefined);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function _instanceof(left, right) {
|
|
43
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
44
|
+
return !!right[Symbol.hasInstance](left);
|
|
45
|
+
} else {
|
|
46
|
+
return left instanceof right;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function _ts_generator(thisArg, body) {
|
|
50
|
+
var f, y, t, _ = {
|
|
51
|
+
label: 0,
|
|
52
|
+
sent: function() {
|
|
53
|
+
if (t[0] & 1) throw t[1];
|
|
54
|
+
return t[1];
|
|
55
|
+
},
|
|
56
|
+
trys: [],
|
|
57
|
+
ops: []
|
|
58
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
59
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
60
|
+
return this;
|
|
61
|
+
}), g;
|
|
62
|
+
function verb(n) {
|
|
63
|
+
return function(v) {
|
|
64
|
+
return step([
|
|
65
|
+
n,
|
|
66
|
+
v
|
|
67
|
+
]);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function step(op) {
|
|
71
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
72
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
73
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
74
|
+
if (y = 0, t) op = [
|
|
75
|
+
op[0] & 2,
|
|
76
|
+
t.value
|
|
77
|
+
];
|
|
78
|
+
switch(op[0]){
|
|
79
|
+
case 0:
|
|
80
|
+
case 1:
|
|
81
|
+
t = op;
|
|
82
|
+
break;
|
|
83
|
+
case 4:
|
|
84
|
+
_.label++;
|
|
85
|
+
return {
|
|
86
|
+
value: op[1],
|
|
87
|
+
done: false
|
|
88
|
+
};
|
|
89
|
+
case 5:
|
|
90
|
+
_.label++;
|
|
91
|
+
y = op[1];
|
|
92
|
+
op = [
|
|
93
|
+
0
|
|
94
|
+
];
|
|
95
|
+
continue;
|
|
96
|
+
case 7:
|
|
97
|
+
op = _.ops.pop();
|
|
98
|
+
_.trys.pop();
|
|
99
|
+
continue;
|
|
100
|
+
default:
|
|
101
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
102
|
+
_ = 0;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
106
|
+
_.label = op[1];
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
110
|
+
_.label = t[1];
|
|
111
|
+
t = op;
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
if (t && _.label < t[2]) {
|
|
115
|
+
_.label = t[2];
|
|
116
|
+
_.ops.push(op);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
if (t[2]) _.ops.pop();
|
|
120
|
+
_.trys.pop();
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
op = body.call(thisArg, _);
|
|
124
|
+
} catch (e) {
|
|
125
|
+
op = [
|
|
126
|
+
6,
|
|
127
|
+
e
|
|
128
|
+
];
|
|
129
|
+
y = 0;
|
|
130
|
+
} finally{
|
|
131
|
+
f = t = 0;
|
|
132
|
+
}
|
|
133
|
+
if (op[0] & 5) throw op[1];
|
|
134
|
+
return {
|
|
135
|
+
value: op[0] ? op[1] : void 0,
|
|
136
|
+
done: true
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var isOTPCredential = function(credential) {
|
|
141
|
+
return credential !== null && 'code' in credential;
|
|
142
|
+
};
|
|
143
|
+
var useWebOTP = function(param) {
|
|
144
|
+
var codeString = param.codeString, enableSMSAutoRead = param.enableSMSAutoRead, disabled = param.disabled, codeLength = param.codeLength, codeSetter = param.codeSetter, onFullCodeEnter = param.onFullCodeEnter;
|
|
145
|
+
var abortControllerRef = (0, _react.useRef)(null);
|
|
146
|
+
var startWebOTPListener = (0, _react.useCallback)(function() {
|
|
147
|
+
return _async_to_generator(function() {
|
|
148
|
+
var otp, otpCode, newCode, err;
|
|
149
|
+
return _ts_generator(this, function(_state) {
|
|
150
|
+
switch(_state.label){
|
|
151
|
+
case 0:
|
|
152
|
+
if (!enableSMSAutoRead || disabled || !(0, _utils.isWebOTPSupported)()) {
|
|
153
|
+
return [
|
|
154
|
+
2
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
if (abortControllerRef.current) {
|
|
158
|
+
abortControllerRef.current.abort();
|
|
159
|
+
}
|
|
160
|
+
abortControllerRef.current = new AbortController();
|
|
161
|
+
_state.label = 1;
|
|
162
|
+
case 1:
|
|
163
|
+
_state.trys.push([
|
|
164
|
+
1,
|
|
165
|
+
3,
|
|
166
|
+
,
|
|
167
|
+
4
|
|
168
|
+
]);
|
|
169
|
+
return [
|
|
170
|
+
4,
|
|
171
|
+
navigator.credentials.get({
|
|
172
|
+
otp: {
|
|
173
|
+
transport: [
|
|
174
|
+
'sms'
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
signal: abortControllerRef.current.signal
|
|
178
|
+
})
|
|
179
|
+
];
|
|
180
|
+
case 2:
|
|
181
|
+
otp = _state.sent();
|
|
182
|
+
if (otp && isOTPCredential(otp) && otp.code) {
|
|
183
|
+
otpCode = otp.code;
|
|
184
|
+
if (otpCode.length === codeLength) {
|
|
185
|
+
newCode = (0, _utils.getCodeValue)(codeLength, otpCode);
|
|
186
|
+
codeSetter(newCode);
|
|
187
|
+
if (onFullCodeEnter) {
|
|
188
|
+
onFullCodeEnter(otpCode);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return [
|
|
193
|
+
3,
|
|
194
|
+
4
|
|
195
|
+
];
|
|
196
|
+
case 3:
|
|
197
|
+
err = _state.sent();
|
|
198
|
+
if (_instanceof(err, DOMException)) {
|
|
199
|
+
if (err.name !== 'AbortError' && err.name !== 'NotAllowedError') {
|
|
200
|
+
console.warn('Web OTP API error:', err);
|
|
201
|
+
}
|
|
202
|
+
} else if (_instanceof(err, Error)) {
|
|
203
|
+
console.warn('Web OTP API error:', err);
|
|
204
|
+
} else {
|
|
205
|
+
console.warn('Unknown Web OTP API error:', err);
|
|
206
|
+
}
|
|
207
|
+
return [
|
|
208
|
+
3,
|
|
209
|
+
4
|
|
210
|
+
];
|
|
211
|
+
case 4:
|
|
212
|
+
return [
|
|
213
|
+
2
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
})();
|
|
218
|
+
}, [
|
|
219
|
+
enableSMSAutoRead,
|
|
220
|
+
disabled,
|
|
221
|
+
codeLength,
|
|
222
|
+
onFullCodeEnter
|
|
223
|
+
]);
|
|
224
|
+
var stopWebOTPListener = (0, _react.useCallback)(function() {
|
|
225
|
+
if (abortControllerRef.current) {
|
|
226
|
+
abortControllerRef.current.abort();
|
|
227
|
+
abortControllerRef.current = null;
|
|
228
|
+
}
|
|
229
|
+
}, []);
|
|
230
|
+
(0, _react.useEffect)(function() {
|
|
231
|
+
if ((0, _utils.isWebOTPSupported)() && codeString === '' && enableSMSAutoRead && !disabled) {
|
|
232
|
+
startWebOTPListener();
|
|
233
|
+
} else {
|
|
234
|
+
stopWebOTPListener();
|
|
235
|
+
}
|
|
236
|
+
return function() {
|
|
237
|
+
stopWebOTPListener();
|
|
238
|
+
};
|
|
239
|
+
}, [
|
|
240
|
+
codeString,
|
|
241
|
+
enableSMSAutoRead,
|
|
242
|
+
disabled,
|
|
243
|
+
startWebOTPListener,
|
|
244
|
+
stopWebOTPListener
|
|
245
|
+
]);
|
|
246
|
+
};
|
|
@@ -37,7 +37,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
37
37
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
38
38
|
}
|
|
39
39
|
var handleCodeError = function(param) {
|
|
40
|
-
var codeLength = param.codeLength, codeErrorBehavior = param.codeErrorBehavior, currentCode = param.currentCode, inputRefs = param.inputRefs, inputContainerRef = param.inputContainerRef, captionRef = param.captionRef,
|
|
40
|
+
var codeLength = param.codeLength, codeErrorBehavior = param.codeErrorBehavior, currentCode = param.currentCode, inputRefs = param.inputRefs, inputContainerRef = param.inputContainerRef, captionRef = param.captionRef, setInnerValue = param.setInnerValue, codeSetter = param.codeSetter;
|
|
41
41
|
if (!inputContainerRef.current) {
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
@@ -51,7 +51,7 @@ var handleCodeError = function(param) {
|
|
|
51
51
|
var newCode = _to_consumable_array(currentCode);
|
|
52
52
|
newCode.pop();
|
|
53
53
|
codeSetter(newCode);
|
|
54
|
-
|
|
54
|
+
setInnerValue(currentCode);
|
|
55
55
|
(_inputContainerRef_current = inputContainerRef.current) === null || _inputContainerRef_current === void 0 ? void 0 : _inputContainerRef_current.classList.remove(_CodeFieldtokens.classes.codeErrorAnimation);
|
|
56
56
|
setTimeout(function() {
|
|
57
57
|
var _inputRefs_current_, _inputRefs_current_1;
|
|
@@ -36,14 +36,17 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
36
36
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
37
37
|
}
|
|
38
38
|
var handleItemError = function(param) {
|
|
39
|
-
var currentSymbol = param.currentSymbol, itemErrorBehavior = param.itemErrorBehavior, index = param.index, newCode = param.newCode, inputRefs = param.inputRefs,
|
|
39
|
+
var currentSymbol = param.currentSymbol, itemErrorBehavior = param.itemErrorBehavior, index = param.index, newCode = param.newCode, inputRefs = param.inputRefs, setInnerValue = param.setInnerValue, codeSetter = param.codeSetter, onChange = param.onChange;
|
|
40
40
|
if (!inputRefs.current[index] || currentSymbol === ' ') {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
switch(itemErrorBehavior){
|
|
44
44
|
case 'keep':
|
|
45
45
|
var _inputRefs_current_index;
|
|
46
|
-
|
|
46
|
+
setInnerValue(newCode);
|
|
47
|
+
if (onChange) {
|
|
48
|
+
onChange(newCode.join(''));
|
|
49
|
+
}
|
|
47
50
|
(_inputRefs_current_index = inputRefs.current[index]) === null || _inputRefs_current_index === void 0 ? void 0 : _inputRefs_current_index.classList.add(_CodeFieldtokens.classes.itemError, _CodeFieldtokens.classes.itemErrorAnimation);
|
|
48
51
|
setTimeout(function() {
|
|
49
52
|
var _inputRefs_current_index;
|
|
@@ -57,11 +60,17 @@ var handleItemError = function(param) {
|
|
|
57
60
|
case 'forbid-enter':
|
|
58
61
|
newCode[index] = '';
|
|
59
62
|
codeSetter(newCode);
|
|
63
|
+
if (onChange) {
|
|
64
|
+
onChange(newCode.join(''));
|
|
65
|
+
}
|
|
60
66
|
break;
|
|
61
67
|
case 'remove-symbol':
|
|
62
68
|
default:
|
|
63
69
|
var _inputRefs_current_index1;
|
|
64
|
-
|
|
70
|
+
setInnerValue(newCode);
|
|
71
|
+
if (onChange) {
|
|
72
|
+
onChange(newCode.join(''));
|
|
73
|
+
}
|
|
65
74
|
(_inputRefs_current_index1 = inputRefs.current[index]) === null || _inputRefs_current_index1 === void 0 ? void 0 : _inputRefs_current_index1.classList.add(_CodeFieldtokens.classes.itemError, _CodeFieldtokens.classes.itemErrorFade, _CodeFieldtokens.classes.itemErrorAnimation);
|
|
66
75
|
setTimeout(function() {
|
|
67
76
|
var _inputRefs_current_index;
|
|
@@ -23,8 +23,12 @@ _export(exports, {
|
|
|
23
23
|
},
|
|
24
24
|
get handleItemError () {
|
|
25
25
|
return _handleItemError.handleItemError;
|
|
26
|
+
},
|
|
27
|
+
get isWebOTPSupported () {
|
|
28
|
+
return _isWebOTPSupported.isWebOTPSupported;
|
|
26
29
|
}
|
|
27
30
|
});
|
|
28
31
|
var _initialValuesHelper = require("./initialValuesHelper");
|
|
29
32
|
var _handleItemError = require("./handleItemError");
|
|
30
33
|
var _handleCodeError = require("./handleCodeError");
|
|
34
|
+
var _isWebOTPSupported = require("./isWebOTPSupported");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "isWebOTPSupported", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return isWebOTPSupported;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var isWebOTPSupported = function() {
|
|
12
|
+
return typeof window !== 'undefined' && 'OTPCredential' in window && navigator.credentials && typeof navigator.credentials.get === 'function';
|
|
13
|
+
};
|
|
@@ -267,6 +267,7 @@ var comboboxRoot = function(Root) {
|
|
|
267
267
|
var _useState = _sliced_to_array((0, _react.useState)((0, _utils2.getTextValue)(multiple, outerValue, valueToItemMap, renderValue)), 2), textValue = _useState[0], setTextValue = _useState[1];
|
|
268
268
|
var _useState1 = _sliced_to_array((0, _react.useState)(multiple ? [] : ''), 2), internalValue = _useState1[0], setInternalValue = _useState1[1];
|
|
269
269
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
270
|
+
var rootRef = (0, _react.useRef)(null);
|
|
270
271
|
var inputRef = (0, _react.useRef)(null);
|
|
271
272
|
var floatingPopoverRef = (0, _react.useRef)(null);
|
|
272
273
|
var inputForkRef = (0, _plasmacore.useForkRef)(inputRef, ref);
|
|
@@ -301,15 +302,7 @@ var comboboxRoot = function(Root) {
|
|
|
301
302
|
if (!isCurrentListOpen || alwaysOpened) {
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
|
|
305
|
-
type: 'reset'
|
|
306
|
-
});
|
|
307
|
-
dispatchFocusedPath({
|
|
308
|
-
type: 'reset'
|
|
309
|
-
});
|
|
310
|
-
if (onToggle) {
|
|
311
|
-
onToggle(false);
|
|
312
|
-
}
|
|
305
|
+
handleListToggle(false);
|
|
313
306
|
// Возвращаем актуальное значение поля ввода после закрытия выпадающего списка.
|
|
314
307
|
setTextValue((0, _utils2.getTextValue)(multiple, value, valueToItemMap, renderValue));
|
|
315
308
|
}, floatingPopoverRef);
|
|
@@ -375,12 +368,18 @@ var comboboxRoot = function(Root) {
|
|
|
375
368
|
type: 'opened_first_level'
|
|
376
369
|
});
|
|
377
370
|
} else {
|
|
371
|
+
var _rootRef_current;
|
|
378
372
|
dispatchFocusedPath({
|
|
379
373
|
type: 'reset'
|
|
380
374
|
});
|
|
381
375
|
dispatchPath({
|
|
382
376
|
type: 'reset'
|
|
383
377
|
});
|
|
378
|
+
// Скроллим чипы к левому краю при закрытии компонента
|
|
379
|
+
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');
|
|
380
|
+
if (multiple && value.length > 0 && el) {
|
|
381
|
+
el.scrollLeft = 0;
|
|
382
|
+
}
|
|
384
383
|
}
|
|
385
384
|
if (onToggle) {
|
|
386
385
|
onToggle(opened);
|
|
@@ -591,7 +590,8 @@ var comboboxRoot = function(Root) {
|
|
|
591
590
|
readOnly: readOnly,
|
|
592
591
|
name: name,
|
|
593
592
|
hintView: hintView,
|
|
594
|
-
hintSize: hintSize
|
|
593
|
+
hintSize: hintSize,
|
|
594
|
+
ref: rootRef
|
|
595
595
|
}, name && /*#__PURE__*/ _react.default.createElement(_SelectNative.SelectNative, {
|
|
596
596
|
items: valueToItemMap,
|
|
597
597
|
name: name,
|
|
@@ -389,16 +389,6 @@ var datePickerRangeRoot = function(Root) {
|
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
391
|
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) !== _useKeyboardNavigation.keys.Escape ? true : currentOpened;
|
|
392
|
-
if (!isCalendarOpen) {
|
|
393
|
-
if (calendarFirstValue && !calendarSecondValue) {
|
|
394
|
-
var _secondInputRef_current1;
|
|
395
|
-
secondInputRef === null || secondInputRef === void 0 ? void 0 : (_secondInputRef_current1 = secondInputRef.current) === null || _secondInputRef_current1 === void 0 ? void 0 : _secondInputRef_current1.focus();
|
|
396
|
-
}
|
|
397
|
-
if (calendarSecondValue && !calendarFirstValue) {
|
|
398
|
-
var _firstInputRef_current1;
|
|
399
|
-
firstInputRef === null || firstInputRef === void 0 ? void 0 : (_firstInputRef_current1 = firstInputRef.current) === null || _firstInputRef_current1 === void 0 ? void 0 : _firstInputRef_current1.focus();
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
392
|
if (!isCalendarOpen) {
|
|
403
393
|
setSecondTextFieldClicked(false);
|
|
404
394
|
}
|
|
@@ -437,28 +427,40 @@ var datePickerRangeRoot = function(Root) {
|
|
|
437
427
|
}, commonArgs)), endOriginalDate = _getFormattedDates1.originalDate;
|
|
438
428
|
if (!calendarFirstValue && correctStartDates.calendar) {
|
|
439
429
|
startOriginalDate = new Date(correctStartDates.calendar);
|
|
430
|
+
}
|
|
431
|
+
if (!calendarSecondValue && correctEndDates.calendar) {
|
|
432
|
+
endOriginalDate = new Date(correctEndDates.calendar);
|
|
433
|
+
}
|
|
434
|
+
var _getSortedValues = _sliced_to_array((0, _utils1.getSortedValues)([
|
|
435
|
+
startOriginalDate,
|
|
436
|
+
endOriginalDate
|
|
437
|
+
]), 2), startValue = _getSortedValues[0], endValue = _getSortedValues[1];
|
|
438
|
+
var _getFormattedDates2 = (0, _utils2.getFormattedDates)(_object_spread({
|
|
439
|
+
value: startValue,
|
|
440
|
+
delimiter: dateFormatDelimiter
|
|
441
|
+
}, commonArgs)), formattedFirstDate = _getFormattedDates2.formattedDate, originalFirstDate = _getFormattedDates2.originalDate, isoFirstDate = _getFormattedDates2.isoDate;
|
|
442
|
+
var _getFormattedDates3 = (0, _utils2.getFormattedDates)(_object_spread({
|
|
443
|
+
value: endValue,
|
|
444
|
+
delimiter: dateFormatDelimiter
|
|
445
|
+
}, commonArgs)), formattedSecondDate = _getFormattedDates3.formattedDate, originalSecondDate = _getFormattedDates3.originalDate, isoSecondDate = _getFormattedDates3.isoDate;
|
|
446
|
+
if (formattedFirstDate !== inputFirstValue) {
|
|
440
447
|
if (onChangeFirstValue) {
|
|
441
|
-
onChangeFirstValue(event,
|
|
448
|
+
onChangeFirstValue(event, formattedFirstDate, originalFirstDate, isoFirstDate);
|
|
442
449
|
}
|
|
443
450
|
if (onCommitFirstDate) {
|
|
444
|
-
var dateInfo = getFirstQuarterInfo(
|
|
445
|
-
onCommitFirstDate(
|
|
451
|
+
var dateInfo = originalFirstDate ? getFirstQuarterInfo(originalFirstDate) : undefined;
|
|
452
|
+
onCommitFirstDate(formattedFirstDate, false, true, dateInfo, originalFirstDate, isoFirstDate);
|
|
446
453
|
}
|
|
447
454
|
}
|
|
448
|
-
if (
|
|
449
|
-
endOriginalDate = new Date(correctEndDates.calendar);
|
|
455
|
+
if (formattedSecondDate !== inputSecondValue) {
|
|
450
456
|
if (onChangeSecondValue) {
|
|
451
|
-
onChangeSecondValue(event,
|
|
457
|
+
onChangeSecondValue(event, formattedSecondDate, originalSecondDate, isoSecondDate);
|
|
452
458
|
}
|
|
453
459
|
if (onCommitSecondDate) {
|
|
454
|
-
var dateInfo1 = getSecondQuarterInfo(
|
|
455
|
-
onCommitSecondDate(
|
|
460
|
+
var dateInfo1 = originalSecondDate ? getSecondQuarterInfo(originalSecondDate) : undefined;
|
|
461
|
+
onCommitSecondDate(formattedSecondDate, false, true, dateInfo1, originalSecondDate, isoSecondDate);
|
|
456
462
|
}
|
|
457
463
|
}
|
|
458
|
-
var _getSortedValues = _sliced_to_array((0, _utils1.getSortedValues)([
|
|
459
|
-
startOriginalDate,
|
|
460
|
-
endOriginalDate
|
|
461
|
-
]), 2), startValue = _getSortedValues[0], endValue = _getSortedValues[1];
|
|
462
464
|
setFirstInputValue(startValue);
|
|
463
465
|
setSecondInputValue(endValue);
|
|
464
466
|
outerHandler === null || outerHandler === void 0 ? void 0 : outerHandler(event);
|
|
@@ -17,6 +17,7 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
20
|
+
var _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
20
21
|
var _plasmacore = require("@salutejs/plasma-core");
|
|
21
22
|
var _utils = require("../../utils");
|
|
22
23
|
var _Popup = require("../Popup");
|
|
@@ -43,6 +44,11 @@ function _define_property(obj, key, value) {
|
|
|
43
44
|
}
|
|
44
45
|
return obj;
|
|
45
46
|
}
|
|
47
|
+
function _interop_require_default(obj) {
|
|
48
|
+
return obj && obj.__esModule ? obj : {
|
|
49
|
+
default: obj
|
|
50
|
+
};
|
|
51
|
+
}
|
|
46
52
|
function _getRequireWildcardCache(nodeInterop) {
|
|
47
53
|
if (typeof WeakMap !== "function") return null;
|
|
48
54
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -128,7 +134,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
128
134
|
}
|
|
129
135
|
var drawerRoot = function(Root) {
|
|
130
136
|
return /*#__PURE__*/ (0, _react.forwardRef)(function(_param, outerRef) {
|
|
131
|
-
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
137
|
+
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, animationInfo = _param.animationInfo, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
132
138
|
"id",
|
|
133
139
|
"zIndex",
|
|
134
140
|
"popupInfo",
|
|
@@ -142,6 +148,7 @@ var drawerRoot = function(Root) {
|
|
|
142
148
|
"opened",
|
|
143
149
|
"initialFocusRef",
|
|
144
150
|
"focusAfterRef",
|
|
151
|
+
"animationInfo",
|
|
145
152
|
"className",
|
|
146
153
|
"customBackgroundColor",
|
|
147
154
|
"customContentBackgroundColor",
|
|
@@ -191,10 +198,11 @@ var drawerRoot = function(Root) {
|
|
|
191
198
|
onClose();
|
|
192
199
|
}
|
|
193
200
|
};
|
|
201
|
+
var _obj;
|
|
194
202
|
return /*#__PURE__*/ _react.default.createElement(_Drawerstyles.StyledPopup, _object_spread({
|
|
195
203
|
id: innerId,
|
|
196
204
|
ref: asModal ? innerRef : outerRef,
|
|
197
|
-
className: (0,
|
|
205
|
+
className: (0, _classnames.default)(placementClass, className, (_obj = {}, _define_property(_obj, _Drawertokens.classes.enterCustomAnimation, animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.enter), _define_property(_obj, _Drawertokens.classes.exitCustomAnimation, animationInfo === null || animationInfo === void 0 ? void 0 : animationInfo.exit), _obj)),
|
|
198
206
|
opened: innerIsOpen,
|
|
199
207
|
zIndex: zIndex,
|
|
200
208
|
placement: placement,
|
|
@@ -204,6 +212,7 @@ var drawerRoot = function(Root) {
|
|
|
204
212
|
height: innerHeight,
|
|
205
213
|
offset: offset,
|
|
206
214
|
withAnimation: true,
|
|
215
|
+
drawerAnimationInfo: animationInfo,
|
|
207
216
|
overlay: asModal && /*#__PURE__*/ _react.default.createElement(Root, {
|
|
208
217
|
view: view
|
|
209
218
|
}, /*#__PURE__*/ _react.default.createElement(_Overlay.Overlay, {
|
|
@@ -216,6 +225,7 @@ var drawerRoot = function(Root) {
|
|
|
216
225
|
onOverlayClick: onDrawerOverlayKeyDown
|
|
217
226
|
}))
|
|
218
227
|
}, rest), /*#__PURE__*/ _react.default.createElement(Root, {
|
|
228
|
+
className: _Drawertokens.classes.panel,
|
|
219
229
|
view: view,
|
|
220
230
|
size: size,
|
|
221
231
|
style: {
|
|
@@ -227,8 +237,7 @@ var drawerRoot = function(Root) {
|
|
|
227
237
|
width: innerWidth,
|
|
228
238
|
height: innerHeight,
|
|
229
239
|
customBackgroundColor: customBackgroundColor,
|
|
230
|
-
customContentBackgroundColor: customContentBackgroundColor
|
|
231
|
-
className: className
|
|
240
|
+
customContentBackgroundColor: customContentBackgroundColor
|
|
232
241
|
}, children)));
|
|
233
242
|
});
|
|
234
243
|
};
|
|
@@ -82,7 +82,7 @@ var getAnimationStyles = function() {
|
|
|
82
82
|
};
|
|
83
83
|
var StyledPanel = (0, _styledcomponents.default)(Panel).withConfig({
|
|
84
84
|
displayName: "Drawer.styles__StyledPanel",
|
|
85
|
-
componentId: "sc-
|
|
85
|
+
componentId: "sc-5f1f6af-0"
|
|
86
86
|
})([
|
|
87
87
|
"",
|
|
88
88
|
":var(",
|
|
@@ -90,7 +90,7 @@ var StyledPanel = (0, _styledcomponents.default)(Panel).withConfig({
|
|
|
90
90
|
], _Panel.panelTokens.closeColor, _Drawertokens.tokens.closeIconColor);
|
|
91
91
|
var StyledPopup = (0, _styledcomponents.default)(Popup).withConfig({
|
|
92
92
|
displayName: "Drawer.styles__StyledPopup",
|
|
93
|
-
componentId: "sc-
|
|
93
|
+
componentId: "sc-5f1f6af-1"
|
|
94
94
|
})([
|
|
95
95
|
"&&.",
|
|
96
96
|
"{animation:fadeIn 0.2s forwards;scrollbar-gutter:stable;}&&.",
|
|
@@ -100,11 +100,21 @@ var StyledPopup = (0, _styledcomponents.default)(Popup).withConfig({
|
|
|
100
100
|
" > div{width:",
|
|
101
101
|
";height:",
|
|
102
102
|
";}",
|
|
103
|
-
""
|
|
103
|
+
" &.",
|
|
104
|
+
"{&& .",
|
|
105
|
+
"{animation:",
|
|
106
|
+
";}}&.",
|
|
107
|
+
"{&&.",
|
|
108
|
+
" .",
|
|
109
|
+
"{animation:var(",
|
|
110
|
+
");}}"
|
|
104
111
|
], _Drawertokens.classes.overlay, _Popup.popupClasses.endAnimation, _Drawertokens.classes.overlay, _Popup.popupClasses.root, _Popup.popupClasses.root, function(param) {
|
|
105
112
|
var width = param.width;
|
|
106
113
|
return width || 'auto';
|
|
107
114
|
}, function(param) {
|
|
108
115
|
var height = param.height;
|
|
109
116
|
return height || 'auto';
|
|
110
|
-
}, getAnimationStyles())
|
|
117
|
+
}, getAnimationStyles(), _Drawertokens.classes.enterCustomAnimation, _Popup.popupClasses.root, function(param) {
|
|
118
|
+
var drawerAnimationInfo = param.drawerAnimationInfo;
|
|
119
|
+
return (drawerAnimationInfo === null || drawerAnimationInfo === void 0 ? void 0 : drawerAnimationInfo.enter) || "var(".concat(_Drawertokens.privateTokens.enterAnimation, ")");
|
|
120
|
+
}, _Drawertokens.classes.exitCustomAnimation, _Popup.popupClasses.endAnimation, _Popup.popupClasses.root, _Drawertokens.privateTokens.customExitAnimation);
|
|
@@ -12,6 +12,9 @@ _export(exports, {
|
|
|
12
12
|
get classes () {
|
|
13
13
|
return classes;
|
|
14
14
|
},
|
|
15
|
+
get privateTokens () {
|
|
16
|
+
return privateTokens;
|
|
17
|
+
},
|
|
15
18
|
get tokens () {
|
|
16
19
|
return tokens;
|
|
17
20
|
}
|
|
@@ -21,6 +24,9 @@ var classes = {
|
|
|
21
24
|
header: 'drawer-header',
|
|
22
25
|
footer: 'drawer-footer',
|
|
23
26
|
overlay: 'drawer-overlay',
|
|
27
|
+
panel: 'drawer-panel',
|
|
28
|
+
enterCustomAnimation: 'drawer-enter-custom-animation',
|
|
29
|
+
exitCustomAnimation: 'drawer-exit-custom-animation',
|
|
24
30
|
horizontal: 'drawer-horizontal',
|
|
25
31
|
hasHeader: 'drawer-has-header',
|
|
26
32
|
isRightClose: 'drawer-right-close-button',
|
|
@@ -29,6 +35,12 @@ var classes = {
|
|
|
29
35
|
rightPlacement: 'drawer-right-placement',
|
|
30
36
|
leftPlacement: 'drawer-left-placement'
|
|
31
37
|
};
|
|
38
|
+
var privateTokens = {
|
|
39
|
+
enterAnimation: '--plasma__private-drawer-enter-animation',
|
|
40
|
+
exitAnimation: '--plasma__private-drawer-exit-animation',
|
|
41
|
+
customEnterAnimation: '--plasma__private-drawer-custom-enter-animation',
|
|
42
|
+
customExitAnimation: '--plasma__private-drawer-custom-exit-animation'
|
|
43
|
+
};
|
|
32
44
|
var tokens = {
|
|
33
45
|
drawerOverlayWithBlurColor: '--plasma-drawer-overlay-with-blur-color',
|
|
34
46
|
drawerOverlayColor: '--plasma-drawer-overlay-color',
|