@salutejs/plasma-new-hope 0.174.0-canary.1497.11501781410.0 → 0.174.0-canary.1503.11500823810.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +10 -10
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +14 -28
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
- package/cjs/components/Dropdown/Dropdown.css +16 -30
- package/cjs/components/Dropdown/Dropdown.js +37 -60
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +26 -14
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
- package/cjs/components/Dropdown/Dropdown.tokens.js +1 -24
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -25
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/Notification/Notification.css +11 -11
- package/cjs/components/Notification/Notification.js +2 -2
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +1 -1
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
- package/cjs/components/Notification/Notification.tokens.js +2 -1
- package/cjs/components/Notification/Notification.tokens.js.map +1 -1
- package/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal.js +5 -3
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/components/Notification/NotificationsProvider.js +3 -1
- package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
- package/cjs/components/Select/Select.js +1 -1
- package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
- package/cjs/hooks/useOutsideClick.js +1 -1
- package/cjs/hooks/useOutsideClick.js.map +1 -1
- package/cjs/index.css +33 -31
- package/cjs/index.js +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
- package/emotion/cjs/components/Dropdown/Dropdown.js +37 -58
- package/emotion/cjs/components/Dropdown/Dropdown.styles.js +25 -9
- package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
- package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +41 -21
- package/emotion/cjs/components/Dropdown/utils/index.js +1 -23
- package/emotion/cjs/components/Notification/Notification.js +2 -2
- package/emotion/cjs/components/Notification/Notification.styles.js +11 -11
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +15 -7
- package/emotion/cjs/components/Notification/Notification.tokens.js +2 -1
- package/emotion/cjs/components/Notification/NotificationsPortal.js +6 -4
- package/emotion/cjs/components/Notification/NotificationsProvider.js +3 -1
- package/emotion/cjs/components/Notification/index.js +4 -4
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
- package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
- package/emotion/cjs/hooks/useOutsideClick.js +1 -1
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -14
- package/emotion/es/components/Dropdown/Dropdown.js +40 -60
- package/emotion/es/components/Dropdown/Dropdown.styles.js +25 -9
- package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -35
- package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +42 -22
- package/emotion/es/components/Dropdown/utils/index.js +1 -4
- package/emotion/es/components/Notification/Notification.js +1 -1
- package/emotion/es/components/Notification/Notification.styles.js +11 -11
- package/emotion/es/components/Notification/Notification.template-doc.mdx +15 -7
- package/emotion/es/components/Notification/Notification.tokens.js +2 -1
- package/emotion/es/components/Notification/NotificationsPortal.js +6 -4
- package/emotion/es/components/Notification/NotificationsProvider.js +3 -1
- package/emotion/es/components/Notification/index.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
- package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/emotion/es/examples/plasma_web/components/Notification/Notification.js +6 -4
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
- package/emotion/es/hooks/useOutsideClick.js +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +10 -10
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +20 -6
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_y71664.css → Item.styles_1us8jz1.css} +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +14 -28
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +18 -32
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +18 -32
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +18 -32
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +18 -32
- package/es/components/Dropdown/Dropdown.css +16 -30
- package/es/components/Dropdown/Dropdown.js +40 -62
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +26 -15
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +3 -0
- package/es/components/Dropdown/Dropdown.tokens.js +1 -24
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +6 -46
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +29 -24
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +6 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_1lyg81y.css → DropdownItem.styles_12e50g5.css} +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/Notification/Notification.css +11 -11
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +1 -1
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_7h8hp0.css → Notification.styles_1cf2gwd.css} +1 -1
- package/es/components/Notification/Notification.tokens.js +2 -1
- package/es/components/Notification/Notification.tokens.js.map +1 -1
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsPortal.js +5 -3
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/components/Notification/NotificationsProvider.js +3 -1
- package/es/components/Notification/NotificationsProvider.js.map +1 -1
- package/es/components/Select/Select.js +1 -1
- package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
- package/es/hooks/useOutsideClick.js +1 -1
- package/es/hooks/useOutsideClick.js.map +1 -1
- package/es/index.css +33 -31
- package/es/index.js +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
- package/styled-components/cjs/components/Dropdown/Dropdown.js +37 -58
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +15 -9
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +2 -36
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +51 -17
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +18 -29
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +19 -17
- package/styled-components/cjs/components/Dropdown/utils/index.js +1 -23
- package/styled-components/cjs/components/Notification/Notification.js +2 -2
- package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +15 -7
- package/styled-components/cjs/components/Notification/Notification.tokens.js +2 -1
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +5 -3
- package/styled-components/cjs/components/Notification/NotificationsProvider.js +3 -1
- package/styled-components/cjs/components/Notification/index.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +5 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
- package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +5 -3
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
- package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +10 -4
- package/styled-components/es/components/Dropdown/Dropdown.js +40 -60
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +15 -9
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -35
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +52 -18
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +20 -31
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +20 -18
- package/styled-components/es/components/Dropdown/utils/index.js +1 -4
- package/styled-components/es/components/Notification/Notification.js +1 -1
- package/styled-components/es/components/Notification/Notification.styles.js +1 -1
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +15 -7
- package/styled-components/es/components/Notification/Notification.tokens.js +2 -1
- package/styled-components/es/components/Notification/NotificationsPortal.js +5 -3
- package/styled-components/es/components/Notification/NotificationsProvider.js +3 -1
- package/styled-components/es/components/Notification/index.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +6 -4
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +25 -4
- package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +5 -6
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +6 -4
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +25 -4
- package/styled-components/es/hooks/useOutsideClick.js +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +1 -2
- package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts +1 -2
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +6 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -25
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +4 -30
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +1 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +12 -1
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +3 -32
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +14 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
- package/types/components/Dropdown/utils/index.d.ts +0 -3
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/Notification/Notification.d.ts +3 -3
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Notification/Notification.tokens.d.ts +1 -0
- package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
- package/types/components/Notification/Notification.types.d.ts +11 -5
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
- package/types/components/Notification/NotificationsProvider.d.ts +4 -3
- package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
- package/types/components/Notification/index.d.ts +2 -2
- package/types/components/Notification/index.d.ts.map +1 -1
- package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
- package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +4 -2
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.d.ts +4 -13
- package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
- package/types/hooks/useOutsideClick.d.ts +1 -1
- package/types/hooks/useOutsideClick.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
- package/cjs/components/Dropdown/FloatingPopover.js +0 -104
- package/cjs/components/Dropdown/FloatingPopover.js.map +0 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
- package/cjs/components/Dropdown/utils/getItemByFocused.js +0 -13
- package/cjs/components/Dropdown/utils/getItemByFocused.js.map +0 -1
- package/cjs/components/Dropdown/utils/getItemId.js +0 -10
- package/cjs/components/Dropdown/utils/getItemId.js.map +0 -1
- package/cjs/components/Dropdown/utils/getPlacement.js +0 -16
- package/cjs/components/Dropdown/utils/getPlacement.js.map +0 -1
- package/emotion/cjs/components/Dropdown/FloatingPopover.js +0 -109
- package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
- package/emotion/cjs/components/Dropdown/utils/getItemId.js +0 -9
- package/emotion/cjs/components/Dropdown/utils/getPlacement.js +0 -15
- package/emotion/es/components/Dropdown/FloatingPopover.js +0 -102
- package/emotion/es/components/Dropdown/utils/getItemByFocused.js +0 -6
- package/emotion/es/components/Dropdown/utils/getItemId.js +0 -3
- package/emotion/es/components/Dropdown/utils/getPlacement.js +0 -9
- package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +0 -2
- package/es/components/Dropdown/FloatingPopover.js +0 -100
- package/es/components/Dropdown/FloatingPopover.js.map +0 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +0 -5
- package/es/components/Dropdown/utils/getItemByFocused.js +0 -9
- package/es/components/Dropdown/utils/getItemByFocused.js.map +0 -1
- package/es/components/Dropdown/utils/getItemId.js +0 -6
- package/es/components/Dropdown/utils/getItemId.js.map +0 -1
- package/es/components/Dropdown/utils/getPlacement.js +0 -12
- package/es/components/Dropdown/utils/getPlacement.js.map +0 -1
- package/styled-components/cjs/components/Dropdown/FloatingPopover.js +0 -109
- package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +0 -12
- package/styled-components/cjs/components/Dropdown/utils/getItemId.js +0 -9
- package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +0 -15
- package/styled-components/es/components/Dropdown/FloatingPopover.js +0 -102
- package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +0 -6
- package/styled-components/es/components/Dropdown/utils/getItemId.js +0 -3
- package/styled-components/es/components/Dropdown/utils/getPlacement.js +0 -9
- package/types/components/Dropdown/FloatingPopover.d.ts +0 -5
- package/types/components/Dropdown/FloatingPopover.d.ts.map +0 -1
- package/types/components/Dropdown/utils/getItemByFocused.d.ts +0 -4
- package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +0 -1
- package/types/components/Dropdown/utils/getItemId.d.ts +0 -2
- package/types/components/Dropdown/utils/getItemId.d.ts.map +0 -1
- package/types/components/Dropdown/utils/getPlacement.d.ts +0 -3
- package/types/components/Dropdown/utils/getPlacement.d.ts.map +0 -1
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
6
|
var React = require('react');
|
7
|
-
var plasmaCore = require('@salutejs/plasma-core');
|
8
7
|
var index$1 = require('../../utils/index.js');
|
9
8
|
var pathReducer = require('./reducers/pathReducer.js');
|
10
9
|
var focusedPathReducer = require('./reducers/focusedPathReducer.js');
|
@@ -15,26 +14,22 @@ var index = require('./utils/index.js');
|
|
15
14
|
var Dropdown_tokens = require('./Dropdown.tokens.js');
|
16
15
|
var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
|
17
16
|
var useHashMaps = require('./hooks/useHashMaps.js');
|
18
|
-
var
|
19
|
-
var getItemByFocused = require('./utils/getItemByFocused.js');
|
20
|
-
var useOutsideClick = require('../../hooks/useOutsideClick.js');
|
21
|
-
var getPlacement = require('./utils/getPlacement.js');
|
22
|
-
var getItemId = require('./utils/getItemId.js');
|
17
|
+
var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
|
23
18
|
var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
|
24
19
|
|
25
20
|
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
26
|
-
var Context = /*#__PURE__*/React.createContext({});
|
27
21
|
|
28
22
|
/**
|
29
23
|
* Выпадающий список.
|
30
24
|
*/
|
31
25
|
var dropdownRoot = function dropdownRoot(Root) {
|
32
26
|
return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
33
|
-
var _getItemByFocused;
|
34
27
|
var items = _ref.items,
|
35
28
|
children = _ref.children,
|
36
|
-
placement = _ref.placement,
|
37
|
-
|
29
|
+
_ref$placement = _ref.placement,
|
30
|
+
placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
|
31
|
+
_ref$offset = _ref.offset,
|
32
|
+
offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
|
38
33
|
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
39
34
|
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
40
35
|
onToggle = _ref.onToggle,
|
@@ -71,25 +66,6 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
71
66
|
_useHashMaps2 = _rollupPluginBabelHelpers.slicedToArray(_useHashMaps, 2),
|
72
67
|
pathMap = _useHashMaps2[0],
|
73
68
|
focusedToValueMap = _useHashMaps2[1];
|
74
|
-
var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused.getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
|
75
|
-
var floatingPopoverRef = React.useRef(null);
|
76
|
-
var treeId = plasmaCore.safeUseId();
|
77
|
-
|
78
|
-
// Логика работы при клике за пределами выпадающего списка
|
79
|
-
var targetRef = useOutsideClick.useOutsideClick(function (event) {
|
80
|
-
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
81
|
-
return;
|
82
|
-
}
|
83
|
-
dispatchPath({
|
84
|
-
type: 'reset'
|
85
|
-
});
|
86
|
-
dispatchFocusedPath({
|
87
|
-
type: 'reset'
|
88
|
-
});
|
89
|
-
if (onToggle) {
|
90
|
-
onToggle(false, event);
|
91
|
-
}
|
92
|
-
}, floatingPopoverRef);
|
93
69
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
94
70
|
if (opened) {
|
95
71
|
dispatchPath({
|
@@ -121,64 +97,66 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
121
97
|
}),
|
122
98
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
123
99
|
var isCurrentListOpen = Boolean(path[0]);
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
onHover: onHover,
|
133
|
-
onItemClick: onItemClick,
|
134
|
-
onItemSelect: onItemSelect,
|
135
|
-
hasArrow: hasArrow,
|
136
|
-
treeId: treeId
|
137
|
-
}
|
138
|
-
}, /*#__PURE__*/React.createElement(FloatingPopover.FloatingPopover, {
|
139
|
-
ref: floatingPopoverRef,
|
100
|
+
var getActiveDescendant = function getActiveDescendant() {
|
101
|
+
var _focusedToValueMap$ge;
|
102
|
+
var focusedPathAsString = focusedPath.reduce(function (acc, n) {
|
103
|
+
return "".concat(acc, "/").concat(n);
|
104
|
+
}, '').replace(/^(\/)/, '');
|
105
|
+
return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
|
106
|
+
};
|
107
|
+
return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
|
140
108
|
opened: isCurrentListOpen,
|
141
109
|
onToggle: handleGlobalToggle,
|
142
|
-
placement: getPlacement.getPlacement(placement),
|
143
110
|
offset: offset,
|
144
|
-
|
111
|
+
placement: getPopoverPlacement.getPlacements(placement),
|
145
112
|
trigger: trigger,
|
113
|
+
closeOnOverlayClick: closeOnOverlayClick,
|
114
|
+
isFocusTrapped: false,
|
146
115
|
target: index.childrenWithProps(children, {
|
147
116
|
role: 'combobox',
|
148
|
-
'aria-controls':
|
117
|
+
'aria-controls': 'tree_level_1',
|
149
118
|
'aria-expanded': isCurrentListOpen,
|
150
|
-
'aria-activedescendant':
|
119
|
+
'aria-activedescendant': getActiveDescendant(),
|
151
120
|
onKeyDown: onKeyDown
|
152
|
-
})
|
121
|
+
}),
|
122
|
+
preventOverflow: false,
|
123
|
+
usePortal: Boolean(portal),
|
124
|
+
frame: portal
|
153
125
|
}, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
154
126
|
className: index$1.cx(className, Dropdown_tokens.classes.dropdownRoot),
|
155
127
|
ref: ref,
|
156
128
|
view: view,
|
157
|
-
size: size
|
158
|
-
style: {
|
159
|
-
display: 'inline-block'
|
160
|
-
}
|
129
|
+
size: size
|
161
130
|
}, rest), /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
|
162
|
-
ref: targetRef,
|
163
|
-
id: "".concat(treeId, "_tree_level_1"),
|
164
|
-
role: "tree",
|
165
131
|
listHeight: listHeight,
|
166
132
|
listOverflow: listOverflow,
|
133
|
+
role: "tree",
|
134
|
+
id: "tree_level_1",
|
167
135
|
listWidth: listWidth
|
168
136
|
}, items.map(function (item, index) {
|
169
137
|
return /*#__PURE__*/React.createElement(DropdownInner.DropdownInner, {
|
170
138
|
key: "".concat(index, "/0"),
|
171
139
|
item: item,
|
172
140
|
currentLevel: 0,
|
141
|
+
focusedPath: focusedPath,
|
173
142
|
trigger: trigger,
|
174
143
|
path: path,
|
175
144
|
dispatchPath: dispatchPath,
|
176
145
|
index: index,
|
146
|
+
itemRole: itemRole,
|
177
147
|
listHeight: listHeight,
|
178
148
|
listOverflow: listOverflow,
|
179
|
-
|
149
|
+
handleGlobalToggle: handleGlobalToggle,
|
150
|
+
closeOnSelect: closeOnSelect,
|
151
|
+
onHover: onHover,
|
152
|
+
onItemSelect: onItemSelect,
|
153
|
+
onItemClick: onItemClick,
|
154
|
+
listWidth: listWidth,
|
155
|
+
variant: variant,
|
156
|
+
hasArrow: hasArrow,
|
157
|
+
size: size
|
180
158
|
});
|
181
|
-
}))))
|
159
|
+
}))));
|
182
160
|
});
|
183
161
|
};
|
184
162
|
var dropdownConfig = {
|
@@ -200,7 +178,6 @@ var dropdownConfig = {
|
|
200
178
|
}
|
201
179
|
};
|
202
180
|
|
203
|
-
exports.Context = Context;
|
204
181
|
exports.dropdownConfig = dropdownConfig;
|
205
182
|
exports.dropdownRoot = dropdownRoot;
|
206
183
|
//# sourceMappingURL=Dropdown.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CAC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AACXI,QAAAA,YAAY,EAAE,CAAE;AAChBnE,QAAAA,OAAO,EAAEA,OAAQ;AACjBc,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3BiD,QAAAA,KAAK,EAAEA,KAAM;AACbxE,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BF,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CACD,CACF,CACO,CACH,CAAC,CAAA;AAE3B,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM6E,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElG,YAAY;AACpBmG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useReducer } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx, getPlacements } from '../../utils';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, StyledPopover, base } from './Dropdown.styles';\nimport { childrenWithProps } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement = 'bottom',\n offset = [0, 0],\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <StyledPopover\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n offset={offset}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n isFocusTrapped={false}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': 'tree_level_1',\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': getActiveDescendant(),\n onKeyDown,\n })}\n preventOverflow={false}\n usePortal={Boolean(portal)}\n frame={portal}\n >\n <Root className={cx(className, classes.dropdownRoot)} ref={ref} view={view} size={size} {...rest}>\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"tree\"\n id=\"tree_level_1\"\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n focusedPath={focusedPath}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n itemRole={itemRole}\n listHeight={listHeight}\n listOverflow={listOverflow}\n handleGlobalToggle={handleGlobalToggle}\n closeOnSelect={closeOnSelect}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n listWidth={listWidth}\n variant={variant}\n hasArrow={hasArrow}\n size={size}\n />\n ))}\n </Ul>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","ref","items","children","_ref$placement","placement","_ref$offset","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","handleGlobalToggle","opened","event","type","_useKeyNavigation","useKeyNavigation","onKeyDown","isCurrentListOpen","Boolean","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","value","toString","React","createElement","StyledPopover","getPlacements","isFocusTrapped","target","childrenWithProps","role","preventOverflow","usePortal","frame","_extends","cx","classes","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAxBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;MACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;MAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,MAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,cAAA;MAAAE,WAAA,GAAAN,IAAA,CACpBO,MAAM;MAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,CAAC,GAAAA,WAAA;MAAAE,qBAAA,GAAAR,IAAA,CACfS,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAV,IAAA,CAARU,QAAQ;MACRC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MACJC,IAAI,GAAAZ,IAAA,CAAJY,IAAI;MAAAC,aAAA,GAAAb,IAAA,CACJc,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,aAAA;MACrBE,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,SAAS,GAAAhB,IAAA,CAATgB,SAAS;MACTC,UAAU,GAAAjB,IAAA,CAAViB,UAAU;MACVC,YAAY,GAAAlB,IAAA,CAAZkB,YAA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AmB;AACvC/B,QAAAA,aAAa,EAAEA,aAAc;AAC7BC,QAAAA,OAAO,EAAEA,OAAQ;AACjBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,WAAW,EAAEA,WAAY;AACzBP,QAAAA,SAAS,EAAEA,SAAU;AACrBW,QAAAA,OAAO,EAAEA,OAAQ;AACjBE,QAAAA,QAAQ,EAAEA,QAAS;AACnBlB,QAAAA,IAAI,EAAEA,IAAAA;AAAK,OACd,CAAC,CAAA;KACL,CACD,CACF,CACK,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMkF,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnG,YAAY;AACpBoG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import './Dropdown.
|
1
|
+
import './Dropdown.styles_1tihqkp.css';
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@@ -6,44 +6,56 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
6
|
var react = require('@linaria/react');
|
7
7
|
var index = require('./utils/index.js');
|
8
8
|
var Dropdown_tokens = require('./Dropdown.tokens.js');
|
9
|
+
var common = require('../../engines/common.js');
|
10
|
+
var Popover$1 = require('../Popover/Popover.js');
|
9
11
|
|
12
|
+
var Popover = /*#__PURE__*/common.component(Popover$1.popoverConfig);
|
10
13
|
var _exp = function _exp() {
|
14
|
+
return Popover;
|
15
|
+
};
|
16
|
+
var StyledPopover = /*#__PURE__*/react.styled(_exp())({
|
17
|
+
name: "StyledPopover",
|
18
|
+
"class": "sn7uamp",
|
19
|
+
propsAsIs: true
|
20
|
+
});
|
21
|
+
var _exp7 = function _exp7() {
|
11
22
|
return function (_ref) {
|
12
23
|
var listWidth = _ref.listWidth;
|
13
24
|
return listWidth || "var(".concat(Dropdown_tokens.tokens.width, ")");
|
14
25
|
};
|
15
26
|
};
|
16
|
-
var
|
27
|
+
var _exp8 = function _exp8() {
|
17
28
|
return function (_ref2) {
|
18
29
|
var listHeight = _ref2.listHeight;
|
19
30
|
return listHeight ? index.getCorrectHeight(listHeight) : 'auto';
|
20
31
|
};
|
21
32
|
};
|
22
|
-
var
|
33
|
+
var _exp9 = function _exp9() {
|
23
34
|
return function (_ref3) {
|
24
|
-
var
|
25
|
-
return
|
35
|
+
var listOverflow = _ref3.listOverflow;
|
36
|
+
return listOverflow || 'initial';
|
26
37
|
};
|
27
38
|
};
|
28
|
-
var
|
39
|
+
var _exp10 = function _exp10() {
|
29
40
|
return function (_ref4) {
|
30
|
-
var
|
31
|
-
return
|
41
|
+
var isInnerUl = _ref4.isInnerUl;
|
42
|
+
return isInnerUl ? "calc(var(".concat(Dropdown_tokens.tokens.padding, ") * -1) 0 0 var(").concat(Dropdown_tokens.tokens.padding, ")") : 0;
|
32
43
|
};
|
33
44
|
};
|
34
45
|
var Ul = /*#__PURE__*/react.styled('ul')({
|
35
46
|
name: "Ul",
|
36
|
-
"class": "
|
47
|
+
"class": "ujr7fmv",
|
37
48
|
propsAsIs: false,
|
38
49
|
vars: {
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
50
|
+
"ujr7fmv-0": [/*#__PURE__*/_exp7()],
|
51
|
+
"ujr7fmv-1": [/*#__PURE__*/_exp8()],
|
52
|
+
"ujr7fmv-2": [/*#__PURE__*/_exp9()],
|
53
|
+
"ujr7fmv-3": [/*#__PURE__*/_exp10()]
|
43
54
|
}
|
44
55
|
});
|
45
|
-
var base = "
|
56
|
+
var base = "byfocd2";
|
46
57
|
|
58
|
+
exports.StyledPopover = StyledPopover;
|
47
59
|
exports.Ul = Ul;
|
48
60
|
exports.base = base;
|
49
61
|
//# sourceMappingURL=Dropdown.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { getCorrectHeight } from './utils';\nimport { DropdownProps } from './Dropdown.types';\nimport { tokens
|
1
|
+
{"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { getCorrectHeight } from './utils';\nimport { DropdownProps } from './Dropdown.types';\nimport { tokens } from './Dropdown.tokens';\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.wrapper)}, .${String(popoverClasses.target)} {\n display: block;\n }\n`;\n\nexport const Ul = styled.ul<{\n listHeight: DropdownProps['listHeight'];\n listOverflow: DropdownProps['listOverflow'];\n isInnerUl?: boolean;\n listWidth?: DropdownProps['listWidth'];\n}>`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || `var(${tokens.width})`};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 var(${tokens.padding})` : 0)};\n padding: var(${tokens.padding});\n`;\n\nexport const base = css`\n display: inline-block;\n`;\n"],"names":["Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","_exp7","_ref","listWidth","concat","tokens","width","_exp8","_ref2","listHeight","getCorrectHeight","_exp9","_ref3","listOverflow","_exp10","_ref4","isInnerUl","padding","Ul","vars","base"],"mappings":";;;;;;;;;;AAUA,IAAMA,OAAO,gBAAGC,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAAC,IAAAC,KAAA,GAfgBA,SAehBA,KAAAA,GAAA;AAAA,EAAA,OAcW,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,IAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,SAAS,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,sBAAM,CAACC,KAAM,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GA7BjDA,SA6BiDA,KAAAA,GAAA;AAAA,EAAA,OACrD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,UAAAA,GAAAA,KAAAA,CAAAA,UAAAA,CAAAA;AAAAA,IAAAA,OAAkBA,UAAU,GAAGC,sBAAgB,CAACD,UAAU,CAAC,GAAG,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAE,KAAA,GA9BpEA,SA8BoEA,KAAAA,GAAA;AAAA,EAAA,OACtE,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,KAAAA,CAAAA,YAAAA,CAAAA;IAAAA,OAAmBA,YAAY,IAAI,SAAS,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,MAAA,GA/B7CA,SA+B6CA,MAAAA,GAAA;AAAA,EAAA,OAEjD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,KAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAiBA,SAAS,GAAA,WAAA,CAAAZ,MAAA,CAAeC,sBAAM,CAACY,OAAQ,EAAAb,kBAAAA,CAAAA,CAAAA,MAAA,CAAkBC,sBAAM,CAACY,OAAQ,SAAK,CAAE,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAhB1G,IAAMC,EAAE,gBAAGrB,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,IAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAmB,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAYXlB,KAAsD,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACrDM,KAAwE,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACtEI,KAA+C,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAEjDG,MAAmG,EAAA,CAAA;AAAA,GAAA;AAAA,CAEhH,EAAA;AAEM,IAAMM,IAAI,GAEhB;;;;;;"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
.sn7uamp .popover-wrapper,.sn7uamp .popover-target{display:block;}
|
2
|
+
.ujr7fmv{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--ujr7fmv-0);height:var(--ujr7fmv-1);overflow:var(--ujr7fmv-2);margin:var(--ujr7fmv-3);padding:var(--plasma-dropdown-padding);}
|
3
|
+
.byfocd2{display:inline-block;}
|
@@ -7,7 +7,7 @@ var classes = {
|
|
7
7
|
dropdownItemIsFocused: 'dropdown-item-is-focused',
|
8
8
|
dropdownItemIsDisabled: 'dropdown-item-is-disabled',
|
9
9
|
dropdownItemIsActive: 'dropdown-item-is-active',
|
10
|
-
dropdownItemIsSelected: '
|
10
|
+
dropdownItemIsSelected: 'dropdownItemIsSelected'
|
11
11
|
};
|
12
12
|
var tokens = {
|
13
13
|
background: '--plasma-dropdown-background',
|
@@ -18,8 +18,6 @@ var tokens = {
|
|
18
18
|
disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
|
19
19
|
disabledOpacity: '--plasma-dropdown-disabled-opacity',
|
20
20
|
focusColor: '--plasma-dropdown-focus-color',
|
21
|
-
// Old
|
22
|
-
|
23
21
|
dividerColor: '--plasma-dropdown-divider-color',
|
24
22
|
dividerMarginTop: '--plasma-dropdown-divider-margin-top',
|
25
23
|
dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',
|
@@ -34,7 +32,6 @@ var tokens = {
|
|
34
32
|
itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
|
35
33
|
// Old
|
36
34
|
itemColor: '--plasma-dropdown-item-color',
|
37
|
-
// Old
|
38
35
|
itemColorSelected: '--plasma-dropdown-item-color-selected',
|
39
36
|
// Old
|
40
37
|
itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
|
@@ -53,17 +50,11 @@ var tokens = {
|
|
53
50
|
itemMarginLeft: '--plasma-dropdown-item-margin-left',
|
54
51
|
// Old
|
55
52
|
itemPaddingTop: '--plasma-dropdown-item-padding-top',
|
56
|
-
// Old
|
57
53
|
itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
|
58
|
-
// Old
|
59
54
|
itemPaddingRight: '--plasma-dropdown-item-padding-right',
|
60
|
-
// Old
|
61
55
|
itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
|
62
|
-
// Old
|
63
56
|
itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
|
64
|
-
// Old
|
65
57
|
itemPaddingLeft: '--plasma-dropdown-item-padding-left',
|
66
|
-
// Old
|
67
58
|
itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
|
68
59
|
// Old
|
69
60
|
itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
|
@@ -78,20 +69,6 @@ var tokens = {
|
|
78
69
|
itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
|
79
70
|
itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
|
80
71
|
itemFontLineHeight: '--plasma-dropdown-item-font-weight',
|
81
|
-
itemPadding: '--plasma-dropdown-item-padding',
|
82
|
-
itemPaddingTight: '--plasma-dropdown-item-padding-tight',
|
83
|
-
cellPadding: '--plasma-dropdown-cell-padding',
|
84
|
-
cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',
|
85
|
-
cellPaddingContent: '--plasma-dropdown-cell-padding-content',
|
86
|
-
cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',
|
87
|
-
cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',
|
88
|
-
cellGap: '--plasma-dropdown-cell-gap',
|
89
|
-
cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',
|
90
|
-
cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',
|
91
|
-
cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',
|
92
|
-
cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',
|
93
|
-
cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',
|
94
|
-
cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',
|
95
72
|
// TODO: Remove below tokens as soon as they are no longer needed
|
96
73
|
footerBackground: '--plasma-dropdown-footer-background',
|
97
74
|
footerWidth: '--plasma-dropdown-footer-width',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color', // Old\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color', // Old\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top', // Old\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight', // Old\n itemPaddingRight: '--plasma-dropdown-item-padding-right', // Old\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom', // Old\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight', // Old\n itemPaddingLeft: '--plasma-dropdown-item-padding-left', // Old\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemPadding: '--plasma-dropdown-item-padding',\n itemPaddingTight: '--plasma-dropdown-item-padding-tight',\n\n cellPadding: '--plasma-dropdown-cell-padding',\n cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',\n cellPaddingContent: '--plasma-dropdown-cell-padding-content',\n cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',\n cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',\n cellGap: '--plasma-dropdown-cell-gap',\n cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',\n cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',\n cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',\n cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n background: '--surface-solid-card-brightness',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n disclosureIconColor: '--text-secondary',\n itemBackground: '--plasma-colors-transparent',\n itemBackgroundHover: '--surface-transparent-secondary',\n opacity: '0.4',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--plasma-colors-transparent',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemPadding","itemPaddingTight","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabel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E,2CAAA;AAC1B;;;;;"}
|
1
|
+
{"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdownItemIsSelected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color',\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,sBAAsB,EAAE,wBAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,OAAO,EAAE,2BAA2B;AACpCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAE3CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,wBAAwB,EAAE,+CAA+C;AACzEC,EAAAA,iBAA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AE,sCAAsC;AAE5DC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,aAAa,EAAE,kCAAkC;AAEjDC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,kBAAkB,EAAE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAAA;AAC1B;;;;;"}
|
@@ -3,21 +3,29 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var React = require('react');
|
6
|
-
var plasmaCore = require('@salutejs/plasma-core');
|
7
6
|
var Dropdown_styles = require('../../Dropdown.styles.js');
|
8
|
-
var FloatingPopover = require('../../FloatingPopover.js');
|
9
7
|
var DropdownItem = require('../DropdownItem/DropdownItem.js');
|
10
8
|
|
11
9
|
var DropdownInner = function DropdownInner(_ref) {
|
12
10
|
var item = _ref.item,
|
13
11
|
currentLevel = _ref.currentLevel,
|
12
|
+
focusedPath = _ref.focusedPath,
|
14
13
|
path = _ref.path,
|
15
14
|
dispatchPath = _ref.dispatchPath,
|
16
15
|
index = _ref.index,
|
17
16
|
trigger = _ref.trigger,
|
17
|
+
itemRole = _ref.itemRole,
|
18
18
|
listHeight = _ref.listHeight,
|
19
19
|
listOverflow = _ref.listOverflow,
|
20
|
-
|
20
|
+
handleGlobalToggle = _ref.handleGlobalToggle,
|
21
|
+
closeOnSelect = _ref.closeOnSelect,
|
22
|
+
onHover = _ref.onHover,
|
23
|
+
onItemSelect = _ref.onItemSelect,
|
24
|
+
onItemClick = _ref.onItemClick,
|
25
|
+
listWidth = _ref.listWidth,
|
26
|
+
variant = _ref.variant,
|
27
|
+
hasArrow = _ref.hasArrow,
|
28
|
+
size = _ref.size;
|
21
29
|
var handleToggle = function handleToggle(opened) {
|
22
30
|
if (opened) {
|
23
31
|
dispatchPath({
|
@@ -33,54 +41,80 @@ var DropdownInner = function DropdownInner(_ref) {
|
|
33
41
|
}
|
34
42
|
};
|
35
43
|
var isCurrentListOpen = path[currentLevel + 1] === item.value.toString();
|
36
|
-
var
|
37
|
-
var listId = "".concat(treeId, "_tree_level_").concat(currentLevel + 2);
|
44
|
+
var listId = "tree_level_".concat(currentLevel + 2);
|
38
45
|
var nextLevel = currentLevel + 1;
|
39
46
|
if (item !== null && item !== void 0 && item.items) {
|
40
|
-
return /*#__PURE__*/React.createElement(
|
41
|
-
placement: "right-start",
|
47
|
+
return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
|
42
48
|
opened: isCurrentListOpen,
|
43
|
-
|
49
|
+
usePortal: false,
|
50
|
+
placement: "right-start",
|
44
51
|
trigger: trigger,
|
45
52
|
target: /*#__PURE__*/React.createElement(DropdownItem.DropdownItem, {
|
46
53
|
item: item,
|
47
54
|
index: index,
|
48
55
|
path: path,
|
56
|
+
focusedPath: focusedPath,
|
49
57
|
currentLevel: currentLevel,
|
58
|
+
itemRole: itemRole,
|
59
|
+
onHover: onHover,
|
60
|
+
onItemSelect: onItemSelect,
|
61
|
+
onItemClick: onItemClick,
|
62
|
+
variant: variant,
|
63
|
+
hasArrow: hasArrow,
|
50
64
|
ariaControls: listId,
|
51
65
|
ariaExpanded: isCurrentListOpen,
|
52
66
|
ariaLevel: nextLevel,
|
53
|
-
ariaLabel: item.label
|
67
|
+
ariaLabel: item.label,
|
68
|
+
size: size
|
54
69
|
}),
|
55
|
-
|
70
|
+
onToggle: handleToggle,
|
71
|
+
isFocusTrapped: false,
|
72
|
+
preventOverflow: false
|
56
73
|
}, /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
|
57
|
-
id: listId,
|
58
|
-
role: "group",
|
59
|
-
isInnerUl: true,
|
60
74
|
listHeight: listHeight,
|
61
75
|
listOverflow: listOverflow,
|
62
|
-
|
76
|
+
role: "group",
|
77
|
+
id: listId,
|
78
|
+
listWidth: listWidth,
|
79
|
+
isInnerUl: true
|
63
80
|
}, item.items.map(function (innerItem, innerIndex) {
|
64
81
|
return /*#__PURE__*/React.createElement(DropdownInner, {
|
65
82
|
key: "".concat(innerIndex, "/").concat(currentLevel),
|
66
83
|
item: innerItem,
|
67
84
|
currentLevel: nextLevel,
|
85
|
+
focusedPath: focusedPath,
|
68
86
|
path: path,
|
69
87
|
dispatchPath: dispatchPath,
|
70
88
|
index: innerIndex,
|
71
89
|
trigger: trigger,
|
90
|
+
itemRole: itemRole,
|
72
91
|
listHeight: listHeight,
|
73
92
|
listOverflow: listOverflow,
|
74
|
-
|
93
|
+
handleGlobalToggle: handleGlobalToggle,
|
94
|
+
closeOnSelect: closeOnSelect,
|
95
|
+
onHover: onHover,
|
96
|
+
onItemSelect: onItemSelect,
|
97
|
+
onItemClick: onItemClick,
|
98
|
+
listWidth: listWidth,
|
99
|
+
variant: variant,
|
100
|
+
hasArrow: hasArrow,
|
101
|
+
size: size
|
75
102
|
});
|
76
103
|
})));
|
77
104
|
}
|
78
105
|
return /*#__PURE__*/React.createElement(DropdownItem.DropdownItem, {
|
79
106
|
item: item,
|
80
|
-
path: path,
|
81
107
|
index: index,
|
108
|
+
focusedPath: focusedPath,
|
82
109
|
currentLevel: currentLevel,
|
83
|
-
|
110
|
+
itemRole: itemRole,
|
111
|
+
handleGlobalToggle: handleGlobalToggle,
|
112
|
+
closeOnSelect: closeOnSelect,
|
113
|
+
onHover: onHover,
|
114
|
+
onItemSelect: onItemSelect,
|
115
|
+
onItemClick: onItemClick,
|
116
|
+
variant: variant,
|
117
|
+
size: size
|
84
118
|
});
|
85
119
|
};
|
86
120
|
|