@salutejs/plasma-new-hope 0.77.0-canary.1185.8720575745.0 → 0.77.0-canary.1195.8813838291.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 +25 -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 +25 -0
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -0
- package/cjs/components/IconButton/IconButton.styles_12iyaye.css +2 -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 +5 -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 +25 -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 +20 -0
- package/es/components/IconButton/IconButton.styles.js.map +1 -0
- package/es/components/IconButton/IconButton.styles_12iyaye.css +2 -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 +5 -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 +19 -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 +46 -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 +46 -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 +11 -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 +40 -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 +40 -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 +4 -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 +39 -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 +33 -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 +39 -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 +33 -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 +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,uBAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,uBAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,uBAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,uBAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,uBAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,uBAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,uBAAO,CADPM,mBAAmB,CAAA;;AAGvB;AACA;AACA;AACO,IAAMC,cAAc,gBAAGC,gBAAU,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,Q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C,QAAE,CAAChH,mBAAmB,EAAE2D,gBAAgB,CAAA;AAAE,GAAE,CAC3D,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,uBAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,uBAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,uBAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,uBAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,uBAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,uBAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,uBAAO,CADPM,mBAAmB,CAAA;;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AAA,CAAAC,aAAA,CAACwB,iCAAW,EAAA;AAACpB,IAAAA,SAAS,EAAE5G,mBAAoB;AAACiI,IAAAA,OAAO,EAAEjH,EAAAA;AAAG,GAAA,EACpDT,KACQ,CAChB,eACDgG,KAAA,CAAAC,aAAA,CAAC0B,iCAAW,EAAA;AAACpH,IAAAA,IAAI,EAAC,GAAG;AAAC8F,IAAAA,SAAS,EAAEC,QAAE,CAAChH,mBAAmB,EAAE2D,gBAAgB,CAAA;AAAE,GAAE,CAC3D,CAAC,CAAA;AAE/B,CACJ;;;;"}
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
var getDrawers = function getDrawers(items) {
|
9
9
|
return items.filter(function (item) {
|
10
10
|
var _item$info;
|
11
|
-
return item === null || item === void 0
|
11
|
+
return item === null || item === void 0 || (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isDrawer;
|
12
12
|
});
|
13
13
|
};
|
14
14
|
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);}
|
@@ -5,16 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
6
|
var React = require('react');
|
7
7
|
var plasmaCore = require('@salutejs/plasma-core');
|
8
|
-
var index$1 = require('../../utils/index.js');
|
9
8
|
var base = require('./variations/_view/base.js');
|
10
9
|
var base$1 = require('./variations/_size/base.js');
|
11
10
|
var Dropdown_styles = require('./Dropdown.styles.js');
|
12
11
|
var index = require('./utils/index.js');
|
13
|
-
var Dropdown_tokens = require('./Dropdown.tokens.js');
|
14
|
-
var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
|
15
|
-
|
16
|
-
var _excluded = ["id", "target", "children", "hasArrow", "view", "size", "frame", "onToggle", "className", "isFocusTrapped", "isOpen", "role", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
17
12
|
|
13
|
+
var _excluded = ["id", "target", "children", "hasArrow", "role", "view", "size", "frame", "onToggle", "isFocusTrapped", "isOpen", "placement", "trigger", "offset", "preventOverflow", "closeOnOverlayClick", "closeOnEsc"];
|
18
14
|
/**
|
19
15
|
* Выпадающий список без внешнего контроля видимости.
|
20
16
|
*/
|
@@ -24,17 +20,15 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
24
20
|
target = _ref.target,
|
25
21
|
children = _ref.children,
|
26
22
|
hasArrow = _ref.hasArrow,
|
23
|
+
role = _ref.role,
|
27
24
|
view = _ref.view,
|
28
25
|
size = _ref.size,
|
29
26
|
frame = _ref.frame,
|
30
27
|
_onToggle = _ref.onToggle,
|
31
|
-
className = _ref.className,
|
32
28
|
_ref$isFocusTrapped = _ref.isFocusTrapped,
|
33
29
|
isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
|
34
30
|
_ref$isOpen = _ref.isOpen,
|
35
31
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
36
|
-
_ref$role = _ref.role,
|
37
|
-
role = _ref$role === void 0 ? 'listbox' : _ref$role,
|
38
32
|
_ref$placement = _ref.placement,
|
39
33
|
placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
|
40
34
|
_ref$trigger = _ref.trigger,
|
@@ -52,24 +46,9 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
52
46
|
var innerId = id || uniqId;
|
53
47
|
var rootRef = React.useRef(null);
|
54
48
|
var dropdownRef = React.useRef(null);
|
55
|
-
var itemsRefs = React.useRef([]);
|
56
49
|
var handleRef = plasmaCore.useForkRef(rootRef, outerRootRef);
|
57
50
|
var trapRef = plasmaCore.useFocusTrap(isOpen && isFocusTrapped);
|
58
51
|
var dropdownForkRef = plasmaCore.useForkRef(dropdownRef, trapRef);
|
59
|
-
var _useKeyNavigation = useKeyboardNavigation.useKeyNavigation({
|
60
|
-
itemsRefs: itemsRefs,
|
61
|
-
opened: isOpen,
|
62
|
-
updateOpened: _onToggle
|
63
|
-
}),
|
64
|
-
onKeyDownTarget = _useKeyNavigation.onKeyDownTarget;
|
65
|
-
var childrenArray = React.useMemo(function () {
|
66
|
-
return React.Children.toArray(children);
|
67
|
-
}, [children]);
|
68
|
-
var childrenMemo = React.useMemo(function () {
|
69
|
-
return index.getChildren(childrenArray, {
|
70
|
-
childrenRefs: itemsRefs
|
71
|
-
});
|
72
|
-
}, [childrenArray, isOpen]);
|
73
52
|
return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
|
74
53
|
role: role,
|
75
54
|
isOpen: isOpen,
|
@@ -88,14 +67,12 @@ var dropdownRoot = function dropdownRoot(Root) {
|
|
88
67
|
closeOnOverlayClick: closeOnOverlayClick,
|
89
68
|
closeOnEsc: closeOnEsc,
|
90
69
|
isFocusTrapped: isFocusTrapped,
|
91
|
-
frame: frame
|
92
|
-
onKeyDown: onKeyDownTarget
|
70
|
+
frame: frame
|
93
71
|
}, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
94
|
-
className: index$1.cx(className, Dropdown_tokens.classes.dropdownRoot),
|
95
72
|
ref: handleRef,
|
96
73
|
view: view,
|
97
74
|
size: size
|
98
|
-
}, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledDropdown, null,
|
75
|
+
}, rest), /*#__PURE__*/React.createElement(Dropdown_styles.StyledDropdown, null, children)));
|
99
76
|
});
|
100
77
|
};
|
101
78
|
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,gBAAU,CACN,UAAAC,IAAA,EAqB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QAAQ,EAAEA,QAAS;AACnBW,MAAAA,SAAS,EAAEgC,mBAAa,CAAChC,SAAS,CAAE;AACpCE,MAAAA,OAAO,EAAEA,OAAQ;AACjBM,MAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,MAAAA,UAAU,EAAEA,UAAW;AACvBd,MAAAA,cAAc,EAAEA,cAAe;AAC/BH,MAAAA,KAAK,EAAEA,KAAAA;AAAM,KAAA,eAEbgC,KAAA,CAAAC,aAAA,CAAC5C,IAAI,EAAAmD,iCAAA,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,8BAAc,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,SAAAA;KACR;AACDlD,IAAAA,IAAI,EAAE;AACFiD,MAAAA,GAAG,EAAEE,WAAAA;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,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GAPvBA,SAOuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAEM,IAAMC,cAAc,gBAAGJ,YAAM,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,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CAAsC;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;;;;;"}
|
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,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BAAA;AAChB;;;;;"}
|
@@ -12,7 +12,7 @@ var base = require('./variations/_view/base.js');
|
|
12
12
|
var base$1 = require('./variations/_size/base.js');
|
13
13
|
var DropdownItem_styles = require('./DropdownItem.styles.js');
|
14
14
|
|
15
|
-
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "
|
15
|
+
var _excluded = ["id", "className", "children", "text", "isSelected", "name", "checked", "value", "role", "view", "size", "disabled", "contentLeft", "contentRight", "onSelect", "onClick", "onChange"];
|
16
16
|
/**
|
17
17
|
* Элемент выпадающего списка
|
18
18
|
*/
|
@@ -26,11 +26,10 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
26
26
|
name = _ref.name,
|
27
27
|
checked = _ref.checked,
|
28
28
|
value = _ref.value,
|
29
|
+
role = _ref.role,
|
29
30
|
view = _ref.view,
|
30
31
|
size = _ref.size,
|
31
32
|
disabled = _ref.disabled,
|
32
|
-
_ref$role = _ref.role,
|
33
|
-
role = _ref$role === void 0 ? 'option' : _ref$role,
|
34
33
|
ContentLeftComponent = _ref.contentLeft,
|
35
34
|
ContentRightComponent = _ref.contentRight,
|
36
35
|
onSelect = _ref.onSelect,
|
@@ -45,7 +44,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
45
44
|
if (disabled) {
|
46
45
|
return;
|
47
46
|
}
|
48
|
-
onClick === null || onClick === void 0
|
47
|
+
onClick === null || onClick === void 0 || onClick(event);
|
49
48
|
if (onSelect && !ContentLeftComponent) {
|
50
49
|
onSelect(value, text);
|
51
50
|
}
|
@@ -54,7 +53,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
54
53
|
if (disabled) {
|
55
54
|
return;
|
56
55
|
}
|
57
|
-
onChange === null || onChange === void 0
|
56
|
+
onChange === null || onChange === void 0 || onChange(event);
|
58
57
|
if (onSelect && ContentLeftComponent) {
|
59
58
|
onSelect(value, text);
|
60
59
|
}
|
@@ -64,7 +63,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
64
63
|
value: value,
|
65
64
|
checked: checked || isSelected,
|
66
65
|
disabled: disabled,
|
67
|
-
tabIndex:
|
66
|
+
tabIndex: 0
|
68
67
|
}, !disabled && {
|
69
68
|
onChange: handleOnChange
|
70
69
|
});
|
@@ -84,7 +83,6 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
|
|
84
83
|
ref: outerRootRef,
|
85
84
|
tabIndex: 0,
|
86
85
|
"aria-disabled": disabled,
|
87
|
-
"aria-selected": isSelected,
|
88
86
|
onClick: handleOnClick,
|
89
87
|
"data-value": value
|
90
88
|
}, rest), text ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownItem_styles.StyledContentLeft, null, ContentLeftComponent && ContentLeft), /*#__PURE__*/React.createElement(DropdownItem_styles.StyledText, null, text), /*#__PURE__*/React.createElement(DropdownItem_styles.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,gBAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA,IAAA,IApBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAA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T,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -33,50 +33,7 @@ var getValidComponent = function getValidComponent(element, props) {
|
|
33
33
|
}
|
34
34
|
return element;
|
35
35
|
};
|
36
|
-
var getChildren = function getChildren(children, externalProps) {
|
37
|
-
if (externalProps.childrenRefs) {
|
38
|
-
externalProps.childrenRefs.current = [];
|
39
|
-
}
|
40
|
-
var res = React.Children.map(children || [], function (child) {
|
41
|
-
var hasValue = ('value' in (child === null || child === void 0 ? void 0 : child.props));
|
42
|
-
var hasTarget = ('target' in (child === null || child === void 0 ? void 0 : child.props));
|
43
|
-
if (! /*#__PURE__*/React.isValidElement(child) || !hasValue && !hasTarget) {
|
44
|
-
return child;
|
45
|
-
}
|
46
|
-
if (hasTarget) {
|
47
|
-
var _ref = child === null || child === void 0 ? void 0 : child.props,
|
48
|
-
target = _ref.target;
|
49
|
-
if (! /*#__PURE__*/React.isValidElement(target)) {
|
50
|
-
return child;
|
51
|
-
}
|
52
|
-
var targetProps = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, target === null || target === void 0 ? void 0 : target.props), {}, {
|
53
|
-
ref: function ref(element) {
|
54
|
-
var _externalProps$childr;
|
55
|
-
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr = externalProps.childrenRefs) !== null && _externalProps$childr !== void 0 && _externalProps$childr.current && element) {
|
56
|
-
externalProps.childrenRefs.current.push(element);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
});
|
60
|
-
var updatedTarget = /*#__PURE__*/React.cloneElement(target, targetProps);
|
61
|
-
var updatedProps = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
62
|
-
target: updatedTarget
|
63
|
-
});
|
64
|
-
return /*#__PURE__*/React.cloneElement(child, updatedProps);
|
65
|
-
}
|
66
|
-
var props = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, child === null || child === void 0 ? void 0 : child.props), {}, {
|
67
|
-
ref: function ref(element) {
|
68
|
-
var _externalProps$childr2;
|
69
|
-
if (externalProps !== null && externalProps !== void 0 && (_externalProps$childr2 = externalProps.childrenRefs) !== null && _externalProps$childr2 !== void 0 && _externalProps$childr2.current && element) {
|
70
|
-
externalProps.childrenRefs.current.push(element);
|
71
|
-
}
|
72
|
-
}
|
73
|
-
});
|
74
|
-
return /*#__PURE__*/React.cloneElement(child, props);
|
75
|
-
});
|
76
|
-
return res;
|
77
|
-
};
|
78
36
|
|
79
|
-
exports.getChildren = getChildren;
|
80
37
|
exports.getPlacement = getPlacement;
|
81
38
|
exports.getPlacements = getPlacements;
|
82
39
|
exports.getValidComponent = getValidComponent;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Dropdown/utils/index.tsx"],"sourcesContent":["import React, {
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Dropdown/utils/index.tsx"],"sourcesContent":["import React, { ElementType, ReactNode, cloneElement, isValidElement } from 'react';\n\nimport type { PopoverPlacementBasic } from '../../Popover';\nimport type { DropdownPlacement, DropdownPlacementBasic } from '../Dropdown.types';\n\nexport const getPlacement = (placement: DropdownPlacement) => {\n return `${placement}-start` as PopoverPlacementBasic;\n};\n\nexport const getPlacements = (placements?: DropdownPlacement | DropdownPlacementBasic[]) => {\n if (!placements) {\n return;\n }\n const isArray = Array.isArray(placements);\n\n if (!isArray) {\n return getPlacement(placements as DropdownPlacement);\n }\n return ((placements || []) as DropdownPlacementBasic[]).map((placement) => getPlacement(placement));\n};\n\nconst isReactObject = (element: any): element is ElementType => {\n return typeof element === 'object' || typeof element === 'function';\n};\n\nexport const getValidComponent = (element: ElementType | ReactNode, props: object) => {\n if (isValidElement(element)) {\n return cloneElement(element, props);\n }\n\n if (isReactObject(element)) {\n const Component = element;\n\n return <Component {...props} />;\n }\n\n return element;\n};\n"],"names":["getPlacement","placement","concat","getPlacements","placements","isArray","Array","map","isReactObject","element","_typeof","getValidComponent","props","isValidElement","cloneElement","Component","React","createElement"],"mappings":";;;;;;;IAKaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,SAA4B,EAAK;EAC1D,OAAAC,EAAAA,CAAAA,MAAA,CAAUD,SAAS,EAAA,QAAA,CAAA,CAAA;AACvB,EAAC;IAEYE,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,UAAyD,EAAK;EACxF,IAAI,CAACA,UAAU,EAAE;AACb,IAAA,OAAA;AACJ,GAAA;AACA,EAAA,IAAMC,OAAO,GAAGC,KAAK,CAACD,OAAO,CAACD,UAAU,CAAC,CAAA;EAEzC,IAAI,CAACC,OAAO,EAAE;IACV,OAAOL,YAAY,CAACI,UAA+B,CAAC,CAAA;AACxD,GAAA;EACA,OAAO,CAAEA,UAAU,IAAI,EAAE,EAA+BG,GAAG,CAAC,UAACN,SAAS,EAAA;IAAA,OAAKD,YAAY,CAACC,SAAS,CAAC,CAAA;GAAC,CAAA,CAAA;AACvG,EAAC;AAED,IAAMO,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,OAAY,EAA6B;EAC5D,OAAOC,gCAAA,CAAOD,OAAO,CAAA,KAAK,QAAQ,IAAI,OAAOA,OAAO,KAAK,UAAU,CAAA;AACvE,CAAC,CAAA;AAEM,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIF,OAAgC,EAAEG,KAAa,EAAK;AAClF,EAAA,kBAAIC,oBAAc,CAACJ,OAAO,CAAC,EAAE;AACzB,IAAA,oBAAOK,kBAAY,CAACL,OAAO,EAAEG,KAAK,CAAC,CAAA;AACvC,GAAA;AAEA,EAAA,IAAIJ,aAAa,CAACC,OAAO,CAAC,EAAE;IACxB,IAAMM,SAAS,GAAGN,OAAO,CAAA;AAEzB,IAAA,oBAAOO,KAAA,CAAAC,aAAA,CAACF,SAAS,EAAKH,KAAQ,CAAC,CAAA;AACnC,GAAA;AAEA,EAAA,OAAOH,OAAO,CAAA;AAClB;;;;;;"}
|