@salutejs/plasma-new-hope 0.83.0-canary.1194.9157747369.0 → 0.83.0-canary.1213.9159050781.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Button/Button.css +9 -6
- package/cjs/components/Button/Button.js +16 -2
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Button/Button.styles.js +31 -10
- package/cjs/components/Button/Button.styles.js.map +1 -1
- package/cjs/components/Button/Button.styles_nedem1.css +8 -0
- package/cjs/components/Button/Button.tokens.js +5 -0
- 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_1lx0ute.css → cjs/components/Button/variations/_stretching/base_hy8dc.css} +1 -1
- package/cjs/components/Combobox/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Drawer/Drawer.css +9 -6
- package/cjs/components/Drawer/ui/DrawerContent/DrawerContent.css +9 -6
- package/cjs/components/Header/ui/HeaderArrow/HeaderArrow.css +9 -6
- package/cjs/components/IconButton/IconButton.css +10 -7
- package/cjs/components/IconButton/IconButton.styles.js +1 -1
- package/cjs/components/IconButton/{IconButton.styles_1hknr37.css → IconButton.styles_7v8g0e.css} +1 -1
- package/cjs/components/Notification/Notification.css +9 -6
- package/cjs/components/Notification/NotificationsProvider.css +9 -6
- package/cjs/components/Pagination/Pagination.css +9 -6
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -6
- package/cjs/components/Panel/ui/PanelHeader/PanelHeader.css +9 -6
- package/cjs/components/Select/Select.css +9 -6
- package/cjs/components/Select/ui/SelectTarget/SelectTarget.css +9 -6
- package/cjs/components/TextField/TextField.js +3 -12
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/Toast/Toast.css +9 -6
- package/cjs/components/Toast/ToastController.css +9 -6
- package/cjs/engines/common.js +0 -4
- package/cjs/engines/common.js.map +1 -1
- package/cjs/engines/index.js.map +1 -1
- package/cjs/index.css +10 -32
- package/cjs/index.js +0 -14
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Button/Button.css +9 -6
- package/es/components/Button/Button.js +17 -3
- package/es/components/Button/Button.js.map +1 -1
- package/es/components/Button/Button.styles.js +29 -11
- package/es/components/Button/Button.styles.js.map +1 -1
- package/es/components/Button/Button.styles_nedem1.css +8 -0
- package/es/components/Button/Button.tokens.js +5 -0
- 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_1lx0ute.css → es/components/Button/variations/_stretching/base_hy8dc.css} +1 -1
- package/es/components/Combobox/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Drawer/Drawer.css +9 -6
- package/es/components/Drawer/ui/DrawerContent/DrawerContent.css +9 -6
- package/es/components/Header/ui/HeaderArrow/HeaderArrow.css +9 -6
- package/es/components/IconButton/IconButton.css +10 -7
- package/es/components/IconButton/IconButton.styles.js +1 -1
- package/es/components/IconButton/{IconButton.styles_1hknr37.css → IconButton.styles_7v8g0e.css} +1 -1
- package/es/components/Notification/Notification.css +9 -6
- package/es/components/Notification/NotificationsProvider.css +9 -6
- package/es/components/Pagination/Pagination.css +9 -6
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +9 -6
- package/es/components/Panel/ui/PanelHeader/PanelHeader.css +9 -6
- package/es/components/Select/Select.css +9 -6
- package/es/components/Select/ui/SelectTarget/SelectTarget.css +9 -6
- package/es/components/TextField/TextField.js +3 -12
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/Toast/Toast.css +9 -6
- package/es/components/Toast/ToastController.css +9 -6
- package/es/engines/common.js +0 -4
- package/es/engines/common.js.map +1 -1
- package/es/engines/index.js.map +1 -1
- package/es/index.css +10 -32
- package/es/index.js +0 -8
- package/es/index.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -3
- package/styled-components/cjs/components/Button/Button.js +16 -2
- package/styled-components/cjs/components/Button/Button.styles.js +20 -12
- package/styled-components/cjs/components/Button/Button.template-doc.mdx +42 -0
- package/styled-components/cjs/components/Button/Button.tokens.js +5 -0
- package/styled-components/cjs/components/Button/variations/_stretching/base.js +1 -1
- package/styled-components/cjs/components/TextField/TextField.js +3 -12
- package/styled-components/cjs/engines/common.js +0 -4
- 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 +67 -21
- 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 +90 -28
- 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 +90 -28
- package/styled-components/cjs/hooks/index.js +1 -8
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/cjs/utils/index.js +0 -7
- package/styled-components/es/components/Button/Button.js +17 -3
- package/styled-components/es/components/Button/Button.styles.js +19 -11
- package/styled-components/es/components/Button/Button.template-doc.mdx +42 -0
- package/styled-components/es/components/Button/Button.tokens.js +5 -0
- package/styled-components/es/components/Button/variations/_stretching/base.js +1 -1
- package/styled-components/es/components/TextField/TextField.js +3 -12
- package/styled-components/es/engines/common.js +0 -4
- 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 +67 -21
- 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 +90 -28
- 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 +90 -28
- package/styled-components/es/hooks/index.js +1 -2
- package/styled-components/es/index.js +1 -2
- package/styled-components/es/utils/index.js +0 -1
- package/types/components/Button/Button.d.ts.map +1 -1
- package/types/components/Button/Button.styles.d.ts +5 -1
- package/types/components/Button/Button.styles.d.ts.map +1 -1
- package/types/components/Button/Button.tokens.d.ts +5 -0
- package/types/components/Button/Button.tokens.d.ts.map +1 -1
- package/types/components/Button/Button.types.d.ts +10 -0
- package/types/components/Button/Button.types.d.ts.map +1 -1
- package/types/components/TextField/TextField.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 +0 -4
- 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_web/components/Button/Button.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Button/Button.config.d.ts.map +1 -1
- package/types/hooks/index.d.ts +0 -1
- package/types/hooks/index.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/types/utils/index.d.ts +0 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/Button/Button.styles_uqvh6u.css +0 -5
- package/cjs/components/Slider/Slider.css +0 -69
- package/cjs/components/Slider/Slider.js +0 -48
- package/cjs/components/Slider/Slider.js.map +0 -1
- package/cjs/components/Slider/Slider.tokens.js +0 -79
- package/cjs/components/Slider/Slider.tokens.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.css +0 -62
- package/cjs/components/Slider/components/Double/Double.js +0 -288
- package/cjs/components/Slider/components/Double/Double.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.styles.js +0 -61
- package/cjs/components/Slider/components/Double/Double.styles.js.map +0 -1
- package/cjs/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
- package/cjs/components/Slider/components/Single/Single.css +0 -16
- package/cjs/components/Slider/components/Single/Single.js +0 -164
- package/cjs/components/Slider/components/Single/Single.js.map +0 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +0 -45
- package/cjs/components/Slider/components/Single/Single.styles.js.map +0 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +0 -4
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -82
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -33
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
- package/cjs/components/Slider/ui/Handler/Handler.css +0 -4
- package/cjs/components/Slider/ui/Handler/Handler.js +0 -174
- package/cjs/components/Slider/ui/Handler/Handler.js.map +0 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +0 -21
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +0 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/cjs/components/Slider/ui/Thumb/Thumb.css +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +0 -31
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -15
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/cjs/components/Slider/utils/index.js +0 -56
- package/cjs/components/Slider/utils/index.js.map +0 -1
- package/cjs/components/Slider/variations/_disabled/base.js +0 -9
- package/cjs/components/Slider/variations/_disabled/base.js.map +0 -1
- package/cjs/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- package/cjs/components/Slider/variations/_size/base.js +0 -9
- package/cjs/components/Slider/variations/_size/base.js.map +0 -1
- package/cjs/components/Slider/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Slider/variations/_view/base.js +0 -9
- package/cjs/components/Slider/variations/_view/base.js.map +0 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/cjs/hooks/useIsomorphicLayoutEffect.js +0 -15
- package/cjs/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/cjs/utils/canUseDOM.js +0 -12
- package/cjs/utils/canUseDOM.js.map +0 -1
- package/es/components/Button/Button.styles_uqvh6u.css +0 -5
- package/es/components/Slider/Slider.css +0 -69
- package/es/components/Slider/Slider.js +0 -43
- package/es/components/Slider/Slider.js.map +0 -1
- package/es/components/Slider/Slider.tokens.js +0 -74
- package/es/components/Slider/Slider.tokens.js.map +0 -1
- package/es/components/Slider/components/Double/Double.css +0 -62
- package/es/components/Slider/components/Double/Double.js +0 -284
- package/es/components/Slider/components/Double/Double.js.map +0 -1
- package/es/components/Slider/components/Double/Double.styles.js +0 -51
- package/es/components/Slider/components/Double/Double.styles.js.map +0 -1
- package/es/components/Slider/components/Double/Double.styles_1jhda4u.css +0 -7
- package/es/components/Slider/components/Single/Single.css +0 -16
- package/es/components/Slider/components/Single/Single.js +0 -160
- package/es/components/Slider/components/Single/Single.js.map +0 -1
- package/es/components/Slider/components/Single/Single.styles.js +0 -36
- package/es/components/Slider/components/Single/Single.styles.js.map +0 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.css +0 -4
- package/es/components/Slider/components/SliderBase/SliderBase.js +0 -78
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +0 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -26
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +0 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_7is2ll.css +0 -4
- package/es/components/Slider/ui/Handler/Handler.css +0 -4
- package/es/components/Slider/ui/Handler/Handler.js +0 -170
- package/es/components/Slider/ui/Handler/Handler.js.map +0 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +0 -16
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +0 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +0 -2
- package/es/components/Slider/ui/Thumb/Thumb.css +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +0 -27
- package/es/components/Slider/ui/Thumb/Thumb.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +0 -1
- package/es/components/Slider/utils/index.js +0 -50
- package/es/components/Slider/utils/index.js.map +0 -1
- package/es/components/Slider/variations/_disabled/base.js +0 -5
- package/es/components/Slider/variations/_disabled/base.js.map +0 -1
- package/es/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- package/es/components/Slider/variations/_size/base.js +0 -5
- package/es/components/Slider/variations/_size/base.js.map +0 -1
- package/es/components/Slider/variations/_size/base_x642ct.css +0 -1
- package/es/components/Slider/variations/_view/base.js +0 -5
- package/es/components/Slider/variations/_view/base.js.map +0 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/es/hooks/useIsomorphicLayoutEffect.js +0 -11
- package/es/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/es/utils/canUseDOM.js +0 -8
- package/es/utils/canUseDOM.js.map +0 -1
- package/styled-components/cjs/components/Slider/Slider.js +0 -47
- package/styled-components/cjs/components/Slider/Slider.tokens.js +0 -77
- package/styled-components/cjs/components/Slider/Slider.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/Double/Double.js +0 -300
- package/styled-components/cjs/components/Slider/components/Double/Double.styles.js +0 -36
- package/styled-components/cjs/components/Slider/components/Double/Double.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/Single/Single.js +0 -176
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +0 -27
- package/styled-components/cjs/components/Slider/components/Single/Single.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +0 -83
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +0 -21
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.types.js +0 -5
- package/styled-components/cjs/components/Slider/components/index.js +0 -27
- package/styled-components/cjs/components/Slider/index.js +0 -32
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +0 -183
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +0 -15
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.types.js +0 -5
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +0 -32
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +0 -18
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.types.js +0 -5
- package/styled-components/cjs/components/Slider/ui/index.js +0 -63
- package/styled-components/cjs/components/Slider/utils/index.js +0 -55
- package/styled-components/cjs/components/Slider/variations/_disabled/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_disabled/tokens.json +0 -4
- package/styled-components/cjs/components/Slider/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/cjs/components/Slider/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +0 -29
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.js +0 -16
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -164
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +0 -29
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.js +0 -16
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -163
- package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +0 -12
- package/styled-components/cjs/utils/canUseDOM.js +0 -11
- package/styled-components/es/components/Slider/Slider.js +0 -38
- package/styled-components/es/components/Slider/Slider.tokens.js +0 -71
- package/styled-components/es/components/Slider/Slider.types.js +0 -1
- package/styled-components/es/components/Slider/components/Double/Double.js +0 -292
- package/styled-components/es/components/Slider/components/Double/Double.styles.js +0 -29
- package/styled-components/es/components/Slider/components/Double/Double.types.js +0 -1
- package/styled-components/es/components/Slider/components/Single/Single.js +0 -168
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +0 -20
- package/styled-components/es/components/Slider/components/Single/Single.types.js +0 -1
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +0 -74
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +0 -14
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.types.js +0 -1
- package/styled-components/es/components/Slider/components/index.js +0 -3
- package/styled-components/es/components/Slider/index.js +0 -3
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +0 -174
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +0 -8
- package/styled-components/es/components/Slider/ui/Handler/Handler.types.js +0 -1
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +0 -25
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +0 -11
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.types.js +0 -1
- package/styled-components/es/components/Slider/ui/index.js +0 -5
- package/styled-components/es/components/Slider/utils/index.js +0 -47
- package/styled-components/es/components/Slider/variations/_disabled/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_disabled/tokens.json +0 -4
- package/styled-components/es/components/Slider/variations/_size/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_size/tokens.json +0 -0
- package/styled-components/es/components/Slider/variations/_view/base.js +0 -2
- package/styled-components/es/components/Slider/variations/_view/tokens.json +0 -0
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +0 -23
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.js +0 -10
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +0 -164
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +0 -23
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.js +0 -10
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +0 -163
- package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +0 -7
- package/styled-components/es/utils/canUseDOM.js +0 -5
- package/types/components/Slider/Slider.d.ts +0 -27
- package/types/components/Slider/Slider.d.ts.map +0 -1
- package/types/components/Slider/Slider.tokens.d.ts +0 -72
- package/types/components/Slider/Slider.tokens.d.ts.map +0 -1
- package/types/components/Slider/Slider.types.d.ts +0 -3
- package/types/components/Slider/Slider.types.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.d.ts +0 -4
- package/types/components/Slider/components/Double/Double.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +0 -43
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -65
- package/types/components/Slider/components/Double/Double.types.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.d.ts +0 -4
- package/types/components/Slider/components/Single/Single.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +0 -8
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +0 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +0 -55
- package/types/components/Slider/components/Single/Single.types.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts +0 -4
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +0 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -45
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +0 -1
- package/types/components/Slider/components/index.d.ts +0 -6
- package/types/components/Slider/components/index.d.ts.map +0 -1
- package/types/components/Slider/index.d.ts +0 -6
- package/types/components/Slider/index.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts +0 -9
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +0 -4
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +0 -24
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +0 -4
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts +0 -5
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -12
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +0 -1
- package/types/components/Slider/ui/index.d.ts +0 -6
- package/types/components/Slider/ui/index.d.ts.map +0 -1
- package/types/components/Slider/utils/index.d.ts +0 -33
- package/types/components/Slider/utils/index.d.ts.map +0 -1
- package/types/components/Slider/variations/_disabled/base.d.ts +0 -2
- package/types/components/Slider/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/Slider/variations/_size/base.d.ts +0 -2
- package/types/components/Slider/variations/_size/base.d.ts.map +0 -1
- package/types/components/Slider/variations/_view/base.d.ts +0 -2
- package/types/components/Slider/variations/_view/base.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts +0 -22
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +0 -21
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts +0 -22
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +0 -21
- package/types/examples/plasma_web/components/Slider/Slider.d.ts.map +0 -1
- package/types/hooks/useIsomorphicLayoutEffect.d.ts +0 -6
- package/types/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/types/utils/canUseDOM.d.ts +0 -6
- package/types/utils/canUseDOM.d.ts.map +0 -1
@@ -1 +0,0 @@
|
|
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,SAAS,GAAGC,eAAe,GAAGC;;;;"}
|
package/es/utils/canUseDOM.js
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This constant tells you whether can DOM be used.
|
3
|
-
* https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
4
|
-
*/
|
5
|
-
var canUseDOM = /*#__PURE__*/Boolean(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
|
6
|
-
|
7
|
-
export { canUseDOM };
|
8
|
-
//# sourceMappingURL=canUseDOM.js.map
|
@@ -1 +0,0 @@
|
|
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;;;;"}
|
@@ -1,47 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.sliderRoot = exports.sliderConfig = void 0;
|
8
|
-
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var _base = /*#__PURE__*/require("./variations/_view/base");
|
10
|
-
var _base2 = /*#__PURE__*/require("./variations/_size/base");
|
11
|
-
var _base3 = /*#__PURE__*/require("./variations/_disabled/base");
|
12
|
-
var _components = /*#__PURE__*/require("./components");
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
16
|
-
var isSingleValueProps = function isSingleValueProps(props) {
|
17
|
-
return typeof props.value === 'number';
|
18
|
-
};
|
19
|
-
var sliderRoot = exports.sliderRoot = function sliderRoot(Root) {
|
20
|
-
return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
21
|
-
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
22
|
-
ref: ref
|
23
|
-
}, props), isSingleValueProps(props) && /*#__PURE__*/_react["default"].createElement(_components.SingleSlider, props), !isSingleValueProps(props) && /*#__PURE__*/_react["default"].createElement(_components.DoubleSlider, props));
|
24
|
-
});
|
25
|
-
};
|
26
|
-
var sliderConfig = exports.sliderConfig = {
|
27
|
-
name: 'Slider',
|
28
|
-
tag: 'div',
|
29
|
-
layout: sliderRoot,
|
30
|
-
base: '',
|
31
|
-
variations: {
|
32
|
-
view: {
|
33
|
-
css: _base.base
|
34
|
-
},
|
35
|
-
size: {
|
36
|
-
css: _base2.base
|
37
|
-
},
|
38
|
-
disabled: {
|
39
|
-
css: _base3.base,
|
40
|
-
attrs: true
|
41
|
-
}
|
42
|
-
},
|
43
|
-
defaults: {
|
44
|
-
view: 'default',
|
45
|
-
size: 'm'
|
46
|
-
}
|
47
|
-
};
|
@@ -1,77 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.tokens = exports.classes = void 0;
|
7
|
-
var classes = exports.classes = {
|
8
|
-
labelPlacementOuter: 'slider-label-placement-outer',
|
9
|
-
labelPlacementInner: 'slider-label-placement-inner',
|
10
|
-
rangeValuesPlacementOuter: 'slider-range-values-placement-outer',
|
11
|
-
rangeValuesPlacementInner: 'slider-range-values-placement-inner',
|
12
|
-
maxRangeValue: 'slider-max-range-value',
|
13
|
-
hideMinValue: 'slider-hide-min-value',
|
14
|
-
hideMaxValue: 'slider-hide-max-value',
|
15
|
-
textFieldActive: 'slider-text-field-active',
|
16
|
-
firstTextField: 'slider-first-text-field',
|
17
|
-
secondTextField: 'slider-second-text-field',
|
18
|
-
activeRangeValue: 'slider-active-range-value'
|
19
|
-
};
|
20
|
-
var tokens = exports.tokens = {
|
21
|
-
height: '--plasma-slider-height',
|
22
|
-
labelWrapperGap: '--plasma-slider-label-wrapper-gap',
|
23
|
-
labelWrapperMarginBottom: '--plasma-slider-label-wrapper-margin-bottom',
|
24
|
-
labelWrapperMarginRight: '--plasma-slider-label-wrapper-margin-right',
|
25
|
-
labelColor: '--plasma-slider-label-color',
|
26
|
-
labelFontFamily: '--plasma-slider-label-font-family',
|
27
|
-
labelFontSize: '--plasma-slider-label-font-size',
|
28
|
-
labelFontStyle: '--plasma-slider-label-font-style',
|
29
|
-
labelFontWeight: '--plasma-slider-label-font-weight',
|
30
|
-
labelLetterSpacing: '--plasma-slider-label-letter-spacing',
|
31
|
-
labelLineHeight: '--plasma-slider-label-line-height',
|
32
|
-
rangeMinValueMargin: '--plasma-slider-range-min-value-margin',
|
33
|
-
rangeMaxValueMargin: '--plasma-slider-range-max-value-margin',
|
34
|
-
rangeValueBottomOffset: '--plasma-slider-range-value-bottom-offset',
|
35
|
-
rangeValueColor: '--plasma-slider-range-value-color',
|
36
|
-
rangeValueFontFamily: '--plasma-slider-range-value-font-family',
|
37
|
-
rangeValueFontSize: '--plasma-slider-range-value-font-size',
|
38
|
-
rangeValueFontStyle: '--plasma-slider-range-value-font-style',
|
39
|
-
rangeValueFontWeight: '--plasma-slider-range-value-font-weight',
|
40
|
-
rangeValueLetterSpacing: '--plasma-slider-range-value-letter-spacing',
|
41
|
-
rangeValueLineHeight: '--plasma-slider-range-value-line-height',
|
42
|
-
doubleWrapperGap: '--plasma-slider-double-wrapper-gap',
|
43
|
-
thumbSize: '--plasma-slider-thumb-size',
|
44
|
-
thumbBorder: '--plasma-slider-thumb-border',
|
45
|
-
thumbBorderColor: '--plasma-slider-thumb-border-color',
|
46
|
-
thumbBackgroundColor: '--plasma-slider-thumb-background-color',
|
47
|
-
thumbFocusBorderColor: '--plasma-slider-thumb-focus-border-color',
|
48
|
-
currentValueTopOffset: '--plasma-slider-current-value-top-offset',
|
49
|
-
currentValueFontFamily: '--plasma-slider-current-value-font-family',
|
50
|
-
currentValueFontSize: '--plasma-slider-current-value-font-size',
|
51
|
-
currentValueFontStyle: '--plasma-slider-current-value-font-style',
|
52
|
-
currentValueFontWeight: '--plasma-slider-current-value-font-weight',
|
53
|
-
currentValueLetterSpacing: '--plasma-slider-current-value-letter-spacing',
|
54
|
-
currentValueLineHeight: '--plasma-slider-current-value-line-height',
|
55
|
-
railBackgroundColor: '--plasma-slider-rail-background-color',
|
56
|
-
railHeight: '--plasma-slider-rail-height',
|
57
|
-
railBorderRadius: '--plasma-slider-rail-border-radius',
|
58
|
-
railIndent: '--plasma-slider-rail-indent',
|
59
|
-
fillColor: '--plasma-slider-fill-color',
|
60
|
-
textFieldWrapperGap: '--plasma-slider-text-field-wrapper-gap',
|
61
|
-
textFieldFontFamily: '--plasma-slider-text-field-font-family',
|
62
|
-
textFieldFontSize: '--plasma-slider-text-field-font-size',
|
63
|
-
textFieldFontStyle: '--plasma-slider-text-field-font-style',
|
64
|
-
textFieldFontWeight: '--plasma-slider-text-field-font-weight',
|
65
|
-
textFieldLetterSpacing: '--plasma-slider-text-field-letter-spacing',
|
66
|
-
textFieldLineHeight: '--plasma-slider-text-field-line-height',
|
67
|
-
textFieldHeight: '--plasma-slider-text-field-height',
|
68
|
-
textFieldPadding: '--plasma-slider-text-field-padding',
|
69
|
-
textFieldBorderRadius: '--plasma-slider-text-field-border-radius',
|
70
|
-
textFieldColor: '--plasma-slider-text-field-color',
|
71
|
-
textFieldActiveColor: '--plasma-slider-text-field-active-color',
|
72
|
-
textFieldBackgroundColor: '--plasma-slider-text-field-background-color',
|
73
|
-
textFieldCaretColor: '--plasma-slider-text-field-caret-color',
|
74
|
-
textFieldPlaceholderColor: '--plasma-slider-text-field-placeholder-color',
|
75
|
-
textFiledFocusColor: '--plasma-slider-text-field-focus-color',
|
76
|
-
disabledOpacity: '--plasma-slider-disabled-opacity'
|
77
|
-
};
|
@@ -1,300 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.DoubleSlider = void 0;
|
8
|
-
var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
|
9
|
-
var _SliderBase = /*#__PURE__*/require("../SliderBase/SliderBase");
|
10
|
-
var _ui = /*#__PURE__*/require("../../ui");
|
11
|
-
var _utils = /*#__PURE__*/require("../../utils");
|
12
|
-
var _utils2 = /*#__PURE__*/require("../../../../utils");
|
13
|
-
var _Slider = /*#__PURE__*/require("../../Slider.tokens");
|
14
|
-
var _Double = /*#__PURE__*/require("./Double.styles");
|
15
|
-
var _excluded = ["min", "max", "value", "disabled", "label", "labelContentLeft", "size", "onChangeCommitted", "onChangeTextField", "onBlurTextField", "onKeyDownTextField", "onChange", "ariaLabel", "multipleStepSize"];
|
16
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
17
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
18
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
19
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
21
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
22
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
23
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
24
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
25
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
26
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
27
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
28
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
29
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
31
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
32
|
-
function getXCenterHandle(handle) {
|
33
|
-
var _handle$parentElement;
|
34
|
-
var containerX = ((_handle$parentElement = handle.parentElement) === null || _handle$parentElement === void 0 || (_handle$parentElement = _handle$parentElement.getBoundingClientRect()) === null || _handle$parentElement === void 0 ? void 0 : _handle$parentElement.x) || 0;
|
35
|
-
var handleRect = handle.getBoundingClientRect();
|
36
|
-
var handlePosition = handleRect.x;
|
37
|
-
return handlePosition - containerX;
|
38
|
-
}
|
39
|
-
var DoubleSlider = exports.DoubleSlider = function DoubleSlider(_ref) {
|
40
|
-
var min = _ref.min,
|
41
|
-
max = _ref.max,
|
42
|
-
value = _ref.value,
|
43
|
-
disabled = _ref.disabled,
|
44
|
-
label = _ref.label,
|
45
|
-
labelContentLeft = _ref.labelContentLeft,
|
46
|
-
_ref$size = _ref.size,
|
47
|
-
size = _ref$size === void 0 ? 'm' : _ref$size,
|
48
|
-
onChangeCommitted = _ref.onChangeCommitted,
|
49
|
-
onChangeTextField = _ref.onChangeTextField,
|
50
|
-
onBlurTextField = _ref.onBlurTextField,
|
51
|
-
onKeyDownTextField = _ref.onKeyDownTextField,
|
52
|
-
onChange = _ref.onChange,
|
53
|
-
ariaLabel = _ref.ariaLabel,
|
54
|
-
_ref$multipleStepSize = _ref.multipleStepSize,
|
55
|
-
multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
|
56
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
57
|
-
var _useState = (0, _react.useState)({
|
58
|
-
stepSize: 0,
|
59
|
-
railFillWidth: 0,
|
60
|
-
railFillXPosition: 0,
|
61
|
-
xFirstHandle: 0,
|
62
|
-
xSecondHandle: 0,
|
63
|
-
firstHandleZIndex: 100,
|
64
|
-
secondHandleZIndex: 101,
|
65
|
-
firstValue: value[0],
|
66
|
-
secondValue: value[1]
|
67
|
-
}),
|
68
|
-
_useState2 = _slicedToArray(_useState, 2),
|
69
|
-
state = _useState2[0],
|
70
|
-
setState = _useState2[1];
|
71
|
-
var _useState3 = (0, _react.useState)(false),
|
72
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
73
|
-
firstInputActive = _useState4[0],
|
74
|
-
setFirstInputActive = _useState4[1];
|
75
|
-
var _useState5 = (0, _react.useState)(false),
|
76
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
77
|
-
secondInputActive = _useState6[0],
|
78
|
-
setSecondInputActive = _useState6[1];
|
79
|
-
var _useState7 = (0, _react.useState)(value[0]),
|
80
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
81
|
-
firstValue = _useState8[0],
|
82
|
-
setFirstValue = _useState8[1];
|
83
|
-
var _useState9 = (0, _react.useState)(value[1]),
|
84
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
85
|
-
secondValue = _useState10[0],
|
86
|
-
setSecondValue = _useState10[1];
|
87
|
-
var firstHandleRef = (0, _react.useRef)(null);
|
88
|
-
var secondHandleRef = (0, _react.useRef)(null);
|
89
|
-
var firstHandleValue = (0, _react.useRef)(value[0]);
|
90
|
-
var secondHandleValue = (0, _react.useRef)(value[1]);
|
91
|
-
var stepSize = state.stepSize;
|
92
|
-
var hasLabelContent = label || labelContentLeft;
|
93
|
-
var firstInputActiveClass = firstInputActive && !disabled ? _Slider.classes.textFieldActive : undefined;
|
94
|
-
var secondInputActiveClass = secondInputActive && !disabled ? _Slider.classes.textFieldActive : undefined;
|
95
|
-
(0, _react.useEffect)(function () {
|
96
|
-
var firstLocalValue = Math.min(Math.max(value[0], min), max) - min;
|
97
|
-
var secondLocalValue = Math.min(Math.max(value[1], min), max) - min;
|
98
|
-
setFirstValue(value[0]);
|
99
|
-
setSecondValue(value[1]);
|
100
|
-
setState(function (prevState) {
|
101
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
102
|
-
railFillXPosition: stepSize * firstLocalValue,
|
103
|
-
railFillWidth: stepSize * secondLocalValue - stepSize * firstLocalValue,
|
104
|
-
xFirstHandle: stepSize * firstLocalValue,
|
105
|
-
xSecondHandle: stepSize * secondLocalValue
|
106
|
-
});
|
107
|
-
});
|
108
|
-
}, [value, stepSize, min, max, setFirstValue, setSecondValue]);
|
109
|
-
var setStepSize = (0, _react.useCallback)(function (newStepSize) {
|
110
|
-
setState(function (prevState) {
|
111
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
112
|
-
stepSize: newStepSize
|
113
|
-
});
|
114
|
-
});
|
115
|
-
}, [setState]);
|
116
|
-
var onFirstHandleChange = function onFirstHandleChange(handleValue, data) {
|
117
|
-
if (!(secondHandleRef !== null && secondHandleRef !== void 0 && secondHandleRef.current)) {
|
118
|
-
return;
|
119
|
-
}
|
120
|
-
var newHandleXPosition = data.x;
|
121
|
-
var secondHandleXPosition = getXCenterHandle(secondHandleRef.current);
|
122
|
-
var fillWidth = secondHandleXPosition - newHandleXPosition;
|
123
|
-
firstHandleValue.current = handleValue;
|
124
|
-
setFirstValue(handleValue);
|
125
|
-
setState(function (prevState) {
|
126
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
127
|
-
firstHandleZIndex: 101,
|
128
|
-
secondHandleZIndex: 100,
|
129
|
-
railFillWidth: fillWidth < 0 ? 0 : fillWidth,
|
130
|
-
railFillXPosition: newHandleXPosition
|
131
|
-
});
|
132
|
-
});
|
133
|
-
if (onChange) {
|
134
|
-
onChange([handleValue, value[1]]);
|
135
|
-
}
|
136
|
-
};
|
137
|
-
var onFirstHandleChangeCommitted = function onFirstHandleChangeCommitted(handleValue, data) {
|
138
|
-
setFirstValue(handleValue);
|
139
|
-
if (onChangeCommitted) {
|
140
|
-
onChangeCommitted([handleValue, value[1]]);
|
141
|
-
}
|
142
|
-
setState(function (prevState) {
|
143
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
144
|
-
firstValue: handleValue,
|
145
|
-
xFirstHandle: data.lastX
|
146
|
-
});
|
147
|
-
});
|
148
|
-
};
|
149
|
-
var onFirstTextfieldChange = function onFirstTextfieldChange(event) {
|
150
|
-
if (!(0, _utils2.isNumber)(event.target.value)) {
|
151
|
-
return;
|
152
|
-
}
|
153
|
-
var handleValue = Number(event.target.value);
|
154
|
-
setFirstValue(handleValue);
|
155
|
-
if (onChangeTextField) {
|
156
|
-
onChangeTextField([handleValue, secondValue], event);
|
157
|
-
}
|
158
|
-
};
|
159
|
-
var onFirstTextfieldBlur = function onFirstTextfieldBlur(event) {
|
160
|
-
if (!(0, _utils2.isNumber)(event.target.value)) {
|
161
|
-
return;
|
162
|
-
}
|
163
|
-
var handleValue = Number(event.target.value);
|
164
|
-
setFirstValue(handleValue);
|
165
|
-
if (onBlurTextField) {
|
166
|
-
onBlurTextField && onBlurTextField([handleValue, secondValue], event);
|
167
|
-
}
|
168
|
-
};
|
169
|
-
var onSecondHandleChange = function onSecondHandleChange(handleValue, data) {
|
170
|
-
if (!(firstHandleRef !== null && firstHandleRef !== void 0 && firstHandleRef.current)) {
|
171
|
-
return;
|
172
|
-
}
|
173
|
-
var firstXHandleXPosition = getXCenterHandle(firstHandleRef.current);
|
174
|
-
var newHandleXPosition = data.x;
|
175
|
-
var fillWidth = newHandleXPosition - firstXHandleXPosition;
|
176
|
-
secondHandleValue.current = handleValue;
|
177
|
-
setSecondValue(handleValue);
|
178
|
-
setState(function (prevState) {
|
179
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
180
|
-
firstHandleZIndex: 100,
|
181
|
-
secondHandleZIndex: 101,
|
182
|
-
railFillWidth: fillWidth < 0 ? 0 : fillWidth,
|
183
|
-
railFillXPosition: firstXHandleXPosition
|
184
|
-
});
|
185
|
-
});
|
186
|
-
if (onChange) {
|
187
|
-
onChange([value[0], handleValue]);
|
188
|
-
}
|
189
|
-
};
|
190
|
-
var onSecondHandleChangeCommitted = function onSecondHandleChangeCommitted(handleValue, data) {
|
191
|
-
if (onChangeCommitted) {
|
192
|
-
onChangeCommitted([value[0], handleValue]);
|
193
|
-
}
|
194
|
-
setSecondValue(handleValue);
|
195
|
-
setState(function (prevState) {
|
196
|
-
return _objectSpread(_objectSpread({}, prevState), {}, {
|
197
|
-
secondValue: handleValue,
|
198
|
-
xSecondHandle: data.lastX
|
199
|
-
});
|
200
|
-
});
|
201
|
-
};
|
202
|
-
var onSecondTextfieldChange = function onSecondTextfieldChange(event) {
|
203
|
-
if (!(0, _utils2.isNumber)(event.target.value)) {
|
204
|
-
return;
|
205
|
-
}
|
206
|
-
var handleValue = Number(event.target.value);
|
207
|
-
setSecondValue(handleValue);
|
208
|
-
if (onChangeTextField) {
|
209
|
-
onChangeTextField([firstValue, handleValue], event);
|
210
|
-
}
|
211
|
-
};
|
212
|
-
var onSecondTextfieldBlur = function onSecondTextfieldBlur(event) {
|
213
|
-
if (!(0, _utils2.isNumber)(event.target.value)) {
|
214
|
-
return;
|
215
|
-
}
|
216
|
-
var handleValue = Number(event.target.value);
|
217
|
-
setSecondValue(handleValue);
|
218
|
-
if (onBlurTextField) {
|
219
|
-
onBlurTextField([firstValue, handleValue], event);
|
220
|
-
}
|
221
|
-
};
|
222
|
-
var onTextfieldKeyDown = function onTextfieldKeyDown(event) {
|
223
|
-
if (onKeyDownTextField) {
|
224
|
-
onKeyDownTextField([firstValue, secondValue], event);
|
225
|
-
}
|
226
|
-
};
|
227
|
-
var _ref2 = ariaLabel || [],
|
228
|
-
_ref3 = _slicedToArray(_ref2, 2),
|
229
|
-
ariaLabelLeft = _ref3[0],
|
230
|
-
ariaLabelRight = _ref3[1];
|
231
|
-
var currentFirstSliderValue = Math.max(state.firstValue, min);
|
232
|
-
return /*#__PURE__*/_react["default"].createElement(_Double.DoubleWrapper, null, hasLabelContent && /*#__PURE__*/_react["default"].createElement(_Double.LabelWrapper, null, labelContentLeft && /*#__PURE__*/_react["default"].createElement(_Double.LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/_react["default"].createElement(_Double.Label, null, label)), /*#__PURE__*/_react["default"].createElement(_Double.SliderWrapper, null, /*#__PURE__*/_react["default"].createElement(_SliderBase.SliderBase, _extends({
|
233
|
-
min: min,
|
234
|
-
max: max,
|
235
|
-
disabled: disabled,
|
236
|
-
setStepSize: setStepSize,
|
237
|
-
railFillWidth: state.railFillWidth,
|
238
|
-
settings: _utils.sizeData[size],
|
239
|
-
railFillXPosition: state.railFillXPosition
|
240
|
-
}, rest), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
|
241
|
-
ref: firstHandleRef,
|
242
|
-
stepSize: state.stepSize,
|
243
|
-
multipleStepSize: multipleStepSize,
|
244
|
-
onChangeCommitted: onFirstHandleChangeCommitted,
|
245
|
-
onChange: onFirstHandleChange,
|
246
|
-
min: min,
|
247
|
-
max: state.secondValue,
|
248
|
-
disabled: disabled,
|
249
|
-
bounds: [min, state.secondValue],
|
250
|
-
side: "left",
|
251
|
-
xPosition: state.xFirstHandle,
|
252
|
-
zIndex: state.firstHandleZIndex,
|
253
|
-
value: currentFirstSliderValue,
|
254
|
-
ariaLabel: ariaLabelLeft,
|
255
|
-
onMouseEnter: function onMouseEnter() {
|
256
|
-
return setFirstInputActive(true);
|
257
|
-
},
|
258
|
-
onMouseLeave: function onMouseLeave() {
|
259
|
-
return setFirstInputActive(false);
|
260
|
-
}
|
261
|
-
}), /*#__PURE__*/_react["default"].createElement(_ui.Handler, {
|
262
|
-
ref: secondHandleRef,
|
263
|
-
stepSize: state.stepSize,
|
264
|
-
multipleStepSize: multipleStepSize,
|
265
|
-
onChangeCommitted: onSecondHandleChangeCommitted,
|
266
|
-
onChange: onSecondHandleChange,
|
267
|
-
min: min,
|
268
|
-
ariaValueMin: currentFirstSliderValue,
|
269
|
-
max: max,
|
270
|
-
disabled: disabled,
|
271
|
-
bounds: [state.firstValue, max],
|
272
|
-
side: "right",
|
273
|
-
xPosition: state.xSecondHandle,
|
274
|
-
zIndex: state.secondHandleZIndex,
|
275
|
-
value: Math.max(state.secondValue, min),
|
276
|
-
ariaLabel: ariaLabelRight,
|
277
|
-
onMouseEnter: function onMouseEnter() {
|
278
|
-
return setSecondInputActive(true);
|
279
|
-
},
|
280
|
-
onMouseLeave: function onMouseLeave() {
|
281
|
-
return setSecondInputActive(false);
|
282
|
-
}
|
283
|
-
})), /*#__PURE__*/_react["default"].createElement(_Double.InputsWrapper, null, /*#__PURE__*/_react["default"].createElement(_Double.StyledInput, {
|
284
|
-
className: (0, _utils2.cx)(_Slider.classes.firstTextField, firstInputActiveClass),
|
285
|
-
enumerationType: "plain",
|
286
|
-
disabled: disabled,
|
287
|
-
value: firstValue,
|
288
|
-
onChange: onFirstTextfieldChange,
|
289
|
-
onBlur: onFirstTextfieldBlur,
|
290
|
-
onKeyDown: onTextfieldKeyDown
|
291
|
-
}), /*#__PURE__*/_react["default"].createElement(_Double.StyledInput, {
|
292
|
-
className: (0, _utils2.cx)(_Slider.classes.secondTextField, secondInputActiveClass),
|
293
|
-
enumerationType: "plain",
|
294
|
-
disabled: disabled,
|
295
|
-
value: secondValue,
|
296
|
-
onChange: onSecondTextfieldChange,
|
297
|
-
onBlur: onSecondTextfieldBlur,
|
298
|
-
onKeyDown: onTextfieldKeyDown
|
299
|
-
}))));
|
300
|
-
};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.StyledInput = exports.SliderWrapper = exports.LabelWrapper = exports.LabelContentLeft = exports.Label = exports.InputsWrapper = exports.DoubleWrapper = void 0;
|
7
|
-
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
8
|
-
var _Slider = /*#__PURE__*/require("../../Slider.tokens");
|
9
|
-
var _engines = /*#__PURE__*/require("../../../../engines");
|
10
|
-
var _TextField = /*#__PURE__*/require("../../../TextField");
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
12
|
-
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_TextField.textFieldConfig);
|
13
|
-
var TextField = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
14
|
-
var LabelWrapper = exports.LabelWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
15
|
-
componentId: "plasma-new-hope__sc-97pdfk-0"
|
16
|
-
})(["color:var(", ");display:flex;gap:var(", ");margin-bottom:var(", ");"], _Slider.tokens.labelColor, _Slider.tokens.labelWrapperGap, _Slider.tokens.labelWrapperMarginBottom);
|
17
|
-
var LabelContentLeft = exports.LabelContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
18
|
-
componentId: "plasma-new-hope__sc-97pdfk-1"
|
19
|
-
})([""]);
|
20
|
-
var Label = exports.Label = /*#__PURE__*/_styledComponents["default"].label.withConfig({
|
21
|
-
componentId: "plasma-new-hope__sc-97pdfk-2"
|
22
|
-
})(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], _Slider.tokens.labelFontFamily, _Slider.tokens.labelFontSize, _Slider.tokens.labelFontStyle, _Slider.tokens.labelFontWeight, _Slider.tokens.labelLetterSpacing, _Slider.tokens.labelLineHeight);
|
23
|
-
var InputsWrapper = exports.InputsWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
24
|
-
componentId: "plasma-new-hope__sc-97pdfk-3"
|
25
|
-
})(["display:flex;gap:var(", ");margin-top:var(", ");"], _Slider.tokens.textFieldWrapperGap, _Slider.tokens.doubleWrapperGap);
|
26
|
-
|
27
|
-
// NOTE: переопределение токенов TextField
|
28
|
-
var StyledInput = exports.StyledInput = /*#__PURE__*/(0, _styledComponents["default"])(TextField).withConfig({
|
29
|
-
componentId: "plasma-new-hope__sc-97pdfk-4"
|
30
|
-
})(["flex:1;", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");&.", " > div{border-top-right-radius:0;border-bottom-right-radius:0;}&.", " > div{border-top-left-radius:0;border-bottom-left-radius:0;}input:focus,&.", "{", ":var(", ");}"], _TextField.textFieldTokens.color, _Slider.tokens.textFieldColor, _TextField.textFieldTokens.backgroundColor, _Slider.tokens.textFieldBackgroundColor, _TextField.textFieldTokens.caretColor, _Slider.tokens.textFieldCaretColor, _TextField.textFieldTokens.placeholderColor, _Slider.tokens.textFieldPlaceholderColor, _TextField.textFieldTokens.disabledOpacity, _Slider.tokens.disabledOpacity, _TextField.textFieldTokens.height, _Slider.tokens.textFieldHeight, _TextField.textFieldTokens.padding, _Slider.tokens.textFieldPadding, _TextField.textFieldTokens.borderRadius, _Slider.tokens.textFieldBorderRadius, _TextField.textFieldTokens.fontFamily, _Slider.tokens.textFieldFontFamily, _TextField.textFieldTokens.fontSize, _Slider.tokens.textFieldFontSize, _TextField.textFieldTokens.fontStyle, _Slider.tokens.textFieldFontStyle, _TextField.textFieldTokens.fontWeight, _Slider.tokens.textFieldFontWeight, _TextField.textFieldTokens.letterSpacing, _Slider.tokens.textFieldLetterSpacing, _TextField.textFieldTokens.lineHeight, _Slider.tokens.textFieldLineHeight, _Slider.classes.firstTextField, _Slider.classes.secondTextField, _Slider.classes.textFieldActive, _TextField.textFieldTokens.color, _Slider.tokens.textFiledFocusColor);
|
31
|
-
var DoubleWrapper = exports.DoubleWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
32
|
-
componentId: "plasma-new-hope__sc-97pdfk-5"
|
33
|
-
})(["opacity:var(", ");"], _Slider.tokens.disabledOpacity);
|
34
|
-
var SliderWrapper = exports.SliderWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
35
|
-
componentId: "plasma-new-hope__sc-97pdfk-6"
|
36
|
-
})([""]);
|