@salutejs/plasma-new-hope 0.174.0-canary.1497.11463811587.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 +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.js +4 -11
- 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 +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
- 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 +1 -1
- package/cjs/components/Dropdown/Dropdown.js +3 -9
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
- package/cjs/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
- package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
- package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- 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/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/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.js +0 -8
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.js +1 -2
- 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.js +1 -2
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +1 -1
- 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/index.css +1 -1
- 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.tokens.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/es/components/Dropdown/Dropdown.tokens.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
- 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 +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.js +4 -11
- 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 +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -11
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -11
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -11
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -11
- 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 +1 -1
- package/es/components/Dropdown/Dropdown.js +3 -9
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +1 -1
- package/es/components/Dropdown/{Dropdown.styles_18f0qpm.css → Dropdown.styles_1ix6io8.css} +1 -1
- package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -8
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -3
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +0 -2
- package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js.map +1 -1
- 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/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/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.js +0 -8
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/components/Double/Double.js +1 -2
- 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.js +1 -2
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.js +1 -1
- 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/index.css +1 -1
- 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.tokens.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
- package/styled-components/es/components/Dropdown/Dropdown.tokens.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +4 -4
- package/styled-components/package.json +2 -1
@@ -1,14 +1,13 @@
|
|
1
1
|
import React, { useCallback, useMemo } from 'react';
|
2
|
-
import '@linaria/react';
|
3
|
-
import { IconDisclosureLeft } from '../../../_Icon/Icons/IconDisclosureLeft.js';
|
4
|
-
import { IconDisclosureRight } from '../../../_Icon/Icons/IconDisclosureRight.js';
|
5
|
-
import { IconDisclosureDownFill } from '../../../_Icon/Icons/IconDisclosureDownFill.js';
|
6
2
|
import { CalendarState } from '../../store/types.js';
|
7
|
-
import { MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils/constants.js';
|
8
|
-
import { getCalendarType } from '../../utils/calendarGridHelper.js';
|
9
3
|
import { classes } from '../../Calendar.tokens.js';
|
10
4
|
import { sizeMap } from '../../store/reducer.js';
|
11
5
|
import { StyledHeaderDate, StyledArrow, StyledCalendarHeader, StyledNavigation, StyledDoubleHeaderWrapper, StyledHeaderDouble, StyledHeader, StyledArrows } from './CalendarHeader.styles.js';
|
6
|
+
import { IconDisclosureDownFill } from '../../../_Icon/Icons/IconDisclosureDownFill.js';
|
7
|
+
import { IconDisclosureLeft } from '../../../_Icon/Icons/IconDisclosureLeft.js';
|
8
|
+
import { IconDisclosureRight } from '../../../_Icon/Icons/IconDisclosureRight.js';
|
9
|
+
import { getCalendarType } from '../../utils/calendarGridHelper.js';
|
10
|
+
import { MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils/constants.js';
|
12
11
|
|
13
12
|
/**
|
14
13
|
* Компонент шапки календаря.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\n\nimport { IconDisclosureDownFill, IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { CalendarState } from '../../store/types';\nimport { getCalendarType, MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils';\nimport type { DateObject } from '../../Calendar.types';\nimport { classes } from '../../Calendar.tokens';\nimport { sizeMap } from '../../store/reducer';\n\nimport type { CalendarHeaderProps } from './CalendarHeader.types';\nimport {\n StyledArrow,\n StyledArrows,\n StyledCalendarHeader,\n StyledDoubleHeaderWrapper,\n StyledHeader,\n StyledHeaderDate,\n StyledHeaderDouble,\n StyledNavigation,\n} from './CalendarHeader.styles';\n\n/**\n * Компонент шапки календаря.\n */\nexport const CalendarHeader: React.FC<CalendarHeaderProps> = ({\n type = 'Days',\n startYear = 0,\n size,\n firstDate,\n secondDate,\n isDouble,\n onPrev,\n onNext,\n onUpdateCalendarState,\n locale,\n}) => {\n const handleCalendarState = useCallback(() => {\n const newSize: [number, number] = isDouble ? sizeMap.Months.double : sizeMap.Months.single;\n\n if (type === CalendarState.Days) {\n onUpdateCalendarState?.(CalendarState.Months, newSize);\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n onUpdateCalendarState?.(CalendarState.Years, newSize);\n }\n }, [type, onUpdateCalendarState]);\n\n const getHeaderContent = useCallback(\n (date?: DateObject, secondPart?: boolean) => {\n if (!date) {\n return '';\n }\n\n if (type === CalendarState.Days) {\n return (\n <>\n <StyledHeaderDate>{MONTH_NAMES[locale][date.monthIndex]}</StyledHeaderDate>\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n </>\n );\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n return (\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n if (type === CalendarState.Years) {\n const yearValue = secondPart ? startYear + 12 : startYear;\n\n return (\n <StyledHeaderDate>\n {yearValue}—{yearValue + YEAR_RENDER_COUNT - 1}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n return '';\n },\n [type, startYear, size, locale],\n );\n\n const currentCalendarType = getCalendarType(type);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow aria-label={`Предыдущий ${currentCalendarType}`} onClick={() => onPrev()}>\n <IconDisclosureLeft color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onPrev],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow aria-label={`Следующий ${currentCalendarType}`} onClick={() => onNext()}>\n <IconDisclosureRight color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onNext],\n );\n\n return (\n <StyledCalendarHeader>\n {isDouble ? (\n <StyledNavigation>\n <StyledDoubleHeaderWrapper>\n {PreviousButton}\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(firstDate)}\n </StyledHeaderDouble>\n </StyledDoubleHeaderWrapper>\n <StyledDoubleHeaderWrapper className={classes.doubleHeaderLastDateWrapper}>\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(secondDate, true)}\n </StyledHeaderDouble>\n {NextButton}\n </StyledDoubleHeaderWrapper>\n </StyledNavigation>\n ) : (\n <>\n <StyledHeader\n type=\"button\"\n aria-live=\"polite\"\n id=\"id-grid-label\"\n onClick={handleCalendarState}\n tabIndex={0}\n >\n {getHeaderContent(firstDate)}\n </StyledHeader>\n <StyledArrows>\n {PreviousButton}\n {NextButton}\n </StyledArrows>\n </>\n )}\n </StyledCalendarHeader>\n );\n};\n"],"names":["CalendarHeader","_ref","_ref$type","type","_ref$startYear","startYear","size","firstDate","secondDate","isDouble","onPrev","onNext","onUpdateCalendarState","locale","handleCalendarState","useCallback","newSize","sizeMap","Months","single","CalendarState","Days","Quarters","Years","getHeaderContent","date","secondPart","React","createElement","Fragment","StyledHeaderDate","MONTH_NAMES","monthIndex","year","IconDisclosureDownFill","color","yearValue","YEAR_RENDER_COUNT","currentCalendarType","getCalendarType","PreviousButton","useMemo","StyledArrow","concat","onClick","IconDisclosureLeft","NextButton","IconDisclosureRight","StyledCalendarHeader","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble","className","classes","doubleHeaderLastDateWrapper","StyledHeader","id","tabIndex","StyledArrows"],"mappings":";;;;;;;;;;;;AAqBA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA,EAWpD;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CAVFE,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,SAAA;IAAAE,cAAA,GAAAH,IAAA,CACbI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,cAAA;IACbE,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,UAAU,GAAAP,IAAA,CAAVO,UAAU;IACVC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,MAAM,GAAAT,IAAA,CAANS,MAAM;IACNC,MAAM,GAAAV,IAAA,CAANU,MAAM;IACNC,qBAAqB,GAAAX,IAAA,CAArBW,qBAAqB;IACrBC,MAAM,GAAAZ,IAAA,CAANY,MAAM,CAAA;AAEN,EAAA,IAAMC,mBAAmB,GAAGC,WAAW,CAAC,YAAM;AAC1C,IAAA,IAAMC,OAAyB,GAAGP,QAAQ,GAA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ACE,SAAS,EAAEC,OAAO,CAACC,2BAAAA;AAA4B,GAAA,eACtE3B,KAAA,CAAAC,aAAA,CAACuB,kBAAkB,EAAA;AAACP,IAAAA,OAAO,EAAE9B,mBAAoB;IAAC,WAAU,EAAA,QAAA;GACvDU,EAAAA,gBAAgB,CAAChB,UAAU,EAAE,IAAI,CAClB,CAAC,EACpBsC,UACsB,CACb,CAAC,gBAEnBnB,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAE,QAAA,qBACIF,KAAA,CAAAC,aAAA,CAAC2B,YAAY,EAAA;AACTpD,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,WAAA,EAAU,QAAQ;AAClBqD,IAAAA,EAAE,EAAC,eAAe;AAClBZ,IAAAA,OAAO,EAAE9B,mBAAoB;AAC7B2C,IAAAA,QAAQ,EAAE,CAAA;AAAE,GAAA,EAEXjC,gBAAgB,CAACjB,SAAS,CACjB,CAAC,eACfoB,KAAA,CAAAC,aAAA,CAAC8B,YAAY,EACRlB,IAAAA,EAAAA,cAAc,EACdM,UACS,CAChB,CAEY,CAAC,CAAA;AAE/B;;;;"}
|
1
|
+
{"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from 'react';\n\nimport { IconDisclosureDownFill, IconDisclosureLeft, IconDisclosureRight } from '../../../_Icon';\nimport { CalendarState } from '../../store/types';\nimport { getCalendarType, MONTH_NAMES, YEAR_RENDER_COUNT } from '../../utils';\nimport type { DateObject } from '../../Calendar.types';\nimport { classes } from '../../Calendar.tokens';\nimport { sizeMap } from '../../store/reducer';\n\nimport type { CalendarHeaderProps } from './CalendarHeader.types';\nimport {\n StyledArrow,\n StyledArrows,\n StyledCalendarHeader,\n StyledDoubleHeaderWrapper,\n StyledHeader,\n StyledHeaderDate,\n StyledHeaderDouble,\n StyledNavigation,\n} from './CalendarHeader.styles';\n\n/**\n * Компонент шапки календаря.\n */\nexport const CalendarHeader: React.FC<CalendarHeaderProps> = ({\n type = 'Days',\n startYear = 0,\n size,\n firstDate,\n secondDate,\n isDouble,\n onPrev,\n onNext,\n onUpdateCalendarState,\n locale,\n}) => {\n const handleCalendarState = useCallback(() => {\n const newSize: [number, number] = isDouble ? sizeMap.Months.double : sizeMap.Months.single;\n\n if (type === CalendarState.Days) {\n onUpdateCalendarState?.(CalendarState.Months, newSize);\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n onUpdateCalendarState?.(CalendarState.Years, newSize);\n }\n }, [type, onUpdateCalendarState]);\n\n const getHeaderContent = useCallback(\n (date?: DateObject, secondPart?: boolean) => {\n if (!date) {\n return '';\n }\n\n if (type === CalendarState.Days) {\n return (\n <>\n <StyledHeaderDate>{MONTH_NAMES[locale][date.monthIndex]}</StyledHeaderDate>\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n </>\n );\n }\n\n if (type === CalendarState.Months || type === CalendarState.Quarters) {\n return (\n <StyledHeaderDate>\n {date.year}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n if (type === CalendarState.Years) {\n const yearValue = secondPart ? startYear + 12 : startYear;\n\n return (\n <StyledHeaderDate>\n {yearValue}—{yearValue + YEAR_RENDER_COUNT - 1}\n <IconDisclosureDownFill color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledHeaderDate>\n );\n }\n\n return '';\n },\n [type, startYear, size, locale],\n );\n\n const currentCalendarType = getCalendarType(type);\n\n const PreviousButton = useMemo(\n () => (\n <StyledArrow aria-label={`Предыдущий ${currentCalendarType}`} onClick={() => onPrev()}>\n <IconDisclosureLeft color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onPrev],\n );\n\n const NextButton = useMemo(\n () => (\n <StyledArrow aria-label={`Следующий ${currentCalendarType}`} onClick={() => onNext()}>\n <IconDisclosureRight color=\"inherit\" size={size === 'xs' ? 'xs' : 's'} />\n </StyledArrow>\n ),\n [currentCalendarType, size, onNext],\n );\n\n return (\n <StyledCalendarHeader>\n {isDouble ? (\n <StyledNavigation>\n <StyledDoubleHeaderWrapper>\n {PreviousButton}\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(firstDate)}\n </StyledHeaderDouble>\n </StyledDoubleHeaderWrapper>\n <StyledDoubleHeaderWrapper className={classes.doubleHeaderLastDateWrapper}>\n <StyledHeaderDouble onClick={handleCalendarState} aria-live=\"polite\">\n {getHeaderContent(secondDate, true)}\n </StyledHeaderDouble>\n {NextButton}\n </StyledDoubleHeaderWrapper>\n </StyledNavigation>\n ) : (\n <>\n <StyledHeader\n type=\"button\"\n aria-live=\"polite\"\n id=\"id-grid-label\"\n onClick={handleCalendarState}\n tabIndex={0}\n >\n {getHeaderContent(firstDate)}\n </StyledHeader>\n <StyledArrows>\n {PreviousButton}\n {NextButton}\n </StyledArrows>\n </>\n )}\n </StyledCalendarHeader>\n );\n};\n"],"names":["CalendarHeader","_ref","_ref$type","type","_ref$startYear","startYear","size","firstDate","secondDate","isDouble","onPrev","onNext","onUpdateCalendarState","locale","handleCalendarState","useCallback","newSize","sizeMap","Months","single","CalendarState","Days","Quarters","Years","getHeaderContent","date","secondPart","React","createElement","Fragment","StyledHeaderDate","MONTH_NAMES","monthIndex","year","IconDisclosureDownFill","color","yearValue","YEAR_RENDER_COUNT","currentCalendarType","getCalendarType","PreviousButton","useMemo","StyledArrow","concat","onClick","IconDisclosureLeft","NextButton","IconDisclosureRight","StyledCalendarHeader","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble","className","classes","doubleHeaderLastDateWrapper","StyledHeader","id","tabIndex","StyledArrows"],"mappings":";;;;;;;;;;;AAqBA;AACA;AACA;IACaA,cAA6C,GAAG,SAAhDA,cAA6CA,CAAAC,IAAA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CACjB,CAAC,eACfoB,KAAA,CAAAC,aAAA,CAAC8B,YAAY,EACRlB,IAAAA,EAAAA,cAAc,EACdM,UACS,CAChB,CAEY,CAAC,CAAA;AAE/B;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(${tokens.calendarHeaderWrapperPadding});\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n &:hover,\n &:active {\n color: var(${tokens.calendarContentSecondaryColor});\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n padding: var(${tokens.calendarHeaderArrowPadding});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFocusColor}: var(${tokens.iconButtonFocusColor});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n align-items: center;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n height: fit-content;\n\n ${String(flexCenter)};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp16","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":"
|
1
|
+
{"version":3,"file":"CalendarHeader.styles.js","sources":["../../../../../src/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Calendar.tokens';\nimport { component, mergeConfig } from '../../../../engines';\nimport { iconButtonConfig, iconButtonTokens } from '../../../IconButton';\nimport { flexCenter } from '../../mixins';\nimport { addFocus } from '../../../../mixins';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledCalendarHeader = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(${tokens.calendarHeaderWrapperPadding});\n`;\n\nexport const StyledHeader = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n padding: var(${tokens.calendarHeaderPadding});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n\n &:hover,\n &:active {\n color: var(${tokens.calendarContentSecondaryColor});\n }\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n\nexport const StyledHeaderDate = styled.span`\n ${flexCenter};\n pointer-events: none;\n`;\n\nexport const StyledArrows = styled.div`\n display: flex;\n gap: var(${tokens.calendarHeaderArrowGap});\n padding: var(${tokens.calendarHeaderArrowPadding});\n`;\n\n// NOTE: переопределение токенов IconButton\nexport const StyledArrow = styled(IconButton)`\n ${iconButtonTokens.iconButtonColor}: var(${tokens.iconButtonColor});\n ${iconButtonTokens.iconButtonBackgroundColor}: var(${tokens.iconButtonBackgroundColor});\n ${iconButtonTokens.iconButtonColorHover}: var(${tokens.iconButtonColorHover});\n ${iconButtonTokens.iconButtonBackgroundColorHover}: var(${tokens.iconButtonBackgroundColorHover});\n ${iconButtonTokens.iconButtonColorActive}: var(${tokens.iconButtonColorActive});\n ${iconButtonTokens.iconButtonBackgroundColorActive}: var(${tokens.iconButtonBackgroundColorActive});\n ${iconButtonTokens.iconButtonHeight}: var(${tokens.iconButtonHeight});\n ${iconButtonTokens.iconButtonWidth}: var(${tokens.iconButtonWidth});\n ${iconButtonTokens.iconButtonPadding}: var(${tokens.iconButtonPadding});\n ${iconButtonTokens.iconButtonRadius}: var(${tokens.iconButtonRadius});\n ${iconButtonTokens.iconButtonFocusColor}: var(${tokens.iconButtonFocusColor});\n`;\n\nexport const StyledNavigation = styled.div`\n width: 100%;\n ${flexCenter};\n`;\n\nexport const StyledDoubleHeaderWrapper = styled.div`\n width: 100%;\n display: grid;\n align-items: center;\n grid-template-columns: var(${tokens.iconButtonWidth}) 1fr var(${tokens.iconButtonWidth});\n grid-template-areas: 'a b c';\n\n ${StyledArrow} {\n grid-area: a;\n }\n\n &.${classes.doubleHeaderLastDateWrapper} ${StyledArrow} {\n grid-area: c;\n }\n`;\n\nexport const StyledHeaderDouble = styled.button`\n border: none;\n background-color: transparent;\n padding: 0;\n outline: none;\n\n font-family: var(${tokens.calendarHeaderFontFamily});\n font-size: var(${tokens.calendarHeaderFontSize});\n font-style: var(${tokens.calendarHeaderFontStyle});\n font-weight: var(${tokens.calendarHeaderFontWeightBold});\n letter-spacing: var(${tokens.calendarHeaderFontLetterSpacing});\n line-height: var(${tokens.calendarHeaderFontLineHeight});\n\n color: var(${tokens.calendarContentPrimaryColor});\n\n grid-area: b;\n justify-self: center;\n cursor: pointer;\n display: flex;\n gap: var(${tokens.calendarHeaderDateGap});\n justify-content: space-between;\n align-items: center;\n margin: 0;\n height: fit-content;\n\n ${String(flexCenter)};\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.calendarOutlineFocusColor})`,\n outlineRadius: '0.563rem',\n })};\n`;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","StyledCalendarHeader","styled","name","class","propsAsIs","StyledHeader","StyledHeaderDate","StyledArrows","_exp16","StyledArrow","StyledNavigation","StyledDoubleHeaderWrapper","StyledHeaderDouble"],"mappings":";;;;AAQA,IAAMA,sBAAsB,gBAAGC,WAAW,CAACC,gBAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,SAAS,CAACJ,sBAAsB,CAAC,CAAA;AAE7C,IAAMK,oBAAoB,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,sBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKzC,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,MAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA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
1
1
|
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { useRef, useCallback, useEffect } from 'react';
|
3
|
-
import { ROW_MONTH_STEP } from '../../utils/constants.js';
|
4
|
-
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
5
|
-
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
6
|
-
import { useMonths } from '../../hooks/useMonths.js';
|
7
3
|
import { tokens, innerTokens } from '../../Calendar.tokens.js';
|
8
4
|
import { DateStructureItem } from '../DateStructureItem/DateStructureItem.js';
|
9
5
|
import { StyledCalendarMonths, StyledFlex } from './CalendarMonths.styles.js';
|
6
|
+
import { useMonths } from '../../hooks/useMonths.js';
|
7
|
+
import { ROW_MONTH_STEP } from '../../utils/constants.js';
|
8
|
+
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
9
|
+
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
10
10
|
|
11
11
|
/**
|
12
12
|
* Компонент месяцев в календаре.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { useRef, useCallback, useEffect } from 'react';
|
3
|
-
import { ROW_QUARTER_STEP } from '../../utils/constants.js';
|
4
|
-
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
5
|
-
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
6
|
-
import { useQuarters } from '../../hooks/useQuarters.js';
|
7
3
|
import { tokens, innerTokens } from '../../Calendar.tokens.js';
|
8
4
|
import { DateStructureItem } from '../DateStructureItem/DateStructureItem.js';
|
9
5
|
import { StyledCalendarQuarters, StyledFlex } from './CalendarQuarters.styles.js';
|
6
|
+
import { useQuarters } from '../../hooks/useQuarters.js';
|
7
|
+
import { ROW_QUARTER_STEP } from '../../utils/constants.js';
|
8
|
+
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
9
|
+
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
10
10
|
|
11
11
|
/**
|
12
12
|
* Компонент кварталов в календаре.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { useRef, useCallback, useEffect } from 'react';
|
3
|
-
import { ROW_YEAR_STEP } from '../../utils/constants.js';
|
4
|
-
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
5
|
-
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
6
|
-
import { useYears } from '../../hooks/useYears.js';
|
7
3
|
import { tokens, innerTokens } from '../../Calendar.tokens.js';
|
8
4
|
import { DateStructureItem } from '../DateStructureItem/DateStructureItem.js';
|
9
5
|
import { StyledCalendarYears, StyledFlex } from './CalendarYears.styles.js';
|
6
|
+
import { useYears } from '../../hooks/useYears.js';
|
7
|
+
import { ROW_YEAR_STEP } from '../../utils/constants.js';
|
8
|
+
import { canSelectDate } from '../../utils/calendarGridHelper.js';
|
9
|
+
import { isSelectProcess, isSameDay, getInRange, getSideInRange } from '../../utils/calendarRangeHelper.js';
|
10
10
|
|
11
11
|
/**
|
12
12
|
* Компонент годов в календаре.
|
@@ -1,27 +1,26 @@
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { forwardRef, useMemo, useState, useRef, useReducer, useLayoutEffect, createContext } from 'react';
|
3
3
|
import { useForkRef, safeUseId } from '@salutejs/plasma-core';
|
4
|
-
import '../../../utils/react.js';
|
5
|
-
import { isEmpty } from '../../../utils/isEmpty.js';
|
6
|
-
import { useOutsideClick } from '../../../hooks/useOutsideClick.js';
|
7
|
-
import { sizeToIconSize } from '../../Select/utils/sizeToIconSize.js';
|
8
4
|
import { classes } from './Combobox.tokens.js';
|
9
5
|
import { FloatingPopover } from './FloatingPopover.js';
|
10
6
|
import { getItemByFocused, useKeyNavigation } from './hooks/useKeyboardNavigation.js';
|
7
|
+
import { getTreeMaps, getPathMap } from './hooks/getPathMaps.js';
|
8
|
+
import { IconArrowWrapper, StyledArrow, Ul, StyledEmptyState, base } from './Combobox.styles.js';
|
9
|
+
import { base as base$1 } from './variations/_view/base.js';
|
10
|
+
import { base as base$2 } from './variations/_size/base.js';
|
11
11
|
import { initialItemsTransform } from './utils/initialItemsTransform.js';
|
12
|
+
import { filterItems } from './utils/filterItems.js';
|
13
|
+
import { pathReducer } from './reducers/pathReducer.js';
|
14
|
+
import { focusedPathReducer } from './reducers/focusedPathReducer.js';
|
15
|
+
import { useOutsideClick } from '../../../hooks/useOutsideClick.js';
|
16
|
+
import { isEmpty } from '../../../utils/isEmpty.js';
|
12
17
|
import { updateDescendants } from './utils/updateDescendants.js';
|
13
18
|
import { updateAncestors } from './utils/updateAncestors.js';
|
14
19
|
import { updateSingleAncestors } from './utils/updateSingleAncestors.js';
|
15
|
-
import {
|
20
|
+
import { StyledTextField } from './ui/Target/Target.styles.js';
|
21
|
+
import { sizeToIconSize } from '../../Select/utils/sizeToIconSize.js';
|
16
22
|
import { getItemId } from './utils/getItemId.js';
|
17
23
|
import { Inner } from './ui/Inner/Inner.js';
|
18
|
-
import { StyledTextField } from './ui/Target/Target.styles.js';
|
19
|
-
import { pathReducer } from './reducers/pathReducer.js';
|
20
|
-
import { focusedPathReducer } from './reducers/focusedPathReducer.js';
|
21
|
-
import { getTreeMaps, getPathMap } from './hooks/getPathMaps.js';
|
22
|
-
import { IconArrowWrapper, StyledArrow, Ul, StyledEmptyState, base } from './Combobox.styles.js';
|
23
|
-
import { base as base$1 } from './variations/_view/base.js';
|
24
|
-
import { base as base$2 } from './variations/_size/base.js';
|
25
24
|
|
26
25
|
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect"];
|
27
26
|
var Context = /*#__PURE__*/createContext({});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n alwaysOpened = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const [textValue, setTextValue] = useState(valueToItemMap.get(outerValue as string)?.label || '');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled || readOnly) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_valueToItemMap$get2","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","_props$alwaysOpened","alwaysOpened","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","getTreeMaps","_useMemo2","_slicedToArray","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","get","_useState2","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","initialItemsTransform","filteredItems","filterItems","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get3","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACxFC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,mBAAA,EAAAC,oBAAA,EAAAC,iBAAA,CAAA;AACxD,IAAA,IACIC,QAAQ,GA2BRL,KAAK,CA3BLK,QAAQ;MACDC,UAAU,GA0BjBN,KAAK,CA1BLO,KAAK;MACKC,aAAa,GAyBvBR,KAAK,CAzBLS,QAAQ;MACRC,cAA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J,MAAAA,WAAW,EAAC,8FAAA;KACf,CAAC,GAEF1G,aAAa,CAAC0C,GAAG,CAAC,UAACK,IAAI,EAAE4D,KAAK,EAAA;AAAA,MAAA,oBAC1B5B,KAAA,CAAAC,aAAA,CAAC4B,KAAK,EAAA;AACFrD,QAAAA,GAAG,EAAAc,EAAAA,CAAAA,MAAA,CAAKsC,KAAK,EAAK,IAAA,CAAA;AAClB5D,QAAAA,IAAI,EAAEA,IAAK;AACX8D,QAAAA,YAAY,EAAE,CAAE;AAChBlG,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3B+F,QAAAA,KAAK,EAAEA,KAAM;AACbxJ,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CAEL,CACF,CACO,CACH,CACjB,CACH,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM2J,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzL,YAAY;AACpB0L,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR7J,IAAAA,IAAI,EAAE;AACF8J,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD9J,IAAAA,IAAI,EAAE;AACF6J,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD5J,IAAAA,QAAQ,EAAE;AACN0J,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNjK,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;AACpB,GAAA;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"sourcesContent":["import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../engines';\nimport { isEmpty } from '../../../utils';\nimport { useOutsideClick } from '../../../hooks';\nimport { sizeToIconSize } from '../../Select/utils';\n\nimport { classes } from './Combobox.tokens';\nimport { FloatingPopover } from './FloatingPopover';\nimport { useKeyNavigation, getItemByFocused } from './hooks/useKeyboardNavigation';\nimport {\n initialItemsTransform,\n updateAncestors,\n updateDescendants,\n updateSingleAncestors,\n filterItems,\n getItemId,\n} from './utils';\nimport { Inner, StyledTextField } from './ui';\nimport { pathReducer, focusedPathReducer } from './reducers';\nimport { getPathMap, getTreeMaps } from './hooks/getPathMaps';\nimport { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';\nimport type { ItemContext, ComboboxProps } from './Combobox.types';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport type { ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.\n */\nexport const comboboxRoot = (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) =>\n forwardRef<HTMLInputElement, ComboboxProps>((props, ref) => {\n const {\n multiple,\n value: outerValue,\n onChange: outerOnChange,\n isTargetAmount,\n items,\n placement = 'bottom-start',\n label,\n placeholder,\n helperText,\n contentLeft,\n textBefore,\n textAfter,\n variant = 'normal',\n listOverflow,\n listHeight,\n listWidth,\n portal,\n renderItem,\n view,\n size,\n labelPlacement,\n readOnly = false,\n disabled = false,\n alwaysOpened = false,\n filter,\n closeAfterSelect: outerCloseAfterSelect,\n ...rest\n } = props;\n // Создаем структуры для быстрой работы с деревом\n const [valueToCheckedMap, valueToItemMap, labelToItemMap] = useMemo(() => getTreeMaps(items), [items]);\n\n const [textValue, setTextValue] = useState(valueToItemMap.get(outerValue as string)?.label || '');\n const [internalValue, setInternalValue] = useState<string | string[]>(multiple ? [] : '');\n\n const value = outerValue || internalValue;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const treeId = safeUseId();\n\n const transformedItems = useMemo(() => initialItemsTransform(items || []), [items]);\n\n const filteredItems = filterItems(\n transformedItems,\n textValue,\n valueToItemMap.get(value as string)?.label as string,\n filter,\n );\n\n const [pathMap, focusedToValueMap] = useMemo(() => getPathMap(filteredItems), [filteredItems, textValue]);\n\n // Состояния дерева элементов\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n const [checked, setChecked] = useState(valueToCheckedMap);\n\n const isCurrentListOpen = alwaysOpened || Boolean(path[0]);\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n const withArrowInverse = isCurrentListOpen ? classes.arrowInverse : undefined;\n const closeAfterSelect = outerCloseAfterSelect ?? !multiple;\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>(() => {\n if (!isCurrentListOpen) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n // Проверяем, отличается ли значение в инпуте от выбранного value после закрытия дропдауна.\n // Если изменилось, то возвращаем label выбранного айтема.\n // Если нет выбранного элемента, то стираем значение инпута.\n if (textValue !== value) {\n if (isEmpty(value)) {\n setTextValue('');\n } else {\n setTextValue(valueToItemMap.get(value as string)?.label || '');\n }\n }\n }, floatingPopoverRef);\n\n const onChange = (newValue: string | Array<string>) => {\n if (outerOnChange) {\n outerOnChange(newValue as any);\n }\n\n setInternalValue(newValue);\n };\n\n const handleClickArrow = () => {\n if (disabled || readOnly) {\n return;\n }\n\n if (isCurrentListOpen) {\n dispatchPath({ type: 'reset' });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n }\n\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик изменения значения в инпуте\n const handleTextValueChange = (e: ChangeEvent<HTMLInputElement>) => {\n setTextValue(e.target.value);\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'reset' });\n };\n\n // Обработчик чипов\n const handleChipsChange = (chipLabels: any[]) => {\n onChange(chipLabels.map((chipLabel) => labelToItemMap.get(chipLabel)!.value));\n };\n\n // Обработчик открытия/закрытия выпадающего списка\n const handleListToggle = (opened: boolean) => {\n if (disabled || readOnly) {\n return;\n }\n\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n };\n\n // Обработчик выбора чекбоксов (только при multiple)\n const handleCheckboxChange = (item: ItemOptionTransformed) => {\n if (!multiple) {\n return;\n }\n\n const checkedCopy = new Map(checked);\n\n if (!checkedCopy.get(item.value)) {\n checkedCopy.set(item.value, true);\n updateDescendants(item, checkedCopy, true);\n } else {\n checkedCopy.set(item.value, false);\n updateDescendants(item, checkedCopy, false);\n }\n\n updateAncestors(item, checkedCopy);\n\n const newValues: Array<string> = [];\n\n valueToItemMap.forEach((item, key) => {\n if (checkedCopy.get(key)) {\n newValues.push(item.value);\n }\n });\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(newValues);\n }\n\n // После выбора/снятия чекбокса скроллим к инпуту\n setTimeout(() => {\n if (inputRef.current) {\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n inline: 'start',\n });\n }\n }, 1);\n };\n\n // Обработчик клика по айтему выпадающего списка\n const handleItemClick = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (!isEmpty(item?.items)) {\n return;\n }\n\n if (multiple) {\n handleCheckboxChange(item);\n return;\n }\n\n if (e) {\n e.stopPropagation();\n }\n\n const checkedCopy = new Map(checked);\n\n const isCurrentChecked = checkedCopy.get(item.value);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isCurrentChecked) {\n checkedCopy.set(item.value, 'done');\n updateSingleAncestors(item, checkedCopy, 'dot');\n }\n\n setTextValue(isCurrentChecked ? '' : item.label);\n\n if (!alwaysOpened && closeAfterSelect) {\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n }\n\n if (onChange) {\n onChange(isCurrentChecked ? '' : item.value);\n }\n };\n\n const getChips = (): string[] => {\n if (multiple) {\n if (value.length === 0) return [];\n\n if (isTargetAmount) {\n return [`Выбрано ${value.length}`];\n }\n\n return (value as []).map((value) => valueToItemMap.get(value)!.label);\n }\n\n return [];\n };\n\n const handlePressDown = (item: ItemOptionTransformed, e?: React.MouseEvent<HTMLElement>) => {\n if (isEmpty(item.items)) {\n handleItemClick(item, e);\n } else if (multiple) {\n handleCheckboxChange(item);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n multiselect: multiple,\n setTextValue,\n });\n\n // В данном эффекте мы следим за изменениями value снаружи и вносим коррективы в дерево чекбоксов.\n // Пример: когда юзер очистил value извне, тогда нужно пройтись по элементам и выключить все чекбоксы.\n useLayoutEffect(() => {\n const checkedCopy = new Map(checked);\n\n checkedCopy.forEach((_, key) => {\n checkedCopy.set(key, false);\n });\n\n if (!isEmpty(value)) {\n if (Array.isArray(value)) {\n value.forEach((val) => {\n checkedCopy.set(val, true);\n updateDescendants(valueToItemMap.get(val)!, checkedCopy, true);\n updateAncestors(valueToItemMap.get(val)!, checkedCopy);\n });\n } else {\n checkedCopy.set(value, 'done');\n updateSingleAncestors(valueToItemMap.get(value)!, checkedCopy, 'dot');\n }\n }\n\n setChecked(checkedCopy);\n }, [value]);\n\n return (\n <Root size={size} view={view} labelPlacement={labelPlacement} disabled={disabled} readOnly={readOnly}>\n <div>\n <Context.Provider\n value={{\n focusedPath,\n checked,\n multiple,\n size,\n handleCheckboxChange,\n handleItemClick,\n variant,\n renderItem,\n valueToItemMap,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={(opened: boolean) => opened && handleListToggle(true)}\n placement={placement}\n portal={portal}\n target={(referenceRef) => (\n <StyledTextField\n ref={inputForkRef}\n inputWrapperRef={referenceRef}\n value={textValue}\n onChange={handleTextValueChange}\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n label={label}\n placeholder={placeholder}\n contentLeft={contentLeft}\n contentRight={\n <IconArrowWrapper disabled={disabled} onClick={handleClickArrow}>\n <StyledArrow\n color=\"inherit\"\n size={sizeToIconSize(size)}\n className={withArrowInverse}\n />\n </IconArrowWrapper>\n }\n textBefore={textBefore}\n textAfter={textAfter}\n onKeyDown={onKeyDown}\n leftHelper={helperText}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={`${treeId}_tree_level_1`}\n aria-expanded={isCurrentListOpen}\n aria-activedescendant={\n activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''\n }\n {...(multiple\n ? {\n enumerationType: 'chip',\n chips: getChips(),\n onChangeChips: handleChipsChange,\n }\n : { enumerationType: 'plain' })}\n {...rest}\n onEnterDisabled // Пропс для отключения обработчика Enter внутри Textfield\n />\n )}\n >\n <Root\n size={size}\n view={view}\n labelPlacement={labelPlacement}\n disabled={disabled}\n readOnly={readOnly}\n >\n <Ul\n role=\"tree\"\n id={`${treeId}_tree_level_1`}\n aria-multiselectable={Boolean(multiple)}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n ref={targetRef}\n >\n {isEmpty(filteredItems) ? (\n <StyledEmptyState\n className={classes.emptyStateWrapper}\n size={size}\n description=\"Ничего не найдено\"\n />\n ) : (\n filteredItems.map((item, index) => (\n <Inner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listWidth={listWidth}\n />\n ))\n )}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n </div>\n </Root>\n );\n });\n\nexport const comboboxConfig = {\n name: 'Select',\n tag: 'div',\n layout: comboboxRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n readOnly: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n labelPlacement: 'outer',\n },\n};\n"],"names":["Context","createContext","comboboxRoot","Root","forwardRef","props","ref","_valueToItemMap$get","_valueToItemMap$get2","_getItemByFocused","multiple","outerValue","value","outerOnChange","onChange","isTargetAmount","items","_props$placement","placement","label","placeholder","helperText","contentLeft","textBefore","textAfter","_props$variant","variant","listOverflow","listHeight","listWidth","portal","renderItem","view","size","labelPlacement","_props$readOnly","readOnly","_props$disabled","disabled","_props$alwaysOpened","alwaysOpened","filter","outerCloseAfterSelect","closeAfterSelect","rest","_objectWithoutProperties","_excluded","_useMemo","useMemo","getTreeMaps","_useMemo2","_slicedToArray","valueToCheckedMap","valueToItemMap","labelToItemMap","_useState","useState","get","_useState2","textValue","setTextValue","_useState3","_useState4","internalValue","setInternalValue","inputRef","useRef","floatingPopoverRef","inputForkRef","useForkRef","treeId","safeUseId","transformedItems","initialItemsTransform","filteredItems","filterItems","_useMemo3","getPathMap","_useMemo4","pathMap","focusedToValueMap","_useReducer","useReducer","pathReducer","_useReducer2","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useState5","_useState6","checked","setChecked","isCurrentListOpen","Boolean","activeDescendantItemValue","getItemByFocused","withArrowInverse","classes","arrowInverse","undefined","targetRef","useOutsideClick","type","isEmpty","_valueToItemMap$get3","newValue","handleClickArrow","handleTextValueChange","e","target","handleChipsChange","chipLabels","map","chipLabel","handleListToggle","opened","handleCheckboxChange","item","checkedCopy","Map","set","updateDescendants","updateAncestors","newValues","forEach","key","push","setTimeout","current","scrollIntoView","behavior","inline","handleItemClick","stopPropagation","isCurrentChecked","_","updateSingleAncestors","getChips","length","concat","handlePressDown","_useKeyNavigation","useKeyNavigation","multiselect","onKeyDown","useLayoutEffect","Array","isArray","val","React","createElement","Provider","FloatingPopover","onToggle","referenceRef","StyledTextField","_extends","inputWrapperRef","contentRight","IconArrowWrapper","onClick","StyledArrow","color","sizeToIconSize","className","leftHelper","role","getItemId","enumerationType","chips","onChangeChips","onEnterDisabled","Ul","id","StyledEmptyState","emptyStateWrapper","description","index","Inner","currentLevel","comboboxConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IA6BaA,OAAO,gBAAGC,aAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA+D,EAAA;AAAA,EAAA,oBACxFC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AAAA,IAAA,IAAAC,mBAAA,EAAAC,oBAAA,EAAAC,iBAAA,CAAA;AACxD,IAAA,IACIC,QAAQ,GA2BRL,KAAK,CA3BLK,QAAQ;MACDC,UAAU,GA0BjBN,KAAK,CA1BLO,KAAK;MACKC,aAAa,GAyBvBR,KAAK,CAzBLS,QAAQ;MACRC,cAAc,GAwBdV,KAAK,CAxBLU,cAAc;MACdC,KAAK,GAuBLX,KAAK,CAvBLW,KAAK;MAAAC,gBAAA,GAuBLZ,KAAK,CAtBLa,SAAS;AAATA,MAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,gBAAA;MAC1BE,KAAK,GAqBLd,KAAK,CArBLc,KAAK;MACLC,WAAW,GAoBXf,KAAK,CApBLe,WAAW;MACXC,UAAU,GAmBVhB,KAAK,CAnBLgB,UAAU;MACVC,WAAW,GAkBXjB,KAAK,CAlBLiB,WAAW;MAC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,YAAY,EAAEA,YAAa;AAC3B+F,QAAAA,KAAK,EAAEA,KAAM;AACbxJ,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CAEL,CACF,CACO,CACH,CACjB,CACH,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAM2J,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,QAAQ;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEzL,YAAY;AACpB0L,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR7J,IAAAA,IAAI,EAAE;AACF8J,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD9J,IAAAA,IAAI,EAAE;AACF6J,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD5J,IAAAA,QAAQ,EAAE;AACN0J,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNjK,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,cAAc,EAAE,OAAA;AACpB,GAAA;AACJ;;;;"}
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import './Combobox.styles_1s09ifw.css';
|
2
2
|
import { styled } from '@linaria/react';
|
3
|
-
import {
|
4
|
-
import 'react';
|
3
|
+
import { tokens, constants } from './Combobox.tokens.js';
|
5
4
|
import { IconDisclosureDownCentered } from '../../_Icon/Icons/IconDisclosureDownCentered.js';
|
6
|
-
import '@linaria/core';
|
7
5
|
import { component, mergeConfig } from '../../../engines/common.js';
|
8
|
-
import {
|
6
|
+
import { emptyStateConfig } from '../../EmptyState/EmptyState.js';
|
9
7
|
|
10
8
|
var mergedConfig = /*#__PURE__*/mergeConfig(emptyStateConfig);
|
11
9
|
var EmptyState = /*#__PURE__*/component(mergedConfig);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.styles.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { emptyStateConfig, emptyStateTokens } from '../../EmptyState';\nimport { IconDisclosureDownCentered } from '../../_Icon';\nimport { component, mergeConfig } from '../../../engines';\n\nimport { ComboboxProps } from './Combobox.types';\nimport { tokens, constants, classes } from './Combobox.tokens';\n\nconst mergedConfig = mergeConfig(emptyStateConfig);\nconst EmptyState = component(mergedConfig);\n\nexport const Ul = styled.ul<{\n listOverflow?: ComboboxProps['listOverflow'];\n listHeight?: ComboboxProps['listHeight'];\n listWidth?: ComboboxProps['listWidth'];\n isInnerUl?: boolean;\n}>`\n box-sizing: border-box;\n\n background: var(${constants.background});\n box-shadow: ${constants.boxShadow};\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || '100%'};\n height: ${({ listHeight }) => listHeight || 'auto'};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n\n border: var(${tokens.dropdownBorderWidth}) solid var(${tokens.dropdownBorderColor});\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 0` : 0)};\n padding: var(${tokens.padding}) 0;\n\n .${classes.emptyStateWrapper} {\n box-shadow: none;\n }\n`;\n\nexport const IconArrowWrapper = styled.div<{ disabled: boolean }>`\n line-height: 0;\n color: var(${constants.disclosureIconColor});\n cursor: ${({ disabled }) => (disabled ? 'inherit' : 'pointer')};\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n\n &:hover,\n &:active {\n color: ${({ disabled }) =>\n disabled ? `var(${constants.disclosureIconColor})` : `var(${constants.disclosureIconColorHover})`};\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const base = css``;\n\nexport const StyledEmptyState = styled(EmptyState)`\n ${emptyStateTokens.borderRadius}: var(${tokens.textFieldBorderRadius});\n ${emptyStateTokens.padding}: var(${tokens.emptyStatePadding});\n ${emptyStateTokens.fontFamily}: var(${tokens.textFieldFontFamily});\n ${emptyStateTokens.fontSize}: var(${tokens.textFieldFontSize});\n ${emptyStateTokens.fontStyle}: var(${tokens.textFieldFontStyle});\n ${emptyStateTokens.fontWeight}: var(${tokens.textFieldFontWeight});\n ${emptyStateTokens.fontLetterSpacing}: var(${tokens.textFieldLetterSpacing});\n ${emptyStateTokens.fontLineHeight}: var(${tokens.textFieldLineHeight});\n`;\n"],"names":["mergedConfig","mergeConfig","emptyStateConfig","EmptyState","component","_exp4","_ref","listWidth","_exp5","_ref2","listHeight","_exp6","_ref3","listOverflow","_exp9","_ref4","isInnerUl","concat","tokens","padding","Ul","styled","name","class","propsAsIs","vars","_exp13","_ref5","disabled","_exp15","_ref6","constants","disclosureIconColor","disclosureIconColorHover","IconArrowWrapper","_exp16","IconDisclosureDownCentered","StyledArrow","base","_exp17","StyledEmptyState"],"mappings":"
|
1
|
+
{"version":3,"file":"Combobox.styles.js","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { emptyStateConfig, emptyStateTokens } from '../../EmptyState';\nimport { IconDisclosureDownCentered } from '../../_Icon';\nimport { component, mergeConfig } from '../../../engines';\n\nimport { ComboboxProps } from './Combobox.types';\nimport { tokens, constants, classes } from './Combobox.tokens';\n\nconst mergedConfig = mergeConfig(emptyStateConfig);\nconst EmptyState = component(mergedConfig);\n\nexport const Ul = styled.ul<{\n listOverflow?: ComboboxProps['listOverflow'];\n listHeight?: ComboboxProps['listHeight'];\n listWidth?: ComboboxProps['listWidth'];\n isInnerUl?: boolean;\n}>`\n box-sizing: border-box;\n\n background: var(${constants.background});\n box-shadow: ${constants.boxShadow};\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || '100%'};\n height: ${({ listHeight }) => listHeight || 'auto'};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n\n border: var(${tokens.dropdownBorderWidth}) solid var(${tokens.dropdownBorderColor});\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 0` : 0)};\n padding: var(${tokens.padding}) 0;\n\n .${classes.emptyStateWrapper} {\n box-shadow: none;\n }\n`;\n\nexport const IconArrowWrapper = styled.div<{ disabled: boolean }>`\n line-height: 0;\n color: var(${constants.disclosureIconColor});\n cursor: ${({ disabled }) => (disabled ? 'inherit' : 'pointer')};\n\n .${classes.arrowInverse} {\n transform: rotate(-180deg);\n }\n\n &:hover,\n &:active {\n color: ${({ disabled }) =>\n disabled ? `var(${constants.disclosureIconColor})` : `var(${constants.disclosureIconColorHover})`};\n }\n`;\n\nexport const StyledArrow = styled(IconDisclosureDownCentered)``;\n\nexport const base = css``;\n\nexport const StyledEmptyState = styled(EmptyState)`\n ${emptyStateTokens.borderRadius}: var(${tokens.textFieldBorderRadius});\n ${emptyStateTokens.padding}: var(${tokens.emptyStatePadding});\n ${emptyStateTokens.fontFamily}: var(${tokens.textFieldFontFamily});\n ${emptyStateTokens.fontSize}: var(${tokens.textFieldFontSize});\n ${emptyStateTokens.fontStyle}: var(${tokens.textFieldFontStyle});\n ${emptyStateTokens.fontWeight}: var(${tokens.textFieldFontWeight});\n ${emptyStateTokens.fontLetterSpacing}: var(${tokens.textFieldLetterSpacing});\n ${emptyStateTokens.fontLineHeight}: var(${tokens.textFieldLineHeight});\n`;\n"],"names":["mergedConfig","mergeConfig","emptyStateConfig","EmptyState","component","_exp4","_ref","listWidth","_exp5","_ref2","listHeight","_exp6","_ref3","listOverflow","_exp9","_ref4","isInnerUl","concat","tokens","padding","Ul","styled","name","class","propsAsIs","vars","_exp13","_ref5","disabled","_exp15","_ref6","constants","disclosureIconColor","disclosureIconColorHover","IconArrowWrapper","_exp16","IconDisclosureDownCentered","StyledArrow","base","_exp17","StyledEmptyState"],"mappings":";;;;;;AAUA,IAAMA,YAAY,gBAAGC,WAAW,CAACC,gBAAgB,CAAC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CAAA,CAAA;AAArD,IAAMC,WAAW,gBAAGhB,MAAM,CAAAc,MAAA,EAAA,CAAA,CAAA;AAAAb,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAA8B,EAAA;AAExD,IAAMc,IAAI,GAAQ,UAAA;AAAC,IAAAC,MAAA,GAvDRA,SAuDQA,MAAAA,GAAA;AAAA,EAAA,OAEapC,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMqC,gBAAgB,gBAAGnB,MAAM,CAAAkB,MAAA,EAAA,CAAA,CAAA;AAAAjB,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CASrC;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getPathMaps.js","sources":["../../../../../src/components/Combobox/ComboboxNew/hooks/getPathMaps.ts"],"sourcesContent":["import { isEmpty } from '../../../../utils';\nimport { ComboboxProps } from '../Combobox.types';\nimport { ItemOptionTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nexport type PathMapType = Map<string, number>;\nexport type FocusedToValueMapType = Map<string, ItemOptionTransformed>;\nexport type ValueToCheckedMapType = Map<ItemOptionTransformed['value'], boolean | 'done' | 'dot' | 'indeterminate'>;\nexport type ValueToItemMapType = Map<ItemOptionTransformed['value'], ItemOptionTransformed>;\nexport type LabelToItemMapType = Map<ItemOptionTransformed['label'], ItemOptionTransformed>;\n\nexport const getPathMap = (items: ComboboxProps['items']) => {\n const pathMap: PathMapType = new Map();\n const focusedToValueMap: FocusedToValueMapType = new Map();\n\n pathMap.set('root', items?.length || 0);\n\n const rec = (items: ComboboxProps['items'], prevIndex = '') => {\n items?.forEach((item: ItemOptionTransformed, index: number) => {\n const { value, items: innerItems } = item;\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n\n focusedToValueMap.set(currIndex, item);\n\n if (innerItems) {\n pathMap.set(value, innerItems.length);\n rec(innerItems, currIndex);\n }\n });\n };\n rec(items);\n\n return [pathMap, focusedToValueMap] as [PathMapType, FocusedToValueMapType];\n};\n\nexport const getTreeMaps = (items: ComboboxProps['items']) => {\n const valueToCheckedMap: ValueToCheckedMapType = new Map();\n const valueToItemMap: ValueToItemMapType = new Map();\n const labelToItemMap: ValueToItemMapType = new Map();\n\n const rec = (items: ComboboxProps['items'], prevIndex = '') => {\n items?.forEach((item: ItemOptionTransformed, index: number) => {\n const { value, label, items: innerItems } = item;\n\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n\n valueToCheckedMap.set(value, false);\n\n if (isEmpty(innerItems) || !innerItems) {\n valueToItemMap.set(value, item);\n labelToItemMap.set(label, item);\n } else {\n rec(innerItems, currIndex);\n }\n });\n };\n rec(items);\n\n return [valueToCheckedMap, valueToItemMap, labelToItemMap] as [\n ValueToCheckedMapType,\n ValueToItemMapType,\n LabelToItemMapType,\n ];\n};\n"],"names":["getPathMap","items","pathMap","Map","focusedToValueMap","set","length","rec","prevIndex","arguments","undefined","forEach","item","index","value","innerItems","currIndex","concat","replace","getTreeMaps","valueToCheckedMap","valueToItemMap","labelToItemMap","label","isEmpty"],"mappings":"
|
1
|
+
{"version":3,"file":"getPathMaps.js","sources":["../../../../../src/components/Combobox/ComboboxNew/hooks/getPathMaps.ts"],"sourcesContent":["import { isEmpty } from '../../../../utils';\nimport { ComboboxProps } from '../Combobox.types';\nimport { ItemOptionTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nexport type PathMapType = Map<string, number>;\nexport type FocusedToValueMapType = Map<string, ItemOptionTransformed>;\nexport type ValueToCheckedMapType = Map<ItemOptionTransformed['value'], boolean | 'done' | 'dot' | 'indeterminate'>;\nexport type ValueToItemMapType = Map<ItemOptionTransformed['value'], ItemOptionTransformed>;\nexport type LabelToItemMapType = Map<ItemOptionTransformed['label'], ItemOptionTransformed>;\n\nexport const getPathMap = (items: ComboboxProps['items']) => {\n const pathMap: PathMapType = new Map();\n const focusedToValueMap: FocusedToValueMapType = new Map();\n\n pathMap.set('root', items?.length || 0);\n\n const rec = (items: ComboboxProps['items'], prevIndex = '') => {\n items?.forEach((item: ItemOptionTransformed, index: number) => {\n const { value, items: innerItems } = item;\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n\n focusedToValueMap.set(currIndex, item);\n\n if (innerItems) {\n pathMap.set(value, innerItems.length);\n rec(innerItems, currIndex);\n }\n });\n };\n rec(items);\n\n return [pathMap, focusedToValueMap] as [PathMapType, FocusedToValueMapType];\n};\n\nexport const getTreeMaps = (items: ComboboxProps['items']) => {\n const valueToCheckedMap: ValueToCheckedMapType = new Map();\n const valueToItemMap: ValueToItemMapType = new Map();\n const labelToItemMap: ValueToItemMapType = new Map();\n\n const rec = (items: ComboboxProps['items'], prevIndex = '') => {\n items?.forEach((item: ItemOptionTransformed, index: number) => {\n const { value, label, items: innerItems } = item;\n\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n\n valueToCheckedMap.set(value, false);\n\n if (isEmpty(innerItems) || !innerItems) {\n valueToItemMap.set(value, item);\n labelToItemMap.set(label, item);\n } else {\n rec(innerItems, currIndex);\n }\n });\n };\n rec(items);\n\n return [valueToCheckedMap, valueToItemMap, labelToItemMap] as [\n ValueToCheckedMapType,\n ValueToItemMapType,\n LabelToItemMapType,\n ];\n};\n"],"names":["getPathMap","items","pathMap","Map","focusedToValueMap","set","length","rec","prevIndex","arguments","undefined","forEach","item","index","value","innerItems","currIndex","concat","replace","getTreeMaps","valueToCheckedMap","valueToItemMap","labelToItemMap","label","isEmpty"],"mappings":";;IAUaA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAA6B,EAAK;AACzD,EAAA,IAAMC,OAAoB,GAAG,IAAIC,GAAG,EAAE,CAAA;AACtC,EAAA,IAAMC,iBAAwC,GAAG,IAAID,GAAG,EAAE,CAAA;AAE1DD,EAAAA,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AAG,EAAE,CAAA;AAC1D,EAAA,IAAMkB,cAAkC,GAAG,IAAIlB,GAAG,EAAE,CAAA;AACpD,EAAA,IAAMmB,cAAkC,GAAG,IAAInB,GAAG,EAAE,CAAA;AAEpD,EAAA,IAAMI,GAAG,GAAG,SAANA,GAAGA,CAAIN,KAA6B,EAAqB;IAC3DA,KAAK,KAAA,IAAA,IAALA,KAAK,KAAA,KAAA,CAAA,IAALA,KAAK,CAAEU,OAAO,CAAC,UAACC,IAA2B,EAAEC,KAAa,EAAK;AAC3D,MAAA,IAAQC,KAAK,GAA+BF,IAAI,CAAxCE,KAAK;QAAES,KAAK,GAAwBX,IAAI,CAAjCW,KAAK;QAASR,UAAU,GAAKH,IAAI,CAA1BX,KAAK,CAAA;AAI3BmB,MAAAA,iBAAiB,CAACf,GAAG,CAACS,KAAK,EAAE,KAAK,CAAC,CAAA;AAEnC,MAAA,IAAIU,OAAO,CAACT,UAAU,CAAC,IAAI,CAACA,UAAU,EAAE;AACpCM,QAAAA,cAAc,CAAChB,GAAG,CAACS,KAAK,EAAEF,IAAI,CAAC,CAAA;AAC/BU,QAAAA,cAAc,CAACjB,GAAG,CAACkB,KAAK,EAAEX,IAAI,CAAC,CAAA;AACnC,OAAC,MAAM;AACHL,QAAAA,GAAG,CAACQ,UAAqB,CAAC,CAAA;AAC9B,OAAA;AACJ,KAAC,CAAC,CAAA;GACL,CAAA;EACDR,GAAG,CAACN,KAAK,CAAC,CAAA;AAEV,EAAA,OAAO,CAACmB,iBAAiB,EAAEC,cAAc,EAAEC,cAAc,CAAC,CAAA;AAK9D;;;;"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { safeUseId } from '@salutejs/plasma-core';
|
3
3
|
import { FloatingPopover } from '../../FloatingPopover.js';
|
4
|
-
import '../../../../../utils/react.js';
|
5
|
-
import { isEmpty } from '../../../../../utils/isEmpty.js';
|
6
4
|
import { Ul } from '../../Combobox.styles.js';
|
5
|
+
import { isEmpty } from '../../../../../utils/isEmpty.js';
|
7
6
|
import { Item } from './ui/Item/Item.js';
|
8
7
|
|
9
8
|
var Inner = function Inner(_ref) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Inner.js","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/Inner/Inner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { FloatingPopover } from '../../FloatingPopover';\nimport { isEmpty } from '../../../../../utils';\nimport { Ul } from '../../Combobox.styles';\n\nimport type { ItemOptionTransformed } from './ui/Item/Item.types';\nimport { Item } from './ui';\nimport { InnerProps } from './Inner.type';\n\nexport const Inner: FC<InnerProps> = ({ item, currentLevel, path, dispatchPath, index, listWidth }) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (!isEmpty(item?.items)) {\n return (\n <FloatingPopover\n placement=\"right-start\"\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n offset={2}\n target={\n <Item\n item={item}\n path={path}\n currentLevel={currentLevel}\n index={index}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n >\n <Ul role=\"group\" id={listId} isInnerUl listWidth={listWidth}>\n {item.items?.map((innerItem: ItemOptionTransformed, innerIndex: number) => (\n <Inner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </FloatingPopover>\n );\n }\n\n return <Item item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n"],"names":["Inner","_ref","item","currentLevel","path","dispatchPath","index","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","isEmpty","items","_item$items","React","createElement","FloatingPopover","placement","onToggle","offset","target","Item","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","Ul","role","id","isInnerUl","map","innerItem","innerIndex","key"],"mappings":"
|
1
|
+
{"version":3,"file":"Inner.js","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/Inner/Inner.tsx"],"sourcesContent":["import React from 'react';\nimport type { FC } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { FloatingPopover } from '../../FloatingPopover';\nimport { isEmpty } from '../../../../../utils';\nimport { Ul } from '../../Combobox.styles';\n\nimport type { ItemOptionTransformed } from './ui/Item/Item.types';\nimport { Item } from './ui';\nimport { InnerProps } from './Inner.type';\n\nexport const Inner: FC<InnerProps> = ({ item, currentLevel, path, dispatchPath, index, listWidth }) => {\n const handleToggle = (opened: boolean): void => {\n if (opened) {\n dispatchPath({ type: 'changed_on_level', value: item.value.toString(), level: currentLevel + 1 });\n } else {\n dispatchPath({ type: 'cut_by_level', level: currentLevel + 1 });\n }\n };\n\n const isCurrentListOpen = path[currentLevel + 1] === item.value.toString();\n\n const treeId = safeUseId();\n const listId = `${treeId}_tree_level_${currentLevel + 2}`;\n const nextLevel = currentLevel + 1;\n\n if (!isEmpty(item?.items)) {\n return (\n <FloatingPopover\n placement=\"right-start\"\n opened={isCurrentListOpen}\n onToggle={handleToggle}\n offset={2}\n target={\n <Item\n item={item}\n path={path}\n currentLevel={currentLevel}\n index={index}\n ariaControls={listId}\n ariaExpanded={isCurrentListOpen}\n ariaLevel={nextLevel}\n ariaLabel={item.label}\n />\n }\n >\n <Ul role=\"group\" id={listId} isInnerUl listWidth={listWidth}>\n {item.items?.map((innerItem: ItemOptionTransformed, innerIndex: number) => (\n <Inner\n key={`${innerIndex}/${currentLevel}`}\n item={innerItem}\n currentLevel={nextLevel}\n path={path}\n dispatchPath={dispatchPath}\n index={innerIndex}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </FloatingPopover>\n );\n }\n\n return <Item item={item} path={path} index={index} currentLevel={currentLevel} ariaLevel={nextLevel} />;\n};\n"],"names":["Inner","_ref","item","currentLevel","path","dispatchPath","index","listWidth","handleToggle","opened","type","value","toString","level","isCurrentListOpen","treeId","safeUseId","listId","concat","nextLevel","isEmpty","items","_item$items","React","createElement","FloatingPopover","placement","onToggle","offset","target","Item","ariaControls","ariaExpanded","ariaLevel","ariaLabel","label","Ul","role","id","isInnerUl","map","innerItem","innerIndex","key"],"mappings":";;;;;;;IAYaA,KAAqB,GAAG,SAAxBA,KAAqBA,CAAAC,IAAA,EAAqE;AAAA,EAAA,IAA/DC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IAAEC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAEC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAEC,KAAK,GAAAL,IAAA,CAALK,KAAK;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS,CAAA;AAC5F,EAAA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,MAAe,EAAW;AAC5C,IAAA,IAAIA,MAAM,EAAE;AACRJ,MAAAA,YAAY,CAAC;AAAEK,QAAAA,IAAI,EAAE,kBAAkB;AAAEC,QAAAA,KAAK,EAAET,IAAI,CAACS,KAAK,CAACC,QAAQ,EAAE;QAAEC,KAAK,EAAEV,YAAY,GAAG,CAAA;AAAE,OAAC,CAAC,CAAA;AACrG,KAAC,MAAM;AACHE,MAAAA,YAAY,CAAC;AAAEK,QAAAA,IAAI,EAAE,cAAc;QAAEG,KAAK,EAAEV,YAAY,GAAG,CAAA;AAAE,OAAC,CAAC,CAAA;AACnE,KAAA;GACH,CAAA;AAED,EAAA,IAAMW,iBAAiB,GAAG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AAA;AAAU,KAAA,EAAA,CAAAe,WAAA,GACvDpB,IAAI,CAACmB,KAAK,MAAAC,IAAAA,IAAAA,WAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,WAAA,CAAYkB,GAAG,CAAC,UAACC,SAAgC,EAAEC,UAAkB,EAAA;AAAA,MAAA,oBAClEnB,KAAA,CAAAC,aAAA,CAACxB,KAAK,EAAA;QACF2C,GAAG,EAAA,EAAA,CAAAzB,MAAA,CAAKwB,UAAU,OAAAxB,MAAA,CAAIf,YAAY,CAAG;AACrCD,QAAAA,IAAI,EAAEuC,SAAU;AAChBtC,QAAAA,YAAY,EAAEgB,SAAU;AACxBf,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,KAAK,EAAEoC,UAAW;AAClBnC,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;KACL,CACD,CACS,CAAC,CAAA;AAE1B,GAAA;AAEA,EAAA,oBAAOgB,KAAA,CAAAC,aAAA,CAACM,IAAI,EAAA;AAAC5B,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,IAAI,EAAEA,IAAK;AAACE,IAAAA,KAAK,EAAEA,KAAM;AAACH,IAAAA,YAAY,EAAEA,YAAa;AAAC8B,IAAAA,SAAS,EAAEd,SAAAA;AAAU,GAAE,CAAC,CAAA;AAC3G;;;;"}
|
@@ -1,15 +1,14 @@
|
|
1
1
|
import React, { useRef, useContext } from 'react';
|
2
|
-
import { sizeToIconSize } from '../../../../utils/sizeToIconSize.js';
|
3
|
-
import { getItemId } from '../../../../utils/getItemId.js';
|
4
2
|
import { classes } from '../../../../Combobox.tokens.js';
|
5
3
|
import { cx } from '../../../../../../../utils/index.js';
|
6
|
-
import '@linaria/react';
|
7
|
-
import { IconDone } from '../../../../../../_Icon/Icons/IconDone.js';
|
8
|
-
import { IconDisclosureRightCentered } from '../../../../../../_Icon/Icons/IconDisclosureRightCentered.js';
|
9
4
|
import { Context } from '../../../../Combobox.js';
|
10
|
-
import { useDidMountEffect } from '../../../../../../../hooks/useDidMountEffect.js';
|
11
5
|
import { Wrapper, IconWrapper, StyledCheckboxWrapper, StyledCheckbox, StyledIndicator, StyledText, StyledWrapper, StyledCell, DisclosureIconWrapper } from './Item.styles.js';
|
6
|
+
import { useDidMountEffect } from '../../../../../../../hooks/useDidMountEffect.js';
|
7
|
+
import { getItemId } from '../../../../utils/getItemId.js';
|
8
|
+
import { IconDone } from '../../../../../../_Icon/Icons/IconDone.js';
|
9
|
+
import { sizeToIconSize } from '../../../../utils/sizeToIconSize.js';
|
12
10
|
import { isEmpty } from '../../../../../../../utils/isEmpty.js';
|
11
|
+
import { IconDisclosureRightCentered } from '../../../../../../_Icon/Icons/IconDisclosureRightCentered.js';
|
13
12
|
|
14
13
|
var _StyledIndicator;
|
15
14
|
var Item = function Item(_ref) {
|