@salutejs/plasma-new-hope 0.84.0-canary.1213.9221965842.0 → 0.84.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Button/Button.css +6 -9
- package/cjs/components/Button/Button.js +2 -16
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Button/Button.styles.js +10 -31
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Button/Button.styles_uqvh6u.css +5 -0
- package/cjs/components/Button/Button.tokens.js +0 -5
- package/cjs/components/Button/Button.tokens.js.map +1 -1
- package/cjs/components/Button/variations/_stretching/base.js +1 -1
- package/cjs/components/Button/variations/_stretching/base.js.map +1 -1
- package/{es/components/Button/variations/_stretching/base_hy8dc.css → cjs/components/Button/variations/_stretching/base_1lx0ute.css} +1 -1
- package/cjs/components/ButtonGroup/ButtonGroup.css +2 -2
- package/cjs/components/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/cjs/components/ButtonGroup/ButtonGroup.tokens.js.map +1 -1
- package/cjs/components/ButtonGroup/variations/_orientation/base.js +1 -1
- package/cjs/components/ButtonGroup/variations/_orientation/base.js.map +1 -1
- package/{es/components/ButtonGroup/variations/_orientation/base_y7z7cs.css → cjs/components/ButtonGroup/variations/_orientation/base_p85v51.css} +1 -1
- package/cjs/components/ButtonGroup/variations/_view/base.js +1 -1
- package/cjs/components/ButtonGroup/variations/_view/base.js.map +1 -1
- package/cjs/components/ButtonGroup/variations/_view/base_6k3uip.css +1 -0
- package/cjs/components/Combobox/hooks/useFocusController.js +1 -0
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Drawer/Drawer.css +6 -9
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.css +6 -9
- package/cjs/components/Header/ui/HeaderArrow/HeaderArrow.css +6 -9
- package/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +2 -4
- package/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js.map +1 -1
- package/cjs/components/IconButton/IconButton.css +7 -10
- package/cjs/components/IconButton/IconButton.styles.js +1 -1
- package/cjs/components/IconButton/{IconButton.styles_7v8g0e.css → IconButton.styles_1hknr37.css} +1 -1
- package/cjs/components/Notification/Notification.css +6 -9
- package/cjs/components/Notification/NotificationsProvider.css +6 -9
- package/cjs/components/Pagination/Pagination.css +8 -11
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +6 -9
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.css +6 -9
- package/cjs/components/Select/Select.css +6 -9
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.css +6 -9
- package/cjs/components/Slider/Slider.css +69 -0
- package/cjs/components/Slider/Slider.js +48 -0
- package/cjs/components/Slider/Slider.js.map +1 -0
- package/cjs/components/Slider/Slider.tokens.js +79 -0
- package/cjs/components/Slider/Slider.tokens.js.map +1 -0
- package/cjs/components/Slider/components/Double/Double.css +62 -0
- package/cjs/components/Slider/components/Double/Double.js +306 -0
- package/cjs/components/Slider/components/Double/Double.js.map +1 -0
- package/cjs/components/Slider/components/Double/Double.styles.js +61 -0
- package/cjs/components/Slider/components/Double/Double.styles.js.map +1 -0
- package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
- package/cjs/components/Slider/components/Single/Single.css +16 -0
- package/cjs/components/Slider/components/Single/Single.js +164 -0
- package/cjs/components/Slider/components/Single/Single.js.map +1 -0
- package/cjs/components/Slider/components/Single/Single.styles.js +45 -0
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -0
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +4 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +82 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +33 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +4 -0
- package/cjs/components/Slider/ui/Handler/Handler.js +168 -0
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -0
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +21 -0
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -0
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.js +31 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +15 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/cjs/components/Slider/utils/index.js +56 -0
- package/cjs/components/Slider/utils/index.js.map +1 -0
- package/cjs/components/Slider/variations/_disabled/base.js +9 -0
- package/cjs/components/Slider/variations/_disabled/base.js.map +1 -0
- package/cjs/components/Slider/variations/_disabled/base_x642ct.css +1 -0
- package/cjs/components/Slider/variations/_size/base.js +9 -0
- package/cjs/components/Slider/variations/_size/base.js.map +1 -0
- package/cjs/components/Slider/variations/_size/base_x642ct.css +1 -0
- package/cjs/components/Slider/variations/_view/base.js +9 -0
- package/cjs/components/Slider/variations/_view/base.js.map +1 -0
- package/cjs/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/TextField/TextField.js +12 -3
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/Toast/Toast.css +6 -9
- package/cjs/components/Toast/ToastController.css +6 -9
- package/cjs/engines/common.js +4 -0
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/index.js.map +1 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js +15 -0
- package/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/cjs/index.css +34 -12
- package/cjs/index.js +14 -0
- package/cjs/index.js.map +1 -1
- package/cjs/utils/canUseDOM.js +12 -0
- package/cjs/utils/canUseDOM.js.map +1 -0
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Button/Button.css +6 -9
- package/es/components/Button/Button.js +3 -17
- package/es/components/Button/Button.js.map +1 -1
- package/es/components/Button/Button.styles.js +11 -29
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Button/Button.styles_uqvh6u.css +5 -0
- package/es/components/Button/Button.tokens.js +0 -5
- package/es/components/Button/Button.tokens.js.map +1 -1
- package/es/components/Button/variations/_stretching/base.js +1 -1
- package/es/components/Button/variations/_stretching/base.js.map +1 -1
- package/{cjs/components/Button/variations/_stretching/base_hy8dc.css → es/components/Button/variations/_stretching/base_1lx0ute.css} +1 -1
- package/es/components/ButtonGroup/ButtonGroup.css +2 -2
- package/es/components/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/es/components/ButtonGroup/ButtonGroup.tokens.js.map +1 -1
- package/es/components/ButtonGroup/variations/_orientation/base.js +1 -1
- package/es/components/ButtonGroup/variations/_orientation/base.js.map +1 -1
- package/{cjs/components/ButtonGroup/variations/_orientation/base_y7z7cs.css → es/components/ButtonGroup/variations/_orientation/base_p85v51.css} +1 -1
- package/es/components/ButtonGroup/variations/_view/base.js +1 -1
- package/es/components/ButtonGroup/variations/_view/base.js.map +1 -1
- package/es/components/ButtonGroup/variations/_view/base_6k3uip.css +1 -0
- package/es/components/Combobox/hooks/useFocusController.js +1 -0
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Drawer/Drawer.css +6 -9
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.css +6 -9
- package/es/components/Header/ui/HeaderArrow/HeaderArrow.css +6 -9
- package/es/components/Header/ui/HeaderArrow/HeaderArrow.js +2 -4
- package/es/components/Header/ui/HeaderArrow/HeaderArrow.js.map +1 -1
- package/es/components/IconButton/IconButton.css +7 -10
- package/es/components/IconButton/IconButton.styles.js +1 -1
- package/es/components/IconButton/{IconButton.styles_7v8g0e.css → IconButton.styles_1hknr37.css} +1 -1
- package/es/components/Notification/Notification.css +6 -9
- package/es/components/Notification/NotificationsProvider.css +6 -9
- package/es/components/Pagination/Pagination.css +8 -11
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +6 -9
- package/es/components/Panel/ui/PanelHeader/PanelHeader.css +6 -9
- package/es/components/Select/Select.css +6 -9
- package/es/components/Select/ui/SelectTarget/SelectTarget.css +6 -9
- package/es/components/Slider/Slider.css +69 -0
- package/es/components/Slider/Slider.js +43 -0
- package/es/components/Slider/Slider.js.map +1 -0
- package/es/components/Slider/Slider.tokens.js +74 -0
- package/es/components/Slider/Slider.tokens.js.map +1 -0
- package/es/components/Slider/components/Double/Double.css +62 -0
- package/es/components/Slider/components/Double/Double.js +302 -0
- package/es/components/Slider/components/Double/Double.js.map +1 -0
- package/es/components/Slider/components/Double/Double.styles.js +51 -0
- package/es/components/Slider/components/Double/Double.styles.js.map +1 -0
- package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +7 -0
- package/es/components/Slider/components/Single/Single.css +16 -0
- package/es/components/Slider/components/Single/Single.js +160 -0
- package/es/components/Slider/components/Single/Single.js.map +1 -0
- package/es/components/Slider/components/Single/Single.styles.js +36 -0
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -0
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +4 -0
- package/es/components/Slider/components/SliderBase/SliderBase.js +78 -0
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -0
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +26 -0
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -0
- package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +4 -0
- package/es/components/Slider/ui/Handler/Handler.css +4 -0
- package/es/components/Slider/ui/Handler/Handler.js +164 -0
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -0
- package/es/components/Slider/ui/Handler/Handler.styles.js +16 -0
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -0
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -0
- package/es/components/Slider/ui/Thumb/Thumb.js +27 -0
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -0
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -0
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/es/components/Slider/utils/index.js +50 -0
- package/es/components/Slider/utils/index.js.map +1 -0
- package/es/components/Slider/variations/_disabled/base.js +5 -0
- package/es/components/Slider/variations/_disabled/base.js.map +1 -0
- package/es/components/Slider/variations/_disabled/base_x642ct.css +1 -0
- package/es/components/Slider/variations/_size/base.js +5 -0
- package/es/components/Slider/variations/_size/base.js.map +1 -0
- package/es/components/Slider/variations/_size/base_x642ct.css +1 -0
- package/es/components/Slider/variations/_view/base.js +5 -0
- package/es/components/Slider/variations/_view/base.js.map +1 -0
- package/es/components/Slider/variations/_view/base_x642ct.css +1 -0
- package/es/components/TextField/TextField.js +12 -3
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/Toast/Toast.css +6 -9
- package/es/components/Toast/ToastController.css +6 -9
- package/es/engines/common.js +4 -0
- package/es/engines/common.js.map +1 -1
- package/es/engines/index.js.map +1 -1
- package/es/hooks/useIsomorphicLayoutEffect.js +11 -0
- package/es/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/es/index.css +34 -12
- package/es/index.js +8 -0
- package/es/index.js.map +1 -1
- package/es/utils/canUseDOM.js +8 -0
- package/es/utils/canUseDOM.js.map +1 -0
- package/es/utils/index.js.map +1 -1
- package/package.json +3 -2
- package/styled-components/cjs/components/Button/Button.js +2 -16
- package/styled-components/cjs/components/Button/Button.styles.js +12 -20
- package/styled-components/cjs/components/Button/Button.template-doc.mdx +0 -42
- package/styled-components/cjs/components/Button/Button.tokens.js +0 -5
- package/styled-components/cjs/components/Button/variations/_stretching/base.js +1 -1
- package/styled-components/cjs/components/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/styled-components/cjs/components/ButtonGroup/variations/_orientation/base.js +1 -2
- package/styled-components/cjs/components/ButtonGroup/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +2 -4
- package/styled-components/cjs/components/Slider/Slider.js +47 -0
- package/styled-components/cjs/components/Slider/Slider.tokens.js +77 -0
- package/styled-components/cjs/components/Slider/Slider.types.js +5 -0
- package/styled-components/cjs/components/Slider/components/Double/Double.js +318 -0
- package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +36 -0
- package/styled-components/cjs/components/Slider/components/Double/Double.types.js +5 -0
- package/styled-components/cjs/components/Slider/components/Single/Single.js +176 -0
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +27 -0
- package/styled-components/cjs/components/Slider/components/Single/Single.types.js +5 -0
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +83 -0
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +21 -0
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +5 -0
- package/styled-components/cjs/components/Slider/components/index.js +27 -0
- package/styled-components/cjs/components/Slider/index.js +32 -0
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +177 -0
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -0
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.types.js +5 -0
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +32 -0
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +18 -0
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +5 -0
- package/styled-components/cjs/components/Slider/ui/index.js +63 -0
- package/styled-components/cjs/components/Slider/utils/index.js +55 -0
- package/styled-components/cjs/components/Slider/variations/_disabled/base.js +8 -0
- package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +4 -0
- package/styled-components/cjs/components/Slider/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/cjs/components/Slider/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/cjs/components/TextField/TextField.js +12 -3
- package/styled-components/cjs/engines/common.js +4 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.config.js +19 -19
- package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.stories.tsx +21 -67
- package/styled-components/cjs/examples/plasma_b2c/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/cjs/examples/plasma_b2c/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +29 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +16 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +169 -0
- package/styled-components/cjs/examples/plasma_web/components/Button/Button.config.js +19 -19
- package/styled-components/cjs/examples/plasma_web/components/Button/Button.stories.tsx +28 -90
- package/styled-components/cjs/examples/plasma_web/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/cjs/examples/plasma_web/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +29 -0
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +16 -0
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +168 -0
- package/styled-components/cjs/examples/sds_engineer/components/Button/Button.config.js +19 -19
- package/styled-components/cjs/examples/sds_engineer/components/Button/Button.stories.tsx +28 -90
- package/styled-components/cjs/examples/sds_engineer/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/cjs/examples/sds_engineer/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/cjs/hooks/index.js +8 -1
- package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +12 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/cjs/utils/canUseDOM.js +11 -0
- package/styled-components/cjs/utils/index.js +7 -0
- package/styled-components/es/components/Button/Button.js +3 -17
- package/styled-components/es/components/Button/Button.styles.js +11 -19
- package/styled-components/es/components/Button/Button.template-doc.mdx +0 -42
- package/styled-components/es/components/Button/Button.tokens.js +0 -5
- package/styled-components/es/components/Button/variations/_stretching/base.js +1 -1
- package/styled-components/es/components/ButtonGroup/ButtonGroup.tokens.js +0 -1
- package/styled-components/es/components/ButtonGroup/variations/_orientation/base.js +2 -3
- package/styled-components/es/components/ButtonGroup/variations/_view/base.js +1 -1
- package/styled-components/es/components/Header/ui/HeaderArrow/HeaderArrow.js +2 -4
- package/styled-components/es/components/Slider/Slider.js +38 -0
- package/styled-components/es/components/Slider/Slider.tokens.js +71 -0
- package/styled-components/es/components/Slider/Slider.types.js +1 -0
- package/styled-components/es/components/Slider/components/Double/Double.js +310 -0
- package/styled-components/es/components/Slider/components/Double/Double.styles.js +29 -0
- package/styled-components/es/components/Slider/components/Double/Double.types.js +1 -0
- package/styled-components/es/components/Slider/components/Single/Single.js +168 -0
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +20 -0
- package/styled-components/es/components/Slider/components/Single/Single.types.js +1 -0
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +74 -0
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +14 -0
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +1 -0
- package/styled-components/es/components/Slider/components/index.js +3 -0
- package/styled-components/es/components/Slider/index.js +3 -0
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +168 -0
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +8 -0
- package/styled-components/es/components/Slider/ui/Handler/Handler.types.js +1 -0
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +25 -0
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +11 -0
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +1 -0
- package/styled-components/es/components/Slider/ui/index.js +5 -0
- package/styled-components/es/components/Slider/utils/index.js +47 -0
- package/styled-components/es/components/Slider/variations/_disabled/base.js +2 -0
- package/styled-components/es/components/Slider/variations/_disabled/tokens.json +4 -0
- package/styled-components/es/components/Slider/variations/_size/base.js +2 -0
- package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/es/components/Slider/variations/_view/base.js +2 -0
- package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/es/components/TextField/TextField.js +12 -3
- package/styled-components/es/engines/common.js +4 -0
- package/styled-components/es/examples/plasma_b2c/components/Button/Button.config.js +19 -19
- package/styled-components/es/examples/plasma_b2c/components/Button/Button.stories.tsx +21 -67
- package/styled-components/es/examples/plasma_b2c/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/es/examples/plasma_b2c/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +23 -0
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +10 -0
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +169 -0
- package/styled-components/es/examples/plasma_web/components/Button/Button.config.js +19 -19
- package/styled-components/es/examples/plasma_web/components/Button/Button.stories.tsx +28 -90
- package/styled-components/es/examples/plasma_web/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/es/examples/plasma_web/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +23 -0
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +10 -0
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +168 -0
- package/styled-components/es/examples/sds_engineer/components/Button/Button.config.js +19 -19
- package/styled-components/es/examples/sds_engineer/components/Button/Button.stories.tsx +28 -90
- package/styled-components/es/examples/sds_engineer/components/ButtonGroup/ButtonGroup.config.js +10 -10
- package/styled-components/es/examples/sds_engineer/components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/styled-components/es/hooks/index.js +2 -1
- package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +7 -0
- package/styled-components/es/index.js +2 -1
- package/styled-components/es/utils/canUseDOM.js +5 -0
- package/styled-components/es/utils/index.js +1 -0
- package/types/components/Button/Button.d.ts.map +1 -1
- package/types/components/Button/Button.styles.d.ts +1 -5
- package/types/components/Button/Button.styles.d.ts.map +1 -1
- package/types/components/Button/Button.tokens.d.ts +0 -5
- package/types/components/Button/Button.tokens.d.ts.map +1 -1
- package/types/components/Button/Button.types.d.ts +4 -16
- package/types/components/Button/Button.types.d.ts.map +1 -1
- package/types/components/ButtonGroup/ButtonGroup.tokens.d.ts +0 -1
- package/types/components/ButtonGroup/ButtonGroup.tokens.d.ts.map +1 -1
- package/types/components/ButtonGroup/variations/_orientation/base.d.ts.map +1 -1
- package/types/components/ButtonGroup/variations/_view/base.d.ts.map +1 -1
- package/types/components/Header/ui/HeaderArrow/HeaderArrow.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts +1 -43
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Pagination/Pagination.styles.d.ts +2 -86
- package/types/components/Pagination/Pagination.styles.d.ts.map +1 -1
- package/types/components/Panel/ui/PanelHeader/PanelHeader.styles.d.ts +1 -43
- package/types/components/Panel/ui/PanelHeader/PanelHeader.styles.d.ts.map +1 -1
- package/types/components/Select/ui/SelectTarget/SelectTarget.styles.d.ts +1 -43
- package/types/components/Select/ui/SelectTarget/SelectTarget.styles.d.ts.map +1 -1
- package/types/components/Slider/Slider.d.ts +27 -0
- package/types/components/Slider/Slider.d.ts.map +1 -0
- package/types/components/Slider/Slider.tokens.d.ts +72 -0
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -0
- package/types/components/Slider/Slider.types.d.ts +3 -0
- package/types/components/Slider/Slider.types.d.ts.map +1 -0
- package/types/components/Slider/components/Double/Double.d.ts +4 -0
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -0
- package/types/components/Slider/components/Double/Double.styles.d.ts +43 -0
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -0
- package/types/components/Slider/components/Double/Double.types.d.ts +65 -0
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -0
- package/types/components/Slider/components/Single/Single.d.ts +4 -0
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -0
- package/types/components/Slider/components/Single/Single.styles.d.ts +8 -0
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -0
- package/types/components/Slider/components/Single/Single.types.d.ts +55 -0
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -0
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts +4 -0
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -0
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +6 -0
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -0
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +45 -0
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -0
- package/types/components/Slider/components/index.d.ts +6 -0
- package/types/components/Slider/components/index.d.ts.map +1 -0
- package/types/components/Slider/index.d.ts +6 -0
- package/types/components/Slider/index.d.ts.map +1 -0
- package/types/components/Slider/ui/Handler/Handler.d.ts +9 -0
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -0
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +4 -0
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -0
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +24 -0
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -0
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +4 -0
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -0
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +5 -0
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -0
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +12 -0
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -0
- package/types/components/Slider/ui/index.d.ts +6 -0
- package/types/components/Slider/ui/index.d.ts.map +1 -0
- package/types/components/Slider/utils/index.d.ts +33 -0
- package/types/components/Slider/utils/index.d.ts.map +1 -0
- package/types/components/Slider/variations/_disabled/base.d.ts +2 -0
- package/types/components/Slider/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/Slider/variations/_size/base.d.ts +2 -0
- package/types/components/Slider/variations/_size/base.d.ts.map +1 -0
- package/types/components/Slider/variations/_view/base.d.ts +2 -0
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -0
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/Toast/Toast.styles.d.ts +1 -43
- package/types/components/Toast/Toast.styles.d.ts.map +1 -1
- package/types/components/Toast/utils.d.ts +1 -43
- package/types/components/Toast/utils.d.ts.map +1 -1
- package/types/engines/common.d.ts +3 -3
- package/types/engines/common.d.ts.map +1 -1
- package/types/engines/index.d.ts +1 -1
- package/types/engines/index.d.ts.map +1 -1
- package/types/engines/types.d.ts +4 -0
- package/types/engines/types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Button/Button.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Button/Button.d.ts +1 -43
- package/types/examples/plasma_b2c/components/Button/Button.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/ButtonGroup/ButtonGroup.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +1 -43
- package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +22 -0
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +21 -0
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Button/Button.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Button/Button.d.ts +1 -43
- package/types/examples/plasma_web/components/Button/Button.d.ts.map +1 -1
- package/types/examples/plasma_web/components/ButtonGroup/ButtonGroup.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +1 -43
- package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +22 -0
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +21 -0
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/Button/Button.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Button/Button.d.ts +1 -43
- package/types/examples/sds_engineer/components/Button/Button.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/ButtonGroup/ButtonGroup.config.d.ts.map +1 -1
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +6 -0
- package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/utils/canUseDOM.d.ts +6 -0
- package/types/utils/canUseDOM.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Button/Button.styles_1oz1dew.css +0 -8
- package/cjs/components/ButtonGroup/variations/_view/base_1n9gznw.css +0 -1
- package/es/components/Button/Button.styles_1oz1dew.css +0 -8
- package/es/components/ButtonGroup/variations/_view/base_1n9gznw.css +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Slider/utils/index.ts"],"sourcesContent":["import { MutableRefObject } from 'react';\n\n/**\n * Расчитать значение слайдера с учетом его координат и шага изменений.\n * @param {number} handleCenterXRelative\n * @param {number} stepSize\n * @param {number} min\n * @param {number} max\n * @return {number}\n */\nexport function getSliderThumbValue(handleCenterXRelative: number, stepSize: number, min: number, max: number) {\n const newValue = Math.round(handleCenterXRelative / stepSize) + min;\n\n return Math.min(Math.max(newValue, min), max);\n}\n\n/**\n * Расчитывает значение отступа слайдера на основе его положения (справа, слева) на отрезке слайдера.\n * Значение используется для правильного расчета ограничения движения слайдера.\n * @param ref\n * @param {'left' | 'right'} side\n * @return Array<number>\n */\nexport function getOffsets(\n ref: ((instance: HTMLDivElement | null) => void) | MutableRefObject<HTMLDivElement | null> | null,\n side?: 'left' | 'right',\n): number[] {\n if (!ref || !('current' in ref) || !ref.current || !side) {\n return [0, 0];\n }\n\n const size = ref.current.clientWidth;\n\n if (side === 'left') {\n return [0, size];\n }\n\n if (side === 'right') {\n return [size, 0];\n }\n\n return [0, 0];\n}\n\nexport const sizeData = {\n s: {\n indent: 0.5,\n fontSizeMultiplier: 16,\n },\n m: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n l: {\n indent: 0.75,\n fontSizeMultiplier: 16,\n },\n};\n"],"names":["getSliderThumbValue","handleCenterXRelative","stepSize","min","max","newValue","Math","round","getOffsets","ref","side","current","size","clientWidth","sizeData","s","indent","fontSizeMultiplier","m","l"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,mBAAmBA,CAACC,qBAA6B,EAAEC,QAAgB,EAAEC,GAAW,EAAEC,GAAW,EAAE;EAC3G,IAAMC,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACN,qBAAqB,GAAGC,QAAQ,CAAC,GAAGC,GAAG,CAAA;AAEnE,EAAA,OAAOG,IAAI,CAACH,GAAG,CAACG,IAAI,CAACF,GAAG,CAACC,QAAQ,EAAEF,GAAG,CAAC,EAAEC,GAAG,CAAC,CAAA;AACjD,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,UAAUA,CACtBC,GAAiG,EACjGC,IAAuB,EACf;AACR,EAAA,IAAI,CAACD,GAAG,IAAI,EAAE,SAAS,IAAIA,GAAG,CAAC,IAAI,CAACA,GAAG,CAACE,OAAO,IAAI,CAACD,IAAI,EAAE;AACtD,IAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,GAAA;AAEA,EAAA,IAAME,IAAI,GAAGH,GAAG,CAACE,OAAO,CAACE,WAAW,CAAA;EAEpC,IAAIH,IAAI,KAAK,MAAM,EAAE;AACjB,IAAA,OAAO,CAAC,CAAC,EAAEE,IAAI,CAAC,CAAA;AACpB,GAAA;EAEA,IAAIF,IAAI,KAAK,OAAO,EAAE;AAClB,IAAA,OAAO,CAACE,IAAI,EAAE,CAAC,CAAC,CAAA;AACpB,GAAA;AAEA,EAAA,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACjB,CAAA;AAEO,IAAME,QAAQ,GAAG;AACpBC,EAAAA,CAAC,EAAE;AACCC,IAAAA,MAAM,EAAE,GAAG;AACXC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDC,EAAAA,CAAC,EAAE;AACCF,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;GACvB;AACDE,EAAAA,CAAC,EAAE;AACCH,IAAAA,MAAM,EAAE,IAAI;AACZC,IAAAA,kBAAkB,EAAE,EAAA;AACxB,GAAA;AACJ;;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_disabled/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_size/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Slider/variations/_view/base.tsx"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -17,11 +17,13 @@ var TextField_tokens = require('./TextField.tokens.js');
|
|
17
17
|
var TextFieldChip = require('./ui/TextFieldChip/TextFieldChip.js');
|
18
18
|
var useKeyNavigation = require('./hooks/useKeyNavigation.js');
|
19
19
|
|
20
|
-
var _excluded = ["id", "contentLeft", "contentRight", "label", "labelPlacement", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch"];
|
20
|
+
var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
|
21
21
|
var base = "bpunezx";
|
22
22
|
var textFieldRoot = function textFieldRoot(Root) {
|
23
23
|
return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
24
24
|
var id = _ref.id,
|
25
|
+
className = _ref.className,
|
26
|
+
style = _ref.style,
|
25
27
|
contentLeft = _ref.contentLeft,
|
26
28
|
contentRight = _ref.contentRight,
|
27
29
|
label = _ref.label,
|
@@ -40,6 +42,7 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
40
42
|
onChange = _ref.onChange,
|
41
43
|
onChangeChips = _ref.onChangeChips,
|
42
44
|
onSearch = _ref.onSearch,
|
45
|
+
onKeyDown = _ref.onKeyDown,
|
43
46
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
44
47
|
var contentRef = React.useRef(null);
|
45
48
|
var inputRef = React.useRef(null);
|
@@ -119,6 +122,10 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
119
122
|
chipsRefs.current[index] = element;
|
120
123
|
}
|
121
124
|
};
|
125
|
+
var handleOnKeyDown = function handleOnKeyDown(event) {
|
126
|
+
handleInputKeydown(event);
|
127
|
+
onKeyDown && onKeyDown(event);
|
128
|
+
};
|
122
129
|
React.useEffect(function () {
|
123
130
|
if (!isChipEnumeration && !(values !== null && values !== void 0 && values.length)) {
|
124
131
|
return;
|
@@ -137,7 +144,9 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
137
144
|
disabled: disabled,
|
138
145
|
readOnly: !disabled && readOnly,
|
139
146
|
labelPlacement: innerLabelPlacementValue,
|
140
|
-
onClick: handleInputFocus
|
147
|
+
onClick: handleInputFocus,
|
148
|
+
className: className,
|
149
|
+
style: style
|
141
150
|
}, labelInside || innerLabelValue && /*#__PURE__*/React.createElement(TextField_styles.Label, {
|
142
151
|
id: labelId,
|
143
152
|
htmlFor: id
|
@@ -178,7 +187,7 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
178
187
|
disabled: disabled,
|
179
188
|
readOnly: !disabled && readOnly,
|
180
189
|
onChange: handleChange,
|
181
|
-
onKeyDown:
|
190
|
+
onKeyDown: handleOnKeyDown
|
182
191
|
})), labelInside && /*#__PURE__*/React.createElement(TextField_styles.Label, {
|
183
192
|
id: labelId,
|
184
193
|
htmlFor: innerId
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEventHandler } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport {\n Input,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n overflow: hidden;\n`;\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n\n // controlled\n chips: values,\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isChipEnumeration = enumerationType === 'chip';\n const hideLabel = (size === 'xs' || isChipEnumeration) && labelPlacement === 'inner';\n const labelInside = size !== 'xs' && labelPlacement === 'inner';\n const innerLabelPlacementValue = hideLabel ? 'outer' : labelPlacement;\n const innerPlaceholderValue = hideLabel ? label : placeholder;\n const innerLabelValue = hideLabel ? undefined : label;\n\n const isChipsVisible = isChipEnumeration && chips?.length;\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n const wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n\n inputRef.current.focus({ preventScroll: true });\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n labelPlacement={innerLabelPlacementValue}\n onClick={handleInputFocus}\n >\n {labelInside ||\n (innerLabelValue && (\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n ))}\n <InputWrapper className={cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)}>\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips>\n {chips?.map(({ id: chipId, text }, index) => {\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n />\n );\n })}\n </StyledChips>\n )}\n <Input\n {...rest}\n ref={inputForkRef}\n id={innerId}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onChange={handleChange}\n onKeyDown={handleInputKeydown}\n />\n {labelInside && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n </Label>\n )}\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["base","textFieldRoot","Root","forwardRef","_ref","ref","id","contentLeft","contentRight","label","labelPlacement","placeholder","leftHelper","_ref$enumerationType","enumerationType","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","values","chips","onChange","onChangeChips","onSearch","rest","contentRef","useRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","_useState2","_slicedToArray","setChips","uniqId","safeUseId","innerId","labelId","helperTextId","isChipEnumeration","hideLabel","labelInside","innerLabelPlacementValue","innerPlaceholderValue","innerLabelValue","undefined","isChipsVisible","length","withHasChips","classes","hasChips","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","handleChange","event","_event$target","target","maxLength","value","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","stopPropagation","handleInputFocus","current","scrollIntoView","behavior","block","inline","focus","preventScroll","getRef","element","index","useEffect","map","concat","text","React","createElement","onClick","Label","htmlFor","InputWrapper","className","cx","StyledContentLeft","InputLabelWrapper","tabIndex","onKeyDown","Boolean","StyledChips","_ref2","chipId","TextFieldChip","key","onClear","Input","_extends","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","disabledCSS","attrs","readOnlyCSS","labelPlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BO,IAAMA,IAAI,GAIhB,UAAA;IAEYC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAA+C,EAAA;AAAA,EAAA,oBACzEC,gBAAU,CACN,UAAAC,IAAA,EA6BIC,GAAG,EACF;AAAA,IAAA,IA5BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MAGFC,WAAW,GAAAH,IAAA,CAAXG,WAAW;MACXC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;MACZC,KAAK,GAAAL,IAAA,CAALK,KAAK;MACLC,cAAc,GAAAN,IAAA,CAAdM,cAAc;MACdC,WAAW,GAAAP,IAAA,CAAXO,WAAW;MACXC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;MAAAC,oBAAA,GAAAT,IAAA,CACVU,eAAe;AAAfA,MAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,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A,KAAK,EAAE,IAAA;KACV;AACD1G,IAAAA,QAAQ,EAAE;AACNsG,MAAAA,GAAG,EAAEK,WAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDlH,IAAAA,cAAc,EAAE;AACZ8G,MAAAA,GAAG,EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/G,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport type { ChangeEventHandler, KeyboardEvent, ChangeEvent } from 'react';\nimport { safeUseId, useForkRef } from '@salutejs/plasma-core';\nimport { css } from '@linaria/core';\n\nimport type { RootProps } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { ChipValues, TextFieldPrimitiveValue, TextFieldProps } from './TextField.types';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readOnlyCSS } from './variations/_read-only/base';\nimport { base as labelPlacementCSS } from './variations/_label-placement/base';\nimport {\n Input,\n LeftHelper,\n Label,\n InputWrapper,\n InputLabelWrapper,\n StyledContentLeft,\n StyledContentRight,\n StyledChips,\n} from './TextField.styles';\nimport { classes } from './TextField.tokens';\nimport { TextFieldChip } from './ui';\nimport { useKeyNavigation } from './hooks';\n\nexport const base = css`\n /* NOTE: Webkit не применяет opacity к inline тегам */\n display: block;\n overflow: hidden;\n`;\n\nexport const textFieldRoot = (Root: RootProps<HTMLDivElement, TextFieldProps>) =>\n forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n style,\n\n // layout\n contentLeft,\n contentRight,\n label,\n labelPlacement,\n placeholder,\n leftHelper,\n enumerationType = 'plain',\n\n // variations\n view,\n size,\n readOnly = false,\n disabled = false,\n\n // controlled\n chips: values,\n\n // events\n onChange,\n onChangeChips,\n onSearch,\n onKeyDown,\n\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const inputForkRef = useForkRef(inputRef, ref);\n const chipsRefs = useRef<Array<HTMLButtonElement>>([]);\n\n const controlledRefs = { contentRef, inputRef, chipsRefs };\n\n const [chips, setChips] = useState<Array<ChipValues>>([]);\n\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n const labelId = safeUseId();\n const helperTextId = safeUseId();\n\n const isChipEnumeration = enumerationType === 'chip';\n const hideLabel = (size === 'xs' || isChipEnumeration) && labelPlacement === 'inner';\n const labelInside = size !== 'xs' && labelPlacement === 'inner';\n const innerLabelPlacementValue = hideLabel ? 'outer' : labelPlacement;\n const innerPlaceholderValue = hideLabel ? label : placeholder;\n const innerLabelValue = hideLabel ? undefined : label;\n\n const isChipsVisible = isChipEnumeration && chips?.length;\n const withHasChips = isChipsVisible ? classes.hasChips : undefined;\n const wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;\n const wrapperWithoutRightContent =\n !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n if (disabled || readOnly) {\n return;\n }\n\n const { maxLength, value } = event.target;\n\n if (maxLength !== -1 && value.length > maxLength) {\n return;\n }\n\n onChange?.(event);\n };\n\n const updateChips = (newChips: Array<ChipValues>, newValues: Array<TextFieldPrimitiveValue>) => {\n setChips(newChips);\n onChangeChips?.(newValues);\n };\n\n const { handleInputKeydown, handleChipKeyDown, onChipClear, handleContentKeyDown } = useKeyNavigation({\n controlledRefs,\n disabled,\n readOnly,\n chips,\n enumerationType,\n updateChips,\n onSearch,\n onChange,\n });\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const handleInputFocus = () => {\n if (readOnly || disabled || !inputRef?.current) {\n return;\n }\n\n inputRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n\n inputRef.current.focus({ preventScroll: true });\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs?.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n const handleOnKeyDown = (event: ChangeEvent<HTMLInputElement> & KeyboardEvent<HTMLInputElement>) => {\n handleInputKeydown(event);\n onKeyDown && onKeyDown(event);\n };\n\n useEffect(() => {\n if (!isChipEnumeration && !values?.length) {\n return;\n }\n\n const newChips =\n values?.map((value, index) => ({\n id: `${index}_${value}`,\n text: value,\n })) || [];\n\n setChips(newChips);\n }, [isChipEnumeration, values]);\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n labelPlacement={innerLabelPlacementValue}\n onClick={handleInputFocus}\n className={className}\n style={style}\n >\n {labelInside ||\n (innerLabelValue && (\n <Label id={labelId} htmlFor={id}>\n {innerLabelValue}\n </Label>\n ))}\n <InputWrapper className={cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)}>\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n <InputLabelWrapper\n tabIndex={-1}\n ref={contentRef}\n onKeyDown={handleContentKeyDown}\n className={withHasChips}\n >\n {isChipEnumeration && Boolean(chips?.length) && (\n <StyledChips>\n {chips?.map(({ id: chipId, text }, index) => {\n return (\n <TextFieldChip\n id={chipId}\n ref={(element) => getRef(element, index)}\n key={`${chipId}_${index}`}\n disabled={disabled}\n readOnly={readOnly}\n value={text}\n text={text}\n onKeyDown={(event) => handleChipKeyDown(event, chipId, index)}\n onClear={() => onChipClear(chipId, index)}\n onClick={onChipClick}\n />\n );\n })}\n </StyledChips>\n )}\n <Input\n {...rest}\n ref={inputForkRef}\n id={innerId}\n aria-labelledby={labelId}\n aria-describedby={helperTextId}\n placeholder={innerPlaceholderValue}\n disabled={disabled}\n readOnly={!disabled && readOnly}\n onChange={handleChange}\n onKeyDown={handleOnKeyDown}\n />\n {labelInside && (\n <Label id={labelId} htmlFor={innerId}>\n {innerLabelValue}\n </Label>\n )}\n </InputLabelWrapper>\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n </InputWrapper>\n {leftHelper && <LeftHelper id={helperTextId}>{leftHelper}</LeftHelper>}\n </Root>\n );\n },\n );\n\nexport const textFieldConfig = {\n name: 'TextField',\n tag: 'div',\n layout: textFieldRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readOnlyCSS,\n attrs: true,\n },\n labelPlacement: {\n css: labelPlacementCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'default',\n },\n};\n"],"names":["base","textFieldRoot","Root","forwardRef","_ref","ref","id","className","style","contentLeft","contentRight","label","labelPlacement","placeholder","leftHelper","_ref$enumerationType","enumerationType","view","size","_ref$readOnly","readOnly","_ref$disabled","disabled","values","chips","onChange","onChangeChips","onSearch","onKeyDown","rest","contentRef","useRef","inputRef","inputForkRef","useForkRef","chipsRefs","controlledRefs","_useState","useState","_useState2","_slicedToArray","setChips","uniqId","safeUseId","innerId","labelId","helperTextId","isChipEnumeration","hideLabel","labelInside","innerLabelPlacementValue","innerPlaceholderValue","innerLabelValue","undefined","isChipsVisible","length","withHasChips","classes","hasChips","wrapperWithoutLeftContent","hasEmptyContentLeft","wrapperWithoutRightContent","hasEmptyContentRight","handleChange","event","_event$target","target","maxLength","value","updateChips","newChips","newValues","_useKeyNavigation","useKeyNavigation","handleInputKeydown","handleChipKeyDown","onChipClear","handleContentKeyDown","onChipClick","stopPropagation","handleInputFocus","current","scrollIntoView","behavior","block","inline","focus","preventScroll","getRef","element","index","handleOnKeyDown","useEffect","map","concat","text","React","createElement","onClick","Label","htmlFor","InputWrapper","cx","StyledContentLeft","InputLabelWrapper","tabIndex","Boolean","StyledChips","_ref2","chipId","TextFieldChip","key","onClear","Input","_extends","StyledContentRight","LeftHelper","textFieldConfig","name","tag","layout","variations","css","viewCSS","sizeCSS","disabledCSS","attrs","readOnlyCSS","labelPlacementCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BO,IAAMA,IAAI,GAIhB,UAAA;IAEYC,aAAa,GAAGA,SAAhBA,aAAaA,CAAIC,IAA+C,EAAA;AAAA,EAAA,oBACzEC,gBAAU,CACN,UAAAC,IAAA,EAgCIC,GAAG,EACF;AAAA,IAAA,IA/BGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,KAAK,GAAAJ,IAAA,CAALI,KAAK;MAGLC,WAAW,GAAAL,IAAA,CAAXK,WAAW;MACXC,YAAY,GAAAN,IAAA,CAAZM,YAAY;MACZC,KAAK,GAAAP,IAAA,CAALO,KAAK;MACLC,cAAc,GAAAR,IAAA,CAAdQ,cAAc;MACdC,WAAW,GAAAT,IAAA,CAAXS,WAAW;MACXC,UAAU,GAAAV,IAAA,CAAVU,UAAU;MAAAC,oBAAA,GAAAX,IAAA,CACVY,eAAe;AAAfA,MAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,oBAAA;MAGzBE,IAAI,GAAAb,IAAA,CAAJa,IAAI;MACJC,IAAI,GAAAd,IAAA,CAAJc,IAAI;MAAAC,aAAA,GAAAf,IAAA,CACJgB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,aAAA,GAAAjB,IAAA,CAChBkB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAGTE,MAAM,GAAAnB,IAAA,CAAboB,KAAK;MAGLC,QAAQ,GAAArB,IAAA,CAARqB,QAAQ;MACRC,aAAa,GAAAtB,IAAA,CAAbsB,aAAa;MAC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EAAEM,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/G,IAAAA,IAAI,EAAE,GAAG;AACTD,IAAAA,IAAI,EAAE,SAAA;AACV,GAAA;AACJ;;;;;;"}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
18
18
|
|
19
|
-
.
|
19
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
20
20
|
|
21
21
|
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
22
22
|
|
@@ -25,14 +25,11 @@
|
|
25
25
|
.Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
26
26
|
.Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
|
27
27
|
|
28
|
-
.
|
29
|
-
.
|
30
|
-
.
|
31
|
-
.
|
32
|
-
.
|
33
|
-
.Button_styles_1oz1dew_s7rggv0__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-left-content-margin);}
|
34
|
-
.Button_styles_1oz1dew_s1rjh7ra__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);}
|
35
|
-
.Button_styles_1oz1dew_b9ga1dj__a16b28b2{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1oz1dew_b9ga1dj__a16b28b2{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_buttonSquare__a16b28b2{width:var(--plasma-button-height);padding:0;}
|
28
|
+
.Button_styles_uqvh6u_bzw1898__b7cda4d5{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_uqvh6u_bzw1898__b7cda4d5{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_buttonSquare__b7cda4d5{width:var(--plasma-button-height);padding:0;}
|
29
|
+
.Button_styles_uqvh6u_bdfuqwe__b7cda4d5{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:last-child){margin-right:0.375rem;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:first-child){margin-left:0.375rem;}
|
30
|
+
.Button_styles_uqvh6u_l9ypozh__b7cda4d5{opacity:var(--l9ypozh-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-align-items:inherit;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-pack:inherit;-webkit-justify-content:inherit;-ms-flex-pack:inherit;justify-content:inherit;height:100%;}
|
31
|
+
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
32
|
+
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
36
33
|
|
37
34
|
.Toast_styles_1v9oj7f_b1xqk743__c6e2219d{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma-button-width:1rem;}
|
38
35
|
.Toast_styles_1v9oj7f_s1ajsqhx__c6e2219d{position:fixed;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);z-index:9901;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:0;top:var(--s1ajsqhx-0);bottom:var(--s1ajsqhx-1);}.Toast_styles_1v9oj7f_s1ajsqhx__c6e2219d.Toast_styles_1v9oj7f_toastShowed__c6e2219d{-webkit-animation:0.3s Toast_styles_1v9oj7f_showToastAnimationS1ajsqhx__c6e2219d ease-out forwards;animation:0.3s Toast_styles_1v9oj7f_showToastAnimationS1ajsqhx__c6e2219d ease-out forwards;}.Toast_styles_1v9oj7f_s1ajsqhx__c6e2219d.Toast_styles_1v9oj7f_toastHidden__c6e2219d{-webkit-animation:0.3s Toast_styles_1v9oj7f_hideToastAnimationS1ajsqhx__c6e2219d ease-out forwards;animation:0.3s Toast_styles_1v9oj7f_hideToastAnimationS1ajsqhx__c6e2219d ease-out forwards;}@-webkit-keyframes Toast_styles_1v9oj7f_showToastAnimationS1ajsqhx__c6e2219d{0%{-webkit-transform:var(--s1ajsqhx-2);-ms-transform:var(--s1ajsqhx-2);transform:var(--s1ajsqhx-2);opacity:0;}80%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0.7;}100%{opacity:1;}}@keyframes Toast_styles_1v9oj7f_showToastAnimationS1ajsqhx__c6e2219d{0%{-webkit-transform:var(--s1ajsqhx-2);-ms-transform:var(--s1ajsqhx-2);transform:var(--s1ajsqhx-2);opacity:0;}80%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0.7;}100%{opacity:1;}}@-webkit-keyframes Toast_styles_1v9oj7f_hideToastAnimationS1ajsqhx__c6e2219d{0%{opacity:1;}20%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0.7;}100%{-webkit-transform:var(--s1ajsqhx-2);-ms-transform:var(--s1ajsqhx-2);transform:var(--s1ajsqhx-2);opacity:0;}}@keyframes Toast_styles_1v9oj7f_hideToastAnimationS1ajsqhx__c6e2219d{0%{opacity:1;}20%{-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0);opacity:0.7;}100%{-webkit-transform:var(--s1ajsqhx-2);-ms-transform:var(--s1ajsqhx-2);transform:var(--s1ajsqhx-2);opacity:0;}}
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
17
17
|
|
18
|
-
.
|
18
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
19
19
|
|
20
20
|
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
21
21
|
|
@@ -24,11 +24,8 @@
|
|
24
24
|
.Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
25
25
|
.Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
|
26
26
|
|
27
|
-
.
|
28
|
-
.
|
29
|
-
.
|
30
|
-
.
|
31
|
-
.
|
32
|
-
.Button_styles_1oz1dew_s7rggv0__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-left-content-margin);}
|
33
|
-
.Button_styles_1oz1dew_s1rjh7ra__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);}
|
34
|
-
.Button_styles_1oz1dew_b9ga1dj__a16b28b2{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1oz1dew_b9ga1dj__a16b28b2{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_buttonSquare__a16b28b2{width:var(--plasma-button-height);padding:0;}
|
27
|
+
.Button_styles_uqvh6u_bzw1898__b7cda4d5{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_uqvh6u_bzw1898__b7cda4d5{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_buttonSquare__b7cda4d5{width:var(--plasma-button-height);padding:0;}
|
28
|
+
.Button_styles_uqvh6u_bdfuqwe__b7cda4d5{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:last-child){margin-right:0.375rem;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:first-child){margin-left:0.375rem;}
|
29
|
+
.Button_styles_uqvh6u_l9ypozh__b7cda4d5{opacity:var(--l9ypozh-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-align-items:inherit;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-pack:inherit;-webkit-justify-content:inherit;-ms-flex-pack:inherit;justify-content:inherit;height:100%;}
|
30
|
+
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
31
|
+
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
package/cjs/engines/common.js
CHANGED
@@ -6,6 +6,10 @@ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.j
|
|
6
6
|
var React = require('react');
|
7
7
|
var linaria = require('./linaria.js');
|
8
8
|
|
9
|
+
//
|
10
|
+
// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
|
11
|
+
//
|
12
|
+
|
9
13
|
var getStaticVariants = function getStaticVariants(config) {
|
10
14
|
if (!config.variations) {
|
11
15
|
return [];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {
|
1
|
+
{"version":3,"file":"common.js","sources":["../../src/engines/common.tsx"],"sourcesContent":["import React from 'react';\n\nimport { _component } from './linaria';\nimport type {\n ComponentConfig,\n HTMLAnyAttributes,\n HTMLTagList,\n PropsType,\n Variants,\n HTMLAttributesOmitOnChange,\n} from './types';\n\n//\n// Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange\n//\n\nexport const getStaticVariants = (config: ComponentConfig) => {\n if (!config.variations) {\n return [];\n }\n const res = [];\n const { variations } = config;\n\n // eslint-disable-next-line guard-for-in\n for (const key in variations) {\n const { css } = variations[key];\n css && res.push(css);\n }\n\n return res;\n};\n\nexport const getDynamicVariants = (config: ComponentConfig) => {\n return (props: HTMLAnyAttributes) => {\n const res = [];\n\n // eslint-disable-next-line guard-for-in\n for (const key in config.variations) {\n if (key in props) {\n const variant = config.variations[key];\n\n const css = variant[props[key]];\n // no css for { modifier: true }\n css && Array.isArray(css) ? res.push(...css) : res.push(css);\n }\n }\n\n return res;\n };\n};\n\nexport const mergeConfig = <\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutPropsBase extends React.HTMLAttributes<HTMLElement> | HTMLAttributesOmitOnChange,\n LayoutPropsUser extends React.HTMLAttributes<HTMLElement> | HTMLAttributesOmitOnChange | undefined = undefined\n>(\n baseConfig: ComponentConfig<Tag, Variants, PropsType & LayoutPropsBase, LayoutPropsBase>,\n userConfig?: Partial<ComponentConfig<Tag, VariantList, VariantsProps, LayoutPropsUser>>,\n) => {\n const res = { ...baseConfig, ...userConfig };\n\n if (res.variations) {\n // copy variations base css\n // eslint-disable-next-line guard-for-in\n for (const key in res.variations) {\n const variant = baseConfig.variations[key];\n\n res.variations[key].css = variant?.css;\n /* start of bad decision */\n if (!res.variations[key].true && variant?.true) {\n res.variations[key].true = variant.true;\n }\n /* end of bad decision */\n if (variant?.attrs) {\n res.variations[key].attrs = variant.attrs;\n }\n }\n }\n\n // eslint-disable-next-line guard-for-in\n for (const key in baseConfig.defaults || {}) {\n if (!(key in res.defaults)) {\n res.defaults[key] = baseConfig.defaults[key];\n }\n }\n\n return res as ComponentConfig<\n Tag,\n VariantList,\n PropsType<VariantList>,\n LayoutPropsUser extends undefined ? LayoutPropsBase : LayoutPropsUser\n >;\n};\n\nexport function component<\n Tag extends HTMLTagList,\n VariantList extends Variants,\n VariantsProps extends PropsType<VariantList>,\n LayoutProps extends React.HTMLAttributes<HTMLElement> | HTMLAttributesOmitOnChange\n>(\n config: ComponentConfig<Tag, VariantList, VariantsProps, LayoutProps>,\n): React.FunctionComponent<VariantsProps & LayoutProps> {\n const Comp = config.layout(_component((config as unknown) as ComponentConfig));\n\n return React.forwardRef<VariantsProps & LayoutProps, any>((props, ref) => (\n <Comp {...config?.defaults} {...props} ref={ref} />\n ));\n}\n"],"names":["getStaticVariants","config","variations","res","key","css","push","getDynamicVariants","props","variant","Array","isArray","apply","_toConsumableArray","mergeConfig","baseConfig","userConfig","_objectSpread","attrs","defaults","component","Comp","layout","_component","React","forwardRef","ref","createElement","_extends"],"mappings":";;;;;;;;AAYA;AACA;AACA;;IAEaA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,MAAuB,EAAK;AAC1D,EAAA,IAAI,CAACA,MAAM,CAACC,UAAU,EAAE;AACpB,IAAA,OAAO,EAAE,CAAA;AACb,GAAA;EACA,IAAMC,GAAG,GAAG,EAAE,CAAA;AACd,EAAA,IAAQD,UAAU,GAAKD,MAAM,CAArBC,UAAU,CAAA;;AAElB;AACA,EAAA,KAAK,IAAME,GAAG,IAAIF,UAAU,EAAE;AAC1B,IAAA,IAAQG,GAAG,GAAKH,UAAU,CAACE,GAAG,CAAC,CAAvBC,GAAG,CAAA;AACXA,IAAAA,GAAG,IAAIF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AACxB,GAAA;AAEA,EAAA,OAAOF,GAAG,CAAA;AACd,EAAC;IAEYI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIN,MAAuB,EAAK;EAC3D,OAAO,UAACO,KAAwB,EAAK;IACjC,IAAML,GAAG,GAAG,EAAE,CAAA;;AAEd;AACA,IAAA,KAAK,IAAMC,GAAG,IAAIH,MAAM,CAACC,UAAU,EAAE;MACjC,IAAIE,GAAG,IAAII,KAAK,EAAE;AACd,QAAA,IAAMC,OAAO,GAAGR,MAAM,CAACC,UAAU,CAACE,GAAG,CAAC,CAAA;QAEtC,IAAMC,GAAG,GAAGI,OAAO,CAACD,KAAK,CAACJ,GAAG,CAAC,CAAC,CAAA;AAC/B;QACAC,GAAG,IAAIK,KAAK,CAACC,OAAO,CAACN,GAAG,CAAC,GAAGF,GAAG,CAACG,IAAI,CAAAM,KAAA,CAART,GAAG,EAAAU,2CAAA,CAASR,GAAG,CAAA,CAAC,GAAGF,GAAG,CAACG,IAAI,CAACD,GAAG,CAAC,CAAA;AAChE,OAAA;AACJ,KAAA;AAEA,IAAA,O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xBhB,GAAG,CAACgB,QAAQ,CAACf,IAAG,CAAC,GAAGW,UAAU,CAACI,QAAQ,CAACf,IAAG,CAAC,CAAA;AAChD,KAAA;AACJ,GAAA;AAEA,EAAA,OAAOD,GAAG,CAAA;AAMd,EAAC;AAEM,SAASiB,SAASA,CAMrBnB,MAAqE,EACjB;EACpD,IAAMoB,IAAI,GAAGpB,MAAM,CAACqB,MAAM,CAACC,kBAAU,CAAEtB,MAAqC,CAAC,CAAC,CAAA;AAE9E,EAAA,oBAAOuB,KAAK,CAACC,UAAU,CAAmC,UAACjB,KAAK,EAAEkB,GAAG,EAAA;AAAA,IAAA,oBACjEF,KAAA,CAAAG,aAAA,CAACN,IAAI,EAAAO,iCAAA,CAAA,EAAA,EAAK3B,MAAM,KAAA,IAAA,IAANA,MAAM,KAANA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAAEkB,QAAQ,EAAMX,KAAK,EAAA;AAAEkB,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CAAC,CAAA;AAAA,GACtD,CAAC,CAAA;AACN;;;;;;;"}
|
package/cjs/engines/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/engines/index.ts"],"sourcesContent":["import { css as cssLibrary } from '@linaria/core';\n\nimport type { CSS } from './types';\n\nexport const css = cssLibrary as CSS;\nexport { mergeConfig, component } from './common';\n\nexport type { Variant, ComponentConfig, RootProps, CSS } from './types';\n"],"names":["css","cssLibrary"],"mappings":";;;;;;;;AAIO,IAAMA,GAAG,GAAGC;;;;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/engines/index.ts"],"sourcesContent":["import { css as cssLibrary } from '@linaria/core';\n\nimport type { CSS } from './types';\n\nexport const css = cssLibrary as CSS;\nexport { mergeConfig, component } from './common';\n\nexport type { Variant, ComponentConfig, RootProps, CSS, RootPropsOmitOnChange } from './types';\n"],"names":["css","cssLibrary"],"mappings":";;;;;;;;AAIO,IAAMA,GAAG,GAAGC;;;;"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
var canUseDOM = require('../utils/canUseDOM.js');
|
7
|
+
require('../utils/react.js');
|
8
|
+
|
9
|
+
/**
|
10
|
+
* Runs effect safely on server.
|
11
|
+
*/
|
12
|
+
var useIsomorphicLayoutEffect = canUseDOM.canUseDOM ? React.useLayoutEffect : React.useEffect;
|
13
|
+
|
14
|
+
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
15
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.js","sources":["../../src/hooks/useIsomorphicLayoutEffect.ts"],"sourcesContent":["import { useLayoutEffect, useEffect } from 'react';\n\nimport { canUseDOM } from '../utils';\n\n/**\n * Runs effect safely on server.\n */\nexport const useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n"],"names":["useIsomorphicLayoutEffect","canUseDOM","useLayoutEffect","useEffect"],"mappings":";;;;;;;;AAIA;AACA;AACA;IACaA,yBAAyB,GAAGC,mBAAS,GAAGC,qBAAe,GAAGC;;;;"}
|
package/cjs/index.css
CHANGED
@@ -6,20 +6,17 @@
|
|
6
6
|
|
7
7
|
.base_1kq737e_b187cmzt__d829f64a{position:relative;}.base_1kq737e_b187cmzt__d829f64a:focus{outline:none;}.base_1kq737e_b187cmzt__d829f64a::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1kq737e_b187cmzt__d829f64a.base_1kq737e_focusVisible__d829f64a:focus::before,.base_1kq737e_b187cmzt__d829f64a[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
8
8
|
|
9
|
-
.
|
9
|
+
.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFixed__16e78f09{width:var(--plasma-button-width);}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingFilled__16e78f09{width:100%;}.base_1lx0ute_bdz31nb__16e78f09.base_1lx0ute_buttonStretchingAuto__16e78f09{width:auto;}
|
10
10
|
|
11
|
-
.
|
12
|
-
.
|
13
|
-
.
|
14
|
-
.
|
15
|
-
.
|
16
|
-
.Button_styles_1oz1dew_s7rggv0__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-left-content-margin);}
|
17
|
-
.Button_styles_1oz1dew_s1rjh7ra__a16b28b2{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:var(--plasma-button-right-content-margin);}
|
18
|
-
.Button_styles_1oz1dew_b9ga1dj__a16b28b2{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_1oz1dew_b9ga1dj__a16b28b2{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_b9ga1dj__a16b28b2.Button_styles_1oz1dew_buttonSquare__a16b28b2{width:var(--plasma-button-height);padding:0;}
|
11
|
+
.Button_styles_uqvh6u_bzw1898__b7cda4d5{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);}a.Button_styles_uqvh6u_bzw1898__b7cda4d5{-webkit-text-decoration:none;text-decoration:none;}.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_bzw1898__b7cda4d5.Button_styles_uqvh6u_buttonSquare__b7cda4d5{width:var(--plasma-button-height);padding:0;}
|
12
|
+
.Button_styles_uqvh6u_bdfuqwe__b7cda4d5{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:last-child){margin-right:0.375rem;}.Button_styles_uqvh6u_bdfuqwe__b7cda4d5:not(:first-child){margin-left:0.375rem;}
|
13
|
+
.Button_styles_uqvh6u_l9ypozh__b7cda4d5{opacity:var(--l9ypozh-0);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;-webkit-align-items:inherit;-webkit-box-align:inherit;-ms-flex-align:inherit;align-items:inherit;-webkit-box-pack:inherit;-webkit-justify-content:inherit;-ms-flex-pack:inherit;justify-content:inherit;height:100%;}
|
14
|
+
.Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
|
15
|
+
.Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
|
19
16
|
|
20
|
-
.
|
17
|
+
.IconButton_styles_1hknr37_b1ua728l__f14249fc{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_1hknr37_b1ua728l__f14249fc{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonSquare__f14249fc{width:var(--plasma-button-height);padding:0;}.IconButton_styles_1hknr37_b1ua728l__f14249fc:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background-color:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background-color:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_1hknr37_b1ua728l__f14249fc:focus{outline:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_focusVisible__f14249fc:focus::before,.IconButton_styles_1hknr37_b1ua728l__f14249fc[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:hover,.IconButton_styles_1hknr37_b1ua728l__f14249fc[disabled]:active{scale:none;color:var(--plasma-button-color);background-color:var(--plasma-button-background-color);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFixed__f14249fc{width:var(--plasma-button-width);}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingFilled__f14249fc{width:100%;}.IconButton_styles_1hknr37_b1ua728l__f14249fc.IconButton_styles_1hknr37_buttonStretchingAuto__f14249fc{width:auto;}
|
21
18
|
|
22
|
-
.
|
19
|
+
.base_6k3uip_b7jdqtc__e6616a37.base_6k3uip_buttonGroupOverrideStyles__e6616a37 .base_6k3uip_buttonItem__e6616a37{--plasma-button-color:var(--plasma-button-group-item-color);--plasma-button-background-color:var(--plasma-button-group-item-background-color);--plasma-button-color-hover:var(--plasma-button-group-item-color-hover);--plasma-button-background-color-hover:var(--plasma-button-group-item-background-color-hover);--plasma-button-color-active:var(--plasma-button-group-item-color-active);--plasma-button-background-color-active:var(--plasma-button-group-item-background-color-active);}
|
23
20
|
|
24
21
|
.base_xxxewc_bc0nfse__e70323a1.base_xxxewc_buttonGroupOverrideStyles__e70323a1 .base_xxxewc_buttonItem__e70323a1{--plasma-button-height:var(--plasma-button-group-item-height);--plasma-button-padding:var(--plasma-button-group-item-padding);---plasma-button-scale-active:var(--plasma-button-group-item-scale-active);--plasma-button-scale-hover:var(--plasma-button-group-item-scale-hover);--plasma-button-font-family:var(--plasma-button-group-item-font-family);--plasma-button-font-size:var(--plasma-button-group-item-font-size);--plasma-button-font-style:var(--plasma-button-group-item-font-style);--plasma-button-font-weight:var(--plasma-button-group-item-font-weight);--plasma-button-letter-spacing:var(--plasma-button-group-item-letter-spacing);--plasma-button-line-height:var(--plasma-button-group-item-line-height);}
|
25
22
|
|
@@ -27,7 +24,7 @@
|
|
27
24
|
|
28
25
|
.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupShapeDefault__b4024cb5{--plasma_private-button-radius-inner:var(--plasma-button-group-item-default-radius);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupShapeSegmented__b4024cb5{--plasma_private-button-radius-inner:var(--plasma-button-group-item-segmented-radius);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupShapeSegmented__b4024cb5.base_1it4v56_buttonGroupGapNone__b4024cb5{--plasma_private-button-radius-inner:0;}.base_1it4v56_b137xshk__b4024cb5 .base_1it4v56_buttonItem__b4024cb5{--plasma-button-radius:var(--plasma_private-button-radius-inner);position:relative;}.base_1it4v56_b137xshk__b4024cb5 .base_1it4v56_buttonItem__b4024cb5::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma_private-button-radius-inner);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5 .base_1it4v56_buttonItem__b4024cb5.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5 .base_1it4v56_buttonItem__b4024cb5[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child{border-radius:var(--plasma-button-group-side-item-radius);position:relative;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma-button-group-side-item-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child[data-focus-visible-added]::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child:last-child[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child{--plasma_private-left-side-radius:var(--plasma-button-group-side-item-radius) var(--plasma_private-button-radius-inner) var(--plasma_private-button-radius-inner) var(--plasma-button-group-side-item-radius);border-radius:var(--plasma_private-left-side-radius);position:relative;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma_private-left-side-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child{--plasma_private-right-side-radius:var(--plasma_private-button-radius-inner) var(--plasma-button-group-side-item-radius) var(--plasma-button-group-side-item-radius) var(--plasma_private-button-radius-inner);border-radius:var(--plasma_private-right-side-radius);position:relative;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma_private-right-side-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationHorizontal__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child{--plasma_private-up-side-radius:var(--plasma-button-group-side-item-radius) var(--plasma-button-group-side-item-radius) var(--plasma_private-button-radius-inner) var(--plasma_private-button-radius-inner);border-radius:var(--plasma_private-up-side-radius);position:relative;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma_private-up-side-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:first-child[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child{--plasma_private-down-side-radius:var(--plasma_private-button-radius-inner) var(--plasma_private-button-radius-inner) var(--plasma-button-group-side-item-radius) var(--plasma-button-group-side-item-radius);border-radius:var(--plasma_private-down-side-radius);position:relative;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-btn-outline-size));left:calc(-1 * var(--plasma_private-btn-outline-size));right:calc(-1 * var(--plasma_private-btn-outline-size));bottom:calc(-1 * var(--plasma_private-btn-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:var(--plasma_private-down-side-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child.base_1it4v56_focusVisible__b4024cb5:focus::before,.base_1it4v56_b137xshk__b4024cb5.base_1it4v56_buttonGroupOrienationVertical__b4024cb5 .base_1it4v56_buttonItem__b4024cb5:last-child[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}
|
29
26
|
|
30
|
-
.
|
27
|
+
.base_p85v51_b1tbn2l2__dc2107ca{-webkit-flex-direction:var(--plasma-button-group-orientation);-ms-flex-direction:var(--plasma-button-group-orientation);flex-direction:var(--plasma-button-group-orientation);}
|
31
28
|
|
32
29
|
.base_rzhdtv_b1q0zac7__7ab3ad19.base_rzhdtv_buttonGroupStretchingFilled__7ab3ad19{width:100%;}.base_rzhdtv_b1q0zac7__7ab3ad19.base_rzhdtv_buttonGroupStretchingFilled__7ab3ad19 .base_rzhdtv_buttonItem__7ab3ad19{width:100%;}
|
33
30
|
|
@@ -535,3 +532,28 @@
|
|
535
532
|
.Toolbar_styles_iomsh3_bd5aerk__291bdbec{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;border-radius:var(--plasma-toolbar-border-radius);background:var(--plasma-toolbar-background);padding:var(--plasma-toolbar-padding);}.Toolbar_styles_iomsh3_bd5aerk__291bdbec.Toolbar_styles_iomsh3_toolbarShadow__291bdbec{box-shadow:var(--plasma-toolbar-box-shadow);}.Toolbar_styles_iomsh3_bd5aerk__291bdbec.Toolbar_styles_iomsh3_toolbarVertical__291bdbec{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:var(--plasma-toolbar-size);}.Toolbar_styles_iomsh3_bd5aerk__291bdbec.Toolbar_styles_iomsh3_toolbarHorizontal__291bdbec{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;height:var(--plasma-toolbar-size);}.Toolbar_styles_iomsh3_bd5aerk__291bdbec.Toolbar_styles_iomsh3_toolbarVertical__291bdbec .Toolbar_styles_iomsh3_plasmaDivider__291bdbec{width:var(--plasma-toolbar-divider-size);height:0.063rem;margin:var(--plasma-toolbar-divider-offset) 0;}.Toolbar_styles_iomsh3_bd5aerk__291bdbec.Toolbar_styles_iomsh3_toolbarHorizontal__291bdbec .Toolbar_styles_iomsh3_plasmaDivider__291bdbec{width:0.063rem;height:var(--plasma-toolbar-divider-size);margin:0 var(--plasma-toolbar-divider-offset);}
|
536
533
|
|
537
534
|
.ToolbarDivider_styles_1ypqhb1_mcdkovg__81732880{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;--plasma-divider-background:var(--plasma-toolbar-divider-color);--plasma-divider-border-radius:var(--plasma-toolbar-divider-border-radius);}
|
535
|
+
|
536
|
+
.SliderBase_styles_7is2ll_s33crq1__0c0959e2{-webkit-flex:1;-ms-flex:1;flex:1;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;height:var(--plasma-slider-height);}
|
537
|
+
.SliderBase_styles_7is2ll_rnaoqfb__0c0959e2{height:100%;}
|
538
|
+
.SliderBase_styles_7is2ll_r1bro5xo__0c0959e2{position:relative;top:50%;height:var(--plasma-slider-rail-height);border-radius:var(--plasma-slider-rail-border-radius);background-color:var(--plasma-slider-rail-background-color);overflow:hidden;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}
|
539
|
+
.SliderBase_styles_7is2ll_fdg7yhg__0c0959e2{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
|
540
|
+
|
541
|
+
.Single_styles_1r9f1e0_l1p4kc08__4db690dd{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
|
542
|
+
|
543
|
+
.Single_styles_1r9f1e0_lozb535__4db690dd{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
|
544
|
+
.Single_styles_1r9f1e0_s1w9icbd__4db690dd{color:var(--plasma-slider-range-value-color);font-family:var(--plasma-slider-range-value-font-family);font-size:var(--plasma-slider-range-value-font-size);font-style:var(--plasma-slider-range-value-font-style);font-weight:var(--plasma-slider-range-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-range-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-range-value-letter-spacing);letter-spacing:var(--plasma-slider-range-value-letter-spacing);line-height:var(--plasma-slider-range-value-line-height);-webkit-transition:opacity 0.1s ease-in-out;transition:opacity 0.1s ease-in-out;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMinValue__4db690dd,.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderHideMaxValue__4db690dd{opacity:0;}.Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderActiveRangeValue__4db690dd{color:var(--plasma-slider-label-color);}
|
545
|
+
.Single_styles_1r9f1e0_s1d2sfgl__4db690dd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementOuter__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{left:unset;right:0;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd{margin-right:var(--plasma-slider-range-min-value-margin);}.Single_styles_1r9f1e0_s1d2sfgl__4db690dd.Single_styles_1r9f1e0_sliderRangeValuesPlacementInner__4db690dd .Single_styles_1r9f1e0_s1w9icbd__4db690dd.Single_styles_1r9f1e0_sliderMaxRangeValue__4db690dd{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
|
546
|
+
.Single_styles_1r9f1e0_ss3ujqx__4db690dd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementOuter__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.Single_styles_1r9f1e0_ss3ujqx__4db690dd.Single_styles_1r9f1e0_sliderLabelPlacementInner__4db690dd .Single_styles_1r9f1e0_l1p4kc08__4db690dd{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
|
547
|
+
|
548
|
+
.Double_styles_1jhda4u_lcs82cd__5dc981f4{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}
|
549
|
+
|
550
|
+
.Double_styles_1jhda4u_l1at2q9b__5dc981f4{font-family:var(--plasma-slider-label-font-family);font-size:var(--plasma-slider-label-font-size);font-style:var(--plasma-slider-label-font-style);font-weight:var(--plasma-slider-label-font-weight);-webkit-letter-spacing:var(--plasma-slider-label-letter-spacing);-moz-letter-spacing:var(--plasma-slider-label-letter-spacing);-ms-letter-spacing:var(--plasma-slider-label-letter-spacing);letter-spacing:var(--plasma-slider-label-letter-spacing);line-height:var(--plasma-slider-label-line-height);}
|
551
|
+
.Double_styles_1jhda4u_i11dc2og__5dc981f4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-text-field-wrapper-gap);margin-top:var(--plasma-slider-double-wrapper-gap);}
|
552
|
+
.Double_styles_1jhda4u_s4zvp7i__5dc981f4{-webkit-flex:1;-ms-flex:1;flex:1;--plasma-textfield-color:var(--plasma-slider-text-field-color);--plasma-textfield-bg-color:var(--plasma-slider-text-field-background-color);--plasma-textfield__caret-color:var(--plasma-slider-text-field-caret-color);--plasma-textfield__placeholder-color:var(--plasma-slider-text-field-placeholder-color);--plasma-textfield-disabled-opacity:var(--plasma-slider-disabled-opacity);--plasma-textfield-height:var(--plasma-slider-text-field-height);--plasma-textfield-padding:var(--plasma-slider-text-field-padding);--plasma-textfield-border-radius:var(--plasma-slider-text-field-border-radius);--plasma-textfield-font-family:var(--plasma-slider-text-field-font-family);--plasma-textfield-font-size:var(--plasma-slider-text-field-font-size);--plasma-textfield-font-style:var(--plasma-slider-text-field-font-style);--plasma-textfield-font-weight:var(--plasma-slider-text-field-font-weight);--plasma-textfield-letter-spacing:var(--plasma-slider-text-field-letter-spacing);--plasma-textfield-line-height:var(--plasma-slider-text-field-line-height);}.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderFirstTextField__5dc981f4 > div{border-top-right-radius:0;border-bottom-right-radius:0;}.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderSecondTextField__5dc981f4 > div{border-top-left-radius:0;border-bottom-left-radius:0;}.Double_styles_1jhda4u_s4zvp7i__5dc981f4 input:focus,.Double_styles_1jhda4u_s4zvp7i__5dc981f4.Double_styles_1jhda4u_sliderTextFieldActive__5dc981f4{--plasma-textfield-color:var(--plasma-slider-text-field-focus-color);}
|
553
|
+
.Double_styles_1jhda4u_d3kvcjo__5dc981f4{opacity:var(--plasma-slider-disabled-opacity);}
|
554
|
+
|
555
|
+
|
556
|
+
.Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
|
557
|
+
.Handler_styles_8crx5z_s12uu2lj__2d4342c7{position:absolute;z-index:1;top:var(--plasma-slider-current-value-top-offset);text-align:center;width:100%;margin-left:-0.125rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;font-family:var(--plasma-slider-current-value-font-family);font-size:var(--plasma-slider-current-value-font-size);font-style:var(--plasma-slider-current-value-font-style);font-weight:var(--plasma-slider-current-value-font-weight);-webkit-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-moz-letter-spacing:var(--plasma-slider-current-value-letter-spacing);-ms-letter-spacing:var(--plasma-slider-current-value-letter-spacing);letter-spacing:var(--plasma-slider-current-value-letter-spacing);line-height:var(--plasma-slider-current-value-line-height);}
|
558
|
+
|
559
|
+
.Thumb_styles_4w4gzn_tqbdf8b__14129a5b{width:var(--plasma-slider-thumb-size);height:var(--plasma-slider-thumb-size);position:relative;left:-0.125rem;top:-0.125rem;border-radius:50%;box-sizing:border-box;background:var(--plasma-slider-thumb-background-color);margin:0.125rem;-webkit-transition:border-color 0.1s ease-in-out;transition:border-color 0.1s ease-in-out;position:relative;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:after{background:var(--plasma-slider-thumb-border-color);margin:-0.125rem;content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):hover:after,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:not([disabled]):active:after{background:var(--plasma-slider-thumb-focus-border-color);}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[disabled]{cursor:not-allowed;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b:focus{outline:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b::before{content:'';position:absolute;top:0.125rem;left:0.125rem;right:0.125rem;bottom:0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:50%;-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.Thumb_styles_4w4gzn_tqbdf8b__14129a5b.Thumb_styles_4w4gzn_focusVisible__14129a5b:focus::before,.Thumb_styles_4w4gzn_tqbdf8b__14129a5b[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem var(--plasma-slider-thumb-focus-border-color);}
|
package/cjs/index.js
CHANGED
@@ -17,6 +17,7 @@ var useUniqId = require('./hooks/useUniqId.js');
|
|
17
17
|
var usePreviousValue = require('./hooks/usePreviousValue.js');
|
18
18
|
var useForceUpdate = require('./hooks/useForceUpdate.js');
|
19
19
|
var useDidMountEffect = require('./hooks/useDidMountEffect.js');
|
20
|
+
var useIsomorphicLayoutEffect = require('./hooks/useIsomorphicLayoutEffect.js');
|
20
21
|
var index$1 = require('./utils/index.js');
|
21
22
|
var Button = require('./components/Button/Button.js');
|
22
23
|
var Button_tokens = require('./components/Button/Button.tokens.js');
|
@@ -169,7 +170,14 @@ var Divider_tokens = require('./components/Divider/Divider.tokens.js');
|
|
169
170
|
var Toolbar = require('./components/Toolbar/Toolbar.js');
|
170
171
|
var Toolbar_tokens = require('./components/Toolbar/Toolbar.tokens.js');
|
171
172
|
var ToolbarDivider = require('./components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js');
|
173
|
+
var Slider = require('./components/Slider/Slider.js');
|
174
|
+
var Slider_tokens = require('./components/Slider/Slider.tokens.js');
|
175
|
+
require('react');
|
176
|
+
require('react-draggable');
|
177
|
+
var Thumb_styles = require('./components/Slider/ui/Thumb/Thumb.styles.js');
|
178
|
+
require('@linaria/react');
|
172
179
|
var common = require('./engines/common.js');
|
180
|
+
var canUseDOM = require('./utils/canUseDOM.js');
|
173
181
|
var extractTextFrom = require('./utils/extractTextFrom.js');
|
174
182
|
var getSizeValueFromProp = require('./utils/getSizeValueFromProp.js');
|
175
183
|
var react = require('./utils/react.js');
|
@@ -255,6 +263,7 @@ exports.useUniqId = useUniqId.useUniqId;
|
|
255
263
|
exports.usePreviousValue = usePreviousValue.usePreviousValue;
|
256
264
|
exports.useForceUpdate = useForceUpdate.useForceUpdate;
|
257
265
|
exports.useDidMountEffect = useDidMountEffect.useDidMountEffect;
|
266
|
+
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect.useIsomorphicLayoutEffect;
|
258
267
|
exports.composableStyle = index$1.composableStyle;
|
259
268
|
exports.cx = index$1.cx;
|
260
269
|
exports.buttonConfig = Button.buttonConfig;
|
@@ -506,8 +515,13 @@ exports.toolbarRoot = Toolbar.toolbarRoot;
|
|
506
515
|
exports.toolbarTokens = Toolbar_tokens.tokens;
|
507
516
|
exports.toolbarDividerConfig = ToolbarDivider.toolbarDividerConfig;
|
508
517
|
exports.toolbarDividerRoot = ToolbarDivider.toolbarDividerRoot;
|
518
|
+
exports.sliderConfig = Slider.sliderConfig;
|
519
|
+
exports.sliderRoot = Slider.sliderRoot;
|
520
|
+
exports.sliderTokens = Slider_tokens.tokens;
|
521
|
+
exports.ThumbBase = Thumb_styles.ThumbBase;
|
509
522
|
exports.component = common.component;
|
510
523
|
exports.mergeConfig = common.mergeConfig;
|
524
|
+
exports.canUseDOM = canUseDOM.canUseDOM;
|
511
525
|
exports.extractTextFrom = extractTextFrom.extractTextFrom;
|
512
526
|
exports.getSizeValueFromProp = getSizeValueFromProp.getSizeValueFromProp;
|
513
527
|
exports.IS_REACT_18 = react.IS_REACT_18;
|
package/cjs/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
/**
|
6
|
+
* This constant tells you whether can DOM be used.
|
7
|
+
* https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
8
|
+
*/
|
9
|
+
var canUseDOM = /*#__PURE__*/Boolean(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
|
10
|
+
|
11
|
+
exports.canUseDOM = canUseDOM;
|
12
|
+
//# sourceMappingURL=canUseDOM.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"canUseDOM.js","sources":["../../src/utils/canUseDOM.ts"],"sourcesContent":["/**\n * This constant tells you whether can DOM be used.\n * https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\n */\nexport const canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined',\n);\n"],"names":["canUseDOM","Boolean","window","document","createElement"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACO,IAAMA,SAAS,gBAAGC,OAAO,CAC5B,OAAOC,MAAM,KAAK,WAAW,IACzB,OAAOA,MAAM,CAACC,QAAQ,KAAK,WAAW,IACtC,OAAOD,MAAM,CAACC,QAAQ,CAACC,aAAa,KAAK,WACjD;;;;"}
|