@salutejs/plasma-new-hope 0.176.0-canary.1511.11570259013.0 → 0.176.0-canary.1513.11570030354.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Slider/Slider.css +13 -15
- package/cjs/components/Slider/Slider.js +2 -11
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/Slider.tokens.js +17 -23
- package/cjs/components/Slider/Slider.tokens.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +8 -8
- package/cjs/components/Slider/components/Double/Double.js +23 -58
- package/cjs/components/Slider/components/Double/Double.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.css +14 -14
- package/cjs/components/Slider/components/Single/Single.js +33 -64
- package/cjs/components/Slider/components/Single/Single.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles.js +4 -4
- package/cjs/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/cjs/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/cjs/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/cjs/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/cjs/components/Slider/ui/Handler/Handler.css +3 -3
- package/cjs/components/Slider/ui/Handler/Handler.js +88 -49
- package/cjs/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/cjs/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/cjs/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/cjs/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/cjs/components/Slider/utils/index.js +10 -28
- package/cjs/components/Slider/utils/index.js.map +1 -1
- package/cjs/components/Slider/variations/_view/base.js +1 -1
- package/cjs/components/Slider/variations/_view/base.js.map +1 -1
- package/cjs/index.css +13 -38
- package/cjs/index.js +0 -6
- package/cjs/index.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Slider/Slider.js +2 -10
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/cjs/components/Slider/Slider.tokens.js +17 -23
- package/emotion/cjs/components/Slider/components/Double/Double.js +19 -54
- package/emotion/cjs/components/Slider/components/Single/Single.js +33 -64
- package/emotion/cjs/components/Slider/components/Single/Single.styles.js +9 -18
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +10 -10
- package/emotion/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/emotion/cjs/components/Slider/ui/Handler/Handler.styles.js +15 -9
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/cjs/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/cjs/components/Slider/utils/index.js +10 -28
- package/emotion/cjs/components/Slider/variations/_view/base.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/cjs/index.js +0 -11
- package/emotion/es/components/Slider/Slider.js +2 -11
- package/emotion/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/emotion/es/components/Slider/Slider.tokens.js +17 -23
- package/emotion/es/components/Slider/components/Double/Double.js +19 -54
- package/emotion/es/components/Slider/components/Single/Single.js +34 -65
- package/emotion/es/components/Slider/components/Single/Single.styles.js +8 -17
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/emotion/es/components/Slider/components/SliderBase/SliderBase.styles.js +11 -11
- package/emotion/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/emotion/es/components/Slider/ui/Handler/Handler.styles.js +16 -10
- package/emotion/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/emotion/es/components/Slider/ui/Thumb/Thumb.styles.js +3 -3
- package/emotion/es/components/Slider/utils/index.js +10 -28
- package/emotion/es/components/Slider/variations/_view/base.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/es/examples/plasma_web/components/Slider/Slider.config.js +7 -7
- package/emotion/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/emotion/es/index.js +1 -2
- package/es/components/Slider/Slider.css +13 -15
- package/es/components/Slider/Slider.js +2 -11
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/Slider.tokens.js +17 -23
- package/es/components/Slider/Slider.tokens.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +8 -8
- package/es/components/Slider/components/Double/Double.js +19 -54
- package/es/components/Slider/components/Double/Double.js.map +1 -1
- package/es/components/Slider/components/Single/Single.css +14 -14
- package/es/components/Slider/components/Single/Single.js +34 -65
- package/es/components/Slider/components/Single/Single.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles.js +4 -4
- package/es/components/Slider/components/Single/Single.styles.js.map +1 -1
- package/es/components/Slider/components/Single/Single.styles_1r9f1e0.css +6 -0
- package/es/components/Slider/components/SliderBase/SliderBase.css +5 -5
- package/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/es/components/Slider/components/SliderBase/SliderBase.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/es/components/Slider/components/SliderBase/SliderBase.styles.js.map +1 -1
- package/es/components/Slider/components/SliderBase/SliderBase.styles_9s4eb3.css +5 -0
- package/es/components/Slider/ui/Handler/Handler.css +3 -3
- package/es/components/Slider/ui/Handler/Handler.js +87 -48
- package/es/components/Slider/ui/Handler/Handler.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles.js +7 -17
- package/es/components/Slider/ui/Handler/Handler.styles.js.map +1 -1
- package/es/components/Slider/ui/Handler/Handler.styles_8crx5z.css +2 -0
- package/es/components/Slider/ui/Thumb/Thumb.css +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/es/components/Slider/ui/Thumb/Thumb.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles.js.map +1 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_4w4gzn.css +1 -0
- package/es/components/Slider/utils/index.js +10 -28
- package/es/components/Slider/utils/index.js.map +1 -1
- package/es/components/Slider/variations/_view/base.js +1 -1
- package/es/components/Slider/variations/_view/base.js.map +1 -1
- package/es/index.css +13 -38
- package/es/index.js +0 -2
- package/es/index.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Slider/Slider.js +2 -10
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/cjs/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/cjs/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/cjs/components/Slider/components/Single/Single.js +33 -64
- package/styled-components/cjs/components/Slider/components/Single/Single.styles.js +6 -6
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/cjs/components/Slider/components/SliderBase/SliderBase.styles.js +6 -6
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.js +88 -52
- package/styled-components/cjs/components/Slider/ui/Handler/Handler.styles.js +4 -7
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/cjs/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/cjs/components/Slider/utils/index.js +10 -28
- package/styled-components/cjs/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/components/Slider/Slider.js +2 -11
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +0 -26
- package/styled-components/es/components/Slider/Slider.tokens.js +17 -23
- package/styled-components/es/components/Slider/components/Double/Double.js +19 -54
- package/styled-components/es/components/Slider/components/Single/Single.js +34 -65
- package/styled-components/es/components/Slider/components/Single/Single.styles.js +5 -5
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.js +12 -31
- package/styled-components/es/components/Slider/components/SliderBase/SliderBase.styles.js +7 -7
- package/styled-components/es/components/Slider/ui/Handler/Handler.js +86 -51
- package/styled-components/es/components/Slider/ui/Handler/Handler.styles.js +5 -8
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.js +2 -3
- package/styled-components/es/components/Slider/ui/Thumb/Thumb.styles.js +2 -2
- package/styled-components/es/components/Slider/utils/index.js +10 -28
- package/styled-components/es/components/Slider/variations/_view/base.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Slider/Slider.stories.tsx +16 -98
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.config.js +3 -3
- package/styled-components/es/examples/plasma_web/components/Slider/Slider.stories.tsx +15 -98
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +9 -6
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -6
- package/styled-components/es/index.js +1 -2
- package/types/components/Slider/Slider.d.ts.map +1 -1
- package/types/components/Slider/Slider.tokens.d.ts +16 -22
- package/types/components/Slider/Slider.tokens.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.types.d.ts +0 -1
- package/types/components/Slider/components/Double/Double.types.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts +1 -1
- package/types/components/Slider/components/Single/Single.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Single/Single.types.d.ts +7 -79
- package/types/components/Slider/components/Single/Single.types.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.styles.d.ts.map +1 -1
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts +0 -6
- package/types/components/Slider/components/SliderBase/SliderBase.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts +2 -6
- package/types/components/Slider/ui/Handler/Handler.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Handler/Handler.types.d.ts +1 -5
- package/types/components/Slider/ui/Handler/Handler.types.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.styles.d.ts.map +1 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts +0 -1
- package/types/components/Slider/ui/Thumb/Thumb.types.d.ts.map +1 -1
- package/types/components/Slider/utils/index.d.ts +8 -26
- package/types/components/Slider/utils/index.d.ts.map +1 -1
- package/types/components/Slider/variations/_view/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts +2 -80
- package/types/examples/plasma_b2c/components/Slider/Slider.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Slider/Slider.d.ts +2 -80
- package/types/examples/plasma_web/components/Slider/Slider.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 +1 -1
- package/types/utils/index.d.ts.map +1 -1
- package/cjs/components/NumberInput/NumberInput.css +0 -52
- package/cjs/components/NumberInput/NumberInput.js +0 -183
- package/cjs/components/NumberInput/NumberInput.js.map +0 -1
- package/cjs/components/NumberInput/NumberInput.styles.js +0 -9
- package/cjs/components/NumberInput/NumberInput.styles.js.map +0 -1
- package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
- package/cjs/components/NumberInput/NumberInput.tokens.js +0 -93
- package/cjs/components/NumberInput/NumberInput.tokens.js.map +0 -1
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -19
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -22
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
- package/cjs/components/NumberInput/ui/Input/Input.css +0 -15
- package/cjs/components/NumberInput/ui/Input/Input.js +0 -199
- package/cjs/components/NumberInput/ui/Input/Input.js.map +0 -1
- package/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -96
- package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
- package/cjs/components/NumberInput/ui/Input/Input.styles_fhgb95.css +0 -8
- package/cjs/components/NumberInput/utils/index.js +0 -8
- package/cjs/components/NumberInput/utils/index.js.map +0 -1
- package/cjs/components/NumberInput/variations/_background-type/base.js +0 -9
- package/cjs/components/NumberInput/variations/_background-type/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_background-type/base_dx9knv.css +0 -1
- package/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
- package/cjs/components/NumberInput/variations/_disabled/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
- package/cjs/components/NumberInput/variations/_segmentation/base.js +0 -9
- package/cjs/components/NumberInput/variations/_segmentation/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_segmentation/base_3r9a58.css +0 -1
- package/cjs/components/NumberInput/variations/_shape/base.js +0 -9
- package/cjs/components/NumberInput/variations/_shape/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
- package/cjs/components/NumberInput/variations/_size/base.js +0 -9
- package/cjs/components/NumberInput/variations/_size/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_size/base_yqdmk4.css +0 -1
- package/cjs/components/NumberInput/variations/_view/base.js +0 -9
- package/cjs/components/NumberInput/variations/_view/base.js.map +0 -1
- package/cjs/components/NumberInput/variations/_view/base_3gefjm.css +0 -1
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/cjs/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/cjs/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/cjs/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -122
- package/cjs/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/cjs/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/cjs/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/emotion/cjs/components/NumberInput/NumberInput.js +0 -193
- package/emotion/cjs/components/NumberInput/NumberInput.styles.js +0 -17
- package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
- package/emotion/cjs/components/NumberInput/NumberInput.types.js +0 -5
- package/emotion/cjs/components/NumberInput/index.js +0 -31
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -16
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
- package/emotion/cjs/components/NumberInput/ui/Input/Input.js +0 -207
- package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -81
- package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
- package/emotion/cjs/components/NumberInput/ui/index.js +0 -19
- package/emotion/cjs/components/NumberInput/utils/index.js +0 -7
- package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
- package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
- package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
- package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
- package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
- package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
- package/emotion/cjs/components/NumberInput/variations/_shape/base.js +0 -11
- package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
- package/emotion/cjs/components/NumberInput/variations/_size/base.js +0 -13
- package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
- package/emotion/cjs/components/NumberInput/variations/_view/base.js +0 -13
- package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
- package/emotion/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -46
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -46
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/emotion/es/components/NumberInput/NumberInput.js +0 -185
- package/emotion/es/components/NumberInput/NumberInput.styles.js +0 -11
- package/emotion/es/components/NumberInput/NumberInput.tokens.js +0 -84
- package/emotion/es/components/NumberInput/NumberInput.types.js +0 -1
- package/emotion/es/components/NumberInput/index.js +0 -2
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -9
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
- package/emotion/es/components/NumberInput/ui/Input/Input.js +0 -198
- package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +0 -74
- package/emotion/es/components/NumberInput/ui/Input/Input.types.js +0 -1
- package/emotion/es/components/NumberInput/ui/index.js +0 -2
- package/emotion/es/components/NumberInput/utils/index.js +0 -1
- package/emotion/es/components/NumberInput/variations/_background-type/base.js +0 -4
- package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
- package/emotion/es/components/NumberInput/variations/_disabled/base.js +0 -3
- package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
- package/emotion/es/components/NumberInput/variations/_segmentation/base.js +0 -6
- package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
- package/emotion/es/components/NumberInput/variations/_shape/base.js +0 -5
- package/emotion/es/components/NumberInput/variations/_shape/tokens.json +0 -1
- package/emotion/es/components/NumberInput/variations/_size/base.js +0 -7
- package/emotion/es/components/NumberInput/variations/_size/tokens.json +0 -22
- package/emotion/es/components/NumberInput/variations/_view/base.js +0 -7
- package/emotion/es/components/NumberInput/variations/_view/tokens.json +0 -14
- package/emotion/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -40
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -40
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/es/components/NumberInput/NumberInput.css +0 -52
- package/es/components/NumberInput/NumberInput.js +0 -178
- package/es/components/NumberInput/NumberInput.js.map +0 -1
- package/es/components/NumberInput/NumberInput.styles.js +0 -5
- package/es/components/NumberInput/NumberInput.styles.js.map +0 -1
- package/es/components/NumberInput/NumberInput.styles_jeawjl.css +0 -1
- package/es/components/NumberInput/NumberInput.tokens.js +0 -87
- package/es/components/NumberInput/NumberInput.tokens.js.map +0 -1
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -15
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +0 -1
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -18
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +0 -1
- package/es/components/NumberInput/ui/Input/Input.css +0 -15
- package/es/components/NumberInput/ui/Input/Input.js +0 -195
- package/es/components/NumberInput/ui/Input/Input.js.map +0 -1
- package/es/components/NumberInput/ui/Input/Input.styles.js +0 -85
- package/es/components/NumberInput/ui/Input/Input.styles.js.map +0 -1
- package/es/components/NumberInput/ui/Input/Input.styles_fhgb95.css +0 -8
- package/es/components/NumberInput/utils/index.js +0 -4
- package/es/components/NumberInput/utils/index.js.map +0 -1
- package/es/components/NumberInput/variations/_background-type/base.js +0 -5
- package/es/components/NumberInput/variations/_background-type/base.js.map +0 -1
- package/es/components/NumberInput/variations/_background-type/base_dx9knv.css +0 -1
- package/es/components/NumberInput/variations/_disabled/base.js +0 -5
- package/es/components/NumberInput/variations/_disabled/base.js.map +0 -1
- package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +0 -1
- package/es/components/NumberInput/variations/_segmentation/base.js +0 -5
- package/es/components/NumberInput/variations/_segmentation/base.js.map +0 -1
- package/es/components/NumberInput/variations/_segmentation/base_3r9a58.css +0 -1
- package/es/components/NumberInput/variations/_shape/base.js +0 -5
- package/es/components/NumberInput/variations/_shape/base.js.map +0 -1
- package/es/components/NumberInput/variations/_shape/base_k05biw.css +0 -1
- package/es/components/NumberInput/variations/_size/base.js +0 -5
- package/es/components/NumberInput/variations/_size/base.js.map +0 -1
- package/es/components/NumberInput/variations/_size/base_yqdmk4.css +0 -1
- package/es/components/NumberInput/variations/_view/base.js +0 -5
- package/es/components/NumberInput/variations/_view/base.js.map +0 -1
- package/es/components/NumberInput/variations/_view/base_3gefjm.css +0 -1
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +0 -98
- package/es/components/Slider/components/Single/Single.styles_1h7n2s2.css +0 -6
- package/es/components/Slider/components/SliderBase/SliderBase.styles_1qt1224.css +0 -5
- package/es/components/Slider/ui/Handler/Handler.styles_irtcgm.css +0 -2
- package/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -118
- package/es/components/Slider/ui/Handler/computeKeyPressData.js.map +0 -1
- package/es/components/Slider/ui/Thumb/Thumb.styles_uyn20e.css +0 -1
- package/es/components/Slider/variations/_view/base_1s3f6q8.css +0 -1
- package/styled-components/cjs/components/NumberInput/NumberInput.js +0 -193
- package/styled-components/cjs/components/NumberInput/NumberInput.styles.js +0 -8
- package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +0 -90
- package/styled-components/cjs/components/NumberInput/NumberInput.types.js +0 -5
- package/styled-components/cjs/components/NumberInput/index.js +0 -31
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +0 -18
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -15
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -5
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +0 -207
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +0 -48
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +0 -5
- package/styled-components/cjs/components/NumberInput/ui/index.js +0 -19
- package/styled-components/cjs/components/NumberInput/utils/index.js +0 -7
- package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +0 -10
- package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +0 -6
- package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +0 -9
- package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +0 -4
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +0 -12
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +0 -1
- package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +0 -11
- package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +0 -1
- package/styled-components/cjs/components/NumberInput/variations/_size/base.js +0 -13
- package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +0 -22
- package/styled-components/cjs/components/NumberInput/variations/_view/base.js +0 -13
- package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +0 -14
- package/styled-components/cjs/components/Slider/ui/Handler/computeKeyPressData.js +0 -121
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -46
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -46
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +0 -11
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/styled-components/es/components/NumberInput/NumberInput.js +0 -185
- package/styled-components/es/components/NumberInput/NumberInput.styles.js +0 -2
- package/styled-components/es/components/NumberInput/NumberInput.tokens.js +0 -84
- package/styled-components/es/components/NumberInput/NumberInput.types.js +0 -1
- package/styled-components/es/components/NumberInput/index.js +0 -2
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +0 -11
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +0 -8
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +0 -1
- package/styled-components/es/components/NumberInput/ui/Input/Input.js +0 -198
- package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +0 -41
- package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +0 -1
- package/styled-components/es/components/NumberInput/ui/index.js +0 -2
- package/styled-components/es/components/NumberInput/utils/index.js +0 -1
- package/styled-components/es/components/NumberInput/variations/_background-type/base.js +0 -4
- package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +0 -6
- package/styled-components/es/components/NumberInput/variations/_disabled/base.js +0 -3
- package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +0 -4
- package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +0 -6
- package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +0 -1
- package/styled-components/es/components/NumberInput/variations/_shape/base.js +0 -5
- package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +0 -1
- package/styled-components/es/components/NumberInput/variations/_size/base.js +0 -7
- package/styled-components/es/components/NumberInput/variations/_size/tokens.json +0 -22
- package/styled-components/es/components/NumberInput/variations/_view/base.js +0 -7
- package/styled-components/es/components/NumberInput/variations/_view/tokens.json +0 -14
- package/styled-components/es/components/Slider/ui/Handler/computeKeyPressData.js +0 -115
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +0 -40
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +0 -5
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +0 -40
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +0 -5
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +0 -108
- package/types/components/NumberInput/NumberInput.d.ts +0 -38
- package/types/components/NumberInput/NumberInput.d.ts.map +0 -1
- package/types/components/NumberInput/NumberInput.styles.d.ts +0 -2
- package/types/components/NumberInput/NumberInput.styles.d.ts.map +0 -1
- package/types/components/NumberInput/NumberInput.tokens.d.ts +0 -79
- package/types/components/NumberInput/NumberInput.tokens.d.ts.map +0 -1
- package/types/components/NumberInput/NumberInput.types.d.ts +0 -112
- package/types/components/NumberInput/NumberInput.types.d.ts.map +0 -1
- package/types/components/NumberInput/index.d.ts +0 -3
- package/types/components/NumberInput/index.d.ts.map +0 -1
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +0 -4
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +0 -1
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +0 -45
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +0 -1
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +0 -7
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +0 -1
- package/types/components/NumberInput/ui/Input/Input.d.ts +0 -16
- package/types/components/NumberInput/ui/Input/Input.d.ts.map +0 -1
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts +0 -30
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +0 -1
- package/types/components/NumberInput/ui/Input/Input.types.d.ts +0 -16
- package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +0 -1
- package/types/components/NumberInput/ui/index.d.ts +0 -3
- package/types/components/NumberInput/ui/index.d.ts.map +0 -1
- package/types/components/NumberInput/utils/index.d.ts +0 -2
- package/types/components/NumberInput/utils/index.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_background-type/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_background-type/base.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_disabled/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_segmentation/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_shape/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_shape/base.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_size/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_size/base.d.ts.map +0 -1
- package/types/components/NumberInput/variations/_view/base.d.ts +0 -2
- package/types/components/NumberInput/variations/_view/base.d.ts.map +0 -1
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts +0 -12
- package/types/components/Slider/ui/Handler/computeKeyPressData.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +0 -39
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +0 -82
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +0 -1
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +0 -39
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +0 -82
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +0 -1
- /package/cjs/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → Slider/variations/_view/base_x642ct.css} +0 -0
- /package/es/components/{NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css → Slider/variations/_view/base_x642ct.css} +0 -0
@@ -1,183 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
-
var React = require('react');
|
7
|
-
var index = require('../../utils/index.js');
|
8
|
-
var NumberInput_tokens = require('./NumberInput.tokens.js');
|
9
|
-
var NumberInput_styles = require('./NumberInput.styles.js');
|
10
|
-
var base = require('./variations/_view/base.js');
|
11
|
-
var base$1 = require('./variations/_size/base.js');
|
12
|
-
var base$2 = require('./variations/_shape/base.js');
|
13
|
-
var base$3 = require('./variations/_background-type/base.js');
|
14
|
-
var base$4 = require('./variations/_segmentation/base.js');
|
15
|
-
var base$5 = require('./variations/_disabled/base.js');
|
16
|
-
var ActionButton = require('./ui/ActionButton/ActionButton.js');
|
17
|
-
var IconMinus = require('../_Icon/Icons/IconMinus.js');
|
18
|
-
var Input = require('./ui/Input/Input.js');
|
19
|
-
var IconPlus = require('../_Icon/Icons/IconPlus.js');
|
20
|
-
var getSizeValueFromProp = require('../../utils/getSizeValueFromProp.js');
|
21
|
-
|
22
|
-
var _excluded = ["className", "style", "width", "value", "min", "max", "step", "isLoading", "loader", "size", "view", "clear", "shape", "segmentation", "inputBackgroundType", "disabled", "textBefore", "textAfter", "customIncrementButton", "incrementIcon", "customDecrementButton", "decrementIcon", "isManualInput", "onChange", "onIncrement", "onDecrement"];
|
23
|
-
var numberInputRoot = function numberInputRoot(Root) {
|
24
|
-
return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
25
|
-
var _ref2;
|
26
|
-
var className = _ref.className,
|
27
|
-
style = _ref.style,
|
28
|
-
width = _ref.width,
|
29
|
-
value = _ref.value,
|
30
|
-
min = _ref.min,
|
31
|
-
max = _ref.max,
|
32
|
-
_ref$step = _ref.step,
|
33
|
-
step = _ref$step === void 0 ? 1 : _ref$step,
|
34
|
-
isLoading = _ref.isLoading,
|
35
|
-
loader = _ref.loader,
|
36
|
-
size = _ref.size,
|
37
|
-
view = _ref.view,
|
38
|
-
clear = _ref.clear,
|
39
|
-
shape = _ref.shape,
|
40
|
-
segmentation = _ref.segmentation,
|
41
|
-
_ref$inputBackgroundT = _ref.inputBackgroundType,
|
42
|
-
inputBackgroundType = _ref$inputBackgroundT === void 0 ? 'fill' : _ref$inputBackgroundT,
|
43
|
-
disabled = _ref.disabled,
|
44
|
-
textBefore = _ref.textBefore,
|
45
|
-
textAfter = _ref.textAfter,
|
46
|
-
customIncrementButton = _ref.customIncrementButton,
|
47
|
-
incrementIcon = _ref.incrementIcon,
|
48
|
-
customDecrementButton = _ref.customDecrementButton,
|
49
|
-
decrementIcon = _ref.decrementIcon,
|
50
|
-
isManualInput = _ref.isManualInput,
|
51
|
-
onChange = _ref.onChange,
|
52
|
-
onIncrement = _ref.onIncrement,
|
53
|
-
onDecrement = _ref.onDecrement,
|
54
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
55
|
-
var _useState = React.useState((_ref2 = value !== null && value !== void 0 ? value : min) !== null && _ref2 !== void 0 ? _ref2 : 0),
|
56
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
57
|
-
innerValue = _useState2[0],
|
58
|
-
setInnerValue = _useState2[1];
|
59
|
-
var innerWidth = width ? getSizeValueFromProp.getSizeValueFromProp(width) : '100%';
|
60
|
-
var actionIconSize = size === 'xs' ? 'xs' : 's';
|
61
|
-
var solidViewClass = segmentation === 'solid' ? NumberInput_tokens.classes.solidView : undefined;
|
62
|
-
var segmentedViewClass = segmentation === 'segmented' ? NumberInput_tokens.classes.segmentedView : undefined;
|
63
|
-
var clearViewClass = clear ? NumberInput_tokens.classes.clearView : undefined;
|
64
|
-
var disabledClass = disabled ? NumberInput_tokens.classes.disabled : undefined;
|
65
|
-
var isMinValue = function isMinValue(currentValue) {
|
66
|
-
return min !== undefined && currentValue <= Number(min);
|
67
|
-
};
|
68
|
-
var isMaxValue = function isMaxValue(currentValue) {
|
69
|
-
return max !== undefined && currentValue >= Number(max);
|
70
|
-
};
|
71
|
-
var decrementButtonDisabled = isMinValue(Number(innerValue)) || isLoading ? NumberInput_tokens.classes.actionButtonDecrementDisabled : undefined;
|
72
|
-
var incrementButtonDisabled = isMaxValue(Number(innerValue)) || isLoading ? NumberInput_tokens.classes.actionButtonIncrementDisabled : undefined;
|
73
|
-
var handleDecrement = function handleDecrement() {
|
74
|
-
if (isLoading || disabled) {
|
75
|
-
return;
|
76
|
-
}
|
77
|
-
var diffValue = Number(innerValue) - step;
|
78
|
-
var resValue = !isMinValue(diffValue) ? diffValue : Number(min);
|
79
|
-
setInnerValue(resValue);
|
80
|
-
if (onDecrement) {
|
81
|
-
onDecrement(resValue);
|
82
|
-
}
|
83
|
-
if (onChange) {
|
84
|
-
onChange(null, resValue);
|
85
|
-
}
|
86
|
-
};
|
87
|
-
var handleIncrement = function handleIncrement() {
|
88
|
-
if (isLoading || disabled) {
|
89
|
-
return;
|
90
|
-
}
|
91
|
-
var diffValue = Number(innerValue) + step;
|
92
|
-
var resValue = !isMaxValue(diffValue) ? diffValue : Number(max);
|
93
|
-
setInnerValue(resValue);
|
94
|
-
if (onIncrement) {
|
95
|
-
onIncrement(resValue);
|
96
|
-
}
|
97
|
-
if (onChange) {
|
98
|
-
onChange(null, resValue);
|
99
|
-
}
|
100
|
-
};
|
101
|
-
return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
|
102
|
-
view: view,
|
103
|
-
size: size,
|
104
|
-
disabled: disabled,
|
105
|
-
clear: clear,
|
106
|
-
shape: shape,
|
107
|
-
segmentation: segmentation,
|
108
|
-
isLoading: isLoading
|
109
|
-
}, segmentation === 'solid' ? {
|
110
|
-
inputBackgroundType: 'clear'
|
111
|
-
} : {
|
112
|
-
inputBackgroundType: inputBackgroundType
|
113
|
-
}, {
|
114
|
-
className: index.cx(className, solidViewClass, segmentedViewClass, clearViewClass, disabledClass),
|
115
|
-
style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, style), {}, _rollupPluginBabelHelpers.defineProperty({}, NumberInput_tokens.privateTokens.inputWidth, innerWidth))
|
116
|
-
}), customDecrementButton || /*#__PURE__*/React.createElement(ActionButton.ActionButton, {
|
117
|
-
className: index.cx(NumberInput_tokens.classes.actionButtonDecrement, decrementButtonDisabled, solidViewClass, segmentedViewClass),
|
118
|
-
icon: decrementIcon || /*#__PURE__*/React.createElement(IconMinus.IconMinus, {
|
119
|
-
color: "inherit",
|
120
|
-
size: actionIconSize
|
121
|
-
}),
|
122
|
-
onClick: handleDecrement
|
123
|
-
}), /*#__PURE__*/React.createElement(Input.NumberInput, _rollupPluginBabelHelpers.extends({
|
124
|
-
ref: ref,
|
125
|
-
segmentation: segmentation,
|
126
|
-
value: innerValue,
|
127
|
-
min: min,
|
128
|
-
max: max,
|
129
|
-
isManualInput: isManualInput,
|
130
|
-
textBefore: textBefore,
|
131
|
-
textAfter: textAfter,
|
132
|
-
isLoading: isLoading,
|
133
|
-
loader: loader,
|
134
|
-
disabled: disabled,
|
135
|
-
setInnerValue: setInnerValue,
|
136
|
-
onChange: onChange
|
137
|
-
}, rest)), customIncrementButton || /*#__PURE__*/React.createElement(ActionButton.ActionButton, {
|
138
|
-
className: index.cx(NumberInput_tokens.classes.actionButtonIncrement, incrementButtonDisabled, solidViewClass, segmentedViewClass),
|
139
|
-
icon: incrementIcon || /*#__PURE__*/React.createElement(IconPlus.IconPlus, {
|
140
|
-
color: "inherit",
|
141
|
-
size: actionIconSize
|
142
|
-
}),
|
143
|
-
onClick: handleIncrement
|
144
|
-
}));
|
145
|
-
});
|
146
|
-
};
|
147
|
-
var numberInputConfig = {
|
148
|
-
name: 'NumberInput',
|
149
|
-
tag: 'div',
|
150
|
-
layout: numberInputRoot,
|
151
|
-
base: NumberInput_styles.base,
|
152
|
-
variations: {
|
153
|
-
view: {
|
154
|
-
css: base.base
|
155
|
-
},
|
156
|
-
size: {
|
157
|
-
css: base$1.base
|
158
|
-
},
|
159
|
-
shape: {
|
160
|
-
css: base$2.base
|
161
|
-
},
|
162
|
-
inputBackgroundType: {
|
163
|
-
css: base$3.base
|
164
|
-
},
|
165
|
-
segmentation: {
|
166
|
-
css: base$4.base
|
167
|
-
},
|
168
|
-
disabled: {
|
169
|
-
css: base$5.base,
|
170
|
-
attrs: true
|
171
|
-
}
|
172
|
-
},
|
173
|
-
defaults: {
|
174
|
-
view: 'default',
|
175
|
-
size: 'l',
|
176
|
-
shape: 'cornered',
|
177
|
-
segmentation: 'default'
|
178
|
-
}
|
179
|
-
};
|
180
|
-
|
181
|
-
exports.numberInputConfig = numberInputConfig;
|
182
|
-
exports.numberInputRoot = numberInputRoot;
|
183
|
-
//# sourceMappingURL=NumberInput.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.js","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"sourcesContent":["import React, { CSSProperties, forwardRef, useState } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { cx, getSizeValueFromProp } from '../../utils';\nimport { IconMinus, IconPlus } from '../_Icon';\n\nimport type { NumberInputProps, NumberInputRootProps } from './NumberInput.types';\nimport { ActionButton, NumberInput } from './ui';\nimport { classes, privateTokens } from './NumberInput.tokens';\nimport { base } from './NumberInput.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as shapeCSS } from './variations/_shape/base';\nimport { base as inputBackgroundTypeCSS } from './variations/_background-type/base';\nimport { base as segmentationCSS } from './variations/_segmentation/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\n\nexport const numberInputRoot = (Root: RootProps<HTMLDivElement, NumberInputRootProps>) =>\n forwardRef<HTMLInputElement, NumberInputProps>(\n (\n {\n className,\n style,\n width,\n value,\n min,\n max,\n step = 1,\n isLoading,\n loader,\n size,\n view,\n clear,\n shape,\n segmentation,\n inputBackgroundType = 'fill',\n disabled,\n textBefore,\n textAfter,\n customIncrementButton,\n incrementIcon,\n customDecrementButton,\n decrementIcon,\n isManualInput,\n onChange,\n onIncrement,\n onDecrement,\n ...rest\n },\n ref,\n ) => {\n const [innerValue, setInnerValue] = useState<number | string>(value ?? min ?? 0);\n\n const innerWidth = width ? getSizeValueFromProp(width) : '100%';\n\n const actionIconSize = size === 'xs' ? 'xs' : 's';\n const solidViewClass = segmentation === 'solid' ? classes.solidView : undefined;\n const segmentedViewClass = segmentation === 'segmented' ? classes.segmentedView : undefined;\n const clearViewClass = clear ? classes.clearView : undefined;\n const disabledClass = disabled ? classes.disabled : undefined;\n\n const isMinValue = (currentValue: number) => min !== undefined && currentValue <= Number(min);\n const isMaxValue = (currentValue: number) => max !== undefined && currentValue >= Number(max);\n\n const decrementButtonDisabled =\n isMinValue(Number(innerValue)) || isLoading ? classes.actionButtonDecrementDisabled : undefined;\n const incrementButtonDisabled =\n isMaxValue(Number(innerValue)) || isLoading ? classes.actionButtonIncrementDisabled : undefined;\n\n const handleDecrement = () => {\n if (isLoading || disabled) {\n return;\n }\n\n const diffValue = Number(innerValue) - step;\n const resValue = !isMinValue(diffValue) ? diffValue : Number(min);\n\n setInnerValue(resValue);\n\n if (onDecrement) {\n onDecrement(resValue);\n }\n\n if (onChange) {\n onChange(null, resValue);\n }\n };\n\n const handleIncrement = () => {\n if (isLoading || disabled) {\n return;\n }\n\n const diffValue = Number(innerValue) + step;\n const resValue = !isMaxValue(diffValue) ? diffValue : Number(max);\n\n setInnerValue(resValue);\n\n if (onIncrement) {\n onIncrement(resValue);\n }\n\n if (onChange) {\n onChange(null, resValue);\n }\n };\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n clear={clear}\n shape={shape}\n segmentation={segmentation}\n isLoading={isLoading}\n {...(segmentation === 'solid' ? { inputBackgroundType: 'clear' } : { inputBackgroundType })}\n className={cx(className, solidViewClass, segmentedViewClass, clearViewClass, disabledClass)}\n style={\n {\n ...style,\n [privateTokens.inputWidth]: innerWidth,\n } as CSSProperties\n }\n >\n {customDecrementButton || (\n <ActionButton\n className={cx(\n classes.actionButtonDecrement,\n decrementButtonDisabled,\n solidViewClass,\n segmentedViewClass,\n )}\n icon={decrementIcon || <IconMinus color=\"inherit\" size={actionIconSize} />}\n onClick={handleDecrement}\n />\n )}\n <NumberInput\n ref={ref}\n segmentation={segmentation}\n value={innerValue}\n min={min}\n max={max}\n isManualInput={isManualInput}\n textBefore={textBefore}\n textAfter={textAfter}\n isLoading={isLoading}\n loader={loader}\n disabled={disabled}\n setInnerValue={setInnerValue}\n onChange={onChange}\n {...rest}\n />\n {customIncrementButton || (\n <ActionButton\n className={cx(\n classes.actionButtonIncrement,\n incrementButtonDisabled,\n solidViewClass,\n segmentedViewClass,\n )}\n icon={incrementIcon || <IconPlus color=\"inherit\" size={actionIconSize} />}\n onClick={handleIncrement}\n />\n )}\n </Root>\n );\n },\n );\n\nexport const numberInputConfig = {\n name: 'NumberInput',\n tag: 'div',\n layout: numberInputRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n shape: {\n css: shapeCSS,\n },\n inputBackgroundType: {\n css: inputBackgroundTypeCSS,\n },\n segmentation: {\n css: segmentationCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'l',\n shape: 'cornered',\n segmentation: 'default',\n },\n};\n"],"names":["numberInputRoot","Root","forwardRef","_ref","ref","_ref2","className","style","width","value","min","max","_ref$step","step","isLoading","loader","size","view","clear","shape","segmentation","_ref$inputBackgroundT","inputBackgroundType","disabled","textBefore","textAfter","customIncrementButton","incrementIcon","customDecrementButton","decrementIcon","isManualInput","onChange","onIncrement","onDecrement","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","innerValue","setInnerValue","innerWidth","getSizeValueFromProp","actionIconSize","solidViewClass","classes","solidView","undefined","segmentedViewClass","segmentedView","clearViewClass","clearView","disabledClass","isMinValue","currentValue","Number","isMaxValue","decrementButtonDisabled","actionButtonDecrementDisabled","incrementButtonDisabled","actionButtonIncrementDisabled","handleDecrement","diffValue","resValue","handleIncrement","React","createElement","_extends","cx","_objectSpread","_defineProperty","privateTokens","inputWidth","ActionButton","actionButtonDecrement","icon","IconMinus","color","onClick","NumberInput","actionButtonIncrement","IconPlus","numberInputConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","shapeCSS","inputBackgroundTypeCSS","segmentationCSS","disabledCSS","attrs","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAiBaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,IAAqD,EAAA;AAAA,EAAA,oBACjFC,gBAAU,CACN,UAAAC,IAAA,EA8BIC,GAAG,EACF;AAAA,IAAA,IAAAC,KAAA,CAAA;AAAA,IAAA,IA7BGC,SAAS,GAAAH,IAAA,CAATG,SAAS;MACTC,KAAK,GAAAJ,IAAA,CAALI,KAAK;MACLC,KAAK,GAAAL,IAAA,CAALK,KAAK;MACLC,KAAK,GAAAN,IAAA,CAALM,KAAK;MACLC,GAAG,GAAAP,IAAA,CAAHO,GAAG;MACHC,GAAG,GAAAR,IAAA,CAAHQ,GAAG;MAAAC,SAAA,GA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;KACR;AACDzE,IAAAA,KAAK,EAAE;AACHuE,MAAAA,GAAG,EAAEG,WAAAA;KACR;AACDvE,IAAAA,mBAAmB,EAAE;AACjBoE,MAAAA,GAAG,EAAEI,WAAAA;KACR;AACD1E,IAAAA,YAAY,EAAE;AACVsE,MAAAA,GAAG,EAAEK,WAAAA;KACR;AACDxE,IAAAA,QAAQ,EAAE;AACNmE,MAAAA,GAAG,EAAEM,WAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNjF,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAG;AACTG,IAAAA,KAAK,EAAE,UAAU;AACjBC,IAAAA,YAAY,EAAE,SAAA;AAClB,GAAA;AACJ;;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.styles.js","sources":["../../../src/components/NumberInput/NumberInput.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css`\n display: flex;\n align-items: center;\n`;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAGhB;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
.bwds6g{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;}
|
@@ -1,93 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var classes = {
|
6
|
-
actionButtonDecrement: 'action-button-decrement',
|
7
|
-
actionButtonDecrementDisabled: 'action-button-decrement-disabled',
|
8
|
-
actionButtonIncrement: 'action-button-increment',
|
9
|
-
actionButtonIncrementDisabled: 'action-button-increment-disabled',
|
10
|
-
textBefore: 'text-before',
|
11
|
-
textAfter: 'text-after',
|
12
|
-
solidView: 'solid-view',
|
13
|
-
segmentedView: 'segmented-view',
|
14
|
-
clearView: 'clear-view',
|
15
|
-
errorAnimation: 'error-animation',
|
16
|
-
disabled: 'number-input-disabled',
|
17
|
-
manualInput: 'manual-input-number-input'
|
18
|
-
};
|
19
|
-
var privateTokens = {
|
20
|
-
inputWidth: '--plasma_private-number-input_width',
|
21
|
-
segmentationBorderRadius: '--plasma_private-segemntation-border-radius',
|
22
|
-
segmentationInputBorderRadius: '--plasma_private-segemntation_input_border-radius'
|
23
|
-
};
|
24
|
-
var tokens = {
|
25
|
-
// Root size tokens
|
26
|
-
rootMinWidth: '--plasma-number-input_min-width',
|
27
|
-
disabledOpacity: '--plasma-number-input_disabled-opacity',
|
28
|
-
// Action button view tokens
|
29
|
-
iconButtonColor: '--plasma-number-input_icon-button_color',
|
30
|
-
iconButtonBackgroundColor: '--plasma-number-input_icon-button_background-color',
|
31
|
-
iconButtonColorHover: '--plasma-number-input_icon-button_color-hover',
|
32
|
-
iconButtonColorSolidHover: '--plasma-number-input_icon-button_color_solid-hover',
|
33
|
-
iconButtonBackgroundColorHover: '--plasma-number-input_icon-button_background-color-hover',
|
34
|
-
iconButtonColorActive: '--plasma-number-input_icon-button_color-active',
|
35
|
-
iconButtonColorSolidActive: '--plasma-number-input_icon-button_color_solid-active',
|
36
|
-
iconButtonBackgroundColorActive: '--plasma-number-input_icon-button_background-color-active',
|
37
|
-
actionButtonDisabledOpacity: '--plasma-number-input_action-button_disabled-opacity',
|
38
|
-
// Action button size tokens
|
39
|
-
iconButtonHeight: '--plasma-number-input_icon-button_height',
|
40
|
-
iconButtonWidth: '--plasma-number-input_icon-button_width',
|
41
|
-
iconButtonPadding: '--plasma-number-input_icon-button_padding',
|
42
|
-
iconButtonRadius: '--plasma-number-input_icon-button_radius',
|
43
|
-
iconButtonSegmentationRadius: '--plasma-number-input_icon-button_segmentation_radius',
|
44
|
-
iconButtonFontFamily: '--plasma-number-input_icon-button_font-family',
|
45
|
-
iconButtonFontSize: '--plasma-number-input_icon-button_font-size',
|
46
|
-
iconButtonFontStyle: '--plasma-number-input_icon-button_font-style',
|
47
|
-
iconButtonFontWeight: '--plasma-number-input_icon-button_font-weight',
|
48
|
-
iconButtonLetterSpacing: '--plasma-number-input_icon-button_letter-spacing',
|
49
|
-
iconButtonLineHeight: '--plasma-number-input_icon-button_line-height',
|
50
|
-
// Input size tokens
|
51
|
-
inputWrapperBorderWidth: '--plasma-number-input_input-wrapper_border-width',
|
52
|
-
inputWrapperMargin: '--plasma-number-input_input-wrapper_margin',
|
53
|
-
inputWrapperBorderRadius: '--plasma-number-input_input-wrapper_border-radius',
|
54
|
-
textWrapperHeight: '--plasma-number-input_text-wrapper_height',
|
55
|
-
textWrapperPadding: '--plasma-number-input_text-wrapper_padding',
|
56
|
-
fontFamily: '--plasma-number-input_font-family',
|
57
|
-
fontStyle: '--plasma-number-input_font-style',
|
58
|
-
fontSize: '--plasma-number-input_font-size',
|
59
|
-
fontWeight: '--plasma-number-input_font-weight',
|
60
|
-
letterSpacing: '--plasma-number-input_letter-spacing',
|
61
|
-
lineHeight: '--plasma-number-input_line-height',
|
62
|
-
textBeforeMarginRight: '--plasma-number-input_text-before_margin-right',
|
63
|
-
textAfterMarginLeft: '--plasma-number-input_text-after_margin-left',
|
64
|
-
// Input view tokens
|
65
|
-
caretColor: '--plasma-number-input_caret_color',
|
66
|
-
caretColorSolid: '--plasma-number-input_caret_color-solid',
|
67
|
-
color: '--plasma-number-input_color',
|
68
|
-
colorSolid: '--plasma-number-input_color-solid',
|
69
|
-
backgroundColor: '--plasma-number-input_background-color',
|
70
|
-
backgroundColorHover: '--plasma-number-input_background-color-hover',
|
71
|
-
backgroundColorFocus: '--plasma-number-input_background-color-focus',
|
72
|
-
backgroundColorSolidFocus: '--plasma-number-input_background-color-solid-focus',
|
73
|
-
backgroundColorSolid: '--plasma-number-input_background-color-solid',
|
74
|
-
borderColor: '--plasma-number-input_border-color',
|
75
|
-
borderColorHover: '--plasma-number-input_border-color-hover',
|
76
|
-
borderColorFocus: '--plasma-number-input_border-color-focus',
|
77
|
-
borderColorSolidFocus: '--plasma-number-input_border-color-solid-focus',
|
78
|
-
borderColorSolid: '--plasma-number-input_border-color-solid',
|
79
|
-
additionalTextColor: '--plasma-number-input_additional-text_color',
|
80
|
-
additionalTextColorSolid: '--plasma-number-input_additional-text_color-solid',
|
81
|
-
errorColor: '--plasma-number-input_error-color',
|
82
|
-
backgroundErrorColor: '--plasma-number-input_background_error-color',
|
83
|
-
borderErrorColor: '--plasma-number-input_border_error-color',
|
84
|
-
// Loader tokens
|
85
|
-
loaderSpinnerSize: '--plasma-number-input_loader-spinner_size',
|
86
|
-
loaderSpinnerColor: '--plasma-number-input_loader-spinner_color',
|
87
|
-
loaderSpinnerColorSolid: '--plasma-number-input_loader-spinner_color-solid'
|
88
|
-
};
|
89
|
-
|
90
|
-
exports.classes = classes;
|
91
|
-
exports.privateTokens = privateTokens;
|
92
|
-
exports.tokens = tokens;
|
93
|
-
//# sourceMappingURL=NumberInput.tokens.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"NumberInput.tokens.js","sources":["../../../src/components/NumberInput/NumberInput.tokens.ts"],"sourcesContent":["export const classes = {\n actionButtonDecrement: 'action-button-decrement',\n actionButtonDecrementDisabled: 'action-button-decrement-disabled',\n actionButtonIncrement: 'action-button-increment',\n actionButtonIncrementDisabled: 'action-button-increment-disabled',\n textBefore: 'text-before',\n textAfter: 'text-after',\n solidView: 'solid-view',\n segmentedView: 'segmented-view',\n clearView: 'clear-view',\n errorAnimation: 'error-animation',\n disabled: 'number-input-disabled',\n manualInput: 'manual-input-number-input',\n};\n\nexport const privateTokens = {\n inputWidth: '--plasma_private-number-input_width',\n segmentationBorderRadius: '--plasma_private-segemntation-border-radius',\n segmentationInputBorderRadius: '--plasma_private-segemntation_input_border-radius',\n};\n\nexport const tokens = {\n // Root size tokens\n rootMinWidth: '--plasma-number-input_min-width',\n disabledOpacity: '--plasma-number-input_disabled-opacity',\n\n // Action button view tokens\n iconButtonColor: '--plasma-number-input_icon-button_color',\n iconButtonBackgroundColor: '--plasma-number-input_icon-button_background-color',\n iconButtonColorHover: '--plasma-number-input_icon-button_color-hover',\n iconButtonColorSolidHover: '--plasma-number-input_icon-button_color_solid-hover',\n iconButtonBackgroundColorHover: '--plasma-number-input_icon-button_background-color-hover',\n iconButtonColorActive: '--plasma-number-input_icon-button_color-active',\n iconButtonColorSolidActive: '--plasma-number-input_icon-button_color_solid-active',\n iconButtonBackgroundColorActive: '--plasma-number-input_icon-button_background-color-active',\n\n actionButtonDisabledOpacity: '--plasma-number-input_action-button_disabled-opacity',\n\n // Action button size tokens\n iconButtonHeight: '--plasma-number-input_icon-button_height',\n iconButtonWidth: '--plasma-number-input_icon-button_width',\n iconButtonPadding: '--plasma-number-input_icon-button_padding',\n iconButtonRadius: '--plasma-number-input_icon-button_radius',\n iconButtonSegmentationRadius: '--plasma-number-input_icon-button_segmentation_radius',\n iconButtonFontFamily: '--plasma-number-input_icon-button_font-family',\n iconButtonFontSize: '--plasma-number-input_icon-button_font-size',\n iconButtonFontStyle: '--plasma-number-input_icon-button_font-style',\n iconButtonFontWeight: '--plasma-number-input_icon-button_font-weight',\n iconButtonLetterSpacing: '--plasma-number-input_icon-button_letter-spacing',\n iconButtonLineHeight: '--plasma-number-input_icon-button_line-height',\n\n // Input size tokens\n inputWrapperBorderWidth: '--plasma-number-input_input-wrapper_border-width',\n inputWrapperMargin: '--plasma-number-input_input-wrapper_margin',\n inputWrapperBorderRadius: '--plasma-number-input_input-wrapper_border-radius',\n textWrapperHeight: '--plasma-number-input_text-wrapper_height',\n textWrapperPadding: '--plasma-number-input_text-wrapper_padding',\n\n fontFamily: '--plasma-number-input_font-family',\n fontStyle: '--plasma-number-input_font-style',\n fontSize: '--plasma-number-input_font-size',\n fontWeight: '--plasma-number-input_font-weight',\n letterSpacing: '--plasma-number-input_letter-spacing',\n lineHeight: '--plasma-number-input_line-height',\n\n textBeforeMarginRight: '--plasma-number-input_text-before_margin-right',\n textAfterMarginLeft: '--plasma-number-input_text-after_margin-left',\n\n // Input view tokens\n caretColor: '--plasma-number-input_caret_color',\n caretColorSolid: '--plasma-number-input_caret_color-solid',\n color: '--plasma-number-input_color',\n colorSolid: '--plasma-number-input_color-solid',\n backgroundColor: '--plasma-number-input_background-color',\n backgroundColorHover: '--plasma-number-input_background-color-hover',\n backgroundColorFocus: '--plasma-number-input_background-color-focus',\n backgroundColorSolidFocus: '--plasma-number-input_background-color-solid-focus',\n backgroundColorSolid: '--plasma-number-input_background-color-solid',\n borderColor: '--plasma-number-input_border-color',\n borderColorHover: '--plasma-number-input_border-color-hover',\n borderColorFocus: '--plasma-number-input_border-color-focus',\n borderColorSolidFocus: '--plasma-number-input_border-color-solid-focus',\n borderColorSolid: '--plasma-number-input_border-color-solid',\n additionalTextColor: '--plasma-number-input_additional-text_color',\n additionalTextColorSolid: '--plasma-number-input_additional-text_color-solid',\n\n errorColor: '--plasma-number-input_error-color',\n backgroundErrorColor: '--plasma-number-input_background_error-color',\n borderErrorColor: '--plasma-number-input_border_error-color',\n\n // Loader tokens\n loaderSpinnerSize: '--plasma-number-input_loader-spinner_size',\n loaderSpinnerColor: '--plasma-number-input_loader-spinner_color',\n loaderSpinnerColorSolid: '--plasma-number-input_loader-spinner_color-solid',\n};\n"],"names":["classes","actionButtonDecrement","actionButtonDecrementDisabled","actionButtonIncrement","actionButtonIncrementDisabled","textBefore","textAfter","solidView","segmentedView","clearView","errorAnimation","disabled","manualInput","privateTokens","inputWidth","segmentationBorderRadius","segmentationInputBorderRadius","tokens","rootMinWidth","disabledOpacity","iconButtonColor","iconButtonBackgroundColor","iconButtonColorHover","iconButtonColorSolidHover","iconButtonBackgroundColorHover","iconButtonColorActive","iconButtonColorSolidActive","iconButtonBackgroundColorActive","actionButtonDisabledOpacity","iconButtonHeight","iconButtonWidth","iconButtonPadding","iconButtonRadius","iconButtonSegmentationRadius","iconButtonFontFamily","iconButtonFontSize","iconButtonFontStyle","iconButtonFontWeight","iconButtonLetterSpacing","iconButtonLineHeight","inputWrapperBorderWidth","inputWrapperMargin","inputWrapperBorderRadius","textWrapperHeight","textWrapperPadding","fontFamily","fontStyle","fontSize","fontWeight","letterSpacing","lineHeight","textBeforeMarginRight","textAfterMarginLeft","caretColor","caretColorSolid","color","colorSolid","backgroundColor","backgroundColorHover","backgroundColorFocus","backgroundColorSolidFocus","backgroundColorSolid","borderColor","borderColorHover","borderColorFocus","borderColorSolidFocus","borderColorSolid","additionalTextColor","additionalTextColorSolid","errorColor","backgroundErrorColor","borderErrorColor","loaderSpinnerSize","loaderSpinnerColor","loaderSpinnerColorSolid"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,qBAAqB,EAAE,yBAAyB;AAChDC,EAAAA,6BAA6B,EAAE,kCAAkC;AACjEC,EAAAA,qBAAqB,EAAE,yBAAyB;AAChDC,EAAAA,6BAA6B,EAAE,kCAAkC;AACjEC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,cAAc,EAAE,iBAAiB;AACjCC,EAAAA,QAAQ,EAAE,uBAAuB;AACjCC,EAAAA,WAAW,EAAE,2BAAA;AACjB,EAAC;AAEM,IAAMC,aAAa,GAAG;AACzBC,EAAAA,UAAU,EAAE,qCAAqC;AACjDC,EAAAA,wBAAwB,EAAE,6CAA6C;AACvEC,EAAAA,6BAA6B,EAAE,mDAAA;AACnC,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClB;AACAC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,eAAe,EAAE,wCAAwC;AAEzD;AACAC,EAAAA,eAAe,EAAE,yCAAyC;AAC1DC,EAAAA,yBAAyB,EAAE,oDAAoD;AAC/EC,EAAAA,oBAAoB,EAAE,+CAA+C;AACrEC,EAAAA,yBAAyB,EAAE,qDAAqD;AAChFC,EA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C;AAC/CC,EAAAA,eAAe,EAAE,wCAAwC;AACzDC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,yBAAyB,EAAE,oDAAoD;AAC/EC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,WAAW,EAAE,oCAAoC;AACjDC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,qBAAqB,EAAE,gDAAgD;AACvEC,EAAAA,gBAAgB,EAAE,0CAA0C;AAC5DC,EAAAA,mBAAmB,EAAE,6CAA6C;AAClEC,EAAAA,wBAAwB,EAAE,mDAAmD;AAE7EC,EAAAA,UAAU,EAAE,mCAAmC;AAC/CC,EAAAA,oBAAoB,EAAE,8CAA8C;AACpEC,EAAAA,gBAAgB,EAAE,0CAA0C;AAE5D;AACAC,EAAAA,iBAAiB,EAAE,2CAA2C;AAC9DC,EAAAA,kBAAkB,EAAE,4CAA4C;AAChEC,EAAAA,uBAAuB,EAAE,kDAAA;AAC7B;;;;;;"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var React = require('react');
|
6
|
-
var ActionButton_styles = require('./ActionButton.styles.js');
|
7
|
-
|
8
|
-
var ActionButton = function ActionButton(_ref) {
|
9
|
-
var icon = _ref.icon,
|
10
|
-
className = _ref.className,
|
11
|
-
onClick = _ref.onClick;
|
12
|
-
return /*#__PURE__*/React.createElement(ActionButton_styles.StyledIconButton, {
|
13
|
-
className: className,
|
14
|
-
onClick: onClick
|
15
|
-
}, icon);
|
16
|
-
};
|
17
|
-
|
18
|
-
exports.ActionButton = ActionButton;
|
19
|
-
//# sourceMappingURL=ActionButton.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ActionButton.js","sources":["../../../../../src/components/NumberInput/ui/ActionButton/ActionButton.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { StyledIconButton } from './ActionButton.styles';\nimport type { ActionButtonProps } from './ActionButton.types';\n\nexport const ActionButton: FC<ActionButtonProps> = ({ icon, className, onClick }) => {\n return (\n <StyledIconButton className={className} onClick={onClick}>\n {icon}\n </StyledIconButton>\n );\n};\n"],"names":["ActionButton","_ref","icon","className","onClick","React","createElement","StyledIconButton"],"mappings":";;;;;;;IAKaA,YAAmC,GAAG,SAAtCA,YAAmCA,CAAAC,IAAA,EAAqC;AAAA,EAAA,IAA/BC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,OAAO,GAAAH,IAAA,CAAPG,OAAO,CAAA;AAC1E,EAAA,oBACIC,KAAA,CAAAC,aAAA,CAACC,oCAAgB,EAAA;AAACJ,IAAAA,SAAS,EAAEA,SAAU;AAACC,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GAAA,EACpDF,IACa,CAAC,CAAA;AAE3B;;;;"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import './ActionButton.styles_x642ct.css';
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
5
|
-
|
6
|
-
var react = require('@linaria/react');
|
7
|
-
var common = require('../../../../engines/common.js');
|
8
|
-
var IconButton$1 = require('../../../IconButton/IconButton.js');
|
9
|
-
|
10
|
-
var mergedIconButtonConfig = /*#__PURE__*/common.mergeConfig(IconButton$1.iconButtonConfig);
|
11
|
-
var IconButton = /*#__PURE__*/common.component(mergedIconButtonConfig);
|
12
|
-
var _exp = function _exp() {
|
13
|
-
return IconButton;
|
14
|
-
};
|
15
|
-
var StyledIconButton = /*#__PURE__*/react.styled(_exp())({
|
16
|
-
name: "StyledIconButton",
|
17
|
-
"class": "sj0ab1b",
|
18
|
-
propsAsIs: true
|
19
|
-
});
|
20
|
-
|
21
|
-
exports.StyledIconButton = StyledIconButton;
|
22
|
-
//# sourceMappingURL=ActionButton.styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ActionButton.styles.js","sources":["../../../../../src/components/NumberInput/ui/ActionButton/ActionButton.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { iconButtonConfig } from '../../../IconButton';\nimport { component, mergeConfig } from '../../../../engines';\n\nconst mergedIconButtonConfig = mergeConfig(iconButtonConfig);\nconst IconButton = component(mergedIconButtonConfig);\n\nexport const StyledIconButton = styled(IconButton)``;\n"],"names":["mergedIconButtonConfig","mergeConfig","iconButtonConfig","IconButton","component","_exp","StyledIconButton","styled","name","class","propsAsIs"],"mappings":";;;;;;;;AAKA,IAAMA,sBAAsB,gBAAGC,kBAAW,CAACC,6BAAgB,CAAC,CAAA;AAC5D,IAAMC,UAAU,gBAAGC,gBAAS,CAACJ,sBAAsB,CAAC,CAAA;AAAC,IAAAK,IAAA,GALnCA,SAKmCA,IAAAA,GAAA;AAAA,EAAA,OAEdF,UAAU,CAAA;AAAA,CAAA,CAAA;AAA1C,IAAMG,gBAAgB,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAAc;;;;"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
.base_1gusher_b1chvyq8__76b641f5{color:var(--plasma-spinner-color);}
|
2
|
-
|
3
|
-
.base_ova69f_bw56nfh__55225c7f{width:var(--plasma-spinner-size);height:var(--plasma-spinner-size);}
|
4
|
-
|
5
|
-
.Spinner_styles_13q7ndk_b1hp2dsz__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;box-sizing:border-box;}
|
6
|
-
.Spinner_styles_13q7ndk_s122r4cn__af962114{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:var(--s122r4cn-0);height:var(--s122r4cn-1);-webkit-animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;animation:Spinner_styles_13q7ndk_rotateS122r4cn__af962114 1s linear infinite;}@-webkit-keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}@keyframes Spinner_styles_13q7ndk_rotateS122r4cn__af962114{from{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg);}}
|
7
|
-
|
8
|
-
.Input_styles_fhgb95_i1s8bsh6__3bed5c8f{overflow-x:auto;overflow-y:hidden;-webkit-flex:1;-ms-flex:1;flex:1;cursor:var(--i1s8bsh6-0);-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.Input_styles_fhgb95_i1s8bsh6__3bed5c8f::-webkit-scrollbar{display:none;}
|
9
|
-
.Input_styles_fhgb95_t6wb9c__3bed5c8f{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;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto;box-sizing:border-box;}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
.Input_styles_fhgb95_d1n4jo6t__3bed5c8f{position:relative;}
|
14
|
-
.Input_styles_fhgb95_i1tgbhg7__3bed5c8f{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:var(--i1tgbhg7-0);box-sizing:border-box;cursor:var(--i1tgbhg7-1);pointer-events:var(--i1tgbhg7-2);-webkit-transition:width 0.1s;transition:width 0.1s;}
|
15
|
-
.Input_styles_fhgb95_i1il5xze__3bed5c8f{position:absolute;z-index:-999;visibility:hidden;top:0;left:0;opacity:0;height:0;white-space:pre;}
|
@@ -1,199 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
-
var React = require('react');
|
7
|
-
var plasmaCore = require('@salutejs/plasma-core');
|
8
|
-
var NumberInput_tokens = require('../../NumberInput.tokens.js');
|
9
|
-
var index = require('../../../../utils/index.js');
|
10
|
-
var index$1 = require('../../utils/index.js');
|
11
|
-
var constants = require('../../../../utils/constants.js');
|
12
|
-
var Input_styles = require('./Input.styles.js');
|
13
|
-
var useDidMountEffect = require('../../../../hooks/useDidMountEffect.js');
|
14
|
-
var isNumber = require('../../../../utils/isNumber.js');
|
15
|
-
|
16
|
-
var _StyledSpinner;
|
17
|
-
var _excluded = ["value", "min", "max", "isLoading", "loader", "disabled", "segmentation", "textBefore", "textAfter", "isManualInput", "setInnerValue", "onChange", "onBlur", "onKeyDown"];
|
18
|
-
var NumberInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
19
|
-
var value = _ref.value,
|
20
|
-
min = _ref.min,
|
21
|
-
max = _ref.max,
|
22
|
-
isLoading = _ref.isLoading,
|
23
|
-
loader = _ref.loader,
|
24
|
-
disabled = _ref.disabled,
|
25
|
-
segmentation = _ref.segmentation,
|
26
|
-
textBefore = _ref.textBefore,
|
27
|
-
textAfter = _ref.textAfter,
|
28
|
-
isManualInput = _ref.isManualInput,
|
29
|
-
setInnerValue = _ref.setInnerValue,
|
30
|
-
onChange = _ref.onChange,
|
31
|
-
onBlur = _ref.onBlur,
|
32
|
-
onKeyDown = _ref.onKeyDown,
|
33
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
34
|
-
var _useState = React.useState(value ? "".concat(String(value).length, "ch") : '1ch'),
|
35
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
36
|
-
dynamicWidth = _useState2[0],
|
37
|
-
setDynamicWidth = _useState2[1];
|
38
|
-
var _useState3 = React.useState(Number(value)),
|
39
|
-
_useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
|
40
|
-
lastValidValue = _useState4[0],
|
41
|
-
setLastValidValue = _useState4[1];
|
42
|
-
var _useState5 = React.useState(undefined),
|
43
|
-
_useState6 = _rollupPluginBabelHelpers.slicedToArray(_useState5, 2),
|
44
|
-
errorClass = _useState6[0],
|
45
|
-
setErrorClass = _useState6[1];
|
46
|
-
var _useState7 = React.useState(),
|
47
|
-
_useState8 = _rollupPluginBabelHelpers.slicedToArray(_useState7, 2),
|
48
|
-
errorValue = _useState8[0],
|
49
|
-
setErrorValue = _useState8[1];
|
50
|
-
var _useState9 = React.useState(false),
|
51
|
-
_useState10 = _rollupPluginBabelHelpers.slicedToArray(_useState9, 2),
|
52
|
-
isEditing = _useState10[0],
|
53
|
-
setIsEditing = _useState10[1];
|
54
|
-
var inputHelperRef = React.useRef(null);
|
55
|
-
var wrapperRef = React.useRef(null);
|
56
|
-
var textWrapperRef = React.useRef(null);
|
57
|
-
var inputRef = React.useRef(null);
|
58
|
-
var inputForkRef = plasmaCore.useForkRef(inputRef, ref);
|
59
|
-
var solidViewClass = segmentation === 'solid' ? NumberInput_tokens.classes.solidView : undefined;
|
60
|
-
var manualInputClass = isManualInput ? NumberInput_tokens.classes.manualInput : undefined;
|
61
|
-
var getInputWidth = function getInputWidth() {
|
62
|
-
var _inputHelperRef$curre;
|
63
|
-
var firstRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
64
|
-
if (!firstRender && (_inputHelperRef$curre = inputHelperRef.current) !== null && _inputHelperRef$curre !== void 0 && _inputHelperRef$curre.clientWidth) {
|
65
|
-
var _inputHelperRef$curre2;
|
66
|
-
return "".concat((_inputHelperRef$curre2 = inputHelperRef.current) === null || _inputHelperRef$curre2 === void 0 ? void 0 : _inputHelperRef$curre2.clientWidth, "px");
|
67
|
-
}
|
68
|
-
if (value) {
|
69
|
-
return "".concat(String(value).length, "ch");
|
70
|
-
}
|
71
|
-
return '1ch';
|
72
|
-
};
|
73
|
-
var setValues = function setValues(event, newValue) {
|
74
|
-
setLastValidValue(newValue);
|
75
|
-
setInnerValue(newValue);
|
76
|
-
if (onChange) {
|
77
|
-
onChange(event, newValue);
|
78
|
-
}
|
79
|
-
};
|
80
|
-
var validateValue = function validateValue(newValue) {
|
81
|
-
console.log(newValue);
|
82
|
-
if (!newValue || !isNumber.isNumber(newValue)) {
|
83
|
-
setValues(null, lastValidValue);
|
84
|
-
return;
|
85
|
-
}
|
86
|
-
if (String(newValue).endsWith('.')) {
|
87
|
-
setValues(null, Number(newValue));
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
var resValue = Number(newValue);
|
91
|
-
if (max && resValue > max) {
|
92
|
-
setErrorClass(NumberInput_tokens.classes.errorAnimation);
|
93
|
-
setErrorValue(max);
|
94
|
-
return;
|
95
|
-
}
|
96
|
-
if (min && resValue < min) {
|
97
|
-
setErrorClass(NumberInput_tokens.classes.errorAnimation);
|
98
|
-
setErrorValue(min);
|
99
|
-
}
|
100
|
-
};
|
101
|
-
var handleManualInputChange = function handleManualInputChange(event) {
|
102
|
-
var _textWrapperRef$curre, _wrapperRef$current;
|
103
|
-
if (!isManualInput || disabled) {
|
104
|
-
return;
|
105
|
-
}
|
106
|
-
var newValue = event.target.value;
|
107
|
-
if (!newValue) {
|
108
|
-
setInnerValue('');
|
109
|
-
if (onChange) {
|
110
|
-
onChange(event, '');
|
111
|
-
}
|
112
|
-
return;
|
113
|
-
}
|
114
|
-
var cleanValue = newValue.replace(/[^-.\d]/g, '');
|
115
|
-
if (cleanValue.endsWith('.')) {
|
116
|
-
setInnerValue(cleanValue);
|
117
|
-
if (onChange) {
|
118
|
-
onChange(event, cleanValue);
|
119
|
-
}
|
120
|
-
return;
|
121
|
-
}
|
122
|
-
var isValid = index$1.numberPettern.test(cleanValue);
|
123
|
-
if (!isValid) {
|
124
|
-
setValues(event, lastValidValue);
|
125
|
-
return;
|
126
|
-
}
|
127
|
-
if (textWrapperRef !== null && textWrapperRef !== void 0 && textWrapperRef.current && wrapperRef !== null && wrapperRef !== void 0 && wrapperRef.current && (textWrapperRef === null || textWrapperRef === void 0 || (_textWrapperRef$curre = textWrapperRef.current) === null || _textWrapperRef$curre === void 0 ? void 0 : _textWrapperRef$curre.clientWidth) > (wrapperRef === null || wrapperRef === void 0 || (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 ? void 0 : _wrapperRef$current.clientWidth)) {
|
128
|
-
wrapperRef.current.scrollLeft = textWrapperRef.current.offsetWidth - textWrapperRef.current.offsetLeft || 0;
|
129
|
-
}
|
130
|
-
setValues(event, Number(cleanValue));
|
131
|
-
};
|
132
|
-
var handleClickInputWrapper = function handleClickInputWrapper() {
|
133
|
-
if (!isManualInput || !inputRef.current) {
|
134
|
-
return;
|
135
|
-
}
|
136
|
-
if (!isEditing) {
|
137
|
-
inputRef.current.select();
|
138
|
-
}
|
139
|
-
setIsEditing(true);
|
140
|
-
};
|
141
|
-
var handleBlur = function handleBlur(event) {
|
142
|
-
setIsEditing(false);
|
143
|
-
validateValue(value);
|
144
|
-
if (onBlur) {
|
145
|
-
onBlur(event);
|
146
|
-
}
|
147
|
-
};
|
148
|
-
var handleKeyDown = function handleKeyDown(event) {
|
149
|
-
if (!isManualInput || disabled) {
|
150
|
-
return;
|
151
|
-
}
|
152
|
-
if (event.keyCode === constants.keyCodes.Enter) {
|
153
|
-
event.preventDefault();
|
154
|
-
validateValue(value);
|
155
|
-
if (onKeyDown) {
|
156
|
-
onKeyDown(event);
|
157
|
-
}
|
158
|
-
}
|
159
|
-
};
|
160
|
-
var handleEndErrorAnimation = function handleEndErrorAnimation(correctValue) {
|
161
|
-
setErrorClass(undefined);
|
162
|
-
setValues(null, correctValue);
|
163
|
-
};
|
164
|
-
React.useEffect(function () {
|
165
|
-
setDynamicWidth(getInputWidth());
|
166
|
-
}, []);
|
167
|
-
useDidMountEffect.useDidMountEffect(function () {
|
168
|
-
setDynamicWidth(getInputWidth(false));
|
169
|
-
}, [value]);
|
170
|
-
return /*#__PURE__*/React.createElement(Input_styles.InputWrapper, {
|
171
|
-
ref: wrapperRef,
|
172
|
-
className: index.cx(solidViewClass, errorClass, manualInputClass),
|
173
|
-
isManualInput: Boolean(isManualInput),
|
174
|
-
onClick: handleClickInputWrapper
|
175
|
-
}, /*#__PURE__*/React.createElement(Input_styles.TextWrapper, {
|
176
|
-
ref: textWrapperRef
|
177
|
-
}, !isLoading && textBefore && /*#__PURE__*/React.createElement(Input_styles.AdditionalText, {
|
178
|
-
className: NumberInput_tokens.classes.textBefore
|
179
|
-
}, textBefore), isLoading ? /*#__PURE__*/React.createElement(Input_styles.Loader, null, loader || _StyledSpinner || (_StyledSpinner = /*#__PURE__*/React.createElement(Input_styles.StyledSpinner, null))) : /*#__PURE__*/React.createElement(Input_styles.DynamicInput, null, /*#__PURE__*/React.createElement(Input_styles.Input, _rollupPluginBabelHelpers.extends({
|
180
|
-
ref: inputForkRef,
|
181
|
-
dynamicWidth: dynamicWidth,
|
182
|
-
value: value,
|
183
|
-
isManualInput: Boolean(isManualInput),
|
184
|
-
tabIndex: disabled || !isManualInput ? -1 : 0,
|
185
|
-
onChange: handleManualInputChange,
|
186
|
-
onBlur: handleBlur,
|
187
|
-
onKeyDown: handleKeyDown,
|
188
|
-
onAnimationEnd: function onAnimationEnd() {
|
189
|
-
return handleEndErrorAnimation(Number(errorValue));
|
190
|
-
}
|
191
|
-
}, rest)), /*#__PURE__*/React.createElement(Input_styles.InputWidthHelper, {
|
192
|
-
ref: inputHelperRef
|
193
|
-
}, value)), !isLoading && textAfter && /*#__PURE__*/React.createElement(Input_styles.AdditionalText, {
|
194
|
-
className: NumberInput_tokens.classes.textAfter
|
195
|
-
}, textAfter)));
|
196
|
-
});
|
197
|
-
|
198
|
-
exports.NumberInput = NumberInput;
|
199
|
-
//# sourceMappingURL=Input.js.map
|