@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
@@ -1,33 +1,38 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
|
-
exports.
|
8
|
-
var _styledComponents = /*#__PURE__*/
|
6
|
+
exports.Wrapper = exports.StyledText = exports.StyledContentRight = exports.StyledContentLeft = exports.DisclosureIconWrapper = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
9
8
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
10
9
|
var _mixins = /*#__PURE__*/require("../../../../mixins");
|
11
|
-
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
14
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
15
11
|
var StyledContentLeft = exports.StyledContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
16
12
|
componentId: "plasma-new-hope__sc-hs0ek1-0"
|
17
|
-
})(["display:inline-flex;
|
13
|
+
})(["display:inline-flex;"]);
|
18
14
|
var StyledContentRight = exports.StyledContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
19
15
|
componentId: "plasma-new-hope__sc-hs0ek1-1"
|
20
|
-
})(["margin-left:auto;display:inline-flex;
|
21
|
-
var
|
16
|
+
})(["margin-left:auto;display:inline-flex;"]);
|
17
|
+
var DisclosureIconWrapper = exports.DisclosureIconWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
22
18
|
componentId: "plasma-new-hope__sc-hs0ek1-2"
|
23
|
-
})(["", ";"],
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
})(["line-height:0;color:var(", ");"], _Dropdown.tokens.disclosureIconColor);
|
20
|
+
var StyledText = exports.StyledText = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
21
|
+
componentId: "plasma-new-hope__sc-hs0ek1-3"
|
22
|
+
})(["", ";flex:1;"], /*#__PURE__*/(0, _mixins.applyEllipsis)());
|
23
|
+
var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].li.withConfig({
|
24
|
+
componentId: "plasma-new-hope__sc-hs0ek1-4"
|
25
|
+
})(["display:flex;align-items:center;margin:0;box-sizing:content-box;padding-top:", ";padding-right:var(", ");padding-bottom:", ";padding-left:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");background:var(", ");color:var(", ");border-radius:var(", ");user-select:none;&:hover:not(.", "){cursor:pointer;background:var(", ");}&.", "{background:var(", ");}&.", "{opacity:var(", ");cursor:not-allowed;}:focus{outline:none;}", ";"], function (_ref) {
|
26
|
+
var variant = _ref.variant;
|
27
|
+
return "var(".concat(variant === 'tight' ? _Dropdown.tokens.itemPaddingTopTight : _Dropdown.tokens.itemPaddingTop, ")");
|
28
|
+
}, _Dropdown.tokens.itemPaddingRight, function (_ref2) {
|
29
|
+
var variant = _ref2.variant;
|
30
|
+
return "var(".concat(variant === 'tight' ? _Dropdown.tokens.itemPaddingBottomTight : _Dropdown.tokens.itemPaddingBottom, ")");
|
31
|
+
}, _Dropdown.tokens.itemPaddingLeft, _Dropdown.tokens.itemFontFamily, _Dropdown.tokens.itemFontSize, _Dropdown.tokens.itemFontStyle, _Dropdown.tokens.itemFontWeightBold, _Dropdown.tokens.itemFontLetterSpacing, _Dropdown.tokens.itemFontLineHeight, _Dropdown.tokens.itemBackground, _Dropdown.tokens.itemColor, _Dropdown.tokens.itemBorderRadius, _Dropdown.classes.dropdownItemIsDisabled, _Dropdown.tokens.itemBackgroundHover, _Dropdown.classes.dropdownItemIsActive, _Dropdown.tokens.itemBackgroundHover, _Dropdown.classes.dropdownItemIsDisabled, _Dropdown.tokens.disabledOpacity, /*#__PURE__*/(0, _mixins.addFocus)({
|
27
32
|
outlineSize: '0.0625rem',
|
28
33
|
outlineOffset: '0',
|
29
|
-
outlineColor: "var(".concat(_Dropdown.tokens.focusColor, ")"),
|
30
|
-
outlineRadius: "var(".concat(_Dropdown.tokens.itemBorderRadius, ")"),
|
31
|
-
hasTransition: false
|
32
|
-
|
33
|
-
|
34
|
+
outlineColor: /*#__PURE__*/"var(".concat(_Dropdown.tokens.focusColor, ")"),
|
35
|
+
outlineRadius: /*#__PURE__*/"var(".concat(_Dropdown.tokens.itemBorderRadius, ")"),
|
36
|
+
hasTransition: false,
|
37
|
+
customFocusRules: /*#__PURE__*/"\n &.".concat(_Dropdown.classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(_Dropdown.tokens.focusColor, ");\n }\n ")
|
38
|
+
}));
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.baseContent = exports.base = exports.StyledText = exports.StyledContentRight = exports.StyledContentLeft = void 0;
|
8
|
+
var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
|
9
|
+
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
10
|
+
var _mixins = /*#__PURE__*/require("../../../../mixins");
|
11
|
+
var _templateObject;
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
14
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
15
|
+
var StyledContentLeft = exports.StyledContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
16
|
+
componentId: "plasma-new-hope__sc-17ya3ay-0"
|
17
|
+
})(["display:inline-flex;min-width:var(", ");color:var(", ");"], _Dropdown.tokens.itemContentLeftWidth, _Dropdown.tokens.itemContentLeftColor);
|
18
|
+
var StyledContentRight = exports.StyledContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
19
|
+
componentId: "plasma-new-hope__sc-17ya3ay-1"
|
20
|
+
})(["margin-left:auto;display:inline-flex;min-width:var(", ");color:var(", ");"], _Dropdown.tokens.itemContentRightWidth, _Dropdown.tokens.itemContentRightColor);
|
21
|
+
var StyledText = exports.StyledText = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
22
|
+
componentId: "plasma-new-hope__sc-17ya3ay-2"
|
23
|
+
})(["", ";"], /*#__PURE__*/(0, _mixins.applyEllipsis)());
|
24
|
+
|
25
|
+
// INFO: Для возможности переиспользования стилей в других компонентах
|
26
|
+
var baseContent = exports.baseContent = /*#__PURE__*/"\n box-sizing: content-box;\n display: flex;\n align-items: center;\n user-select: none;\n\n :focus {\n outline: none;\n }\n\n ".concat((0, _mixins.addFocus)({
|
27
|
+
outlineSize: '0.0625rem',
|
28
|
+
outlineOffset: '0',
|
29
|
+
outlineColor: "var(".concat(_Dropdown.tokens.focusColor, ")"),
|
30
|
+
outlineRadius: "var(".concat(_Dropdown.tokens.itemBorderRadius, ")"),
|
31
|
+
hasTransition: false
|
32
|
+
}), ";\n\n width: auto;\n\n font-family: var(").concat(_Dropdown.tokens.itemFontFamily, ");\n font-size: var(").concat(_Dropdown.tokens.itemFontSize, ");\n font-style: var(").concat(_Dropdown.tokens.itemFontStyle, ");\n font-weight: var(").concat(_Dropdown.tokens.itemFontWeightBold, ");\n letter-spacing: var(").concat(_Dropdown.tokens.itemFontLetterSpacing, ");\n line-height: var(").concat(_Dropdown.tokens.itemFontLineHeight, ");\n\n background: var(").concat(_Dropdown.tokens.itemBackground, ");\n color: var(").concat(_Dropdown.tokens.itemColor, ");\n border-radius: var(").concat(_Dropdown.tokens.itemBorderRadius, ");\n\n width: var(").concat(_Dropdown.tokens.itemWidth, ");\n height: var(").concat(_Dropdown.tokens.itemHeight, ");\n\n padding: var(").concat(_Dropdown.tokens.itemPaddingTop, ") var(").concat(_Dropdown.tokens.itemPaddingRight, ") var(").concat(_Dropdown.tokens.itemPaddingBottom, ")\n var(").concat(_Dropdown.tokens.itemPaddingLeft, ");\n\n margin: var(").concat(_Dropdown.tokens.itemMarginTop, ") var(").concat(_Dropdown.tokens.itemMarginRight, ") var(").concat(_Dropdown.tokens.itemMarginBottom, ")\n var(").concat(_Dropdown.tokens.itemMarginLeft, ");\n\n &:hover:not(.").concat(_Dropdown.classes.dropdownItemIsDisabled, ") {\n cursor: pointer;\n background: var(").concat(_Dropdown.tokens.itemBackgroundHover, ");\n }\n\n &.").concat(String(_Dropdown.classes.dropdownItemIsSelected), " {\n color: var(").concat(_Dropdown.tokens.itemColorSelected, ");\n background: var(").concat(_Dropdown.tokens.itemBackgroundSelected, ");\n\n &:hover:not(.").concat(_Dropdown.classes.dropdownItemIsDisabled, ") {\n background: var(").concat(_Dropdown.tokens.itemBackgroundSelectedHover, ");\n }\n }\n\n &.").concat(_Dropdown.classes.dropdownItemIsDisabled, " {\n opacity: var(").concat(_Dropdown.tokens.disabledOpacity, ");\n cursor: not-allowed;\n }\n");
|
33
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ";\n"])), baseContent);
|
@@ -0,0 +1,119 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.dropdownItemOldRoot = exports.dropdownItemOldConfig = void 0;
|
8
|
+
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
+
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
11
|
+
var _utils = /*#__PURE__*/require("../../../../utils");
|
12
|
+
var _utils2 = /*#__PURE__*/require("../../utils");
|
13
|
+
var _base = /*#__PURE__*/require("./variations/_view/base");
|
14
|
+
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
15
|
+
var _DropdownItem = /*#__PURE__*/require("./DropdownItem.styles");
|
16
|
+
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "role", "view", "size", "disabled", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
|
17
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
18
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
19
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
20
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
21
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
22
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
24
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
25
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
26
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
27
|
+
/**
|
28
|
+
* Элемент выпадающего списка
|
29
|
+
*/
|
30
|
+
var dropdownItemOldRoot = exports.dropdownItemOldRoot = function dropdownItemOldRoot(Root) {
|
31
|
+
return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
|
32
|
+
var id = _ref.id,
|
33
|
+
className = _ref.className,
|
34
|
+
children = _ref.children,
|
35
|
+
text = _ref.text,
|
36
|
+
isSelected = _ref.isSelected,
|
37
|
+
name = _ref.name,
|
38
|
+
checked = _ref.checked,
|
39
|
+
value = _ref.value,
|
40
|
+
role = _ref.role,
|
41
|
+
view = _ref.view,
|
42
|
+
size = _ref.size,
|
43
|
+
disabled = _ref.disabled,
|
44
|
+
ContentLeftComponent = _ref.contentLeft,
|
45
|
+
ContentRightComponent = _ref.contentRight,
|
46
|
+
onSelect = _ref.onSelect,
|
47
|
+
onClick = _ref.onClick,
|
48
|
+
onChange = _ref.onChange,
|
49
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
50
|
+
var uniqId = (0, _plasmaCore.safeUseId)();
|
51
|
+
var innerId = id || uniqId;
|
52
|
+
var withDropdownItemIsSelected = checked || isSelected ? _Dropdown.classes.dropdownItemIsSelected : undefined;
|
53
|
+
var withDropdownItemIsDisabled = disabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
|
54
|
+
var handleOnClick = (0, _react.useCallback)(function (event) {
|
55
|
+
if (disabled) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
onClick === null || onClick === void 0 || onClick(event);
|
59
|
+
if (onSelect && !ContentLeftComponent) {
|
60
|
+
onSelect(value, text);
|
61
|
+
}
|
62
|
+
}, [onSelect, disabled]);
|
63
|
+
var handleOnChange = (0, _react.useCallback)(function (event) {
|
64
|
+
if (disabled) {
|
65
|
+
return;
|
66
|
+
}
|
67
|
+
onChange === null || onChange === void 0 || onChange(event);
|
68
|
+
if (onSelect && ContentLeftComponent) {
|
69
|
+
onSelect(value, text);
|
70
|
+
}
|
71
|
+
}, [onSelect, disabled]);
|
72
|
+
var contentProps = _objectSpread({
|
73
|
+
name: name,
|
74
|
+
value: value,
|
75
|
+
checked: checked || isSelected,
|
76
|
+
disabled: disabled,
|
77
|
+
tabIndex: 0
|
78
|
+
}, !disabled && {
|
79
|
+
onChange: handleOnChange
|
80
|
+
});
|
81
|
+
var ContentLeft = (0, _react.useMemo)(function () {
|
82
|
+
return (0, _utils2.getValidComponent)(ContentLeftComponent, contentProps);
|
83
|
+
}, [ContentRightComponent, contentProps]);
|
84
|
+
var ContentRight = (0, _react.useMemo)(function () {
|
85
|
+
return (0, _utils2.getValidComponent)(ContentRightComponent, contentProps);
|
86
|
+
}, [ContentRightComponent, contentProps]);
|
87
|
+
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
88
|
+
className: (0, _utils.cx)(withDropdownItemIsSelected, withDropdownItemIsDisabled, className),
|
89
|
+
view: view,
|
90
|
+
size: size,
|
91
|
+
id: innerId,
|
92
|
+
isSelected: isSelected,
|
93
|
+
role: role,
|
94
|
+
ref: outerRootRef,
|
95
|
+
tabIndex: 0,
|
96
|
+
"aria-disabled": disabled,
|
97
|
+
onClick: handleOnClick,
|
98
|
+
"data-value": value
|
99
|
+
}, rest), text ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledText, null, text), /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledContentRight, null, ContentRightComponent && ContentRight)) : children);
|
100
|
+
});
|
101
|
+
};
|
102
|
+
var dropdownItemOldConfig = exports.dropdownItemOldConfig = {
|
103
|
+
name: 'DropdownItem',
|
104
|
+
tag: 'div',
|
105
|
+
layout: dropdownItemOldRoot,
|
106
|
+
base: _DropdownItem.base,
|
107
|
+
variations: {
|
108
|
+
view: {
|
109
|
+
css: _base.base
|
110
|
+
},
|
111
|
+
size: {
|
112
|
+
css: _base2.base
|
113
|
+
}
|
114
|
+
},
|
115
|
+
defaults: {
|
116
|
+
view: 'primary',
|
117
|
+
size: 'm'
|
118
|
+
}
|
119
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.StyledPopover = exports.StyledDropdown = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
8
|
+
var _engines = /*#__PURE__*/require("../../../../engines");
|
9
|
+
var _Popover = /*#__PURE__*/require("../../../Popover");
|
10
|
+
var _DropdownOld = /*#__PURE__*/require("./DropdownOld.tokens");
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
12
|
+
// issue #823
|
13
|
+
var Popover = /*#__PURE__*/(0, _engines.component)(_Popover.popoverConfig);
|
14
|
+
var StyledPopover = exports.StyledPopover = /*#__PURE__*/(0, _styledComponents["default"])(Popover).withConfig({
|
15
|
+
componentId: "plasma-new-hope__sc-10adsb5-0"
|
16
|
+
})([".", "{display:block;}"], /*#__PURE__*/String(_Popover.popoverClasses.target));
|
17
|
+
var StyledDropdown = exports.StyledDropdown = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
18
|
+
componentId: "plasma-new-hope__sc-10adsb5-1"
|
19
|
+
})(["box-sizing:border-box;background:var(", ");box-shadow:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");padding:var(", ") var(", ") var(", ") var(", ");"], _DropdownOld.tokens.background, _DropdownOld.tokens.boxShadow, _DropdownOld.tokens.borderRadius, _DropdownOld.tokens.width, _DropdownOld.tokens.height, _DropdownOld.tokens.paddingTop, _DropdownOld.tokens.paddingRight, _DropdownOld.tokens.paddingBottom, _DropdownOld.tokens.paddingLeft);
|
@@ -0,0 +1,101 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.dropdownOldRoot = exports.dropdownOldConfig = void 0;
|
8
|
+
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
+
var _base = /*#__PURE__*/require("./variations/_view/base");
|
11
|
+
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
12
|
+
var _Dropdown = /*#__PURE__*/require("./Dropdown.styles");
|
13
|
+
var _utils = /*#__PURE__*/require("./utils");
|
14
|
+
var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
18
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
19
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
20
|
+
/**
|
21
|
+
* Выпадающий список без внешнего контроля видимости.
|
22
|
+
*/
|
23
|
+
var dropdownOldRoot = exports.dropdownOldRoot = function dropdownOldRoot(Root) {
|
24
|
+
return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
|
25
|
+
var id = _ref.id,
|
26
|
+
target = _ref.target,
|
27
|
+
children = _ref.children,
|
28
|
+
hasArrow = _ref.hasArrow,
|
29
|
+
role = _ref.role,
|
30
|
+
view = _ref.view,
|
31
|
+
size = _ref.size,
|
32
|
+
frame = _ref.frame,
|
33
|
+
_onToggle = _ref.onToggle,
|
34
|
+
_ref$isFocusTrapped = _ref.isFocusTrapped,
|
35
|
+
isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
|
36
|
+
_ref$isOpen = _ref.isOpen,
|
37
|
+
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
38
|
+
_ref$placement = _ref.placement,
|
39
|
+
placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
|
40
|
+
_ref$trigger = _ref.trigger,
|
41
|
+
trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
|
42
|
+
_ref$offset = _ref.offset,
|
43
|
+
offset = _ref$offset === void 0 ? [0, 6] : _ref$offset,
|
44
|
+
_ref$preventOverflow = _ref.preventOverflow,
|
45
|
+
preventOverflow = _ref$preventOverflow === void 0 ? false : _ref$preventOverflow,
|
46
|
+
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
47
|
+
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? false : _ref$closeOnOverlayCl,
|
48
|
+
_ref$closeOnEsc = _ref.closeOnEsc,
|
49
|
+
closeOnEsc = _ref$closeOnEsc === void 0 ? false : _ref$closeOnEsc,
|
50
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
51
|
+
var uniqId = (0, _plasmaCore.useUniqId)();
|
52
|
+
var innerId = id || uniqId;
|
53
|
+
var rootRef = (0, _react.useRef)(null);
|
54
|
+
var dropdownRef = (0, _react.useRef)(null);
|
55
|
+
var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
|
56
|
+
var trapRef = (0, _plasmaCore.useFocusTrap)(isOpen && isFocusTrapped);
|
57
|
+
var dropdownForkRef = (0, _plasmaCore.useForkRef)(dropdownRef, trapRef);
|
58
|
+
return /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledPopover, {
|
59
|
+
role: role,
|
60
|
+
isOpen: isOpen,
|
61
|
+
usePortal: false,
|
62
|
+
onToggle: function onToggle(is, event) {
|
63
|
+
return _onToggle === null || _onToggle === void 0 ? void 0 : _onToggle(is, event);
|
64
|
+
},
|
65
|
+
id: innerId,
|
66
|
+
ref: dropdownForkRef,
|
67
|
+
target: target,
|
68
|
+
offset: offset,
|
69
|
+
preventOverflow: preventOverflow,
|
70
|
+
hasArrow: hasArrow,
|
71
|
+
placement: (0, _utils.getPlacements)(placement),
|
72
|
+
trigger: trigger,
|
73
|
+
closeOnOverlayClick: closeOnOverlayClick,
|
74
|
+
closeOnEsc: closeOnEsc,
|
75
|
+
isFocusTrapped: isFocusTrapped,
|
76
|
+
frame: frame
|
77
|
+
}, /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
78
|
+
ref: handleRef,
|
79
|
+
view: view,
|
80
|
+
size: size
|
81
|
+
}, rest), /*#__PURE__*/_react["default"].createElement(_Dropdown.StyledDropdown, null, children)));
|
82
|
+
});
|
83
|
+
};
|
84
|
+
var dropdownOldConfig = exports.dropdownOldConfig = {
|
85
|
+
name: 'Dropdown',
|
86
|
+
tag: 'div',
|
87
|
+
layout: dropdownOldRoot,
|
88
|
+
base: '',
|
89
|
+
variations: {
|
90
|
+
view: {
|
91
|
+
css: _base.base
|
92
|
+
},
|
93
|
+
size: {
|
94
|
+
css: _base2.base
|
95
|
+
}
|
96
|
+
},
|
97
|
+
defaults: {
|
98
|
+
view: 'default',
|
99
|
+
size: 'm'
|
100
|
+
}
|
101
|
+
};
|
@@ -0,0 +1,118 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.tokens = exports.classes = void 0;
|
7
|
+
var classes = exports.classes = {
|
8
|
+
dropdownItemIsSelected: 'dropdown-item-is-selected',
|
9
|
+
dropdownItemIsDisabled: 'dropdown-item-is-disabled'
|
10
|
+
};
|
11
|
+
var tokens = exports.tokens = {
|
12
|
+
background: '--plasma-dropdown-background',
|
13
|
+
boxShadow: '--plasma-dropdown-box-shadow',
|
14
|
+
width: '--plasma-dropdown-width',
|
15
|
+
height: '--plasma-dropdown-height',
|
16
|
+
borderRadius: '--plasma-dropdown-border-radius',
|
17
|
+
paddingTop: '--plasma-dropdown-padding-top',
|
18
|
+
paddingRight: '--plasma-dropdown-padding-right',
|
19
|
+
paddingBottom: '--plasma-dropdown-padding-bottom',
|
20
|
+
paddingLeft: '--plasma-dropdown-padding-left',
|
21
|
+
itemBackground: '--plasma-dropdown-item-background',
|
22
|
+
itemColor: '--plasma-dropdown-item-color',
|
23
|
+
itemBackgroundHover: '--plasma-dropdown-item-background-hover',
|
24
|
+
itemBackgroundSelected: '--plasma-dropdown-item-background-selected',
|
25
|
+
itemColorSelected: '--plasma-dropdown-item-color-selected',
|
26
|
+
itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
|
27
|
+
itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
|
28
|
+
itemWidth: '--plasma-dropdown-item-width',
|
29
|
+
itemHeight: '--plasma-dropdown-item-height',
|
30
|
+
itemBorderRadius: '--plasma-dropdown-item-border-radius',
|
31
|
+
itemPaddingTop: '--plasma-dropdown-item-padding-top',
|
32
|
+
itemPaddingRight: '--plasma-dropdown-item-padding-right',
|
33
|
+
itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
|
34
|
+
itemPaddingLeft: '--plasma-dropdown-item-padding-left',
|
35
|
+
itemMarginTop: '--plasma-dropdown-item-margin-top',
|
36
|
+
itemMarginRight: '--plasma-dropdown-item-margin-right',
|
37
|
+
itemMarginBottom: '--plasma-dropdown-item-margin-bottom',
|
38
|
+
itemMarginLeft: '--plasma-dropdown-item-margin-left',
|
39
|
+
itemFontFamily: '--plasma-dropdown-item-font-family',
|
40
|
+
itemFontSize: '--plasma-dropdown-item-font-size',
|
41
|
+
itemFontStyle: '--plasma-dropdown-item-font-style',
|
42
|
+
itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
|
43
|
+
itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
|
44
|
+
itemFontLineHeight: '--plasma-dropdown-item-font-weight',
|
45
|
+
itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
|
46
|
+
itemContentRightColor: '--plasma-dropdown-item-content-right-color',
|
47
|
+
itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
|
48
|
+
itemContentRightWidth: '--plasma-dropdown-item-content-right-width',
|
49
|
+
footerBackground: '--plasma-dropdown-footer-background',
|
50
|
+
footerWidth: '--plasma-dropdown-footer-width',
|
51
|
+
footerHeight: '--plasma-dropdown-footer-height',
|
52
|
+
footerPaddingTop: '--plasma-dropdown-footer-padding-top',
|
53
|
+
footerPaddingRight: '--plasma-dropdown-footer-padding-right',
|
54
|
+
footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',
|
55
|
+
footerPaddingLeft: '--plasma-dropdown-footer-padding-left',
|
56
|
+
footerMarginTop: '--plasma-dropdown-footer-margin-top',
|
57
|
+
footerMarginRight: '--plasma-dropdown-footer-margin-right',
|
58
|
+
footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',
|
59
|
+
footerMarginLeft: '--plasma-dropdown-footer-margin-left',
|
60
|
+
footerFontFamily: '--plasma-dropdown-footer-font-family',
|
61
|
+
footerFontSize: '--plasma-dropdown-footer-font-size',
|
62
|
+
footerFontStyle: '--plasma-dropdown-footer-font-style',
|
63
|
+
footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',
|
64
|
+
footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',
|
65
|
+
footerFontLineHeight: '--plasma-dropdown-footer-font-weight',
|
66
|
+
headerBackground: '--plasma-dropdown-header-background',
|
67
|
+
headerWidth: '--plasma-dropdown-header-width',
|
68
|
+
headerHeight: '--plasma-dropdown-header-height',
|
69
|
+
headerPaddingTop: '--plasma-dropdown-header-padding-top',
|
70
|
+
headerPaddingRight: '--plasma-dropdown-header-padding-right',
|
71
|
+
headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',
|
72
|
+
headerPaddingLeft: '--plasma-dropdown-header-padding-left',
|
73
|
+
headerMarginTop: '--plasma-dropdown-header-margin-top',
|
74
|
+
headerMarginRight: '--plasma-dropdown-header-margin-right',
|
75
|
+
headerMarginBottom: '--plasma-dropdown-header-margin-bottom',
|
76
|
+
headerMarginLeft: '--plasma-dropdown-header-margin-left',
|
77
|
+
headerFontFamily: '--plasma-dropdown-header-font-family',
|
78
|
+
headerFontSize: '--plasma-dropdown-header-font-size',
|
79
|
+
headerFontStyle: '--plasma-dropdown-header-font-style',
|
80
|
+
headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',
|
81
|
+
headerFontLetterSpacing: '--plasma-dropdown-header-line-height',
|
82
|
+
headerFontLineHeight: '--plasma-dropdown-header-font-weight',
|
83
|
+
dividerColor: '--plasma-dropdown-divider-color',
|
84
|
+
dividerWidth: '--plasma-dropdown-divider-width',
|
85
|
+
dividerHeight: '--plasma-dropdown-divider-height',
|
86
|
+
dividerMarginTop: '--plasma-dropdown-divider-margin-top',
|
87
|
+
dividerMarginRight: '--plasma-dropdown-divider-margin-right',
|
88
|
+
dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',
|
89
|
+
dividerMarginLeft: '--plasma-dropdown-divider-margin-left',
|
90
|
+
groupBackground: '--plasma-dropdown-group-background',
|
91
|
+
groupWidth: '--plasma-dropdown-group-width',
|
92
|
+
groupHeight: '--plasma-dropdown-group-height',
|
93
|
+
groupPaddingTop: '--plasma-dropdown-group-padding-top',
|
94
|
+
groupPaddingRight: '--plasma-dropdown-group-padding-right',
|
95
|
+
groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',
|
96
|
+
groupPaddingLeft: '--plasma-dropdown-group-padding-left',
|
97
|
+
groupMarginTop: '--plasma-dropdown-group-margin-top',
|
98
|
+
groupMarginRight: '--plasma-dropdown-group-margin-right',
|
99
|
+
groupMarginBottom: '--plasma-dropdown-group-margin-bottom',
|
100
|
+
groupMarginLeft: '--plasma-dropdown-group-margin-left',
|
101
|
+
groupLabelColor: '--plasma-dropdown-group-label-color',
|
102
|
+
groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',
|
103
|
+
groupLabelFontSize: '--plasma-dropdown-group-label-font-size',
|
104
|
+
groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',
|
105
|
+
groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',
|
106
|
+
groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',
|
107
|
+
groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',
|
108
|
+
groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',
|
109
|
+
groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',
|
110
|
+
groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',
|
111
|
+
groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',
|
112
|
+
groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',
|
113
|
+
groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
|
114
|
+
groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
|
115
|
+
groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',
|
116
|
+
disabledOpacity: '--plasma-dropdown-disabled-opacity',
|
117
|
+
focusColor: '--plasma-dropdown-focus-color'
|
118
|
+
};
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getPlacements = exports.getPlacement = void 0;
|
7
|
+
var getPlacement = exports.getPlacement = function getPlacement(placement) {
|
8
|
+
return "".concat(placement, "-start");
|
9
|
+
};
|
10
|
+
var getPlacements = exports.getPlacements = function getPlacements(placements) {
|
11
|
+
if (!placements) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
var isArray = Array.isArray(placements);
|
15
|
+
if (!isArray) {
|
16
|
+
return getPlacement(placements);
|
17
|
+
}
|
18
|
+
return (placements || []).map(function (placement) {
|
19
|
+
return getPlacement(placement);
|
20
|
+
});
|
21
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
[]
|
@@ -0,0 +1 @@
|
|
1
|
+
[]
|
@@ -3,6 +3,18 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
+
Object.defineProperty(exports, "DropdownInner", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _DropdownInner.DropdownInner;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "DropdownItem", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _DropdownItem.DropdownItem;
|
16
|
+
}
|
17
|
+
});
|
6
18
|
Object.defineProperty(exports, "dropdownDividerConfig", {
|
7
19
|
enumerable: true,
|
8
20
|
get: function get() {
|
@@ -51,20 +63,42 @@ Object.defineProperty(exports, "dropdownHeaderRoot", {
|
|
51
63
|
return _DropdownHeader.dropdownHeaderRoot;
|
52
64
|
}
|
53
65
|
});
|
54
|
-
Object.defineProperty(exports, "
|
66
|
+
Object.defineProperty(exports, "dropdownItemOldConfig", {
|
67
|
+
enumerable: true,
|
68
|
+
get: function get() {
|
69
|
+
return _DropdownItemOld.dropdownItemOldConfig;
|
70
|
+
}
|
71
|
+
});
|
72
|
+
Object.defineProperty(exports, "dropdownItemOldRoot", {
|
73
|
+
enumerable: true,
|
74
|
+
get: function get() {
|
75
|
+
return _DropdownItemOld.dropdownItemOldRoot;
|
76
|
+
}
|
77
|
+
});
|
78
|
+
Object.defineProperty(exports, "dropdownOldConfig", {
|
79
|
+
enumerable: true,
|
80
|
+
get: function get() {
|
81
|
+
return _DropdownOld.dropdownOldConfig;
|
82
|
+
}
|
83
|
+
});
|
84
|
+
Object.defineProperty(exports, "dropdownOldRoot", {
|
55
85
|
enumerable: true,
|
56
86
|
get: function get() {
|
57
|
-
return
|
87
|
+
return _DropdownOld.dropdownOldRoot;
|
58
88
|
}
|
59
89
|
});
|
60
|
-
Object.defineProperty(exports, "
|
90
|
+
Object.defineProperty(exports, "dropdownOldTokens", {
|
61
91
|
enumerable: true,
|
62
92
|
get: function get() {
|
63
|
-
return
|
93
|
+
return _DropdownOld2.tokens;
|
64
94
|
}
|
65
95
|
});
|
66
96
|
var _DropdownDivider = /*#__PURE__*/require("./DropdownDivider/DropdownDivider");
|
67
97
|
var _DropdownFooter = /*#__PURE__*/require("./DropdownFooter/DropdownFooter");
|
68
98
|
var _DropdownGroup = /*#__PURE__*/require("./DropdownGroup/DropdownGroup");
|
69
99
|
var _DropdownHeader = /*#__PURE__*/require("./DropdownHeader/DropdownHeader");
|
70
|
-
var _DropdownItem = /*#__PURE__*/require("./DropdownItem/DropdownItem");
|
100
|
+
var _DropdownItem = /*#__PURE__*/require("./DropdownItem/DropdownItem");
|
101
|
+
var _DropdownInner = /*#__PURE__*/require("./DropdownInner/DropdownInner");
|
102
|
+
var _DropdownItemOld = /*#__PURE__*/require("./DropdownItemOld/DropdownItemOld");
|
103
|
+
var _DropdownOld = /*#__PURE__*/require("./DropdownOld/DropdownOld");
|
104
|
+
var _DropdownOld2 = /*#__PURE__*/require("./DropdownOld/DropdownOld.tokens");
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.getValidComponent = exports.getPlacements = exports.getPlacement = void 0;
|
6
|
+
exports.getValidComponent = exports.getPlacements = exports.getPlacement = exports.getCorrectHeight = exports.childrenWithProps = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
8
8
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
9
9
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -23,6 +23,20 @@ var getPlacements = exports.getPlacements = function getPlacements(placements) {
|
|
23
23
|
return getPlacement(placement);
|
24
24
|
});
|
25
25
|
};
|
26
|
+
var getCorrectHeight = exports.getCorrectHeight = function getCorrectHeight(listHeight) {
|
27
|
+
if (Number.isNaN(Number(listHeight))) {
|
28
|
+
return listHeight.toString();
|
29
|
+
}
|
30
|
+
return "".concat(listHeight, "rem");
|
31
|
+
};
|
32
|
+
var childrenWithProps = exports.childrenWithProps = function childrenWithProps(children, additionalProps) {
|
33
|
+
return _react.Children.map(children, function (child) {
|
34
|
+
if ( /*#__PURE__*/_react["default"].isValidElement(child)) {
|
35
|
+
return /*#__PURE__*/_react["default"].cloneElement(child, additionalProps);
|
36
|
+
}
|
37
|
+
return child;
|
38
|
+
});
|
39
|
+
};
|
26
40
|
var isReactObject = function isReactObject(element) {
|
27
41
|
return _typeof(element) === 'object' || typeof element === 'function';
|
28
42
|
};
|