@salutejs/plasma-new-hope 0.174.0-canary.1452.11462555994.0 → 0.174.0-canary.1497.11480463527.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
- package/cjs/components/Attach/Attach.js +3 -4
- package/cjs/components/Attach/Attach.js.map +1 -1
- package/cjs/components/Attach/components/AttachButton/AttachButton.js +0 -1
- package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/cjs/components/Attach/ui/Button/Button.styles.js +0 -1
- package/cjs/components/Attach/ui/Button/Button.styles.js.map +1 -1
- package/cjs/components/Attach/ui/Cell/Cell.styles.js +0 -2
- package/cjs/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
- package/cjs/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
- package/cjs/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
- package/cjs/components/Attach/utils/getFileicon.js +3 -4
- package/cjs/components/Attach/utils/getFileicon.js.map +1 -1
- package/cjs/components/Attach/utils/index.js +0 -3
- package/cjs/components/Attach/utils/index.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.js +5 -6
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.styles.js +2 -3
- package/cjs/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
- package/cjs/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/Avatar/Avatar.js +2 -3
- package/cjs/components/Avatar/Avatar.js.map +1 -1
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
- package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/cjs/components/Button/Button.styles.js +0 -3
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Calendar/CalendarBase/CalendarBase.js +5 -5
- package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
- package/cjs/components/Calendar/hooks/useDays.js +2 -2
- package/cjs/components/Calendar/hooks/useKeyNavigation.js +1 -1
- package/cjs/components/Calendar/hooks/useMonths.js +2 -2
- package/cjs/components/Calendar/hooks/useQuarters.js +2 -2
- package/cjs/components/Calendar/hooks/useYears.js +2 -2
- package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
- package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
- package/cjs/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
- package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +11 -12
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
- package/cjs/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
- package/cjs/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +28 -14
- package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -10
- package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/cjs/components/Drawer/Drawer.js +5 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +0 -4
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.css +30 -16
- package/cjs/components/Dropdown/Dropdown.js +63 -47
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +14 -27
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
- package/cjs/components/Dropdown/Dropdown.tokens.js +24 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/FloatingPopover.js +104 -0
- package/cjs/components/Dropdown/FloatingPopover.js.map +1 -0
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -60
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +30 -20
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +25 -31
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -3
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_12e50g5.css → DropdownItem.styles_1lyg81y.css} +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
- package/cjs/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/utils/getItemByFocused.js +13 -0
- package/cjs/components/Dropdown/utils/getItemByFocused.js.map +1 -0
- package/cjs/components/Dropdown/utils/getItemId.js +10 -0
- package/cjs/components/Dropdown/utils/getItemId.js.map +1 -0
- package/cjs/components/Dropdown/utils/getPlacement.js +16 -0
- package/cjs/components/Dropdown/utils/getPlacement.js.map +1 -0
- package/cjs/components/Dropdown/utils/index.js.map +1 -1
- package/cjs/components/Editable/Editable.js +3 -4
- package/cjs/components/Editable/Editable.js.map +1 -1
- package/cjs/components/Editable/utils/clearSelection.js +0 -2
- package/cjs/components/Editable/utils/clearSelection.js.map +1 -1
- package/cjs/components/Editable/utils/selectText.js +0 -2
- package/cjs/components/Editable/utils/selectText.js.map +1 -1
- package/cjs/components/EmptyState/EmptyState.styles.js +1 -2
- package/cjs/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/cjs/components/IconButton/IconButton.js +1 -1
- package/cjs/components/IconButton/IconButton.styles.js +0 -8
- package/cjs/components/IconButton/IconButton.styles.js.map +1 -1
- package/cjs/components/Modal/Modal.js +6 -8
- package/cjs/components/Modal/Modal.js.map +1 -1
- package/cjs/components/Modal/hooks/useModal.js +0 -4
- package/cjs/components/Modal/hooks/useModal.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +2 -3
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal.js +3 -4
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Pagination/Pagination.styles.js +1 -2
- package/cjs/components/Pagination/Pagination.styles.js.map +1 -1
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/cjs/components/Popover/Popover.js +1 -1
- package/cjs/components/Popup/Popup.js +2 -2
- package/cjs/components/Popup/PopupContext.js +1 -1
- package/cjs/components/Range/Range.styles.js +0 -1
- package/cjs/components/Range/Range.styles.js.map +1 -1
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/cjs/components/Select/Select.js +11 -12
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +2 -5
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/hooks/usePathMaps.js +0 -2
- package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.js +1 -2
- package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -5
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
- package/cjs/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
- package/cjs/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js +0 -2
- package/cjs/components/Select/utils/getButtonLabel.js.map +1 -1
- package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
- package/cjs/components/Sheet/Sheet.js +3 -3
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
- package/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
- package/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
- package/cjs/components/Slider/Slider.css +13 -15
- package/cjs/components/Slider/Slider.js +2 -18
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/Slider.tokens.js +17 -23
- package/cjs/components/Slider/Slider.tokens.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +8 -8
- package/cjs/components/Slider/components/Double/Double.js +24 -60
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
- package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.css +14 -14
- package/cjs/components/Slider/components/Single/Single.js +34 -66
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +13 -32
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
- package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/cjs/components/Slider/utils/index.js +10 -28
- package/cjs/components/Slider/utils/index.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base.js +1 -1
- package/cjs/components/Slider/variations/_view/base.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/Steps/Steps.js +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +2 -2
- package/cjs/components/TextArea/TextArea.styles.js +2 -3
- package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
- package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/TextField.js +3 -3
- package/cjs/components/TextField/TextField.styles.js +1 -2
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/cjs/components/Toast/Toast.styles.js +1 -1
- package/cjs/components/Toast/ToastController.js +1 -1
- package/cjs/components/Toast/utils.js +1 -2
- package/cjs/components/Toast/utils.js.map +1 -1
- package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/cjs/components/Tooltip/Tooltip.js +2 -3
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/engines/index.js +0 -2
- package/cjs/engines/index.js.map +1 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/cjs/hooks/useOutsideClick.js +1 -1
- package/cjs/hooks/useOutsideClick.js.map +1 -1
- package/cjs/index.css +24 -28
- package/cjs/index.js +48 -51
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js +0 -5
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Dropdown/Dropdown.js +58 -37
- package/emotion/cjs/components/Dropdown/Dropdown.styles.js +9 -25
- package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
- package/emotion/cjs/components/Dropdown/FloatingPopover.js +109 -0
- package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +21 -41
- package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
- package/emotion/cjs/components/Dropdown/utils/getItemId.js +9 -0
- package/emotion/cjs/components/Dropdown/utils/getPlacement.js +15 -0
- package/emotion/cjs/components/Dropdown/utils/index.js +23 -1
- package/emotion/cjs/components/Slider/Slider.js +2 -10
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
- package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
- package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
- package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
- package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/cjs/components/Slider/utils/index.js +10 -28
- package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/emotion/cjs/hooks/useOutsideClick.js +1 -1
- package/emotion/es/components/Dropdown/Dropdown.js +60 -40
- package/emotion/es/components/Dropdown/Dropdown.styles.js +9 -25
- package/emotion/es/components/Dropdown/Dropdown.tokens.js +35 -1
- package/emotion/es/components/Dropdown/FloatingPopover.js +102 -0
- package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +22 -42
- package/emotion/es/components/Dropdown/utils/getItemByFocused.js +6 -0
- package/emotion/es/components/Dropdown/utils/getItemId.js +3 -0
- package/emotion/es/components/Dropdown/utils/getPlacement.js +9 -0
- package/emotion/es/components/Dropdown/utils/index.js +4 -1
- package/emotion/es/components/Slider/Slider.js +2 -11
- package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/es/components/Slider/Slider.tokens.js +17 -23
- package/emotion/es/components/Slider/components/Double/Double.js +19 -54
- package/emotion/es/components/Slider/components/Single/Single.js +34 -65
- package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
- package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
- package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/es/components/Slider/utils/index.js +10 -28
- package/emotion/es/components/Slider/variations/_view/base.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/emotion/es/hooks/useOutsideClick.js +1 -1
- package/emotion/package.json +2 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
- package/es/components/Attach/Attach.js +3 -4
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/es/components/Attach/ui/Button/Button.styles.js +0 -1
- package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
- package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/Attach/utils/getFileicon.js +3 -4
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/utils/index.js +0 -3
- package/es/components/Attach/utils/index.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.js +5 -6
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
- package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/es/components/Avatar/Avatar.js +2 -3
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Button/Button.styles.js +0 -3
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
- package/es/components/Calendar/hooks/useDays.js +2 -2
- package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
- package/es/components/Calendar/hooks/useMonths.js +2 -2
- package/es/components/Calendar/hooks/useQuarters.js +2 -2
- package/es/components/Calendar/hooks/useYears.js +2 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
- package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.css +28 -14
- package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
- package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/es/components/Drawer/Drawer.js +5 -10
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +0 -4
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +0 -4
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/es/components/Dropdown/Dropdown.css +30 -16
- package/es/components/Dropdown/Dropdown.js +65 -50
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +15 -27
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
- package/es/components/Dropdown/Dropdown.tokens.js +24 -1
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/FloatingPopover.js +100 -0
- package/es/components/Dropdown/FloatingPopover.js.map +1 -0
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -60
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -21
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +24 -29
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -3
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/{DropdownItem.styles_12e50g5.css → DropdownItem.styles_1lyg81y.css} +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js +0 -1
- package/es/components/Dropdown/ui/DropdownOld/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/utils/getItemByFocused.js +9 -0
- package/es/components/Dropdown/utils/getItemByFocused.js.map +1 -0
- package/es/components/Dropdown/utils/getItemId.js +6 -0
- package/es/components/Dropdown/utils/getItemId.js.map +1 -0
- package/es/components/Dropdown/utils/getPlacement.js +12 -0
- package/es/components/Dropdown/utils/getPlacement.js.map +1 -0
- package/es/components/Dropdown/utils/index.js.map +1 -1
- package/es/components/Editable/Editable.js +3 -4
- package/es/components/Editable/Editable.js.map +1 -1
- package/es/components/Editable/utils/clearSelection.js +0 -2
- package/es/components/Editable/utils/clearSelection.js.map +1 -1
- package/es/components/Editable/utils/selectText.js +0 -2
- package/es/components/Editable/utils/selectText.js.map +1 -1
- package/es/components/EmptyState/EmptyState.styles.js +1 -2
- package/es/components/EmptyState/EmptyState.styles.js.map +1 -1
- package/es/components/IconButton/IconButton.js +1 -1
- package/es/components/IconButton/IconButton.styles.js +0 -8
- package/es/components/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/Modal/Modal.js +6 -8
- package/es/components/Modal/Modal.js.map +1 -1
- package/es/components/Modal/hooks/useModal.js +0 -4
- package/es/components/Modal/hooks/useModal.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +2 -3
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/NotificationsPortal.js +3 -4
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Pagination/Pagination.styles.js +1 -2
- package/es/components/Pagination/Pagination.styles.js.map +1 -1
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -2
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js.map +1 -1
- package/es/components/Panel/ui/PanelHeader/PanelHeader.js +1 -2
- package/es/components/Panel/ui/PanelHeader/PanelHeader.js.map +1 -1
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js +1 -2
- package/es/components/Panel/ui/PanelHeader/PanelHeader.styles.js.map +1 -1
- package/es/components/Popover/Popover.js +1 -1
- package/es/components/Popup/Popup.js +2 -2
- package/es/components/Popup/PopupContext.js +1 -1
- package/es/components/Range/Range.styles.js +0 -1
- package/es/components/Range/Range.styles.js.map +1 -1
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +4 -5
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/es/components/Select/Select.js +11 -12
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +2 -5
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/hooks/usePathMaps.js +0 -2
- package/es/components/Select/hooks/usePathMaps.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.js +1 -2
- package/es/components/Select/ui/Inner/Inner.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -5
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js +0 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.js +1 -1
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js +1 -3
- package/es/components/Select/ui/Target/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +2 -2
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -4
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js +1 -2
- package/es/components/Select/ui/Target/ui/Textfield/ui/Chip/Chip.styles.js.map +1 -1
- package/es/components/Select/utils/getButtonLabel.js +0 -2
- package/es/components/Select/utils/getButtonLabel.js.map +1 -1
- package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
- package/es/components/Sheet/Sheet.js +3 -3
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js +2 -4
- package/es/components/Skeleton/LineSkeleton/LineSkeleton.js.map +1 -1
- package/es/components/Skeleton/RectSkeleton/RectSkeleton.js +2 -4
- package/es/components/Skeleton/RectSkeleton/RectSkeleton.js.map +1 -1
- package/es/components/Slider/Slider.css +13 -15
- package/es/components/Slider/Slider.js +2 -18
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/Slider.tokens.js +17 -23
- package/es/components/Slider/Slider.tokens.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +8 -8
- package/es/components/Slider/components/Double/Double.js +20 -56
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/Double/Double.styles.js +0 -1
- package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/es/components/Slider/components/Single/Single.css +14 -14
- package/es/components/Slider/components/Single/Single.js +35 -67
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles.js +4 -4
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/es/components/Slider/components/SliderBase/SliderBase.js +13 -32
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/es/components/Slider/ui/Handler/Handler.css +3 -3
- package/es/components/Slider/ui/Handler/Handler.js +87 -48
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/es/components/Slider/utils/index.js +10 -28
- package/es/components/Slider/utils/index.js.map +1 -1
- package/es/components/Slider/variations/_view/base.js +1 -1
- package/es/components/Slider/variations/_view/base.js.map +1 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/es/components/Steps/Steps.js +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/es/components/TextArea/TextArea.js +2 -2
- package/es/components/TextArea/TextArea.styles.js +2 -3
- package/es/components/TextArea/TextArea.styles.js.map +1 -1
- package/es/components/TextArea/ui/Hint/Hint.js +1 -2
- package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/TextField.js +3 -3
- package/es/components/TextField/TextField.styles.js +1 -2
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.js +1 -2
- package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/es/components/Toast/Toast.styles.js +1 -1
- package/es/components/Toast/ToastController.js +1 -1
- package/es/components/Toast/utils.js +1 -2
- package/es/components/Toast/utils.js.map +1 -1
- package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -3
- package/es/components/Tooltip/Tooltip.js.map +1 -1
- package/es/engines/index.js +0 -2
- package/es/engines/index.js.map +1 -1
- package/es/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -1
- package/es/hooks/useOutsideClick.js +1 -1
- package/es/hooks/useOutsideClick.js.map +1 -1
- package/es/index.css +24 -28
- package/es/index.js +21 -24
- package/es/index.js.map +1 -1
- package/es/utils/index.js +0 -3
- package/es/utils/index.js.map +1 -1
- package/package.json +5 -2
- package/styled-components/cjs/components/Dropdown/Dropdown.js +58 -37
- package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +9 -15
- package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
- package/styled-components/cjs/components/Dropdown/FloatingPopover.js +109 -0
- package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +17 -19
- package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
- package/styled-components/cjs/components/Dropdown/utils/getItemId.js +9 -0
- package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +15 -0
- package/styled-components/cjs/components/Dropdown/utils/index.js +23 -1
- package/styled-components/cjs/components/Slider/Slider.js +2 -10
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/cjs/components/Slider/utils/index.js +10 -28
- package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
- package/styled-components/es/components/Dropdown/Dropdown.js +60 -40
- package/styled-components/es/components/Dropdown/Dropdown.styles.js +9 -15
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +35 -1
- package/styled-components/es/components/Dropdown/FloatingPopover.js +102 -0
- package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +18 -20
- package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +6 -0
- package/styled-components/es/components/Dropdown/utils/getItemId.js +3 -0
- package/styled-components/es/components/Dropdown/utils/getPlacement.js +9 -0
- package/styled-components/es/components/Dropdown/utils/index.js +4 -1
- package/styled-components/es/components/Slider/Slider.js +2 -11
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/es/components/Slider/utils/index.js +10 -28
- package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/styled-components/es/hooks/useOutsideClick.js +1 -1
- package/styled-components/package.json +2 -1
- package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +2 -1
- package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.d.ts +2 -1
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.styles.d.ts +1 -6
- package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.tokens.d.ts +25 -0
- package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +30 -4
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/FloatingPopover.d.ts +5 -0
- package/types/components/Dropdown/FloatingPopover.d.ts.map +1 -0
- package/types/components/Dropdown/index.d.ts +1 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +1 -12
- package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +32 -3
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +1 -14
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
- package/types/components/Dropdown/utils/getItemByFocused.d.ts +4 -0
- package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +1 -0
- package/types/components/Dropdown/utils/getItemId.d.ts +2 -0
- package/types/components/Dropdown/utils/getItemId.d.ts.map +1 -0
- package/types/components/Dropdown/utils/getPlacement.d.ts +3 -0
- package/types/components/Dropdown/utils/getPlacement.d.ts.map +1 -0
- package/types/components/Dropdown/utils/index.d.ts +3 -0
- package/types/components/Dropdown/utils/index.d.ts.map +1 -1
- package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
- package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
- package/types/components/Slider/Slider.d.ts.map +1 -1
- package/types/components/Slider/Slider.tokens.d.ts +16 -22
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +7 -80
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
- package/types/components/Slider/utils/index.d.ts +8 -26
- package/types/components/Slider/utils/index.d.ts.map +1 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -84
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
- package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -84
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
- package/types/hooks/useOutsideClick.d.ts +1 -1
- package/types/hooks/useOutsideClick.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
- package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
@@ -4,9 +4,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.dropdownRoot = exports.dropdownConfig = void 0;
|
7
|
+
exports.dropdownRoot = exports.dropdownConfig = exports.Context = void 0;
|
8
8
|
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
9
10
|
var _utils = /*#__PURE__*/require("../../utils");
|
11
|
+
var _hooks = /*#__PURE__*/require("../../hooks");
|
10
12
|
var _pathReducer = /*#__PURE__*/require("./reducers/pathReducer");
|
11
13
|
var _focusedPathReducer = /*#__PURE__*/require("./reducers/focusedPathReducer");
|
12
14
|
var _ui = /*#__PURE__*/require("./ui");
|
@@ -17,6 +19,7 @@ var _utils2 = /*#__PURE__*/require("./utils");
|
|
17
19
|
var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
|
18
20
|
var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
|
19
21
|
var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
|
22
|
+
var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
|
20
23
|
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
|
21
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
22
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -29,17 +32,18 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
29
32
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
30
33
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
31
34
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
35
|
+
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
|
36
|
+
|
32
37
|
/**
|
33
38
|
* Выпадающий список.
|
34
39
|
*/
|
35
40
|
var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
36
41
|
return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
42
|
+
var _getItemByFocused;
|
37
43
|
var items = _ref.items,
|
38
44
|
children = _ref.children,
|
39
|
-
|
40
|
-
|
41
|
-
_ref$offset = _ref.offset,
|
42
|
-
offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
|
45
|
+
placement = _ref.placement,
|
46
|
+
offset = _ref.offset,
|
43
47
|
_ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
|
44
48
|
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
45
49
|
onToggle = _ref.onToggle,
|
@@ -76,6 +80,25 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
76
80
|
_useHashMaps2 = _slicedToArray(_useHashMaps, 2),
|
77
81
|
pathMap = _useHashMaps2[0],
|
78
82
|
focusedToValueMap = _useHashMaps2[1];
|
83
|
+
var activeDescendantItemValue = ((_getItemByFocused = (0, _utils2.getItemByFocused)(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
|
84
|
+
var floatingPopoverRef = (0, _react.useRef)(null);
|
85
|
+
var treeId = (0, _plasmaCore.safeUseId)();
|
86
|
+
|
87
|
+
// Логика работы при клике за пределами выпадающего списка
|
88
|
+
var targetRef = (0, _hooks.useOutsideClick)(function (event) {
|
89
|
+
if (!isCurrentListOpen || !closeOnOverlayClick) {
|
90
|
+
return;
|
91
|
+
}
|
92
|
+
dispatchPath({
|
93
|
+
type: 'reset'
|
94
|
+
});
|
95
|
+
dispatchFocusedPath({
|
96
|
+
type: 'reset'
|
97
|
+
});
|
98
|
+
if (onToggle) {
|
99
|
+
onToggle(false, event);
|
100
|
+
}
|
101
|
+
}, floatingPopoverRef);
|
79
102
|
var handleGlobalToggle = function handleGlobalToggle(opened, event) {
|
80
103
|
if (opened) {
|
81
104
|
dispatchPath({
|
@@ -107,66 +130,64 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
|
|
107
130
|
}),
|
108
131
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
109
132
|
var isCurrentListOpen = Boolean(path[0]);
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
133
|
+
return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
|
134
|
+
value: {
|
135
|
+
focusedPath: focusedPath,
|
136
|
+
size: size,
|
137
|
+
variant: variant,
|
138
|
+
itemRole: itemRole,
|
139
|
+
handleGlobalToggle: handleGlobalToggle,
|
140
|
+
closeOnSelect: closeOnSelect,
|
141
|
+
onHover: onHover,
|
142
|
+
onItemClick: onItemClick,
|
143
|
+
onItemSelect: onItemSelect,
|
144
|
+
hasArrow: hasArrow,
|
145
|
+
treeId: treeId
|
146
|
+
}
|
147
|
+
}, /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
148
|
+
ref: floatingPopoverRef,
|
118
149
|
opened: isCurrentListOpen,
|
119
150
|
onToggle: handleGlobalToggle,
|
151
|
+
placement: (0, _utils2.getPlacement)(placement),
|
120
152
|
offset: offset,
|
121
|
-
|
153
|
+
portal: portal,
|
122
154
|
trigger: trigger,
|
123
|
-
closeOnOverlayClick: closeOnOverlayClick,
|
124
|
-
isFocusTrapped: false,
|
125
155
|
target: (0, _utils2.childrenWithProps)(children, {
|
126
156
|
role: 'combobox',
|
127
|
-
'aria-controls':
|
157
|
+
'aria-controls': "".concat(treeId, "_tree_level_1"),
|
128
158
|
'aria-expanded': isCurrentListOpen,
|
129
|
-
'aria-activedescendant':
|
159
|
+
'aria-activedescendant': activeDescendantItemValue ? (0, _utils2.getItemId)(treeId, activeDescendantItemValue.toString()) : '',
|
130
160
|
onKeyDown: onKeyDown
|
131
|
-
})
|
132
|
-
preventOverflow: false,
|
133
|
-
usePortal: Boolean(portal),
|
134
|
-
frame: portal
|
161
|
+
})
|
135
162
|
}, /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
136
163
|
className: (0, _utils.cx)(className, _Dropdown2.classes.dropdownRoot),
|
137
164
|
ref: ref,
|
138
165
|
view: view,
|
139
|
-
size: size
|
166
|
+
size: size,
|
167
|
+
style: {
|
168
|
+
display: 'inline-block'
|
169
|
+
}
|
140
170
|
}, rest), /*#__PURE__*/_react["default"].createElement(_Dropdown.Ul, {
|
171
|
+
ref: targetRef,
|
172
|
+
id: "".concat(treeId, "_tree_level_1"),
|
173
|
+
role: "tree",
|
141
174
|
listHeight: listHeight,
|
142
175
|
listOverflow: listOverflow,
|
143
|
-
role: "tree",
|
144
|
-
id: "tree_level_1",
|
145
176
|
listWidth: listWidth
|
146
177
|
}, items.map(function (item, index) {
|
147
178
|
return /*#__PURE__*/_react["default"].createElement(_ui.DropdownInner, {
|
148
179
|
key: "".concat(index, "/0"),
|
149
180
|
item: item,
|
150
181
|
currentLevel: 0,
|
151
|
-
focusedPath: focusedPath,
|
152
182
|
trigger: trigger,
|
153
183
|
path: path,
|
154
184
|
dispatchPath: dispatchPath,
|
155
185
|
index: index,
|
156
|
-
itemRole: itemRole,
|
157
186
|
listHeight: listHeight,
|
158
187
|
listOverflow: listOverflow,
|
159
|
-
|
160
|
-
closeOnSelect: closeOnSelect,
|
161
|
-
onHover: onHover,
|
162
|
-
onItemSelect: onItemSelect,
|
163
|
-
onItemClick: onItemClick,
|
164
|
-
listWidth: listWidth,
|
165
|
-
variant: variant,
|
166
|
-
hasArrow: hasArrow,
|
167
|
-
size: size
|
188
|
+
listWidth: listWidth
|
168
189
|
});
|
169
|
-
}))));
|
190
|
+
})))));
|
170
191
|
});
|
171
192
|
};
|
172
193
|
var dropdownConfig = exports.dropdownConfig = {
|
@@ -4,31 +4,25 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.base = exports.Ul =
|
7
|
+
exports.base = exports.Ul = void 0;
|
8
8
|
var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
|
9
|
-
var _engines = /*#__PURE__*/require("../../engines");
|
10
|
-
var _Popover = /*#__PURE__*/require("../Popover");
|
11
9
|
var _utils = /*#__PURE__*/require("./utils");
|
12
10
|
var _Dropdown = /*#__PURE__*/require("./Dropdown.tokens");
|
13
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
|
-
var Popover = /*#__PURE__*/(0, _engines.component)(_Popover.popoverConfig);
|
16
|
-
var StyledPopover = exports.StyledPopover = /*#__PURE__*/(0, _styledComponents["default"])(Popover).withConfig({
|
17
|
-
componentId: "plasma-new-hope__sc-13ezpo5-0"
|
18
|
-
})([".", ",.", "{display:block;}"], /*#__PURE__*/String(_Popover.popoverClasses.wrapper), /*#__PURE__*/String(_Popover.popoverClasses.target));
|
19
13
|
var Ul = exports.Ul = /*#__PURE__*/_styledComponents["default"].ul.withConfig({
|
20
|
-
componentId: "plasma-new-hope__sc-13ezpo5-
|
21
|
-
})(["box-sizing:border-box;
|
14
|
+
componentId: "plasma-new-hope__sc-13ezpo5-0"
|
15
|
+
})(["box-sizing:border-box;width:", ";height:", ";margin:", ";padding:var(", ") 0;overflow:", ";background:var(", ");box-shadow:", ";border-radius:var(", ");"], function (_ref) {
|
22
16
|
var listWidth = _ref.listWidth;
|
23
17
|
return listWidth || "var(".concat(_Dropdown.tokens.width, ")");
|
24
18
|
}, function (_ref2) {
|
25
19
|
var listHeight = _ref2.listHeight;
|
26
20
|
return listHeight ? (0, _utils.getCorrectHeight)(listHeight) : 'auto';
|
27
21
|
}, function (_ref3) {
|
28
|
-
var
|
22
|
+
var isInnerUl = _ref3.isInnerUl;
|
23
|
+
return isInnerUl ? "calc(var(".concat(_Dropdown.tokens.padding, ") * -1) 0.125rem 0") : 0;
|
24
|
+
}, _Dropdown.tokens.padding, function (_ref4) {
|
25
|
+
var listOverflow = _ref4.listOverflow;
|
29
26
|
return listOverflow || 'initial';
|
30
|
-
},
|
31
|
-
|
32
|
-
return isInnerUl ? "calc(var(".concat(_Dropdown.tokens.padding, ") * -1) 0 0 var(").concat(_Dropdown.tokens.padding, ")") : 0;
|
33
|
-
}, _Dropdown.tokens.padding);
|
34
|
-
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["display:inline-block;"]);
|
27
|
+
}, _Dropdown.constants.background, _Dropdown.constants.boxShadow, _Dropdown.tokens.borderRadius);
|
28
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
|
@@ -3,13 +3,13 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.tokens = exports.classes = void 0;
|
6
|
+
exports.tokens = exports.constants = exports.classes = void 0;
|
7
7
|
var classes = exports.classes = {
|
8
8
|
dropdownRoot: 'dropdown-root',
|
9
9
|
dropdownItemIsFocused: 'dropdown-item-is-focused',
|
10
10
|
dropdownItemIsDisabled: 'dropdown-item-is-disabled',
|
11
11
|
dropdownItemIsActive: 'dropdown-item-is-active',
|
12
|
-
dropdownItemIsSelected: '
|
12
|
+
dropdownItemIsSelected: 'dropdown-item-is-selected'
|
13
13
|
};
|
14
14
|
var tokens = exports.tokens = {
|
15
15
|
background: '--plasma-dropdown-background',
|
@@ -20,6 +20,8 @@ var tokens = exports.tokens = {
|
|
20
20
|
disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
|
21
21
|
disabledOpacity: '--plasma-dropdown-disabled-opacity',
|
22
22
|
focusColor: '--plasma-dropdown-focus-color',
|
23
|
+
// Old
|
24
|
+
|
23
25
|
dividerColor: '--plasma-dropdown-divider-color',
|
24
26
|
dividerMarginTop: '--plasma-dropdown-divider-margin-top',
|
25
27
|
dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',
|
@@ -34,6 +36,7 @@ var tokens = exports.tokens = {
|
|
34
36
|
itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
|
35
37
|
// Old
|
36
38
|
itemColor: '--plasma-dropdown-item-color',
|
39
|
+
// Old
|
37
40
|
itemColorSelected: '--plasma-dropdown-item-color-selected',
|
38
41
|
// Old
|
39
42
|
itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
|
@@ -52,11 +55,17 @@ var tokens = exports.tokens = {
|
|
52
55
|
itemMarginLeft: '--plasma-dropdown-item-margin-left',
|
53
56
|
// Old
|
54
57
|
itemPaddingTop: '--plasma-dropdown-item-padding-top',
|
58
|
+
// Old
|
55
59
|
itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
|
60
|
+
// Old
|
56
61
|
itemPaddingRight: '--plasma-dropdown-item-padding-right',
|
62
|
+
// Old
|
57
63
|
itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
|
64
|
+
// Old
|
58
65
|
itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
|
66
|
+
// Old
|
59
67
|
itemPaddingLeft: '--plasma-dropdown-item-padding-left',
|
68
|
+
// Old
|
60
69
|
itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
|
61
70
|
// Old
|
62
71
|
itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
|
@@ -71,6 +80,20 @@ var tokens = exports.tokens = {
|
|
71
80
|
itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
|
72
81
|
itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
|
73
82
|
itemFontLineHeight: '--plasma-dropdown-item-font-weight',
|
83
|
+
itemPadding: '--plasma-dropdown-item-padding',
|
84
|
+
itemPaddingTight: '--plasma-dropdown-item-padding-tight',
|
85
|
+
cellPadding: '--plasma-dropdown-cell-padding',
|
86
|
+
cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',
|
87
|
+
cellPaddingContent: '--plasma-dropdown-cell-padding-content',
|
88
|
+
cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',
|
89
|
+
cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',
|
90
|
+
cellGap: '--plasma-dropdown-cell-gap',
|
91
|
+
cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',
|
92
|
+
cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',
|
93
|
+
cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',
|
94
|
+
cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',
|
95
|
+
cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',
|
96
|
+
cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',
|
74
97
|
// TODO: Remove below tokens as soon as they are no longer needed
|
75
98
|
footerBackground: '--plasma-dropdown-footer-background',
|
76
99
|
footerWidth: '--plasma-dropdown-footer-width',
|
@@ -134,4 +157,15 @@ var tokens = exports.tokens = {
|
|
134
157
|
groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',
|
135
158
|
groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',
|
136
159
|
groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left'
|
160
|
+
};
|
161
|
+
var constants = exports.constants = {
|
162
|
+
focusColor: '--surface-accent',
|
163
|
+
background: '--surface-solid-card-brightness',
|
164
|
+
boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',
|
165
|
+
disclosureIconColor: '--text-secondary',
|
166
|
+
itemBackground: '--plasma-colors-transparent',
|
167
|
+
itemBackgroundHover: '--surface-transparent-secondary',
|
168
|
+
opacity: '0.4',
|
169
|
+
cellTitleColor: '--text-primary',
|
170
|
+
cellBackgroundColor: '--plasma-colors-transparent'
|
137
171
|
};
|
@@ -0,0 +1,109 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.FloatingPopover = void 0;
|
7
|
+
var _react = /*#__PURE__*/require("@floating-ui/react");
|
8
|
+
var _react2 = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
12
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
18
|
+
var FloatingPopover = exports.FloatingPopover = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref, ref) {
|
19
|
+
var target = _ref.target,
|
20
|
+
children = _ref.children,
|
21
|
+
opened = _ref.opened,
|
22
|
+
onToggle = _ref.onToggle,
|
23
|
+
placement = _ref.placement,
|
24
|
+
portal = _ref.portal,
|
25
|
+
_ref$offset = _ref.offset,
|
26
|
+
offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
|
27
|
+
isInner = _ref.isInner,
|
28
|
+
trigger = _ref.trigger;
|
29
|
+
var _useFloating = (0, _react.useFloating)({
|
30
|
+
placement: placement === 'auto' ? undefined : placement,
|
31
|
+
open: opened,
|
32
|
+
middleware: [placement === 'auto' && (0, _react.autoPlacement)(), (0, _react.offset)({
|
33
|
+
mainAxis: offset[1],
|
34
|
+
crossAxis: offset[0]
|
35
|
+
}), (0, _react.flip)({
|
36
|
+
fallbackAxisSideDirection: 'end'
|
37
|
+
}), (0, _react.shift)()]
|
38
|
+
}),
|
39
|
+
refs = _useFloating.refs,
|
40
|
+
floatingStyles = _useFloating.floatingStyles;
|
41
|
+
var wrappedId = (0, _plasmaCore.safeUseId)();
|
42
|
+
var handleTargetClick = function handleTargetClick(event) {
|
43
|
+
if (trigger === 'hover') {
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
if (onToggle) {
|
47
|
+
onToggle(!opened, event);
|
48
|
+
}
|
49
|
+
};
|
50
|
+
var handleTargetMouseEnter = function handleTargetMouseEnter(event) {
|
51
|
+
if (trigger === 'click' || opened) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
onToggle(true, event);
|
55
|
+
};
|
56
|
+
var handleTargetMouseLeave = function handleTargetMouseLeave(event) {
|
57
|
+
if (event.relatedTarget instanceof HTMLElement && refs.floating.current instanceof HTMLElement) {
|
58
|
+
var _refs$floating$curren;
|
59
|
+
if (trigger === 'click' || !opened || event.relatedTarget && refs.floating && (_refs$floating$curren = refs.floating.current) !== null && _refs$floating$curren !== void 0 && _refs$floating$curren.contains(event.relatedTarget)) {
|
60
|
+
return;
|
61
|
+
}
|
62
|
+
onToggle(false, event);
|
63
|
+
}
|
64
|
+
};
|
65
|
+
var handleFloatingMouseLeave = function handleFloatingMouseLeave(event) {
|
66
|
+
if (event.relatedTarget instanceof HTMLElement && refs.reference.current instanceof HTMLElement) {
|
67
|
+
var _refs$reference$curre;
|
68
|
+
if (trigger === 'click' || !opened || event.relatedTarget && refs.reference && (_refs$reference$curre = refs.reference.current) !== null && _refs$reference$curre !== void 0 && _refs$reference$curre.contains(event.relatedTarget)) {
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
onToggle(false, event);
|
72
|
+
}
|
73
|
+
};
|
74
|
+
return /*#__PURE__*/_react2["default"].createElement("div", {
|
75
|
+
id: wrappedId,
|
76
|
+
style: {
|
77
|
+
display: isInner ? 'block' : 'inline-block'
|
78
|
+
},
|
79
|
+
ref: ref
|
80
|
+
}, /*#__PURE__*/_react2["default"].createElement("div", {
|
81
|
+
ref: refs.setReference,
|
82
|
+
onClick: handleTargetClick,
|
83
|
+
onMouseEnter: handleTargetMouseEnter,
|
84
|
+
onMouseLeave: handleTargetMouseLeave
|
85
|
+
}, target), opened && /*#__PURE__*/_react2["default"].createElement(_react.FloatingPortal, getFloatingPortalProps(portal, wrappedId), /*#__PURE__*/_react2["default"].createElement("div", {
|
86
|
+
ref: refs.setFloating,
|
87
|
+
onMouseLeave: handleFloatingMouseLeave,
|
88
|
+
style: _objectSpread(_objectSpread({}, floatingStyles), {}, {
|
89
|
+
zIndex: 1
|
90
|
+
})
|
91
|
+
}, children)));
|
92
|
+
});
|
93
|
+
// root - принимает ref контейнера портала.
|
94
|
+
// id - если есть портал - не используется, если портала нет - подставляется 'wrappedId'.
|
95
|
+
var getFloatingPortalProps = function getFloatingPortalProps(portal, wrappedId) {
|
96
|
+
if (!portal) {
|
97
|
+
return {
|
98
|
+
id: wrappedId
|
99
|
+
};
|
100
|
+
}
|
101
|
+
if (typeof portal === 'string') {
|
102
|
+
return {
|
103
|
+
id: portal
|
104
|
+
};
|
105
|
+
}
|
106
|
+
return {
|
107
|
+
root: portal
|
108
|
+
};
|
109
|
+
};
|
@@ -5,29 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.DropdownInner = void 0;
|
7
7
|
var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
|
8
|
+
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
8
9
|
var _ = /*#__PURE__*/require("..");
|
9
10
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.styles");
|
11
|
+
var _FloatingPopover = /*#__PURE__*/require("../../FloatingPopover");
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
11
13
|
var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
|
12
14
|
var item = _ref.item,
|
13
15
|
currentLevel = _ref.currentLevel,
|
14
|
-
focusedPath = _ref.focusedPath,
|
15
16
|
path = _ref.path,
|
16
17
|
dispatchPath = _ref.dispatchPath,
|
17
18
|
index = _ref.index,
|
18
19
|
trigger = _ref.trigger,
|
19
|
-
itemRole = _ref.itemRole,
|
20
20
|
listHeight = _ref.listHeight,
|
21
21
|
listOverflow = _ref.listOverflow,
|
22
|
-
|
23
|
-
closeOnSelect = _ref.closeOnSelect,
|
24
|
-
onHover = _ref.onHover,
|
25
|
-
onItemSelect = _ref.onItemSelect,
|
26
|
-
onItemClick = _ref.onItemClick,
|
27
|
-
listWidth = _ref.listWidth,
|
28
|
-
variant = _ref.variant,
|
29
|
-
hasArrow = _ref.hasArrow,
|
30
|
-
size = _ref.size;
|
22
|
+
listWidth = _ref.listWidth;
|
31
23
|
var handleToggle = function handleToggle(opened) {
|
32
24
|
if (opened) {
|
33
25
|
dispatchPath({
|
@@ -43,79 +35,53 @@ var DropdownInner = exports.DropdownInner = function DropdownInner(_ref) {
|
|
43
35
|
}
|
44
36
|
};
|
45
37
|
var isCurrentListOpen = path[currentLevel + 1] === item.value.toString();
|
46
|
-
var
|
38
|
+
var treeId = (0, _plasmaCore.safeUseId)();
|
39
|
+
var listId = "".concat(treeId, "_tree_level_").concat(currentLevel + 2);
|
47
40
|
var nextLevel = currentLevel + 1;
|
48
41
|
if (item !== null && item !== void 0 && item.items) {
|
49
|
-
return /*#__PURE__*/_react["default"].createElement(
|
50
|
-
opened: isCurrentListOpen,
|
51
|
-
usePortal: false,
|
42
|
+
return /*#__PURE__*/_react["default"].createElement(_FloatingPopover.FloatingPopover, {
|
52
43
|
placement: "right-start",
|
44
|
+
opened: isCurrentListOpen,
|
45
|
+
onToggle: handleToggle,
|
53
46
|
trigger: trigger,
|
54
47
|
target: /*#__PURE__*/_react["default"].createElement(_.DropdownItem, {
|
55
48
|
item: item,
|
56
49
|
index: index,
|
57
50
|
path: path,
|
58
|
-
focusedPath: focusedPath,
|
59
51
|
currentLevel: currentLevel,
|
60
|
-
itemRole: itemRole,
|
61
|
-
onHover: onHover,
|
62
|
-
onItemSelect: onItemSelect,
|
63
|
-
onItemClick: onItemClick,
|
64
|
-
variant: variant,
|
65
|
-
hasArrow: hasArrow,
|
66
52
|
ariaControls: listId,
|
67
53
|
ariaExpanded: isCurrentListOpen,
|
68
54
|
ariaLevel: nextLevel,
|
69
|
-
ariaLabel: item.label
|
70
|
-
size: size
|
55
|
+
ariaLabel: item.label
|
71
56
|
}),
|
72
|
-
|
73
|
-
isFocusTrapped: false,
|
74
|
-
preventOverflow: false
|
57
|
+
isInner: true
|
75
58
|
}, /*#__PURE__*/_react["default"].createElement(_Dropdown.Ul, {
|
59
|
+
id: listId,
|
60
|
+
role: "group",
|
61
|
+
isInnerUl: true,
|
76
62
|
listHeight: listHeight,
|
77
63
|
listOverflow: listOverflow,
|
78
|
-
|
79
|
-
id: listId,
|
80
|
-
listWidth: listWidth,
|
81
|
-
isInnerUl: true
|
64
|
+
listWidth: listWidth
|
82
65
|
}, item.items.map(function (innerItem, innerIndex) {
|
83
66
|
return /*#__PURE__*/_react["default"].createElement(DropdownInner, {
|
84
67
|
key: "".concat(innerIndex, "/").concat(currentLevel),
|
85
68
|
item: innerItem,
|
86
69
|
currentLevel: nextLevel,
|
87
|
-
focusedPath: focusedPath,
|
88
70
|
path: path,
|
89
71
|
dispatchPath: dispatchPath,
|
90
72
|
index: innerIndex,
|
91
73
|
trigger: trigger,
|
92
|
-
itemRole: itemRole,
|
93
74
|
listHeight: listHeight,
|
94
75
|
listOverflow: listOverflow,
|
95
|
-
|
96
|
-
closeOnSelect: closeOnSelect,
|
97
|
-
onHover: onHover,
|
98
|
-
onItemSelect: onItemSelect,
|
99
|
-
onItemClick: onItemClick,
|
100
|
-
listWidth: listWidth,
|
101
|
-
variant: variant,
|
102
|
-
hasArrow: hasArrow,
|
103
|
-
size: size
|
76
|
+
listWidth: listWidth
|
104
77
|
});
|
105
78
|
})));
|
106
79
|
}
|
107
80
|
return /*#__PURE__*/_react["default"].createElement(_.DropdownItem, {
|
108
81
|
item: item,
|
82
|
+
path: path,
|
109
83
|
index: index,
|
110
|
-
focusedPath: focusedPath,
|
111
84
|
currentLevel: currentLevel,
|
112
|
-
|
113
|
-
handleGlobalToggle: handleGlobalToggle,
|
114
|
-
closeOnSelect: closeOnSelect,
|
115
|
-
onHover: onHover,
|
116
|
-
onItemSelect: onItemSelect,
|
117
|
-
onItemClick: onItemClick,
|
118
|
-
variant: variant,
|
119
|
-
size: size
|
85
|
+
ariaLevel: nextLevel
|
120
86
|
});
|
121
87
|
};
|
@@ -9,29 +9,20 @@ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")
|
|
9
9
|
var _Dropdown = /*#__PURE__*/require("../../Dropdown.tokens");
|
10
10
|
var _utils = /*#__PURE__*/require("../../../../utils");
|
11
11
|
var _Icon = /*#__PURE__*/require("../../../_Icon");
|
12
|
+
var _Dropdown2 = /*#__PURE__*/require("../../Dropdown");
|
13
|
+
var _utils2 = /*#__PURE__*/require("../../utils");
|
12
14
|
var _DropdownItem = /*#__PURE__*/require("./DropdownItem.styles");
|
13
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
17
|
var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
16
18
|
var item = _ref.item,
|
17
19
|
path = _ref.path,
|
18
|
-
focusedPath = _ref.focusedPath,
|
19
20
|
currentLevel = _ref.currentLevel,
|
20
21
|
index = _ref.index,
|
21
|
-
itemRole = _ref.itemRole,
|
22
|
-
closeOnSelect = _ref.closeOnSelect,
|
23
|
-
handleGlobalToggle = _ref.handleGlobalToggle,
|
24
|
-
onHover = _ref.onHover,
|
25
|
-
onItemSelect = _ref.onItemSelect,
|
26
|
-
onItemClick = _ref.onItemClick,
|
27
22
|
ariaControls = _ref.ariaControls,
|
28
23
|
ariaExpanded = _ref.ariaExpanded,
|
29
|
-
ariaHasPopup = _ref.ariaHasPopup,
|
30
24
|
ariaLevel = _ref.ariaLevel,
|
31
|
-
ariaLabel = _ref.ariaLabel
|
32
|
-
variant = _ref.variant,
|
33
|
-
hasArrow = _ref.hasArrow,
|
34
|
-
size = _ref.size;
|
25
|
+
ariaLabel = _ref.ariaLabel;
|
35
26
|
var value = item.value,
|
36
27
|
label = item.label,
|
37
28
|
disabled = item.disabled,
|
@@ -41,6 +32,19 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
41
32
|
dividerBefore = item.dividerBefore,
|
42
33
|
dividerAfter = item.dividerAfter;
|
43
34
|
var ref = (0, _react.useRef)(null);
|
35
|
+
var _useContext = (0, _react.useContext)(_Dropdown2.Context),
|
36
|
+
focusedPath = _useContext.focusedPath,
|
37
|
+
size = _useContext.size,
|
38
|
+
variant = _useContext.variant,
|
39
|
+
itemRole = _useContext.itemRole,
|
40
|
+
handleGlobalToggle = _useContext.handleGlobalToggle,
|
41
|
+
closeOnSelect = _useContext.closeOnSelect,
|
42
|
+
onHover = _useContext.onHover,
|
43
|
+
onItemSelect = _useContext.onItemSelect,
|
44
|
+
onItemClick = _useContext.onItemClick,
|
45
|
+
hasArrow = _useContext.hasArrow,
|
46
|
+
treeId = _useContext.treeId;
|
47
|
+
var hasDescendants = Boolean(item.items);
|
44
48
|
var disclosureIconSize = size === 'xs' ? 'xs' : 's';
|
45
49
|
var isDisabledClassName = disabled || isDisabled ? _Dropdown.classes.dropdownItemIsDisabled : undefined;
|
46
50
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? _Dropdown.classes.dropdownItemIsFocused : undefined;
|
@@ -64,7 +68,9 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
64
68
|
if (onItemClick) {
|
65
69
|
onItemClick(item, event);
|
66
70
|
}
|
67
|
-
|
71
|
+
|
72
|
+
// Закрываем весь дропдаун целиком при клике на айтем без потомков. Только при closeOnSelect === true.
|
73
|
+
if (closeOnSelect && !hasDescendants) {
|
68
74
|
handleGlobalToggle(false, event);
|
69
75
|
}
|
70
76
|
};
|
@@ -76,20 +82,25 @@ var DropdownItem = exports.DropdownItem = function DropdownItem(_ref) {
|
|
76
82
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, dividerBefore && /*#__PURE__*/_react["default"].createElement(_DropdownItem.Divider, {
|
77
83
|
variant: variant
|
78
84
|
}), /*#__PURE__*/_react["default"].createElement(_DropdownItem.Wrapper, {
|
85
|
+
ref: ref,
|
79
86
|
className: (0, _utils.cx)(isDisabledClassName, focusedClass, activeClass),
|
80
|
-
id: value.toString(),
|
87
|
+
id: (0, _utils2.getItemId)(treeId, value.toString()),
|
81
88
|
role: itemRole,
|
82
|
-
ref: ref,
|
83
|
-
"aria-disabled": disabled || isDisabled,
|
84
89
|
onClick: handleClick,
|
85
90
|
onMouseEnter: handleHover,
|
86
91
|
variant: variant,
|
92
|
+
"aria-disabled": disabled || isDisabled,
|
87
93
|
"aria-controls": ariaControls,
|
88
94
|
"aria-expanded": ariaExpanded,
|
89
|
-
"aria-haspopup": ariaHasPopup,
|
90
95
|
"aria-level": ariaLevel,
|
91
96
|
"aria-label": ariaLabel
|
92
|
-
},
|
97
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropdownItem.CellWrapper, null, /*#__PURE__*/_react["default"].createElement(_DropdownItem.StyledCell, {
|
98
|
+
contentLeft: contentLeft,
|
99
|
+
contentRight: contentRight,
|
100
|
+
alignContentLeft: "center",
|
101
|
+
alignContentRight: "center",
|
102
|
+
title: label
|
103
|
+
})), item.items && hasArrow && /*#__PURE__*/_react["default"].createElement(_DropdownItem.DisclosureIconWrapper, null, /*#__PURE__*/_react["default"].createElement(_Icon.IconDisclosureRight, {
|
93
104
|
size: disclosureIconSize,
|
94
105
|
color: "inherit"
|
95
106
|
}))), dividerAfter && /*#__PURE__*/_react["default"].createElement(_DropdownItem.Divider, {
|