@salutejs/plasma-new-hope 0.80.0-canary.1194.9064180211.0 → 0.80.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Checkbox/Checkbox.css +13 -0
- package/cjs/components/Checkbox/Checkbox.js +22 -59
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.styles.js +47 -0
- package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -0
- package/cjs/components/Checkbox/Checkbox.styles_1266095.css +7 -0
- package/cjs/components/Checkbox/Checkbox.tokens.js +41 -0
- package/cjs/components/Checkbox/Checkbox.tokens.js.map +1 -0
- package/cjs/components/Checkbox/IconsSvg.js +9 -9
- package/cjs/components/Checkbox/IconsSvg.js.map +1 -1
- package/cjs/components/Checkbox/{_disabled → variations/_disabled}/base.js +2 -2
- package/cjs/components/Checkbox/variations/_disabled/base.js.map +1 -0
- package/cjs/components/Checkbox/variations/_disabled/base_1krdtt6.css +1 -0
- package/cjs/components/Checkbox/variations/_focused/base.js +14 -0
- package/cjs/components/Checkbox/variations/_focused/base.js.map +1 -0
- package/cjs/components/Checkbox/variations/_focused/base_hr4zpz.css +1 -0
- package/cjs/components/{Radiobox → Checkbox/variations}/_size/base.js +1 -1
- package/cjs/components/Checkbox/variations/_size/base.js.map +1 -0
- package/cjs/components/Checkbox/{_size → variations/_view}/base.js +2 -2
- package/cjs/components/Checkbox/variations/_view/base.js.map +1 -0
- package/cjs/components/Checkbox/variations/_view/base_x252cy.css +1 -0
- package/cjs/components/Combobox/hooks/useFocusController.js +0 -1
- package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/cjs/components/Radiobox/Radiobox.css +16 -0
- package/cjs/components/Radiobox/Radiobox.js +23 -32
- package/cjs/components/Radiobox/Radiobox.js.map +1 -1
- package/cjs/components/Radiobox/Radiobox.styles.js +19 -0
- package/cjs/components/Radiobox/Radiobox.styles.js.map +1 -0
- package/cjs/components/Radiobox/Radiobox.styles_1skfuon.css +2 -0
- package/cjs/components/Radiobox/Radiobox.tokens.js +41 -0
- package/cjs/components/Radiobox/Radiobox.tokens.js.map +1 -0
- package/cjs/components/{Checkbox/_focused → Radiobox/variations/_disabled}/base.js +2 -2
- package/cjs/components/Radiobox/variations/_disabled/base.js.map +1 -0
- package/cjs/components/Radiobox/variations/_disabled/base_6ae9j2.css +1 -0
- package/cjs/components/{Checkbox/_view → Radiobox/variations/_focused}/base.js +2 -2
- package/cjs/components/Radiobox/variations/_focused/base.js.map +1 -0
- package/cjs/components/Radiobox/{_focused/base_1nruwxa.css → variations/_focused/base_1d7o4za.css} +1 -1
- package/cjs/components/{Slider/variations/_disabled → Radiobox/variations/_size}/base.js +1 -1
- package/cjs/components/Radiobox/variations/_size/base.js.map +1 -0
- package/cjs/components/Radiobox/variations/_view/base.js +9 -0
- package/cjs/components/Radiobox/variations/_view/base.js.map +1 -0
- package/cjs/components/Radiobox/{_view/base_wj0ueq.css → variations/_view/base_11n1fn3.css} +1 -1
- package/cjs/components/TextField/TextField.js +3 -12
- package/cjs/components/TextField/TextField.js.map +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 +15 -40
- package/cjs/index.js +4 -14
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/es/components/Checkbox/Checkbox.css +13 -0
- package/es/components/Checkbox/Checkbox.js +12 -43
- package/es/components/Checkbox/Checkbox.js.map +1 -1
- package/es/components/Checkbox/Checkbox.styles.js +37 -0
- package/es/components/Checkbox/Checkbox.styles.js.map +1 -0
- package/es/components/Checkbox/Checkbox.styles_1266095.css +7 -0
- package/es/components/Checkbox/Checkbox.tokens.js +36 -0
- package/es/components/Checkbox/Checkbox.tokens.js.map +1 -0
- package/es/components/Checkbox/IconsSvg.js +9 -9
- package/es/components/Checkbox/IconsSvg.js.map +1 -1
- package/es/components/Checkbox/{_focused → variations/_disabled}/base.js +2 -2
- package/es/components/Checkbox/variations/_disabled/base.js.map +1 -0
- package/es/components/Checkbox/variations/_disabled/base_1krdtt6.css +1 -0
- package/es/components/Checkbox/variations/_focused/base.js +10 -0
- package/es/components/Checkbox/variations/_focused/base.js.map +1 -0
- package/es/components/Checkbox/variations/_focused/base_hr4zpz.css +1 -0
- package/es/components/{Radiobox → Checkbox/variations}/_size/base.js +1 -1
- package/es/components/Checkbox/variations/_size/base.js.map +1 -0
- package/es/components/Checkbox/{_view → variations/_view}/base.js +2 -2
- package/es/components/Checkbox/variations/_view/base.js.map +1 -0
- package/es/components/Checkbox/variations/_view/base_x252cy.css +1 -0
- package/es/components/Combobox/hooks/useFocusController.js +0 -1
- package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
- package/es/components/Radiobox/Radiobox.css +16 -0
- package/es/components/Radiobox/Radiobox.js +12 -21
- package/es/components/Radiobox/Radiobox.js.map +1 -1
- package/es/components/Radiobox/Radiobox.styles.js +14 -0
- package/es/components/Radiobox/Radiobox.styles.js.map +1 -0
- package/es/components/Radiobox/Radiobox.styles_1skfuon.css +2 -0
- package/es/components/Radiobox/Radiobox.tokens.js +36 -0
- package/es/components/Radiobox/Radiobox.tokens.js.map +1 -0
- package/es/components/{Checkbox → Radiobox/variations}/_disabled/base.js +2 -2
- package/es/components/Radiobox/variations/_disabled/base.js.map +1 -0
- package/es/components/Radiobox/variations/_disabled/base_6ae9j2.css +1 -0
- package/es/components/Radiobox/variations/_focused/base.js +5 -0
- package/es/components/Radiobox/variations/_focused/base.js.map +1 -0
- package/es/components/Radiobox/{_focused/base_1nruwxa.css → variations/_focused/base_1d7o4za.css} +1 -1
- package/es/components/{Checkbox → Radiobox/variations}/_size/base.js +1 -1
- package/es/components/Radiobox/variations/_size/base.js.map +1 -0
- package/es/components/Radiobox/variations/_view/base.js +5 -0
- package/es/components/Radiobox/variations/_view/base.js.map +1 -0
- package/es/components/Radiobox/{_view/base_wj0ueq.css → variations/_view/base_11n1fn3.css} +1 -1
- package/es/components/TextField/TextField.js +3 -12
- package/es/components/TextField/TextField.js.map +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 +15 -40
- 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/Checkbox/Checkbox.js +20 -40
- package/styled-components/cjs/components/Checkbox/Checkbox.styles.js +33 -0
- package/styled-components/cjs/components/Checkbox/Checkbox.tokens.js +39 -0
- package/styled-components/cjs/components/Checkbox/IconsSvg.js +9 -9
- package/styled-components/cjs/components/Checkbox/index.js +8 -1
- package/styled-components/cjs/components/Checkbox/variations/_disabled/base.js +10 -0
- package/styled-components/cjs/components/Checkbox/variations/_focused/base.js +32 -0
- package/styled-components/cjs/components/Checkbox/variations/_view/base.js +10 -0
- package/styled-components/cjs/components/Checkbox/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/Radiobox/Radiobox.js +15 -22
- package/styled-components/cjs/components/Radiobox/Radiobox.styles.js +19 -0
- package/styled-components/cjs/components/Radiobox/Radiobox.tokens.js +39 -0
- package/styled-components/cjs/components/Radiobox/index.js +8 -1
- package/styled-components/cjs/components/{Checkbox → Radiobox/variations}/_disabled/base.js +2 -1
- package/styled-components/cjs/components/Radiobox/variations/_focused/base.js +27 -0
- package/styled-components/cjs/components/Radiobox/variations/_view/base.js +9 -0
- 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/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +1 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +13 -12
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +1 -0
- package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.config.js +13 -12
- package/styled-components/cjs/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/cjs/examples/sds_engineer/components/Radiobox/Radiobox.config.js +13 -12
- 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/Checkbox/Checkbox.js +12 -33
- package/styled-components/es/components/Checkbox/Checkbox.styles.js +25 -0
- package/styled-components/es/components/Checkbox/Checkbox.tokens.js +33 -0
- package/styled-components/es/components/Checkbox/IconsSvg.js +9 -9
- package/styled-components/es/components/Checkbox/index.js +2 -1
- package/styled-components/es/components/Checkbox/variations/_disabled/base.js +4 -0
- package/styled-components/es/components/Checkbox/variations/_focused/base.js +27 -0
- package/styled-components/es/components/Checkbox/variations/_view/base.js +4 -0
- package/styled-components/es/components/Checkbox/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/Radiobox/Radiobox.js +13 -22
- package/styled-components/es/components/Radiobox/Radiobox.styles.js +12 -0
- package/styled-components/es/components/Radiobox/Radiobox.tokens.js +33 -0
- package/styled-components/es/components/Radiobox/index.js +2 -1
- package/styled-components/es/components/Radiobox/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/Radiobox/variations/_focused/base.js +21 -0
- package/styled-components/es/components/Radiobox/variations/_view/base.js +3 -0
- 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/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +1 -0
- package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.config.js +13 -12
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +1 -0
- package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.config.js +13 -12
- package/styled-components/es/examples/sds_engineer/components/Checkbox/Checkbox.config.js +14 -14
- package/styled-components/es/examples/sds_engineer/components/Radiobox/Radiobox.config.js +13 -12
- 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/Checkbox/Checkbox.d.ts +4 -37
- package/types/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/types/components/Checkbox/Checkbox.styles.d.ts +9 -0
- package/types/components/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/types/components/Checkbox/Checkbox.tokens.d.ts +34 -0
- package/types/components/Checkbox/Checkbox.tokens.d.ts.map +1 -0
- package/types/components/Checkbox/Checkbox.types.d.ts +29 -0
- package/types/components/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/types/components/Checkbox/IconsSvg.d.ts.map +1 -1
- package/types/components/Checkbox/index.d.ts +2 -1
- package/types/components/Checkbox/index.d.ts.map +1 -1
- package/types/components/Checkbox/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/Checkbox/variations/_focused/base.d.ts +6 -0
- package/types/components/Checkbox/variations/_focused/base.d.ts.map +1 -0
- package/types/components/Checkbox/variations/_size/base.d.ts.map +1 -0
- package/types/components/Checkbox/variations/_view/base.d.ts.map +1 -0
- package/types/components/Radiobox/Radiobox.d.ts +1 -1
- package/types/components/Radiobox/Radiobox.d.ts.map +1 -1
- package/types/components/Radiobox/Radiobox.styles.d.ts +4 -0
- package/types/components/Radiobox/Radiobox.styles.d.ts.map +1 -0
- package/types/components/Radiobox/Radiobox.tokens.d.ts +34 -0
- package/types/components/Radiobox/Radiobox.tokens.d.ts.map +1 -0
- package/types/components/Radiobox/index.d.ts +1 -0
- package/types/components/Radiobox/index.d.ts.map +1 -1
- package/types/components/Radiobox/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/Radiobox/variations/_focused/base.d.ts.map +1 -0
- package/types/components/Radiobox/variations/_size/base.d.ts.map +1 -0
- package/types/components/Radiobox/variations/_view/base.d.ts.map +1 -0
- 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/Checkbox/Checkbox.config.d.ts +0 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/examples/plasma_b2c/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Radiobox/Radiobox.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts +0 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/examples/plasma_web/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Radiobox/Radiobox.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts +0 -1
- package/types/examples/sds_engineer/components/Checkbox/Checkbox.config.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts +1 -1
- package/types/examples/sds_engineer/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Radiobox/Radiobox.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/Checkbox/Checkbox_1q4l832.css +0 -7
- package/cjs/components/Checkbox/_disabled/base.js.map +0 -1
- package/cjs/components/Checkbox/_disabled/base_fyu17z.css +0 -1
- package/cjs/components/Checkbox/_focused/base.js.map +0 -1
- package/cjs/components/Checkbox/_focused/base_po5iiu.css +0 -1
- package/cjs/components/Checkbox/_size/base.js.map +0 -1
- package/cjs/components/Checkbox/_view/base.js.map +0 -1
- package/cjs/components/Checkbox/_view/base_1vqr3f.css +0 -1
- package/cjs/components/Radiobox/Radiobox_1ri2eqv.css +0 -2
- package/cjs/components/Radiobox/_disabled/base.js +0 -9
- package/cjs/components/Radiobox/_disabled/base.js.map +0 -1
- package/cjs/components/Radiobox/_disabled/base_1jca5bk.css +0 -1
- package/cjs/components/Radiobox/_focused/base.js +0 -9
- package/cjs/components/Radiobox/_focused/base.js.map +0 -1
- package/cjs/components/Radiobox/_size/base.js.map +0 -1
- package/cjs/components/Radiobox/_view/base.js +0 -9
- package/cjs/components/Radiobox/_view/base.js.map +0 -1
- package/cjs/components/Slider/Slider.css +0 -69
- package/cjs/components/Slider/Slider.js +0 -53
- 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 -274
- 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 -160
- 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/Handle/Handle.css +0 -4
- package/cjs/components/Slider/ui/Handle/Handle.js +0 -174
- package/cjs/components/Slider/ui/Handle/Handle.js.map +0 -1
- package/cjs/components/Slider/ui/Handle/Handle.styles.js +0 -21
- package/cjs/components/Slider/ui/Handle/Handle.styles.js.map +0 -1
- package/cjs/components/Slider/ui/Handle/Handle.styles_9m0x33.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/_size/base.js +0 -9
- package/cjs/components/Slider/variations/_size/base.js.map +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/Checkbox/Checkbox_1q4l832.css +0 -7
- package/es/components/Checkbox/_disabled/base.js.map +0 -1
- package/es/components/Checkbox/_disabled/base_fyu17z.css +0 -1
- package/es/components/Checkbox/_focused/base.js.map +0 -1
- package/es/components/Checkbox/_focused/base_po5iiu.css +0 -1
- package/es/components/Checkbox/_size/base.js.map +0 -1
- package/es/components/Checkbox/_size/base_x642ct.css +0 -1
- package/es/components/Checkbox/_view/base.js.map +0 -1
- package/es/components/Checkbox/_view/base_1vqr3f.css +0 -1
- package/es/components/Radiobox/Radiobox_1ri2eqv.css +0 -2
- package/es/components/Radiobox/_disabled/base.js +0 -5
- package/es/components/Radiobox/_disabled/base.js.map +0 -1
- package/es/components/Radiobox/_disabled/base_1jca5bk.css +0 -1
- package/es/components/Radiobox/_focused/base.js +0 -5
- package/es/components/Radiobox/_focused/base.js.map +0 -1
- package/es/components/Radiobox/_size/base.js.map +0 -1
- package/es/components/Radiobox/_size/base_x642ct.css +0 -1
- package/es/components/Radiobox/_view/base.js +0 -5
- package/es/components/Radiobox/_view/base.js.map +0 -1
- package/es/components/Slider/Slider.css +0 -69
- package/es/components/Slider/Slider.js +0 -48
- 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 -270
- 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 -156
- 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/Handle/Handle.css +0 -4
- package/es/components/Slider/ui/Handle/Handle.js +0 -170
- package/es/components/Slider/ui/Handle/Handle.js.map +0 -1
- package/es/components/Slider/ui/Handle/Handle.styles.js +0 -16
- package/es/components/Slider/ui/Handle/Handle.styles.js.map +0 -1
- package/es/components/Slider/ui/Handle/Handle.styles_9m0x33.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/Checkbox/_focused/base.js +0 -26
- package/styled-components/cjs/components/Checkbox/_view/base.js +0 -8
- package/styled-components/cjs/components/Checkbox/_view/tokens.json +0 -1
- package/styled-components/cjs/components/Radiobox/_disabled/base.js +0 -8
- package/styled-components/cjs/components/Radiobox/_focused/base.js +0 -26
- package/styled-components/cjs/components/Radiobox/_view/base.js +0 -8
- package/styled-components/cjs/components/Slider/Slider.js +0 -52
- package/styled-components/cjs/components/Slider/Slider.tokens.js +0 -77
- package/styled-components/cjs/components/Slider/components/Double/Double.js +0 -286
- 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 -172
- 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/Handle/Handle.js +0 -183
- package/styled-components/cjs/components/Slider/ui/Handle/Handle.styles.js +0 -15
- package/styled-components/cjs/components/Slider/ui/Handle/Handle.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 -150
- 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 -150
- package/styled-components/cjs/hooks/useIsomorphicLayoutEffect.js +0 -12
- package/styled-components/cjs/utils/canUseDOM.js +0 -11
- package/styled-components/es/components/Checkbox/_disabled/base.js +0 -2
- package/styled-components/es/components/Checkbox/_focused/base.js +0 -20
- package/styled-components/es/components/Checkbox/_view/base.js +0 -2
- package/styled-components/es/components/Checkbox/_view/tokens.json +0 -1
- package/styled-components/es/components/Radiobox/_disabled/base.js +0 -2
- package/styled-components/es/components/Radiobox/_focused/base.js +0 -20
- package/styled-components/es/components/Radiobox/_view/base.js +0 -2
- package/styled-components/es/components/Slider/Slider.js +0 -43
- package/styled-components/es/components/Slider/Slider.tokens.js +0 -71
- package/styled-components/es/components/Slider/components/Double/Double.js +0 -278
- 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 -164
- 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/Handle/Handle.js +0 -174
- package/styled-components/es/components/Slider/ui/Handle/Handle.styles.js +0 -8
- package/styled-components/es/components/Slider/ui/Handle/Handle.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 -150
- 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 -150
- package/styled-components/es/hooks/useIsomorphicLayoutEffect.js +0 -7
- package/styled-components/es/utils/canUseDOM.js +0 -5
- package/types/components/Checkbox/_disabled/base.d.ts.map +0 -1
- package/types/components/Checkbox/_focused/base.d.ts.map +0 -1
- package/types/components/Checkbox/_size/base.d.ts.map +0 -1
- package/types/components/Checkbox/_view/base.d.ts.map +0 -1
- package/types/components/Radiobox/_disabled/base.d.ts.map +0 -1
- package/types/components/Radiobox/_focused/base.d.ts.map +0 -1
- package/types/components/Radiobox/_size/base.d.ts.map +0 -1
- package/types/components/Radiobox/_view/base.d.ts +0 -2
- package/types/components/Radiobox/_view/base.d.ts.map +0 -1
- 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/Handle/Handle.d.ts +0 -9
- package/types/components/Slider/ui/Handle/Handle.d.ts.map +0 -1
- package/types/components/Slider/ui/Handle/Handle.styles.d.ts +0 -4
- package/types/components/Slider/ui/Handle/Handle.styles.d.ts.map +0 -1
- package/types/components/Slider/ui/Handle/Handle.types.d.ts +0 -24
- package/types/components/Slider/ui/Handle/Handle.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
- /package/cjs/components/Checkbox/{_size → variations/_size}/base_x642ct.css +0 -0
- /package/cjs/components/Radiobox/{_size → variations/_size}/base_x642ct.css +0 -0
- /package/{cjs/components/Slider/variations/_disabled → es/components/Checkbox/variations/_size}/base_x642ct.css +0 -0
- /package/{cjs/components/Slider → es/components/Radiobox}/variations/_size/base_x642ct.css +0 -0
- /package/styled-components/cjs/components/{Slider/Slider.types.js → Checkbox/Checkbox.types.js} +0 -0
- /package/styled-components/cjs/components/Checkbox/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/cjs/components/Checkbox/{_focused → variations/_focused}/tokens.json +0 -0
- /package/styled-components/cjs/components/Checkbox/{_size → variations/_size}/base.js +0 -0
- /package/styled-components/cjs/components/Checkbox/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/Radiobox/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/cjs/components/Radiobox/{_focused → variations/_focused}/tokens.json +0 -0
- /package/styled-components/cjs/components/Radiobox/{_size → variations/_size}/base.js +0 -0
- /package/styled-components/cjs/components/Radiobox/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/Radiobox/{_view → variations/_view}/tokens.json +0 -0
- /package/styled-components/es/components/{Slider/Slider.types.js → Checkbox/Checkbox.types.js} +0 -0
- /package/styled-components/es/components/Checkbox/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/es/components/Checkbox/{_focused → variations/_focused}/tokens.json +0 -0
- /package/styled-components/es/components/Checkbox/{_size → variations/_size}/base.js +0 -0
- /package/styled-components/es/components/Checkbox/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/es/components/Radiobox/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/es/components/Radiobox/{_focused → variations/_focused}/tokens.json +0 -0
- /package/styled-components/es/components/Radiobox/{_size → variations/_size}/base.js +0 -0
- /package/styled-components/es/components/Radiobox/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/es/components/Radiobox/{_view → variations/_view}/tokens.json +0 -0
- /package/types/components/Checkbox/{_disabled → variations/_disabled}/base.d.ts +0 -0
- /package/types/components/Checkbox/{_focused → variations/_size}/base.d.ts +0 -0
- /package/types/components/Checkbox/{_size → variations/_view}/base.d.ts +0 -0
- /package/types/components/{Checkbox/_view → Radiobox/variations/_disabled}/base.d.ts +0 -0
- /package/types/components/Radiobox/{_disabled → variations/_focused}/base.d.ts +0 -0
- /package/types/components/Radiobox/{_focused → variations/_size}/base.d.ts +0 -0
- /package/types/components/Radiobox/{_size → variations/_view}/base.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { StyledContentWrapper } from '../../Checkbox.styles';\nimport { tokens } from '../../Checkbox.tokens';\n\nexport const base = css`\n input:disabled + ${StyledContentWrapper} {\n opacity: var(${tokens.disabledOpacity});\n }\n\n input:disabled + ${StyledContentWrapper} {\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAQhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bxbqqc3 input:disabled + .s1u3nd7e{opacity:var(--plasma-checkbox-disabled-opacity);}.bxbqqc3 input:disabled + .s1u3nd7e{cursor:not-allowed;}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import './base_hr4zpz.css';
|
2
|
+
/**
|
3
|
+
* INFO: на 36 строке нет возможности использвать .${classes.checkboxTrigger},
|
4
|
+
* потому что линтер правит селектор и он применяется некорректно
|
5
|
+
*/
|
6
|
+
|
7
|
+
var base = "b1y5wkm1";
|
8
|
+
|
9
|
+
export { base };
|
10
|
+
//# sourceMappingURL=base.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { addFocus } from '../../../../mixins';\nimport { classes, tokens } from '../../Checkbox.tokens';\n\n/**\n * INFO: на 36 строке нет возможности использвать .${classes.checkboxTrigger},\n * потому что линтер правит селектор и он применяется некорректно\n */\n\nexport const base = css`\n .${classes.checkboxTrigger} {\n ${addFocus({\n outlineOffset: '0',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: 'transparent',\n })}\n }\n\n input[data-focus-visible-added] + label .${classes.checkboxTrigger} {\n border-color: transparent;\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.125rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n\n input[data-focus-visible-added]:checked + label .checkbox-trigger,\n input[type='checkbox'][data-focus-visible-added]:indeterminate + label .${classes.checkboxTrigger} {\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.063rem',\n outlineRadius: `calc(var(${tokens.triggerBorderRadius}) + 0.125rem)`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.063rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n`;\n"],"names":["base"],"mappings":"AAKA;AACA;AACA;AACA;;AAEO,IAAMA,IAAI,GAuChB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b1y5wkm1 .checkbox-trigger{position:relative;}.b1y5wkm1 .checkbox-trigger::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 .checkbox-trigger.focus-visible:focus::before,.b1y5wkm1 .checkbox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger{border-color:transparent;position:relative;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger::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:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 input[data-focus-visible-added] + label .checkbox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-checkbox-focus-color);}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger{position:relative;}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger::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.063rem solid transparent;border-radius:calc(var(--plasma-checkbox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.b1y5wkm1 input[data-focus-visible-added]:checked + label .checkbox-trigger::before,.b1y5wkm1 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .checkbox-trigger::before{box-shadow:0 0 0 0.063rem var(--plasma-checkbox-focus-color);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Checkbox/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { StyledContentWrapper, StyledTrigger } from '../../Checkbox.styles';\nimport { tokens } from '../../Checkbox.tokens';\n\nexport const base = css`\n input[type='checkbox']:indeterminate + ${StyledContentWrapper} ${StyledTrigger} {\n border: none;\n background: var(${tokens.fillColor});\n border-color: var(${tokens.fillColor});\n }\n\n input:checked + ${StyledContentWrapper} ${StyledTrigger} {\n border: none;\n background: var(${tokens.fillColor});\n border-color: var(${tokens.fillColor});\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAYhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.b17hdes8 input[type='checkbox']:indeterminate + .s1u3nd7e .sft3zxv{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}.b17hdes8 input:checked + .s1u3nd7e .sft3zxv{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { useEffect } from 'react';
|
2
2
|
import { usePreviousValue } from '../../../hooks/usePreviousValue.js';
|
3
3
|
import { useDidMountEffect } from '../../../hooks/useDidMountEffect.js';
|
4
|
-
import '../../../utils/react.js';
|
5
4
|
|
6
5
|
var useFocusController = function useFocusController(_ref) {
|
7
6
|
var _ref$controlledRefs = _ref.controlledRefs,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFocusController.js","sources":["../../../../src/components/Combobox/hooks/useFocusController.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useDidMountEffect, usePreviousValue } from '../../../hooks';\nimport type { UseFocusControllerProps } from '../Combobox.types';\n\nexport const useFocusController = ({\n controlledRefs: { contentRef, inputHelperRef, inputRef },\n opened,\n hasValue,\n textContent,\n search,\n values,\n readOnly,\n valueType,\n closedWithoutChanges,\n updateSearch,\n updateFocused,\n onChipClick,\n}: UseFocusControllerProps) => {\n const prevSearch = usePreviousValue(search);\n const prevValues = usePreviousValue(values);\n const prevOpened = usePreviousValue(opened);\n\n useDidMountEffect(() => {\n if (!opened) {\n updateFocused(false);\n contentRef.current?.scrollTo({ left: 0 });\n }\n\n const hasFocusAfterClose = prevOpened !== undefined && !opened && !closedWithoutChanges?.current;\n\n if (opened || hasFocusAfterClose) {\n inputRef.current?.focus();\n }\n\n // INFO: Помогает определить, произошло ли закрытие выпадающего меню при выборе значения.\n // Нужно для того, чтобы не фокусироваться на инпуте\n // ОЧЕНЬ не нравится это решение, но оно работает\n if (closedWithoutChanges?.current === false) {\n closedWithoutChanges.current = true;\n }\n }, [opened]);\n\n useDidMountEffect(() => {\n const prevValuesCount = prevValues?.length || 0;\n const valuesCount = values?.length || 0;\n\n if ((opened || prevOpened) && prevValuesCount < valuesCount) {\n inputRef.current?.focus();\n }\n }, [values, readOnly]);\n\n useDidMountEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n // INFO: Для multiple\n if (search === '') {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для single\n if (!opened && prevSearch !== search) {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для кейсов, когда значение вырезано\n if (!inputRef.current.value.length) {\n inputRef.current.style.flex = '1';\n return;\n }\n\n if (valueType === 'multiple' && inputHelperRef.current) {\n const { clientWidth } = inputHelperRef.current;\n inputRef.current.style.flex = `1 0 ${clientWidth}px`;\n }\n }, [readOnly, search, valueType]);\n\n useEffect(() => {\n const newSearch = hasValue ? textContent : '';\n\n // INFO: Заполнить поле input при первой инициализации\n if (prevOpened !== undefined && opened) {\n return;\n }\n\n if (valueType === 'single') {\n updateSearch?.(newSearch, false);\n }\n\n if (valueType === 'multiple') {\n updateSearch?.('', false);\n }\n }, [updateSearch, values, opened, hasValue, textContent, valueType]);\n\n const onClickText = (event: React.MouseEvent<HTMLButtonElement>) => {\n onChipClick?.(event);\n inputRef.current?.focus();\n };\n\n const onFocusInput = () => {\n if (readOnly) {\n return;\n }\n\n // INFO: Жёсткий хак, нужный для корректного выделения всей строки после выбора значения.\n // Проблема возникает из-за очередности срабатывания useEffect, который сначала вызывает фокус\n // на элемент, а потом обновляет состояние inputRef\n if (valueType === 'single') {\n setTimeout(() => {\n inputRef.current?.select();\n });\n }\n\n contentRef.current?.scrollTo({ left: contentRef.current?.scrollWidth });\n\n updateFocused(true);\n };\n\n const onBlurInput = () => {\n if (!opened) {\n updateFocused(false);\n }\n };\n\n return { onClickText, onFocusInput, onBlurInput } as const;\n};\n"],"names":["useFocusController","_ref","_ref$controlledRefs","controlledRefs","contentRef","inputHelperRef","inputRef","opened","hasValue","textContent","search","values","readOnly","valueType","closedWithoutChanges","updateSearch","updateFocused","onChipClick","prevSearch","usePreviousValue","prevValues","prevOpened","useDidMountEffect","_contentRef$current","current","scrollTo","left","hasFocusAfterClose","undefined","_inputRef$current","focus","prevValuesCount","length","valuesCount","_inputRef$current2","style","flex","value","clientWidth","concat","useEffect","newSearch","onClickText","event","_inputRef$current3","onFocusInput","_contentRef$current2","_contentRef$current3","setTimeout","_inputRef$current4","select","scrollWidth","onBlurInput"],"mappings":"
|
1
|
+
{"version":3,"file":"useFocusController.js","sources":["../../../../src/components/Combobox/hooks/useFocusController.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useDidMountEffect, usePreviousValue } from '../../../hooks';\nimport type { UseFocusControllerProps } from '../Combobox.types';\n\nexport const useFocusController = ({\n controlledRefs: { contentRef, inputHelperRef, inputRef },\n opened,\n hasValue,\n textContent,\n search,\n values,\n readOnly,\n valueType,\n closedWithoutChanges,\n updateSearch,\n updateFocused,\n onChipClick,\n}: UseFocusControllerProps) => {\n const prevSearch = usePreviousValue(search);\n const prevValues = usePreviousValue(values);\n const prevOpened = usePreviousValue(opened);\n\n useDidMountEffect(() => {\n if (!opened) {\n updateFocused(false);\n contentRef.current?.scrollTo({ left: 0 });\n }\n\n const hasFocusAfterClose = prevOpened !== undefined && !opened && !closedWithoutChanges?.current;\n\n if (opened || hasFocusAfterClose) {\n inputRef.current?.focus();\n }\n\n // INFO: Помогает определить, произошло ли закрытие выпадающего меню при выборе значения.\n // Нужно для того, чтобы не фокусироваться на инпуте\n // ОЧЕНЬ не нравится это решение, но оно работает\n if (closedWithoutChanges?.current === false) {\n closedWithoutChanges.current = true;\n }\n }, [opened]);\n\n useDidMountEffect(() => {\n const prevValuesCount = prevValues?.length || 0;\n const valuesCount = values?.length || 0;\n\n if ((opened || prevOpened) && prevValuesCount < valuesCount) {\n inputRef.current?.focus();\n }\n }, [values, readOnly]);\n\n useDidMountEffect(() => {\n if (!inputRef.current) {\n return;\n }\n\n // INFO: Для multiple\n if (search === '') {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для single\n if (!opened && prevSearch !== search) {\n inputRef.current.style.flex = '1';\n }\n\n // INFO: Для кейсов, когда значение вырезано\n if (!inputRef.current.value.length) {\n inputRef.current.style.flex = '1';\n return;\n }\n\n if (valueType === 'multiple' && inputHelperRef.current) {\n const { clientWidth } = inputHelperRef.current;\n inputRef.current.style.flex = `1 0 ${clientWidth}px`;\n }\n }, [readOnly, search, valueType]);\n\n useEffect(() => {\n const newSearch = hasValue ? textContent : '';\n\n // INFO: Заполнить поле input при первой инициализации\n if (prevOpened !== undefined && opened) {\n return;\n }\n\n if (valueType === 'single') {\n updateSearch?.(newSearch, false);\n }\n\n if (valueType === 'multiple') {\n updateSearch?.('', false);\n }\n }, [updateSearch, values, opened, hasValue, textContent, valueType]);\n\n const onClickText = (event: React.MouseEvent<HTMLButtonElement>) => {\n onChipClick?.(event);\n inputRef.current?.focus();\n };\n\n const onFocusInput = () => {\n if (readOnly) {\n return;\n }\n\n // INFO: Жёсткий хак, нужный для корректного выделения всей строки после выбора значения.\n // Проблема возникает из-за очередности срабатывания useEffect, который сначала вызывает фокус\n // на элемент, а потом обновляет состояние inputRef\n if (valueType === 'single') {\n setTimeout(() => {\n inputRef.current?.select();\n });\n }\n\n contentRef.current?.scrollTo({ left: contentRef.current?.scrollWidth });\n\n updateFocused(true);\n };\n\n const onBlurInput = () => {\n if (!opened) {\n updateFocused(false);\n }\n };\n\n return { onClickText, onFocusInput, onBlurInput } as const;\n};\n"],"names":["useFocusController","_ref","_ref$controlledRefs","controlledRefs","contentRef","inputHelperRef","inputRef","opened","hasValue","textContent","search","values","readOnly","valueType","closedWithoutChanges","updateSearch","updateFocused","onChipClick","prevSearch","usePreviousValue","prevValues","prevOpened","useDidMountEffect","_contentRef$current","current","scrollTo","left","hasFocusAfterClose","undefined","_inputRef$current","focus","prevValuesCount","length","valuesCount","_inputRef$current2","style","flex","value","clientWidth","concat","useEffect","newSearch","onClickText","event","_inputRef$current3","onFocusInput","_contentRef$current2","_contentRef$current3","setTimeout","_inputRef$current4","select","scrollWidth","onBlurInput"],"mappings":";;;;IAKaA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAaA;AAAA,EAAA,IAAAC,mBAAA,GAAAD,IAAA,CAZ3BE,cAAc;IAAIC,UAAU,GAAAF,mBAAA,CAAVE,UAAU;IAAEC,cAAc,GAAAH,mBAAA,CAAdG,cAAc;IAAEC,QAAQ,GAAAJ,mBAAA,CAARI,QAAQ;IACtDC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,MAAM,GAAAT,IAAA,CAANS,MAAM;IACNC,MAAM,GAAAV,IAAA,CAANU,MAAM;IACNC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,SAAS,GAAAZ,IAAA,CAATY,SAAS;IACTC,oBAAoB,GAAAb,IAAA,CAApBa,oBAAoB;IACpBC,YAAY,GAAAd,IAAA,CAAZc,YAAY;IACZC,aAAa,GAAAf,IAAA,CAAbe,aAAa;IACbC,WAAW,GAAAhB,IAAA,CAAXgB,WAAW,CAAA;AAEX,EAAA,IAAMC,UAAU,GAAGC,gBAAgB,CAACT,MAAM,CAAC,CAAA;AAC3C,EAAA,IAAMU,UAAU,GAAGD,gBAAgB,CAACR,MAAM,CAAC,CAAA;AAC3C,EAAA,IAAMU,UAAU,GAAGF,gBAAgB,CAACZ,MAAM,CAAC,CAAA;AAE3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;AACvB,IAAA,IAAInC,QAAQ,EAAE;AACV,MAAA,OAAA;AACJ,KAAA;;AAEA;AACA;AACA;IACA,IAAIC,SAAS,KAAK,QAAQ,EAAE;AACxBmC,MAAAA,UAAU,CAAC,YAAM;AAAA,QAAA,IAAAC,kBAAA,CAAA;AACb,QAAA,CAAAA,kBAAA,GAAA3C,QAAQ,CAACkB,OAAO,MAAA,IAAA,IAAAyB,kBAAA,KAAA,KAAA,CAAA,IAAhBA,kBAAA,CAAkBC,MAAM,EAAE,CAAA;AAC9B,OAAC,CAAC,CAAA;AACN,KAAA;IAEA,CAAAJ,oBAAA,GAAA1C,UAAU,CAACoB,OAAO,MAAAsB,IAAAA,IAAAA,oBAAA,KAAlBA,KAAAA,CAAAA,IAAAA,oBAAA,CAAoBrB,QAAQ,CAAC;MAAEC,IAAI,EAAA,CAAAqB,oBAAA,GAAE3C,UAAU,CAACoB,OAAO,MAAAuB,IAAAA,IAAAA,oBAAA,KAAlBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,oBAAA,CAAoBI,WAAAA;AAAY,KAAC,CAAC,CAAA;IAEvEnC,aAAa,CAAC,IAAI,CAAC,CAAA;GACtB,CAAA;AAED,EAAA,IAAMoC,WAAW,GAAG,SAAdA,WAAWA,GAAS;IACtB,IAAI,CAAC7C,MAAM,EAAE;MACTS,aAAa,CAAC,KAAK,CAAC,CAAA;AACxB,KAAA;GACH,CAAA;EAED,OAAO;AAAE0B,IAAAA,WAAW,EAAXA,WAAW;AAAEG,IAAAA,YAAY,EAAZA,YAAY;AAAEO,IAAAA,WAAW,EAAXA,WAAAA;GAAa,CAAA;AACrD;;;;"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.Checkbox_styles_1266095_b1udywkg__e7223270{margin:var(--plasma-checkbox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Checkbox_styles_1266095_b1udywkg__e7223270 .Checkbox_styles_1266095_singleLine__e7223270{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
2
|
+
.Checkbox_styles_1266095_s165w87d__e7223270{position:absolute;width:1px;height:1px;overflow:hidden;-webkit-clip:rect(0 0 0 0);clip:rect(0 0 0 0);}.Checkbox_styles_1266095_s165w87d__e7223270:focus{outline:0 none;}
|
3
|
+
.Checkbox_styles_1266095_sft3zxv__e7223270{margin:var(--plasma-checkbox-trigger-margin);width:var(--plasma-checkbox-trigger-size);height:var(--plasma-checkbox-trigger-size);border-radius:var(--plasma-checkbox-trigger-border-radius);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:transparent;border:0.125rem solid var(--plasma-checkbox-trigger-border-color);box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;}input:not(:indeterminate) + label .Checkbox_styles_1266095_sft3zxv__e7223270 div{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 0.15s ease-in-out;-webkit-transition:transform 0.15s ease-in-out;transition:transform 0.15s ease-in-out;}input:checked + label .Checkbox_styles_1266095_sft3zxv__e7223270 div{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
|
4
|
+
.Checkbox_styles_1266095_s1u3nd7e__e7223270{position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;cursor:inherit;}
|
5
|
+
.Checkbox_styles_1266095_shwv1in__e7223270{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-top:var(--plasma-checkbox-content-top-offset);margin-left:var(--plasma-checkbox-content-left-offset);}
|
6
|
+
.Checkbox_styles_1266095_s1my1ay__e7223270{font-family:var(--plasma-checkbox-label-font-family);font-size:var(--plasma-checkbox-label-font-size);font-style:var(--plasma-checkbox-label-font-style);font-weight:var(--plasma-checkbox-label-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-label-letter-spacing);letter-spacing:var(--plasma-checkbox-label-letter-spacing);line-height:var(--plasma-checkbox-label-line-height);}
|
7
|
+
.Checkbox_styles_1266095_s14u8fnn__e7223270{margin-top:var(--plasma-checkbox-description-margin-top);color:var(--plasma-checkbox-description-color);font-family:var(--plasma-checkbox-description-font-family);font-size:var(--plasma-checkbox-description-font-size);font-style:var(--plasma-checkbox-description-font-style);font-weight:var(--plasma-checkbox-description-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-description-letter-spacing);letter-spacing:var(--plasma-checkbox-description-letter-spacing);line-height:var(--plasma-checkbox-description-line-height);}.Checkbox_styles_1266095_s14u8fnn__e7223270.Checkbox_styles_1266095_onlyDescription__e7223270{margin-top:0;}
|
8
|
+
|
9
|
+
.base_11n1fn3_b1yt66an__50fb7cfc input:checked + label .base_11n1fn3_radioboxTrigger__50fb7cfc{border:none;background:var(--plasma-radiobox-fill-color);border-color:var(--plasma-radiobox-fill-color);}
|
10
|
+
|
11
|
+
.base_6ae9j2_bmkf7xj__b9915620 input:disabled + label{opacity:var(--plasma-radiobox-disabled-opacity);}.base_6ae9j2_bmkf7xj__b9915620 input:disabled + label{cursor:not-allowed;}
|
12
|
+
|
13
|
+
.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae{position:relative;}.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae.base_1d7o4za_focusVisible__19288bae:focus::before,.base_1d7o4za_buxu4te__19288bae .base_1d7o4za_radioboxTrigger__19288bae[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae{border-color:transparent;position:relative;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae::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:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added] + label .base_1d7o4za_radioboxTrigger__19288bae::before{box-shadow:0 0 0 0.125rem var(--plasma-radiobox-focus-color);}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae{position:relative;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae::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.063rem solid transparent;border-radius:calc(var(--plasma-radiobox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_1d7o4za_buxu4te__19288bae input[data-focus-visible-added]:checked + label .base_1d7o4za_radioboxTrigger__19288bae::before{box-shadow:0 0 0 0.063rem var(--plasma-radiobox-focus-color);}
|
14
|
+
|
15
|
+
.Radiobox_styles_1skfuon_s14xglkp__585ca743{width:var(--plasma-radiobox-ellipse-size);height:var(--plasma-radiobox-ellipse-size);border-radius:var(--plasma-radiobox-ellipse-size);background-color:var(--plasma-radiobox-ellipse-color);-webkit-transition:-webkit-transform 0.3s ease-in-out;-webkit-transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);}input:checked + label .Radiobox_styles_1skfuon_s14xglkp__585ca743{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
|
16
|
+
.Radiobox_styles_1skfuon_bdte4ex__585ca743{--plasma-checkbox-label-font-family:var(--plasma-radiobox-label-font-family);--plasma-checkbox-label-font-size:var(--plasma-radiobox-label-font-size);--plasma-checkbox-label-font-style:var(--plasma-radiobox-label-font-style);--plasma-checkbox-label-font-weight:var(--plasma-radiobox-label-font-weight);--plasma-checkbox-label-letter-spacing:var(--plasma-radiobox-label-letter-spacing);--plasma-checkbox-label-line-height:var(--plasma-radiobox-label-line-height);--plasma-checkbox-description-margin-top:var(--plasma-checkbox-description-margin-top);--plasma-checkbox-description-font-family:var(--plasma-radiobox-description-font-family);--plasma-checkbox-description-font-size:var(--plasma-radiobox-description-font-size);--plasma-checkbox-description-font-style:var(--plasma-radiobox-description-font-style);--plasma-checkbox-description-font-weight:var(--plasma-radiobox-description-font-weight);--plasma-checkbox-description-letter-spacing:var(--plasma-radiobox-description-letter-spacing);--plasma-checkbox-description-line-height:var(--plasma-radiobox-description-line-height);--plasma-checkbox-fill-color:var(--plasma-radiobox-fill-color);--plasma-checkbox-description-color:var(--plasma-radiobox-description-color);--plasma-checkbox-trigger-border-color:var(--plasma-radiobox-trigger-border-color);--plasma-checkbox-content-top-offset:var(--plasma-radiobox-content-top-offset);--plasma-checkbox-content-left-offset:var(--plasma-radiobox-content-left-offset);--plasma-checkbox-trigger-size:var(--plasma-radiobox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-radiobox-trigger-border-radius);--plasma-checkbox-trigger-margin:var(--plasma-radiobox-trigger-margin);margin:var(--plasma-radiobox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Radiobox_styles_1skfuon_bdte4ex__585ca743 .Radiobox_styles_1skfuon_singleLine__585ca743{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -1,26 +1,17 @@
|
|
1
|
-
import './Radiobox_1ri2eqv.css';
|
2
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
3
2
|
import React, { forwardRef, useMemo } from 'react';
|
4
|
-
import { styled } from '@linaria/react';
|
5
3
|
import { safeUseId, extractTextFrom } from '@salutejs/plasma-core';
|
6
|
-
import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.js';
|
4
|
+
import { StyledInput, StyledContentWrapper, StyledTrigger, StyledContent, StyledLabel, StyledDescription } from '../Checkbox/Checkbox.styles.js';
|
7
5
|
import { cx } from '../../utils/index.js';
|
8
|
-
import { base as base$2 } from './_view/base.js';
|
9
|
-
import { base as base$1 } from './_size/base.js';
|
10
|
-
import { base as base$3 } from './_disabled/base.js';
|
11
|
-
import { base as base$4 } from './_focused/base.js';
|
6
|
+
import { base as base$2 } from './variations/_view/base.js';
|
7
|
+
import { base as base$1 } from './variations/_size/base.js';
|
8
|
+
import { base as base$3 } from './variations/_disabled/base.js';
|
9
|
+
import { base as base$4 } from './variations/_focused/base.js';
|
10
|
+
import { StyledEllipse, base } from './Radiobox.styles.js';
|
11
|
+
import { classes } from './Radiobox.tokens.js';
|
12
12
|
|
13
13
|
var _StyledEllipse;
|
14
14
|
var _excluded = ["size", "view", "focused", "disabled", "id", "label", "description", "style", "className", "singleLine", "aria-label"];
|
15
|
-
|
16
|
-
// NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части
|
17
|
-
|
18
|
-
var StyledEllipse = /*#__PURE__*/styled('div')({
|
19
|
-
name: "StyledEllipse",
|
20
|
-
"class": "sv18cw2",
|
21
|
-
propsAsIs: false
|
22
|
-
});
|
23
|
-
var base = "b1ls92xy";
|
24
15
|
var radioboxRoot = function radioboxRoot(Root) {
|
25
16
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
26
17
|
var size = props.size,
|
@@ -46,15 +37,15 @@ var radioboxRoot = function radioboxRoot(Root) {
|
|
46
37
|
var isLabelAriaHidden = typeof label === 'string';
|
47
38
|
var canFocused = focused ? 0 : -1;
|
48
39
|
var hasContent = label || description;
|
49
|
-
var singleLineClass = singleLine ?
|
50
|
-
var
|
40
|
+
var singleLineClass = singleLine ? classes.singleLine : undefined;
|
41
|
+
var onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;
|
51
42
|
return /*#__PURE__*/React.createElement(Root, {
|
52
43
|
view: view,
|
53
44
|
size: size,
|
54
45
|
disabled: disabled,
|
55
46
|
focused: focused,
|
56
47
|
style: style,
|
57
|
-
className:
|
48
|
+
className: className,
|
58
49
|
tabIndex: -1
|
59
50
|
}, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
|
60
51
|
id: radioboxId,
|
@@ -67,11 +58,11 @@ var radioboxRoot = function radioboxRoot(Root) {
|
|
67
58
|
})), /*#__PURE__*/React.createElement(StyledContentWrapper, {
|
68
59
|
htmlFor: radioboxId
|
69
60
|
}, /*#__PURE__*/React.createElement(StyledTrigger, {
|
70
|
-
className:
|
61
|
+
className: classes.radioboxTrigger
|
71
62
|
}, _StyledEllipse || (_StyledEllipse = /*#__PURE__*/React.createElement(StyledEllipse, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
|
72
63
|
className: singleLineClass
|
73
64
|
}, label && /*#__PURE__*/React.createElement(StyledLabel, {
|
74
|
-
className: singleLineClass,
|
65
|
+
className: cx(singleLineClass, onlyDescriptionClass),
|
75
66
|
id: uniqLabelId,
|
76
67
|
"aria-hidden": isLabelAriaHidden
|
77
68
|
}, label), description && /*#__PURE__*/React.createElement(StyledDescription, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Radiobox.js","sources":["../../../src/components/Radiobox/Radiobox.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { css } from '@linaria/core';\nimport { styled } from '@linaria/react';\nimport { safeUseId, extractTextFrom } from '@salutejs/plasma-core';\nimport type { InputHTMLAttributes } from '@salutejs/plasma-core';\n\nimport { applyNoUserSelect, applyEllipsis } from '../../mixins';\nimport type { Filter, RootProps } from '../../engines/types';\nimport {\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledContent,\n StyledTrigger,\n BaseboxProps,\n} from '../Checkbox/Checkbox';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './_view/base';\nimport { base as sizeCSS } from './_size/base';\nimport { base as disabledCSS } from './_disabled/base';\nimport { base as focusedCSS } from './_focused/base';\n\n// NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части\nconst mappingOverride = `\n --plasma-checkbox-label-font-family: var(--plasma-radiobox-label-font-family);\n --plasma-checkbox-label-font-size: var(--plasma-radiobox-label-font-size);\n --plasma-checkbox-label-font-style: var(--plasma-radiobox-label-font-style);\n --plasma-checkbox-label-font-weight: var(--plasma-radiobox-label-font-weight);\n --plasma-checkbox-label-letter-spacing: var(--plasma-radiobox-label-letter-spacing);\n --plasma-checkbox-label-line-height: var(--plasma-radiobox-label-line-height);\n --plasma-checkbox-description-font-family: var(--plasma-radiobox-description-font-family);\n --plasma-checkbox-description-font-size: var(--plasma-radiobox-description-font-size);\n --plasma-checkbox-description-font-style: var(--plasma-radiobox-description-font-style);\n --plasma-checkbox-description-font-weight: var(--plasma-radiobox-description-font-weight);\n --plasma-checkbox-description-letter-spacing: var(--plasma-radiobox-description-letter-spacing);\n --plasma-checkbox-description-line-height: var(--plasma-radiobox-description-line-height);\n --plasma-checkbox-fill-color: var(--plasma-radiobox-fill-color);\n --plasma-checkbox-description-color: var(--plasma-radiobox-description-color);\n --plasma-checkbox-trigger-border-color: var(--plasma-radiobox-trigger-border-color);\n --plasma-checkbox-content-top-offset: var(--plasma-radiobox-content-top-offset);\n --plasma-checkbox-content-left-offset: var(--plasma-radiobox-content-left-offset);\n --plasma-checkbox-trigger-size: var(--plasma-radiobox-trigger-size);\n --plasma-checkbox-trigger-border-radius: var(--plasma-radiobox-trigger-border-radius);\n --plasma-checkbox-trigger-margin: var(--plasma-radiobox-trigger-margin); \n`;\n\nconst StyledEllipse = styled.div`\n width: var(--plasma-radiobox-ellipse-size);\n height: var(--plasma-radiobox-ellipse-size);\n border-radius: var(--plasma-radiobox-ellipse-size);\n\n background-color: var(--plasma-radiobox-ellipse-color);\n transition: transform 0.3s ease-in-out;\n transform: scale(0);\n\n input:checked + label & {\n transform: scale(1);\n }\n`;\n\nconst base = css`\n ${mappingOverride};\n\n .single-line {\n ${applyEllipsis()};\n }\n\n margin: var(--plasma-radiobox-margin);\n\n &.reset-margins {\n margin: 0;\n }\n\n ${applyNoUserSelect()};\n\n position: relative;\n align-items: flex-start;\n display: flex;\n cursor: pointer;\n`;\n\ntype RadioboxProps = Filter<InputHTMLAttributes<HTMLInputElement>, 'size'> & Omit<BaseboxProps, 'indeterminate'>;\n\nexport const radioboxRoot = (Root: RootProps<HTMLInputElement, RadioboxProps>) =>\n forwardRef<HTMLInputElement, RadioboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const radioboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? 'single-line' : undefined;\n const resetMargins = !hasContent ? 'reset-margins' : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={cx(className, resetMargins)}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={radioboxId}\n ref={ref}\n type=\"radio\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={radioboxId}>\n <StyledTrigger className={cx('radiobox-trigger', resetMargins)}>\n <StyledEllipse />\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={singleLineClass}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription className={singleLineClass} id={uniqDescriptionId}>\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const radioboxConfig = {\n name: 'Radiobox',\n tag: 'div',\n layout: radioboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["StyledEllipse","styled","name","class","propsAsIs","base","radioboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_excluded","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","radioboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","undefined","resetMargins","React","createElement","cx","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","_StyledEllipse","StyledContent","StyledLabel","StyledDescription","radioboxConfig","tag","layout","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;AAwBA;;AAwBA,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAY3B,CAAA,CAAA;AAED,IAAMC,IAAI,GAmBT,UAAA,CAAA;IAIYC,YAAY,GAAGA,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxD,IAAA,IACIC,IAAI,GAYJF,KAAK,CAZLE,IAAI;MACJC,IAAI,GAWJH,KAAK,CAXLG,IAAI;MACJC,OAAO,GAUPJ,KAAK,CAVLI,OAAO;MACPC,QAAQ,GASRL,KAAK,CATLK,QAAQ;MACRC,EAAE,GAQFN,KAAK,CARLM,EAAE;MACFC,KAAK,GAOLP,KAAK,CAPLO,KAAK;MACLC,WAAW,GAMXR,KAAK,CANLQ,WAAW;MACXC,KAAK,GAKLT,KAAK,CALLS,KAAK;MACLC,SAAS,GAITV,KAAK,CAJLU,SAAS;MAAAC,iBAAA,GAITX,KAAK,CAHLY,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,iBAAA;MACJE,iBAAiB,GAE/Bb,KAAK,CAFL,YAAY,CAAA;AACTc,MAAAA,IAAAA,GAAAA,wB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EAAAA,MAAM,EAAElD,YAAY;AACpBD,EAAAA,IAAI,EAAJA,IAAI;AACJoD,EAAAA,UAAU,EAAE;AACR9C,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD/C,IAAAA,IAAI,EAAE;AACF8C,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD9C,IAAAA,QAAQ,EAAE;AACN4C,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDhD,IAAAA,OAAO,EAAE;AACL6C,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpD,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
|
1
|
+
{"version":3,"file":"Radiobox.js","sources":["../../../src/components/Radiobox/Radiobox.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\nimport { safeUseId, extractTextFrom } from '@salutejs/plasma-core';\nimport type { InputHTMLAttributes } from '@salutejs/plasma-core';\n\nimport type { Filter, RootProps } from '../../engines/types';\nimport {\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledContent,\n StyledTrigger,\n} from '../Checkbox/Checkbox.styles';\nimport { BaseboxProps } from '../Checkbox/Checkbox.types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { StyledEllipse, base } from './Radiobox.styles';\nimport { classes } from './Radiobox.tokens';\n\ntype RadioboxProps = Filter<InputHTMLAttributes<HTMLInputElement>, 'size'> & Omit<BaseboxProps, 'indeterminate'>;\n\nexport const radioboxRoot = (Root: RootProps<HTMLInputElement, RadioboxProps>) =>\n forwardRef<HTMLInputElement, RadioboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const radioboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? classes.singleLine : undefined;\n const onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={className}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={radioboxId}\n ref={ref}\n type=\"radio\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={radioboxId}>\n <StyledTrigger className={classes.radioboxTrigger}>\n <StyledEllipse />\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={cx(singleLineClass, onlyDescriptionClass)}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription className={singleLineClass} id={uniqDescriptionId}>\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const radioboxConfig = {\n name: 'Radiobox',\n tag: 'div',\n layout: radioboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["radioboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","radioboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","classes","undefined","onlyDescriptionClass","onlyDescription","React","createElement","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","radioboxTrigger","_StyledEllipse","StyledEllipse","StyledContent","StyledLabel","cx","StyledDescription","radioboxConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAyBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxD,IAAA,IACIC,IAAI,GAYJF,KAAK,CAZLE,IAAI;MACJC,IAAI,GAWJH,KAAK,CAXLG,IAAI;MACJC,OAAO,GAUPJ,KAAK,CAVLI,OAAO;MACPC,QAAQ,GASRL,KAAK,CATLK,QAAQ;MACRC,EAAE,GAQFN,KAAK,CARLM,EAAE;MACFC,KAAK,GAOLP,KAAK,CAPLO,KAAK;MACLC,WAAW,GAMXR,KAAK,CANLQ,WAAW;MACXC,KAAK,GAKLT,KAAK,CALLS,KAAK;MACLC,SAAS,GAITV,KAAK,CAJLU,SAAS;MAAAC,iBAAA,GAITX,KAAK,CAHLY,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,iBAAA;MACJE,iBAAiB,GAE/Bb,KAAK,CAFL,YAAY,CAAA;AACTc,MAAAA,IAAI,GAAAC,wBAAA,CACPf,KAAK,EAAAgB,SAAA,CAAA,CAAA;AAET,IAAA,IAAMC,MAAM,GAAGC,SAAS,EAAE,CAAA;AAC1B,IAAA,IAAMC,WAAW,GAAA,QAAA,CAAAC,MAAA,CAAYH,MAAM,CAAE,CAAA;AACrC,IAAA,IAAMI,iBAAiB,GAAA,cAAA,CAAAD,MAAA,CA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IAAAA,QAAQ,EAAE;AACNmD,MAAAA,GAAG,EAAEG,MAAAA;KACR;AACDvD,IAAAA,OAAO,EAAE;AACLoD,MAAAA,GAAG,EAAEI,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN3D,IAAAA,IAAI,EAAE,GAAG;AACTC,IAAAA,IAAI,EAAE,QAAA;AACV,GAAA;AACJ;;;;"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import './Radiobox.styles_1skfuon.css';
|
2
|
+
import { styled } from '@linaria/react';
|
3
|
+
|
4
|
+
// NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части
|
5
|
+
|
6
|
+
var StyledEllipse = /*#__PURE__*/styled('div')({
|
7
|
+
name: "StyledEllipse",
|
8
|
+
"class": "s14xglkp",
|
9
|
+
propsAsIs: false
|
10
|
+
});
|
11
|
+
var base = "bdte4ex";
|
12
|
+
|
13
|
+
export { StyledEllipse, base };
|
14
|
+
//# sourceMappingURL=Radiobox.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Radiobox.styles.js","sources":["../../../src/components/Radiobox/Radiobox.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { checkboxTokens } from '../Checkbox';\nimport { applyEllipsis, applyNoUserSelect } from '../../mixins';\n\nimport { classes, tokens } from './Radiobox.tokens';\n\n// NOTE: Необходимое переопределение токенов из компонента Checkbox т.к. используются его части\nconst mappingOverride = `\n ${checkboxTokens.labelFontFamily}: var(${tokens.labelFontFamily});\n ${checkboxTokens.labelFontSize}: var(${tokens.labelFontSize});\n ${checkboxTokens.labelFontStyle}: var(${tokens.labelFontStyle});\n ${checkboxTokens.labelFontWeight}: var(${tokens.labelFontWeight});\n ${checkboxTokens.labelLetterSpacing}: var(${tokens.labelLetterSpacing});\n ${checkboxTokens.labelLineHeight}: var(${tokens.labelLineHeight});\n ${checkboxTokens.descriptionMarginTop}: var(${tokens.descriptionMarginTop});\n ${checkboxTokens.descriptionFontFamily}: var(${tokens.descriptionFontFamily});\n ${checkboxTokens.descriptionFontSize}: var(${tokens.descriptionFontSize});\n ${checkboxTokens.descriptionFontStyle}: var(${tokens.descriptionFontStyle});\n ${checkboxTokens.descriptionFontWeight}: var(${tokens.descriptionFontWeight});\n ${checkboxTokens.descriptionLetterSpacing}: var(${tokens.descriptionLetterSpacing});\n ${checkboxTokens.descriptionLineHeight}: var(${tokens.descriptionLineHeight});\n\n ${checkboxTokens.fillColor}: var(${tokens.fillColor});\n ${checkboxTokens.descriptionColor}: var(${tokens.descriptionColor});\n ${checkboxTokens.triggerBorderColor}: var(${tokens.triggerBorderColor});\n\n ${checkboxTokens.contentTopOffset}: var(${tokens.contentTopOffset});\n ${checkboxTokens.contentLeftOffset}: var(${tokens.contentLeftOffset});\n ${checkboxTokens.triggerSize}: var(${tokens.triggerSize});\n ${checkboxTokens.triggerBorderRadius}: var(${tokens.triggerBorderRadius});\n ${checkboxTokens.triggerMargin}: var(${tokens.triggerMargin});\n`;\n\nexport const StyledEllipse = styled.div`\n width: var(${tokens.ellipseSize});\n height: var(${tokens.ellipseSize});\n border-radius: var(${tokens.ellipseSize});\n\n background-color: var(${tokens.ellipseColor});\n transition: transform 0.3s ease-in-out;\n transform: scale(0);\n\n input:checked + label & {\n transform: scale(1);\n }\n`;\n\nexport const base = css`\n ${mappingOverride};\n\n margin: var(${tokens.margin});\n\n ${applyNoUserSelect()};\n\n position: relative;\n align-items: flex-start;\n display: flex;\n cursor: pointer;\n\n .${classes.singleLine} {\n ${applyEllipsis()};\n }\n`;\n"],"names":["StyledEllipse","styled","name","class","propsAsIs","base"],"mappings":";;AAQA;;AA2BO,IAAMA,aAAa,gBAAGC,MAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAYlC,EAAA;AAEM,IAAMC,IAAI,GAehB;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
.s14xglkp{width:var(--plasma-radiobox-ellipse-size);height:var(--plasma-radiobox-ellipse-size);border-radius:var(--plasma-radiobox-ellipse-size);background-color:var(--plasma-radiobox-ellipse-color);-webkit-transition:-webkit-transform 0.3s ease-in-out;-webkit-transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);}input:checked + label .s14xglkp{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
|
2
|
+
.bdte4ex{--plasma-checkbox-label-font-family:var(--plasma-radiobox-label-font-family);--plasma-checkbox-label-font-size:var(--plasma-radiobox-label-font-size);--plasma-checkbox-label-font-style:var(--plasma-radiobox-label-font-style);--plasma-checkbox-label-font-weight:var(--plasma-radiobox-label-font-weight);--plasma-checkbox-label-letter-spacing:var(--plasma-radiobox-label-letter-spacing);--plasma-checkbox-label-line-height:var(--plasma-radiobox-label-line-height);--plasma-checkbox-description-margin-top:var(--plasma-checkbox-description-margin-top);--plasma-checkbox-description-font-family:var(--plasma-radiobox-description-font-family);--plasma-checkbox-description-font-size:var(--plasma-radiobox-description-font-size);--plasma-checkbox-description-font-style:var(--plasma-radiobox-description-font-style);--plasma-checkbox-description-font-weight:var(--plasma-radiobox-description-font-weight);--plasma-checkbox-description-letter-spacing:var(--plasma-radiobox-description-letter-spacing);--plasma-checkbox-description-line-height:var(--plasma-radiobox-description-line-height);--plasma-checkbox-fill-color:var(--plasma-radiobox-fill-color);--plasma-checkbox-description-color:var(--plasma-radiobox-description-color);--plasma-checkbox-trigger-border-color:var(--plasma-radiobox-trigger-border-color);--plasma-checkbox-content-top-offset:var(--plasma-radiobox-content-top-offset);--plasma-checkbox-content-left-offset:var(--plasma-radiobox-content-left-offset);--plasma-checkbox-trigger-size:var(--plasma-radiobox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-radiobox-trigger-border-radius);--plasma-checkbox-trigger-margin:var(--plasma-radiobox-trigger-margin);margin:var(--plasma-radiobox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.bdte4ex .single-line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
var classes = {
|
2
|
+
singleLine: 'single-line',
|
3
|
+
radioboxTrigger: 'radiobox-trigger',
|
4
|
+
onlyDescription: 'only-description'
|
5
|
+
};
|
6
|
+
var tokens = {
|
7
|
+
labelFontFamily: '--plasma-radiobox-label-font-family',
|
8
|
+
labelFontSize: '--plasma-radiobox-label-font-size',
|
9
|
+
labelFontStyle: '--plasma-radiobox-label-font-style',
|
10
|
+
labelFontWeight: '--plasma-radiobox-label-font-weight',
|
11
|
+
labelLetterSpacing: '--plasma-radiobox-label-letter-spacing',
|
12
|
+
labelLineHeight: '--plasma-radiobox-label-line-height',
|
13
|
+
descriptionMarginTop: '--plasma-checkbox-description-margin-top',
|
14
|
+
descriptionFontFamily: '--plasma-radiobox-description-font-family',
|
15
|
+
descriptionFontSize: '--plasma-radiobox-description-font-size',
|
16
|
+
descriptionFontStyle: '--plasma-radiobox-description-font-style',
|
17
|
+
descriptionFontWeight: '--plasma-radiobox-description-font-weight',
|
18
|
+
descriptionLetterSpacing: '--plasma-radiobox-description-letter-spacing',
|
19
|
+
descriptionLineHeight: '--plasma-radiobox-description-line-height',
|
20
|
+
fillColor: '--plasma-radiobox-fill-color',
|
21
|
+
descriptionColor: '--plasma-radiobox-description-color',
|
22
|
+
triggerBorderColor: '--plasma-radiobox-trigger-border-color',
|
23
|
+
contentTopOffset: '--plasma-radiobox-content-top-offset',
|
24
|
+
contentLeftOffset: '--plasma-radiobox-content-left-offset',
|
25
|
+
triggerSize: '--plasma-radiobox-trigger-size',
|
26
|
+
triggerBorderRadius: '--plasma-radiobox-trigger-border-radius',
|
27
|
+
triggerMargin: '--plasma-radiobox-trigger-margin',
|
28
|
+
margin: '--plasma-radiobox-margin',
|
29
|
+
ellipseSize: '--plasma-radiobox-ellipse-size',
|
30
|
+
ellipseColor: '--plasma-radiobox-ellipse-color',
|
31
|
+
disabledOpacity: '--plasma-radiobox-disabled-opacity',
|
32
|
+
focusColor: '--plasma-radiobox-focus-color'
|
33
|
+
};
|
34
|
+
|
35
|
+
export { classes, tokens };
|
36
|
+
//# sourceMappingURL=Radiobox.tokens.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Radiobox.tokens.js","sources":["../../../src/components/Radiobox/Radiobox.tokens.ts"],"sourcesContent":["export const classes = {\n singleLine: 'single-line',\n radioboxTrigger: 'radiobox-trigger',\n onlyDescription: 'only-description',\n};\n\nexport const tokens = {\n labelFontFamily: '--plasma-radiobox-label-font-family',\n labelFontSize: '--plasma-radiobox-label-font-size',\n labelFontStyle: '--plasma-radiobox-label-font-style',\n labelFontWeight: '--plasma-radiobox-label-font-weight',\n labelLetterSpacing: '--plasma-radiobox-label-letter-spacing',\n labelLineHeight: '--plasma-radiobox-label-line-height',\n descriptionMarginTop: '--plasma-checkbox-description-margin-top',\n descriptionFontFamily: '--plasma-radiobox-description-font-family',\n descriptionFontSize: '--plasma-radiobox-description-font-size',\n descriptionFontStyle: '--plasma-radiobox-description-font-style',\n descriptionFontWeight: '--plasma-radiobox-description-font-weight',\n descriptionLetterSpacing: '--plasma-radiobox-description-letter-spacing',\n descriptionLineHeight: '--plasma-radiobox-description-line-height',\n\n fillColor: '--plasma-radiobox-fill-color',\n descriptionColor: '--plasma-radiobox-description-color',\n triggerBorderColor: '--plasma-radiobox-trigger-border-color',\n\n contentTopOffset: '--plasma-radiobox-content-top-offset',\n contentLeftOffset: '--plasma-radiobox-content-left-offset',\n triggerSize: '--plasma-radiobox-trigger-size',\n triggerBorderRadius: '--plasma-radiobox-trigger-border-radius',\n triggerMargin: '--plasma-radiobox-trigger-margin',\n margin: '--plasma-radiobox-margin',\n\n ellipseSize: '--plasma-radiobox-ellipse-size',\n ellipseColor: '--plasma-radiobox-ellipse-color',\n\n disabledOpacity: '--plasma-radiobox-disabled-opacity',\n focusColor: '--plasma-radiobox-focus-color',\n};\n"],"names":["classes","singleLine","radioboxTrigger","onlyDescription","tokens","labelFontFamily","labelFontSize","labelFontStyle","labelFontWeight","labelLetterSpacing","labelLineHeight","descriptionMarginTop","descriptionFontFamily","descriptionFontSize","descriptionFontStyle","descriptionFontWeight","descriptionLetterSpacing","descriptionLineHeight","fillColor","descriptionColor","triggerBorderColor","contentTopOffset","contentLeftOffset","triggerSize","triggerBorderRadius","triggerMargin","margin","ellipseSize","ellipseColor","disabledOpacity","focusColor"],"mappings":"AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,eAAe,EAAE,kBAAA;AACrB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,aAAa,EAAE,mCAAmC;AAClDC,EAAAA,cAAc,EAAE,oCAAoC;AACpDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,kBAAkB,EAAE,wCAAwC;AAC5DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,0CAA0C;AAChEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAClEC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,oBAAoB,EAAE,0CAA0C;AAChEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAClEC,EAAAA,wBAAwB,EAAE,8CAA8C;AACxEC,EAAAA,qBAAqB,EAAE,2CAA2C;AAElEC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,gBAAgB,EAAE,qCAAqC;AACvDC,EAAAA,kBAAkB,EAAE,wCAAwC;AAE5DC,EAAAA,gBAAgB,EAAE,sCAAsC;AACxDC,EAAAA,iBAAiB,EAAE,uCAAuC;AAC1DC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,aAAa,EAAE,kCAAkC;AACjDC,EAAAA,MAAM,EAAE,0BAA0B;AAElCC,EAAAA,WAAW,EAAE,gCAAgC;AAC7CC,EAAAA,YAAY,EAAE,iCAAiC;AAE/CC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAAA;AAChB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Radiobox/variations/_disabled/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { tokens } from '../../Radiobox.tokens';\n\nexport const base = css`\n input:disabled + label {\n opacity: var(${tokens.disabledOpacity});\n }\n\n input:disabled + label {\n cursor: not-allowed;\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAQhB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bmkf7xj input:disabled + label{opacity:var(--plasma-radiobox-disabled-opacity);}.bmkf7xj input:disabled + label{cursor:not-allowed;}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Radiobox/variations/_focused/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { addFocus } from '../../../../mixins';\nimport { classes, tokens } from '../../Radiobox.tokens';\n\nexport const base = css`\n .${classes.radioboxTrigger} {\n ${addFocus({\n outlineOffset: '0',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: 'transparent',\n })}\n }\n\n input[data-focus-visible-added] + label .${classes.radioboxTrigger} {\n border-color: transparent;\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: `var(${tokens.triggerBorderRadius})`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.125rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n\n input[data-focus-visible-added]:checked + label .${classes.radioboxTrigger} {\n ${addFocus({\n outlineOffset: '-0.125rem',\n outlineSize: '0.063rem',\n outlineRadius: `calc(var(${tokens.triggerBorderRadius}) + 0.125rem)`,\n outlineColor: `var(${tokens.focusColor})`,\n customFocusRules: `\n &::before {\n box-shadow: 0 0 0 0.063rem var(${tokens.focusColor});\n }\n `,\n })}\n }\n`;\n"],"names":["base"],"mappings":"AAKO,IAAMA,IAAI,GAsChB;;;;"}
|
package/es/components/Radiobox/{_focused/base_1nruwxa.css → variations/_focused/base_1d7o4za.css}
RENAMED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.buxu4te .radiobox-trigger{position:relative;}.buxu4te .radiobox-trigger::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.buxu4te .radiobox-trigger.focus-visible:focus::before,.buxu4te .radiobox-trigger[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.buxu4te input[data-focus-visible-added] + label .radiobox-trigger{border-color:transparent;position:relative;}.buxu4te input[data-focus-visible-added] + label .radiobox-trigger::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:var(--plasma-radiobox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.buxu4te input[data-focus-visible-added] + label .radiobox-trigger::before{box-shadow:0 0 0 0.125rem var(--plasma-radiobox-focus-color);}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-trigger{position:relative;}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-trigger::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.063rem solid transparent;border-radius:calc(var(--plasma-radiobox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.buxu4te input[data-focus-visible-added]:checked + label .radiobox-trigger::before{box-shadow:0 0 0 0.063rem var(--plasma-radiobox-focus-color);}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Radiobox/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":"AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Radiobox/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from '../../Radiobox.tokens';\n\nexport const base = css`\n input:checked + label .${classes.radioboxTrigger} {\n border: none;\n background: var(${tokens.fillColor});\n border-color: var(${tokens.fillColor});\n }\n`;\n"],"names":["base"],"mappings":"AAIO,IAAMA,IAAI,GAMhB;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.b1yt66an input:checked + label .radiobox-trigger{border:none;background:var(--plasma-radiobox-fill-color);border-color:var(--plasma-radiobox-fill-color);}
|
@@ -13,13 +13,11 @@ import { classes } from './TextField.tokens.js';
|
|
13
13
|
import { TextFieldChip } from './ui/TextFieldChip/TextFieldChip.js';
|
14
14
|
import { useKeyNavigation } from './hooks/useKeyNavigation.js';
|
15
15
|
|
16
|
-
var _excluded = ["id", "
|
16
|
+
var _excluded = ["id", "contentLeft", "contentRight", "label", "labelPlacement", "placeholder", "leftHelper", "enumerationType", "view", "size", "readOnly", "disabled", "chips", "onChange", "onChangeChips", "onSearch"];
|
17
17
|
var base = "bpunezx";
|
18
18
|
var textFieldRoot = function textFieldRoot(Root) {
|
19
19
|
return /*#__PURE__*/forwardRef(function (_ref, ref) {
|
20
20
|
var id = _ref.id,
|
21
|
-
className = _ref.className,
|
22
|
-
style = _ref.style,
|
23
21
|
contentLeft = _ref.contentLeft,
|
24
22
|
contentRight = _ref.contentRight,
|
25
23
|
label = _ref.label,
|
@@ -38,7 +36,6 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
38
36
|
onChange = _ref.onChange,
|
39
37
|
onChangeChips = _ref.onChangeChips,
|
40
38
|
onSearch = _ref.onSearch,
|
41
|
-
onKeyDown = _ref.onKeyDown,
|
42
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
43
40
|
var contentRef = useRef(null);
|
44
41
|
var inputRef = useRef(null);
|
@@ -118,10 +115,6 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
118
115
|
chipsRefs.current[index] = element;
|
119
116
|
}
|
120
117
|
};
|
121
|
-
var handleOnKeyDown = function handleOnKeyDown(event) {
|
122
|
-
handleInputKeydown(event);
|
123
|
-
onKeyDown && onKeyDown(event);
|
124
|
-
};
|
125
118
|
useEffect(function () {
|
126
119
|
if (!isChipEnumeration && !(values !== null && values !== void 0 && values.length)) {
|
127
120
|
return;
|
@@ -140,9 +133,7 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
140
133
|
disabled: disabled,
|
141
134
|
readOnly: !disabled && readOnly,
|
142
135
|
labelPlacement: innerLabelPlacementValue,
|
143
|
-
onClick: handleInputFocus
|
144
|
-
className: className,
|
145
|
-
style: style
|
136
|
+
onClick: handleInputFocus
|
146
137
|
}, labelInside || innerLabelValue && /*#__PURE__*/React.createElement(Label, {
|
147
138
|
id: labelId,
|
148
139
|
htmlFor: id
|
@@ -183,7 +174,7 @@ var textFieldRoot = function textFieldRoot(Root) {
|
|
183
174
|
disabled: disabled,
|
184
175
|
readOnly: !disabled && readOnly,
|
185
176
|
onChange: handleChange,
|
186
|
-
onKeyDown:
|
177
|
+
onKeyDown: handleInputKeydown
|
187
178
|
})), labelInside && /*#__PURE__*/React.createElement(Label, {
|
188
179
|
id: labelId,
|
189
180
|
htmlFor: innerId
|