@salutejs/plasma-new-hope 0.77.0-canary.1185.8720575745.0 → 0.77.0-canary.1195.8808345201.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/cjs/components/Avatar/Avatar.js +28 -3
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/hoc/withRange.js +1 -1
- package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
- package/cjs/components/Calendar/hooks/useKeyNavigation.js +19 -19
- package/cjs/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Chip/Chip.js +2 -2
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +2 -2
- package/cjs/components/Combobox/Combobox.js +5 -5
- package/cjs/components/Combobox/Combobox.js.map +1 -1
- package/cjs/components/Combobox/hooks/useFocusController.js +9 -9
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
- package/cjs/components/Drawer/DrawerContext.js +1 -1
- package/cjs/components/Drawer/DrawerContext.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.css +2 -2
- package/cjs/components/Dropdown/Dropdown.js +4 -27
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/utils/index.js +0 -43
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/IconButton/IconButton.css +27 -0
- package/cjs/components/IconButton/IconButton.js +84 -0
- package/cjs/components/IconButton/IconButton.js.map +1 -0
- package/cjs/components/IconButton/IconButton.styles.js +27 -0
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -0
- package/cjs/components/IconButton/IconButton.styles_gh8fim.css +4 -0
- package/cjs/components/IconButton/IconButton.tokens.js +36 -0
- package/cjs/components/IconButton/IconButton.tokens.js.map +1 -0
- package/cjs/components/IconButton/variations/_disabled/base.js +9 -0
- package/cjs/components/IconButton/variations/_disabled/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_focused/base.js +9 -0
- package/cjs/components/IconButton/variations/_focused/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_focused/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_size/base.js +9 -0
- package/cjs/components/IconButton/variations/_size/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_size/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_view/base.js +9 -0
- package/cjs/components/IconButton/variations/_view/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/Modal/ModalContext.js +1 -1
- package/cjs/components/Modal/ModalContext.js.map +1 -1
- package/cjs/components/Overlay/Overlay.js +1 -1
- package/cjs/components/Overlay/Overlay.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +2 -2
- package/cjs/components/Pagination/Pagination.js +2 -2
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Popover/Popover.js +7 -7
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popup/Popup.js +1 -1
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
- package/cjs/components/Select/Select.css +2 -2
- package/cjs/components/Select/Select.js +5 -5
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
- package/cjs/components/Select/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/cjs/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/cjs/components/Select/utils/index.js +2 -2
- package/cjs/components/Select/utils/index.js.map +1 -1
- package/cjs/components/Tabs/TabsContext.js +1 -2
- package/cjs/components/Tabs/TabsContext.js.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +1 -1
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextField/TextField.js +2 -2
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/cjs/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/cjs/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.js +1 -1
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/index.css +7 -2
- package/cjs/index.js +6 -2
- package/cjs/index.js.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/es/components/Avatar/Avatar.js +29 -4
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/hoc/withRange.js +1 -1
- package/es/components/Calendar/hoc/withRange.js.map +1 -1
- package/es/components/Calendar/hooks/useKeyNavigation.js +19 -19
- package/es/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Chip/Chip.js +2 -2
- package/es/components/Chip/Chip.js.map +1 -1
- package/es/components/Combobox/Combobox.css +2 -2
- package/es/components/Combobox/Combobox.js +5 -5
- package/es/components/Combobox/Combobox.js.map +1 -1
- package/es/components/Combobox/hooks/useFocusController.js +9 -9
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
- package/es/components/Drawer/DrawerContext.js +1 -1
- package/es/components/Drawer/DrawerContext.js.map +1 -1
- package/es/components/Dropdown/Dropdown.css +2 -2
- package/es/components/Dropdown/Dropdown.js +6 -29
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
- package/es/components/Dropdown/Dropdown.tokens.js +0 -1
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/utils/index.js +3 -45
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/IconButton/IconButton.css +27 -0
- package/es/components/IconButton/IconButton.js +79 -0
- package/es/components/IconButton/IconButton.js.map +1 -0
- package/es/components/IconButton/IconButton.styles.js +22 -0
- package/es/components/IconButton/IconButton.styles.js.map +1 -0
- package/es/components/IconButton/IconButton.styles_gh8fim.css +4 -0
- package/es/components/IconButton/IconButton.tokens.js +31 -0
- package/es/components/IconButton/IconButton.tokens.js.map +1 -0
- package/es/components/IconButton/variations/_disabled/base.js +5 -0
- package/es/components/IconButton/variations/_disabled/base.js.map +1 -0
- package/es/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_focused/base.js +5 -0
- package/es/components/IconButton/variations/_focused/base.js.map +1 -0
- package/es/components/IconButton/variations/_focused/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_size/base.js +5 -0
- package/es/components/IconButton/variations/_size/base.js.map +1 -0
- package/es/components/IconButton/variations/_size/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_view/base.js +5 -0
- package/es/components/IconButton/variations/_view/base.js.map +1 -0
- package/es/components/IconButton/variations/_view/base_x642ct.css +1 -0
- package/es/components/Modal/ModalContext.js +1 -1
- package/es/components/Modal/ModalContext.js.map +1 -1
- package/es/components/Overlay/Overlay.js +1 -1
- package/es/components/Overlay/Overlay.js.map +1 -1
- package/es/components/Pagination/Pagination.css +2 -2
- package/es/components/Pagination/Pagination.js +2 -2
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Popover/Popover.js +7 -7
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popup/Popup.js +1 -1
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/es/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
- package/es/components/Select/Select.css +2 -2
- package/es/components/Select/Select.js +5 -5
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/hooks/useKeyNavigation.js +12 -12
- package/es/components/Select/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/es/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/es/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/es/components/Select/utils/index.js +2 -2
- package/es/components/Select/utils/index.js.map +1 -1
- package/es/components/Tabs/TabsContext.js +1 -2
- package/es/components/Tabs/TabsContext.js.map +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextField/TextField.js +2 -2
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/es/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
- package/es/components/Tooltip/Tooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js.map +1 -1
- package/es/index.css +7 -2
- package/es/index.js +2 -1
- package/es/index.js.map +1 -1
- package/package.json +12 -12
- package/styled-components/cjs/components/Avatar/Avatar.js +34 -4
- package/styled-components/cjs/components/Avatar/Avatar.styles.js +1 -1
- package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +52 -2
- package/styled-components/cjs/components/AvatarGroup/AvatarGroup.js +1 -1
- package/styled-components/cjs/components/Badge/Badge.js +1 -1
- package/styled-components/cjs/components/Badge/Badge.styles.js +1 -1
- package/styled-components/cjs/components/Button/Button.js +2 -2
- package/styled-components/cjs/components/Button/Button.styles.js +1 -1
- package/styled-components/cjs/components/ButtonGroup/ButtonGroup.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -2
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -2
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/hoc/withRange.js +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useKeyNavigation.js +20 -20
- package/styled-components/cjs/components/Calendar/store/reducer.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -2
- package/styled-components/cjs/components/Cell/Cell.js +1 -1
- package/styled-components/cjs/components/Cell/Cell.styles.js +1 -1
- package/styled-components/cjs/components/Checkbox/Checkbox.js +1 -1
- package/styled-components/cjs/components/Chip/Chip.js +3 -3
- package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
- package/styled-components/cjs/components/Combobox/Combobox.js +6 -6
- package/styled-components/cjs/components/Combobox/hooks/useFocusController.js +9 -9
- package/styled-components/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +2 -2
- package/styled-components/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +7 -7
- package/styled-components/cjs/components/Counter/Counter.js +1 -1
- package/styled-components/cjs/components/Divider/Divider.js +2 -2
- package/styled-components/cjs/components/Drawer/Drawer.js +1 -1
- package/styled-components/cjs/components/Drawer/DrawerContext.js +1 -1
- package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.js +7 -29
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
- package/styled-components/cjs/components/Dropdown/index.js +1 -9
- package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +7 -9
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/utils/index.js +2 -49
- package/styled-components/cjs/components/Grid/Grid.js +2 -2
- package/styled-components/cjs/components/Grid/ui/Col/Col.js +2 -2
- package/styled-components/cjs/components/Grid/ui/Row/Row.js +1 -1
- package/styled-components/cjs/components/Grid/utils/index.js +1 -1
- package/styled-components/cjs/components/Header/HeaderRoot/HeaderRoot.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderLogo/HeaderLogo.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderTitleWrapper/HeaderTitleWrapper.js +1 -1
- package/styled-components/cjs/components/IconButton/IconButton.js +86 -0
- package/styled-components/cjs/components/IconButton/IconButton.styles.js +29 -0
- package/styled-components/cjs/components/IconButton/IconButton.tokens.js +34 -0
- package/styled-components/cjs/components/IconButton/IconButton.types.js +5 -0
- package/styled-components/cjs/components/IconButton/index.js +31 -0
- package/styled-components/cjs/components/IconButton/variations/_disabled/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_disabled/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_focused/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_focused/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_size/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/Image/Image.js +2 -2
- package/styled-components/cjs/components/Image/Image.styles.js +1 -1
- package/styled-components/cjs/components/Indicator/Indicator.js +1 -1
- package/styled-components/cjs/components/Link/Link.js +1 -1
- package/styled-components/cjs/components/Modal/Modal.js +1 -1
- package/styled-components/cjs/components/Modal/ModalContext.js +1 -1
- package/styled-components/cjs/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
- package/styled-components/cjs/components/Notification/NotificationsStore.js +1 -1
- package/styled-components/cjs/components/Overlay/Overlay.js +2 -2
- package/styled-components/cjs/components/Pagination/Pagination.js +3 -3
- package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +2 -2
- package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/styled-components/cjs/components/Panel/Panel.js +2 -2
- package/styled-components/cjs/components/Panel/ui/PanelContent/PanelContent.js +1 -1
- package/styled-components/cjs/components/Panel/ui/PanelFooter/PanelFooter.js +1 -1
- package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -1
- package/styled-components/cjs/components/Popover/Popover.js +9 -9
- package/styled-components/cjs/components/Popup/Popup.js +2 -2
- package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
- package/styled-components/cjs/components/Popup/PopupRoot.js +1 -1
- package/styled-components/cjs/components/Popup/hooks/usePopup.js +1 -1
- package/styled-components/cjs/components/Progress/Progress.js +1 -1
- package/styled-components/cjs/components/Progress/Progress.styles.js +1 -1
- package/styled-components/cjs/components/Radiobox/Radiobox.js +1 -1
- package/styled-components/cjs/components/SSRProvider/SSRProvider.js +1 -1
- package/styled-components/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +3 -3
- package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +1 -1
- package/styled-components/cjs/components/Select/Select.js +6 -6
- package/styled-components/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
- package/styled-components/cjs/components/Select/ui/SelectChip/SelectChip.js +2 -2
- package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +3 -3
- package/styled-components/cjs/components/Select/utils/index.js +3 -3
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +1 -1
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -1
- package/styled-components/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +1 -1
- package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -2
- package/styled-components/cjs/components/Skeleton/hoc/withSkeleton.js +1 -1
- package/styled-components/cjs/components/Spinner/Spinner.js +1 -1
- package/styled-components/cjs/components/Spinner/Spinner.styles.js +1 -1
- package/styled-components/cjs/components/Spinner/utils/index.js +1 -1
- package/styled-components/cjs/components/Switch/Switch.js +1 -1
- package/styled-components/cjs/components/Tabs/TabsContext.js +2 -3
- package/styled-components/cjs/components/Tabs/createTabsController.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -2
- package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +3 -3
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +1 -1
- package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
- package/styled-components/cjs/components/TextField/TextField.js +3 -3
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +2 -2
- package/styled-components/cjs/components/Toast/Toast.js +2 -2
- package/styled-components/cjs/components/Toast/Toast.styles.js +1 -1
- package/styled-components/cjs/components/Toast/ToastController.js +2 -2
- package/styled-components/cjs/components/Toast/ToastProvider/ToastProvider.js +3 -3
- package/styled-components/cjs/components/Toolbar/Toolbar.js +1 -1
- package/styled-components/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/styled-components/cjs/components/Tooltip/Tooltip.js +2 -2
- package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.js +2 -2
- package/styled-components/cjs/components/Typography/Old/TypographyOld.js +2 -2
- package/styled-components/cjs/components/Typography/Typography.js +2 -2
- package/styled-components/cjs/engines/common.js +1 -1
- package/styled-components/cjs/engines/styled-components.js +1 -1
- package/styled-components/cjs/examples/_helpers.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.config.js +45 -0
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_web/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.config.js +45 -0
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/cjs/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
- package/styled-components/cjs/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/cjs/mixins/applySpacing.js +1 -1
- package/styled-components/cjs/mixins/typography.js +1 -1
- package/styled-components/es/components/Avatar/Avatar.js +34 -3
- package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +52 -2
- package/styled-components/es/components/Button/Button.js +1 -1
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/styled-components/es/components/Calendar/hoc/withRange.js +1 -1
- package/styled-components/es/components/Calendar/hooks/useKeyNavigation.js +20 -20
- package/styled-components/es/components/Calendar/store/reducer.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/styled-components/es/components/Chip/Chip.js +2 -2
- package/styled-components/es/components/Combobox/Combobox.js +5 -5
- package/styled-components/es/components/Combobox/hooks/useFocusController.js +9 -9
- package/styled-components/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/styled-components/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/styled-components/es/components/Divider/Divider.js +1 -1
- package/styled-components/es/components/Drawer/DrawerContext.js +1 -1
- package/styled-components/es/components/Drawer/hooks/useDrawer.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +6 -29
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +0 -1
- package/styled-components/es/components/Dropdown/index.js +0 -1
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -8
- package/styled-components/es/components/Dropdown/utils/index.js +1 -48
- package/styled-components/es/components/Grid/Grid.js +1 -1
- package/styled-components/es/components/Grid/ui/Col/Col.js +1 -1
- package/styled-components/es/components/Grid/utils/index.js +1 -1
- package/styled-components/es/components/IconButton/IconButton.js +77 -0
- package/styled-components/es/components/IconButton/IconButton.styles.js +22 -0
- package/styled-components/es/components/IconButton/IconButton.tokens.js +28 -0
- package/styled-components/es/components/IconButton/IconButton.types.js +1 -0
- package/styled-components/es/components/IconButton/index.js +2 -0
- package/styled-components/es/components/IconButton/variations/_disabled/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_disabled/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_focused/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_focused/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_size/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_size/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_view/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/Image/Image.js +1 -1
- package/styled-components/es/components/Modal/ModalContext.js +1 -1
- package/styled-components/es/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/es/components/Notification/NotificationsStore.js +1 -1
- package/styled-components/es/components/Overlay/Overlay.js +1 -1
- package/styled-components/es/components/Pagination/Pagination.js +2 -2
- package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/styled-components/es/components/Panel/Panel.js +1 -1
- package/styled-components/es/components/Popover/Popover.js +8 -8
- package/styled-components/es/components/Popup/Popup.js +1 -1
- package/styled-components/es/components/Popup/hooks/usePopup.js +1 -1
- package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/styled-components/es/components/Select/Select.js +5 -5
- package/styled-components/es/components/Select/hooks/useKeyNavigation.js +12 -12
- package/styled-components/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/styled-components/es/components/Select/utils/index.js +3 -3
- package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -1
- package/styled-components/es/components/Skeleton/hoc/withSkeleton.js +1 -1
- package/styled-components/es/components/Spinner/utils/index.js +1 -1
- package/styled-components/es/components/Tabs/TabsContext.js +2 -3
- package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/styled-components/es/components/TextArea/TextArea.js +1 -1
- package/styled-components/es/components/TextField/TextField.js +2 -2
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/styled-components/es/components/Toast/Toast.js +1 -1
- package/styled-components/es/components/Toast/ToastController.js +1 -1
- package/styled-components/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/styled-components/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/styled-components/es/components/Tooltip/Tooltip.js +1 -1
- package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.js +1 -1
- package/styled-components/es/components/Typography/Old/TypographyOld.js +1 -1
- package/styled-components/es/components/Typography/Typography.js +1 -1
- package/styled-components/es/engines/common.js +1 -1
- package/styled-components/es/examples/_helpers.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/es/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.config.js +39 -0
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_web/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.config.js +39 -0
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.js +5 -0
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/es/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
- package/styled-components/es/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/index.js +1 -0
- package/styled-components/es/mixins/applySpacing.js +1 -1
- package/styled-components/es/mixins/typography.js +1 -1
- package/types/components/Avatar/Avatar.d.ts +3 -1
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.types.d.ts +7 -0
- package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +2 -7
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +0 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/utils/index.d.ts +2 -5
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/IconButton/IconButton.d.ts +30 -0
- package/types/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.styles.d.ts +21 -0
- package/types/components/IconButton/IconButton.styles.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.tokens.d.ts +29 -0
- package/types/components/IconButton/IconButton.tokens.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.types.d.ts +13 -0
- package/types/components/IconButton/IconButton.types.d.ts.map +1 -0
- package/types/components/IconButton/index.d.ts +4 -0
- package/types/components/IconButton/index.d.ts.map +1 -0
- package/types/components/IconButton/variations/_disabled/base.d.ts +2 -0
- package/types/components/IconButton/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_focused/base.d.ts +2 -0
- package/types/components/IconButton/variations/_focused/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_size/base.d.ts +2 -0
- package/types/components/IconButton/variations/_size/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_view/base.d.ts +2 -0
- package/types/components/IconButton/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +2 -0
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts +38 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +32 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +2 -0
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts +38 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +32 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts +1 -0
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -81
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -76
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
- package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -83
- package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -77
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +0 -13
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +0 -1
@@ -1,12 +1,12 @@
|
|
1
1
|
import './ComboboxItem.styles_936wgl.css';
|
2
2
|
import 'react';
|
3
3
|
import '@salutejs/plasma-core';
|
4
|
-
import '../../../../utils/react.js';
|
5
4
|
import '@linaria/react';
|
6
5
|
import '@linaria/core';
|
7
6
|
import 'focus-visible';
|
8
7
|
import 'react-dom';
|
9
8
|
import 'react-popper';
|
9
|
+
import '../../../../utils/react.js';
|
10
10
|
|
11
11
|
var base = "b1thh7ji";
|
12
12
|
|
@@ -103,8 +103,8 @@ var ComboboxTarget = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
103
103
|
itemValue = _ref9[0];
|
104
104
|
return itemValue;
|
105
105
|
});
|
106
|
-
chipsRefs === null || chipsRefs === void 0
|
107
|
-
onChange === null || onChange === void 0
|
106
|
+
chipsRefs === null || chipsRefs === void 0 || chipsRefs.current.splice(index, 1);
|
107
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
108
108
|
};
|
109
109
|
var onChipKeyDown = function onChipKeyDown(value, text, index, event) {
|
110
110
|
var code = event.code;
|
@@ -127,13 +127,13 @@ var ComboboxTarget = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
127
127
|
itemValue = _ref11[0];
|
128
128
|
return itemValue;
|
129
129
|
});
|
130
|
-
newValue === null || newValue === void 0
|
131
|
-
chipsRefs === null || chipsRefs === void 0
|
132
|
-
onChange === null || onChange === void 0
|
130
|
+
newValue === null || newValue === void 0 || newValue.pop();
|
131
|
+
chipsRefs === null || chipsRefs === void 0 || chipsRefs.current.pop();
|
132
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
133
133
|
}
|
134
134
|
};
|
135
135
|
var onChangeInput = function onChangeInput(event) {
|
136
|
-
onSearch === null || onSearch === void 0
|
136
|
+
onSearch === null || onSearch === void 0 || onSearch(event.currentTarget.value);
|
137
137
|
};
|
138
138
|
var onWheel = function onWheel(event) {
|
139
139
|
var deltaY = event.deltaY;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ComboboxTarget.js","sources":["../../../../../src/components/Combobox/ui/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useState } from 'react';\n\nimport { classes } from '../../Combobox.tokens';\nimport { cx } from '../../../../utils';\nimport { ComboboxChip } from '../ComboboxChip/ComboboxChip';\nimport type { ComboboxPrimitiveValue } from '../../Combobox.types';\nimport { useFocusController } from '../../hooks';\nimport { Keys } from '../../../Select/hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledContent,\n StyledLabel,\n StyledComboboxInput,\n StyledComboboxInputHelper,\n StyledComboboxTarget,\n StyledText,\n} from './ComboboxTarget.styles';\nimport type { ComboboxTargetProps } from './ComboboxTarget.types';\n\nconst {\n hasChips,\n innerLabelUp,\n arrowInverse,\n comboboxTargetArrow,\n comboboxTargeText,\n comboboxTargetInput,\n comboboxTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const ComboboxTarget = forwardRef<HTMLInputElement, ComboboxTargetProps>(\n (\n {\n values,\n search,\n label,\n placeholder,\n opened,\n readOnly,\n disabled,\n enumerationType,\n valueType,\n size,\n closedWithoutChanges,\n id,\n chipsRefs,\n inputRef,\n onChange,\n onSearch,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputHelperRef = useRef<HTMLDivElement>(null);\n const [focused, setFocused] = useState(false);\n\n const controlledRefs = { contentRef, inputHelperRef, inputRef };\n const textContent = values?.map(([, text]) => text).join(', ');\n const hasValue = values?.some(([value]) => value);\n\n const isEnumerationComma = enumerationType === 'comma';\n const isExtraSmall = size === 'xs';\n const isInputNotEmpty = hasValue || search;\n const isInputActive = !hasValue && (opened || (focused && !readOnly));\n const hasLabel = label && !isExtraSmall && isEnumerationComma;\n const hasOnlyLabel = !placeholder || label;\n const hasNoAnyTip = !placeholder && !label;\n const placeholderValue = (!label && !hasValue) || isExtraSmall ? placeholder : undefined;\n\n const withInnerLabelUp =\n !isExtraSmall && !hasNoAnyTip && hasOnlyLabel && (isInputActive || (hasLabel && isInputNotEmpty))\n ? innerLabelUp\n : undefined;\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withHasChips = hasValue && enumerationType === 'chip' ? hasChips : undefined;\n\n const isLabelVisible = (!hasValue && !isExtraSmall) || hasLabel;\n const isEnumerationVisible = hasValue && valueType !== 'single';\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const { onClickText, onFocusInput, onBlurInput } = useFocusController({\n controlledRefs,\n opened,\n hasValue,\n textContent,\n search,\n values,\n valueType,\n readOnly,\n closedWithoutChanges,\n updateFocused: setFocused,\n updateSearch: onSearch,\n onChipClick,\n });\n\n const onChipClear = (value: ComboboxPrimitiveValue, text: ComboboxPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n };\n\n const onChipKeyDown = (\n value: ComboboxPrimitiveValue,\n text: ComboboxPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code } = event;\n\n if (code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n };\n\n const onKeyDownInput = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const { code } = event;\n\n if (opened && code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace && !event.currentTarget?.value.length) {\n const newValue = values?.map(([itemValue]) => itemValue);\n newValue?.pop();\n chipsRefs?.current.pop();\n\n onChange?.(newValue);\n }\n };\n\n const onChangeInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value);\n };\n\n const onWheel = (event: React.WheelEvent<HTMLDivElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledComboboxTarget\n ref={ref}\n opened={opened}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n {...rest}\n >\n <StyledContent tabIndex={-1} ref={contentRef} className={withHasChips}>\n {isEnumerationVisible &&\n (isEnumerationComma ? (\n <StyledText className={comboboxTargeText} onClick={onClickText}>\n {textContent}\n </StyledText>\n ) : (\n <StyledChips>\n {values?.map(([value, text], index) => (\n <ComboboxChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n ))}\n <StyledComboboxInput\n ref={inputRef}\n role=\"textbox\"\n className={comboboxTargetInput}\n value={search}\n placeholder={placeholderValue}\n disabled={disabled}\n readOnly={readOnly}\n onFocus={onFocusInput}\n onBlur={onBlurInput}\n onChange={onChangeInput}\n onKeyDown={onKeyDownInput}\n />\n {valueType === 'multiple' && (\n <StyledComboboxInputHelper ref={inputHelperRef}>{search}</StyledComboboxInputHelper>\n )}\n </StyledContent>\n {isLabelVisible && (\n <StyledLabel className={comboboxTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" className={cx(comboboxTargetArrow, withArrowInverse)} />\n </StyledComboboxTarget>\n );\n },\n);\n"],"names":["hasChips","classes","innerLabelUp","arrowInverse","comboboxTargetArrow","comboboxTargeText","comboboxTargetInput","comboboxTargetLabel","ComboboxTarget","forwardRef","_ref","ref","values","search","label","placeholder","opened","readOnly","disabled","enumerationType","valueType","size","closedWithoutChanges","id","chipsRefs","inputRef","onChange","onSearch","onKeyDown","rest","_objectWithoutProperties","_excluded","contentRef","useRef","inputHelperRef","_useState","useState","_useState2","_slicedToArray","focused","setFocused","controlledRefs","textContent","map","_ref2","_ref3","text","join","hasValue","some","_ref4","_ref5","value","isEnumerationComma","isExtraSmall","isInputNotEmpty","isInputActive","hasLabel","hasOnlyLabel","hasNoAnyTip","placeholderValue","undefined","withInnerLabelUp","withArrowInverse","withHasChips","isLabelVisible","isEnumerationVisible","onChipClick","event","stopPropagation","_useFocusController","useFocusController","updateFocused","updateSearch","onClickText","onFocusInput","onBlurInput","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","Keys","Tab","preventDefault","Backspace","onKeyDownInput","_event$currentTarget","currentTarget","length","_ref10","_ref11","pop","onChangeInput","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledComboboxTarget","_extends","title","className","cx","StyledContent","tabIndex","StyledText","onClick","StyledChips","_ref12","_ref13","ComboboxChip","key","concat","onClear","v","t","StyledComboboxInput","role","onFocus","onBlur","StyledComboboxInputHelper","StyledLabel","htmlFor","StyledArrow"],"mappings":";;;;;;;;;;AAqBA,IACIA,QAAQ,GAORC,OAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,OAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,OAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,OAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,OAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,OAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,OAAO,CADPM,mBAAmB,CAAA;;AAGvB;AACA;AACA;AACO,IAAMC,cAAc,gBAAGC,UAAU,CACpC,UAAAC,IAAA,EAqBIC,GAAG,EACF;AAAA,EAAA,IApBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,eAAe,GAAAT,IAAA,CAAfS,eAAe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,CAAC,CAAA;AAE/B,CACJ;;;;"}
|
1
|
+
{"version":3,"file":"ComboboxTarget.js","sources":["../../../../../src/components/Combobox/ui/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useState } from 'react';\n\nimport { classes } from '../../Combobox.tokens';\nimport { cx } from '../../../../utils';\nimport { ComboboxChip } from '../ComboboxChip/ComboboxChip';\nimport type { ComboboxPrimitiveValue } from '../../Combobox.types';\nimport { useFocusController } from '../../hooks';\nimport { Keys } from '../../../Select/hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledContent,\n StyledLabel,\n StyledComboboxInput,\n StyledComboboxInputHelper,\n StyledComboboxTarget,\n StyledText,\n} from './ComboboxTarget.styles';\nimport type { ComboboxTargetProps } from './ComboboxTarget.types';\n\nconst {\n hasChips,\n innerLabelUp,\n arrowInverse,\n comboboxTargetArrow,\n comboboxTargeText,\n comboboxTargetInput,\n comboboxTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const ComboboxTarget = forwardRef<HTMLInputElement, ComboboxTargetProps>(\n (\n {\n values,\n search,\n label,\n placeholder,\n opened,\n readOnly,\n disabled,\n enumerationType,\n valueType,\n size,\n closedWithoutChanges,\n id,\n chipsRefs,\n inputRef,\n onChange,\n onSearch,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputHelperRef = useRef<HTMLDivElement>(null);\n const [focused, setFocused] = useState(false);\n\n const controlledRefs = { contentRef, inputHelperRef, inputRef };\n const textContent = values?.map(([, text]) => text).join(', ');\n const hasValue = values?.some(([value]) => value);\n\n const isEnumerationComma = enumerationType === 'comma';\n const isExtraSmall = size === 'xs';\n const isInputNotEmpty = hasValue || search;\n const isInputActive = !hasValue && (opened || (focused && !readOnly));\n const hasLabel = label && !isExtraSmall && isEnumerationComma;\n const hasOnlyLabel = !placeholder || label;\n const hasNoAnyTip = !placeholder && !label;\n const placeholderValue = (!label && !hasValue) || isExtraSmall ? placeholder : undefined;\n\n const withInnerLabelUp =\n !isExtraSmall && !hasNoAnyTip && hasOnlyLabel && (isInputActive || (hasLabel && isInputNotEmpty))\n ? innerLabelUp\n : undefined;\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withHasChips = hasValue && enumerationType === 'chip' ? hasChips : undefined;\n\n const isLabelVisible = (!hasValue && !isExtraSmall) || hasLabel;\n const isEnumerationVisible = hasValue && valueType !== 'single';\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const { onClickText, onFocusInput, onBlurInput } = useFocusController({\n controlledRefs,\n opened,\n hasValue,\n textContent,\n search,\n values,\n valueType,\n readOnly,\n closedWithoutChanges,\n updateFocused: setFocused,\n updateSearch: onSearch,\n onChipClick,\n });\n\n const onChipClear = (value: ComboboxPrimitiveValue, text: ComboboxPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n };\n\n const onChipKeyDown = (\n value: ComboboxPrimitiveValue,\n text: ComboboxPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code } = event;\n\n if (code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n };\n\n const onKeyDownInput = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const { code } = event;\n\n if (opened && code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace && !event.currentTarget?.value.length) {\n const newValue = values?.map(([itemValue]) => itemValue);\n newValue?.pop();\n chipsRefs?.current.pop();\n\n onChange?.(newValue);\n }\n };\n\n const onChangeInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value);\n };\n\n const onWheel = (event: React.WheelEvent<HTMLDivElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledComboboxTarget\n ref={ref}\n opened={opened}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n {...rest}\n >\n <StyledContent tabIndex={-1} ref={contentRef} className={withHasChips}>\n {isEnumerationVisible &&\n (isEnumerationComma ? (\n <StyledText className={comboboxTargeText} onClick={onClickText}>\n {textContent}\n </StyledText>\n ) : (\n <StyledChips>\n {values?.map(([value, text], index) => (\n <ComboboxChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n ))}\n <StyledComboboxInput\n ref={inputRef}\n role=\"textbox\"\n className={comboboxTargetInput}\n value={search}\n placeholder={placeholderValue}\n disabled={disabled}\n readOnly={readOnly}\n onFocus={onFocusInput}\n onBlur={onBlurInput}\n onChange={onChangeInput}\n onKeyDown={onKeyDownInput}\n />\n {valueType === 'multiple' && (\n <StyledComboboxInputHelper ref={inputHelperRef}>{search}</StyledComboboxInputHelper>\n )}\n </StyledContent>\n {isLabelVisible && (\n <StyledLabel className={comboboxTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" className={cx(comboboxTargetArrow, withArrowInverse)} />\n </StyledComboboxTarget>\n );\n },\n);\n"],"names":["hasChips","classes","innerLabelUp","arrowInverse","comboboxTargetArrow","comboboxTargeText","comboboxTargetInput","comboboxTargetLabel","ComboboxTarget","forwardRef","_ref","ref","values","search","label","placeholder","opened","readOnly","disabled","enumerationType","valueType","size","closedWithoutChanges","id","chipsRefs","inputRef","onChange","onSearch","onKeyDown","rest","_objectWithoutProperties","_excluded","contentRef","useRef","inputHelperRef","_useState","useState","_useState2","_slicedToArray","focused","setFocused","controlledRefs","textContent","map","_ref2","_ref3","text","join","hasValue","some","_ref4","_ref5","value","isEnumerationComma","isExtraSmall","isInputNotEmpty","isInputActive","hasLabel","hasOnlyLabel","hasNoAnyTip","placeholderValue","undefined","withInnerLabelUp","withArrowInverse","withHasChips","isLabelVisible","isEnumerationVisible","onChipClick","event","stopPropagation","_useFocusController","useFocusController","updateFocused","updateSearch","onClickText","onFocusInput","onBlurInput","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","Keys","Tab","preventDefault","Backspace","onKeyDownInput","_event$currentTarget","currentTarget","length","_ref10","_ref11","pop","onChangeInput","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledComboboxTarget","_extends","title","className","cx","StyledContent","tabIndex","StyledText","onClick","StyledChips","_ref12","_ref13","ComboboxChip","key","concat","onClear","v","t","StyledComboboxInput","role","onFocus","onBlur","StyledComboboxInputHelper","StyledLabel","htmlFor","StyledArrow"],"mappings":";;;;;;;;;;AAqBA,IACIA,QAAQ,GAORC,OAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,OAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,OAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,OAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,OAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,OAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,OAAO,CADPM,mBAAmB,CAAA;;AAGvB;AACA;AACA;AACO,IAAMC,cAAc,gBAAGC,UAAU,CACpC,UAAAC,IAAA,EAqBIC,G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EjH,EAAAA;AAAG,GAAA,EACpDT,KACQ,CAChB,eACDgG,KAAA,CAAAC,aAAA,CAAC0B,WAAW,EAAA;AAACpH,IAAAA,IAAI,EAAC,GAAG;AAAC8F,IAAAA,SAAS,EAAEC,EAAE,CAAChH,mBAAmB,EAAE2D,gBAAgB,CAAA;AAAE,GAAE,CAC3D,CAAC,CAAA;AAE/B,CACJ;;;;"}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
var getDrawers = function getDrawers(items) {
|
5
5
|
return items.filter(function (item) {
|
6
6
|
var _item$info;
|
7
|
-
return item === null || item === void 0
|
7
|
+
return item === null || item === void 0 || (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isDrawer;
|
8
8
|
});
|
9
9
|
};
|
10
10
|
var hasDrawers = function hasDrawers(items) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DrawerContext.js","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface DrawerInfo extends PopupInfo {\n id: string;\n info?: {\n isDrawer?: true;\n };\n}\n\n/**\n * Взаимодействие с Drawer оконами.\n */\nconst getDrawers = (items: DrawerInfo[]): DrawerInfo[] => {\n return items.filter((item: DrawerInfo) => item?.info?.isDrawer);\n};\n\nexport const hasDrawers = (items: DrawerInfo[]): boolean => {\n return getDrawers(items).length > 0;\n};\n\nexport const getIdLastDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[drawers.length - 1].id;\n};\n\nexport const getIdFirstDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[0].id;\n};\n"],"names":["getDrawers","items","filter","item","_item$info","info","isDrawer","hasDrawers","length","getIdLastDrawer","drawers","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAAmB,EAAmB;AACtD,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAgB,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,
|
1
|
+
{"version":3,"file":"DrawerContext.js","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface DrawerInfo extends PopupInfo {\n id: string;\n info?: {\n isDrawer?: true;\n };\n}\n\n/**\n * Взаимодействие с Drawer оконами.\n */\nconst getDrawers = (items: DrawerInfo[]): DrawerInfo[] => {\n return items.filter((item: DrawerInfo) => item?.info?.isDrawer);\n};\n\nexport const hasDrawers = (items: DrawerInfo[]): boolean => {\n return getDrawers(items).length > 0;\n};\n\nexport const getIdLastDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[drawers.length - 1].id;\n};\n\nexport const getIdFirstDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[0].id;\n};\n"],"names":["getDrawers","items","filter","item","_item$info","info","isDrawer","hasDrawers","length","getIdLastDrawer","drawers","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAAmB,EAAmB;AACtD,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAgB,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,IAAA,CAAAC,UAAA,GAAJD,IAAI,CAAEE,IAAI,MAAAD,IAAAA,IAAAA,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYE,QAAQ,CAAA;GAAC,CAAA,CAAA;AACnE,CAAC,CAAA;IAEYC,UAAU,GAAG,SAAbA,UAAUA,CAAIN,KAAmB,EAAc;AACxD,EAAA,OAAOD,UAAU,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACvC,EAAC;IAEYC,eAAe,GAAG,SAAlBA,eAAeA,CAAIR,KAAmB,EAAyB;AACxE,EAAA,IAAMS,OAAO,GAAGV,UAAU,CAACC,KAAK,CAAC,CAAA;AACjC,EAAA,IAAI,CAACS,OAAO,CAACF,MAAM,EAAE;AACjB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,OAAO,CAACA,OAAO,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACzC;;;;"}
|
@@ -3,5 +3,5 @@
|
|
3
3
|
.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb{width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);}.Popover_styles_rmr9za_s1pd4d8a__0bafa6fb::before{position:absolute;width:var(--plasma-popover-arrow-mask-width);height:var(--plasma-popover-arrow-mask-height);-webkit-mask-image:var(--plasma-popover-arrow-mask-image);mask-image:var(--plasma-popover-arrow-mask-image);background:var(--plasma-popover-arrow-background);content:'';-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0deg);}
|
4
4
|
.Popover_styles_rmr9za_s16xlixz__0bafa6fb{position:absolute;z-index:var(--s16xlixz-0);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{right:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{left:calc(0px - var(--plasma-popover-arrow-height));}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='top-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{bottom:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:calc(0px - var(--plasma-popover-arrow-height));left:unset !important;right:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='bottom-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb::before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-start'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='left-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb,.Popover_styles_rmr9za_s16xlixz__0bafa6fb[data-popper-placement^='right-end'] > .Popover_styles_rmr9za_popoverArrow__0bafa6fb{top:unset !important;bottom:var(--plasma-popover-arrow-edge-margin) !important;-webkit-transform:unset !important;-ms-transform:unset !important;transform:unset !important;}
|
5
5
|
|
6
|
-
.
|
7
|
-
.
|
6
|
+
.Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
|
7
|
+
.Dropdown_styles_1daxhqh_sjr7fmv__488e0a19{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
@@ -1,16 +1,12 @@
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
-
import React, { forwardRef, useRef
|
2
|
+
import React, { forwardRef, useRef } from 'react';
|
3
3
|
import { useUniqId, useForkRef, useFocusTrap } from '@salutejs/plasma-core';
|
4
|
-
import { cx } from '../../utils/index.js';
|
5
4
|
import { base } from './variations/_view/base.js';
|
6
5
|
import { base as base$1 } from './variations/_size/base.js';
|
7
6
|
import { StyledPopover, StyledDropdown } from './Dropdown.styles.js';
|
8
|
-
import {
|
9
|
-
import { classes } from './Dropdown.tokens.js';
|
10
|
-
import { useKeyNavigation } from './hooks/useKeyboardNavigation.js';
|
11
|
-
|
12
|
-
var _excluded = ["id", "target", "children", "hasArrow", "view", "size", "frame", "onToggle", "className", "isFocusTrapped", "isOpen", "role", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
7
|
+
import { getPlacements } from './utils/index.js';
|
13
8
|
|
9
|
+
var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
14
10
|
/**
|
15
11
|
* Выпадающий список без внешнего контроля видимости.
|
16
12
|
*/
|
@@ -20,17 +16,15 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
20
16
|
target = _ref.target,
|
21
17
|
children = _ref.children,
|
22
18
|
hasArrow = _ref.hasArrow,
|
19
|
+
role = _ref.role,
|
23
20
|
view = _ref.view,
|
24
21
|
size = _ref.size,
|
25
22
|
frame = _ref.frame,
|
26
23
|
_onToggle = _ref.onToggle,
|
27
|
-
className = _ref.className,
|
28
24
|
_ref$isFocusTrapped = _ref.isFocusTrapped,
|
29
25
|
isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
|
30
26
|
_ref$isOpen = _ref.isOpen,
|
31
27
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
32
|
-
_ref$role = _ref.role,
|
33
|
-
role = _ref$role === void 0 ? 'listbox' : _ref$role,
|
34
28
|
_ref$placement = _ref.placement,
|
35
29
|
placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
|
36
30
|
_ref$trigger = _ref.trigger,
|
@@ -48,24 +42,9 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
48
42
|
var innerId = id || uniqId;
|
49
43
|
var rootRef = useRef(null);
|
50
44
|
var dropdownRef = useRef(null);
|
51
|
-
var itemsRefs = useRef([]);
|
52
45
|
var handleRef = useForkRef(rootRef, outerRootRef);
|
53
46
|
var trapRef = useFocusTrap(isOpen && isFocusTrapped);
|
54
47
|
var dropdownForkRef = useForkRef(dropdownRef, trapRef);
|
55
|
-
var _useKeyNavigation = useKeyNavigation({
|
56
|
-
itemsRefs: itemsRefs,
|
57
|
-
opened: isOpen,
|
58
|
-
updateOpened: _onToggle
|
59
|
-
}),
|
60
|
-
onKeyDownTarget = _useKeyNavigation.onKeyDownTarget;
|
61
|
-
var childrenArray = useMemo(function () {
|
62
|
-
return Children.toArray(children);
|
63
|
-
}, [children]);
|
64
|
-
var childrenMemo = useMemo(function () {
|
65
|
-
return getChildren(childrenArray, {
|
66
|
-
childrenRefs: itemsRefs
|
67
|
-
});
|
68
|
-
}, [childrenArray, isOpen]);
|
69
48
|
return /*#__PURE__*/React.createElement(StyledPopover, {
|
70
49
|
role: role,
|
71
50
|
isOpen: isOpen,
|
@@ -84,14 +63,12 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
84
63
|
closeOnOverlayClick: closeOnOverlayClick,
|
85
64
|
closeOnEsc: closeOnEsc,
|
86
65
|
isFocusTrapped: isFocusTrapped,
|
87
|
-
frame: frame
|
88
|
-
onKeyDown: onKeyDownTarget
|
66
|
+
frame: frame
|
89
67
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
90
|
-
className: cx(className, classes.dropdownRoot),
|
91
68
|
ref: handleRef,
|
92
69
|
view: view,
|
93
70
|
size: size
|
94
|
-
}, rest), /*#__PURE__*/React.createElement(StyledDropdown, null,
|
71
|
+
}, rest), /*#__PURE__*/React.createElement(StyledDropdown, null, children)));
|
95
72
|
});
|
96
73
|
};
|
97
74
|
var dropdownConfig = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, {
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport { useFocusTrap, useForkRef, useUniqId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledDropdown, StyledPopover } from './Dropdown.styles';\nimport { getPlacements } from './utils';\nimport type { DropdownProps } from './Dropdown.types';\n\n/**\n * Выпадающий список без внешнего контроля видимости.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n id,\n target,\n children,\n hasArrow,\n role,\n view,\n size,\n frame,\n onToggle,\n isFocusTrapped = true,\n isOpen = false,\n placement = 'auto',\n trigger = 'click',\n offset = [0, 6],\n preventOverflow = false,\n closeOnOverlayClick = false,\n closeOnEsc = false,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = useUniqId();\n const innerId = id || uniqId;\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const dropdownRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef<HTMLDivElement>(rootRef, outerRootRef);\n\n const trapRef = useFocusTrap(isOpen && isFocusTrapped);\n\n const dropdownForkRef = useForkRef<HTMLDivElement>(dropdownRef, trapRef);\n\n return (\n <StyledPopover\n role={role}\n isOpen={isOpen}\n usePortal={false}\n onToggle={(is, event) => onToggle?.(is, event)}\n id={innerId}\n ref={dropdownForkRef}\n target={target}\n offset={offset}\n preventOverflow={preventOverflow}\n hasArrow={hasArrow}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n closeOnEsc={closeOnEsc}\n isFocusTrapped={isFocusTrapped}\n frame={frame}\n >\n <Root ref={handleRef} view={view} size={size} {...rest}>\n <StyledDropdown>{children}</StyledDropdown>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","outerRootRef","id","target","children","hasArrow","role","view","size","frame","onToggle","_ref$isFocusTrapped","isFocusTrapped","_ref$isOpen","isOpen","_ref$placement","placement","_ref$trigger","trigger","_ref$offset","offset","_ref$preventOverflow","preventOverflow","_ref$closeOnOverlayCl","closeOnOverlayClick","_ref$closeOnEsc","closeOnEsc","rest","_objectWithoutProperties","_excluded","uniqId","useUniqId","innerId","rootRef","useRef","dropdownRef","handleRef","useForkRef","trapRef","useFocusTrap","dropdownForkRef","React","createElement","StyledPopover","usePortal","is","event","ref","getPlacements","_extends","StyledDropdown","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;AAWA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA8C,EAAA;AAAA,EAAA,oBACvEC,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,MAAM,GAAAH,IAAA,CAANG,MAAM;MACNC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;MACRC,IAAI,GAAAN,I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AAe;AAC/BH,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAEbgC,KAAA,CAAAC,aAAA,CAAC5C,IAAI,EAAAmD,QAAA,CAAA;AAACF,MAAAA,GAAG,EAAEX,SAAU;AAAC7B,MAAAA,IAAI,EAAEA,IAAK;AAACC,MAAAA,IAAI,EAAEA,IAAAA;KAAUmB,EAAAA,IAAI,CAClDc,eAAAA,KAAA,CAAAC,aAAA,CAACQ,cAAc,EAAE9C,IAAAA,EAAAA,QAAyB,CACxC,CACK,CAAC,CAAA;AAExB,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM+C,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzD,YAAY;AACpB0D,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACRjD,IAAAA,IAAI,EAAE;AACFkD,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNrD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { tokens } from './Dropdown.tokens';\n\n// issue #823\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.
|
1
|
+
{"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { tokens } from './Dropdown.tokens';\n\n// issue #823\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.target)} {\n display: block;\n }\n`;\n\nexport const StyledDropdown = styled.div`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: var(${tokens.width});\n height: var(${tokens.height});\n\n padding: var(${tokens.paddingTop}) var(${tokens.paddingRight}) var(${tokens.paddingBottom})\n var(${tokens.paddingLeft});\n`;\n"],"names":["Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","StyledDropdown"],"mappings":";;;;;AAOA;AACA,IAAMA,OAAO,gBAAGC,SAAS,CAACC,aAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPvBA,SAOuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAEM,IAAMC,cAAc,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYnC;;;;"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
.sn7uamp .popover-
|
1
|
+
.sn7uamp .popover-target{display:block;}
|
2
2
|
.sjr7fmv{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n height: '--plasma-dropdown-height',\n borderRadius: '--plasma-dropdown-border-radius',\n paddingTop: '--plasma-dropdown-padding-top',\n paddingRight: '--plasma-dropdown-padding-right',\n paddingBottom: '--plasma-dropdown-padding-bottom',\n paddingLeft: '--plasma-dropdown-padding-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemColor: '--plasma-dropdown-item-color',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected',\n itemColorSelected: '--plasma-dropdown-item-color-selected',\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',\n itemWidth: '--plasma-dropdown-item-width',\n itemHeight: '--plasma-dropdown-item-height',\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n itemMarginTop: '--plasma-dropdown-item-margin-top',\n itemMarginRight: '--plasma-dropdown-item-margin-right',\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom',\n itemMarginLeft: '--plasma-dropdown-item-margin-left',\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color',\n itemContentRightColor: '--plasma-dropdown-item-content-right-color',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width',\n\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsSelected","dropdownItemIsDisabled","tokens","background","boxShadow","width","height","borderRadius","paddingTop","paddingRight","paddingBottom","paddingLeft","itemBackground","itemColor","itemBackgroundHover","itemBackgroundSelected","itemColorSelected","itemBackgroundSelectedHover","itemColorSelectedHover","itemWidth","itemHeight","itemBorderRadius","itemPaddingTop","itemPaddingRight","itemPaddingBottom","itemPaddingLeft","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemContentLeftColor","itemContentRightColor","itemContentLeftWidth","itemContentRightWidth","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerColor","dividerWidth","dividerHeight","dividerMarginTop","dividerMarginRight","dividerMarginBottom","dividerMarginLeft","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft","disabledOpacity","focusColor"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,MAAM,EAAE,0BAA0B;AAClCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,aAAa,EAAE,kCAAkC;AACjDC,EAAAA,WAAW,EAAE,gCAAgC;AAE7CC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,sBAAsB,EAAE,4CAA4C;AACpEC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,2BAA2B,EAAE,kDAAkD;AAC/EC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,aAAa,EAAE,mCAAmC;AAClDC,EAAAA,eA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jEC,EAAAA,kBAAkB,EAAE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAA2C;AAEjEC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAAA;AAChB;;;;"}
|
1
|
+
{"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n height: '--plasma-dropdown-height',\n borderRadius: '--plasma-dropdown-border-radius',\n paddingTop: '--plasma-dropdown-padding-top',\n paddingRight: '--plasma-dropdown-padding-right',\n paddingBottom: '--plasma-dropdown-padding-bottom',\n paddingLeft: '--plasma-dropdown-padding-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemColor: '--plasma-dropdown-item-color',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected',\n itemColorSelected: '--plasma-dropdown-item-color-selected',\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',\n itemWidth: '--plasma-dropdown-item-width',\n itemHeight: '--plasma-dropdown-item-height',\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n itemMarginTop: '--plasma-dropdown-item-margin-top',\n itemMarginRight: '--plasma-dropdown-item-margin-right',\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom',\n itemMarginLeft: '--plasma-dropdown-item-margin-left',\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color',\n itemContentRightColor: '--plasma-dropdown-item-content-right-color',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width',\n\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n};\n"],"names":["classes","dropdownItemIsSelected","dropdownItemIsDisabled","tokens","background","boxShadow","width","height","borderRadius","paddingTop","paddingRight","paddingBottom","paddingLeft","itemBackground","itemColor","itemBackgroundHover","itemBackgroundSelected","itemColorSelected","itemBackgroundSelectedHover","itemColorSelectedHover","itemWidth","itemHeight","itemBorderRadius","itemPaddingTop","itemPaddingRight","itemPaddingBottom","itemPaddingLeft","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemContentLeftColor","itemContentRightColor","itemContentLeftWidth","itemContentRightWidth","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerColor","dividerWidth","dividerHeight","dividerMarginTop","dividerMarginRight","dividerMarginBottom","dividerMarginLeft","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft","disabledOpacity","focusColor"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,MAAM,EAAE,0BAA0B;AAClCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,aAAa,EAAE,kCAAkC;AACjDC,EAAAA,WAAW,EAAE,gCAAgC;AAE7CC,EAAAA,cAAc,EAAE,mCAAmC;AACnDC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,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oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAC3CC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,kBAAkB,EAAE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAA2C;AAEjEC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAAA;AAChB;;;;"}
|
@@ -8,7 +8,7 @@ import { base as base$1 } from './variations/_view/base.js';
|
|
8
8
|
import { base as base$2 } from './variations/_size/base.js';
|
9
9
|
import { StyledContentLeft, StyledText, StyledContentRight, base } from './DropdownItem.styles.js';
|
10
10
|
|
11
|
-
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "
|
11
|
+
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "role", "view", "size", "disabled", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
|
12
12
|
/**
|
13
13
|
* Элемент выпадающего списка
|
14
14
|
*/
|
@@ -22,11 +22,10 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
22
22
|
name = _ref.name,
|
23
23
|
checked = _ref.checked,
|
24
24
|
value = _ref.value,
|
25
|
+
role = _ref.role,
|
25
26
|
view = _ref.view,
|
26
27
|
size = _ref.size,
|
27
28
|
disabled = _ref.disabled,
|
28
|
-
_ref$role = _ref.role,
|
29
|
-
role = _ref$role === void 0 ? 'option' : _ref$role,
|
30
29
|
ContentLeftComponent = _ref.contentLeft,
|
31
30
|
ContentRightComponent = _ref.contentRight,
|
32
31
|
onSelect = _ref.onSelect,
|
@@ -41,7 +40,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
41
40
|
if (disabled) {
|
42
41
|
return;
|
43
42
|
}
|
44
|
-
onClick === null || onClick === void 0
|
43
|
+
onClick === null || onClick === void 0 || onClick(event);
|
45
44
|
if (onSelect && !ContentLeftComponent) {
|
46
45
|
onSelect(value, text);
|
47
46
|
}
|
@@ -50,7 +49,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
50
49
|
if (disabled) {
|
51
50
|
return;
|
52
51
|
}
|
53
|
-
onChange === null || onChange === void 0
|
52
|
+
onChange === null || onChange === void 0 || onChange(event);
|
54
53
|
if (onSelect && ContentLeftComponent) {
|
55
54
|
onSelect(value, text);
|
56
55
|
}
|
@@ -60,7 +59,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
60
59
|
value: value,
|
61
60
|
checked: checked || isSelected,
|
62
61
|
disabled: disabled,
|
63
|
-
tabIndex:
|
62
|
+
tabIndex: 0
|
64
63
|
}, !disabled && {
|
65
64
|
onChange: handleOnChange
|
66
65
|
});
|
@@ -80,7 +79,6 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
80
79
|
ref: outerRootRef,
|
81
80
|
tabIndex: 0,
|
82
81
|
"aria-disabled": disabled,
|
83
|
-
"aria-selected": isSelected,
|
84
82
|
onClick: handleOnClick,
|
85
83
|
"data-value": value
|
86
84
|
}, rest), text ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/React.createElement(StyledText, null, text), /*#__PURE__*/React.createElement(StyledContentRight, null, ContentRightComponent && ContentRight)) : children);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n view,\n size,\n disabled,\n
|
1
|
+
{"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n role,\n view,\n size,\n disabled,\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withDropdownItemIsSelected = checked || isSelected ? classes.dropdownItemIsSelected : undefined;\n const withDropdownItemIsDisabled = disabled ? classes.dropdownItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: 0,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withDropdownItemIsSelected, withDropdownItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const dropdownItemConfig = {\n name: 'DropdownItem',\n tag: 'div',\n layout: dropdownItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","role","view","size","disabled","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withDropdownItemIsSelected","classes","dropdownItemIsSelected","undefined","withDropdownItemIsDisabled","dropdownItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","dropdownItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;AAaA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAkD,EAAA;AAAA,EAAA,oBAC/EC,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,IAAI,GAAAL,IAAA,CAAJK,IAAI;MACJC,UAAU,GAAAN,IAAA,CAAVM,UAAU;MACVC,IAAI,GAAAP,IAAA,CAAJO,IAAI;MACJC,OAAO,GAAAR,IAAA,CAAPQ,OAAO;MACPC,KAAK,GAAAT,IAAA,CAALS,K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,OAAQ;AACZpB,MAAAA,UAAU,EAAEA,UAAW;AACvBI,MAAAA,IAAI,EAAEA,IAAK;AACXsC,MAAAA,GAAG,EAAE/C,YAAa;AAClBsC,MAAAA,QAAQ,EAAE,CAAE;AACZ,MAAA,eAAA,EAAe1B,QAAS;AACxBM,MAAAA,OAAO,EAAEc,aAAc;MACvB,YAAYxB,EAAAA,KAAAA;KACRY,EAAAA,IAAI,GAEPhB,IAAI,gBACDuC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAK,QAAA,EACIL,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACK,iBAAiB,EAAEpC,IAAAA,EAAAA,oBAAoB,IAAI0B,WAA+B,CAAC,eAC5EI,KAAA,CAAAC,aAAA,CAACM,UAAU,QAAE9C,IAAiB,CAAC,eAC/BuC,KAAA,CAAAC,aAAA,CAACO,kBAAkB,QAAEpC,qBAAqB,IAAI2B,YAAiC,CACjF,CAAC,GAEHvC,QAEF,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMiD,kBAAkB,GAAG;AAC9B9C,EAAAA,IAAI,EAAE,cAAc;AACpB+C,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1D,gBAAgB;AACxB2D,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR9C,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD/C,IAAAA,IAAI,EAAE;AACF8C,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import React, { isValidElement, cloneElement
|
1
|
+
import { typeof as _typeof } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
+
import React, { isValidElement, cloneElement } from 'react';
|
3
3
|
|
4
4
|
var getPlacement = function getPlacement(placement) {
|
5
5
|
return "".concat(placement, "-start");
|
@@ -29,48 +29,6 @@ var getValidComponent = function getValidComponent(element, props) {
|
|
29
29
|
}
|
30
30
|
return element;
|
31
31
|
};
|
32
|
-
var getChildren = function getChildren(children, externalProps) {
|
33
|
-
if (externalProps.childrenRefs) {
|
34
|
-
externalProps.childrenRefs.current = [];
|
35
|
-
}
|
36
|
-
var res = Children.map(children || [], function (child) {
|
37
|
-
var hasValue = ('value' in (child === null || child === void 0 ? void 0 : child.props));
|
38
|
-
var hasTarget = ('target' in (child === null || child === void 0 ? void 0 : child.props));
|
39
|
-
if (! /*#__PURE__*/isValidElement(child) || !hasValue && !hasTarget) {
|
40
|
-
return child;
|
41
|
-
}
|
42
|
-
if (hasTarget) {
|
43
|
-
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
44
|
-
target = _ref.target;
|
45
|
-
if (! /*#__PURE__*/isValidElement(target)) {
|
46
|
-
return child;
|
47
|
-
}
|
48
|
-
var targetProps = _objectSpread2(_objectSpread2({}, target === null || target === void 0 ? void 0 : target.props), {}, {
|
49
|
-
ref: function ref(element) {
|
50
|
-
var _externalProps$childr;
|
51
|
-
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr = externalProps.childrenRefs) !== null && _externalProps$childr !== void 0 && _externalProps$childr.current && element) {
|
52
|
-
externalProps.childrenRefs.current.push(element);
|
53
|
-
}
|
54
|
-
}
|
55
|
-
});
|
56
|
-
var updatedTarget = /*#__PURE__*/cloneElement(target, targetProps);
|
57
|
-
var updatedProps = _objectSpread2(_objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
58
|
-
target: updatedTarget
|
59
|
-
});
|
60
|
-
return /*#__PURE__*/cloneElement(child, updatedProps);
|
61
|
-
}
|
62
|
-
var props = _objectSpread2(_objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
63
|
-
ref: function ref(element) {
|
64
|
-
var _externalProps$childr2;
|
65
|
-
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr2 = externalProps.childrenRefs) !== null && _externalProps$childr2 !== void 0 && _externalProps$childr2.current && element) {
|
66
|
-
externalProps.childrenRefs.current.push(element);
|
67
|
-
}
|
68
|
-
}
|
69
|
-
});
|
70
|
-
return /*#__PURE__*/cloneElement(child, props);
|
71
|
-
});
|
72
|
-
return res;
|
73
|
-
};
|
74
32
|
|
75
|
-
export {
|
33
|
+
export { getPlacement, getPlacements, getValidComponent };
|
76
34
|
//# sourceMappingURL=index.js.map
|