@salutejs/plasma-new-hope 0.336.0-canary.2222.17612018746.0 → 0.336.0-canary.2224.17723650459.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/Autocomplete/Autocomplete.css +3 -0
- package/cjs/components/CodeField/CodeField.css +7 -6
- package/cjs/components/CodeField/CodeField.js +63 -27
- package/cjs/components/CodeField/CodeField.js.map +1 -1
- package/cjs/components/CodeField/CodeField.styles.js +7 -1
- package/cjs/components/CodeField/CodeField.styles.js.map +1 -1
- package/cjs/components/CodeField/{CodeField.styles_ebdpd0.css → CodeField.styles_14p25hi.css} +1 -0
- package/cjs/components/CodeField/hooks/useWebOTP.js +95 -0
- package/cjs/components/CodeField/hooks/useWebOTP.js.map +1 -0
- package/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/cjs/components/CodeField/utils/handleCodeError.js.map +1 -1
- package/cjs/components/CodeField/utils/handleItemError.js +14 -4
- package/cjs/components/CodeField/utils/handleItemError.js.map +1 -1
- package/cjs/components/CodeField/utils/isWebOTPSupported.js +10 -0
- package/cjs/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +3 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +54 -56
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +3 -0
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +3 -0
- package/cjs/components/Drawer/Drawer.css +2 -2
- package/cjs/components/Drawer/Drawer.js +7 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +2 -10
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/{es/components/Drawer/Drawer.styles_pltzxq.css → cjs/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/cjs/components/Drawer/Drawer.tokens.js +0 -10
- package/cjs/components/Drawer/Drawer.tokens.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +3 -0
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
- package/cjs/components/Popover/Popover.js +4 -1
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Range/Range.css +3 -0
- package/cjs/components/Select/Select.css +3 -0
- package/cjs/components/Select/Select.js +23 -11
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +1 -4
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Target/Target.css +3 -0
- package/cjs/components/Select/ui/Target/Target.js +0 -2
- package/cjs/components/Select/ui/Target/Target.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -49
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Slider/Slider.css +3 -0
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
- package/cjs/components/Switch/Switch.css +6 -6
- package/cjs/components/Switch/Switch.js +5 -2
- package/cjs/components/Switch/Switch.js.map +1 -1
- package/cjs/components/Switch/Switch.styles.js +1 -1
- package/cjs/components/Switch/Switch.styles.js.map +1 -1
- package/cjs/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
- package/cjs/components/Switch/Switch.tokens.js +2 -1
- package/cjs/components/Switch/Switch.tokens.js.map +1 -1
- package/cjs/components/Table/Table.css +3 -0
- package/cjs/components/Table/ui/Cell/Cell.css +3 -0
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +3 -0
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +3 -0
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
- package/cjs/components/TextField/TextField.js +19 -3
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +86 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +25 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
- package/cjs/index.css +18 -14
- package/emotion/cjs/components/CodeField/CodeField.js +61 -23
- package/emotion/cjs/components/CodeField/CodeField.styles.js +18 -11
- package/emotion/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
- package/emotion/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/emotion/cjs/components/CodeField/utils/handleItemError.js +12 -3
- package/emotion/cjs/components/CodeField/utils/index.js +4 -0
- package/emotion/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +57 -64
- package/emotion/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/cjs/components/Drawer/Drawer.js +4 -13
- package/emotion/cjs/components/Drawer/Drawer.styles.js +4 -7
- package/emotion/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/emotion/cjs/components/Popover/Popover.js +3 -1
- package/emotion/cjs/components/Select/Select.js +26 -9
- package/emotion/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/cjs/components/Select/ui/Target/Target.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/emotion/cjs/components/Select/utils/index.js +0 -4
- package/emotion/cjs/components/Switch/Switch.js +4 -2
- package/emotion/cjs/components/Switch/Switch.styles.js +11 -11
- package/emotion/cjs/components/Switch/Switch.tokens.js +2 -1
- package/emotion/cjs/components/TextField/TextField.js +20 -4
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/emotion/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +49 -0
- package/emotion/cjs/components/TextField/ui/index.js +12 -3
- package/emotion/cjs/examples/components/Range/Range.config.js +8 -7
- package/emotion/es/components/CodeField/CodeField.js +64 -26
- package/emotion/es/components/CodeField/CodeField.styles.js +15 -11
- package/emotion/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/emotion/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/emotion/es/components/CodeField/utils/handleItemError.js +12 -3
- package/emotion/es/components/CodeField/utils/index.js +1 -0
- package/emotion/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +58 -65
- package/emotion/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/emotion/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/emotion/es/components/Drawer/Drawer.js +5 -9
- package/emotion/es/components/Drawer/Drawer.styles.js +5 -8
- package/emotion/es/components/Drawer/Drawer.tokens.js +0 -9
- package/emotion/es/components/Popover/Popover.js +4 -2
- package/emotion/es/components/Select/Select.js +26 -9
- package/emotion/es/components/Select/hooks/usePathMaps.js +2 -5
- package/emotion/es/components/Select/ui/Target/Target.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/emotion/es/components/Select/utils/index.js +0 -1
- package/emotion/es/components/Switch/Switch.js +4 -2
- package/emotion/es/components/Switch/Switch.styles.js +11 -11
- package/emotion/es/components/Switch/Switch.tokens.js +2 -1
- package/emotion/es/components/TextField/TextField.js +21 -5
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
- package/emotion/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +27 -0
- package/emotion/es/components/TextField/ui/index.js +1 -0
- package/emotion/es/examples/components/Range/Range.config.js +8 -7
- package/es/components/Autocomplete/Autocomplete.css +3 -0
- package/es/components/CodeField/CodeField.css +7 -6
- package/es/components/CodeField/CodeField.js +66 -30
- package/es/components/CodeField/CodeField.js.map +1 -1
- package/es/components/CodeField/CodeField.styles.js +7 -2
- package/es/components/CodeField/CodeField.styles.js.map +1 -1
- package/es/components/CodeField/{CodeField.styles_ebdpd0.css → CodeField.styles_14p25hi.css} +1 -0
- package/es/components/CodeField/hooks/useWebOTP.js +91 -0
- package/es/components/CodeField/hooks/useWebOTP.js.map +1 -0
- package/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/es/components/CodeField/utils/handleCodeError.js.map +1 -1
- package/es/components/CodeField/utils/handleItemError.js +14 -4
- package/es/components/CodeField/utils/handleItemError.js.map +1 -1
- package/es/components/CodeField/utils/isWebOTPSupported.js +6 -0
- package/es/components/CodeField/utils/isWebOTPSupported.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +3 -0
- package/es/components/Combobox/ComboboxNew/Combobox.js +55 -57
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +1 -4
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.css +3 -0
- package/es/components/DatePicker/RangeDate/RangeDate.js +30 -22
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +3 -0
- package/es/components/DatePicker/SingleDate/SingleDate.css +3 -0
- package/es/components/Drawer/Drawer.css +2 -2
- package/es/components/Drawer/Drawer.js +6 -8
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +2 -10
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/{cjs/components/Drawer/Drawer.styles_pltzxq.css → es/components/Drawer/Drawer.styles_h5od79.css} +1 -1
- package/es/components/Drawer/Drawer.tokens.js +1 -10
- package/es/components/Drawer/Drawer.tokens.js.map +1 -1
- package/es/components/Pagination/Pagination.css +3 -0
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +3 -0
- package/es/components/Popover/Popover.js +4 -1
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Range/Range.css +3 -0
- package/es/components/Select/Select.css +3 -0
- package/es/components/Select/Select.js +23 -11
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +1 -4
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Target/Target.css +3 -0
- package/es/components/Select/ui/Target/Target.js +0 -2
- package/es/components/Select/ui/Target/Target.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +3 -0
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -50
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Slider/Slider.css +3 -0
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +3 -0
- package/es/components/Switch/Switch.css +6 -6
- package/es/components/Switch/Switch.js +5 -2
- package/es/components/Switch/Switch.js.map +1 -1
- package/es/components/Switch/Switch.styles.js +1 -1
- package/es/components/Switch/Switch.styles.js.map +1 -1
- package/es/components/Switch/{Switch.styles_qjefea.css → Switch.styles_158fwwl.css} +1 -1
- package/es/components/Switch/Switch.tokens.js +2 -1
- package/es/components/Switch/Switch.tokens.js.map +1 -1
- package/es/components/Table/Table.css +3 -0
- package/es/components/Table/ui/Cell/Cell.css +3 -0
- package/es/components/Table/ui/EditableCell/EditableCell.css +3 -0
- package/es/components/Table/ui/HeadCell/HeadCell.css +3 -0
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +3 -0
- package/es/components/TextField/TextField.js +19 -3
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.css +58 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +21 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles_y9tozi.css +2 -0
- package/es/index.css +18 -14
- package/package.json +2 -2
- package/styled-components/cjs/components/CodeField/CodeField.js +61 -23
- package/styled-components/cjs/components/CodeField/CodeField.styles.js +14 -5
- package/styled-components/cjs/components/CodeField/hooks/useWebOTP.js +246 -0
- package/styled-components/cjs/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/cjs/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/cjs/components/CodeField/utils/index.js +4 -0
- package/styled-components/cjs/components/CodeField/utils/isWebOTPSupported.js +13 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +57 -64
- package/styled-components/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/index.js +0 -4
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/cjs/components/Drawer/Drawer.js +4 -13
- package/styled-components/cjs/components/Drawer/Drawer.styles.js +4 -14
- package/styled-components/cjs/components/Drawer/Drawer.tokens.js +0 -12
- package/styled-components/cjs/components/Popover/Popover.js +3 -1
- package/styled-components/cjs/components/Select/Select.js +26 -9
- package/styled-components/cjs/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/cjs/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +32 -71
- package/styled-components/cjs/components/Select/utils/index.js +0 -4
- package/styled-components/cjs/components/Switch/Switch.js +4 -2
- package/styled-components/cjs/components/Switch/Switch.styles.js +9 -8
- package/styled-components/cjs/components/Switch/Switch.tokens.js +2 -1
- package/styled-components/cjs/components/TextField/TextField.js +19 -3
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +78 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +114 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -3
- package/styled-components/cjs/examples/components/Range/Range.config.js +46 -0
- package/styled-components/es/components/CodeField/CodeField.js +64 -26
- package/styled-components/es/components/CodeField/CodeField.styles.js +11 -5
- package/styled-components/es/components/CodeField/hooks/useWebOTP.js +236 -0
- package/styled-components/es/components/CodeField/utils/handleCodeError.js +2 -2
- package/styled-components/es/components/CodeField/utils/handleItemError.js +12 -3
- package/styled-components/es/components/CodeField/utils/index.js +1 -0
- package/styled-components/es/components/CodeField/utils/isWebOTPSupported.js +3 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +58 -65
- package/styled-components/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +2 -5
- package/styled-components/es/components/Combobox/ComboboxNew/utils/index.js +0 -1
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +24 -22
- package/styled-components/es/components/Drawer/Drawer.js +5 -9
- package/styled-components/es/components/Drawer/Drawer.styles.js +5 -15
- package/styled-components/es/components/Drawer/Drawer.tokens.js +0 -9
- package/styled-components/es/components/Popover/Popover.js +4 -2
- package/styled-components/es/components/Select/Select.js +26 -9
- package/styled-components/es/components/Select/hooks/usePathMaps.js +2 -5
- package/styled-components/es/components/Select/ui/Target/Target.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +33 -72
- package/styled-components/es/components/Select/utils/index.js +0 -1
- package/styled-components/es/components/Switch/Switch.js +4 -2
- package/styled-components/es/components/Switch/Switch.styles.js +9 -8
- package/styled-components/es/components/Switch/Switch.tokens.js +2 -1
- package/styled-components/es/components/TextField/TextField.js +20 -4
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.js +63 -0
- package/styled-components/es/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.js +92 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/examples/components/Range/Range.config.js +46 -0
- package/types/components/CodeField/CodeField.d.ts.map +1 -1
- package/types/components/CodeField/CodeField.styles.d.ts +1 -0
- package/types/components/CodeField/CodeField.styles.d.ts.map +1 -1
- package/types/components/CodeField/hooks/useWebOTP.d.ts +20 -0
- package/types/components/CodeField/hooks/useWebOTP.d.ts.map +1 -0
- package/types/components/CodeField/utils/handleCodeError.d.ts +2 -2
- package/types/components/CodeField/utils/handleCodeError.d.ts.map +1 -1
- package/types/components/CodeField/utils/handleItemError.d.ts +3 -2
- package/types/components/CodeField/utils/handleItemError.d.ts.map +1 -1
- package/types/components/CodeField/utils/index.d.ts +1 -0
- package/types/components/CodeField/utils/index.d.ts.map +1 -1
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts +2 -0
- package/types/components/CodeField/utils/isWebOTPSupported.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts +1 -2
- package/types/components/Combobox/ComboboxNew/hooks/getPathMaps.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts +0 -1
- package/types/components/Combobox/ComboboxNew/utils/index.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.d.ts +0 -2
- package/types/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.styles.d.ts +1 -2
- package/types/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.tokens.d.ts +0 -9
- package/types/components/Drawer/Drawer.tokens.d.ts.map +1 -1
- package/types/components/Drawer/Drawer.types.d.ts +0 -16
- package/types/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/types/components/Popover/Popover.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
- package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +0 -1
- package/types/components/Select/ui/Target/Target.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +1 -2
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/index.d.ts +0 -1
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/components/Switch/Switch.d.ts.map +1 -1
- package/types/components/Switch/Switch.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.tokens.d.ts +1 -0
- package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
- package/types/components/Switch/Switch.types.d.ts +5 -0
- package/types/components/Switch/Switch.types.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts +21 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts +3 -0
- package/types/components/TextField/ui/TextFieldChipNew/TextFieldChipNew.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +1 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -1
- package/types/examples/components/Drawer/Drawer.d.ts +0 -1
- package/types/examples/components/Drawer/Drawer.d.ts.map +1 -1
- package/types/examples/components/Range/Range.config.d.ts +1 -0
- package/types/examples/components/Range/Range.config.d.ts.map +1 -1
- package/types/examples/components/Range/Range.d.ts +1 -0
- package/types/examples/components/Range/Range.d.ts.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -17
- package/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/cjs/components/Select/utils/getRemovedElement.js +0 -17
- package/cjs/components/Select/utils/getRemovedElement.js.map +0 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/emotion/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/emotion/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/emotion/es/components/Select/utils/getRemovedElement.js +0 -10
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -13
- package/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js.map +0 -1
- package/es/components/Select/utils/getRemovedElement.js +0 -13
- package/es/components/Select/utils/getRemovedElement.js.map +0 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -20
- package/styled-components/cjs/components/Select/utils/getRemovedElement.js +0 -20
- package/styled-components/es/components/Combobox/ComboboxNew/utils/getRemovedElement.js +0 -10
- package/styled-components/es/components/Select/utils/getRemovedElement.js +0 -10
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Combobox/ComboboxNew/utils/getRemovedElement.d.ts.map +0 -1
- package/types/components/Select/utils/getRemovedElement.d.ts +0 -2
- package/types/components/Select/utils/getRemovedElement.d.ts.map +0 -1
|
@@ -54,9 +54,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
54
54
|
return target;
|
|
55
55
|
}
|
|
56
56
|
import React, { forwardRef, useMemo } from "react";
|
|
57
|
-
import cls from "classnames";
|
|
58
57
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
59
|
-
import { getSizeValueFromProp, safeUseId } from "../../utils";
|
|
58
|
+
import { cx, getSizeValueFromProp, safeUseId } from "../../utils";
|
|
60
59
|
import { usePopupContext } from "../Popup";
|
|
61
60
|
import { Overlay } from "../Overlay";
|
|
62
61
|
import { DEFAULT_Z_INDEX } from "../Popup/utils";
|
|
@@ -71,7 +70,7 @@ import { useDrawer } from "./hooks";
|
|
|
71
70
|
// issue #823
|
|
72
71
|
export var drawerRoot = function(Root) {
|
|
73
72
|
return /*#__PURE__*/ forwardRef(function(_param, outerRef) {
|
|
74
|
-
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef,
|
|
73
|
+
var id = _param.id, zIndex = _param.zIndex, popupInfo = _param.popupInfo, withBlur = _param.withBlur, children = _param.children, view = _param.view, size = _param.size, width = _param.width, height = _param.height, isOpen = _param.isOpen, opened = _param.opened, initialFocusRef = _param.initialFocusRef, focusAfterRef = _param.focusAfterRef, className = _param.className, customBackgroundColor = _param.customBackgroundColor, customContentBackgroundColor = _param.customContentBackgroundColor, onClose = _param.onClose, onOverlayClick = _param.onOverlayClick, onEscKeyDown = _param.onEscKeyDown, offset = _param.offset, frame = _param.frame, _param_borderRadius = _param.borderRadius, borderRadius = _param_borderRadius === void 0 ? 'none' : _param_borderRadius, _param_placement = _param.placement, placement = _param_placement === void 0 ? 'right' : _param_placement, _param_closeOnEsc = _param.closeOnEsc, closeOnEsc = _param_closeOnEsc === void 0 ? true : _param_closeOnEsc, _param_closeOnOverlayClick = _param.closeOnOverlayClick, closeOnOverlayClick = _param_closeOnOverlayClick === void 0 ? true : _param_closeOnOverlayClick, _param_asModal = _param.asModal, asModal = _param_asModal === void 0 ? true : _param_asModal, draggable = _param.draggable, rest = _object_without_properties(_param, [
|
|
75
74
|
"id",
|
|
76
75
|
"zIndex",
|
|
77
76
|
"popupInfo",
|
|
@@ -85,7 +84,6 @@ export var drawerRoot = function(Root) {
|
|
|
85
84
|
"opened",
|
|
86
85
|
"initialFocusRef",
|
|
87
86
|
"focusAfterRef",
|
|
88
|
-
"animationInfo",
|
|
89
87
|
"className",
|
|
90
88
|
"customBackgroundColor",
|
|
91
89
|
"customContentBackgroundColor",
|
|
@@ -135,11 +133,10 @@ export var drawerRoot = function(Root) {
|
|
|
135
133
|
onClose();
|
|
136
134
|
}
|
|
137
135
|
};
|
|
138
|
-
var _obj;
|
|
139
136
|
return /*#__PURE__*/ React.createElement(StyledPopup, _object_spread({
|
|
140
137
|
id: innerId,
|
|
141
138
|
ref: asModal ? innerRef : outerRef,
|
|
142
|
-
className:
|
|
139
|
+
className: cx(placementClass),
|
|
143
140
|
opened: innerIsOpen,
|
|
144
141
|
zIndex: zIndex,
|
|
145
142
|
placement: placement,
|
|
@@ -149,7 +146,6 @@ export var drawerRoot = function(Root) {
|
|
|
149
146
|
height: innerHeight,
|
|
150
147
|
offset: offset,
|
|
151
148
|
withAnimation: true,
|
|
152
|
-
drawerAnimationInfo: animationInfo,
|
|
153
149
|
overlay: asModal && /*#__PURE__*/ React.createElement(Root, {
|
|
154
150
|
view: view
|
|
155
151
|
}, /*#__PURE__*/ React.createElement(Overlay, {
|
|
@@ -162,7 +158,6 @@ export var drawerRoot = function(Root) {
|
|
|
162
158
|
onOverlayClick: onDrawerOverlayKeyDown
|
|
163
159
|
}))
|
|
164
160
|
}, rest), /*#__PURE__*/ React.createElement(Root, {
|
|
165
|
-
className: classes.panel,
|
|
166
161
|
view: view,
|
|
167
162
|
size: size,
|
|
168
163
|
style: {
|
|
@@ -174,7 +169,8 @@ export var drawerRoot = function(Root) {
|
|
|
174
169
|
width: innerWidth,
|
|
175
170
|
height: innerHeight,
|
|
176
171
|
customBackgroundColor: customBackgroundColor,
|
|
177
|
-
customContentBackgroundColor: customContentBackgroundColor
|
|
172
|
+
customContentBackgroundColor: customContentBackgroundColor,
|
|
173
|
+
className: className
|
|
178
174
|
}, children)));
|
|
179
175
|
});
|
|
180
176
|
};
|
|
@@ -2,7 +2,7 @@ import styled from "styled-components";
|
|
|
2
2
|
import { component, mergeConfig } from "../../engines";
|
|
3
3
|
import { popupClasses, popupConfig } from "../Popup";
|
|
4
4
|
import { panelTokens, panelConfig } from "../Panel";
|
|
5
|
-
import { classes,
|
|
5
|
+
import { classes, tokens } from "./Drawer.tokens";
|
|
6
6
|
var mergedPanelConfig = mergeConfig(panelConfig);
|
|
7
7
|
var Panel = component(mergedPanelConfig);
|
|
8
8
|
var Popup = component(popupConfig);
|
|
@@ -59,7 +59,7 @@ var getAnimationStyles = function() {
|
|
|
59
59
|
};
|
|
60
60
|
export var StyledPanel = styled(Panel).withConfig({
|
|
61
61
|
displayName: "Drawer.styles__StyledPanel",
|
|
62
|
-
componentId: "sc-
|
|
62
|
+
componentId: "sc-7ba5c890-0"
|
|
63
63
|
})([
|
|
64
64
|
"",
|
|
65
65
|
":var(",
|
|
@@ -67,7 +67,7 @@ export var StyledPanel = styled(Panel).withConfig({
|
|
|
67
67
|
], panelTokens.closeColor, tokens.closeIconColor);
|
|
68
68
|
export var StyledPopup = styled(Popup).withConfig({
|
|
69
69
|
displayName: "Drawer.styles__StyledPopup",
|
|
70
|
-
componentId: "sc-
|
|
70
|
+
componentId: "sc-7ba5c890-1"
|
|
71
71
|
})([
|
|
72
72
|
"&&.",
|
|
73
73
|
"{animation:fadeIn 0.2s forwards;scrollbar-gutter:stable;}&&.",
|
|
@@ -77,21 +77,11 @@ export var StyledPopup = styled(Popup).withConfig({
|
|
|
77
77
|
" > div{width:",
|
|
78
78
|
";height:",
|
|
79
79
|
";}",
|
|
80
|
-
"
|
|
81
|
-
"{&& .",
|
|
82
|
-
"{animation:",
|
|
83
|
-
";}}&.",
|
|
84
|
-
"{&&.",
|
|
85
|
-
" .",
|
|
86
|
-
"{animation:var(",
|
|
87
|
-
");}}"
|
|
80
|
+
""
|
|
88
81
|
], classes.overlay, popupClasses.endAnimation, classes.overlay, popupClasses.root, popupClasses.root, function(param) {
|
|
89
82
|
var width = param.width;
|
|
90
83
|
return width || 'auto';
|
|
91
84
|
}, function(param) {
|
|
92
85
|
var height = param.height;
|
|
93
86
|
return height || 'auto';
|
|
94
|
-
}, getAnimationStyles()
|
|
95
|
-
var drawerAnimationInfo = param.drawerAnimationInfo;
|
|
96
|
-
return (drawerAnimationInfo === null || drawerAnimationInfo === void 0 ? void 0 : drawerAnimationInfo.enter) || "var(".concat(privateTokens.enterAnimation, ")");
|
|
97
|
-
}, classes.exitCustomAnimation, popupClasses.endAnimation, popupClasses.root, privateTokens.customExitAnimation);
|
|
87
|
+
}, getAnimationStyles());
|
|
@@ -3,9 +3,6 @@ export var classes = {
|
|
|
3
3
|
header: 'drawer-header',
|
|
4
4
|
footer: 'drawer-footer',
|
|
5
5
|
overlay: 'drawer-overlay',
|
|
6
|
-
panel: 'drawer-panel',
|
|
7
|
-
enterCustomAnimation: 'drawer-enter-custom-animation',
|
|
8
|
-
exitCustomAnimation: 'drawer-exit-custom-animation',
|
|
9
6
|
horizontal: 'drawer-horizontal',
|
|
10
7
|
hasHeader: 'drawer-has-header',
|
|
11
8
|
isRightClose: 'drawer-right-close-button',
|
|
@@ -14,12 +11,6 @@ export var classes = {
|
|
|
14
11
|
rightPlacement: 'drawer-right-placement',
|
|
15
12
|
leftPlacement: 'drawer-left-placement'
|
|
16
13
|
};
|
|
17
|
-
export var privateTokens = {
|
|
18
|
-
enterAnimation: '--plasma__private-drawer-enter-animation',
|
|
19
|
-
exitAnimation: '--plasma__private-drawer-exit-animation',
|
|
20
|
-
customEnterAnimation: '--plasma__private-drawer-custom-enter-animation',
|
|
21
|
-
customExitAnimation: '--plasma__private-drawer-custom-exit-animation'
|
|
22
|
-
};
|
|
23
14
|
export var tokens = {
|
|
24
15
|
drawerOverlayWithBlurColor: '--plasma-drawer-overlay-with-blur-color',
|
|
25
16
|
drawerOverlayColor: '--plasma-drawer-overlay-color',
|
|
@@ -131,7 +131,7 @@ import React, { useRef, useCallback, useEffect, useState, forwardRef, isValidEle
|
|
|
131
131
|
import { usePopper } from "react-popper";
|
|
132
132
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
133
133
|
import { useFocusTrap } from "../../hooks";
|
|
134
|
-
import { cx } from "../../utils";
|
|
134
|
+
import { cx, safeUseId } from "../../utils";
|
|
135
135
|
import { Portal } from "../Portal";
|
|
136
136
|
import { base as viewCSS } from "./variations/_view/base";
|
|
137
137
|
import { StyledArrow, StyledPopover, StyledRoot, StyledWrapper } from "./Popover.styles";
|
|
@@ -176,6 +176,7 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
|
176
176
|
var portalRef = useRef(null);
|
|
177
177
|
var targetRef = useRef(null);
|
|
178
178
|
var trapRef = useFocusTrap(innerIsOpen && isFocusTrapped);
|
|
179
|
+
var uuid = safeUseId();
|
|
179
180
|
var popoverForkRef = useForkRef(popoverRef, trapRef);
|
|
180
181
|
var _useState = _sliced_to_array(useState(null), 2), arrowElement = _useState[0], setArrowElement = _useState[1];
|
|
181
182
|
var _useState1 = _sliced_to_array(useState(false), 2), forceRender = _useState1[1];
|
|
@@ -326,8 +327,9 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
|
|
|
326
327
|
portal = rootRef.current;
|
|
327
328
|
}
|
|
328
329
|
if (!portal) {
|
|
330
|
+
var portalId = "".concat(POPOVER_PORTAL_ID, "-").concat(uuid);
|
|
329
331
|
portal = document.createElement('div');
|
|
330
|
-
portal.setAttribute('id',
|
|
332
|
+
portal.setAttribute('id', portalId);
|
|
331
333
|
if (typeof frame === 'string' && frame !== 'document') {
|
|
332
334
|
var _document_getElementById;
|
|
333
335
|
(_document_getElementById = document.getElementById(frame)) === null || _document_getElementById === void 0 ? void 0 : _document_getElementById.appendChild(portal);
|
|
@@ -199,7 +199,7 @@ import { Context } from "./Select.context";
|
|
|
199
199
|
items
|
|
200
200
|
]);
|
|
201
201
|
// Создаем структуры для быстрой работы с деревом
|
|
202
|
-
var _usePathMaps = _sliced_to_array(usePathMaps(transformedItems),
|
|
202
|
+
var _usePathMaps = _sliced_to_array(usePathMaps(transformedItems), 4), pathMap = _usePathMaps[0], focusedToValueMap = _usePathMaps[1], valueToCheckedMap = _usePathMaps[2], valueToItemMap = _usePathMaps[3];
|
|
203
203
|
var _useState = _sliced_to_array(useState(props.multiselect ? [] : ''), 2), internalValue = _useState[0], setInternalValue = _useState[1];
|
|
204
204
|
var value = outerValue !== null && outerValue !== undefined ? outerValue : internalValue;
|
|
205
205
|
var floatingPopoverRef = useRef(null);
|
|
@@ -287,14 +287,32 @@ import { Context } from "./Select.context";
|
|
|
287
287
|
return;
|
|
288
288
|
}
|
|
289
289
|
var checkedCopy = new Map(checked);
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
290
|
+
switch(checkedCopy.get(item.value)){
|
|
291
|
+
// Если чекбокс в состоянии indeterminate
|
|
292
|
+
case 'indeterminate':
|
|
293
|
+
{
|
|
294
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
// Если чекбокс в состоянии checked
|
|
298
|
+
case true:
|
|
299
|
+
{
|
|
300
|
+
updateDescendants(item, checkedCopy, false, valueToItemMap);
|
|
301
|
+
checkedCopy.set(item.value, false);
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
// Если чекбокс в состоянии unchecked
|
|
305
|
+
case false:
|
|
306
|
+
{
|
|
307
|
+
updateDescendants(item, checkedCopy, true, valueToItemMap);
|
|
308
|
+
checkedCopy.set(item.value, true);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
default:
|
|
312
|
+
{
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
296
315
|
}
|
|
297
|
-
updateAncestors(item, checkedCopy);
|
|
298
316
|
var newValues = [];
|
|
299
317
|
valueToItemMap.forEach(function(item, key) {
|
|
300
318
|
if (checkedCopy.get(key)) {
|
|
@@ -485,7 +503,6 @@ import { Context } from "./Select.context";
|
|
|
485
503
|
activeDescendantItemValue: activeDescendantItemValue,
|
|
486
504
|
isTargetAmount: isTargetAmount,
|
|
487
505
|
onChange: onChange,
|
|
488
|
-
labelToItemMap: labelToItemMap,
|
|
489
506
|
chipView: chipView,
|
|
490
507
|
separator: separator,
|
|
491
508
|
requiredProps: requiredProps,
|
|
@@ -5,18 +5,16 @@ export var usePathMaps = function(items) {
|
|
|
5
5
|
var focusedToValueMap = new Map();
|
|
6
6
|
var valueToCheckedMap = new Map();
|
|
7
7
|
var valueToItemMap = new Map();
|
|
8
|
-
var labelToItemMap = new Map();
|
|
9
8
|
pathMap.set('root', (items === null || items === void 0 ? void 0 : items.length) || 0);
|
|
10
9
|
var rec = function(items) {
|
|
11
10
|
var prevIndex = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
|
|
12
11
|
items === null || items === void 0 ? void 0 : items.forEach(function(item, index) {
|
|
13
|
-
var value = item.value,
|
|
12
|
+
var value = item.value, innerItems = item.items;
|
|
14
13
|
var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
|
|
15
14
|
focusedToValueMap.set(currIndex, item);
|
|
16
15
|
valueToCheckedMap.set(value, false);
|
|
17
16
|
if (isEmpty(innerItems) || !innerItems) {
|
|
18
17
|
valueToItemMap.set(value, item);
|
|
19
|
-
labelToItemMap.set(label, item);
|
|
20
18
|
} else {
|
|
21
19
|
pathMap.set(value, innerItems.length);
|
|
22
20
|
rec(innerItems, currIndex);
|
|
@@ -28,7 +26,6 @@ export var usePathMaps = function(items) {
|
|
|
28
26
|
pathMap,
|
|
29
27
|
focusedToValueMap,
|
|
30
28
|
valueToCheckedMap,
|
|
31
|
-
valueToItemMap
|
|
32
|
-
labelToItemMap
|
|
29
|
+
valueToItemMap
|
|
33
30
|
];
|
|
34
31
|
};
|
|
@@ -2,7 +2,7 @@ import React, { forwardRef } from "react";
|
|
|
2
2
|
import { useForkRef } from "@salutejs/plasma-core";
|
|
3
3
|
import { Button, Textfield } from "./ui";
|
|
4
4
|
export var Target = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
5
|
-
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange,
|
|
5
|
+
var value = param.value, opened = param.opened, valueToItemMap = param.valueToItemMap, label = param.label, placeholder = param.placeholder, onKeyDown = param.onKeyDown, labelPlacement = param.labelPlacement, size = param.size, contentLeft = param.contentLeft, disabled = param.disabled, readOnly = param.readOnly, renderValue = param.renderValue, selectProps = param.selectProps, inputWrapperRef = param.inputWrapperRef, multiselect = param.multiselect, view = param.view, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, isTargetAmount = param.isTargetAmount, onChange = param.onChange, chipView = param.chipView, separator = param.separator, requiredProps = param.requiredProps, hintProps = param.hintProps;
|
|
6
6
|
var buttonRef = useForkRef(ref, inputWrapperRef);
|
|
7
7
|
if (selectProps.renderTarget) {
|
|
8
8
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -47,7 +47,6 @@ export var Target = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
47
47
|
valueToItemMap: valueToItemMap,
|
|
48
48
|
renderValue: renderValue,
|
|
49
49
|
onChange: onChange,
|
|
50
|
-
labelToItemMap: labelToItemMap,
|
|
51
50
|
chipView: chipView,
|
|
52
51
|
requiredProps: requiredProps,
|
|
53
52
|
hintProps: hintProps,
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
function _array_like_to_array(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
function _array_without_holes(arr) {
|
|
7
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
8
|
-
}
|
|
9
1
|
function _define_property(obj, key, value) {
|
|
10
2
|
if (key in obj) {
|
|
11
3
|
Object.defineProperty(obj, key, {
|
|
@@ -26,12 +18,6 @@ function _instanceof(left, right) {
|
|
|
26
18
|
return left instanceof right;
|
|
27
19
|
}
|
|
28
20
|
}
|
|
29
|
-
function _iterable_to_array(iter) {
|
|
30
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
31
|
-
}
|
|
32
|
-
function _non_iterable_spread() {
|
|
33
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
34
|
-
}
|
|
35
21
|
function _object_spread(target) {
|
|
36
22
|
for(var i = 1; i < arguments.length; i++){
|
|
37
23
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -71,23 +57,12 @@ function _object_spread_props(target, source) {
|
|
|
71
57
|
}
|
|
72
58
|
return target;
|
|
73
59
|
}
|
|
74
|
-
function _to_consumable_array(arr) {
|
|
75
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
76
|
-
}
|
|
77
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
78
|
-
if (!o) return;
|
|
79
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
80
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
81
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
82
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
83
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
84
|
-
}
|
|
85
60
|
import React, { forwardRef } from "react";
|
|
86
|
-
import { sizeToIconSize, getItemId
|
|
61
|
+
import { sizeToIconSize, getItemId } from "../../../../utils";
|
|
87
62
|
import { classes } from "../../../../Select.tokens";
|
|
88
63
|
import { IconArrowWrapper, StyledArrow, StyledTextField, StyledLeftHelper } from "./Textfield.styles";
|
|
89
64
|
export var Textfield = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
90
|
-
var inputWrapperRef = param.inputWrapperRef, opened = param.opened, multiselect = param.multiselect, value = param.value, label = param.label, labelPlacement = param.labelPlacement, keepPlaceholder = param.keepPlaceholder, placeholder = param.placeholder, onKeyDown = param.onKeyDown, size = param.size, view = param.view, contentLeft = param.contentLeft, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, disabled = param.disabled, readOnly = param.readOnly, isTargetAmount = param.isTargetAmount, valueToItemMap = param.valueToItemMap, renderValue = param.renderValue, onChange = param.onChange,
|
|
65
|
+
var inputWrapperRef = param.inputWrapperRef, opened = param.opened, multiselect = param.multiselect, value = param.value, label = param.label, labelPlacement = param.labelPlacement, keepPlaceholder = param.keepPlaceholder, placeholder = param.placeholder, onKeyDown = param.onKeyDown, size = param.size, view = param.view, contentLeft = param.contentLeft, helperText = param.helperText, treeId = param.treeId, activeDescendantItemValue = param.activeDescendantItemValue, disabled = param.disabled, readOnly = param.readOnly, isTargetAmount = param.isTargetAmount, valueToItemMap = param.valueToItemMap, renderValue = param.renderValue, onChange = param.onChange, chipView = param.chipView, requiredProps = param.requiredProps, chipType = param.chipType, hintProps = param.hintProps;
|
|
91
66
|
var withArrowInverse = opened ? classes.arrowInverse : undefined;
|
|
92
67
|
var getValue = function() {
|
|
93
68
|
var _valueToItemMap_get;
|
|
@@ -107,58 +82,44 @@ export var Textfield = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
107
82
|
if (value.length === 0) return [];
|
|
108
83
|
if (isTargetAmount) {
|
|
109
84
|
return [
|
|
110
|
-
|
|
85
|
+
{
|
|
86
|
+
value: '_removeAll',
|
|
87
|
+
label: "Выбрано ".concat(value.length),
|
|
88
|
+
disabled: value.every(function(val) {
|
|
89
|
+
var _valueToItemMap_get;
|
|
90
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
91
|
+
})
|
|
92
|
+
}
|
|
111
93
|
];
|
|
112
94
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
95
|
+
return value.map(function(value) {
|
|
96
|
+
var _valueToItemMap_get, _valueToItemMap_get1;
|
|
97
|
+
var currentLabel = renderValue ? renderValue(valueToItemMap.get(value) || {
|
|
98
|
+
value: value,
|
|
99
|
+
label: value.toString()
|
|
100
|
+
}) : ((_valueToItemMap_get = valueToItemMap.get(value)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.label) || value.toString();
|
|
101
|
+
return {
|
|
102
|
+
value: value,
|
|
103
|
+
label: currentLabel,
|
|
104
|
+
disabled: ((_valueToItemMap_get1 = valueToItemMap.get(value)) === null || _valueToItemMap_get1 === void 0 ? void 0 : _valueToItemMap_get1.disabled) || false
|
|
105
|
+
};
|
|
106
|
+
});
|
|
124
107
|
}
|
|
125
108
|
return [];
|
|
126
109
|
};
|
|
127
110
|
// Обработчик чипов
|
|
128
|
-
var
|
|
111
|
+
var handleChipClick = function(chip) {
|
|
129
112
|
if (!Array.isArray(value)) return;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var resultValues = _to_consumable_array(value);
|
|
134
|
-
value.forEach(function(_, index) {
|
|
113
|
+
if (isTargetAmount) {
|
|
114
|
+
// При закрытии чипа в режиме isTargetAmount в value оставляем только disabled-элементы
|
|
115
|
+
onChange(value.filter(function(val) {
|
|
135
116
|
var _valueToItemMap_get;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var labelAfterRenderValue = renderValue(label ? labelToItemMap.get(label) : {
|
|
139
|
-
value: stringValue,
|
|
140
|
-
label: stringValue.toString()
|
|
141
|
-
});
|
|
142
|
-
if (!chipLabels.includes(labelAfterRenderValue)) {
|
|
143
|
-
resultValues.splice(index, 1);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
var removedItemValue = getRemovedElement(value, resultValues, isTargetAmount);
|
|
147
|
-
onChange(resultValues, removedItemValue ? valueToItemMap.get(removedItemValue) || {
|
|
148
|
-
value: removedItemValue,
|
|
149
|
-
label: removedItemValue.toString()
|
|
150
|
-
} : null);
|
|
117
|
+
return valueToItemMap === null || valueToItemMap === void 0 ? void 0 : (_valueToItemMap_get = valueToItemMap.get(val)) === null || _valueToItemMap_get === void 0 ? void 0 : _valueToItemMap_get.disabled;
|
|
118
|
+
}));
|
|
151
119
|
} else {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
var removedItemValue1 = getRemovedElement(value, newValues, isTargetAmount);
|
|
157
|
-
var item = removedItemValue1 ? valueToItemMap.get(removedItemValue1) || {
|
|
158
|
-
value: removedItemValue1,
|
|
159
|
-
label: removedItemValue1.toString()
|
|
160
|
-
} : null;
|
|
161
|
-
onChange(newValues, item);
|
|
120
|
+
onChange(value.filter(function(val) {
|
|
121
|
+
return val !== chip.value;
|
|
122
|
+
}), valueToItemMap.get(chip.value) || null);
|
|
162
123
|
}
|
|
163
124
|
};
|
|
164
125
|
var helperTextStopPropagation = function(event) {
|
|
@@ -197,8 +158,8 @@ export var Textfield = /*#__PURE__*/ forwardRef(function(param, ref) {
|
|
|
197
158
|
"aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
|
|
198
159
|
}, multiselect ? {
|
|
199
160
|
enumerationType: 'chip',
|
|
200
|
-
|
|
201
|
-
|
|
161
|
+
_chips: getChips(),
|
|
162
|
+
_onChipClick: handleChipClick,
|
|
202
163
|
chipType: chipType,
|
|
203
164
|
chipView: chipView
|
|
204
165
|
} : {
|
|
@@ -88,7 +88,7 @@ import { StyledContent, StyledDescription, StyledInput, StyledLabel, StyledTrigg
|
|
|
88
88
|
import { classes } from "./Switch.tokens";
|
|
89
89
|
export var switchRoot = function(Root) {
|
|
90
90
|
return /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
91
|
-
var size = props.size, toggleSize = props.toggleSize, view = props.view, focused = props.focused, outlined = props.outlined, disabled = props.disabled, labelPosition = props.labelPosition, label = props.label, description = props.description, id = props.id, style = props.style, className = props.className, // singleLine,
|
|
91
|
+
var size = props.size, toggleSize = props.toggleSize, view = props.view, focused = props.focused, outlined = props.outlined, disabled = props.disabled, labelPosition = props.labelPosition, label = props.label, description = props.description, _props_singleLine = props.singleLine, singleLine = _props_singleLine === void 0 ? true : _props_singleLine, id = props.id, style = props.style, className = props.className, // singleLine,
|
|
92
92
|
checked = props.checked, pressed = props.pressed, defaultChecked = props.defaultChecked, rest = _object_without_properties(props, [
|
|
93
93
|
"size",
|
|
94
94
|
"toggleSize",
|
|
@@ -99,6 +99,7 @@ export var switchRoot = function(Root) {
|
|
|
99
99
|
"labelPosition",
|
|
100
100
|
"label",
|
|
101
101
|
"description",
|
|
102
|
+
"singleLine",
|
|
102
103
|
"id",
|
|
103
104
|
"style",
|
|
104
105
|
"className",
|
|
@@ -128,7 +129,8 @@ export var switchRoot = function(Root) {
|
|
|
128
129
|
defaultChecked: defaultChecked,
|
|
129
130
|
disabled: disabled
|
|
130
131
|
})), /*#__PURE__*/ React.createElement(StyledLabel, {
|
|
131
|
-
tabIndex: -1
|
|
132
|
+
tabIndex: -1,
|
|
133
|
+
className: singleLine ? classes.singleLine : ''
|
|
132
134
|
}, label), /*#__PURE__*/ React.createElement(StyledTrigger, {
|
|
133
135
|
"aria-hidden": true
|
|
134
136
|
})), description && /*#__PURE__*/ React.createElement(StyledDescription, null, description));
|
|
@@ -8,7 +8,7 @@ export var base = css([
|
|
|
8
8
|
], tokens.verticalGap);
|
|
9
9
|
export var StyledContent = styled.div.withConfig({
|
|
10
10
|
displayName: "Switch.styles__StyledContent",
|
|
11
|
-
componentId: "sc-
|
|
11
|
+
componentId: "sc-6da706dd-0"
|
|
12
12
|
})([
|
|
13
13
|
"width:100%;position:relative;display:flex;align-items:center;&.",
|
|
14
14
|
"{justify-content:space-between;",
|
|
@@ -20,7 +20,7 @@ export var StyledContent = styled.div.withConfig({
|
|
|
20
20
|
], classes.beforeSwitchLabelPosition, tokens.labelOffsetPrivate, tokens.labelOffset, classes.afterSwitchLabelPosition, tokens.labelOffsetPrivate, tokens.labelOffset);
|
|
21
21
|
export var StyledDescription = styled.div.withConfig({
|
|
22
22
|
displayName: "Switch.styles__StyledDescription",
|
|
23
|
-
componentId: "sc-
|
|
23
|
+
componentId: "sc-6da706dd-1"
|
|
24
24
|
})([
|
|
25
25
|
"position:relative;",
|
|
26
26
|
" display:-webkit-box;line-clamp:var(",
|
|
@@ -29,20 +29,21 @@ export var StyledDescription = styled.div.withConfig({
|
|
|
29
29
|
], applyEllipsis(), tokens.descriptionMaxLines, tokens.descriptionMaxLines);
|
|
30
30
|
export var StyledInput = styled.input.withConfig({
|
|
31
31
|
displayName: "Switch.styles__StyledInput",
|
|
32
|
-
componentId: "sc-
|
|
32
|
+
componentId: "sc-6da706dd-2"
|
|
33
33
|
})([
|
|
34
34
|
"position:absolute;right:0;margin:0;opacity:0;&:focus{outline:0 none;}"
|
|
35
35
|
]);
|
|
36
36
|
export var StyledLabel = styled.span.withConfig({
|
|
37
37
|
displayName: "Switch.styles__StyledLabel",
|
|
38
|
-
componentId: "sc-
|
|
38
|
+
componentId: "sc-6da706dd-3"
|
|
39
39
|
})([
|
|
40
|
-
"user-select:none
|
|
41
|
-
""
|
|
42
|
-
|
|
40
|
+
"user-select:none;&.",
|
|
41
|
+
"{",
|
|
42
|
+
"}"
|
|
43
|
+
], classes.singleLine, applyEllipsis());
|
|
43
44
|
export var StyledTrigger = styled.div.withConfig({
|
|
44
45
|
displayName: "Switch.styles__StyledTrigger",
|
|
45
|
-
componentId: "sc-
|
|
46
|
+
componentId: "sc-6da706dd-4"
|
|
46
47
|
})([
|
|
47
48
|
"position:relative;display:flex;align-items:center;transition:background-color 0.15s ease-in-out 0.1s;::after{content:'';position:absolute;right:auto;left:0;transition:width 0.15s ease-in-out 0s,left 0.3s ease-in-out 0s,right 0.3s ease-in-out 0s;}",
|
|
48
49
|
":checked ~ &::after{right:0;left:auto;}"
|
|
@@ -46,5 +46,6 @@ export var tokens = {
|
|
|
46
46
|
};
|
|
47
47
|
export var classes = {
|
|
48
48
|
beforeSwitchLabelPosition: 'switch-label-position-before',
|
|
49
|
-
afterSwitchLabelPosition: 'switch-label-position-after'
|
|
49
|
+
afterSwitchLabelPosition: 'switch-label-position-after',
|
|
50
|
+
singleLine: 'switch-single-line'
|
|
50
51
|
};
|
|
@@ -115,7 +115,7 @@ import { base as hintSizeCSS } from "./variations/_hint-size/base";
|
|
|
115
115
|
import { base as chipViewCSS } from "./variations/_chip-view/base";
|
|
116
116
|
import { Input, InputContainer, LeftHelper, Label, InputWrapper, InputLabelWrapper, StyledContentLeft, StyledContentRight, StyledChips, StyledTextBefore, StyledTextAfter, StyledIndicator, StyledOptionalText, InputPlaceholder, OuterLabelWrapper, TitleCaption, StyledHintWrapper, StyledIndicatorWrapper, StyledContentRightWrapper } from "./TextField.styles";
|
|
117
117
|
import { classes } from "./TextField.tokens";
|
|
118
|
-
import { TextFieldChip } from "./ui";
|
|
118
|
+
import { TextFieldChip, TextFieldChipNew } from "./ui";
|
|
119
119
|
import { useKeyNavigation } from "./hooks";
|
|
120
120
|
import { HintComponent } from "./ui/Hint/Hint";
|
|
121
121
|
import { getInputWidth } from "./getInputWidth";
|
|
@@ -133,7 +133,9 @@ export var textFieldRoot = function(Root) {
|
|
|
133
133
|
contentLeft = _param.contentLeft, contentRight = _param.contentRight, label = _param.label, labelPlacement = _param.labelPlacement, keepPlaceholder = _param.keepPlaceholder, textBefore = _param.textBefore, textAfter = _param.textAfter, placeholder = _param.placeholder, leftHelper = _param.leftHelper, _param_enumerationType = _param.enumerationType, enumerationType = _param_enumerationType === void 0 ? 'plain' : _param_enumerationType, _param_requiredPlacement = _param.requiredPlacement, requiredPlacement = _param_requiredPlacement === void 0 ? 'right' : _param_requiredPlacement, _param_hasRequiredIndicator = _param.hasRequiredIndicator, hasRequiredIndicator = _param_hasRequiredIndicator === void 0 ? true : _param_hasRequiredIndicator, titleCaption = _param.titleCaption, _param_chipView = _param.chipView, chipView = _param_chipView === void 0 ? 'default' : _param_chipView, chipValidator = _param.chipValidator, _param_hintTrigger = _param.// hint
|
|
134
134
|
hintTrigger, hintTrigger = _param_hintTrigger === void 0 ? 'hover' : _param_hintTrigger, hintText = _param.hintText, _param_hintView = _param.hintView, hintView = _param_hintView === void 0 ? 'default' : _param_hintView, _param_hintSize = _param.hintSize, hintSize = _param_hintSize === void 0 ? 'm' : _param_hintSize, hintTargetIcon = _param.hintTargetIcon, _param_hintTargetPlacement = _param.hintTargetPlacement, hintTargetPlacement = _param_hintTargetPlacement === void 0 ? 'outer' : _param_hintTargetPlacement, _param_hintPlacement = _param.hintPlacement, hintPlacement = _param_hintPlacement === void 0 ? 'auto' : _param_hintPlacement, hintHasArrow = _param.hintHasArrow, _param_hintOffset = _param.hintOffset, hintOffset = _param_hintOffset === void 0 ? HINT_DEFAULT_OFFSET : _param_hintOffset, hintWidth = _param.hintWidth, hintContentLeft = _param.hintContentLeft, // variations
|
|
135
135
|
view = _param.view, size = _param.size, _param_readOnly = _param.readOnly, readOnly = _param_readOnly === void 0 ? false : _param_readOnly, _param_disabled = _param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, _param_required = _param.required, required = _param_required === void 0 ? false : _param_required, _param_clear = _param.clear, clear = _param_clear === void 0 ? false : _param_clear, optional = _param.optional, hasDivider = _param.hasDivider, // controlled
|
|
136
|
-
outerValue = _param.value, values = _param.chips, _param_chipType = _param.chipType, chipType = _param_chipType === void 0 ? 'default' : _param_chipType, //
|
|
136
|
+
outerValue = _param.value, values = _param.chips, _param_chipType = _param.chipType, chipType = _param_chipType === void 0 ? 'default' : _param_chipType, // @ts-ignore
|
|
137
|
+
_chips = _param._chips, // @ts-ignore
|
|
138
|
+
_onChipClick = _param._onChipClick, // events
|
|
137
139
|
onChange = _param.onChange, onChangeChips = _param.onChangeChips, onSearch = _param.onSearch, onKeyDown = _param.onKeyDown, onFocus = _param.onFocus, onBlur = _param.onBlur, onPaste = _param.onPaste, // Пропсы для внутреннего использования, не отдается наружу.
|
|
138
140
|
// @ts-ignore
|
|
139
141
|
_onEnterDisabled = _param._onEnterDisabled, // @ts-ignore
|
|
@@ -178,6 +180,8 @@ export var textFieldRoot = function(Root) {
|
|
|
178
180
|
"value",
|
|
179
181
|
"chips",
|
|
180
182
|
"chipType",
|
|
183
|
+
"_chips",
|
|
184
|
+
"_onChipClick",
|
|
181
185
|
"onChange",
|
|
182
186
|
"onChangeChips",
|
|
183
187
|
"onSearch",
|
|
@@ -209,7 +213,7 @@ export var textFieldRoot = function(Root) {
|
|
|
209
213
|
var helperTextId = safeUseId();
|
|
210
214
|
var isDefaultView = view === 'default' || readOnly || disabled;
|
|
211
215
|
var isChipEnumeration = enumerationType === 'chip';
|
|
212
|
-
var isChipsVisible = isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length);
|
|
216
|
+
var isChipsVisible = isChipEnumeration && Boolean((chips === null || chips === void 0 ? void 0 : chips.length) || (_chips === null || _chips === void 0 ? void 0 : _chips.length));
|
|
213
217
|
var withHasChips = isChipsVisible ? classes.hasChips : undefined;
|
|
214
218
|
var hasLabelValue = Boolean(label);
|
|
215
219
|
var hasInnerLabel = size !== 'xs' && labelPlacement === 'inner' && !isChipsVisible && hasLabelValue;
|
|
@@ -464,7 +468,19 @@ export var textFieldRoot = function(Root) {
|
|
|
464
468
|
ref: contentRef,
|
|
465
469
|
onKeyDown: handleContentKeyDown,
|
|
466
470
|
className: withHasChips
|
|
467
|
-
}, Boolean(textBefore && isChipEnumeration) && /*#__PURE__*/ React.createElement(StyledTextBefore, null, textBefore),
|
|
471
|
+
}, Boolean(textBefore && isChipEnumeration) && /*#__PURE__*/ React.createElement(StyledTextBefore, null, textBefore), Boolean(_chips === null || _chips === void 0 ? void 0 : _chips.length) && /*#__PURE__*/ React.createElement(TextFieldChipNew, {
|
|
472
|
+
chips: _chips,
|
|
473
|
+
onChipClick: _onChipClick,
|
|
474
|
+
getRef: getRef,
|
|
475
|
+
handleChipKeyDown: handleChipKeyDown,
|
|
476
|
+
onChipClear: onChipClear,
|
|
477
|
+
view: chipView || view,
|
|
478
|
+
readOnly: readOnly,
|
|
479
|
+
chipType: chipType,
|
|
480
|
+
// TODO: #1547
|
|
481
|
+
// @ts-ignore
|
|
482
|
+
_forceChipManipulationWithReadonly: _forceChipManipulationWithReadonly
|
|
483
|
+
}), isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length) && /*#__PURE__*/ React.createElement(StyledChips, {
|
|
468
484
|
className: classes.chipsWrapper
|
|
469
485
|
}, chips === null || chips === void 0 ? void 0 : chips.map(function(param, index) {
|
|
470
486
|
var chipId = param.id, text = param.text;
|