@salutejs/plasma-new-hope 0.174.0-canary.1452.11462555994.0 → 0.174.0-canary.1488.11482175295.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.js +4 -10
- package/cjs/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/cjs/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/cjs/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/cjs/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/cjs/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/cjs/components/Drawer/Drawer.js +5 -10
- package/cjs/components/Drawer/Drawer.js.map +1 -1
- package/cjs/components/Drawer/Drawer.styles.js +0 -4
- package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
- package/cjs/components/Drawer/hooks/useDrawer.js +0 -4
- package/cjs/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.js +3 -10
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/Dropdown.styles.js +2 -3
- package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
- package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.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.css +13 -15
- package/cjs/components/Slider/Slider.js +2 -18
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/Slider.tokens.js +17 -23
- package/cjs/components/Slider/Slider.tokens.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +8 -8
- package/cjs/components/Slider/components/Double/Double.js +24 -60
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.styles.js +0 -1
- package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.css +14 -14
- package/cjs/components/Slider/components/Single/Single.js +34 -66
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +13 -32
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
- package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/cjs/components/Slider/utils/index.js +10 -28
- package/cjs/components/Slider/utils/index.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base.js +1 -1
- package/cjs/components/Slider/variations/_view/base.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/Steps/Steps.js +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/cjs/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/cjs/components/TextArea/TextArea.js +2 -2
- package/cjs/components/TextArea/TextArea.styles.js +2 -3
- package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
- package/cjs/components/TextArea/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/TextField.js +3 -3
- package/cjs/components/TextField/TextField.styles.js +1 -2
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.js +1 -2
- package/cjs/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/cjs/components/Toast/Toast.styles.js +1 -1
- package/cjs/components/Toast/ToastController.js +1 -1
- package/cjs/components/Toast/utils.js +1 -2
- package/cjs/components/Toast/utils.js.map +1 -1
- package/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/cjs/components/Tooltip/Tooltip.js +2 -3
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/components/ViewContainer/ViewContainer.js +38 -0
- package/cjs/components/ViewContainer/ViewContainer.js.map +1 -0
- package/cjs/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
- package/cjs/components/ViewContainer/_view/base.js +9 -0
- package/cjs/components/ViewContainer/_view/base.js.map +1 -0
- package/cjs/components/ViewContainer/_view/base_x642ct.css +1 -0
- 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 +15 -15
- package/cjs/index.js +51 -51
- package/cjs/utils/index.js +0 -5
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Slider/Slider.js +2 -10
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
- package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
- package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
- package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
- package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/cjs/components/Slider/utils/index.js +10 -28
- package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
- package/emotion/cjs/components/ViewContainer/ViewContainer.js +49 -0
- package/emotion/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
- package/emotion/cjs/components/ViewContainer/_view/base.js +8 -0
- package/emotion/cjs/components/ViewContainer/_view/tokens.json +1 -0
- package/emotion/cjs/components/ViewContainer/index.js +18 -0
- package/emotion/cjs/examples/_helpers.js +3 -14
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
- package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
- package/emotion/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
- package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
- package/emotion/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Slider/Slider.js +2 -11
- package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/es/components/Slider/Slider.tokens.js +17 -23
- package/emotion/es/components/Slider/components/Double/Double.js +19 -54
- package/emotion/es/components/Slider/components/Single/Single.js +34 -65
- package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
- package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
- package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/es/components/Slider/utils/index.js +10 -28
- package/emotion/es/components/Slider/variations/_view/base.js +1 -2
- package/emotion/es/components/ViewContainer/ViewContainer.js +40 -0
- package/emotion/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
- package/emotion/es/components/ViewContainer/_view/base.js +2 -0
- package/emotion/es/components/ViewContainer/_view/tokens.json +1 -0
- package/emotion/es/components/ViewContainer/index.js +1 -0
- package/emotion/es/examples/_helpers.js +3 -14
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
- package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
- package/emotion/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
- package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
- package/emotion/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/emotion/es/index.js +2 -1
- package/emotion/package.json +2 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -1
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -1
- package/es/components/Attach/Attach.js +3 -4
- package/es/components/Attach/Attach.js.map +1 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js +0 -1
- package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
- package/es/components/Attach/ui/Button/Button.styles.js +0 -1
- package/es/components/Attach/ui/Button/Button.styles.js.map +1 -1
- package/es/components/Attach/ui/Cell/Cell.styles.js +0 -2
- package/es/components/Attach/ui/Cell/Cell.styles.js.map +1 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js +0 -1
- package/es/components/Attach/ui/IconButton/IconButton.styles.js.map +1 -1
- package/es/components/Attach/utils/getFileicon.js +3 -4
- package/es/components/Attach/utils/getFileicon.js.map +1 -1
- package/es/components/Attach/utils/index.js +0 -3
- package/es/components/Attach/utils/index.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.js +5 -6
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Autocomplete/Autocomplete.styles.js +2 -3
- package/es/components/Autocomplete/Autocomplete.styles.js.map +1 -1
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js +1 -2
- package/es/components/Autocomplete/ui/TextField/TextField.styles.js.map +1 -1
- package/es/components/Avatar/Avatar.js +2 -3
- package/es/components/Avatar/Avatar.js.map +1 -1
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js +2 -4
- package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
- package/es/components/Button/Button.styles.js +0 -3
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Calendar/CalendarBase/CalendarBase.js +5 -5
- package/es/components/Calendar/CalendarDouble/CalendarDouble.js +8 -8
- package/es/components/Calendar/hooks/useDays.js +2 -2
- package/es/components/Calendar/hooks/useKeyNavigation.js +1 -1
- package/es/components/Calendar/hooks/useMonths.js +2 -2
- package/es/components/Calendar/hooks/useQuarters.js +2 -2
- package/es/components/Calendar/hooks/useYears.js +2 -2
- package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +5 -6
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js +0 -1
- package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +4 -4
- package/es/components/Calendar/ui/CalendarQuarters/CalendarQuarters.js +4 -4
- package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +4 -4
- package/es/components/Combobox/ComboboxNew/Combobox.js +11 -12
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js +2 -4
- package/es/components/Combobox/ComboboxNew/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js +0 -2
- package/es/components/Combobox/ComboboxNew/hooks/getPathMaps.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +5 -6
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +1 -3
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js +1 -2
- package/es/components/Combobox/ComboboxNew/ui/Target/Target.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.js +4 -10
- package/es/components/Combobox/ComboboxOld/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js +0 -1
- package/es/components/Combobox/ComboboxOld/Combobox.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/ComboboxOld/hooks/useFocusController.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxChip/ComboboxChip.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js +1 -10
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js +0 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxItem/ComboboxItem.styles.js.map +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.js +1 -1
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js +1 -2
- package/es/components/Combobox/ComboboxOld/ui/ComboboxTarget/ComboboxTarget.styles.js.map +1 -1
- package/es/components/DatePicker/DatePickerBase.styles.js +1 -7
- package/es/components/DatePicker/DatePickerBase.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.js +1 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js +0 -1
- package/es/components/DatePicker/RangeDate/RangeDate.styles.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js +1 -2
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.js.map +1 -1
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js +2 -5
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.styles.js.map +1 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js +0 -1
- package/es/components/DatePicker/SingleDate/SingleDate.styles.js.map +1 -1
- package/es/components/Drawer/Drawer.js +5 -10
- package/es/components/Drawer/Drawer.js.map +1 -1
- package/es/components/Drawer/Drawer.styles.js +0 -4
- package/es/components/Drawer/Drawer.styles.js.map +1 -1
- package/es/components/Drawer/hooks/useDrawer.js +0 -4
- package/es/components/Drawer/hooks/useDrawer.js.map +1 -1
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js +0 -7
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.js.map +1 -1
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +0 -7
- package/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js.map +1 -1
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +0 -3
- package/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/es/components/Dropdown/Dropdown.js +3 -10
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/Dropdown.styles.js +2 -3
- package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -9
- package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -2
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.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.css +13 -15
- package/es/components/Slider/Slider.js +2 -18
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/Slider.tokens.js +17 -23
- package/es/components/Slider/Slider.tokens.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +8 -8
- package/es/components/Slider/components/Double/Double.js +20 -56
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/Double/Double.styles.js +0 -1
- package/es/components/Slider/components/Double/Double.styles.js.map +1 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +0 -3
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
- package/es/components/Slider/components/Single/Single.css +14 -14
- package/es/components/Slider/components/Single/Single.js +35 -67
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles.js +4 -4
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/es/components/Slider/components/SliderBase/SliderBase.js +13 -32
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/es/components/Slider/ui/Handler/Handler.css +3 -3
- package/es/components/Slider/ui/Handler/Handler.js +87 -48
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/es/components/Slider/utils/index.js +10 -28
- package/es/components/Slider/utils/index.js.map +1 -1
- package/es/components/Slider/variations/_view/base.js +1 -1
- package/es/components/Slider/variations/_view/base.js.map +1 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/es/components/Steps/Steps.js +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js +2 -3
- package/es/components/Tabs/ui/horizontal/HorizontalTabs/HorizontalTabs.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js +2 -3
- package/es/components/Tabs/ui/vertical/VerticalTabs/VerticalTabs.js.map +1 -1
- package/es/components/TextArea/TextArea.js +2 -2
- package/es/components/TextArea/TextArea.styles.js +2 -3
- package/es/components/TextArea/TextArea.styles.js.map +1 -1
- package/es/components/TextArea/ui/Hint/Hint.js +1 -2
- package/es/components/TextArea/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/TextField.js +3 -3
- package/es/components/TextField/TextField.styles.js +1 -2
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.js +1 -2
- package/es/components/TextField/ui/Hint/Hint.js.map +1 -1
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +1 -2
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -1
- package/es/components/Toast/Toast.styles.js +1 -1
- package/es/components/Toast/ToastController.js +1 -1
- package/es/components/Toast/utils.js +1 -2
- package/es/components/Toast/utils.js.map +1 -1
- package/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -3
- package/es/components/Tooltip/Tooltip.js.map +1 -1
- package/es/components/ViewContainer/ViewContainer.js +33 -0
- package/es/components/ViewContainer/ViewContainer.js.map +1 -0
- package/es/components/ViewContainer/ViewContainer_yiqfcb.css +1 -0
- package/es/components/ViewContainer/_view/base.js +5 -0
- package/es/components/ViewContainer/_view/base.js.map +1 -0
- package/es/components/ViewContainer/_view/base_x642ct.css +1 -0
- 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 +15 -15
- package/es/index.js +22 -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 +6 -2
- package/styled-components/cjs/components/Slider/Slider.js +2 -10
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/cjs/components/Slider/utils/index.js +10 -28
- package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/cjs/components/ViewContainer/ViewContainer.js +40 -0
- package/styled-components/cjs/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
- package/styled-components/cjs/components/ViewContainer/_view/base.js +8 -0
- package/styled-components/cjs/components/ViewContainer/_view/tokens.json +1 -0
- package/styled-components/cjs/components/ViewContainer/index.js +18 -0
- package/styled-components/cjs/examples/_helpers.js +3 -14
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +16 -0
- package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +16 -0
- package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Slider/Slider.js +2 -11
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/es/components/Slider/utils/index.js +10 -28
- package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/es/components/ViewContainer/ViewContainer.js +31 -0
- package/styled-components/es/components/ViewContainer/ViewContainer.template-doc.mdx +82 -0
- package/styled-components/es/components/ViewContainer/_view/base.js +2 -0
- package/styled-components/es/components/ViewContainer/_view/tokens.json +1 -0
- package/styled-components/es/components/ViewContainer/index.js +1 -0
- package/styled-components/es/examples/_helpers.js +3 -14
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -90
- package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.js +10 -0
- package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -90
- package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.config.js +10 -0
- package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.js +5 -0
- package/styled-components/es/examples/plasma_web/components/ViewContainer/ViewContainer.stories.tsx +65 -0
- package/styled-components/es/index.js +2 -1
- package/styled-components/package.json +2 -1
- package/types/components/Slider/Slider.d.ts.map +1 -1
- package/types/components/Slider/Slider.tokens.d.ts +16 -22
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +7 -80
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
- package/types/components/Slider/utils/index.d.ts +8 -26
- package/types/components/Slider/utils/index.d.ts.map +1 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
- package/types/components/ViewContainer/ViewContainer.d.ts +26 -0
- package/types/components/ViewContainer/ViewContainer.d.ts.map +1 -0
- package/types/components/ViewContainer/_view/base.d.ts +2 -0
- package/types/components/ViewContainer/_view/base.d.ts.map +1 -0
- package/types/components/ViewContainer/index.d.ts +2 -0
- package/types/components/ViewContainer/index.d.ts.map +1 -0
- package/types/examples/_helpers.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -84
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts +9 -0
- package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts +8 -0
- package/types/examples/plasma_b2c/components/ViewContainer/ViewContainer.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -84
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts +9 -0
- package/types/examples/plasma_web/components/ViewContainer/ViewContainer.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts +8 -0
- package/types/examples/plasma_web/components/ViewContainer/ViewContainer.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/emotion/cjs/examples/themes/declaration.d.ts +0 -4
- package/emotion/cjs/examples/themes/index.js +0 -15
- package/emotion/cjs/examples/themes/plasma_b2c.module.css +0 -984
- package/emotion/cjs/examples/themes/plasma_web.module.css +0 -984
- package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/emotion/es/examples/themes/declaration.d.ts +0 -4
- package/emotion/es/examples/themes/index.js +0 -7
- package/emotion/es/examples/themes/plasma_b2c.module.css +0 -984
- package/emotion/es/examples/themes/plasma_web.module.css +0 -984
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
- package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/styled-components/cjs/examples/themes/declaration.d.ts +0 -4
- package/styled-components/cjs/examples/themes/index.js +0 -15
- package/styled-components/cjs/examples/themes/plasma_b2c.module.css +0 -984
- package/styled-components/cjs/examples/themes/plasma_web.module.css +0 -984
- package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/styled-components/es/examples/themes/declaration.d.ts +0 -4
- package/styled-components/es/examples/themes/index.js +0 -7
- package/styled-components/es/examples/themes/plasma_b2c.module.css +0 -984
- package/styled-components/es/examples/themes/plasma_web.module.css +0 -984
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
- package/types/examples/themes/index.d.ts +0 -6
- package/types/examples/themes/index.d.ts.map +0 -1
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
var _excluded = ["size", "orientation", "stepSize", "onChangeCommitted", "onChange", "position", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value", "valuePlacement"];
|
1
|
+
var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
|
3
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
7
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
8
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
9
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -14,23 +10,28 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
14
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
15
11
|
import React, { useRef, forwardRef } from 'react';
|
16
12
|
import Draggable from 'react-draggable';
|
17
|
-
import { cx } from '../../../../utils';
|
18
13
|
import { getSliderThumbValue, getOffsets } from '../../utils';
|
19
14
|
import { Thumb } from '../Thumb/Thumb';
|
20
|
-
import { classes } from '../../Slider.tokens';
|
21
15
|
import { HandlerStyled, StyledValue } from './Handler.styles';
|
22
|
-
import { computeKeyPressData } from './computeKeyPressData';
|
23
16
|
|
24
17
|
// TODO: PLASMA-1707
|
25
18
|
|
19
|
+
var KeyboardSupport = {
|
20
|
+
PageUp: 33,
|
21
|
+
PageDown: 34,
|
22
|
+
End: 35,
|
23
|
+
Home: 36,
|
24
|
+
ArrowLeft: 37,
|
25
|
+
ArrowUp: 38,
|
26
|
+
ArrowRight: 39,
|
27
|
+
ArrowDown: 40
|
28
|
+
};
|
26
29
|
export var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
27
|
-
var
|
28
|
-
orientation = _ref.orientation,
|
29
|
-
stepSize = _ref.stepSize,
|
30
|
+
var stepSize = _ref.stepSize,
|
30
31
|
onChangeCommitted = _ref.onChangeCommitted,
|
31
32
|
onChange = _ref.onChange,
|
32
|
-
_ref$
|
33
|
-
|
33
|
+
_ref$xPosition = _ref.xPosition,
|
34
|
+
xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
|
34
35
|
min = _ref.min,
|
35
36
|
max = _ref.max,
|
36
37
|
_ref$bounds = _ref.bounds,
|
@@ -45,88 +46,122 @@ export var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
45
46
|
_ref$endOffset = _ref.endOffset,
|
46
47
|
endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
|
47
48
|
value = _ref.value,
|
48
|
-
valuePlacement = _ref.valuePlacement,
|
49
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
50
|
-
var isVertical = orientation === 'vertical';
|
51
50
|
var lastOnChangeValue = useRef();
|
52
|
-
var _getOffsets = getOffsets(ref, side
|
51
|
+
var _getOffsets = getOffsets(ref, side),
|
53
52
|
_getOffsets2 = _slicedToArray(_getOffsets, 2),
|
54
|
-
|
55
|
-
|
53
|
+
offsetLeft = _getOffsets2[0],
|
54
|
+
offsetRight = _getOffsets2[1];
|
56
55
|
var _bounds = _slicedToArray(bounds, 2),
|
57
|
-
|
58
|
-
|
59
|
-
var
|
60
|
-
var
|
61
|
-
var
|
62
|
-
x:
|
63
|
-
y:
|
56
|
+
leftValueBound = _bounds[0],
|
57
|
+
rightValueBound = _bounds[1];
|
58
|
+
var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
|
59
|
+
var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
|
60
|
+
var position = typeof xPosition === 'number' ? {
|
61
|
+
x: xPosition,
|
62
|
+
y: 0
|
64
63
|
} : undefined;
|
65
64
|
var tabIndex = disabled ? -1 : 0;
|
66
|
-
var computedBounds =
|
67
|
-
|
65
|
+
var computedBounds = {
|
66
|
+
left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) - (offsetLeft ? stepSize : 0),
|
67
|
+
right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - (offsetRight ? stepSize : 0)
|
68
|
+
};
|
69
|
+
var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
|
68
70
|
var onDrag = function onDrag(_, data) {
|
69
|
-
var newValue = getSliderThumbValue(
|
71
|
+
var newValue = getSliderThumbValue(data.x, stepSize, min, max);
|
70
72
|
if (lastOnChangeValue.current !== newValue) {
|
71
73
|
onChange === null || onChange === void 0 || onChange(newValue, data);
|
72
74
|
lastOnChangeValue.current = newValue;
|
73
75
|
}
|
74
76
|
};
|
75
77
|
var onStop = function onStop(_, data) {
|
76
|
-
var newValue = getSliderThumbValue(
|
78
|
+
var newValue = getSliderThumbValue(data.x, stepSize, min, max);
|
77
79
|
onChangeCommitted && onChangeCommitted(newValue, data);
|
78
80
|
};
|
79
81
|
var onKeyPress = function onKeyPress(event) {
|
80
82
|
event.persist();
|
81
|
-
var
|
82
|
-
|
83
|
-
|
84
|
-
stepSize: stepSize,
|
85
|
-
position: position,
|
86
|
-
max: max,
|
87
|
-
computedMultipleSteps: computedMultipleSteps
|
88
|
-
});
|
89
|
-
if (!data) {
|
83
|
+
var keyCode = event.keyCode,
|
84
|
+
target = event.target;
|
85
|
+
if (!Object.values(KeyboardSupport).includes(keyCode)) {
|
90
86
|
return;
|
91
87
|
}
|
88
|
+
var ArrowUp = KeyboardSupport.ArrowUp,
|
89
|
+
ArrowRight = KeyboardSupport.ArrowRight,
|
90
|
+
ArrowDown = KeyboardSupport.ArrowDown,
|
91
|
+
ArrowLeft = KeyboardSupport.ArrowLeft,
|
92
|
+
Home = KeyboardSupport.Home,
|
93
|
+
End = KeyboardSupport.End,
|
94
|
+
PageDown = KeyboardSupport.PageDown,
|
95
|
+
PageUp = KeyboardSupport.PageUp;
|
96
|
+
var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
|
97
|
+
var data = {
|
98
|
+
x: 0,
|
99
|
+
deltaX: stepSize,
|
100
|
+
lastX: xPosition,
|
101
|
+
y: 0,
|
102
|
+
deltaY: 0,
|
103
|
+
lastY: 0,
|
104
|
+
node: target
|
105
|
+
};
|
106
|
+
switch (keyCode) {
|
107
|
+
case ArrowUp:
|
108
|
+
case ArrowRight:
|
109
|
+
data.x = xPosition + stepSize;
|
110
|
+
break;
|
111
|
+
case ArrowDown:
|
112
|
+
case ArrowLeft:
|
113
|
+
data.x = xPosition - stepSize;
|
114
|
+
data.deltaX = -stepSize;
|
115
|
+
break;
|
116
|
+
case PageUp:
|
117
|
+
data.x = xPosition + computedMultipleSteps;
|
118
|
+
data.deltaX = computedMultipleSteps;
|
119
|
+
break;
|
120
|
+
case PageDown:
|
121
|
+
data.x = xPosition - computedMultipleSteps;
|
122
|
+
data.deltaX = -computedMultipleSteps;
|
123
|
+
break;
|
124
|
+
case End:
|
125
|
+
data.x = max * stepSize;
|
126
|
+
break;
|
127
|
+
case Home:
|
128
|
+
data.x = 0;
|
129
|
+
break;
|
130
|
+
default:
|
131
|
+
data.x = 0;
|
132
|
+
}
|
92
133
|
var left = computedBounds.left,
|
93
|
-
right = computedBounds.right
|
94
|
-
top = computedBounds.top,
|
95
|
-
bottom = computedBounds.bottom;
|
134
|
+
right = computedBounds.right;
|
96
135
|
|
97
136
|
/*
|
98
137
|
* INFO: Находим значение в диапазоне между указанными левой и правой границами.
|
99
|
-
* Или между верхней и нижней
|
100
138
|
* Необходимо для правильного расчета положения SliderThumb.
|
101
139
|
* см. функция clamp
|
102
140
|
*/
|
103
|
-
var boundedValue =
|
141
|
+
var boundedValue = Math.max(Math.min(right, data.x), left);
|
104
142
|
var computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);
|
105
143
|
lastOnChangeValue.current = computedValue;
|
106
144
|
onChangeCommitted && onChangeCommitted(computedValue, data);
|
107
145
|
};
|
108
146
|
return /*#__PURE__*/React.createElement(Draggable, {
|
109
|
-
axis:
|
147
|
+
axis: "x",
|
110
148
|
bounds: computedBounds,
|
111
|
-
grid:
|
149
|
+
grid: [stepSize, 1],
|
112
150
|
onStop: onStop,
|
113
151
|
onDrag: onDrag,
|
114
|
-
position:
|
152
|
+
position: position,
|
115
153
|
disabled: disabled
|
116
154
|
}, /*#__PURE__*/React.createElement(HandlerStyled, {
|
117
155
|
ref: ref,
|
118
156
|
style: {
|
119
157
|
zIndex: zIndex
|
120
158
|
},
|
121
|
-
className: cx(isVertical && classes.verticalOrientation, valuePlacement === 'left' && classes.valuePlacementLeft),
|
122
|
-
isLarge: size === 'large',
|
123
159
|
onKeyDown: onKeyPress
|
124
|
-
},
|
160
|
+
}, /*#__PURE__*/React.createElement(Thumb, _extends({
|
125
161
|
tabIndex: tabIndex,
|
126
162
|
min: min,
|
127
163
|
max: max,
|
128
164
|
value: value,
|
129
|
-
disabled: disabled
|
130
|
-
orientation: orientation
|
165
|
+
disabled: disabled
|
131
166
|
}, rest)), showCurrentValueCondition && /*#__PURE__*/React.createElement(StyledValue, null, value)));
|
132
167
|
});
|
@@ -1,13 +1,19 @@
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
2
|
-
|
3
|
-
|
4
|
-
target: "e1o9stmr1",
|
5
|
-
label: "plasma-new-hope__StyledValue"
|
6
|
-
})("position:absolute;z-index:1;top:var(", tokens.currentValueTopOffset, ");text-align:center;width:100%;margin-left:-0.125rem;display:flex;justify-content:center;font-family:var(", tokens.valueFontFamily, ");font-size:var(", tokens.valueFontSize, ");font-style:var(", tokens.valueFontStyle, ");font-weight:var(", tokens.valueFontWeight, ");letter-spacing:var(", tokens.valueLetterSpacing, ");line-height:var(", tokens.valueLineHeight, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSWtFIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IGNsYXNzZXMsIHRva2VucyB9IGZyb20gJy4uLy4uL1NsaWRlci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkVmFsdWUgPSBzdHlsZWQuc3Bhbjx7IGlzTGFyZ2VUaHVtYj86IGJvb2xlYW4gfT5gXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHotaW5kZXg6IDE7XG4gICAgdG9wOiB2YXIoJHt0b2tlbnMuY3VycmVudFZhbHVlVG9wT2Zmc2V0fSk7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1hcmdpbi1sZWZ0OiAtMC4xMjVyZW07XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICBmb250LWZhbWlseTogdmFyKCR7dG9rZW5zLnZhbHVlRm9udEZhbWlseX0pO1xuICAgIGZvbnQtc2l6ZTogdmFyKCR7dG9rZW5zLnZhbHVlRm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMudmFsdWVGb250U3R5bGV9KTtcbiAgICBmb250LXdlaWdodDogdmFyKCR7dG9rZW5zLnZhbHVlRm9udFdlaWdodH0pO1xuICAgIGxldHRlci1zcGFjaW5nOiB2YXIoJHt0b2tlbnMudmFsdWVMZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy52YWx1ZUxpbmVIZWlnaHR9KTtcbmA7XG5cbmV4cG9ydCBjb25zdCBIYW5kbGVyU3R5bGVkID0gc3R5bGVkLmRpdjx7IGlzTGFyZ2U/OiBib29sZWFuIH0+YFxuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgei1pbmRleDogMTtcbiAgICB0b3A6IDA7XG4gICAgbGVmdDogMDtcbiAgICBib3R0b206IDA7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXG4gICAgLS10aHVtYi1zaXplOiAkeyh7IGlzTGFyZ2UgfSkgPT4gKGlzTGFyZ2UgPyBgdmFyKCR7dG9rZW5zLnRodW1iU2l6ZUxhcmdlfSlgIDogYHZhcigke3Rva2Vucy50aHVtYlNpemV9KWApfTtcblxuICAgICYuJHtjbGFzc2VzLnZlcnRpY2FsT3JpZW50YXRpb259IHtcbiAgICAgICAgcmlnaHQ6IDA7XG4gICAgICAgIGJvdHRvbTogYXV0bztcbiAgICAgICAgYWxpZ24taXRlbXM6IGZsZXgtc3RhcnQ7XG4gICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXG4gICAgICAgICR7U3R5bGVkVmFsdWV9IHtcbiAgICAgICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgICAgIHRvcDogMDtcbiAgICAgICAgICAgIGJvdHRvbTogMDtcbiAgICAgICAgICAgIHJpZ2h0OiAwO1xuICAgICAgICAgICAgbGVmdDogY2FsYyh2YXIoJHt0b2tlbnMuc2l6ZX0pIC0gKHZhcigke3Rva2Vucy5zaXplfSkgLSB2YXIoLS10aHVtYi1zaXplKSkgLyAyICsgMC4yNXJlbSk7XG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0O1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgJi4ke2NsYXNzZXMudmFsdWVQbGFjZW1lbnRMZWZ0fSB7XG4gICAgICAgICR7U3R5bGVkVmFsdWV9IHtcbiAgICAgICAgICAgIGxlZnQ6IGF1dG87XG4gICAgICAgICAgICByaWdodDogY2FsYyh2YXIoJHt0b2tlbnMuc2l6ZX0pIC0gKHZhcigke3Rva2Vucy5zaXplfSkgLSB2YXIoLS10aHVtYi1zaXplKSkgLyAyICsgMC4zMTI1cmVtKTtcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogZmxleC1lbmQ7XG4gICAgICAgIH1cbiAgICB9XG5gO1xuIl19 */"));
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
3
|
+
import { tokens } from '../../Slider.tokens';
|
7
4
|
export var HandlerStyled = /*#__PURE__*/_styled("div", {
|
8
|
-
target: "
|
5
|
+
target: "e1o9stmr1",
|
9
6
|
label: "plasma-new-hope__HandlerStyled"
|
10
|
-
})("
|
11
|
-
|
12
|
-
|
13
|
-
}
|
7
|
+
})(process.env.NODE_ENV === "production" ? {
|
8
|
+
name: "1dnu1tq",
|
9
|
+
styles: "cursor:pointer;position:absolute;z-index:1;top:0;left:0"
|
10
|
+
} : {
|
11
|
+
name: "1dnu1tq",
|
12
|
+
styles: "cursor:pointer;position:absolute;z-index:1;top:0;left:0",
|
13
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uLy4uL1NsaWRlci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgSGFuZGxlclN0eWxlZCA9IHN0eWxlZC5kaXZgXG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICB6LWluZGV4OiAxO1xuICAgIHRvcDogMDtcbiAgICBsZWZ0OiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFZhbHVlID0gc3R5bGVkLnNwYW5gXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHotaW5kZXg6IDE7XG4gICAgdG9wOiB2YXIoJHt0b2tlbnMuY3VycmVudFZhbHVlVG9wT2Zmc2V0fSk7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1hcmdpbi1sZWZ0OiAtMC4xMjVyZW07XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICBmb250LWZhbWlseTogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUZvbnRGYW1pbHl9KTtcbiAgICBmb250LXNpemU6IHZhcigke3Rva2Vucy5jdXJyZW50VmFsdWVGb250U2l6ZX0pO1xuICAgIGZvbnQtc3R5bGU6IHZhcigke3Rva2Vucy5jdXJyZW50VmFsdWVGb250U3R5bGV9KTtcbiAgICBmb250LXdlaWdodDogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUZvbnRXZWlnaHR9KTtcbiAgICBsZXR0ZXItc3BhY2luZzogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUxldHRlclNwYWNpbmd9KTtcbiAgICBsaW5lLWhlaWdodDogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUxpbmVIZWlnaHR9KTtcbmA7XG4iXX0= */",
|
14
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
15
|
+
});
|
16
|
+
export var StyledValue = /*#__PURE__*/_styled("span", {
|
17
|
+
target: "e1o9stmr0",
|
18
|
+
label: "plasma-new-hope__StyledValue"
|
19
|
+
})("position:absolute;z-index:1;top:var(", tokens.currentValueTopOffset, ");text-align:center;width:100%;margin-left:-0.125rem;display:flex;justify-content:center;font-family:var(", tokens.currentValueFontFamily, ");font-size:var(", tokens.currentValueFontSize, ");font-style:var(", tokens.currentValueFontStyle, ");font-weight:var(", tokens.currentValueFontWeight, ");letter-spacing:var(", tokens.currentValueLetterSpacing, ");line-height:var(", tokens.currentValueLineHeight, ");" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXNDIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL0hhbmRsZXIvSGFuZGxlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB7IHRva2VucyB9IGZyb20gJy4uLy4uL1NsaWRlci50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgSGFuZGxlclN0eWxlZCA9IHN0eWxlZC5kaXZgXG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICB6LWluZGV4OiAxO1xuICAgIHRvcDogMDtcbiAgICBsZWZ0OiAwO1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFZhbHVlID0gc3R5bGVkLnNwYW5gXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHotaW5kZXg6IDE7XG4gICAgdG9wOiB2YXIoJHt0b2tlbnMuY3VycmVudFZhbHVlVG9wT2Zmc2V0fSk7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgIHdpZHRoOiAxMDAlO1xuICAgIG1hcmdpbi1sZWZ0OiAtMC4xMjVyZW07XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICBmb250LWZhbWlseTogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUZvbnRGYW1pbHl9KTtcbiAgICBmb250LXNpemU6IHZhcigke3Rva2Vucy5jdXJyZW50VmFsdWVGb250U2l6ZX0pO1xuICAgIGZvbnQtc3R5bGU6IHZhcigke3Rva2Vucy5jdXJyZW50VmFsdWVGb250U3R5bGV9KTtcbiAgICBmb250LXdlaWdodDogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUZvbnRXZWlnaHR9KTtcbiAgICBsZXR0ZXItc3BhY2luZzogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUxldHRlclNwYWNpbmd9KTtcbiAgICBsaW5lLWhlaWdodDogdmFyKCR7dG9rZW5zLmN1cnJlbnRWYWx1ZUxpbmVIZWlnaHR9KTtcbmA7XG4iXX0= */"));
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled"
|
1
|
+
var _excluded = ["min", "max", "value", "ariaValueMin", "ariaLabel", "disabled"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
@@ -12,7 +12,6 @@ export var Thumb = function Thumb(_ref) {
|
|
12
12
|
ariaValueMin = _ref$ariaValueMin === void 0 ? min : _ref$ariaValueMin,
|
13
13
|
ariaLabel = _ref.ariaLabel,
|
14
14
|
disabled = _ref.disabled,
|
15
|
-
orientation = _ref.orientation,
|
16
15
|
rest = _objectWithoutProperties(_ref, _excluded);
|
17
16
|
return /*#__PURE__*/React.createElement(ThumbBase, _extends({
|
18
17
|
role: "slider",
|
@@ -21,6 +20,6 @@ export var Thumb = function Thumb(_ref) {
|
|
21
20
|
"aria-valuemax": max,
|
22
21
|
"aria-valuenow": value,
|
23
22
|
disabled: disabled,
|
24
|
-
"aria-orientation":
|
23
|
+
"aria-orientation": "horizontal"
|
25
24
|
}, rest));
|
26
25
|
};
|
@@ -4,9 +4,9 @@ import { tokens } from '../../Slider.tokens';
|
|
4
4
|
export var ThumbBase = /*#__PURE__*/_styled("div", {
|
5
5
|
target: "e1lys3110",
|
6
6
|
label: "plasma-new-hope__ThumbBase"
|
7
|
-
})("width:var(
|
8
|
-
outlineOffset: '0.
|
7
|
+
})("width:var(", tokens.thumbSize, ");height:var(", tokens.thumbSize, ");position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(", tokens.thumbBackgroundColor, ");margin:0.125rem;transition:border-color 0.1s ease-in-out;&:after{background:var(", tokens.thumbBorderColor, ");margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}&:not([disabled]):hover:after,&:not([disabled]):active:after{background:var(", tokens.thumbFocusBorderColor, ");}&[disabled]{cursor:not-allowed;}&:focus{outline:none;}", /*#__PURE__*/addFocus({
|
8
|
+
outlineOffset: '0.125rem',
|
9
9
|
outlineSize: '0.125rem',
|
10
10
|
outlineRadius: '50%',
|
11
11
|
outlineColor: /*#__PURE__*/"var(".concat(tokens.thumbFocusBorderColor, ")")
|
12
|
-
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
12
|
+
}), ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3VpL1RodW1iL1RodW1iLnN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLMkQiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9TbGlkZXIvdWkvVGh1bWIvVGh1bWIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgeyBhZGRGb2N1cyB9IGZyb20gJy4uLy4uLy4uLy4uL21peGlucyc7XG5pbXBvcnQgeyB0b2tlbnMgfSBmcm9tICcuLi8uLi9TbGlkZXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IFRodW1iQmFzZSA9IHN0eWxlZC5kaXY8eyBkaXNhYmxlZD86IGJvb2xlYW4gfT5gXG4gICAgd2lkdGg6IHZhcigke3Rva2Vucy50aHVtYlNpemV9KTtcbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy50aHVtYlNpemV9KTtcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgbGVmdDogLTAuMTI1cmVtO1xuICAgIHRvcDogLTAuMTI1cmVtO1xuICAgIGJvcmRlci1yYWRpdXM6IDUwJTtcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIGJhY2tncm91bmQ6IHZhcigke3Rva2Vucy50aHVtYkJhY2tncm91bmRDb2xvcn0pO1xuICAgIG1hcmdpbjogMC4xMjVyZW07XG4gICAgdHJhbnNpdGlvbjogYm9yZGVyLWNvbG9yIDAuMXMgZWFzZS1pbi1vdXQ7XG5cbiAgICAmOmFmdGVyIHtcbiAgICAgICAgYmFja2dyb3VuZDogdmFyKCR7dG9rZW5zLnRodW1iQm9yZGVyQ29sb3J9KTtcbiAgICAgICAgbWFyZ2luOiAtMC4xMjVyZW07XG4gICAgICAgIGNvbnRlbnQ6ICcnO1xuICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgIGluc2V0OiAwO1xuICAgICAgICB6LWluZGV4OiAtMTtcbiAgICAgICAgYm9yZGVyLXJhZGl1czogaW5oZXJpdDtcbiAgICB9XG5cbiAgICAmOm5vdChbZGlzYWJsZWRdKTpob3ZlcjphZnRlcixcbiAgICAmOm5vdChbZGlzYWJsZWRdKTphY3RpdmU6YWZ0ZXIge1xuICAgICAgICBiYWNrZ3JvdW5kOiB2YXIoJHt0b2tlbnMudGh1bWJGb2N1c0JvcmRlckNvbG9yfSk7XG4gICAgfVxuXG4gICAgJltkaXNhYmxlZF0ge1xuICAgICAgICBjdXJzb3I6IG5vdC1hbGxvd2VkO1xuICAgIH1cblxuICAgICY6Zm9jdXMge1xuICAgICAgICBvdXRsaW5lOiBub25lO1xuICAgIH1cblxuICAgICR7YWRkRm9jdXMoe1xuICAgICAgICBvdXRsaW5lT2Zmc2V0OiAnMC4xMjVyZW0nLFxuICAgICAgICBvdXRsaW5lU2l6ZTogJzAuMTI1cmVtJyxcbiAgICAgICAgb3V0bGluZVJhZGl1czogJzUwJScsXG4gICAgICAgIG91dGxpbmVDb2xvcjogYHZhcigke3Rva2Vucy50aHVtYkZvY3VzQm9yZGVyQ29sb3J9KWAsXG4gICAgfSl9XG5gO1xuIl19 */"));
|
@@ -6,8 +6,8 @@
|
|
6
6
|
* @param {number} max
|
7
7
|
* @return {number}
|
8
8
|
*/
|
9
|
-
export function getSliderThumbValue(
|
10
|
-
var newValue = Math.round(
|
9
|
+
export function getSliderThumbValue(handleCenterXRelative, stepSize, min, max) {
|
10
|
+
var newValue = Math.round(handleCenterXRelative / stepSize) + min;
|
11
11
|
return Math.min(Math.max(newValue, min), max);
|
12
12
|
}
|
13
13
|
|
@@ -18,11 +18,11 @@ export function getSliderThumbValue(handleCenterPosRelative, stepSize, min, max)
|
|
18
18
|
* @param {'left' | 'right'} side
|
19
19
|
* @return Array<number>
|
20
20
|
*/
|
21
|
-
export function getOffsets(ref, side
|
21
|
+
export function getOffsets(ref, side) {
|
22
22
|
if (!ref || !('current' in ref) || !ref.current || !side) {
|
23
23
|
return [0, 0];
|
24
24
|
}
|
25
|
-
var size =
|
25
|
+
var size = ref.current.clientWidth;
|
26
26
|
if (side === 'left') {
|
27
27
|
return [0, size];
|
28
28
|
}
|
@@ -33,33 +33,15 @@ export function getOffsets(ref, side, isVertical) {
|
|
33
33
|
}
|
34
34
|
export var sizeData = {
|
35
35
|
s: {
|
36
|
-
|
37
|
-
|
38
|
-
fontSizeMultiplier: 16
|
39
|
-
},
|
40
|
-
large: {
|
41
|
-
indent: 0.625,
|
42
|
-
fontSizeMultiplier: 16
|
43
|
-
}
|
36
|
+
indent: 0.5,
|
37
|
+
fontSizeMultiplier: 16
|
44
38
|
},
|
45
39
|
m: {
|
46
|
-
|
47
|
-
|
48
|
-
fontSizeMultiplier: 16
|
49
|
-
},
|
50
|
-
large: {
|
51
|
-
indent: 0.625,
|
52
|
-
fontSizeMultiplier: 16
|
53
|
-
}
|
40
|
+
indent: 0.75,
|
41
|
+
fontSizeMultiplier: 16
|
54
42
|
},
|
55
43
|
l: {
|
56
|
-
|
57
|
-
|
58
|
-
fontSizeMultiplier: 16
|
59
|
-
},
|
60
|
-
large: {
|
61
|
-
indent: 0.625,
|
62
|
-
fontSizeMultiplier: 16
|
63
|
-
}
|
44
|
+
indent: 0.75,
|
45
|
+
fontSizeMultiplier: 16
|
64
46
|
}
|
65
47
|
};
|
@@ -1,3 +1,2 @@
|
|
1
1
|
import { css } from '@emotion/react';
|
2
|
-
|
3
|
-
export var base = /*#__PURE__*/css("&.", classes.verticalOrientation, "{height:100%;display:inline-flex;};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGNsYXNzZXMgfSBmcm9tICcuLi8uLi9TbGlkZXIudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgJi4ke2NsYXNzZXMudmVydGljYWxPcmllbnRhdGlvbn0ge1xuICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICAgIH1cbmA7XG4iXX0= */"));
|
2
|
+
export var base = /*#__PURE__*/css(";label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRXVCIiwiZmlsZSI6Ii4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU2xpZGVyL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBjb25zdCBiYXNlID0gY3NzYGA7XG4iXX0= */"));
|
@@ -0,0 +1,40 @@
|
|
1
|
+
var _excluded = ["children"];
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
6
|
+
import React, { forwardRef } from 'react';
|
7
|
+
import { css } from '@emotion/react';
|
8
|
+
import { base as viewCSS } from './_view/base';
|
9
|
+
var base = process.env.NODE_ENV === "production" ? {
|
10
|
+
name: "y6axm9-plasma-new-hope__base",
|
11
|
+
styles: "position:relative;label:plasma-new-hope__base;"
|
12
|
+
} : {
|
13
|
+
name: "y6axm9-plasma-new-hope__base",
|
14
|
+
styles: "position:relative;label:plasma-new-hope__base;",
|
15
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9WaWV3Q29udGFpbmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPZ0IiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9WaWV3Q29udGFpbmVyL1ZpZXdDb250YWluZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IGZvcndhcmRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB0eXBlIHsgUm9vdFByb3BzIH0gZnJvbSAnLi4vLi4vZW5naW5lcy90eXBlcyc7XG5cbmltcG9ydCB7IGJhc2UgYXMgdmlld0NTUyB9IGZyb20gJy4vX3ZpZXcvYmFzZSc7XG5cbmNvbnN0IGJhc2UgPSBjc3NgXG4gICAgcG9zaXRpb246IHJlbGF0aXZlO1xuYDtcblxuZXhwb3J0IHR5cGUgVmlld0NvbnRhaW5lckN1c3RvbVByb3BzID0ge1xuICAgIC8qKlxuICAgICAqINCS0LjQtCDQutC+0LzQv9C+0L3QtdC90YLQsFxuICAgICAqL1xuICAgIHZpZXc/OiBzdHJpbmc7XG59O1xuXG50eXBlIFZpZXdDb250YWluZXJQcm9wcyA9IFJlYWN0LkhUTUxBdHRyaWJ1dGVzPEhUTUxEaXZFbGVtZW50PiAmIFZpZXdDb250YWluZXJDdXN0b21Qcm9wcztcblxuZXhwb3J0IGNvbnN0IHZpZXdDb250YWluZXJSb290ID0gKFJvb3Q6IFJvb3RQcm9wczxIVE1MQW5jaG9yRWxlbWVudCwgVmlld0NvbnRhaW5lclByb3BzPikgPT5cbiAgICBmb3J3YXJkUmVmPEhUTUxBbmNob3JFbGVtZW50LCBWaWV3Q29udGFpbmVyUHJvcHM+KChwcm9wcywgcmVmKSA9PiB7XG4gICAgICAgIGNvbnN0IHsgY2hpbGRyZW4sIC4uLnJlc3QgfSA9IHByb3BzO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Um9vdCByZWY9e3JlZn0gey4uLnJlc3R9PlxuICAgICAgICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgICAgIDwvUm9vdD5cbiAgICAgICAgKTtcbiAgICB9KTtcblxuZXhwb3J0IGNvbnN0IHZpZXdDb250YWluZXJDb25maWcgPSB7XG4gICAgbmFtZTogJ1ZpZXdDb250YWluZXInLFxuICAgIHRhZzogJ2RpdicsXG4gICAgbGF5b3V0OiB2aWV3Q29udGFpbmVyUm9vdCxcbiAgICBiYXNlLFxuICAgIHZhcmlhdGlvbnM6IHtcbiAgICAgICAgdmlldzoge1xuICAgICAgICAgICAgY3NzOiB2aWV3Q1NTLFxuICAgICAgICB9LFxuICAgIH0sXG4gICAgZGVmYXVsdHM6IHtcbiAgICAgICAgdmlldzogdW5kZWZpbmVkLFxuICAgIH0sXG59O1xuIl19 */",
|
16
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
17
|
+
};
|
18
|
+
export var viewContainerRoot = function viewContainerRoot(Root) {
|
19
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
20
|
+
var children = props.children,
|
21
|
+
rest = _objectWithoutProperties(props, _excluded);
|
22
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
23
|
+
ref: ref
|
24
|
+
}, rest), children);
|
25
|
+
});
|
26
|
+
};
|
27
|
+
export var viewContainerConfig = {
|
28
|
+
name: 'ViewContainer',
|
29
|
+
tag: 'div',
|
30
|
+
layout: viewContainerRoot,
|
31
|
+
base: base,
|
32
|
+
variations: {
|
33
|
+
view: {
|
34
|
+
css: viewCSS
|
35
|
+
}
|
36
|
+
},
|
37
|
+
defaults: {
|
38
|
+
view: undefined
|
39
|
+
}
|
40
|
+
};
|
@@ -0,0 +1,82 @@
|
|
1
|
+
---
|
2
|
+
id: link
|
3
|
+
title: Link
|
4
|
+
---
|
5
|
+
|
6
|
+
import { PropsTable, Description } from '@site/src/components';
|
7
|
+
|
8
|
+
# ViewContainer
|
9
|
+
<Description name="ViewContainer" />
|
10
|
+
<PropsTable name="ViewContainer" exclude={['css']} />
|
11
|
+
|
12
|
+
# Описание
|
13
|
+
|
14
|
+
Данный компонент представляет собой обёртку, которая инвертирует токены компонент, которые в неё помещены, в зависимости от выбранного значения свойства view - `onDark` или `onLight`.
|
15
|
+
|
16
|
+
При этом, независимо от режима темы (тёмный или светлый) для всего приложения, токены внутри не будут меняться.
|
17
|
+
|
18
|
+
Этот механизм необходим для случаев, когда требуется отобразить компонент на специфичном бэкграунде, чтобы избежать наложение цветов.
|
19
|
+
|
20
|
+
# Пример использования
|
21
|
+
|
22
|
+
```tsx live
|
23
|
+
import React from 'react';
|
24
|
+
import { ViewContainer, Button, Checkbox, TextField } from '@salutejs/{{ package }}';
|
25
|
+
|
26
|
+
export function App() {
|
27
|
+
return (
|
28
|
+
<div>
|
29
|
+
<ViewContainer
|
30
|
+
style=\{{
|
31
|
+
padding: '1rem',
|
32
|
+
borderRadius: '1rem',
|
33
|
+
display: 'flex',
|
34
|
+
flexDirection: 'column',
|
35
|
+
gap: '1rem',
|
36
|
+
}}
|
37
|
+
>
|
38
|
+
<h3 style=\{{ margin: 0 }}>Inside default ViewContainer</h3>
|
39
|
+
<Button text="default Button" />
|
40
|
+
<Checkbox checked label="Label" />
|
41
|
+
<TextField value="Example Value" label="Label" labelPlacement="inner" />
|
42
|
+
</ViewContainer>
|
43
|
+
<br />
|
44
|
+
<ViewContainer
|
45
|
+
view="onDark"
|
46
|
+
style=\{{
|
47
|
+
background: '#1a1a1a',
|
48
|
+
color: 'white',
|
49
|
+
padding: '1rem',
|
50
|
+
borderRadius: '1rem',
|
51
|
+
display: 'flex',
|
52
|
+
flexDirection: 'column',
|
53
|
+
gap: '1rem',
|
54
|
+
}}
|
55
|
+
>
|
56
|
+
<h3 style=\{{ margin: 0 }}>Inside onDark ViewContainer</h3>
|
57
|
+
<Button text="default Button" />
|
58
|
+
<Checkbox checked label="Label" />
|
59
|
+
<TextField value="Example Value" label="Label" labelPlacement="inner" />
|
60
|
+
</ViewContainer>
|
61
|
+
<br />
|
62
|
+
<ViewContainer
|
63
|
+
view="onLight"
|
64
|
+
style=\{{
|
65
|
+
background: '#ededed',
|
66
|
+
color: 'black',
|
67
|
+
padding: '1rem',
|
68
|
+
borderRadius: '1rem',
|
69
|
+
display: 'flex',
|
70
|
+
flexDirection: 'column',
|
71
|
+
gap: '1rem',
|
72
|
+
}}
|
73
|
+
>
|
74
|
+
<h3 style=\{{ margin: 0 }}>Inside onLight ViewContainer</h3>
|
75
|
+
<Button text="default Button" />
|
76
|
+
<Checkbox checked label="Label" />
|
77
|
+
<TextField value="Example Value" label="Label" labelPlacement="inner" />
|
78
|
+
</ViewContainer>
|
79
|
+
</div>
|
80
|
+
);
|
81
|
+
}
|
82
|
+
```
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import { css } from '@emotion/react';
|
2
|
+
export var base = /*#__PURE__*/css(";label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvVmlld0NvbnRhaW5lci9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUV1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL1ZpZXdDb250YWluZXIvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgYDtcbiJdfQ== */"));
|
@@ -0,0 +1 @@
|
|
1
|
+
[]
|
@@ -0,0 +1 @@
|
|
1
|
+
export { viewContainerRoot, viewContainerConfig } from './ViewContainer';
|
@@ -6,20 +6,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
6
6
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
7
7
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
8
8
|
import React from 'react';
|
9
|
-
|
10
|
-
export var WithTheme = function WithTheme(Story
|
11
|
-
|
12
|
-
var themeType = context.globals.theme;
|
13
|
-
var themeName = context.title.split('/')[0];
|
14
|
-
return /*#__PURE__*/React.createElement("div", {
|
15
|
-
id: "theme-root",
|
16
|
-
className: themes === null || themes === void 0 || (_themes$themeName = themes[themeName]) === null || _themes$themeName === void 0 ? void 0 : _themes$themeName[themeType],
|
17
|
-
style: {
|
18
|
-
padding: '1rem',
|
19
|
-
minHeight: '100vh',
|
20
|
-
boxSizing: 'border-box'
|
21
|
-
}
|
22
|
-
}, /*#__PURE__*/React.createElement(Story, null));
|
9
|
+
// TODO: Удалить в отдельном пр из всех компонент
|
10
|
+
export var WithTheme = function WithTheme(Story) {
|
11
|
+
return /*#__PURE__*/React.createElement(Story, null);
|
23
12
|
};
|
24
13
|
export function argTypesFromConfig(config) {
|
25
14
|
var exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|