@salutejs/plasma-new-hope 0.83.0-canary.1194.9174145281.0 → 0.83.0-canary.1208.9173239801.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Range/Range.css +63 -0
- package/cjs/components/Range/Range.js +146 -0
- package/cjs/components/Range/Range.js.map +1 -0
- package/cjs/components/Range/Range.styles.js +63 -0
- package/cjs/components/Range/Range.styles.js.map +1 -0
- package/cjs/components/Range/Range.styles_mc4w65.css +8 -0
- package/cjs/components/Range/Range.tokens.js +105 -0
- package/cjs/components/Range/Range.tokens.js.map +1 -0
- package/cjs/components/Range/utils/index.js +24 -0
- package/cjs/components/Range/utils/index.js.map +1 -0
- package/cjs/components/{Slider → Range}/variations/_disabled/base.js +2 -2
- package/cjs/components/Range/variations/_disabled/base.js.map +1 -0
- package/cjs/components/Range/variations/_disabled/base_1ufizo4.css +1 -0
- package/cjs/components/{Slider/variations/_view → Range/variations/_readonly}/base.js +2 -2
- package/cjs/components/Range/variations/_readonly/base.js.map +1 -0
- package/cjs/components/Range/variations/_readonly/base_hzmd8h.css +1 -0
- package/cjs/components/Range/variations/_size/base.js +9 -0
- package/cjs/components/Range/variations/_size/base.js.map +1 -0
- package/cjs/components/Range/variations/_size/base_16xiubi.css +1 -0
- package/cjs/components/{Slider/variations/_size → Range/variations/_view}/base.js +2 -2
- package/cjs/components/Range/variations/_view/base.js.map +1 -0
- package/cjs/components/Range/variations/_view/base_5iz3nr.css +1 -0
- package/cjs/components/TextField/TextField.js +6 -9
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +13 -1
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/{TextField.styles_1b1mddp.css → TextField.styles_aqmut.css} +2 -0
- package/cjs/components/TextField/TextField.tokens.js +5 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/variations/_label-placement/inner.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -1
- package/cjs/components/TextField/variations/_label-placement/inner_7c08qb.css +1 -0
- package/cjs/components/TextField/variations/_size/base.js +1 -1
- package/cjs/components/TextField/variations/_size/base.js.map +1 -1
- package/cjs/components/TextField/variations/_size/{base_1khzr9t.css → base_ntoddv.css} +1 -1
- package/cjs/components/TextField/variations/_view/base.js +1 -1
- package/cjs/components/TextField/variations/_view/base.js.map +1 -1
- package/cjs/components/TextField/variations/_view/{base_1qd77x6.css → base_19gxyva.css} +1 -1
- 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 +20 -26
- package/cjs/index.js +5 -14
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Combobox/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Range/Range.css +63 -0
- package/es/components/Range/Range.js +141 -0
- package/es/components/Range/Range.js.map +1 -0
- package/es/components/Range/Range.styles.js +52 -0
- package/es/components/Range/Range.styles.js.map +1 -0
- package/es/components/Range/Range.styles_mc4w65.css +8 -0
- package/es/components/Range/Range.tokens.js +100 -0
- package/es/components/Range/Range.tokens.js.map +1 -0
- package/es/components/Range/utils/index.js +19 -0
- package/es/components/Range/utils/index.js.map +1 -0
- package/es/components/{Slider/variations/_size → Range/variations/_disabled}/base.js +2 -2
- package/es/components/Range/variations/_disabled/base.js.map +1 -0
- package/es/components/Range/variations/_disabled/base_1ufizo4.css +1 -0
- package/es/components/{Slider/variations/_view → Range/variations/_readonly}/base.js +2 -2
- package/es/components/Range/variations/_readonly/base.js.map +1 -0
- package/es/components/Range/variations/_readonly/base_hzmd8h.css +1 -0
- package/es/components/Range/variations/_size/base.js +5 -0
- package/es/components/Range/variations/_size/base.js.map +1 -0
- package/es/components/Range/variations/_size/base_16xiubi.css +1 -0
- package/es/components/{Slider/variations/_disabled → Range/variations/_view}/base.js +2 -2
- package/es/components/Range/variations/_view/base.js.map +1 -0
- package/es/components/Range/variations/_view/base_5iz3nr.css +1 -0
- package/es/components/TextField/TextField.js +7 -10
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +12 -2
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/{TextField.styles_1b1mddp.css → TextField.styles_aqmut.css} +2 -0
- package/es/components/TextField/TextField.tokens.js +5 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/variations/_label-placement/inner.js +1 -1
- package/es/components/TextField/variations/_label-placement/inner.js.map +1 -1
- package/es/components/TextField/variations/_label-placement/inner_7c08qb.css +1 -0
- package/es/components/TextField/variations/_size/base.js +1 -1
- package/es/components/TextField/variations/_size/base.js.map +1 -1
- package/es/components/TextField/variations/_size/{base_1khzr9t.css → base_ntoddv.css} +1 -1
- package/es/components/TextField/variations/_view/base.js +1 -1
- package/es/components/TextField/variations/_view/base.js.map +1 -1
- package/es/components/TextField/variations/_view/{base_1qd77x6.css → base_19gxyva.css} +1 -1
- 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 +20 -26
- package/es/index.js +2 -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/Range/Range.js +148 -0
- package/styled-components/cjs/components/Range/Range.styles.js +39 -0
- package/styled-components/cjs/components/Range/Range.template-doc.mdx +323 -0
- package/styled-components/cjs/components/Range/Range.tokens.js +103 -0
- package/styled-components/cjs/components/Range/index.js +25 -0
- package/styled-components/cjs/components/Range/utils/index.js +22 -0
- package/styled-components/cjs/components/{Slider → Range}/variations/_disabled/base.js +2 -1
- package/styled-components/cjs/components/Range/variations/_disabled/tokens.json +4 -0
- package/styled-components/cjs/components/Range/variations/_readonly/base.js +10 -0
- package/styled-components/cjs/components/Range/variations/_readonly/tokens.json +4 -0
- package/styled-components/cjs/components/Range/variations/_size/base.js +10 -0
- package/styled-components/cjs/components/Range/variations/_size/tokens.json +26 -0
- package/styled-components/cjs/components/Range/variations/_view/base.js +10 -0
- package/styled-components/cjs/components/Range/variations/_view/tokens.json +6 -0
- package/styled-components/cjs/components/TextField/TextField.js +6 -9
- package/styled-components/cjs/components/TextField/TextField.styles.js +7 -1
- package/styled-components/cjs/components/TextField/TextField.tokens.js +5 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_view/base.js +1 -1
- package/styled-components/cjs/engines/common.js +0 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.config.js +31 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Range/Range.stories.tsx +312 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +8 -8
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +2 -0
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.config.js +31 -0
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/Range/Range.stories.tsx +312 -0
- package/styled-components/cjs/hooks/index.js +1 -8
- package/styled-components/cjs/index.js +4 -4
- package/styled-components/cjs/utils/index.js +0 -7
- package/styled-components/es/components/Range/Range.js +139 -0
- package/styled-components/es/components/Range/Range.styles.js +31 -0
- package/styled-components/es/components/Range/Range.template-doc.mdx +323 -0
- package/styled-components/es/components/Range/Range.tokens.js +97 -0
- package/styled-components/es/components/Range/index.js +2 -0
- package/styled-components/es/components/Range/utils/index.js +16 -0
- package/styled-components/es/components/Range/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/Range/variations/_disabled/tokens.json +4 -0
- package/styled-components/es/components/Range/variations/_readonly/base.js +4 -0
- package/styled-components/es/components/Range/variations/_readonly/tokens.json +4 -0
- package/styled-components/es/components/Range/variations/_size/base.js +4 -0
- package/styled-components/es/components/Range/variations/_size/tokens.json +26 -0
- package/styled-components/es/components/Range/variations/_view/base.js +4 -0
- package/styled-components/es/components/Range/variations/_view/tokens.json +6 -0
- package/styled-components/es/components/TextField/TextField.js +7 -10
- package/styled-components/es/components/TextField/TextField.styles.js +6 -0
- package/styled-components/es/components/TextField/TextField.tokens.js +5 -0
- package/styled-components/es/components/TextField/variations/_label-placement/inner.js +2 -2
- package/styled-components/es/components/TextField/variations/_size/base.js +2 -2
- package/styled-components/es/components/TextField/variations/_view/base.js +2 -2
- package/styled-components/es/engines/common.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.config.js +25 -0
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/Range/Range.stories.tsx +312 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +8 -8
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +2 -0
- package/styled-components/es/examples/plasma_web/components/Range/Range.config.js +25 -0
- package/styled-components/es/examples/plasma_web/components/Range/Range.js +5 -0
- package/styled-components/es/examples/plasma_web/components/Range/Range.stories.tsx +312 -0
- package/styled-components/es/hooks/index.js +1 -2
- package/styled-components/es/index.js +1 -1
- package/styled-components/es/utils/index.js +0 -1
- package/types/components/Range/Range.d.ts +31 -0
- package/types/components/Range/Range.d.ts.map +1 -0
- package/types/components/{Slider/components/Double/Double.styles.d.ts → Range/Range.styles.d.ts} +15 -10
- package/types/components/Range/Range.styles.d.ts.map +1 -0
- package/types/components/Range/Range.tokens.d.ts +98 -0
- package/types/components/Range/Range.tokens.d.ts.map +1 -0
- package/types/components/Range/Range.types.d.ts +143 -0
- package/types/components/Range/Range.types.d.ts.map +1 -0
- package/types/components/Range/index.d.ts +4 -0
- package/types/components/Range/index.d.ts.map +1 -0
- package/types/components/Range/utils/index.d.ts +5 -0
- package/types/components/Range/utils/index.d.ts.map +1 -0
- package/types/components/Range/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/Range/variations/_readonly/base.d.ts.map +1 -0
- package/types/components/Range/variations/_size/base.d.ts.map +1 -0
- package/types/components/Range/variations/_view/base.d.ts +2 -0
- package/types/components/Range/variations/_view/base.d.ts.map +1 -0
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +2 -0
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +5 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +8 -0
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -1
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
- package/types/components/TextField/variations/_view/base.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_web/components/Slider/Slider.config.d.ts → plasma_b2c/components/Range/Range.config.d.ts} +5 -3
- package/types/examples/plasma_b2c/components/Range/Range.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Range/Range.d.ts +127 -0
- package/types/examples/plasma_b2c/components/Range/Range.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +4 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/{plasma_b2c/components/Slider/Slider.config.d.ts → plasma_web/components/Range/Range.config.d.ts} +5 -3
- package/types/examples/plasma_web/components/Range/Range.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Range/Range.d.ts +127 -0
- package/types/examples/plasma_web/components/Range/Range.d.ts.map +1 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +4 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts +4 -0
- package/types/examples/sds_engineer/components/TextField/TextField.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 +1 -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/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 -306
- 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 -167
- 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.map +0 -1
- package/cjs/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- 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.map +0 -1
- package/cjs/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.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/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 -302
- 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 -163
- 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.map +0 -1
- package/es/components/Slider/variations/_disabled/base_x642ct.css +0 -1
- 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.map +0 -1
- package/es/components/Slider/variations/_view/base_x642ct.css +0 -1
- package/es/components/TextField/variations/_label-placement/inner_gqlcj2.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/components/Double/Double.js +0 -318
- 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 -176
- 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/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 -169
- 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 -168
- 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/components/Double/Double.js +0 -310
- 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 -167
- 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 -169
- 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 -168
- 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.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.map +0 -1
- package/types/components/Slider/variations/_size/base.d.ts.map +0 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +0 -1
- 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.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
- /package/styled-components/cjs/components/{Slider/Slider.types.js → Range/Range.types.js} +0 -0
- /package/styled-components/es/components/{Slider/Slider.types.js → Range/Range.types.js} +0 -0
- /package/types/components/{Slider → Range}/variations/_disabled/base.d.ts +0 -0
- /package/types/components/{Slider/variations/_size → Range/variations/_readonly}/base.d.ts +0 -0
- /package/types/components/{Slider/variations/_view → Range/variations/_size}/base.d.ts +0 -0
@@ -1,160 +0,0 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, objectSpread2 as _objectSpread2, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
-
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
3
|
-
import { SliderBase } from '../SliderBase/SliderBase.js';
|
4
|
-
import { Handler } from '../../ui/Handler/Handler.js';
|
5
|
-
import '@linaria/react';
|
6
|
-
import { sizeData } from '../../utils/index.js';
|
7
|
-
import { cx } from '../../../../utils/index.js';
|
8
|
-
import { classes } from '../../Slider.tokens.js';
|
9
|
-
import { SingleWrapper, LabelWrapper, LabelContentLeft, Label, SliderBaseWrapper, StyledRangeValue } from './Single.styles.js';
|
10
|
-
import { isNumber } from '../../../../utils/isNumber.js';
|
11
|
-
|
12
|
-
var _excluded = ["min", "max", "value", "disabled", "onChangeCommitted", "onChange", "ariaLabel", "label", "labelContentLeft", "showRangeValues", "showCurrentValue", "hideMinValueDiff", "hideMaxValueDiff", "labelPlacement", "rangeValuesPlacement", "multipleStepSize", "size"];
|
13
|
-
var SingleSlider = function SingleSlider(_ref) {
|
14
|
-
var min = _ref.min,
|
15
|
-
max = _ref.max,
|
16
|
-
value = _ref.value,
|
17
|
-
disabled = _ref.disabled,
|
18
|
-
onChangeCommitted = _ref.onChangeCommitted,
|
19
|
-
onChange = _ref.onChange,
|
20
|
-
ariaLabel = _ref.ariaLabel,
|
21
|
-
label = _ref.label,
|
22
|
-
labelContentLeft = _ref.labelContentLeft,
|
23
|
-
showRangeValues = _ref.showRangeValues,
|
24
|
-
showCurrentValue = _ref.showCurrentValue,
|
25
|
-
hideMinValueDiff = _ref.hideMinValueDiff,
|
26
|
-
hideMaxValueDiff = _ref.hideMaxValueDiff,
|
27
|
-
_ref$labelPlacement = _ref.labelPlacement,
|
28
|
-
labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
|
29
|
-
_ref$rangeValuesPlace = _ref.rangeValuesPlacement,
|
30
|
-
rangeValuesPlacement = _ref$rangeValuesPlace === void 0 ? 'outer' : _ref$rangeValuesPlace,
|
31
|
-
_ref$multipleStepSize = _ref.multipleStepSize,
|
32
|
-
multipleStepSize = _ref$multipleStepSize === void 0 ? 10 : _ref$multipleStepSize,
|
33
|
-
_ref$size = _ref.size,
|
34
|
-
size = _ref$size === void 0 ? 'm' : _ref$size,
|
35
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
36
|
-
var _useState = useState({
|
37
|
-
xHandle: 0,
|
38
|
-
stepSize: 0,
|
39
|
-
railFillWidth: 0
|
40
|
-
}),
|
41
|
-
_useState2 = _slicedToArray(_useState, 2),
|
42
|
-
state = _useState2[0],
|
43
|
-
setState = _useState2[1];
|
44
|
-
var _useState3 = useState(0),
|
45
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
46
|
-
startOffset = _useState4[0],
|
47
|
-
setStartOffset = _useState4[1];
|
48
|
-
var _useState5 = useState(0),
|
49
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
50
|
-
endOffset = _useState6[0],
|
51
|
-
setEndOffset = _useState6[1];
|
52
|
-
var _useState7 = useState(value),
|
53
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
54
|
-
dragValue = _useState8[0],
|
55
|
-
setDragValue = _useState8[1];
|
56
|
-
var stepSize = state.stepSize;
|
57
|
-
var hasLabelContent = label || labelContentLeft;
|
58
|
-
var labelPlacementClass = labelPlacement === 'outer' ? classes.labelPlacementOuter : classes.labelPlacementInner;
|
59
|
-
var rangeValuesPlacementClass = rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;
|
60
|
-
var hideMinValueDiffClass = hideMinValueDiff && value - min <= hideMinValueDiff ? classes.hideMinValue : '';
|
61
|
-
var hideMaxValueDiffClass = hideMaxValueDiff && max - value <= hideMaxValueDiff ? classes.hideMaxValue : '';
|
62
|
-
var startLabelRef = useRef(null);
|
63
|
-
var endLabelRef = useRef(null);
|
64
|
-
var activeFirstValue = dragValue === min ? classes.activeRangeValue : undefined;
|
65
|
-
var activeSecondValue = dragValue === max ? classes.activeRangeValue : undefined;
|
66
|
-
useEffect(function () {
|
67
|
-
var localValue = Math.min(Math.max(value, min), max) - min;
|
68
|
-
if (rangeValuesPlacement === 'outer') {
|
69
|
-
var _startLabelRef$curren, _endLabelRef$current;
|
70
|
-
var startWidth = (_startLabelRef$curren = startLabelRef.current) === null || _startLabelRef$curren === void 0 ? void 0 : _startLabelRef$curren.offsetWidth;
|
71
|
-
if (isNumber(startWidth)) {
|
72
|
-
setStartOffset(Number(startWidth));
|
73
|
-
}
|
74
|
-
var endWidth = (_endLabelRef$current = endLabelRef.current) === null || _endLabelRef$current === void 0 ? void 0 : _endLabelRef$current.offsetWidth;
|
75
|
-
if (isNumber(endWidth)) {
|
76
|
-
setEndOffset(Number(endWidth));
|
77
|
-
}
|
78
|
-
} else {
|
79
|
-
setStartOffset(1);
|
80
|
-
setEndOffset(1);
|
81
|
-
}
|
82
|
-
setState(function (prevState) {
|
83
|
-
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
84
|
-
xHandle: stepSize * localValue,
|
85
|
-
railFillWidth: stepSize * localValue
|
86
|
-
});
|
87
|
-
});
|
88
|
-
}, [value, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);
|
89
|
-
var setStepSize = useCallback(function (newStepSize) {
|
90
|
-
setState(function (prevState) {
|
91
|
-
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
92
|
-
stepSize: newStepSize
|
93
|
-
});
|
94
|
-
});
|
95
|
-
}, [setState]);
|
96
|
-
var onHandleChange = function onHandleChange(handleValue, data) {
|
97
|
-
var newHandleXPosition = data.x;
|
98
|
-
var newValue = Math.round(handleValue);
|
99
|
-
setState(function (prevState) {
|
100
|
-
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
101
|
-
railFillWidth: newHandleXPosition
|
102
|
-
});
|
103
|
-
});
|
104
|
-
if (onChange) {
|
105
|
-
onChange(newValue);
|
106
|
-
}
|
107
|
-
setDragValue(newValue);
|
108
|
-
};
|
109
|
-
var onHandleChangeCommitted = function onHandleChangeCommitted(handleValue, data) {
|
110
|
-
var newValue = Math.round(handleValue);
|
111
|
-
if (onChangeCommitted) {
|
112
|
-
onChangeCommitted(newValue);
|
113
|
-
}
|
114
|
-
setState(function (prevState) {
|
115
|
-
return _objectSpread2(_objectSpread2({}, prevState), {}, {
|
116
|
-
xHandle: data.lastX,
|
117
|
-
railFillWidth: data.lastX
|
118
|
-
});
|
119
|
-
});
|
120
|
-
setDragValue(newValue);
|
121
|
-
};
|
122
|
-
return /*#__PURE__*/React.createElement(SingleWrapper, {
|
123
|
-
className: labelPlacementClass
|
124
|
-
}, hasLabelContent && /*#__PURE__*/React.createElement(LabelWrapper, null, labelContentLeft && /*#__PURE__*/React.createElement(LabelContentLeft, null, labelContentLeft), label && /*#__PURE__*/React.createElement(Label, null, label)), /*#__PURE__*/React.createElement(SliderBaseWrapper, {
|
125
|
-
className: rangeValuesPlacementClass
|
126
|
-
}, showRangeValues && /*#__PURE__*/React.createElement(StyledRangeValue, {
|
127
|
-
ref: startLabelRef,
|
128
|
-
className: cx(hideMinValueDiffClass, activeFirstValue)
|
129
|
-
}, min), /*#__PURE__*/React.createElement(SliderBase, _extends({
|
130
|
-
min: min,
|
131
|
-
max: max,
|
132
|
-
disabled: disabled,
|
133
|
-
setStepSize: setStepSize,
|
134
|
-
onChange: onHandleChangeCommitted,
|
135
|
-
railFillWidth: state.railFillWidth,
|
136
|
-
settings: sizeData[size],
|
137
|
-
labelPlacement: labelPlacement,
|
138
|
-
rangeValuesPlacement: rangeValuesPlacement
|
139
|
-
}, rest), /*#__PURE__*/React.createElement(Handler, {
|
140
|
-
stepSize: state.stepSize,
|
141
|
-
onChangeCommitted: onHandleChangeCommitted,
|
142
|
-
onChange: onHandleChange,
|
143
|
-
xPosition: state.xHandle,
|
144
|
-
min: min,
|
145
|
-
max: max,
|
146
|
-
startOffset: startOffset,
|
147
|
-
endOffset: endOffset,
|
148
|
-
value: dragValue,
|
149
|
-
disabled: disabled,
|
150
|
-
ariaLabel: ariaLabel,
|
151
|
-
multipleStepSize: multipleStepSize,
|
152
|
-
showCurrentValue: showCurrentValue
|
153
|
-
})), showRangeValues && /*#__PURE__*/React.createElement(StyledRangeValue, {
|
154
|
-
ref: endLabelRef,
|
155
|
-
className: cx(classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)
|
156
|
-
}, max)));
|
157
|
-
};
|
158
|
-
|
159
|
-
export { SingleSlider };
|
160
|
-
//# sourceMappingURL=Single.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Single.js","sources":["../../../../../src/components/Slider/components/Single/Single.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState, useRef } from 'react';\nimport type { FC } from 'react';\n\nimport { SliderBase } from '../SliderBase/SliderBase';\nimport { Handler } from '../../ui';\nimport { sizeData } from '../../utils';\nimport type { HandlerProps } from '../../ui';\nimport { cx, isNumber } from '../../../../utils';\nimport { classes } from '../../Slider.tokens';\n\nimport type { SingleSliderProps } from './Single.types';\nimport {\n Label,\n LabelContentLeft,\n LabelWrapper,\n SingleWrapper,\n SliderBaseWrapper,\n StyledRangeValue,\n} from './Single.styles';\n\nexport const SingleSlider: FC<SingleSliderProps> = ({\n min,\n max,\n value,\n disabled,\n onChangeCommitted,\n onChange,\n ariaLabel,\n label,\n labelContentLeft,\n showRangeValues,\n showCurrentValue,\n hideMinValueDiff,\n hideMaxValueDiff,\n labelPlacement = 'outer',\n rangeValuesPlacement = 'outer',\n multipleStepSize = 10,\n size = 'm',\n ...rest\n}) => {\n const [state, setState] = useState({\n xHandle: 0,\n stepSize: 0,\n railFillWidth: 0,\n });\n\n const [startOffset, setStartOffset] = useState(0);\n const [endOffset, setEndOffset] = useState(0);\n\n const [dragValue, setDragValue] = useState(value);\n\n const { stepSize } = state;\n\n const hasLabelContent = label || labelContentLeft;\n const labelPlacementClass = labelPlacement === 'outer' ? classes.labelPlacementOuter : classes.labelPlacementInner;\n const rangeValuesPlacementClass =\n rangeValuesPlacement === 'outer' ? classes.rangeValuesPlacementOuter : classes.rangeValuesPlacementInner;\n const hideMinValueDiffClass = hideMinValueDiff && value - min <= hideMinValueDiff ? classes.hideMinValue : '';\n const hideMaxValueDiffClass = hideMaxValueDiff && max - value <= hideMaxValueDiff ? classes.hideMaxValue : '';\n\n const startLabelRef = useRef<HTMLDivElement>(null);\n const endLabelRef = useRef<HTMLDivElement>(null);\n\n const activeFirstValue = dragValue === min ? classes.activeRangeValue : undefined;\n const activeSecondValue = dragValue === max ? classes.activeRangeValue : undefined;\n\n useEffect(() => {\n const localValue = Math.min(Math.max(value, min), max) - min;\n\n if (rangeValuesPlacement === 'outer') {\n const startWidth = startLabelRef.current?.offsetWidth;\n if (isNumber(startWidth)) {\n setStartOffset(Number(startWidth));\n }\n\n const endWidth = endLabelRef.current?.offsetWidth;\n if (isNumber(endWidth)) {\n setEndOffset(Number(endWidth));\n }\n } else {\n setStartOffset(1);\n setEndOffset(1);\n }\n\n setState((prevState) => ({\n ...prevState,\n xHandle: stepSize * localValue,\n railFillWidth: stepSize * localValue,\n }));\n }, [value, labelPlacement, stepSize, rangeValuesPlacement, min, max, setStartOffset, setEndOffset]);\n\n const setStepSize = useCallback(\n (newStepSize: number) => {\n setState((prevState) => ({\n ...prevState,\n stepSize: newStepSize,\n }));\n },\n [setState],\n );\n\n const onHandleChange: NonNullable<HandlerProps['onChange']> = (handleValue, data) => {\n const newHandleXPosition = data.x;\n const newValue = Math.round(handleValue);\n\n setState((prevState) => ({\n ...prevState,\n railFillWidth: newHandleXPosition,\n }));\n\n if (onChange) {\n onChange(newValue);\n }\n\n setDragValue(newValue);\n };\n\n const onHandleChangeCommitted: NonNullable<HandlerProps['onChangeCommitted']> = (handleValue, data) => {\n const newValue = Math.round(handleValue);\n\n if (onChangeCommitted) {\n onChangeCommitted(newValue);\n }\n\n setState((prevState) => ({\n ...prevState,\n xHandle: data.lastX,\n railFillWidth: data.lastX,\n }));\n\n setDragValue(newValue);\n };\n\n return (\n <SingleWrapper className={labelPlacementClass}>\n {hasLabelContent && (\n <LabelWrapper>\n {labelContentLeft && <LabelContentLeft>{labelContentLeft}</LabelContentLeft>}\n {label && <Label>{label}</Label>}\n </LabelWrapper>\n )}\n <SliderBaseWrapper className={rangeValuesPlacementClass}>\n {showRangeValues && (\n <StyledRangeValue ref={startLabelRef} className={cx(hideMinValueDiffClass, activeFirstValue)}>\n {min}\n </StyledRangeValue>\n )}\n <SliderBase\n min={min}\n max={max}\n disabled={disabled}\n setStepSize={setStepSize}\n onChange={onHandleChangeCommitted}\n railFillWidth={state.railFillWidth}\n settings={sizeData[size]}\n labelPlacement={labelPlacement}\n rangeValuesPlacement={rangeValuesPlacement}\n {...rest}\n >\n <Handler\n stepSize={state.stepSize}\n onChangeCommitted={onHandleChangeCommitted}\n onChange={onHandleChange}\n xPosition={state.xHandle}\n min={min}\n max={max}\n startOffset={startOffset}\n endOffset={endOffset}\n value={dragValue}\n disabled={disabled}\n ariaLabel={ariaLabel}\n multipleStepSize={multipleStepSize}\n showCurrentValue={showCurrentValue}\n />\n </SliderBase>\n {showRangeValues && (\n <StyledRangeValue\n ref={endLabelRef}\n className={cx(classes.maxRangeValue, hideMaxValueDiffClass, activeSecondValue)}\n >\n {max}\n </StyledRangeValue>\n )}\n </SliderBaseWrapper>\n </SingleWrapper>\n );\n};\n"],"names":["SingleSlider","_ref","min","max","value","disabled","onChangeCommitted","onChange","ariaLabel","label","labelContentLeft","showRangeValues","showCurrentValue","hideMinValueDiff","hideMaxValueDiff","_ref$labelPlacement","labelPlacement","_ref$rangeValuesPlace","rangeValuesPlacement","_ref$multipleStepSize","multipleStepSize","_ref$size","size","rest","_objectWithoutProperties","_excluded","_useState","useState","xHandle","stepSize","railFillWidth","_useState2","_slicedToArray","state","setState","_useState3","_useState4","startOffset","setStartOffset","_useState5","_useState6","endOffset","setEndOffset","_useState7","_useState8","dragValue","setDragValue","hasLabelContent","labelPlacementClass","classes","labelPlacementOuter","labelPlacementInner","rangeValuesPlacementClass","rangeValuesPlacementOuter","rangeValuesPlacementInner","hideMinValueDiffClass","hideMinValue","hideMaxValueDiffClass","hideMaxValue","startLabelRef","useRef","endLabelRef","activeFirstValue","activeRangeValue","undefined","activeSecondValue","useEffect","localValue","Math","_startLabelRef$curren","_endLabelRef$current","startWidth","current","offsetWidth","isNumber","Number","endWidth","prevState","_objectSpread","setStepSize","useCallback","newStepSize","onHandleChange","handleValue","data","newHandleXPosition","x","newValue","round","onHandleChangeCommitted","lastX","React","createElement","SingleWrapper","className","LabelWrapper","LabelContentLeft","Label","SliderBaseWrapper","StyledRangeValue","ref","cx","SliderBase","_extends","settings","sizeData","Handler","xPosition","maxRangeValue"],"m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EA,WAAY;AACzBI,IAAAA,SAAS,EAAEA,SAAU;AACrBrC,IAAAA,KAAK,EAAEyC,SAAU;AACjBxC,IAAAA,QAAQ,EAAEA,QAAS;AACnBG,IAAAA,SAAS,EAAEA,SAAU;AACrBY,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnCR,IAAAA,gBAAgB,EAAEA,gBAAAA;GACrB,CACO,CAAC,EACZD,eAAe,iBACZgF,KAAA,CAAAC,aAAA,CAACO,gBAAgB,EAAA;AACbC,IAAAA,GAAG,EAAEvC,WAAY;IACjBiC,SAAS,EAAEO,EAAE,CAACpD,OAAO,CAAC2D,aAAa,EAAEnD,qBAAqB,EAAEQ,iBAAiB,CAAA;GAE5E9D,EAAAA,GACa,CAEP,CACR,CAAC,CAAA;AAExB;;;;"}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import './Single.styles_1r9f1e0.css';
|
2
|
-
import { styled } from '@linaria/react';
|
3
|
-
|
4
|
-
var LabelWrapper = /*#__PURE__*/styled('div')({
|
5
|
-
name: "LabelWrapper",
|
6
|
-
"class": "l1p4kc08",
|
7
|
-
propsAsIs: false
|
8
|
-
});
|
9
|
-
var LabelContentLeft = /*#__PURE__*/styled('div')({
|
10
|
-
name: "LabelContentLeft",
|
11
|
-
"class": "ly2gexi",
|
12
|
-
propsAsIs: false
|
13
|
-
});
|
14
|
-
var Label = /*#__PURE__*/styled('label')({
|
15
|
-
name: "Label",
|
16
|
-
"class": "lozb535",
|
17
|
-
propsAsIs: false
|
18
|
-
});
|
19
|
-
var StyledRangeValue = /*#__PURE__*/styled('span')({
|
20
|
-
name: "StyledRangeValue",
|
21
|
-
"class": "s1w9icbd",
|
22
|
-
propsAsIs: false
|
23
|
-
});
|
24
|
-
var SliderBaseWrapper = /*#__PURE__*/styled('div')({
|
25
|
-
name: "SliderBaseWrapper",
|
26
|
-
"class": "s1d2sfgl",
|
27
|
-
propsAsIs: false
|
28
|
-
});
|
29
|
-
var SingleWrapper = /*#__PURE__*/styled('div')({
|
30
|
-
name: "SingleWrapper",
|
31
|
-
"class": "ss3ujqx",
|
32
|
-
propsAsIs: false
|
33
|
-
});
|
34
|
-
|
35
|
-
export { Label, LabelContentLeft, LabelWrapper, SingleWrapper, SliderBaseWrapper, StyledRangeValue };
|
36
|
-
//# sourceMappingURL=Single.styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Single.styles.js","sources":["../../../../../src/components/Slider/components/Single/Single.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from '../../Slider.tokens';\n\nexport const LabelWrapper = styled.div`\n color: var(${tokens.labelColor});\n\n display: flex;\n gap: var(${tokens.labelWrapperGap});\n`;\n\nexport const LabelContentLeft = styled.div``;\n\nexport const Label = styled.label`\n font-family: var(${tokens.labelFontFamily});\n font-size: var(${tokens.labelFontSize});\n font-style: var(${tokens.labelFontStyle});\n font-weight: var(${tokens.labelFontWeight});\n letter-spacing: var(${tokens.labelLetterSpacing});\n line-height: var(${tokens.labelLineHeight});\n`;\n\nexport const StyledRangeValue = styled.span`\n color: var(${tokens.rangeValueColor});\n font-family: var(${tokens.rangeValueFontFamily});\n font-size: var(${tokens.rangeValueFontSize});\n font-style: var(${tokens.rangeValueFontStyle});\n font-weight: var(${tokens.rangeValueFontWeight});\n letter-spacing: var(${tokens.rangeValueLetterSpacing});\n line-height: var(${tokens.rangeValueLineHeight});\n\n transition: opacity 0.1s ease-in-out;\n\n &.${classes.hideMinValue}, &.${classes.hideMaxValue} {\n opacity: 0;\n }\n\n &.${classes.activeRangeValue} {\n color: var(${tokens.labelColor});\n }\n`;\n\nexport const SliderBaseWrapper = styled.div`\n position: relative;\n display: flex;\n flex: 1;\n\n &.${classes.rangeValuesPlacementOuter} {\n ${StyledRangeValue} {\n position: absolute;\n bottom: var(${tokens.rangeValueBottomOffset});\n left: 0;\n\n &.${classes.maxRangeValue} {\n left: unset;\n right: 0;\n }\n }\n }\n\n &.${classes.rangeValuesPlacementInner} {\n align-items: center;\n\n ${StyledRangeValue} {\n margin-right: var(${tokens.rangeMinValueMargin});\n\n &.${classes.maxRangeValue} {\n margin-right: 0;\n margin-left: var(${tokens.rangeMaxValueMargin});\n }\n }\n }\n`;\n\nexport const SingleWrapper = styled.div`\n display: flex;\n opacity: var(${tokens.disabledOpacity});\n\n &.${classes.labelPlacementOuter} {\n flex-direction: column;\n\n ${LabelWrapper} {\n margin-bottom: var(${tokens.labelWrapperMarginBottom});\n }\n }\n\n &.${classes.labelPlacementInner} {\n ${LabelWrapper} {\n margin-right: var(${tokens.labelWrapperMarginRight});\n }\n }\n`;\n"],"names":["LabelWrapper","styled","name","class","propsAsIs","LabelContentLeft","Label","StyledRangeValue","SliderBaseWrapper","SingleWrapper"],"mappings":";;AAIO,IAAMA,YAAY,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKjC,EAAA;AAEM,IAAMC,gBAAgB,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAErC,IAAME,KAAK,gBAAGL,MAAM,CAAA,OAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,OAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAO1B,EAAA;AAEM,IAAMG,gBAAgB,gBAAGN,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAkBrC,EAAA;AAEM,IAAMI,iBAAiB,gBAAGP,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,mBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA8BtC,EAAA;AAEM,IAAMK,aAAa,gBAAGR,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAiBlC;;;;"}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
.l1p4kc08{color:var(--plasma-slider-label-color);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-slider-label-wrapper-gap);}
|
2
|
-
|
3
|
-
.lozb535{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);}
|
4
|
-
.s1w9icbd{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;}.s1w9icbd.slider-hide-min-value,.s1w9icbd.slider-hide-max-value{opacity:0;}.s1w9icbd.slider-active-range-value{color:var(--plasma-slider-label-color);}
|
5
|
-
.s1d2sfgl{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;}.s1d2sfgl.slider-range-values-placement-outer .s1w9icbd{position:absolute;bottom:var(--plasma-slider-range-value-bottom-offset);left:0;}.s1d2sfgl.slider-range-values-placement-outer .s1w9icbd.slider-max-range-value{left:unset;right:0;}.s1d2sfgl.slider-range-values-placement-inner{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.s1d2sfgl.slider-range-values-placement-inner .s1w9icbd{margin-right:var(--plasma-slider-range-min-value-margin);}.s1d2sfgl.slider-range-values-placement-inner .s1w9icbd.slider-max-range-value{margin-right:0;margin-left:var(--plasma-slider-range-max-value-margin);}
|
6
|
-
.ss3ujqx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;opacity:var(--plasma-slider-disabled-opacity);}.ss3ujqx.slider-label-placement-outer{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.ss3ujqx.slider-label-placement-outer .l1p4kc08{margin-bottom:var(--plasma-slider-label-wrapper-margin-bottom);}.ss3ujqx.slider-label-placement-inner .l1p4kc08{margin-right:var(--plasma-slider-label-wrapper-margin-right);}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
.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);}
|
2
|
-
.SliderBase_styles_7is2ll_rnaoqfb__0c0959e2{height:100%;}
|
3
|
-
.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%);}
|
4
|
-
.SliderBase_styles_7is2ll_fdg7yhg__0c0959e2{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
|
@@ -1,78 +0,0 @@
|
|
1
|
-
import React, { useRef, useEffect } from 'react';
|
2
|
-
import { useIsomorphicLayoutEffect } from '../../../../hooks/useIsomorphicLayoutEffect.js';
|
3
|
-
import { Slider, RailWrap, Rail, Fill } from './SliderBase.styles.js';
|
4
|
-
|
5
|
-
var SliderBase = function SliderBase(_ref) {
|
6
|
-
var max = _ref.max,
|
7
|
-
min = _ref.min,
|
8
|
-
setStepSize = _ref.setStepSize,
|
9
|
-
railFillWidth = _ref.railFillWidth,
|
10
|
-
children = _ref.children,
|
11
|
-
_ref$railFillXPositio = _ref.railFillXPosition,
|
12
|
-
railFillXPosition = _ref$railFillXPositio === void 0 ? 0 : _ref$railFillXPositio,
|
13
|
-
disabled = _ref.disabled,
|
14
|
-
labelPlacement = _ref.labelPlacement,
|
15
|
-
rangeValuesPlacement = _ref.rangeValuesPlacement,
|
16
|
-
onChange = _ref.onChange,
|
17
|
-
_ref$settings = _ref.settings,
|
18
|
-
settings = _ref$settings === void 0 ? {} : _ref$settings;
|
19
|
-
var _settings$indent = settings.indent,
|
20
|
-
indent = _settings$indent === void 0 ? 0.75 : _settings$indent,
|
21
|
-
_settings$fontSizeMul = settings.fontSizeMultiplier,
|
22
|
-
fontSizeMultiplier = _settings$fontSizeMul === void 0 ? 16 : _settings$fontSizeMul;
|
23
|
-
var ref = useRef(null);
|
24
|
-
var gap = indent * fontSizeMultiplier * 2;
|
25
|
-
useEffect(function () {
|
26
|
-
var resizeHandler = function resizeHandler() {
|
27
|
-
if (ref.current) {
|
28
|
-
var railSize = ref.current.offsetWidth - gap;
|
29
|
-
var totalSteps = max - min;
|
30
|
-
setStepSize(railSize / totalSteps);
|
31
|
-
}
|
32
|
-
};
|
33
|
-
resizeHandler();
|
34
|
-
}, [labelPlacement, rangeValuesPlacement, ref.current]);
|
35
|
-
var onHandleChange = function onHandleChange(e) {
|
36
|
-
if (!onChange || disabled) {
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
var _e$currentTarget$getB = e.currentTarget.getBoundingClientRect(),
|
40
|
-
x = _e$currentTarget$getB.x,
|
41
|
-
width = _e$currentTarget$getB.width;
|
42
|
-
var lastX = e.clientX - x;
|
43
|
-
var position = min + lastX / (width - gap) * (max - min);
|
44
|
-
var result = Math.max(min, Math.min(max, position));
|
45
|
-
onChange(result, {
|
46
|
-
lastX: lastX
|
47
|
-
});
|
48
|
-
};
|
49
|
-
useIsomorphicLayoutEffect(function () {
|
50
|
-
var resizeHandler = function resizeHandler() {
|
51
|
-
if (ref.current) {
|
52
|
-
var railSize = ref.current.offsetWidth - gap;
|
53
|
-
var totalSteps = max - min;
|
54
|
-
setStepSize(railSize / totalSteps);
|
55
|
-
}
|
56
|
-
};
|
57
|
-
resizeHandler();
|
58
|
-
window.addEventListener('resize', resizeHandler);
|
59
|
-
return function () {
|
60
|
-
return window.removeEventListener('resize', resizeHandler);
|
61
|
-
};
|
62
|
-
}, [min, max, setStepSize, ref.current, gap, labelPlacement, rangeValuesPlacement]);
|
63
|
-
var fillStyle = {
|
64
|
-
left: "".concat(railFillXPosition, "px"),
|
65
|
-
width: "".concat(railFillWidth, "px")
|
66
|
-
};
|
67
|
-
return /*#__PURE__*/React.createElement(Slider, {
|
68
|
-
ref: ref
|
69
|
-
}, /*#__PURE__*/React.createElement(RailWrap, {
|
70
|
-
"aria-hidden": "true",
|
71
|
-
onMouseDown: onHandleChange
|
72
|
-
}, /*#__PURE__*/React.createElement(Rail, null, /*#__PURE__*/React.createElement(Fill, {
|
73
|
-
style: fillStyle
|
74
|
-
}))), children);
|
75
|
-
};
|
76
|
-
|
77
|
-
export { SliderBase };
|
78
|
-
//# sourceMappingURL=SliderBase.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SliderBase.js","sources":["../../../../../src/components/Slider/components/SliderBase/SliderBase.tsx"],"sourcesContent":["import React, { PropsWithChildren, useRef, MouseEventHandler, useEffect } from 'react';\nimport { DraggableData } from 'react-draggable';\n\nimport { useIsomorphicLayoutEffect } from '../../../../hooks';\n\nimport type { SliderViewProps } from './SliderBase.types';\nimport { Fill, Rail, RailWrap, Slider } from './SliderBase.styles';\n\nexport const SliderBase: React.FC<PropsWithChildren<SliderViewProps>> = ({\n max,\n min,\n setStepSize,\n railFillWidth,\n children,\n railFillXPosition = 0,\n disabled,\n labelPlacement,\n rangeValuesPlacement,\n onChange,\n settings = {},\n}) => {\n const { indent = 0.75, fontSizeMultiplier = 16 } = settings;\n\n const ref = useRef<HTMLDivElement | null>(null);\n const gap = indent * fontSizeMultiplier * 2;\n\n useEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = ref.current.offsetWidth - gap;\n const totalSteps = max - min;\n\n setStepSize(railSize / totalSteps);\n }\n };\n\n resizeHandler();\n }, [labelPlacement, rangeValuesPlacement, ref.current]);\n\n const onHandleChange: MouseEventHandler<HTMLDivElement> = (e) => {\n if (!onChange || disabled) {\n return;\n }\n\n const { x, width } = e.currentTarget.getBoundingClientRect();\n\n const lastX = e.clientX - x;\n\n const position = min + (lastX / (width - gap)) * (max - min);\n const result = Math.max(min, Math.min(max, position));\n\n onChange(result, { lastX } as DraggableData);\n };\n\n useIsomorphicLayoutEffect(() => {\n const resizeHandler = () => {\n if (ref.current) {\n const railSize = ref.current.offsetWidth - gap;\n const totalSteps = max - min;\n\n setStepSize(railSize / totalSteps);\n }\n };\n\n resizeHandler();\n window.addEventListener('resize', resizeHandler);\n\n return () => window.removeEventListener('resize', resizeHandler);\n }, [min, max, setStepSize, ref.current, gap, labelPlacement, rangeValuesPlacement]);\n\n const fillStyle = { left: `${railFillXPosition}px`, width: `${railFillWidth}px` };\n\n return (\n <Slider ref={ref}>\n <RailWrap aria-hidden=\"true\" onMouseDown={onHandleChange}>\n <Rail>\n <Fill style={fillStyle} />\n </Rail>\n </RailWrap>\n\n {children}\n </Slider>\n );\n};\n"],"names":["SliderBase","_ref","max","min","setStepSize","railFillWidth","children","_ref$railFillXPositio","railFillXPosition","disabled","labelPlacement","rangeValuesPlacement","onChange","_ref$settings","settings","_settings$indent","indent","_settings$fontSizeMul","fontSizeMultiplier","ref","useRef","gap","useEffect","resizeHandler","current","railSize","offsetWidth","totalSteps","onHandleChange","e","_e$currentTarget$getB","currentTarget","getBoundingClientRect","x","width","lastX","clientX","position","result","Math","useIsomorphicLayoutEffect","window","addEventListener","removeEventListener","fillStyle","left","concat","React","createElement","Slider","RailWrap","onMouseDown","Rail","Fill","style"],"mappings":";;;;IAQaA,UAAwD,GAAG,SAA3DA,UAAwDA,CAAAC,IAAA,EAY/D;AAAA,EAAA,IAXFC,GAAG,GAAAD,IAAA,CAAHC,GAAG;IACHC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IACHC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,qBAAA,GAAAN,IAAA,CACRO,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,qBAAA;IACrBE,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,cAAc,GAAAT,IAAA,CAAdS,cAAc;IACdC,oBAAoB,GAAAV,IAAA,CAApBU,oBAAoB;IACpBC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IAAAC,aAAA,GAAAZ,IAAA,CACRa,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,aAAA,CAAA;AAEb,EAAA,IAAAE,gBAAA,GAAmDD,QAAQ,CAAnDE,MAAM;AAANA,IAAAA,MAAM,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;IAAAE,qBAAA,GAA8BH,QAAQ,CAApCI,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,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aAAA,EAAY,MAAM;AAACC,IAAAA,WAAW,EAAEvB,cAAAA;GACtCmB,eAAAA,KAAA,CAAAC,aAAA,CAACI,IAAI,qBACDL,KAAA,CAAAC,aAAA,CAACK,IAAI,EAAA;AAACC,IAAAA,KAAK,EAAEV,SAAAA;AAAU,GAAE,CACvB,CACA,CAAC,EAEVtC,QACG,CAAC,CAAA;AAEjB;;;;"}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import './SliderBase.styles_7is2ll.css';
|
2
|
-
import { styled } from '@linaria/react';
|
3
|
-
|
4
|
-
var Slider = /*#__PURE__*/styled('div')({
|
5
|
-
name: "Slider",
|
6
|
-
"class": "s33crq1",
|
7
|
-
propsAsIs: false
|
8
|
-
});
|
9
|
-
var RailWrap = /*#__PURE__*/styled('div')({
|
10
|
-
name: "RailWrap",
|
11
|
-
"class": "rnaoqfb",
|
12
|
-
propsAsIs: false
|
13
|
-
});
|
14
|
-
var Rail = /*#__PURE__*/styled('div')({
|
15
|
-
name: "Rail",
|
16
|
-
"class": "r1bro5xo",
|
17
|
-
propsAsIs: false
|
18
|
-
});
|
19
|
-
var Fill = /*#__PURE__*/styled('div')({
|
20
|
-
name: "Fill",
|
21
|
-
"class": "fdg7yhg",
|
22
|
-
propsAsIs: false
|
23
|
-
});
|
24
|
-
|
25
|
-
export { Fill, Rail, RailWrap, Slider };
|
26
|
-
//# sourceMappingURL=SliderBase.styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SliderBase.styles.js","sources":["../../../../../src/components/Slider/components/SliderBase/SliderBase.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Slider.tokens';\n\nexport const Slider = styled.div`\n flex: 1;\n position: relative;\n user-select: none;\n height: var(${tokens.height});\n`;\n\nexport const RailWrap = styled.div`\n height: 100%;\n`;\n\nexport const Rail = styled.div`\n position: relative;\n top: 50%;\n\n height: var(${tokens.railHeight});\n\n border-radius: var(${tokens.railBorderRadius});\n background-color: var(${tokens.railBackgroundColor});\n\n overflow: hidden;\n transform: translateY(-50%);\n`;\n\nexport const Fill = styled.div`\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n background: var(${tokens.fillColor});\n width: 0;\n`;\n"],"names":["Slider","styled","name","class","propsAsIs","RailWrap","Rail","Fill"],"mappings":";;AAIO,IAAMA,MAAM,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,QAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK3B,EAAA;AAEM,IAAMC,QAAQ,gBAAGJ,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,UAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAE7B,EAAA;AAEM,IAAME,IAAI,gBAAGL,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,MAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAWzB,EAAA;AAEM,IAAMG,IAAI,gBAAGN,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,MAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAOzB;;;;"}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
.s33crq1{-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);}
|
2
|
-
.rnaoqfb{height:100%;}
|
3
|
-
.r1bro5xo{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%);}
|
4
|
-
.fdg7yhg{position:absolute;height:100%;top:0;left:0;background:var(--plasma-slider-fill-color);width:0;}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
.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);}
|
2
|
-
|
3
|
-
.Handler_styles_8crx5z_h1tnrnip__2d4342c7{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
|
4
|
-
.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);}
|
@@ -1,163 +0,0 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
|
-
import React, { forwardRef, useRef } from 'react';
|
3
|
-
import Draggable from 'react-draggable';
|
4
|
-
import { getOffsets, getSliderThumbValue } from '../../utils/index.js';
|
5
|
-
import { Thumb } from '../Thumb/Thumb.js';
|
6
|
-
import { HandlerStyled, StyledValue } from './Handler.styles.js';
|
7
|
-
|
8
|
-
var _excluded = ["stepSize", "onChangeCommitted", "onChange", "xPosition", "min", "max", "bounds", "zIndex", "disabled", "side", "showCurrentValue", "startOffset", "endOffset", "value"];
|
9
|
-
|
10
|
-
// TODO: PLASMA-1707
|
11
|
-
|
12
|
-
var KeyboardSupport = {
|
13
|
-
PageUp: 33,
|
14
|
-
PageDown: 34,
|
15
|
-
End: 35,
|
16
|
-
Home: 36,
|
17
|
-
ArrowLeft: 37,
|
18
|
-
ArrowUp: 38,
|
19
|
-
ArrowRight: 39,
|
20
|
-
ArrowDown: 40
|
21
|
-
};
|
22
|
-
var Handler = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
23
|
-
var stepSize = _ref.stepSize,
|
24
|
-
onChangeCommitted = _ref.onChangeCommitted,
|
25
|
-
onChange = _ref.onChange,
|
26
|
-
_ref$xPosition = _ref.xPosition,
|
27
|
-
xPosition = _ref$xPosition === void 0 ? 0 : _ref$xPosition,
|
28
|
-
min = _ref.min,
|
29
|
-
max = _ref.max,
|
30
|
-
_ref$bounds = _ref.bounds,
|
31
|
-
bounds = _ref$bounds === void 0 ? [] : _ref$bounds,
|
32
|
-
zIndex = _ref.zIndex,
|
33
|
-
disabled = _ref.disabled,
|
34
|
-
side = _ref.side,
|
35
|
-
_ref$showCurrentValue = _ref.showCurrentValue,
|
36
|
-
showCurrentValue = _ref$showCurrentValue === void 0 ? false : _ref$showCurrentValue,
|
37
|
-
_ref$startOffset = _ref.startOffset,
|
38
|
-
startOffset = _ref$startOffset === void 0 ? 0 : _ref$startOffset,
|
39
|
-
_ref$endOffset = _ref.endOffset,
|
40
|
-
endOffset = _ref$endOffset === void 0 ? 0 : _ref$endOffset,
|
41
|
-
value = _ref.value,
|
42
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
43
|
-
var lastOnChangeValue = useRef();
|
44
|
-
var _getOffsets = getOffsets(ref, side),
|
45
|
-
_getOffsets2 = _slicedToArray(_getOffsets, 2),
|
46
|
-
offsetLeft = _getOffsets2[0],
|
47
|
-
offsetRight = _getOffsets2[1];
|
48
|
-
var _bounds = _slicedToArray(bounds, 2),
|
49
|
-
leftValueBound = _bounds[0],
|
50
|
-
rightValueBound = _bounds[1];
|
51
|
-
var leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;
|
52
|
-
var rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;
|
53
|
-
var position = typeof xPosition === 'number' ? {
|
54
|
-
x: xPosition,
|
55
|
-
y: 0
|
56
|
-
} : undefined;
|
57
|
-
var tabIndex = disabled ? -1 : 0;
|
58
|
-
var computedBounds = {
|
59
|
-
left: (leftPositionBound !== null && leftPositionBound !== void 0 ? leftPositionBound : 0) + offsetLeft,
|
60
|
-
right: (rightPositionBound !== null && rightPositionBound !== void 0 ? rightPositionBound : stepSize * (max - min)) - offsetRight
|
61
|
-
};
|
62
|
-
var showCurrentValueCondition = showCurrentValue && (xPosition >= startOffset && xPosition <= max * stepSize - endOffset || xPosition === 0 && value !== 0);
|
63
|
-
var onDrag = function onDrag(_, data) {
|
64
|
-
var newValue = getSliderThumbValue(data.x, stepSize, min, max);
|
65
|
-
if (lastOnChangeValue.current !== newValue) {
|
66
|
-
onChange === null || onChange === void 0 || onChange(newValue, data);
|
67
|
-
lastOnChangeValue.current = newValue;
|
68
|
-
}
|
69
|
-
};
|
70
|
-
var onStop = function onStop(_, data) {
|
71
|
-
var newValue = getSliderThumbValue(data.x, stepSize, min, max);
|
72
|
-
onChangeCommitted && onChangeCommitted(newValue, data);
|
73
|
-
};
|
74
|
-
var onKeyPress = function onKeyPress(event) {
|
75
|
-
event.persist();
|
76
|
-
var keyCode = event.keyCode,
|
77
|
-
target = event.target;
|
78
|
-
if (!Object.values(KeyboardSupport).includes(keyCode)) {
|
79
|
-
return;
|
80
|
-
}
|
81
|
-
var ArrowUp = KeyboardSupport.ArrowUp,
|
82
|
-
ArrowRight = KeyboardSupport.ArrowRight,
|
83
|
-
ArrowDown = KeyboardSupport.ArrowDown,
|
84
|
-
ArrowLeft = KeyboardSupport.ArrowLeft,
|
85
|
-
Home = KeyboardSupport.Home,
|
86
|
-
End = KeyboardSupport.End,
|
87
|
-
PageDown = KeyboardSupport.PageDown,
|
88
|
-
PageUp = KeyboardSupport.PageUp;
|
89
|
-
var computedMultipleSteps = stepSize * (rest.multipleStepSize / 100 * max);
|
90
|
-
var data = {
|
91
|
-
x: 0,
|
92
|
-
deltaX: stepSize,
|
93
|
-
lastX: xPosition,
|
94
|
-
y: 0,
|
95
|
-
deltaY: 0,
|
96
|
-
lastY: 0,
|
97
|
-
node: target
|
98
|
-
};
|
99
|
-
switch (keyCode) {
|
100
|
-
case ArrowUp:
|
101
|
-
case ArrowRight:
|
102
|
-
data.x = xPosition + stepSize;
|
103
|
-
break;
|
104
|
-
case ArrowDown:
|
105
|
-
case ArrowLeft:
|
106
|
-
data.x = xPosition - stepSize;
|
107
|
-
data.deltaX = -stepSize;
|
108
|
-
break;
|
109
|
-
case PageUp:
|
110
|
-
data.x = xPosition + computedMultipleSteps;
|
111
|
-
data.deltaX = computedMultipleSteps;
|
112
|
-
break;
|
113
|
-
case PageDown:
|
114
|
-
data.x = xPosition - computedMultipleSteps;
|
115
|
-
data.deltaX = -computedMultipleSteps;
|
116
|
-
break;
|
117
|
-
case End:
|
118
|
-
data.x = max * stepSize;
|
119
|
-
break;
|
120
|
-
case Home:
|
121
|
-
data.x = 0;
|
122
|
-
break;
|
123
|
-
default:
|
124
|
-
data.x = 0;
|
125
|
-
}
|
126
|
-
var left = computedBounds.left,
|
127
|
-
right = computedBounds.right;
|
128
|
-
|
129
|
-
/*
|
130
|
-
* INFO: Находим значение в диапазоне между указанными левой и правой границами.
|
131
|
-
* Необходимо для правильного расчета положения SliderThumb.
|
132
|
-
* см. функция clamp
|
133
|
-
*/
|
134
|
-
var boundedValue = Math.max(Math.min(right, data.x), left);
|
135
|
-
var computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);
|
136
|
-
lastOnChangeValue.current = computedValue;
|
137
|
-
onChangeCommitted && onChangeCommitted(computedValue, data);
|
138
|
-
};
|
139
|
-
return /*#__PURE__*/React.createElement(Draggable, {
|
140
|
-
axis: "x",
|
141
|
-
bounds: computedBounds,
|
142
|
-
grid: [stepSize, 1],
|
143
|
-
onStop: onStop,
|
144
|
-
onDrag: onDrag,
|
145
|
-
position: position,
|
146
|
-
disabled: disabled
|
147
|
-
}, /*#__PURE__*/React.createElement(HandlerStyled, {
|
148
|
-
ref: ref,
|
149
|
-
style: {
|
150
|
-
zIndex: zIndex
|
151
|
-
},
|
152
|
-
onKeyDown: onKeyPress
|
153
|
-
}, /*#__PURE__*/React.createElement(Thumb, _extends({
|
154
|
-
tabIndex: tabIndex,
|
155
|
-
min: min,
|
156
|
-
max: max,
|
157
|
-
value: value,
|
158
|
-
disabled: disabled
|
159
|
-
}, rest)), showCurrentValueCondition && /*#__PURE__*/React.createElement(StyledValue, null, value)));
|
160
|
-
});
|
161
|
-
|
162
|
-
export { Handler };
|
163
|
-
//# sourceMappingURL=Handler.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Handler.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.tsx"],"sourcesContent":["import React, { useRef, forwardRef, KeyboardEvent } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport type { DraggableData } from 'react-draggable';\n\nimport { getSliderThumbValue, getOffsets } from '../../utils';\nimport { Thumb } from '../Thumb/Thumb';\n\nimport type { HandlerProps } from './Handler.types';\nimport { HandlerStyled, StyledValue } from './Handler.styles';\n\n// TODO: PLASMA-1707\ndeclare module 'react-draggable' {\n export interface DraggableProps {\n children: React.ReactNode;\n }\n}\n\nconst KeyboardSupport = {\n PageUp: 33,\n PageDown: 34,\n End: 35,\n Home: 36,\n ArrowLeft: 37,\n ArrowUp: 38,\n ArrowRight: 39,\n ArrowDown: 40,\n};\n\nexport const Handler = forwardRef<HTMLDivElement, HandlerProps>(\n (\n {\n stepSize,\n onChangeCommitted,\n onChange,\n xPosition = 0,\n min,\n max,\n bounds = [],\n zIndex,\n disabled,\n side,\n showCurrentValue = false,\n startOffset = 0,\n endOffset = 0,\n value,\n ...rest\n },\n ref,\n ) => {\n const lastOnChangeValue = useRef<number>();\n\n const [offsetLeft, offsetRight] = getOffsets(ref, side);\n\n const [leftValueBound, rightValueBound] = bounds;\n const leftPositionBound = leftValueBound ? (leftValueBound - min) * stepSize : null;\n const rightPositionBound = rightValueBound ? (rightValueBound - min) * stepSize : null;\n\n const position = typeof xPosition === 'number' ? { x: xPosition, y: 0 } : undefined;\n const tabIndex = disabled ? -1 : 0;\n\n const computedBounds = {\n left: (leftPositionBound ?? 0) + offsetLeft,\n right: (rightPositionBound ?? stepSize * (max - min)) - offsetRight,\n };\n\n const showCurrentValueCondition =\n showCurrentValue &&\n ((xPosition >= startOffset && xPosition <= max * stepSize - endOffset) || (xPosition === 0 && value !== 0));\n\n const onDrag: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n if (lastOnChangeValue.current !== newValue) {\n onChange?.(newValue, data);\n lastOnChangeValue.current = newValue;\n }\n };\n\n const onStop: DraggableEventHandler = (_, data) => {\n const newValue = getSliderThumbValue(data.x, stepSize, min, max);\n onChangeCommitted && onChangeCommitted(newValue, data);\n };\n\n const onKeyPress = (event: KeyboardEvent<HTMLDivElement>) => {\n event.persist();\n\n const { keyCode, target } = event;\n\n if (!Object.values(KeyboardSupport).includes(keyCode)) {\n return;\n }\n\n const { ArrowUp, ArrowRight, ArrowDown, ArrowLeft, Home, End, PageDown, PageUp } = KeyboardSupport;\n\n const computedMultipleSteps = stepSize * ((rest.multipleStepSize / 100) * max);\n\n const data: DraggableData = {\n x: 0,\n deltaX: stepSize,\n lastX: xPosition,\n y: 0,\n deltaY: 0,\n lastY: 0,\n node: target as HTMLDivElement,\n };\n\n switch (keyCode) {\n case ArrowUp:\n case ArrowRight:\n data.x = xPosition + stepSize;\n break;\n case ArrowDown:\n case ArrowLeft:\n data.x = xPosition - stepSize;\n data.deltaX = -stepSize;\n break;\n case PageUp:\n data.x = xPosition + computedMultipleSteps;\n data.deltaX = computedMultipleSteps;\n break;\n case PageDown:\n data.x = xPosition - computedMultipleSteps;\n data.deltaX = -computedMultipleSteps;\n break;\n case End:\n data.x = max * stepSize;\n break;\n case Home:\n data.x = 0;\n break;\n default:\n data.x = 0;\n }\n\n const { left, right } = computedBounds;\n\n /*\n * INFO: Находим значение в диапазоне между указанными левой и правой границами.\n * Необходимо для правильного расчета положения SliderThumb.\n * см. функция clamp\n */\n const boundedValue = Math.max(Math.min(right, data.x), left);\n\n const computedValue = getSliderThumbValue(boundedValue, stepSize, min, max);\n lastOnChangeValue.current = computedValue;\n\n onChangeCommitted && onChangeCommitted(computedValue, data);\n };\n\n return (\n <Draggable\n axis=\"x\"\n bounds={computedBounds}\n grid={[stepSize, 1]}\n onStop={onStop}\n onDrag={onDrag}\n position={position}\n disabled={disabled}\n >\n <HandlerStyled ref={ref} style={{ zIndex }} onKeyDown={onKeyPress}>\n <Thumb tabIndex={tabIndex} min={min} max={max} value={value} disabled={disabled} {...rest} />\n {showCurrentValueCondition && <StyledValue>{value}</StyledValue>}\n </HandlerStyled>\n </Draggable>\n );\n },\n);\n"],"names":["KeyboardSupport","PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Handler","forwardRef","_ref","ref","stepSize","onChangeCommitted","onChange","_ref$xPosition","xPosition","min","max","_ref$bounds","bounds","zIndex","disabled","side","_ref$showCurrentValue","showCurrentValue","_ref$startOffset","startOffset","_ref$endOffset","endOffset","value","rest","_objectWithoutProperties","_excluded","lastOnChangeValue","useRef","_getOffsets","getOffsets","_getOffsets2","_slicedToArray","offsetLeft","offsetRight","_bounds","leftValueBound","rightValueBound","leftPositionBound","rightPositionBound","position","x","y","undefined","tabIndex","computedBounds","left","right","showCurrentValueCondition","onDrag","_","data","newValue","getSliderThumbValue","current","onStop","onKeyPress","event","persist","keyCode","target","Object","values","includes","computedMultipleSteps","multipleStepSize","deltaX","lastX","deltaY","lastY","node","boundedValue","Math","computedValue","React","createElement","Draggable","axis","grid","HandlerStyled","style","onKeyDown","Thumb","_extends","StyledValue"],"mappings":";;;;;;;;;AAUA;;AAOA,IAAMA,eAAe,GAAG;AACpBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,QAAQ,EAAE,EAAE;AACZC,EAAAA,GAAG,EAAE,EAAE;AACPC,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,SAAS,EAAE,EAAE;AACbC,EAAAA,OAAO,EAAE,EAAE;AACXC,EAAAA,UAAU,EAAE,EAAE;AACdC,EAAAA,SAAS,EAAE,EAAA;AACf,CAAC,CAAA;AAEM,IAAMC,OAAO,gBAAGC,UAAU,CAC7B,UAAAC,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GAAA,eAEnB2D,KAAA,CAAAC,aAAA,CAACI,aAAa,EAAA;AAAC3E,IAAAA,GAAG,EAAEA,GAAI;AAAC4E,IAAAA,KAAK,EAAE;AAAElE,MAAAA,MAAM,EAANA,MAAAA;KAAS;AAACmE,IAAAA,SAAS,EAAEzB,UAAAA;AAAW,GAAA,eAC9DkB,KAAA,CAAAC,aAAA,CAACO,KAAK,EAAAC,QAAA,CAAA;AAACvC,IAAAA,QAAQ,EAAEA,QAAS;AAAClC,IAAAA,GAAG,EAAEA,GAAI;AAACC,IAAAA,GAAG,EAAEA,GAAI;AAACY,IAAAA,KAAK,EAAEA,KAAM;AAACR,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GAAA,EAAKS,IAAI,CAAG,CAAC,EAC5FwB,yBAAyB,iBAAI0B,KAAA,CAAAC,aAAA,CAACS,WAAW,EAAA,IAAA,EAAE7D,KAAmB,CACpD,CACR,CAAC,CAAA;AAEpB,CACJ;;;;"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import './Handler.styles_8crx5z.css';
|
2
|
-
import { styled } from '@linaria/react';
|
3
|
-
|
4
|
-
var HandlerStyled = /*#__PURE__*/styled('div')({
|
5
|
-
name: "HandlerStyled",
|
6
|
-
"class": "h1tnrnip",
|
7
|
-
propsAsIs: false
|
8
|
-
});
|
9
|
-
var StyledValue = /*#__PURE__*/styled('span')({
|
10
|
-
name: "StyledValue",
|
11
|
-
"class": "s12uu2lj",
|
12
|
-
propsAsIs: false
|
13
|
-
});
|
14
|
-
|
15
|
-
export { HandlerStyled, StyledValue };
|
16
|
-
//# sourceMappingURL=Handler.styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Handler.styles.js","sources":["../../../../../src/components/Slider/ui/Handler/Handler.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { tokens } from '../../Slider.tokens';\n\nexport const HandlerStyled = styled.div`\n cursor: pointer;\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n`;\n\nexport const StyledValue = styled.span`\n position: absolute;\n z-index: 1;\n top: var(${tokens.currentValueTopOffset});\n text-align: center;\n width: 100%;\n margin-left: -0.125rem;\n display: flex;\n justify-content: center;\n font-family: var(${tokens.currentValueFontFamily});\n font-size: var(${tokens.currentValueFontSize});\n font-style: var(${tokens.currentValueFontStyle});\n font-weight: var(${tokens.currentValueFontWeight});\n letter-spacing: var(${tokens.currentValueLetterSpacing});\n line-height: var(${tokens.currentValueLineHeight});\n`;\n"],"names":["HandlerStyled","styled","name","class","propsAsIs","StyledValue"],"mappings":";;AAIO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAMlC,EAAA;AAEM,IAAMC,WAAW,gBAAGJ,MAAM,CAAA,MAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAehC;;;;"}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
.h1tnrnip{cursor:pointer;position:absolute;z-index:1;top:0;left:0;}
|
2
|
-
.s12uu2lj{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);}
|
@@ -1 +0,0 @@
|
|
1
|
-
.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);}
|