@salutejs/plasma-new-hope 0.77.0-canary.1185.8720575745.0 → 0.77.0-canary.1195.8808345201.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/cjs/components/Avatar/Avatar.js +28 -3
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/cjs/components/Calendar/hoc/withRange.js +1 -1
- package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
- package/cjs/components/Calendar/hooks/useKeyNavigation.js +19 -19
- package/cjs/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/cjs/components/Chip/Chip.js +2 -2
- package/cjs/components/Chip/Chip.js.map +1 -1
- package/cjs/components/Combobox/Combobox.css +2 -2
- package/cjs/components/Combobox/Combobox.js +5 -5
- package/cjs/components/Combobox/Combobox.js.map +1 -1
- package/cjs/components/Combobox/hooks/useFocusController.js +9 -9
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
- package/cjs/components/Drawer/DrawerContext.js +1 -1
- package/cjs/components/Drawer/DrawerContext.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.css +2 -2
- package/cjs/components/Dropdown/Dropdown.js +4 -27
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/utils/index.js +0 -43
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/IconButton/IconButton.css +27 -0
- package/cjs/components/IconButton/IconButton.js +84 -0
- package/cjs/components/IconButton/IconButton.js.map +1 -0
- package/cjs/components/IconButton/IconButton.styles.js +27 -0
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -0
- package/cjs/components/IconButton/IconButton.styles_gh8fim.css +4 -0
- package/cjs/components/IconButton/IconButton.tokens.js +36 -0
- package/cjs/components/IconButton/IconButton.tokens.js.map +1 -0
- package/cjs/components/IconButton/variations/_disabled/base.js +9 -0
- package/cjs/components/IconButton/variations/_disabled/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_focused/base.js +9 -0
- package/cjs/components/IconButton/variations/_focused/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_focused/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_size/base.js +9 -0
- package/cjs/components/IconButton/variations/_size/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_size/base_x642ct.css +1 -0
- package/cjs/components/IconButton/variations/_view/base.js +9 -0
- package/cjs/components/IconButton/variations/_view/base.js.map +1 -0
- package/cjs/components/IconButton/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/Modal/ModalContext.js +1 -1
- package/cjs/components/Modal/ModalContext.js.map +1 -1
- package/cjs/components/Overlay/Overlay.js +1 -1
- package/cjs/components/Overlay/Overlay.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +2 -2
- package/cjs/components/Pagination/Pagination.js +2 -2
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/cjs/components/Popover/Popover.js +7 -7
- package/cjs/components/Popover/Popover.js.map +1 -1
- package/cjs/components/Popup/Popup.js +1 -1
- package/cjs/components/Popup/Popup.js.map +1 -1
- package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
- package/cjs/components/Select/Select.css +2 -2
- package/cjs/components/Select/Select.js +5 -5
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
- package/cjs/components/Select/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/cjs/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/cjs/components/Select/utils/index.js +2 -2
- package/cjs/components/Select/utils/index.js.map +1 -1
- package/cjs/components/Tabs/TabsContext.js +1 -2
- package/cjs/components/Tabs/TabsContext.js.map +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +1 -1
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextField/TextField.js +2 -2
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/cjs/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/cjs/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.js +1 -1
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/index.css +7 -2
- package/cjs/index.js +6 -2
- package/cjs/index.js.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/es/components/Avatar/Avatar.js +29 -4
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
- package/es/components/Calendar/hoc/withRange.js +1 -1
- package/es/components/Calendar/hoc/withRange.js.map +1 -1
- package/es/components/Calendar/hooks/useKeyNavigation.js +19 -19
- package/es/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
- package/es/components/Chip/Chip.js +2 -2
- package/es/components/Chip/Chip.js.map +1 -1
- package/es/components/Combobox/Combobox.css +2 -2
- package/es/components/Combobox/Combobox.js +5 -5
- package/es/components/Combobox/Combobox.js.map +1 -1
- package/es/components/Combobox/hooks/useFocusController.js +9 -9
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
- package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
- package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
- package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
- package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
- package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
- package/es/components/Drawer/DrawerContext.js +1 -1
- package/es/components/Drawer/DrawerContext.js.map +1 -1
- package/es/components/Dropdown/Dropdown.css +2 -2
- package/es/components/Dropdown/Dropdown.js +6 -29
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
- package/es/components/Dropdown/Dropdown.tokens.js +0 -1
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/utils/index.js +3 -45
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/IconButton/IconButton.css +27 -0
- package/es/components/IconButton/IconButton.js +79 -0
- package/es/components/IconButton/IconButton.js.map +1 -0
- package/es/components/IconButton/IconButton.styles.js +22 -0
- package/es/components/IconButton/IconButton.styles.js.map +1 -0
- package/es/components/IconButton/IconButton.styles_gh8fim.css +4 -0
- package/es/components/IconButton/IconButton.tokens.js +31 -0
- package/es/components/IconButton/IconButton.tokens.js.map +1 -0
- package/es/components/IconButton/variations/_disabled/base.js +5 -0
- package/es/components/IconButton/variations/_disabled/base.js.map +1 -0
- package/es/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_focused/base.js +5 -0
- package/es/components/IconButton/variations/_focused/base.js.map +1 -0
- package/es/components/IconButton/variations/_focused/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_size/base.js +5 -0
- package/es/components/IconButton/variations/_size/base.js.map +1 -0
- package/es/components/IconButton/variations/_size/base_x642ct.css +1 -0
- package/es/components/IconButton/variations/_view/base.js +5 -0
- package/es/components/IconButton/variations/_view/base.js.map +1 -0
- package/es/components/IconButton/variations/_view/base_x642ct.css +1 -0
- package/es/components/Modal/ModalContext.js +1 -1
- package/es/components/Modal/ModalContext.js.map +1 -1
- package/es/components/Overlay/Overlay.js +1 -1
- package/es/components/Overlay/Overlay.js.map +1 -1
- package/es/components/Pagination/Pagination.css +2 -2
- package/es/components/Pagination/Pagination.js +2 -2
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
- package/es/components/Popover/Popover.js +7 -7
- package/es/components/Popover/Popover.js.map +1 -1
- package/es/components/Popup/Popup.js +1 -1
- package/es/components/Popup/Popup.js.map +1 -1
- package/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/es/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
- package/es/components/Select/Select.css +2 -2
- package/es/components/Select/Select.js +5 -5
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/hooks/useKeyNavigation.js +12 -12
- package/es/components/Select/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/es/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
- package/es/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
- package/es/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
- package/es/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
- package/es/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
- package/es/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
- package/es/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
- package/es/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
- package/es/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.css +2 -2
- package/es/components/Select/ui/SelectItem/SelectItem.js +1 -1
- package/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
- package/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
- package/es/components/Select/utils/index.js +2 -2
- package/es/components/Select/utils/index.js.map +1 -1
- package/es/components/Tabs/TabsContext.js +1 -2
- package/es/components/Tabs/TabsContext.js.map +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
- package/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextField/TextField.js +2 -2
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
- package/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/es/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
- package/es/components/Tooltip/Tooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js.map +1 -1
- package/es/index.css +7 -2
- package/es/index.js +2 -1
- package/es/index.js.map +1 -1
- package/package.json +12 -12
- package/styled-components/cjs/components/Avatar/Avatar.js +34 -4
- package/styled-components/cjs/components/Avatar/Avatar.styles.js +1 -1
- package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +52 -2
- package/styled-components/cjs/components/AvatarGroup/AvatarGroup.js +1 -1
- package/styled-components/cjs/components/Badge/Badge.js +1 -1
- package/styled-components/cjs/components/Badge/Badge.styles.js +1 -1
- package/styled-components/cjs/components/Button/Button.js +2 -2
- package/styled-components/cjs/components/Button/Button.styles.js +1 -1
- package/styled-components/cjs/components/ButtonGroup/ButtonGroup.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -2
- package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -2
- package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
- package/styled-components/cjs/components/Calendar/hoc/withRange.js +2 -2
- package/styled-components/cjs/components/Calendar/hooks/useKeyNavigation.js +20 -20
- package/styled-components/cjs/components/Calendar/store/reducer.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.js +1 -1
- package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
- package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -2
- package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -2
- package/styled-components/cjs/components/Cell/Cell.js +1 -1
- package/styled-components/cjs/components/Cell/Cell.styles.js +1 -1
- package/styled-components/cjs/components/Checkbox/Checkbox.js +1 -1
- package/styled-components/cjs/components/Chip/Chip.js +3 -3
- package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
- package/styled-components/cjs/components/Combobox/Combobox.js +6 -6
- package/styled-components/cjs/components/Combobox/hooks/useFocusController.js +9 -9
- package/styled-components/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +2 -2
- package/styled-components/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +7 -7
- package/styled-components/cjs/components/Counter/Counter.js +1 -1
- package/styled-components/cjs/components/Divider/Divider.js +2 -2
- package/styled-components/cjs/components/Drawer/Drawer.js +1 -1
- package/styled-components/cjs/components/Drawer/DrawerContext.js +1 -1
- package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
- package/styled-components/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.js +7 -29
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
- package/styled-components/cjs/components/Dropdown/index.js +1 -9
- package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +1 -1
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +7 -9
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
- package/styled-components/cjs/components/Dropdown/utils/index.js +2 -49
- package/styled-components/cjs/components/Grid/Grid.js +2 -2
- package/styled-components/cjs/components/Grid/ui/Col/Col.js +2 -2
- package/styled-components/cjs/components/Grid/ui/Row/Row.js +1 -1
- package/styled-components/cjs/components/Grid/utils/index.js +1 -1
- package/styled-components/cjs/components/Header/HeaderRoot/HeaderRoot.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderLogo/HeaderLogo.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderTitleWrapper/HeaderTitleWrapper.js +1 -1
- package/styled-components/cjs/components/IconButton/IconButton.js +86 -0
- package/styled-components/cjs/components/IconButton/IconButton.styles.js +29 -0
- package/styled-components/cjs/components/IconButton/IconButton.tokens.js +34 -0
- package/styled-components/cjs/components/IconButton/IconButton.types.js +5 -0
- package/styled-components/cjs/components/IconButton/index.js +31 -0
- package/styled-components/cjs/components/IconButton/variations/_disabled/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_disabled/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_focused/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_focused/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_size/tokens.json +1 -0
- package/styled-components/cjs/components/IconButton/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/IconButton/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/Image/Image.js +2 -2
- package/styled-components/cjs/components/Image/Image.styles.js +1 -1
- package/styled-components/cjs/components/Indicator/Indicator.js +1 -1
- package/styled-components/cjs/components/Link/Link.js +1 -1
- package/styled-components/cjs/components/Modal/Modal.js +1 -1
- package/styled-components/cjs/components/Modal/ModalContext.js +1 -1
- package/styled-components/cjs/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.js +1 -1
- package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
- package/styled-components/cjs/components/Notification/NotificationsStore.js +1 -1
- package/styled-components/cjs/components/Overlay/Overlay.js +2 -2
- package/styled-components/cjs/components/Pagination/Pagination.js +3 -3
- package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +2 -2
- package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
- package/styled-components/cjs/components/Panel/Panel.js +2 -2
- package/styled-components/cjs/components/Panel/ui/PanelContent/PanelContent.js +1 -1
- package/styled-components/cjs/components/Panel/ui/PanelFooter/PanelFooter.js +1 -1
- package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -1
- package/styled-components/cjs/components/Popover/Popover.js +9 -9
- package/styled-components/cjs/components/Popup/Popup.js +2 -2
- package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
- package/styled-components/cjs/components/Popup/PopupRoot.js +1 -1
- package/styled-components/cjs/components/Popup/hooks/usePopup.js +1 -1
- package/styled-components/cjs/components/Progress/Progress.js +1 -1
- package/styled-components/cjs/components/Progress/Progress.styles.js +1 -1
- package/styled-components/cjs/components/Radiobox/Radiobox.js +1 -1
- package/styled-components/cjs/components/SSRProvider/SSRProvider.js +1 -1
- package/styled-components/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +1 -1
- package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +3 -3
- package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +1 -1
- package/styled-components/cjs/components/Select/Select.js +6 -6
- package/styled-components/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
- package/styled-components/cjs/components/Select/ui/SelectChip/SelectChip.js +2 -2
- package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +3 -3
- package/styled-components/cjs/components/Select/utils/index.js +3 -3
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +1 -1
- package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -1
- package/styled-components/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +1 -1
- package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -2
- package/styled-components/cjs/components/Skeleton/hoc/withSkeleton.js +1 -1
- package/styled-components/cjs/components/Spinner/Spinner.js +1 -1
- package/styled-components/cjs/components/Spinner/Spinner.styles.js +1 -1
- package/styled-components/cjs/components/Spinner/utils/index.js +1 -1
- package/styled-components/cjs/components/Switch/Switch.js +1 -1
- package/styled-components/cjs/components/Tabs/TabsContext.js +2 -3
- package/styled-components/cjs/components/Tabs/createTabsController.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -2
- package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.styles.js +1 -1
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +3 -3
- package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +1 -1
- package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
- package/styled-components/cjs/components/TextField/TextField.js +3 -3
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +2 -2
- package/styled-components/cjs/components/Toast/Toast.js +2 -2
- package/styled-components/cjs/components/Toast/Toast.styles.js +1 -1
- package/styled-components/cjs/components/Toast/ToastController.js +2 -2
- package/styled-components/cjs/components/Toast/ToastProvider/ToastProvider.js +3 -3
- package/styled-components/cjs/components/Toolbar/Toolbar.js +1 -1
- package/styled-components/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/styled-components/cjs/components/Tooltip/Tooltip.js +2 -2
- package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.js +2 -2
- package/styled-components/cjs/components/Typography/Old/TypographyOld.js +2 -2
- package/styled-components/cjs/components/Typography/Typography.js +2 -2
- package/styled-components/cjs/engines/common.js +1 -1
- package/styled-components/cjs/engines/styled-components.js +1 -1
- package/styled-components/cjs/examples/_helpers.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.config.js +45 -0
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/cjs/examples/plasma_web/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.config.js +45 -0
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/cjs/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
- package/styled-components/cjs/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/cjs/mixins/applySpacing.js +1 -1
- package/styled-components/cjs/mixins/typography.js +1 -1
- package/styled-components/es/components/Avatar/Avatar.js +34 -3
- package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +52 -2
- package/styled-components/es/components/Button/Button.js +1 -1
- package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
- package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
- package/styled-components/es/components/Calendar/hoc/withRange.js +1 -1
- package/styled-components/es/components/Calendar/hooks/useKeyNavigation.js +20 -20
- package/styled-components/es/components/Calendar/store/reducer.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
- package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
- package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
- package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
- package/styled-components/es/components/Chip/Chip.js +2 -2
- package/styled-components/es/components/Combobox/Combobox.js +5 -5
- package/styled-components/es/components/Combobox/hooks/useFocusController.js +9 -9
- package/styled-components/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
- package/styled-components/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
- package/styled-components/es/components/Divider/Divider.js +1 -1
- package/styled-components/es/components/Drawer/DrawerContext.js +1 -1
- package/styled-components/es/components/Drawer/hooks/useDrawer.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
- package/styled-components/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +6 -29
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +0 -1
- package/styled-components/es/components/Dropdown/index.js +0 -1
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -8
- package/styled-components/es/components/Dropdown/utils/index.js +1 -48
- package/styled-components/es/components/Grid/Grid.js +1 -1
- package/styled-components/es/components/Grid/ui/Col/Col.js +1 -1
- package/styled-components/es/components/Grid/utils/index.js +1 -1
- package/styled-components/es/components/IconButton/IconButton.js +77 -0
- package/styled-components/es/components/IconButton/IconButton.styles.js +22 -0
- package/styled-components/es/components/IconButton/IconButton.tokens.js +28 -0
- package/styled-components/es/components/IconButton/IconButton.types.js +1 -0
- package/styled-components/es/components/IconButton/index.js +2 -0
- package/styled-components/es/components/IconButton/variations/_disabled/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_disabled/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_focused/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_focused/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_size/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_size/tokens.json +1 -0
- package/styled-components/es/components/IconButton/variations/_view/base.js +2 -0
- package/styled-components/es/components/IconButton/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/Image/Image.js +1 -1
- package/styled-components/es/components/Modal/ModalContext.js +1 -1
- package/styled-components/es/components/Modal/hooks/useModal.js +1 -1
- package/styled-components/es/components/Notification/NotificationsStore.js +1 -1
- package/styled-components/es/components/Overlay/Overlay.js +1 -1
- package/styled-components/es/components/Pagination/Pagination.js +2 -2
- package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
- package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
- package/styled-components/es/components/Panel/Panel.js +1 -1
- package/styled-components/es/components/Popover/Popover.js +8 -8
- package/styled-components/es/components/Popup/Popup.js +1 -1
- package/styled-components/es/components/Popup/hooks/usePopup.js +1 -1
- package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
- package/styled-components/es/components/Select/Select.js +5 -5
- package/styled-components/es/components/Select/hooks/useKeyNavigation.js +12 -12
- package/styled-components/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
- package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
- package/styled-components/es/components/Select/utils/index.js +3 -3
- package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -1
- package/styled-components/es/components/Skeleton/hoc/withSkeleton.js +1 -1
- package/styled-components/es/components/Spinner/utils/index.js +1 -1
- package/styled-components/es/components/Tabs/TabsContext.js +2 -3
- package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
- package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
- package/styled-components/es/components/TextArea/TextArea.js +1 -1
- package/styled-components/es/components/TextField/TextField.js +2 -2
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +9 -9
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
- package/styled-components/es/components/Toast/Toast.js +1 -1
- package/styled-components/es/components/Toast/ToastController.js +1 -1
- package/styled-components/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
- package/styled-components/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/styled-components/es/components/Tooltip/Tooltip.js +1 -1
- package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.js +1 -1
- package/styled-components/es/components/Typography/Old/TypographyOld.js +1 -1
- package/styled-components/es/components/Typography/Typography.js +1 -1
- package/styled-components/es/engines/common.js +1 -1
- package/styled-components/es/examples/_helpers.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
- package/styled-components/es/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.config.js +39 -0
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
- package/styled-components/es/examples/plasma_web/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.config.js +39 -0
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.js +5 -0
- package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
- package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
- package/styled-components/es/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
- package/styled-components/es/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
- package/styled-components/es/index.js +1 -0
- package/styled-components/es/mixins/applySpacing.js +1 -1
- package/styled-components/es/mixins/typography.js +1 -1
- package/types/components/Avatar/Avatar.d.ts +3 -1
- package/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/components/Avatar/Avatar.types.d.ts +7 -0
- package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +2 -7
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +0 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/utils/index.d.ts +2 -5
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/IconButton/IconButton.d.ts +30 -0
- package/types/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.styles.d.ts +21 -0
- package/types/components/IconButton/IconButton.styles.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.tokens.d.ts +29 -0
- package/types/components/IconButton/IconButton.tokens.d.ts.map +1 -0
- package/types/components/IconButton/IconButton.types.d.ts +13 -0
- package/types/components/IconButton/IconButton.types.d.ts.map +1 -0
- package/types/components/IconButton/index.d.ts +4 -0
- package/types/components/IconButton/index.d.ts.map +1 -0
- package/types/components/IconButton/variations/_disabled/base.d.ts +2 -0
- package/types/components/IconButton/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_focused/base.d.ts +2 -0
- package/types/components/IconButton/variations/_focused/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_size/base.d.ts +2 -0
- package/types/components/IconButton/variations/_size/base.d.ts.map +1 -0
- package/types/components/IconButton/variations/_view/base.d.ts +2 -0
- package/types/components/IconButton/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +2 -0
- package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts +38 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +32 -0
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +2 -0
- package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts +38 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +32 -0
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts +1 -0
- package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -81
- package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -76
- package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
- package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -83
- package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -77
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +0 -13
- package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +0 -1
@@ -0,0 +1,27 @@
|
|
1
|
+
.base_x95x4p_b1ty39ru__349bf40b{color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.base_x95x4p_b1ty39ru__349bf40b:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.base_x95x4p_b1ty39ru__349bf40b:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}
|
2
|
+
|
3
|
+
.base_1alzrso_be0ha5g__cdc67255{height:var(--plasma-button-height);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);}
|
4
|
+
|
5
|
+
.base_1t3ywu_b169l30m__aba40ddd[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.base_1t3ywu_b169l30m__aba40ddd[disabled]:hover,.base_1t3ywu_b169l30m__aba40ddd[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}
|
6
|
+
|
7
|
+
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
8
|
+
|
9
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
10
|
+
|
11
|
+
.Button_styles_uqvh6u_bzw1898__b7cda4d5{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_uqvh6u_bzw1898__b7cda4d5{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_buttonSquare__b7cda4d5{width:var(--plasma-button-height);padding:0;}
|
12
|
+
.Button_styles_uqvh6u_bdfuqwe__b7cda4d5{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:last-child){margin-right:0.375rem;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:first-child){margin-left:0.375rem;}
|
13
|
+
.Button_styles_uqvh6u_l9ypozh__b7cda4d5{opacity:var(--l9ypozh-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-align-items:inherit;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-pack:inherit;-webkit-justify-content:inherit;-ms-flex-pack:inherit;justify-content:inherit;height:100%;}
|
14
|
+
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
15
|
+
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
16
|
+
|
17
|
+
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
18
|
+
|
19
|
+
.base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
|
20
|
+
|
21
|
+
.Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
22
|
+
.Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
|
23
|
+
|
24
|
+
.IconButton_styles_gh8fim_b1ua728l__7324c12e.IconButton_styles_gh8fim_b1ua728l__7324c12e.IconButton_styles_gh8fim_iconButtonItem__7324c12e{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
25
|
+
.IconButton_styles_gh8fim_i5roq7j__7324c12e{--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}
|
26
|
+
.IconButton_styles_gh8fim_lhwest8__7324c12e{position:absolute;}
|
27
|
+
.IconButton_styles_gh8fim_sudin8m__7324c12e{--plasma-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-spinner-color:var(--plasma-icon-button-spinner-color);}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
var index = require('../../utils/index.js');
|
8
|
+
var IconButton_styles = require('./IconButton.styles.js');
|
9
|
+
var IconButton_tokens = require('./IconButton.tokens.js');
|
10
|
+
var base = require('./variations/_view/base.js');
|
11
|
+
var base$1 = require('./variations/_size/base.js');
|
12
|
+
var base$2 = require('./variations/_disabled/base.js');
|
13
|
+
var base$3 = require('./variations/_focused/base.js');
|
14
|
+
|
15
|
+
var _excluded = ["children", "view", "size", "icon", "isLoading", "loader", "pin", "disabled", "focused", "outlined", "className", "style"];
|
16
|
+
var iconButtonRoot = function iconButtonRoot(Root) {
|
17
|
+
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
18
|
+
var children = props.children,
|
19
|
+
view = props.view,
|
20
|
+
size = props.size,
|
21
|
+
icon = props.icon,
|
22
|
+
isLoading = props.isLoading,
|
23
|
+
loader = props.loader,
|
24
|
+
pin = props.pin,
|
25
|
+
disabled = props.disabled,
|
26
|
+
focused = props.focused,
|
27
|
+
outlined = props.outlined,
|
28
|
+
className = props.className,
|
29
|
+
style = props.style,
|
30
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(props, _excluded);
|
31
|
+
return /*#__PURE__*/React.createElement(Root, {
|
32
|
+
view: view,
|
33
|
+
size: size,
|
34
|
+
focused: focused,
|
35
|
+
disabled: disabled,
|
36
|
+
className: IconButton_tokens.classes.iconButtonItem
|
37
|
+
}, /*#__PURE__*/React.createElement(IconButton_styles.IconButtonStyled, _rollupPluginBabelHelpers.extends({
|
38
|
+
view: view,
|
39
|
+
size: size,
|
40
|
+
loader: loader,
|
41
|
+
isLoading: isLoading,
|
42
|
+
pin: pin,
|
43
|
+
disabled: disabled,
|
44
|
+
focused: focused,
|
45
|
+
outlined: outlined,
|
46
|
+
ref: ref,
|
47
|
+
square: true // Временное решение
|
48
|
+
,
|
49
|
+
stretching: "fixed" // Не работает не понятное почему
|
50
|
+
,
|
51
|
+
className: index.cx(className),
|
52
|
+
style: style
|
53
|
+
}, rest), icon || children));
|
54
|
+
});
|
55
|
+
};
|
56
|
+
var iconButtonConfig = {
|
57
|
+
name: 'Button',
|
58
|
+
tag: 'div',
|
59
|
+
layout: iconButtonRoot,
|
60
|
+
base: IconButton_styles.base,
|
61
|
+
variations: {
|
62
|
+
view: {
|
63
|
+
css: base.base
|
64
|
+
},
|
65
|
+
size: {
|
66
|
+
css: base$1.base
|
67
|
+
},
|
68
|
+
disabled: {
|
69
|
+
css: base$2.base,
|
70
|
+
attrs: true
|
71
|
+
},
|
72
|
+
focused: {
|
73
|
+
css: base$3.base
|
74
|
+
}
|
75
|
+
},
|
76
|
+
defaults: {
|
77
|
+
view: 'secondary',
|
78
|
+
size: 'm'
|
79
|
+
}
|
80
|
+
};
|
81
|
+
|
82
|
+
exports.iconButtonConfig = iconButtonConfig;
|
83
|
+
exports.iconButtonRoot = iconButtonRoot;
|
84
|
+
//# sourceMappingURL=IconButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport { base, IconButtonStyled } from './IconButton.styles';\nimport type { IconButtonProps } from './IconButton.types';\nimport { classes } from './IconButton.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\n\nexport const iconButtonRoot = (Root: RootProps<HTMLButtonElement, IconButtonProps>) =>\n forwardRef<HTMLButtonElement, IconButtonProps>((props, ref) => {\n const {\n children,\n view,\n size,\n icon,\n isLoading,\n loader,\n pin,\n disabled,\n focused,\n outlined,\n className,\n style,\n ...rest\n } = props;\n\n return (\n <Root view={view} size={size} focused={focused} disabled={disabled} className={classes.iconButtonItem}>\n <IconButtonStyled\n view={view}\n size={size}\n loader={loader}\n isLoading={isLoading}\n pin={pin}\n disabled={disabled}\n focused={focused}\n outlined={outlined}\n ref={ref}\n square // Временное решение\n stretching=\"fixed\" // Не работает не понятное почему\n className={cx(className)}\n style={style}\n {...rest}\n >\n {icon || children}\n </IconButtonStyled>\n </Root>\n );\n });\n\nexport const iconButtonConfig = {\n name: 'Button',\n tag: 'div',\n layout: iconButtonRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n view: 'secondary',\n size: 'm',\n },\n};\n"],"names":["iconButtonRoot","Root","forwardRef","props","ref","children","view","size","icon","isLoading","loader","pin","disabled","focused","outlined","className","style","rest","_objectWithoutProperties","_excluded","React","createElement","classes","iconButtonItem","IconButtonStyled","_extends","square","stretching","cx","iconButtonConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","disabledCSS","attrs","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;;IAaaA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAmD,EAAA;AAAA,EAAA,oBAC9EC,gBAAU,CAAqC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAC3D,IAAA,IACIC,QAAQ,GAaRF,KAAK,CAbLE,QAAQ;MACRC,IAAI,GAYJH,KAAK,CAZLG,IAAI;MACJC,IAAI,GAWJJ,KAAK,CAXLI,IAAI;MACJC,IAAI,GAUJL,KAAK,CAVLK,IAAI;MACJC,SAAS,GASTN,KAAK,CATLM,SAAS;MACTC,MAAM,GAQNP,KAAK,CARLO,MAAM;MACNC,GAAG,GAOHR,KAAK,CAPLQ,GAAG;MACHC,QAAQ,GAMRT,KAAK,CANLS,QAAQ;MACRC,OAAO,GAKPV,KAAK,CALLU,OAAO;MACPC,QAAQ,GAIRX,KAAK,CAJLW,QAAQ;MACRC,SAAS,GAGTZ,KAAK,CAHLY,SAAS;MACTC,KAAK,GAELb,KAAK,CAFLa,KAAK;AACFC,MAAAA,IAAI,GAAAC,iDAAA,CACPf,KAAK,EAAAgB,SAAA,CAAA,CAAA;AAET,IAAA,oBACIC,KAAA,CAAAC,aAAA,CAACpB,IAAI,EAAA;AAACK,MAAAA,IAAI,EAAEA,IAAK;AAACC,MAAAA,IAAI,EAAEA,IAAK;AAACM,MAAAA,OAAO,EAAEA,OAAQ;AAACD,MAAAA,QAAQ,EAAEA,QAAS;MAACG,SAAS,EAAEO,yBAAO,CAACC,cAAAA;AAAe,KAAA,eAClGH,KAAA,CAAAC,aAAA,CAACG,kCAAgB,EAAAC,iCAAA,CAAA;AACbnB,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,IAAI,EAAEA,IAAK;AAC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: true });
|
5
|
+
|
6
|
+
var react = require('@linaria/react');
|
7
|
+
require('@linaria/core');
|
8
|
+
var common = require('../../engines/common.js');
|
9
|
+
var Button$1 = require('../Button/Button.js');
|
10
|
+
require('react');
|
11
|
+
require('@salutejs/plasma-core');
|
12
|
+
|
13
|
+
var mergedConfig = /*#__PURE__*/common.mergeConfig(Button$1.buttonConfig);
|
14
|
+
var Button = /*#__PURE__*/common.component(mergedConfig);
|
15
|
+
var base = "b1ua728l";
|
16
|
+
var _exp2 = function _exp2() {
|
17
|
+
return Button;
|
18
|
+
};
|
19
|
+
var IconButtonStyled = /*#__PURE__*/react.styled(_exp2())({
|
20
|
+
name: "IconButtonStyled",
|
21
|
+
"class": "i5roq7j",
|
22
|
+
propsAsIs: true
|
23
|
+
});
|
24
|
+
|
25
|
+
exports.IconButtonStyled = IconButtonStyled;
|
26
|
+
exports.base = base;
|
27
|
+
//# sourceMappingURL=IconButton.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconButton.styles.js","sources":["../../../src/components/IconButton/IconButton.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component, mergeConfig } from '../../engines';\nimport { buttonConfig, buttonTokens } from '../Button';\nimport { spinnerConfig, spinnerTokens } from '../Spinner';\n\nimport { tokens, classes } from './IconButton.tokens';\n\n// issue #823\nconst mergedConfigSpiner = mergeConfig(spinnerConfig);\nconst Spinner = component(mergedConfigSpiner);\n\nconst mergedConfig = mergeConfig(buttonConfig);\nconst Button = component(mergedConfig);\n\nexport const base = css`\n &&.${classes.iconButtonItem} {\n display: inline-flex;\n }\n`;\n\nexport const IconButtonStyled = styled(Button)`\n ${buttonTokens.buttonColor}: var(${tokens.iconButtonColor});\n ${buttonTokens.buttonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n\n ${buttonTokens.buttonColorHover}: var(${tokens.iconButtonColorHover});\n ${buttonTokens.buttonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n\n ${buttonTokens.buttonColorActive}: var(${tokens.iconButtonColorActive});\n ${buttonTokens.buttonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n\n\n ${buttonTokens.buttonFontFamily}: var(${tokens.iconButtonFontFamily});\n ${buttonTokens.buttonFontSize}: var(${tokens.iconButtonFontSize});\n ${buttonTokens.buttonFontStyle}: var(${tokens.iconButtonFontStyle});\n ${buttonTokens.buttonFontWeight}:var(${tokens.iconButtonFontWeight});\n ${buttonTokens.buttonLetterSpacing}: var(${tokens.iconButtonLetterSpacing});\n ${buttonTokens.buttonLineHeight}: var(${tokens.iconButtonLineHeight});\n\n ${buttonTokens.buttonWidth}: var(${tokens.iconButtonWidth});\n ${buttonTokens.buttonHeight}: var(${tokens.iconButtonHeight});\n ${buttonTokens.buttonRadius}: var(${tokens.iconButtonRadius});\n\n ${buttonTokens.buttonDisabledOpacity}: var(${tokens.iconButtonDisabledOpacity});\n ${buttonTokens.buttonFocusColor}: var(${tokens.iconButtonFocusColor});\n\n ${buttonTokens.buttonSpinnerSize}: var(${tokens.iconButtonSpinnerSize});\n ${buttonTokens.buttonSpinnerColor}: var(${tokens.iconButtonSpinnerColor});\n`;\n\nexport const Loader = styled.div`\n position: absolute;\n`;\n\nexport const StyledSpinner = styled(Spinner)`\n ${spinnerTokens.size}: var(${tokens.iconButtonSpinnerSize});\n ${spinnerTokens.color}: var(${tokens.iconButtonSpinnerColor});\n`;\n"],"names":["mergedConfig","mergeConfig","buttonConfig","Button","component","base","_exp2","IconButtonStyled","styled","name","class","propsAsIs"],"mappings":";;;;;;;;;;;AAaA,IAAMA,YAAY,gBAAGC,kBAAW,CAACC,qBAAY,CAAC,CAAA;AAC9C,IAAMC,MAAM,gBAAGC,gBAAS,CAACJ,YAAY,CAAC,CAAA;AAE/B,IAAMK,IAAI,GAIhB,WAAA;AAAC,IAAAC,KAAA,GAnBgBA,SAmBhBA,KAAAA,GAAA;AAAA,EAAA,OAEqCH,MAAM,CAAA;AAAA,CAAA,CAAA;AAAtC,IAAMI,gBAAgB,gBAAGC,YAAM,CAAAF,KAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CA2BrC;;;;;"}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
.b1ua728l.b1ua728l.icon-button-item{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
|
2
|
+
.i5roq7j{--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}
|
3
|
+
.lhwest8{position:absolute;}
|
4
|
+
.sudin8m{--plasma-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-spinner-color:var(--plasma-icon-button-spinner-color);}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var classes = {
|
6
|
+
iconButtonItem: 'icon-button-item'
|
7
|
+
};
|
8
|
+
var tokens = {
|
9
|
+
iconButtonColor: '--plasma-icon-button-color',
|
10
|
+
iconButtonBackgroundColor: '--plasma-icon-button-background-color',
|
11
|
+
iconButtonColorHover: '--plasma-icon-button-color-hover',
|
12
|
+
iconButtonBackgroundColorHover: '--plasma-icon-button-background-color-hover',
|
13
|
+
iconButtonColorActive: '--plasma-icon-button-color-active',
|
14
|
+
iconButtonBackgroundColorActive: '--plasma-icon-button-background-color-active',
|
15
|
+
iconButtonScaleHover: '--plasma-icon-button-scale-hover',
|
16
|
+
iconButtonScaleActive: '---plasma-icon-button-scale-active',
|
17
|
+
iconButtonHeight: '--plasma-icon-button-height',
|
18
|
+
iconButtonWidth: '--plasma-icon-button-width',
|
19
|
+
iconButtonPadding: '--plasma-icon-button-padding',
|
20
|
+
iconButtonRadius: '--plasma-icon-button-radius',
|
21
|
+
iconButtonRadiusCircle: '--plasma-icon-button-radius-circle',
|
22
|
+
iconButtonFontFamily: '--plasma-icon-button-font-family',
|
23
|
+
iconButtonFontSize: '--plasma-icon-button-font-size',
|
24
|
+
iconButtonFontStyle: '--plasma-icon-button-font-style',
|
25
|
+
iconButtonFontWeight: '--plasma-icon-button-font-weight',
|
26
|
+
iconButtonLetterSpacing: '--plasma-icon-button-letter-spacing',
|
27
|
+
iconButtonLineHeight: '--plasma-icon-button-line-height',
|
28
|
+
iconButtonDisabledOpacity: '--plasma-icon-button-disabled-opacity',
|
29
|
+
iconButtonFocusColor: '--plasma-icon-button-focus-color',
|
30
|
+
iconButtonSpinnerColor: '--plasma-icon-button-spinner-color',
|
31
|
+
iconButtonSpinnerSize: '--plasma-icon-button-spinner-size'
|
32
|
+
};
|
33
|
+
|
34
|
+
exports.classes = classes;
|
35
|
+
exports.tokens = tokens;
|
36
|
+
//# sourceMappingURL=IconButton.tokens.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconButton.tokens.js","sources":["../../../src/components/IconButton/IconButton.tokens.ts"],"sourcesContent":["export const classes = {\n iconButtonItem: 'icon-button-item',\n};\n\nexport const tokens = {\n iconButtonColor: '--plasma-icon-button-color',\n iconButtonBackgroundColor: '--plasma-icon-button-background-color',\n iconButtonColorHover: '--plasma-icon-button-color-hover',\n iconButtonBackgroundColorHover: '--plasma-icon-button-background-color-hover',\n iconButtonColorActive: '--plasma-icon-button-color-active',\n iconButtonBackgroundColorActive: '--plasma-icon-button-background-color-active',\n\n iconButtonScaleHover: '--plasma-icon-button-scale-hover',\n iconButtonScaleActive: '---plasma-icon-button-scale-active',\n iconButtonHeight: '--plasma-icon-button-height',\n iconButtonWidth: '--plasma-icon-button-width',\n iconButtonPadding: '--plasma-icon-button-padding',\n iconButtonRadius: '--plasma-icon-button-radius',\n iconButtonRadiusCircle: '--plasma-icon-button-radius-circle',\n\n iconButtonFontFamily: '--plasma-icon-button-font-family',\n iconButtonFontSize: '--plasma-icon-button-font-size',\n iconButtonFontStyle: '--plasma-icon-button-font-style',\n iconButtonFontWeight: '--plasma-icon-button-font-weight',\n iconButtonLetterSpacing: '--plasma-icon-button-letter-spacing',\n iconButtonLineHeight: '--plasma-icon-button-line-height',\n\n iconButtonDisabledOpacity: '--plasma-icon-button-disabled-opacity',\n iconButtonFocusColor: '--plasma-icon-button-focus-color',\n\n iconButtonSpinnerColor: '--plasma-icon-button-spinner-color',\n iconButtonSpinnerSize: '--plasma-icon-button-spinner-size',\n};\n"],"names":["classes","iconButtonItem","tokens","iconButtonColor","iconButtonBackgroundColor","iconButtonColorHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonBackgroundColorActive","iconButtonScaleHover","iconButtonScaleActive","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonRadiusCircle","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","iconButtonDisabledOpacity","iconButtonFocusColor","iconButtonSpinnerColor","iconButtonSpinnerSize"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,cAAc,EAAE,kBAAA;AACpB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,eAAe,EAAE,4BAA4B;AAC7CC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,8BAA8B,EAAE,6CAA6C;AAC7EC,EAAAA,qBAAqB,EAAE,mCAAmC;AAC1DC,EAAAA,+BAA+B,EAAE,8CAA8C;AAE/EC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,qBAAqB,EAAE,oCAAoC;AAC3DC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,eAAe,EAAE,4BAA4B;AAC7CC,EAAAA,iBAAiB,EAAE,8BAA8B;AACjDC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,sBAAsB,EAAE,oCAAoC;AAE5DC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,kBAAkB,EAAE,gCAAgC;AACpDC,EAAAA,mBAAmB,EAAE,iCAAiC;AACtDC,EAAAA,oBAAoB,EAAE,kCAAkC;AACxDC,EAAAA,uBAAuB,EAAE,qCAAqC;AAC9DC,EAAAA,oBAAoB,EAAE,kCAAkC;AAExDC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,oBAAoB,EAAE,kCAAkC;AAExDC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,qBAAqB,EAAE,mCAAA;AAC3B;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/IconButton/variations/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/IconButton/variations/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/IconButton/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/IconButton/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
var getModals = function getModals(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.isModal;
|
12
12
|
});
|
13
13
|
};
|
14
14
|
var hasModals = function hasModals(items) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface ModalInfo extends PopupInfo {\n id: string;\n info?: {\n isModal?: true;\n };\n}\n\n/**\n * Взаимодействие с модальными оконами.\n */\nconst getModals = (items: ModalInfo[]) => {\n return items.filter((item: ModalInfo) => item?.info?.isModal);\n};\n\nexport const hasModals = (items: ModalInfo[]) => {\n return getModals(items).length > 0;\n};\n\nexport const getIdLastModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[modals.length - 1].id;\n};\n\nexport const getIdFirstModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[0].id;\n};\n"],"names":["getModals","items","filter","item","_item$info","info","isModal","hasModals","length","getIdLastModal","modals","id"],"mappings":";;;;AASA;AACA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAIC,KAAkB,EAAK;AACtC,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAe,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,
|
1
|
+
{"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface ModalInfo extends PopupInfo {\n id: string;\n info?: {\n isModal?: true;\n };\n}\n\n/**\n * Взаимодействие с модальными оконами.\n */\nconst getModals = (items: ModalInfo[]) => {\n return items.filter((item: ModalInfo) => item?.info?.isModal);\n};\n\nexport const hasModals = (items: ModalInfo[]) => {\n return getModals(items).length > 0;\n};\n\nexport const getIdLastModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[modals.length - 1].id;\n};\n\nexport const getIdFirstModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[0].id;\n};\n"],"names":["getModals","items","filter","item","_item$info","info","isModal","hasModals","length","getIdLastModal","modals","id"],"mappings":";;;;AASA;AACA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAIC,KAAkB,EAAK;AACtC,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAe,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,OAAO,CAAA;GAAC,CAAA,CAAA;AACjE,CAAC,CAAA;IAEYC,SAAS,GAAG,SAAZA,SAASA,CAAIN,KAAkB,EAAK;AAC7C,EAAA,OAAOD,SAAS,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACtC,EAAC;IAEYC,cAAc,GAAG,SAAjBA,cAAcA,CAAIR,KAAkB,EAAK;AAClD,EAAA,IAAMS,MAAM,GAAGV,SAAS,CAACC,KAAK,CAAC,CAAA;AAC/B,EAAA,IAAI,CAACS,MAAM,CAACF,MAAM,EAAE;AAChB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,MAAM,CAACA,MAAM,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACvC;;;;;"}
|
@@ -25,7 +25,7 @@ var Overlay = function Overlay(_ref) {
|
|
25
25
|
if (!isClickable) {
|
26
26
|
return;
|
27
27
|
}
|
28
|
-
onOverlayClick === null || onOverlayClick === void 0
|
28
|
+
onOverlayClick === null || onOverlayClick === void 0 || onOverlayClick(event);
|
29
29
|
}, [isClickable, onOverlayClick]);
|
30
30
|
return /*#__PURE__*/React.createElement(Overlay_styles.StyledOverlay, _rollupPluginBabelHelpers.extends({
|
31
31
|
className: className,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Overlay.js","sources":["../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport type { FC, MouseEvent } from 'react';\n\nimport type { OverlayProps } from './Overlay.types';\nimport { StyledOverlay } from './Overlay.styles';\n\n/**\n * Overlay - подложка для всплывающих компонент (Modal, Toast и т.д.).\n */\nexport const Overlay: FC<OverlayProps> = ({\n withBlur,\n className,\n backgroundColorProperty,\n onOverlayClick,\n zIndex,\n transparent,\n isClickable = true,\n ...rest\n}) => {\n const handleOverlayClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!isClickable) {\n return;\n }\n\n onOverlayClick?.(event);\n },\n [isClickable, onOverlayClick],\n );\n\n return (\n <StyledOverlay\n className={className}\n backgroundColorToken={backgroundColorProperty}\n transparent={transparent}\n clickable={isClickable}\n onClick={handleOverlayClick}\n zIndex={zIndex}\n withBlur={withBlur}\n {...rest}\n />\n );\n};\n"],"names":["Overlay","_ref","withBlur","className","backgroundColorProperty","onOverlayClick","zIndex","transparent","_ref$isClickable","isClickable","rest","_objectWithoutProperties","_excluded","handleOverlayClick","useCallback","event","React","createElement","StyledOverlay","_extends","backgroundColorToken","clickable","onClick"],"mappings":";;;;;;;;;;AAMA;AACA;AACA;IACaA,OAAyB,GAAG,SAA5BA,OAAyBA,CAAAC,IAAA,EAShC;AAAA,EAAA,IARFC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,uBAAuB,GAAAH,IAAA,CAAvBG,uBAAuB;IACvBC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,gBAAA,GAAAP,IAAA,CACXQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;AACfE,IAAAA,IAAI,GAAAC,iDAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,IAAMC,kBAAkB,GAAGC,iBAAW,CAClC,UAACC,KAAiC,EAAK;IACnC,IAAI,CAACN,WAAW,EAAE;AACd,MAAA,OAAA;AACJ,KAAA;AAEAJ,IAAAA,cAAc,aAAdA,cAAc,KAAA,KAAA,CAAA,
|
1
|
+
{"version":3,"file":"Overlay.js","sources":["../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport type { FC, MouseEvent } from 'react';\n\nimport type { OverlayProps } from './Overlay.types';\nimport { StyledOverlay } from './Overlay.styles';\n\n/**\n * Overlay - подложка для всплывающих компонент (Modal, Toast и т.д.).\n */\nexport const Overlay: FC<OverlayProps> = ({\n withBlur,\n className,\n backgroundColorProperty,\n onOverlayClick,\n zIndex,\n transparent,\n isClickable = true,\n ...rest\n}) => {\n const handleOverlayClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!isClickable) {\n return;\n }\n\n onOverlayClick?.(event);\n },\n [isClickable, onOverlayClick],\n );\n\n return (\n <StyledOverlay\n className={className}\n backgroundColorToken={backgroundColorProperty}\n transparent={transparent}\n clickable={isClickable}\n onClick={handleOverlayClick}\n zIndex={zIndex}\n withBlur={withBlur}\n {...rest}\n />\n );\n};\n"],"names":["Overlay","_ref","withBlur","className","backgroundColorProperty","onOverlayClick","zIndex","transparent","_ref$isClickable","isClickable","rest","_objectWithoutProperties","_excluded","handleOverlayClick","useCallback","event","React","createElement","StyledOverlay","_extends","backgroundColorToken","clickable","onClick"],"mappings":";;;;;;;;;;AAMA;AACA;AACA;IACaA,OAAyB,GAAG,SAA5BA,OAAyBA,CAAAC,IAAA,EAShC;AAAA,EAAA,IARFC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,uBAAuB,GAAAH,IAAA,CAAvBG,uBAAuB;IACvBC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,gBAAA,GAAAP,IAAA,CACXQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;AACfE,IAAAA,IAAI,GAAAC,iDAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,IAAMC,kBAAkB,GAAGC,iBAAW,CAClC,UAACC,KAAiC,EAAK;IACnC,IAAI,CAACN,WAAW,EAAE;AACd,MAAA,OAAA;AACJ,KAAA;AAEAJ,IAAAA,cAAc,aAAdA,cAAc,KAAA,KAAA,CAAA,IAAdA,cAAc,CAAGU,KAAK,CAAC,CAAA;AAC3B,GAAC,EACD,CAACN,WAAW,EAAEJ,cAAc,CAChC,CAAC,CAAA;AAED,EAAA,oBACIW,KAAA,CAAAC,aAAA,CAACC,4BAAa,EAAAC,iCAAA,CAAA;AACVhB,IAAAA,SAAS,EAAEA,SAAU;AACrBiB,IAAAA,oBAAoB,EAAEhB,uBAAwB;AAC9CG,IAAAA,WAAW,EAAEA,WAAY;AACzBc,IAAAA,SAAS,EAAEZ,WAAY;AACvBa,IAAAA,OAAO,EAAET,kBAAmB;AAC5BP,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,QAAQ,EAAEA,QAAAA;GACNQ,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
|
@@ -65,8 +65,8 @@
|
|
65
65
|
.Select_styles_1q3i6gw_svro45w__08f2a797{display:block;}.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverRoot__08f2a797,.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverTarget__08f2a797{width:var(--svro45w-0);}
|
66
66
|
.Select_styles_1q3i6gw_sgpldc9__08f2a797{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.Select_styles_1q3i6gw_sgpldc9__08f2a797:hover:not(:disabled) + .Select_styles_1q3i6gw_popoverWrapper__08f2a797 .Select_styles_1q3i6gw_selectTarget__08f2a797{background:var(--plasma-select-target-background-color-hover);}.Select_styles_1q3i6gw_sgpldc9__08f2a797:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
67
67
|
|
68
|
-
.
|
69
|
-
.
|
68
|
+
.Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
|
69
|
+
.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);}
|
70
70
|
|
71
71
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
72
72
|
|
@@ -94,12 +94,12 @@ var paginationRoot = function paginationRoot(Root) {
|
|
94
94
|
return;
|
95
95
|
}
|
96
96
|
setPageValue(pageValue);
|
97
|
-
onChangePageValue === null || onChangePageValue === void 0
|
97
|
+
onChangePageValue === null || onChangePageValue === void 0 || onChangePageValue(pageValue);
|
98
98
|
};
|
99
99
|
var handlerSetPerPage = function handlerSetPerPage(newPerPageValue) {
|
100
100
|
handlerSetPage(1);
|
101
101
|
setPerPageValue(newPerPageValue);
|
102
|
-
onChangePerPageValue === null || onChangePerPageValue === void 0
|
102
|
+
onChangePerPageValue === null || onChangePerPageValue === void 0 || onChangePerPageValue(newPerPageValue);
|
103
103
|
handlerSetPages(newPerPageValue);
|
104
104
|
};
|
105
105
|
var isActiveButton = function isActiveButton(checkPage) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\n\nimport { cx, isNumber } from '../../utils';\nimport { RootProps } from '../../engines';\n\nimport {\n PaginationPages,\n PaginationActions,\n PaginationButton,\n PaginationSection,\n PaginationButtonGroup,\n PaginationRoot,\n PaginationShorter,\n} from './Pagination.styles';\nimport type { PaginationProps } from './Pagination.types';\nimport { getSections, defaultValues } from './utils';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as typeCSS } from './variations/_type/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes } from './Pagination.tokens';\nimport { PaginationQuickJumpToPage } from './ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage';\nimport { PaginationSelectPerPage } from './ui/PaginationSelectPerPage/PaginationSelectPerPage';\n\nexport const paginationRoot = (Root: RootProps<HTMLDivElement, PaginationProps>) =>\n forwardRef<HTMLDivElement, PaginationProps>(\n (\n {\n value = defaultValues.value,\n perPage,\n slots = defaultValues.slots,\n\n view,\n viewCurrentPage,\n type = defaultValues.type,\n size,\n pilled = defaultValues.pilled,\n square = defaultValues.square,\n disabledPages = defaultValues.disabledPages,\n\n count = defaultValues.value,\n\n hasQuickJump = defaultValues.hasQuickJump,\n hasPerPage = defaultValues.hasPerPage,\n perPageList = defaultValues.perPageList,\n isCommonButtonStyles = defaultValues.isCommonButtonStyles,\n\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n textPerPage = defaultValues.textPerPage,\n\n leftContent,\n rightContent,\n\n onChangePageValue,\n onChangePerPageValue,\n ...rest\n },\n ref,\n ) => {\n const [page, setPageValue] = useState<number>(1);\n const [perPageValue, setPerPageValue] = useState(perPage);\n const [pages, setPagesValue] = useState<number>(value);\n const [sections, setSections] = useState<number[][] | null>(null);\n\n const typeClass = classes[`${type}Type` as keyof typeof classes];\n const roundedClass = pilled ? 'circle-circle' : 'square-square';\n\n const withHasPerPageSelect = hasPerPage ? classes.withHasPerPageSelect : undefined;\n const withHasQuickJump = hasQuickJump ? classes.withHasQuickJump : undefined;\n\n const disabled = disabledPages.map((el) => (isNumber(el) ? Number(el) : null));\n\n const handlerSetPages = (newPerPage?: number) => {\n setPagesValue(Math.ceil(count / (newPerPage || (hasPerPage ? defaultValues.perPage : 1))));\n };\n\n const handlerSetPage = (newPageValue?: number) => {\n let pageValue = newPageValue ?? defaultValues.value;\n if (pageValue > pages) {\n pageValue = pages;\n }\n if (pageValue < 1) {\n pageValue = 1;\n }\n if (disabled.includes(pageValue)) {\n return;\n }\n setPageValue(pageValue);\n onChangePageValue?.(pageValue);\n };\n\n const handlerSetPerPage = (newPerPageValue?: number) => {\n handlerSetPage(1);\n setPerPageValue(newPerPageValue);\n onChangePerPageValue?.(newPerPageValue);\n\n handlerSetPages(newPerPageValue);\n };\n\n const isActiveButton = (checkPage: number) => {\n return page === checkPage ? classes.paginationPageButtonActive : '';\n };\n\n useEffect(() => {\n handlerSetPages(perPage);\n }, [perPage, count, handlerSetPages]);\n\n useEffect(() => {\n handlerSetPage(value);\n }, [value]);\n\n useEffect(() => {\n setSections(getSections(page, pages, slots));\n }, [page, slots, pages, setSections, getSections]);\n\n return (\n <Root\n size={size}\n view={view}\n viewCurrentPage={viewCurrentPage}\n className={cx(classes.wrapper, typeClass)}\n ref={ref}\n {...rest}\n >\n <PaginationRoot className={typeClass}>\n <PaginationPages>\n {leftContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {leftContent}\n </PaginationButtonGroup>\n )}\n {sections &&\n sections.map((section, indexSection) => (\n <>\n {indexSection !== 0 && (\n <PaginationShorter stretching=\"fixed\" disabled>\n ...\n </PaginationShorter>\n )}\n <PaginationSection key={indexSection}>\n {section.map((pageValue) => (\n <PaginationButton\n square={square}\n pin={roundedClass}\n key={pageValue}\n onClick={() => handlerSetPage(pageValue)}\n disabled={disabled.includes(pageValue)}\n className={cx(\n classes.paginationPageButton,\n isActiveButton(pageValue),\n )}\n >\n {pageValue}\n </PaginationButton>\n ))}\n </PaginationSection>\n </>\n ))}\n {rightContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {rightContent}\n </PaginationButtonGroup>\n )}\n </PaginationPages>\n <PaginationActions\n className={cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)}\n >\n {hasQuickJump && (\n <PaginationQuickJumpToPage\n placeholderQuickJump={placeholderQuickJump}\n textQuickJump={textQuickJump}\n onChangeValue={handlerSetPage}\n />\n )}\n {hasPerPage && (\n <PaginationSelectPerPage\n textPerPage={textPerPage}\n value={perPageValue}\n valuesList={perPageList}\n onChangeValue={handlerSetPerPage}\n />\n )}\n </PaginationActions>\n </PaginationRoot>\n </Root>\n );\n },\n );\n\nexport const paginationConfig = {\n name: 'Pagination',\n tag: 'div',\n layout: paginationRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n type: {\n css: typeCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'm',\n },\n};\n"],"names":["paginationRoot","Root","forwardRef","_ref","ref","_ref$value","value","defaultValues","perPage","_ref$slots","slots","view","viewCurrentPage","_ref$type","type","size","_ref$pilled","pilled","_ref$square","square","_ref$disabledPages","disabledPages","_ref$count","count","_ref$hasQuickJump","hasQuickJump","_ref$hasPerPage","hasPerPage","_ref$perPageList","perPageList","_ref$isCommonButtonSt","isCommonButtonStyles","_ref$placeholderQuick","placeholderQuickJump","_ref$textQuickJump","textQuickJump","_ref$textPerPage","textPerPage","leftContent","rightContent","onChangePageValue","onChangePerPageValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","page","setPageValue","_useState3","_useState4","perPageValue","setPerPageValue","_useState5","_useState6","pages","setPagesValue","_useState7","_useState8","sections","setSections","typeClass","classes","concat","roundedClass","withHasPerPageSelect","undefined","withHasQuickJump","disabled","map","el","isNumber","Number","handlerSetPages","newPerPage","Math","ceil","handlerSetPage","newPageValue","pageValue","includes","handlerSetPerPage","newPerPageValue","isActiveButton","checkPage","paginationPageButtonActive","useEffect","getSections","React","createElement","_extends","className","cx","wrapper","PaginationRoot","PaginationPages","PaginationButtonGroup","section","indexSection","Fragment","_PaginationShorter","PaginationShorter","stretching","PaginationSection","key","PaginationButton","pin","onClick","paginationPageButton","PaginationActions","actions","PaginationQuickJumpToPage","onChangeValue","PaginationSelectPerPage","valuesList","paginationConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","typeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;IAuBaA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBAC3EC,gBAAU,CACN,UAAAC,IAAA,EAgCIC,GAAG,EACF;AAAA,IAAA,IAAAC,UAAA,GAAAF,IAAA,CA/BGG,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACD,KAAK,GAAAD,UAAA;MAC3BG,OAAO,GAAAL,IAAA,CAAPK,OAAO;MAAAC,UAAA,GAAAN,IAAA,CACPO,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGF,mBAAa,CAACG,KAAK,GAAAD,UAAA;MAE3BE,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,eAAe,GAAAT,IAAA,CAAfS,eAAe;MAAAC,SAAA,GAAAV,IAAA,CACfW,IAAI;AAAJA,MAAAA,IAAI,GAAAD,SAAA,KAAA,KAAA,CAAA,GAAGN,mBAAa,CAACO,IAAI,GAAAD,SAAA;MACzBE,IAAI,GAAAZ,IAAA,CAAJY,IAAI;MAAAC,WAAA,GAAAb,IAAA,CACJc,MAAM;AAANA,MAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGT,mBAAa,CAACU,MAAM,GAAAD,WAAA;MAAAE,WAAA,GAAAf,IAAA,CAC7BgB,MAA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EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR/G,IAAAA,IAAI,EAAE;AACFgH,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD/G,IAAAA,IAAI,EAAE;AACF6G,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpH,IAAAA,IAAI,EAAE,OAAO;AACbI,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"Pagination.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\n\nimport { cx, isNumber } from '../../utils';\nimport { RootProps } from '../../engines';\n\nimport {\n PaginationPages,\n PaginationActions,\n PaginationButton,\n PaginationSection,\n PaginationButtonGroup,\n PaginationRoot,\n PaginationShorter,\n} from './Pagination.styles';\nimport type { PaginationProps } from './Pagination.types';\nimport { getSections, defaultValues } from './utils';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as typeCSS } from './variations/_type/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes } from './Pagination.tokens';\nimport { PaginationQuickJumpToPage } from './ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage';\nimport { PaginationSelectPerPage } from './ui/PaginationSelectPerPage/PaginationSelectPerPage';\n\nexport const paginationRoot = (Root: RootProps<HTMLDivElement, PaginationProps>) =>\n forwardRef<HTMLDivElement, PaginationProps>(\n (\n {\n value = defaultValues.value,\n perPage,\n slots = defaultValues.slots,\n\n view,\n viewCurrentPage,\n type = defaultValues.type,\n size,\n pilled = defaultValues.pilled,\n square = defaultValues.square,\n disabledPages = defaultValues.disabledPages,\n\n count = defaultValues.value,\n\n hasQuickJump = defaultValues.hasQuickJump,\n hasPerPage = defaultValues.hasPerPage,\n perPageList = defaultValues.perPageList,\n isCommonButtonStyles = defaultValues.isCommonButtonStyles,\n\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n textPerPage = defaultValues.textPerPage,\n\n leftContent,\n rightContent,\n\n onChangePageValue,\n onChangePerPageValue,\n ...rest\n },\n ref,\n ) => {\n const [page, setPageValue] = useState<number>(1);\n const [perPageValue, setPerPageValue] = useState(perPage);\n const [pages, setPagesValue] = useState<number>(value);\n const [sections, setSections] = useState<number[][] | null>(null);\n\n const typeClass = classes[`${type}Type` as keyof typeof classes];\n const roundedClass = pilled ? 'circle-circle' : 'square-square';\n\n const withHasPerPageSelect = hasPerPage ? classes.withHasPerPageSelect : undefined;\n const withHasQuickJump = hasQuickJump ? classes.withHasQuickJump : undefined;\n\n const disabled = disabledPages.map((el) => (isNumber(el) ? Number(el) : null));\n\n const handlerSetPages = (newPerPage?: number) => {\n setPagesValue(Math.ceil(count / (newPerPage || (hasPerPage ? defaultValues.perPage : 1))));\n };\n\n const handlerSetPage = (newPageValue?: number) => {\n let pageValue = newPageValue ?? defaultValues.value;\n if (pageValue > pages) {\n pageValue = pages;\n }\n if (pageValue < 1) {\n pageValue = 1;\n }\n if (disabled.includes(pageValue)) {\n return;\n }\n setPageValue(pageValue);\n onChangePageValue?.(pageValue);\n };\n\n const handlerSetPerPage = (newPerPageValue?: number) => {\n handlerSetPage(1);\n setPerPageValue(newPerPageValue);\n onChangePerPageValue?.(newPerPageValue);\n\n handlerSetPages(newPerPageValue);\n };\n\n const isActiveButton = (checkPage: number) => {\n return page === checkPage ? classes.paginationPageButtonActive : '';\n };\n\n useEffect(() => {\n handlerSetPages(perPage);\n }, [perPage, count, handlerSetPages]);\n\n useEffect(() => {\n handlerSetPage(value);\n }, [value]);\n\n useEffect(() => {\n setSections(getSections(page, pages, slots));\n }, [page, slots, pages, setSections, getSections]);\n\n return (\n <Root\n size={size}\n view={view}\n viewCurrentPage={viewCurrentPage}\n className={cx(classes.wrapper, typeClass)}\n ref={ref}\n {...rest}\n >\n <PaginationRoot className={typeClass}>\n <PaginationPages>\n {leftContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {leftContent}\n </PaginationButtonGroup>\n )}\n {sections &&\n sections.map((section, indexSection) => (\n <>\n {indexSection !== 0 && (\n <PaginationShorter stretching=\"fixed\" disabled>\n ...\n </PaginationShorter>\n )}\n <PaginationSection key={indexSection}>\n {section.map((pageValue) => (\n <PaginationButton\n square={square}\n pin={roundedClass}\n key={pageValue}\n onClick={() => handlerSetPage(pageValue)}\n disabled={disabled.includes(pageValue)}\n className={cx(\n classes.paginationPageButton,\n isActiveButton(pageValue),\n )}\n >\n {pageValue}\n </PaginationButton>\n ))}\n </PaginationSection>\n </>\n ))}\n {rightContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {rightContent}\n </PaginationButtonGroup>\n )}\n </PaginationPages>\n <PaginationActions\n className={cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)}\n >\n {hasQuickJump && (\n <PaginationQuickJumpToPage\n placeholderQuickJump={placeholderQuickJump}\n textQuickJump={textQuickJump}\n onChangeValue={handlerSetPage}\n />\n )}\n {hasPerPage && (\n <PaginationSelectPerPage\n textPerPage={textPerPage}\n value={perPageValue}\n valuesList={perPageList}\n onChangeValue={handlerSetPerPage}\n />\n )}\n </PaginationActions>\n </PaginationRoot>\n </Root>\n );\n },\n );\n\nexport const paginationConfig = {\n name: 'Pagination',\n tag: 'div',\n layout: paginationRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n type: {\n css: typeCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'm',\n },\n};\n"],"names":["paginationRoot","Root","forwardRef","_ref","ref","_ref$value","value","defaultValues","perPage","_ref$slots","slots","view","viewCurrentPage","_ref$type","type","size","_ref$pilled","pilled","_ref$square","square","_ref$disabledPages","disabledPages","_ref$count","count","_ref$hasQuickJump","hasQuickJump","_ref$hasPerPage","hasPerPage","_ref$perPageList","perPageList","_ref$isCommonButtonSt","isCommonButtonStyles","_ref$placeholderQuick","placeholderQuickJump","_ref$textQuickJump","textQuickJump","_ref$textPerPage","textPerPage","leftContent","rightContent","onChangePageValue","onChangePerPageValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","page","setPageValue","_useState3","_useState4","perPageValue","setPerPageValue","_useState5","_useState6","pages","setPagesValue","_useState7","_useState8","sections","setSections","typeClass","classes","concat","roundedClass","withHasPerPageSelect","undefined","withHasQuickJump","disabled","map","el","isNumber","Number","handlerSetPages","newPerPage","Math","ceil","handlerSetPage","newPageValue","pageValue","includes","handlerSetPerPage","newPerPageValue","isActiveButton","checkPage","paginationPageButtonActive","useEffect","getSections","React","createElement","_extends","className","cx","wrapper","PaginationRoot","PaginationPages","PaginationButtonGroup","section","indexSection","Fragment","_PaginationShorter","PaginationShorter","stretching","PaginationSection","key","PaginationButton","pin","onClick","paginationPageButton","PaginationActions","actions","PaginationQuickJumpToPage","onChangeValue","PaginationSelectPerPage","valuesList","paginationConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","typeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;IAuBaA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBAC3EC,gBAAU,CACN,UAAAC,IAAA,EAgCIC,GAAG,EACF;AAAA,IAAA,IAAAC,UAAA,GAAAF,IAAA,CA/BGG,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACD,KAAK,GAAAD,UAAA;MAC3BG,OAAO,GAAAL,IAAA,CAAPK,OAAO;MAAAC,UAAA,GAAAN,IAAA,CACPO,KAAK;AAALA,MAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGF,mBAAa,CAACG,KAAK,GAAAD,UAAA;MAE3BE,IAAI,GAAAR,IAAA,CAAJQ,IAAI;MACJC,eAA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AW,EAAEA,WAAY;AACzB/B,MAAAA,KAAK,EAAE+C,YAAa;AACpB+D,MAAAA,UAAU,EAAEvF,WAAY;AACxBqF,MAAAA,aAAa,EAAE/B,iBAAAA;KAClB,CAEU,CACP,CACd,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMkC,gBAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,YAAY;AAClBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExH,cAAc;AACtByH,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR/G,IAAAA,IAAI,EAAE;AACFgH,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,WAAAA;KACR;AACD/G,IAAAA,IAAI,EAAE;AACF6G,MAAAA,GAAG,EAAEG,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpH,IAAAA,IAAI,EAAE,OAAO;AACbI,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -21,7 +21,7 @@ var PaginationQuickJumpToPage = function PaginationQuickJumpToPage(_ref) {
|
|
21
21
|
setPageValue = _useState2[1];
|
22
22
|
var handleKeyPress = function handleKeyPress(event) {
|
23
23
|
if (event.key === 'Enter') {
|
24
|
-
onChangeValue === null || onChangeValue === void 0
|
24
|
+
onChangeValue === null || onChangeValue === void 0 || onChangeValue(Number(pageValue));
|
25
25
|
setPageValue('');
|
26
26
|
}
|
27
27
|
};
|
package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginationQuickJumpToPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { defaultValues } from '../../utils';\n\nimport type { PaginationQuickJumpToPageProps } from './PaginationQuickJumpToPage.types';\nimport {\n QuickJumpToPageRoot,\n QuickJumpToPageTypography,\n QuickJumpToPageInput,\n} from './PaginationQuickJumpToPage.styles';\n\nexport const PaginationQuickJumpToPage: React.FC<PaginationQuickJumpToPageProps> = ({\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n onChangeValue,\n ...rest\n}) => {\n const [pageValue, setPageValue] = useState<number | string | undefined>();\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Enter') {\n onChangeValue?.(Number(pageValue));\n setPageValue('');\n }\n };\n\n const handleChangeInput = (event: React.FormEvent<HTMLInputElement>) => {\n const result = event.currentTarget.value.replace(/\\D/g, '');\n if (result === '') return setPageValue('');\n setPageValue(Number(result));\n };\n\n return (\n <QuickJumpToPageRoot {...rest}>\n <QuickJumpToPageTypography>{textQuickJump}</QuickJumpToPageTypography>\n <QuickJumpToPageInput\n value={pageValue}\n placeholder={placeholderQuickJump}\n onKeyUp={handleKeyPress}\n onChange={handleChangeInput}\n />\n </QuickJumpToPageRoot>\n );\n};\n"],"names":["PaginationQuickJumpToPage","_ref","_ref$placeholderQuick","placeholderQuickJump","defaultValues","_ref$textQuickJump","textQuickJump","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","pageValue","setPageValue","handleKeyPress","event","key","Number","handleChangeInput","result","currentTarget","value","replace","React","createElement","QuickJumpToPageRoot","QuickJumpToPageTypography","QuickJumpToPageInput","placeholder","onKeyUp","onChange"],"mappings":";;;;;;;;;;IAWaA,yBAAmE,GAAG,SAAtEA,yBAAmEA,CAAAC,IAAA,EAK1E;AAAA,EAAA,IAAAC,qBAAA,GAAAD,IAAA,CAJFE,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACD,oBAAoB,GAAAD,qBAAA;IAAAG,kBAAA,GAAAJ,IAAA,CACzDK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,KAAA,CAAA,GAAGD,mBAAa,CAACE,aAAa,GAAAD,kBAAA;IAC3CE,aAAa,GAAAN,IAAA,CAAbM,aAAa;AACVC,IAAAA,IAAI,GAAAC,iDAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkCC,cAAQ,EAA+B;IAAAC,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE9B,EAAA,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAuC,EAAK;AAChE,IAAA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,EAAE;MACvBZ,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,
|
1
|
+
{"version":3,"file":"PaginationQuickJumpToPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { defaultValues } from '../../utils';\n\nimport type { PaginationQuickJumpToPageProps } from './PaginationQuickJumpToPage.types';\nimport {\n QuickJumpToPageRoot,\n QuickJumpToPageTypography,\n QuickJumpToPageInput,\n} from './PaginationQuickJumpToPage.styles';\n\nexport const PaginationQuickJumpToPage: React.FC<PaginationQuickJumpToPageProps> = ({\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n onChangeValue,\n ...rest\n}) => {\n const [pageValue, setPageValue] = useState<number | string | undefined>();\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Enter') {\n onChangeValue?.(Number(pageValue));\n setPageValue('');\n }\n };\n\n const handleChangeInput = (event: React.FormEvent<HTMLInputElement>) => {\n const result = event.currentTarget.value.replace(/\\D/g, '');\n if (result === '') return setPageValue('');\n setPageValue(Number(result));\n };\n\n return (\n <QuickJumpToPageRoot {...rest}>\n <QuickJumpToPageTypography>{textQuickJump}</QuickJumpToPageTypography>\n <QuickJumpToPageInput\n value={pageValue}\n placeholder={placeholderQuickJump}\n onKeyUp={handleKeyPress}\n onChange={handleChangeInput}\n />\n </QuickJumpToPageRoot>\n );\n};\n"],"names":["PaginationQuickJumpToPage","_ref","_ref$placeholderQuick","placeholderQuickJump","defaultValues","_ref$textQuickJump","textQuickJump","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","pageValue","setPageValue","handleKeyPress","event","key","Number","handleChangeInput","result","currentTarget","value","replace","React","createElement","QuickJumpToPageRoot","QuickJumpToPageTypography","QuickJumpToPageInput","placeholder","onKeyUp","onChange"],"mappings":";;;;;;;;;;IAWaA,yBAAmE,GAAG,SAAtEA,yBAAmEA,CAAAC,IAAA,EAK1E;AAAA,EAAA,IAAAC,qBAAA,GAAAD,IAAA,CAJFE,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACD,oBAAoB,GAAAD,qBAAA;IAAAG,kBAAA,GAAAJ,IAAA,CACzDK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,KAAA,CAAA,GAAGD,mBAAa,CAACE,aAAa,GAAAD,kBAAA;IAC3CE,aAAa,GAAAN,IAAA,CAAbM,aAAa;AACVC,IAAAA,IAAI,GAAAC,iDAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkCC,cAAQ,EAA+B;IAAAC,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE9B,EAAA,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAuC,EAAK;AAChE,IAAA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,EAAE;MACvBZ,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,IAAAA,aAAa,CAAGa,MAAM,CAACL,SAAS,CAAC,CAAC,CAAA;MAClCC,YAAY,CAAC,EAAE,CAAC,CAAA;AACpB,KAAA;GACH,CAAA;AAED,EAAA,IAAMK,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIH,KAAwC,EAAK;AACpE,IAAA,IAAMI,MAAM,GAAGJ,KAAK,CAACK,aAAa,CAACC,KAAK,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC3D,IAAIH,MAAM,KAAK,EAAE,EAAE,OAAON,YAAY,CAAC,EAAE,CAAC,CAAA;AAC1CA,IAAAA,YAAY,CAACI,MAAM,CAACE,MAAM,CAAC,CAAC,CAAA;GAC/B,CAAA;EAED,oBACII,KAAA,CAAAC,aAAA,CAACC,oDAAmB,EAAKpB,IAAI,eACzBkB,KAAA,CAAAC,aAAA,CAACE,0DAAyB,QAAEvB,aAAyC,CAAC,eACtEoB,KAAA,CAAAC,aAAA,CAACG,qDAAoB,EAAA;AACjBN,IAAAA,KAAK,EAAET,SAAU;AACjBgB,IAAAA,WAAW,EAAE5B,oBAAqB;AAClC6B,IAAAA,OAAO,EAAEf,cAAe;AACxBgB,IAAAA,QAAQ,EAAEZ,iBAAAA;AAAkB,GAC/B,CACgB,CAAC,CAAA;AAE9B;;;;"}
|
@@ -10,8 +10,8 @@
|
|
10
10
|
.Select_styles_1q3i6gw_svro45w__08f2a797{display:block;}.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverRoot__08f2a797,.Select_styles_1q3i6gw_svro45w__08f2a797 .Select_styles_1q3i6gw_popoverTarget__08f2a797{width:var(--svro45w-0);}
|
11
11
|
.Select_styles_1q3i6gw_sgpldc9__08f2a797{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;-moz-appearance:none;-webkit-appearance:none;background:transparent;color:transparent;border:none;outline:none;opacity:1;position:absolute;inset:-0.125rem;z-index:1;cursor:var(--sgpldc9-0);font-size:1rem;}.Select_styles_1q3i6gw_sgpldc9__08f2a797:hover:not(:disabled) + .Select_styles_1q3i6gw_popoverWrapper__08f2a797 .Select_styles_1q3i6gw_selectTarget__08f2a797{background:var(--plasma-select-target-background-color-hover);}.Select_styles_1q3i6gw_sgpldc9__08f2a797:focus-visible{border-radius:var(--plasma-select-border-radius);box-shadow:0 0 0 0.0625rem var(--plasma-select-focus-color);}
|
12
12
|
|
13
|
-
.
|
14
|
-
.
|
13
|
+
.Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
|
14
|
+
.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);}
|
15
15
|
|
16
16
|
.DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
|
17
17
|
|
@@ -28,7 +28,7 @@ var PaginationSelectPerPage = function PaginationSelectPerPage(_ref) {
|
|
28
28
|
var handleSelectChange = function handleSelectChange(newValue) {
|
29
29
|
if (newValue) {
|
30
30
|
setSelectedValue(Number(newValue));
|
31
|
-
onChangeValue === null || onChangeValue === void 0
|
31
|
+
onChangeValue === null || onChangeValue === void 0 || onChangeValue(Number(newValue));
|
32
32
|
}
|
33
33
|
};
|
34
34
|
return /*#__PURE__*/React.createElement(PaginationSelectPerPage_styles.SelectPerPageRoot, rest, /*#__PURE__*/React.createElement(PaginationSelectPerPage_styles.SelectPerPageTypography, null, textPerPage), /*#__PURE__*/React.createElement(PaginationSelectPerPage_styles.SelectPerPageSelect, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { IconDone } from '../../../../components/_Icon';\nimport { SelectPrimitiveValue } from '../../../Select';\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport {\n SelectPerPageRoot,\n SelectPerPageTypography,\n SelectPerPageSelect,\n SelectPerPageSelectItem,\n} from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n value = defaultValues.perPage,\n valuesList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n ...rest\n}) => {\n const [selectedValue, setSelectedValue] = useState(value);\n\n const handleSelectChange = (newValue?: SelectPrimitiveValue) => {\n if (newValue) {\n setSelectedValue(Number(newValue));\n onChangeValue?.(Number(newValue));\n }\n };\n\n return (\n <SelectPerPageRoot {...rest}>\n <SelectPerPageTypography>{textPerPage}</SelectPerPageTypography>\n <SelectPerPageSelect\n className={classes.selectWrapper}\n value={selectedValue}\n onChangeValue={handleSelectChange}\n >\n {valuesList?.map((item) => (\n <SelectPerPageSelectItem\n contentLeft={item === selectedValue ? <IconDone size=\"xs\" color=\"inherit\" /> : undefined}\n key={item}\n value={item}\n text={String(item)}\n />\n ))}\n </SelectPerPageSelect>\n </SelectPerPageRoot>\n );\n};\n"],"names":["PaginationSelectPerPage","_ref","_ref$value","value","defaultValues","perPage","_ref$valuesList","valuesList","perPageList","_ref$textPerPage","textPerPage","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","selectedValue","setSelectedValue","handleSelectChange","newValue","Number","React","createElement","SelectPerPageRoot","SelectPerPageTypography","SelectPerPageSelect","className","classes","selectWrapper","map","item","SelectPerPageSelectItem","contentLeft","_IconDone","IconDone","size","color","undefined","key","text","String"],"mappings":";;;;;;;;;;;;;;IAeaA,uBAA+D,GAAG,SAAlEA,uBAA+DA,CAAAC,IAAA,EAMtE;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALFE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACC,OAAO,GAAAH,UAAA;IAAAI,eAAA,GAAAL,IAAA,CAC7BM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAGF,mBAAa,CAACI,WAAW,GAAAF,eAAA;IAAAG,gBAAA,GAAAR,IAAA,CACtCS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAGL,mBAAa,CAACM,WAAW,GAAAD,gBAAA;IACvCE,aAAa,GAAAV,IAAA,CAAbU,aAAa;AACVC,IAAAA,IAAI,GAAAC,iDAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAA0CC,cAAQ,CAACb,KAAK,CAAC;IAAAc,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlDI,IAAAA,aAAa,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,gBAAgB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAEtC,EAAA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,QAA+B,EAAK;AAC5D,IAAA,IAAIA,QAAQ,EAAE;AACVF,MAAAA,gBAAgB,CAACG,MAAM,CAACD,QAAQ,CAAC,CAAC,CAAA;MAClCX,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,
|
1
|
+
{"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { IconDone } from '../../../../components/_Icon';\nimport { SelectPrimitiveValue } from '../../../Select';\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport {\n SelectPerPageRoot,\n SelectPerPageTypography,\n SelectPerPageSelect,\n SelectPerPageSelectItem,\n} from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n value = defaultValues.perPage,\n valuesList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n ...rest\n}) => {\n const [selectedValue, setSelectedValue] = useState(value);\n\n const handleSelectChange = (newValue?: SelectPrimitiveValue) => {\n if (newValue) {\n setSelectedValue(Number(newValue));\n onChangeValue?.(Number(newValue));\n }\n };\n\n return (\n <SelectPerPageRoot {...rest}>\n <SelectPerPageTypography>{textPerPage}</SelectPerPageTypography>\n <SelectPerPageSelect\n className={classes.selectWrapper}\n value={selectedValue}\n onChangeValue={handleSelectChange}\n >\n {valuesList?.map((item) => (\n <SelectPerPageSelectItem\n contentLeft={item === selectedValue ? <IconDone size=\"xs\" color=\"inherit\" /> : undefined}\n key={item}\n value={item}\n text={String(item)}\n />\n ))}\n </SelectPerPageSelect>\n </SelectPerPageRoot>\n );\n};\n"],"names":["PaginationSelectPerPage","_ref","_ref$value","value","defaultValues","perPage","_ref$valuesList","valuesList","perPageList","_ref$textPerPage","textPerPage","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","selectedValue","setSelectedValue","handleSelectChange","newValue","Number","React","createElement","SelectPerPageRoot","SelectPerPageTypography","SelectPerPageSelect","className","classes","selectWrapper","map","item","SelectPerPageSelectItem","contentLeft","_IconDone","IconDone","size","color","undefined","key","text","String"],"mappings":";;;;;;;;;;;;;;IAeaA,uBAA+D,GAAG,SAAlEA,uBAA+DA,CAAAC,IAAA,EAMtE;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALFE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,mBAAa,CAACC,OAAO,GAAAH,UAAA;IAAAI,eAAA,GAAAL,IAAA,CAC7BM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAGF,mBAAa,CAACI,WAAW,GAAAF,eAAA;IAAAG,gBAAA,GAAAR,IAAA,CACtCS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAGL,mBAAa,CAACM,WAAW,GAAAD,gBAAA;IACvCE,aAAa,GAAAV,IAAA,CAAbU,aAAa;AACVC,IAAAA,IAAI,GAAAC,iDAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAA0CC,cAAQ,CAACb,KAAK,CAAC;IAAAc,UAAA,GAAAC,uCAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlDI,IAAAA,aAAa,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,gBAAgB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAEtC,EAAA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,QAA+B,EAAK;AAC5D,IAAA,IAAIA,QAAQ,EAAE;AACVF,MAAAA,gBAAgB,CAACG,MAAM,CAACD,QAAQ,CAAC,CAAC,CAAA;MAClCX,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,IAAAA,aAAa,CAAGY,MAAM,CAACD,QAAQ,CAAC,CAAC,CAAA;AACrC,KAAA;GACH,CAAA;EAED,oBACIE,KAAA,CAAAC,aAAA,CAACC,gDAAiB,EAAKd,IAAI,eACvBY,KAAA,CAAAC,aAAA,CAACE,sDAAuB,QAAEjB,WAAqC,CAAC,eAChEc,KAAA,CAAAC,aAAA,CAACG,kDAAmB,EAAA;IAChBC,SAAS,EAAEC,yBAAO,CAACC,aAAc;AACjC5B,IAAAA,KAAK,EAAEgB,aAAc;AACrBR,IAAAA,aAAa,EAAEU,kBAAAA;GAEdd,EAAAA,UAAU,aAAVA,UAAU,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAVA,UAAU,CAAEyB,GAAG,CAAC,UAACC,IAAI,EAAA;AAAA,IAAA,oBAClBT,KAAA,CAAAC,aAAA,CAACS,sDAAuB,EAAA;AACpBC,MAAAA,WAAW,EAAEF,IAAI,KAAKd,aAAa,GAAAiB,SAAA,KAAAA,SAAA,gBAAGZ,KAAA,CAAAC,aAAA,CAACY,iBAAQ,EAAA;AAACC,QAAAA,IAAI,EAAC,IAAI;AAACC,QAAAA,KAAK,EAAC,SAAA;OAAW,CAAC,IAAGC,SAAU;AACzFC,MAAAA,GAAG,EAAER,IAAK;AACV9B,MAAAA,KAAK,EAAE8B,IAAK;MACZS,IAAI,EAAEC,MAAM,CAACV,IAAI,CAAA;AAAE,KACtB,CAAC,CAAA;GACL,CACgB,CACN,CAAC,CAAA;AAE5B;;;;"}
|
package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js
CHANGED
@@ -7,11 +7,11 @@ var react = require('@linaria/react');
|
|
7
7
|
var Select$1 = require('../../../Select/Select.js');
|
8
8
|
require('react');
|
9
9
|
require('@salutejs/plasma-core');
|
10
|
-
require('../../../../utils/react.js');
|
11
10
|
require('@linaria/core');
|
12
11
|
var common = require('../../../../engines/common.js');
|
13
12
|
require('react-dom');
|
14
13
|
require('react-popper');
|
14
|
+
require('../../../../utils/react.js');
|
15
15
|
require('focus-visible');
|
16
16
|
var SelectItem$1 = require('../../../Select/ui/SelectItem/SelectItem.js');
|
17
17
|
|