@salutejs/plasma-new-hope 0.78.0-canary.1203.8970261959.0 → 0.78.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Calendar/Calendar.types.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -3
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/hooks/useDays.js +3 -6
- package/cjs/components/Calendar/hooks/useDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +20 -7
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +18 -6
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +18 -6
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +18 -6
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +18 -6
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +81 -10
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +21 -9
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
- package/cjs/components/Combobox/utils/index.js +23 -0
- package/cjs/components/Combobox/utils/index.js.map +1 -0
- package/cjs/components/Dropdown/Dropdown.css +28 -2
- package/cjs/components/Dropdown/Dropdown.js +141 -54
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +40 -7
- 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 +26 -23
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/hooks/useHashMaps.js +34 -0
- package/cjs/components/Dropdown/hooks/useHashMaps.js.map +1 -0
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +247 -0
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
- package/cjs/components/Dropdown/reducers/focusedPathReducer.js +37 -0
- package/cjs/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
- package/cjs/components/Dropdown/reducers/pathReducer.js +41 -0
- package/cjs/components/Dropdown/reducers/pathReducer.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +125 -0
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +79 -100
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +31 -5
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +30 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +4 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +112 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +1 -0
- package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +1 -0
- package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +29 -0
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles_3w3l45.css +2 -0
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +7 -0
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +99 -0
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +115 -0
- package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/utils/index.js +23 -0
- package/cjs/components/Dropdown/ui/DropdownOld/utils/index.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js +9 -0
- package/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js +9 -0
- package/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js.map +1 -0
- package/cjs/components/Dropdown/utils/index.js +16 -0
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +17 -7
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -7
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Select/Select.css +17 -7
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +18 -6
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +18 -6
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +18 -6
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +18 -6
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
- package/cjs/components/Select/ui/SelectItem/SelectItem.css +19 -7
- package/cjs/components/Select/ui/SelectItem/SelectItem.js +3 -3
- package/cjs/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
- package/cjs/components/Select/ui/SelectItem/{SelectItem.styles_6h17aw.css → SelectItem.styles_vk39mp.css} +1 -1
- package/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
- package/cjs/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
- package/cjs/index.css +21 -8
- package/cjs/index.js +13 -2
- package/cjs/index.js.map +1 -1
- package/es/components/Calendar/Calendar.types.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -3
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/hooks/useDays.js +3 -6
- package/es/components/Calendar/hooks/useDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Combobox/Combobox.css +20 -7
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +18 -6
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +2 -2
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +18 -6
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +2 -2
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +18 -6
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +2 -2
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +18 -6
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +2 -2
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -23
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +82 -11
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +19 -10
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_s4sk53.css +4 -0
- package/es/components/Combobox/utils/index.js +19 -0
- package/es/components/Combobox/utils/index.js.map +1 -0
- package/es/components/Dropdown/Dropdown.css +28 -2
- package/es/components/Dropdown/Dropdown.js +147 -60
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +39 -7
- 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 +26 -23
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/hooks/useHashMaps.js +30 -0
- package/es/components/Dropdown/hooks/useHashMaps.js.map +1 -0
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js +242 -0
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +1 -0
- package/es/components/Dropdown/reducers/focusedPathReducer.js +33 -0
- package/es/components/Dropdown/reducers/focusedPathReducer.js.map +1 -0
- package/es/components/Dropdown/reducers/pathReducer.js +37 -0
- package/es/components/Dropdown/reducers/pathReducer.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +121 -0
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +7 -4
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +80 -100
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +30 -5
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1o4szyu.css +5 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +23 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css +4 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +107 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js.map +1 -0
- package/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/variations/_size/base.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownItemOld/variations/_size/base_x642ct.css +1 -0
- package/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/variations/_view/base.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownItemOld/variations/_view/base_x642ct.css +1 -0
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +24 -0
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles_3w3l45.css +2 -0
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +7 -0
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +94 -0
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +111 -0
- package/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/utils/index.js +18 -0
- package/es/components/Dropdown/ui/DropdownOld/utils/index.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js +5 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_size/base_x642ct.css +1 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js +5 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownOld/variations/_view/base_x642ct.css +1 -0
- package/es/components/Dropdown/utils/index.js +16 -2
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/Pagination/Pagination.css +17 -7
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -7
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Select/Select.css +17 -7
- package/es/components/Select/ui/SelectDivider/SelectDivider.css +18 -6
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +2 -2
- package/es/components/Select/ui/SelectFooter/SelectFooter.css +18 -6
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +2 -2
- package/es/components/Select/ui/SelectGroup/SelectGroup.css +18 -6
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +2 -2
- package/es/components/Select/ui/SelectHeader/SelectHeader.css +18 -6
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +2 -2
- package/es/components/Select/ui/SelectItem/SelectItem.css +19 -7
- package/es/components/Select/ui/SelectItem/SelectItem.js +3 -3
- package/es/components/Select/ui/SelectItem/SelectItem.js.map +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js +2 -2
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js.map +1 -1
- package/es/components/Select/ui/SelectItem/{SelectItem.styles_6h17aw.css → SelectItem.styles_vk39mp.css} +1 -1
- package/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
- package/es/components/_Icon/Icon.assets/DisclosureRight.js.map +1 -1
- package/es/index.css +21 -8
- package/es/index.js +6 -1
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -3
- package/styled-components/cjs/components/Calendar/hooks/useDays.js +3 -6
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
- package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +91 -2
- package/styled-components/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +27 -7
- package/styled-components/cjs/components/Combobox/utils/index.js +23 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.js +140 -54
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +22 -7
- package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +325 -66
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +26 -23
- package/styled-components/cjs/components/Dropdown/hooks/useHashMaps.js +32 -0
- package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +249 -0
- package/styled-components/cjs/components/Dropdown/index.js +9 -1
- package/styled-components/cjs/components/Dropdown/reducers/focusedPathReducer.js +40 -0
- package/styled-components/cjs/components/Dropdown/reducers/pathReducer.js +44 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +117 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +5 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +77 -105
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +24 -19
- package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +33 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +5 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +119 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +19 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/Dropdown.types.js +5 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.js +101 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +118 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/utils/index.js +21 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_size/tokens.json +1 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownOld/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/Dropdown/ui/index.js +39 -5
- package/styled-components/cjs/components/Dropdown/utils/index.js +15 -1
- package/styled-components/cjs/components/Dropdown/variations/_size/tokens.json +1 -9
- package/styled-components/cjs/components/Dropdown/variations/_view/tokens.json +1 -1
- package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/styled-components/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +6 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +25 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +292 -0
- package/styled-components/cjs/examples/plasma_web/components/Calendar/Calendar.stories.tsx +6 -18
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +25 -0
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +292 -0
- package/styled-components/cjs/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +6 -18
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -3
- package/styled-components/es/components/Calendar/hooks/useDays.js +3 -6
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +1 -2
- package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +90 -3
- package/styled-components/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +23 -6
- package/styled-components/es/components/Combobox/utils/index.js +15 -0
- package/styled-components/es/components/Dropdown/Dropdown.js +142 -55
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +18 -5
- package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +325 -66
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +26 -23
- package/styled-components/es/components/Dropdown/hooks/useHashMaps.js +26 -0
- package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +243 -0
- package/styled-components/es/components/Dropdown/index.js +1 -0
- package/styled-components/es/components/Dropdown/reducers/focusedPathReducer.js +34 -0
- package/styled-components/es/components/Dropdown/reducers/pathReducer.js +38 -0
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +111 -0
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.type.js +1 -0
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +78 -107
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +21 -15
- package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +25 -0
- package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.js +1 -0
- package/styled-components/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.js +111 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +13 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/Dropdown.types.js +1 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.js +92 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.js +112 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/utils/index.js +15 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_size/base.js +2 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_size/tokens.json +1 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_view/base.js +2 -0
- package/styled-components/es/components/Dropdown/ui/DropdownOld/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/Dropdown/ui/index.js +5 -1
- package/styled-components/es/components/Dropdown/utils/index.js +15 -1
- package/styled-components/es/components/Dropdown/variations/_size/tokens.json +1 -9
- package/styled-components/es/components/Dropdown/variations/_view/tokens.json +1 -1
- package/styled-components/es/components/Select/ui/SelectItem/SelectItem.js +2 -2
- package/styled-components/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/styled-components/es/components/_Icon/Icon.assets/DisclosureRight.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Calendar/Calendar.stories.tsx +6 -18
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +19 -0
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +292 -0
- package/styled-components/es/examples/plasma_web/components/Calendar/Calendar.stories.tsx +6 -18
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +19 -0
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.js +5 -0
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +292 -0
- package/styled-components/es/examples/sds_engineer/components/Calendar/Calendar.stories.tsx +6 -18
- package/types/components/Calendar/Calendar.types.d.ts +0 -4
- package/types/components/Calendar/Calendar.types.d.ts.map +1 -1
- package/types/components/Calendar/CalendarBase/CalendarBase.d.ts.map +1 -1
- package/types/components/Calendar/hooks/useDays.d.ts +1 -1
- package/types/components/Calendar/hooks/useDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.d.ts.map +1 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts +0 -1
- package/types/components/Calendar/ui/CalendarDays/CalendarDays.types.d.ts.map +1 -1
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts +15 -13
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.d.ts.map +1 -1
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts +5 -1
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.d.ts.map +1 -1
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts +59 -2
- package/types/components/Combobox/ui/ComboboxItem/ComboboxItem.type.d.ts.map +1 -1
- package/types/components/Combobox/utils/index.d.ts +4 -0
- package/types/components/Combobox/utils/index.d.ts.map +1 -0
- package/types/components/Dropdown/Dropdown.d.ts +4 -4
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +8 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +24 -22
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +64 -40
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/hooks/useHashMaps.d.ts +6 -0
- package/types/components/Dropdown/hooks/useHashMaps.d.ts.map +1 -0
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +37 -0
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/types/components/Dropdown/index.d.ts +3 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/reducers/focusedPathReducer.d.ts +16 -0
- package/types/components/Dropdown/reducers/focusedPathReducer.d.ts.map +1 -0
- package/types/components/Dropdown/reducers/pathReducer.d.ts +20 -0
- package/types/components/Dropdown/reducers/pathReducer.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts +5 -0
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +26 -0
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts +2 -56
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +5 -2
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +44 -38
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts +7 -0
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts +60 -0
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItem.type.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts +58 -0
- package/types/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownItemOld/variations/_size/base.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownItemOld/variations/_view/base.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/Dropdown.styles.d.ts +8 -0
- package/types/components/Dropdown/ui/DropdownOld/Dropdown.styles.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/Dropdown.types.d.ts +76 -0
- package/types/components/Dropdown/ui/DropdownOld/Dropdown.types.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts +26 -0
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.d.ts +113 -0
- package/types/components/Dropdown/ui/DropdownOld/DropdownOld.tokens.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/utils/index.d.ts +4 -0
- package/types/components/Dropdown/ui/DropdownOld/utils/index.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/variations/_size/base.d.ts +2 -0
- package/types/components/Dropdown/ui/DropdownOld/variations/_size/base.d.ts.map +1 -0
- package/types/components/Dropdown/ui/DropdownOld/variations/_view/base.d.ts +2 -0
- package/types/components/Dropdown/ui/DropdownOld/variations/_view/base.d.ts.map +1 -0
- package/types/components/Dropdown/ui/index.d.ts +5 -1
- package/types/components/Dropdown/ui/index.d.ts.map +1 -1
- package/types/components/Dropdown/utils/index.d.ts +5 -2
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/Select/ui/SelectItem/SelectItem.d.ts +2 -2
- package/types/components/Select/ui/SelectItem/SelectItem.d.ts.map +1 -1
- package/types/components/Select/ui/SelectItem/SelectItem.type.d.ts +2 -2
- package/types/components/Select/utils/index.d.ts +1 -1
- package/types/components/_Icon/Icon.assets/DisclosureRight.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +13 -0
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +13 -0
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
- package/cjs/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
- package/cjs/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
- package/cjs/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles_936wgl.css +0 -1
- package/es/components/Dropdown/Dropdown.styles_1daxhqh.css +0 -2
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_1juhjtq.css +0 -4
- package/es/components/Dropdown/ui/DropdownItem/variations/_size/base.js.map +0 -1
- package/es/components/Dropdown/ui/DropdownItem/variations/_view/base.js.map +0 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -13
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -13
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -27
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -13
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -27
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -13
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
- package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -22
- package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -21
- package/styled-components/cjs/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
- package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_size/tokens.json +0 -19
- package/styled-components/es/components/Dropdown/ui/DropdownItem/variations/_view/tokens.json +0 -9
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +0 -21
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.js +0 -7
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +0 -194
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +0 -21
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.js +0 -7
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +0 -21
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.js +0 -7
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +0 -195
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +0 -21
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.js +0 -7
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +0 -195
- package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.config.js +0 -16
- package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.js +0 -15
- package/styled-components/es/examples/sds_engineer/components/Dropdown/Dropdown.stories.tsx +0 -277
- package/types/components/Dropdown/ui/DropdownItem/variations/_size/base.d.ts.map +0 -1
- package/types/components/Dropdown/ui/DropdownItem/variations/_view/base.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts +0 -30
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts +0 -30
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts +0 -18
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts +0 -30
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts +0 -18
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts +0 -30
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.d.ts.map +0 -1
- package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts +0 -15
- package/types/examples/sds_engineer/components/Dropdown/Dropdown.config.d.ts.map +0 -1
- package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts +0 -51
- package/types/examples/sds_engineer/components/Dropdown/Dropdown.d.ts.map +0 -1
- /package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base_x642ct.css +0 -0
- /package/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base_x642ct.css +0 -0
- /package/{es/components/Dropdown/ui/DropdownItem → cjs/components/Dropdown/ui/DropdownOld}/variations/_size/base_x642ct.css +0 -0
- /package/{es/components/Dropdown/ui/DropdownItem → cjs/components/Dropdown/ui/DropdownOld}/variations/_view/base_x642ct.css +0 -0
- /package/styled-components/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +0 -0
- /package/styled-components/cjs/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +0 -0
- /package/styled-components/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.js +0 -0
- /package/styled-components/es/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.js +0 -0
- /package/types/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_size/base.d.ts +0 -0
- /package/types/components/Dropdown/ui/{DropdownItem → DropdownItemOld}/variations/_view/base.d.ts +0 -0
- /package/types/examples/plasma_b2c/components/Dropdown/{Normal/Dropdown.config.d.ts → Dropdown.config.d.ts} +0 -0
- /package/types/examples/{plasma_b2c/components/Dropdown/Tight → plasma_web/components/Dropdown}/Dropdown.config.d.ts +0 -0
@@ -0,0 +1,242 @@
|
|
1
|
+
var JUMP_SIZE = 10;
|
2
|
+
var keys = {
|
3
|
+
Enter: 'Enter',
|
4
|
+
Space: 'Space',
|
5
|
+
Tab: 'Tab',
|
6
|
+
Escape: 'Escape',
|
7
|
+
ArrowLeft: 'ArrowLeft',
|
8
|
+
ArrowRight: 'ArrowRight',
|
9
|
+
ArrowUp: 'ArrowUp',
|
10
|
+
ArrowDown: 'ArrowDown',
|
11
|
+
Home: 'Home',
|
12
|
+
End: 'End',
|
13
|
+
PageUp: 'PageUp',
|
14
|
+
PageDown: 'PageDown'
|
15
|
+
};
|
16
|
+
var getFurtherPath = function getFurtherPath(focusedPath, focusedToValueMap) {
|
17
|
+
var focusedPathAsString = focusedPath.reduce(function (acc, n) {
|
18
|
+
return "".concat(acc, "/").concat(n);
|
19
|
+
}, '').replace(/^(\/)/, '');
|
20
|
+
return focusedToValueMap.get(focusedPathAsString);
|
21
|
+
};
|
22
|
+
var useKeyNavigation = function useKeyNavigation(_ref) {
|
23
|
+
var focusedPath = _ref.focusedPath,
|
24
|
+
dispatchFocusedPath = _ref.dispatchFocusedPath,
|
25
|
+
path = _ref.path,
|
26
|
+
dispatchPath = _ref.dispatchPath,
|
27
|
+
pathMap = _ref.pathMap,
|
28
|
+
focusedToValueMap = _ref.focusedToValueMap,
|
29
|
+
handleGlobalToggle = _ref.handleGlobalToggle,
|
30
|
+
closeOnSelect = _ref.closeOnSelect,
|
31
|
+
onItemSelect = _ref.onItemSelect,
|
32
|
+
onItemClick = _ref.onItemClick;
|
33
|
+
var currentLength = pathMap.get(path === null || path === void 0 ? void 0 : path[path.length - 1]) || 0;
|
34
|
+
var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
|
35
|
+
var onKeyDown = function onKeyDown(event) {
|
36
|
+
switch (event.code) {
|
37
|
+
case keys.ArrowUp:
|
38
|
+
{
|
39
|
+
if (focusedPath.length) {
|
40
|
+
if (currentIndex > 0) {
|
41
|
+
dispatchFocusedPath({
|
42
|
+
type: 'change_last_focus',
|
43
|
+
value: currentIndex - 1
|
44
|
+
});
|
45
|
+
}
|
46
|
+
} else {
|
47
|
+
dispatchPath({
|
48
|
+
type: 'opened_first_level'
|
49
|
+
});
|
50
|
+
dispatchFocusedPath({
|
51
|
+
type: 'set_initial_focus'
|
52
|
+
});
|
53
|
+
handleGlobalToggle(true, event);
|
54
|
+
}
|
55
|
+
break;
|
56
|
+
}
|
57
|
+
case keys.ArrowDown:
|
58
|
+
{
|
59
|
+
if (focusedPath.length) {
|
60
|
+
if (currentIndex + 1 < currentLength) {
|
61
|
+
dispatchFocusedPath({
|
62
|
+
type: 'change_last_focus',
|
63
|
+
value: currentIndex + 1
|
64
|
+
});
|
65
|
+
}
|
66
|
+
} else {
|
67
|
+
dispatchPath({
|
68
|
+
type: 'opened_first_level'
|
69
|
+
});
|
70
|
+
dispatchFocusedPath({
|
71
|
+
type: 'set_initial_focus'
|
72
|
+
});
|
73
|
+
handleGlobalToggle(true, event);
|
74
|
+
}
|
75
|
+
break;
|
76
|
+
}
|
77
|
+
case keys.ArrowLeft:
|
78
|
+
{
|
79
|
+
if (focusedPath.length) {
|
80
|
+
dispatchPath({
|
81
|
+
type: 'removed_last_level'
|
82
|
+
});
|
83
|
+
dispatchFocusedPath({
|
84
|
+
type: 'return_prev_focus'
|
85
|
+
});
|
86
|
+
}
|
87
|
+
if (focusedPath.length === 1) {
|
88
|
+
handleGlobalToggle(false, event);
|
89
|
+
}
|
90
|
+
break;
|
91
|
+
}
|
92
|
+
case keys.ArrowRight:
|
93
|
+
{
|
94
|
+
if (!focusedPath.length) {
|
95
|
+
break;
|
96
|
+
}
|
97
|
+
var currentItem = getFurtherPath(focusedPath, focusedToValueMap);
|
98
|
+
if (currentItem !== null && currentItem !== void 0 && currentItem.items) {
|
99
|
+
dispatchPath({
|
100
|
+
type: 'added_next_level',
|
101
|
+
value: currentItem.value.toString()
|
102
|
+
});
|
103
|
+
dispatchFocusedPath({
|
104
|
+
type: 'add_focus',
|
105
|
+
value: 0
|
106
|
+
});
|
107
|
+
}
|
108
|
+
break;
|
109
|
+
}
|
110
|
+
case keys.Enter:
|
111
|
+
case keys.Space:
|
112
|
+
{
|
113
|
+
event.preventDefault();
|
114
|
+
if (!path[0]) {
|
115
|
+
dispatchPath({
|
116
|
+
type: 'opened_first_level'
|
117
|
+
});
|
118
|
+
dispatchFocusedPath({
|
119
|
+
type: 'set_initial_focus'
|
120
|
+
});
|
121
|
+
break;
|
122
|
+
}
|
123
|
+
var _currentItem = getFurtherPath(focusedPath, focusedToValueMap);
|
124
|
+
if (_currentItem !== null && _currentItem !== void 0 && _currentItem.disabled || _currentItem !== null && _currentItem !== void 0 && _currentItem.isDisabled) {
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
if (_currentItem !== null && _currentItem !== void 0 && _currentItem.items) {
|
128
|
+
dispatchPath({
|
129
|
+
type: 'added_next_level',
|
130
|
+
value: _currentItem.value.toString()
|
131
|
+
});
|
132
|
+
dispatchFocusedPath({
|
133
|
+
type: 'add_focus',
|
134
|
+
value: 0
|
135
|
+
});
|
136
|
+
} else {
|
137
|
+
if (closeOnSelect) {
|
138
|
+
handleGlobalToggle(false, event);
|
139
|
+
}
|
140
|
+
if (onItemSelect && _currentItem) {
|
141
|
+
onItemSelect(_currentItem, event);
|
142
|
+
}
|
143
|
+
if (onItemClick && _currentItem) {
|
144
|
+
onItemClick(_currentItem, event);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
break;
|
148
|
+
}
|
149
|
+
case keys.Tab:
|
150
|
+
case keys.Escape:
|
151
|
+
{
|
152
|
+
dispatchFocusedPath({
|
153
|
+
type: 'reset'
|
154
|
+
});
|
155
|
+
dispatchPath({
|
156
|
+
type: 'reset'
|
157
|
+
});
|
158
|
+
handleGlobalToggle(false, event);
|
159
|
+
break;
|
160
|
+
}
|
161
|
+
case keys.Home:
|
162
|
+
{
|
163
|
+
if (path[0]) {
|
164
|
+
dispatchFocusedPath({
|
165
|
+
type: 'change_last_focus',
|
166
|
+
value: 0
|
167
|
+
});
|
168
|
+
} else {
|
169
|
+
dispatchPath({
|
170
|
+
type: 'opened_first_level'
|
171
|
+
});
|
172
|
+
dispatchFocusedPath({
|
173
|
+
type: 'set_initial_focus'
|
174
|
+
});
|
175
|
+
handleGlobalToggle(true, event);
|
176
|
+
}
|
177
|
+
break;
|
178
|
+
}
|
179
|
+
case keys.End:
|
180
|
+
{
|
181
|
+
if (path[0]) {
|
182
|
+
dispatchFocusedPath({
|
183
|
+
type: 'change_last_focus',
|
184
|
+
value: currentLength - 1
|
185
|
+
});
|
186
|
+
} else {
|
187
|
+
dispatchPath({
|
188
|
+
type: 'opened_first_level'
|
189
|
+
});
|
190
|
+
dispatchFocusedPath({
|
191
|
+
type: 'change_last_focus',
|
192
|
+
value: (pathMap.get('root') || 0) - 1
|
193
|
+
});
|
194
|
+
handleGlobalToggle(true, event);
|
195
|
+
}
|
196
|
+
break;
|
197
|
+
}
|
198
|
+
case keys.PageUp:
|
199
|
+
{
|
200
|
+
if (!path[0]) {
|
201
|
+
break;
|
202
|
+
}
|
203
|
+
if (currentIndex <= JUMP_SIZE) {
|
204
|
+
dispatchFocusedPath({
|
205
|
+
type: 'change_last_focus',
|
206
|
+
value: 0
|
207
|
+
});
|
208
|
+
} else {
|
209
|
+
dispatchFocusedPath({
|
210
|
+
type: 'change_last_focus',
|
211
|
+
value: currentIndex - JUMP_SIZE
|
212
|
+
});
|
213
|
+
}
|
214
|
+
break;
|
215
|
+
}
|
216
|
+
case keys.PageDown:
|
217
|
+
{
|
218
|
+
if (!path[0]) {
|
219
|
+
break;
|
220
|
+
}
|
221
|
+
if (currentLength - currentIndex <= JUMP_SIZE) {
|
222
|
+
dispatchFocusedPath({
|
223
|
+
type: 'change_last_focus',
|
224
|
+
value: currentLength - 1
|
225
|
+
});
|
226
|
+
} else {
|
227
|
+
dispatchFocusedPath({
|
228
|
+
type: 'change_last_focus',
|
229
|
+
value: currentIndex + JUMP_SIZE
|
230
|
+
});
|
231
|
+
}
|
232
|
+
break;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
};
|
236
|
+
return {
|
237
|
+
onKeyDown: onKeyDown
|
238
|
+
};
|
239
|
+
};
|
240
|
+
|
241
|
+
export { keys, useKeyNavigation };
|
242
|
+
//# sourceMappingURL=useKeyboardNavigation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/Dropdown/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import { KeyboardEvent } from 'react';\nimport type { Dispatch } from 'react';\n\nimport { PathAction, PathState } from '../reducers/pathReducer';\nimport { FocusedPathAction, FocusedPathState } from '../reducers/focusedPathReducer';\nimport { HandleGlobalToggleType, DropdownProps } from '../Dropdown.types';\n\nimport { PathMapType, FocusedToValueMapType } from './useHashMaps';\n\nconst JUMP_SIZE = 10;\n\nexport const keys = {\n Enter: 'Enter',\n Space: 'Space',\n Tab: 'Tab',\n Escape: 'Escape',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n};\n\nconst getFurtherPath = (focusedPath: FocusedPathState, focusedToValueMap: FocusedToValueMapType) => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n\n return focusedToValueMap.get(focusedPathAsString);\n};\n\ninterface Props {\n focusedPath: FocusedPathState;\n dispatchFocusedPath: Dispatch<FocusedPathAction>;\n path: PathState;\n dispatchPath: Dispatch<PathAction>;\n pathMap: PathMapType;\n focusedToValueMap: FocusedToValueMapType;\n handleGlobalToggle: HandleGlobalToggleType;\n closeOnSelect: DropdownProps['closeOnSelect'];\n onItemSelect: DropdownProps['onItemSelect'];\n onItemClick: DropdownProps['onItemClick'];\n}\n\ninterface ReturnedProps {\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n}\n\nexport const useKeyNavigation = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n}: Props): ReturnedProps => {\n const currentLength: number = pathMap.get(path?.[path.length - 1]) || 0;\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.code) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleGlobalToggle(true, event);\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleGlobalToggle(true, event);\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n\n if (focusedPath.length === 1) {\n handleGlobalToggle(false, event);\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (!focusedPath.length) {\n break;\n }\n\n const currentItem = getFurtherPath(focusedPath, focusedToValueMap);\n\n if (currentItem?.items) {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n }\n\n break;\n }\n\n case keys.Enter:\n case keys.Space: {\n event.preventDefault();\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n const currentItem = getFurtherPath(focusedPath, focusedToValueMap);\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (currentItem?.items) {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n if (closeOnSelect) {\n handleGlobalToggle(false, event);\n }\n\n if (onItemSelect && currentItem) {\n onItemSelect(currentItem, event);\n }\n\n if (onItemClick && currentItem) {\n onItemClick(currentItem, event);\n }\n }\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n handleGlobalToggle(false, event);\n\n break;\n }\n\n case keys.Home: {\n if (path[0]) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n\n handleGlobalToggle(true, event);\n }\n\n break;\n }\n\n case keys.End: {\n if (path[0]) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'change_last_focus', value: (pathMap.get('root') || 0) - 1 });\n\n handleGlobalToggle(true, event);\n }\n\n break;\n }\n\n case keys.PageUp: {\n if (!path[0]) {\n break;\n }\n\n if (currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - JUMP_SIZE });\n }\n\n break;\n }\n\n case keys.PageDown: {\n if (!path[0]) {\n break;\n }\n\n if (currentLength - currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + JUMP_SIZE });\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n"],"names":["JUMP_SIZE","keys","Enter","Space","Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","getFurtherPath","focusedPath","focusedToValueMap","focusedPathAsString","reduce","acc","n","concat","replace","get","useKeyNavigation","_ref","dispatchFocusedPath","path","dispatchPath","pathMap","handleGlobalToggle","closeOnSelect","onItemSelect","onItemClick","currentLength","length","currentIndex","onKeyDown","event","code","type","value","currentItem","items","toString","preventDefault","disabled","isDisabled"],"mappings":"AASA,IAAMA,SAAS,GAAG,EAAE,CAAA;AAEb,IAAMC,IAAI,GAAG;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAY;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CAAA;AAAE,aAAC,CAAC,CAAA;AAChF,WAAC,MAAM;AACHR,YAAAA,mBAAmB,CAAC;AAAEc,cAAAA,IAAI,EAAE,mBAAmB;cAAEC,KAAK,EAAEL,YAAY,GAAGpC,SAAAA;AAAU,aAAC,CAAC,CAAA;AACvF,WAAA;AAEA,UAAA,MAAA;AACJ,SAAA;AAKJ,KAAA;GACH,CAAA;EAED,OAAO;AAAEqC,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB;;;;"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
|
3
|
+
function focusedPathReducer(state, action) {
|
4
|
+
switch (action.type) {
|
5
|
+
case 'reset':
|
6
|
+
{
|
7
|
+
return [];
|
8
|
+
}
|
9
|
+
case 'set_initial_focus':
|
10
|
+
{
|
11
|
+
return [0];
|
12
|
+
}
|
13
|
+
case 'change_last_focus':
|
14
|
+
{
|
15
|
+
return [].concat(_toConsumableArray(state.slice(0, -1)), [action.value]);
|
16
|
+
}
|
17
|
+
case 'add_focus':
|
18
|
+
{
|
19
|
+
return [].concat(_toConsumableArray(state), [action.value]);
|
20
|
+
}
|
21
|
+
case 'return_prev_focus':
|
22
|
+
{
|
23
|
+
return _toConsumableArray(state.slice(0, -1));
|
24
|
+
}
|
25
|
+
default:
|
26
|
+
{
|
27
|
+
return state;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
export { focusedPathReducer };
|
33
|
+
//# sourceMappingURL=focusedPathReducer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"focusedPathReducer.js","sources":["../../../../src/components/Dropdown/reducers/focusedPathReducer.ts"],"sourcesContent":["export type FocusedPathState = Array<number>;\n\nexport type FocusedPathAction =\n | { type: 'reset' }\n | { type: 'set_initial_focus' }\n | { type: 'change_last_focus'; value: number }\n | { type: 'add_focus'; value: number }\n | { type: 'return_prev_focus' };\n\nexport function focusedPathReducer(state: FocusedPathState, action: FocusedPathAction): FocusedPathState {\n switch (action.type) {\n case 'reset': {\n return [];\n }\n\n case 'set_initial_focus': {\n return [0];\n }\n\n case 'change_last_focus': {\n return [...state.slice(0, -1), action.value];\n }\n\n case 'add_focus': {\n return [...state, action.value];\n }\n\n case 'return_prev_focus': {\n return [...state.slice(0, -1)];\n }\n\n default: {\n return state;\n }\n }\n}\n"],"names":["focusedPathReducer","state","action","type","concat","_toConsumableArray","slice","value"],"mappings":";;AASO,SAASA,kBAAkBA,CAACC,KAAuB,EAAEC,MAAyB,EAAoB;EACrG,QAAQA,MAAM,CAACC,IAAI;AACf,IAAA,KAAK,OAAO;AAAE,MAAA;AACV,QAAA,OAAO,EAAE,CAAA;AACb,OAAA;AAEA,IAAA,KAAK,mBAAmB;AAAE,MAAA;QACtB,OAAO,CAAC,CAAC,CAAC,CAAA;AACd,OAAA;AAEA,IAAA,KAAK,mBAAmB;AAAE,MAAA;AACtB,QAAA,OAAA,EAAA,CAAAC,MAAA,CAAAC,kBAAA,CAAWJ,KAAK,CAACK,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAEJ,EAAAA,CAAAA,MAAM,CAACK,KAAK,CAAA,CAAA,CAAA;AAC/C,OAAA;AAEA,IAAA,KAAK,WAAW;AAAE,MAAA;QACd,OAAAH,EAAAA,CAAAA,MAAA,CAAAC,kBAAA,CAAWJ,KAAK,CAAEC,EAAAA,CAAAA,MAAM,CAACK,KAAK,CAAA,CAAA,CAAA;AAClC,OAAA;AAEA,IAAA,KAAK,mBAAmB;AAAE,MAAA;QACtB,OAAAF,kBAAA,CAAWJ,KAAK,CAACK,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA,CAAA;AACjC,OAAA;AAEA,IAAA;AAAS,MAAA;AACL,QAAA,OAAOL,KAAK,CAAA;AAChB,OAAA;AACJ,GAAA;AACJ;;;;"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
|
3
|
+
function pathReducer(state, action) {
|
4
|
+
switch (action.type) {
|
5
|
+
case 'reset':
|
6
|
+
{
|
7
|
+
return [];
|
8
|
+
}
|
9
|
+
case 'opened_first_level':
|
10
|
+
{
|
11
|
+
return ['root'];
|
12
|
+
}
|
13
|
+
case 'added_next_level':
|
14
|
+
{
|
15
|
+
return [].concat(_toConsumableArray(state), [action.value]);
|
16
|
+
}
|
17
|
+
case 'removed_last_level':
|
18
|
+
{
|
19
|
+
return _toConsumableArray(state.slice(0, -1));
|
20
|
+
}
|
21
|
+
case 'changed_on_level':
|
22
|
+
{
|
23
|
+
return [].concat(_toConsumableArray(state.slice(0, action.level)), [action.value]);
|
24
|
+
}
|
25
|
+
case 'cut_by_level':
|
26
|
+
{
|
27
|
+
return state.slice(0, action.level);
|
28
|
+
}
|
29
|
+
default:
|
30
|
+
{
|
31
|
+
return state;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
export { pathReducer };
|
37
|
+
//# sourceMappingURL=pathReducer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pathReducer.js","sources":["../../../../src/components/Dropdown/reducers/pathReducer.ts"],"sourcesContent":["export type PathState = Array<string>;\n\nexport type PathAction =\n | { type: 'reset' }\n | { type: 'opened_first_level' }\n | { type: 'added_next_level'; value: string }\n | { type: 'removed_last_level' }\n | { type: 'changed_on_level'; value: string; level: number }\n | { type: 'cut_by_level'; level: number };\n\nexport function pathReducer(state: PathState, action: PathAction): PathState {\n switch (action.type) {\n case 'reset': {\n return [];\n }\n\n case 'opened_first_level': {\n return ['root'];\n }\n\n case 'added_next_level': {\n return [...state, action.value];\n }\n\n case 'removed_last_level': {\n return [...state.slice(0, -1)];\n }\n\n case 'changed_on_level': {\n return [...state.slice(0, action.level), action.value];\n }\n\n case 'cut_by_level': {\n return state.slice(0, action.level);\n }\n\n default: {\n return state;\n }\n }\n}\n"],"names":["pathReducer","state","action","type","concat","_toConsumableArray","value","slice","level"],"mappings":";;AAUO,SAASA,WAAWA,CAACC,KAAgB,EAAEC,MAAkB,EAAa;EACzE,QAAQA,MAAM,CAACC,IAAI;AACf,IAAA,KAAK,OAAO;AAAE,MAAA;AACV,QAAA,OAAO,EAAE,CAAA;AACb,OAAA;AAEA,IAAA,KAAK,oBAAoB;AAAE,MAAA;QACvB,OAAO,CAAC,MAAM,CAAC,CAAA;AACnB,OAAA;AAEA,IAAA,KAAK,kBAAkB;AAAE,MAAA;QACrB,OAAAC,EAAAA,CAAAA,MAAA,CAAAC,kBAAA,CAAWJ,KAAK,CAAEC,EAAAA,CAAAA,MAAM,CAACI,KAAK,CAAA,CAAA,CAAA;AAClC,OAAA;AAEA,IAAA,KAAK,oBAAoB;AAAE,MAAA;QACvB,OAAAD,kBAAA,CAAWJ,KAAK,CAACM,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA,CAAA;AACjC,OAAA;AAEA,IAAA,KAAK,kBAAkB;AAAE,MAAA;AACrB,QAAA,OAAA,EAAA,CAAAH,MAAA,CAAAC,kBAAA,CAAWJ,KAAK,CAACM,KAAK,CAAC,CAAC,EAAEL,MAAM,CAACM,KAAK,CAAC,CAAEN,EAAAA,CAAAA,MAAM,CAACI,KAAK,CAAA,CAAA,CAAA;AACzD,OAAA;AAEA,IAAA,KAAK,cAAc;AAAE,MAAA;QACjB,OAAOL,KAAK,CAACM,KAAK,CAAC,CAAC,EAAEL,MAAM,CAACM,KAAK,CAAC,CAAA;AACvC,OAAA;AAEA,IAAA;AAAS,MAAA;AACL,QAAA,OAAOP,KAAK,CAAA;AAChB,OAAA;AACJ,GAAA;AACJ;;;;"}
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import '@salutejs/plasma-core';
|
3
|
+
import '@linaria/react';
|
4
|
+
import { DropdownItem } from '../DropdownItem/DropdownItem.js';
|
5
|
+
import { StyledPopover, Ul } from '../../Dropdown.styles.js';
|
6
|
+
import '../../../../utils/react.js';
|
7
|
+
import 'focus-visible';
|
8
|
+
import '@linaria/core';
|
9
|
+
import 'react-dom';
|
10
|
+
import 'react-popper';
|
11
|
+
|
12
|
+
var DropdownInner = function DropdownInner(_ref) {
|
13
|
+
var item = _ref.item,
|
14
|
+
currentLevel = _ref.currentLevel,
|
15
|
+
focusedPath = _ref.focusedPath,
|
16
|
+
path = _ref.path,
|
17
|
+
dispatchPath = _ref.dispatchPath,
|
18
|
+
index = _ref.index,
|
19
|
+
trigger = _ref.trigger,
|
20
|
+
itemRole = _ref.itemRole,
|
21
|
+
listHeight = _ref.listHeight,
|
22
|
+
listOverflow = _ref.listOverflow,
|
23
|
+
handleGlobalToggle = _ref.handleGlobalToggle,
|
24
|
+
closeOnSelect = _ref.closeOnSelect,
|
25
|
+
onHover = _ref.onHover,
|
26
|
+
onItemSelect = _ref.onItemSelect,
|
27
|
+
onItemClick = _ref.onItemClick,
|
28
|
+
listWidth = _ref.listWidth,
|
29
|
+
variant = _ref.variant,
|
30
|
+
hasArrow = _ref.hasArrow;
|
31
|
+
var handleToggle = function handleToggle(opened) {
|
32
|
+
if (opened) {
|
33
|
+
dispatchPath({
|
34
|
+
type: 'changed_on_level',
|
35
|
+
value: item.value.toString(),
|
36
|
+
level: currentLevel + 1
|
37
|
+
});
|
38
|
+
} else {
|
39
|
+
dispatchPath({
|
40
|
+
type: 'cut_by_level',
|
41
|
+
level: currentLevel + 1
|
42
|
+
});
|
43
|
+
}
|
44
|
+
};
|
45
|
+
var isCurrentListOpen = path[currentLevel + 1] === item.value.toString();
|
46
|
+
var listId = "tree_level_".concat(currentLevel + 2);
|
47
|
+
var nextLevel = currentLevel + 1;
|
48
|
+
if (item !== null && item !== void 0 && item.items) {
|
49
|
+
return /*#__PURE__*/React.createElement(StyledPopover, {
|
50
|
+
isOpen: isCurrentListOpen,
|
51
|
+
usePortal: false,
|
52
|
+
placement: "right-start",
|
53
|
+
trigger: trigger,
|
54
|
+
target: /*#__PURE__*/React.createElement(DropdownItem, {
|
55
|
+
item: item,
|
56
|
+
index: index,
|
57
|
+
path: path,
|
58
|
+
focusedPath: focusedPath,
|
59
|
+
currentLevel: currentLevel,
|
60
|
+
itemRole: itemRole,
|
61
|
+
onHover: onHover,
|
62
|
+
onItemSelect: onItemSelect,
|
63
|
+
onItemClick: onItemClick,
|
64
|
+
variant: variant,
|
65
|
+
hasArrow: hasArrow,
|
66
|
+
ariaControls: listId,
|
67
|
+
ariaExpanded: isCurrentListOpen,
|
68
|
+
ariaLevel: nextLevel,
|
69
|
+
ariaLabel: item.label
|
70
|
+
}),
|
71
|
+
onToggle: handleToggle,
|
72
|
+
isFocusTrapped: false,
|
73
|
+
preventOverflow: false
|
74
|
+
}, /*#__PURE__*/React.createElement(Ul, {
|
75
|
+
listHeight: listHeight,
|
76
|
+
listOverflow: listOverflow,
|
77
|
+
role: "group",
|
78
|
+
id: listId,
|
79
|
+
listWidth: listWidth,
|
80
|
+
isInnerUl: true
|
81
|
+
}, item.items.map(function (innerItem, innerIndex) {
|
82
|
+
return /*#__PURE__*/React.createElement(DropdownInner, {
|
83
|
+
key: "".concat(innerIndex, "/").concat(currentLevel),
|
84
|
+
item: innerItem,
|
85
|
+
currentLevel: nextLevel,
|
86
|
+
focusedPath: focusedPath,
|
87
|
+
path: path,
|
88
|
+
dispatchPath: dispatchPath,
|
89
|
+
index: innerIndex,
|
90
|
+
trigger: trigger,
|
91
|
+
itemRole: itemRole,
|
92
|
+
listHeight: listHeight,
|
93
|
+
listOverflow: listOverflow,
|
94
|
+
handleGlobalToggle: handleGlobalToggle,
|
95
|
+
closeOnSelect: closeOnSelect,
|
96
|
+
onHover: onHover,
|
97
|
+
onItemSelect: onItemSelect,
|
98
|
+
onItemClick: onItemClick,
|
99
|
+
listWidth: listWidth,
|
100
|
+
variant: variant,
|
101
|
+
hasArrow: hasArrow
|
102
|
+
});
|
103
|
+
})));
|
104
|
+
}
|
105
|
+
return /*#__PURE__*/React.createElement(DropdownItem, {
|
106
|
+
item: item,
|
107
|
+
index: index,
|
108
|
+
focusedPath: focusedPath,
|
109
|
+
currentLevel: currentLevel,
|
110
|
+
itemRole: itemRole,
|
111
|
+
handleGlobalToggle: handleGlobalToggle,
|
112
|
+
closeOnSelect: closeOnSelect,
|
113
|
+
onHover: onHover,
|
114
|
+
onItemSelect: onItemSelect,
|
115
|
+
onItemClick: onItemClick,
|
116
|
+
variant: variant
|
117
|
+
});
|
118
|
+
};
|
119
|
+
|
120
|
+
export { DropdownInner };
|
121
|
+
//# sourceMappingURL=DropdownInner.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DropdownInner.js","sources":["../../../../../src/components/Dropdown/ui/DropdownInner/DropdownInner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\n\nimport { DropdownItem } from '..';\nimport { Ul, StyledPopover } from '../../Dropdown.styles';\n\nimport { DropdownInnerProps } from './DropdownInner.type';\n\nconst DropdownInner: FC<DropdownInnerProps> = ({\n item,\n currentLevel,\n focusedPath,\n path,\n dispatchPath,\n index,\n trigger,\n itemRole,\n listHeight,\n listOverflow,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemSelect,\n onItemClick,\n listWidth,\n variant,\n hasArrow,\n}) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const listId = `tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (item?.items) {\n return (\n <StyledPopover\n isOpen={isCurrentListOpen}\n usePortal={false}\n placement=\"right-start\"\n trigger={trigger}\n target={\n <DropdownItem\n item={item}\n index={index}\n path={path}\n focusedPath={focusedPath}\n currentLevel={currentLevel}\n itemRole={itemRole}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n variant={variant}\n hasArrow={hasArrow}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n onToggle={handleToggle}\n isFocusTrapped={false}\n preventOverflow={false}\n >\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"group\"\n id={listId}\n listWidth={listWidth}\n isInnerUl\n >\n {item.items.map((innerItem, innerIndex) => (\n <DropdownInner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n focusedPath={focusedPath}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n trigger={trigger}\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 />\n ))}\n </Ul>\n </StyledPopover>\n );\n }\n\n return (\n <DropdownItem\n item={item}\n index={index}\n focusedPath={focusedPath}\n currentLevel={currentLevel}\n itemRole={itemRole}\n handleGlobalToggle={handleGlobalToggle}\n closeOnSelect={closeOnSelect}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n variant={variant}\n />\n );\n};\n\nexport { DropdownInner };\n"],"names":["DropdownInner","_ref","item","currentLevel","focusedPath","path","dispatchPath","index","trigger","itemRole","listHeight","listOverflow","handleGlobalToggle","closeOnSelect","onHover","onItemSelect","onItemClick","listWidth","variant","hasArrow","handleToggle","opened","type","value","toString","level","isCurrentListOpen","listId","concat","nextLevel","items","React","createElement","StyledPopover","isOpen","usePortal","placement","target","DropdownItem","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","onToggle","isFocusTrapped","preventOverflow","Ul","role","id","isInnerUl","map","innerItem","innerIndex","key"],"mappings":";;;;;;;;;;;AA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BACIY,KAAA,CAAAC,aAAA,CAACM,YAAY,EAAA;AACTpC,IAAAA,IAAI,EAAEA,IAAK;AACXK,IAAAA,KAAK,EAAEA,KAAM;AACbH,IAAAA,WAAW,EAAEA,WAAY;AACzBD,IAAAA,YAAY,EAAEA,YAAa;AAC3BM,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,kBAAkB,EAAEA,kBAAmB;AACvCC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,WAAW,EAAEA,WAAY;AACzBE,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GACpB,CAAC,CAAA;AAEV;;;;"}
|
@@ -1,4 +1,7 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
.
|
4
|
-
.
|
1
|
+
.IconRoot_7pl7ig_svvlqhf__32c458a1{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:var(--svvlqhf-0);height:var(--svvlqhf-0);-webkit-flex:0 0 var(--svvlqhf-0);-ms-flex:0 0 var(--svvlqhf-0);flex:0 0 var(--svvlqhf-0);}
|
2
|
+
|
3
|
+
.DropdownItem_styles_1o4szyu_s1gkzlls__6703745b{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
4
|
+
.DropdownItem_styles_1o4szyu_sz6s14y__6703745b{margin-left:auto;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
5
|
+
.DropdownItem_styles_1o4szyu_d1m97l2m__6703745b{line-height:0;color:var(--plasma-dropdown-disclosure-icon-color);}
|
6
|
+
.DropdownItem_styles_1o4szyu_soib72h__6703745b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
|
7
|
+
.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0;box-sizing:content-box;padding-top:var(--w6l2f0g-0);padding-right:var(--plasma-dropdown-item-padding-right);padding-bottom:var(--w6l2f0g-1);padding-left:var(--plasma-dropdown-item-padding-left);font-family:var(--plasma-dropdown-item-font-family);font-size:var(--plasma-dropdown-item-font-size);font-style:var(--plasma-dropdown-item-font-style);font-weight:var(--plasma-dropdown-item-letter-spacing);-webkit-letter-spacing:var(--plasma-dropdown-item-line-height);-moz-letter-spacing:var(--plasma-dropdown-item-line-height);-ms-letter-spacing:var(--plasma-dropdown-item-line-height);letter-spacing:var(--plasma-dropdown-item-line-height);line-height:var(--plasma-dropdown-item-font-weight);background:var(--plasma-dropdown-item-background);color:var(--plasma-dropdown-item-color);border-radius:var(--plasma-dropdown-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:hover:not(.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b){cursor:pointer;background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsActive__6703745b{background:var(--plasma-dropdown-item-background-hover);}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsDisabled__6703745b{opacity:var(--plasma-dropdown-disabled-opacity);cursor:not-allowed;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b:focus{outline:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.0625rem solid transparent;border-radius:var(--plasma-dropdown-item-border-radius);-webkit-transition:none;transition:none;pointer-events:none;}.DropdownItem_styles_1o4szyu_w6l2f0g__6703745b.DropdownItem_styles_1o4szyu_dropdownItemIsFocused__6703745b:before{outline:none;box-shadow:0 0 0 0.0625rem var(--plasma-dropdown-focus-color);}
|