@salutejs/plasma-new-hope 0.185.0-canary.1500.11703995241.0 → 0.185.0-canary.1511.11704579010.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Badge/Badge.css +3 -3
- package/cjs/components/Badge/Badge.js +3 -10
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Badge/Badge.styles.js +5 -5
- package/cjs/components/Badge/Badge.styles.js.map +1 -1
- package/cjs/components/Badge/Badge.styles_8pi3br.css +4 -0
- package/cjs/components/Badge/Badge.tokens.js +1 -2
- package/cjs/components/Badge/Badge.tokens.js.map +1 -1
- package/cjs/components/NumberInput/NumberInput.css +52 -0
- package/cjs/components/NumberInput/NumberInput.js +205 -0
- package/cjs/components/NumberInput/NumberInput.js.map +1 -0
- package/cjs/components/NumberInput/NumberInput.styles.js +9 -0
- package/cjs/components/NumberInput/NumberInput.styles.js.map +1 -0
- package/cjs/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
- package/cjs/components/NumberInput/NumberInput.tokens.js +102 -0
- package/cjs/components/NumberInput/NumberInput.tokens.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +19 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +22 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
- package/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.css +15 -0
- package/cjs/components/NumberInput/ui/Input/Input.js +204 -0
- package/cjs/components/NumberInput/ui/Input/Input.js.map +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles.js +96 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
- package/cjs/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
- package/cjs/components/NumberInput/utils/index.js +12 -0
- package/cjs/components/NumberInput/utils/index.js.map +1 -0
- package/cjs/components/NumberInput/variations/_background-type/base.js +9 -0
- package/cjs/components/NumberInput/variations/_background-type/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
- package/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/cjs/components/NumberInput/variations/_disabled/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
- package/cjs/components/NumberInput/variations/_segmentation/base.js +9 -0
- package/cjs/components/NumberInput/variations/_segmentation/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_segmentation/base_14s5rot.css +1 -0
- package/cjs/components/NumberInput/variations/_shape/base.js +9 -0
- package/cjs/components/NumberInput/variations/_shape/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
- package/cjs/components/NumberInput/variations/_size/base.js +9 -0
- package/cjs/components/NumberInput/variations/_size/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
- package/cjs/components/NumberInput/variations/_view/base.js +9 -0
- package/cjs/components/NumberInput/variations/_view/base.js.map +1 -0
- package/cjs/components/NumberInput/variations/_view/base_tnfbb5.css +1 -0
- package/cjs/components/Tabs/tokens.js +1 -2
- package/cjs/components/Tabs/tokens.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -9
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +5 -0
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
- package/{es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_j8lg9u.css → cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_4zingj.css} +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -9
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +5 -0
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_12fk3xi.css → base_fueiq8.css} +1 -1
- package/cjs/index.css +38 -15
- package/cjs/index.js +6 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Badge/Badge.js +3 -15
- package/emotion/cjs/components/Badge/Badge.styles.js +13 -4
- package/emotion/cjs/components/Badge/Badge.tokens.js +1 -2
- package/emotion/cjs/components/NumberInput/NumberInput.js +214 -0
- package/emotion/cjs/components/NumberInput/NumberInput.styles.js +17 -0
- package/emotion/cjs/components/NumberInput/NumberInput.template-doc.mdx +214 -0
- package/emotion/cjs/components/NumberInput/NumberInput.tokens.js +99 -0
- package/emotion/cjs/components/NumberInput/NumberInput.types.js +5 -0
- package/emotion/cjs/components/NumberInput/index.js +31 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +16 -0
- package/emotion/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.js +212 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.styles.js +81 -0
- package/emotion/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
- package/emotion/cjs/components/NumberInput/ui/index.js +19 -0
- package/emotion/cjs/components/NumberInput/utils/index.js +9 -0
- package/emotion/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
- package/emotion/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/emotion/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/emotion/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/emotion/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
- package/emotion/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/emotion/cjs/components/NumberInput/variations/_shape/base.js +11 -0
- package/emotion/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/emotion/cjs/components/NumberInput/variations/_size/base.js +13 -0
- package/emotion/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
- package/emotion/cjs/components/NumberInput/variations/_view/base.js +13 -0
- package/emotion/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
- package/emotion/cjs/components/Tabs/tokens.js +1 -2
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
- package/emotion/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +12 -12
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
- package/emotion/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +12 -12
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
- package/emotion/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
- package/emotion/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
- package/emotion/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
- package/emotion/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
- package/emotion/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Badge/Badge.js +3 -16
- package/emotion/es/components/Badge/Badge.styles.js +14 -5
- package/emotion/es/components/Badge/Badge.tokens.js +1 -2
- package/emotion/es/components/NumberInput/NumberInput.js +206 -0
- package/emotion/es/components/NumberInput/NumberInput.styles.js +11 -0
- package/emotion/es/components/NumberInput/NumberInput.template-doc.mdx +214 -0
- package/emotion/es/components/NumberInput/NumberInput.tokens.js +93 -0
- package/emotion/es/components/NumberInput/NumberInput.types.js +1 -0
- package/emotion/es/components/NumberInput/index.js +2 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +9 -0
- package/emotion/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.js +203 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.styles.js +74 -0
- package/emotion/es/components/NumberInput/ui/Input/Input.types.js +1 -0
- package/emotion/es/components/NumberInput/ui/index.js +2 -0
- package/emotion/es/components/NumberInput/utils/index.js +3 -0
- package/emotion/es/components/NumberInput/variations/_background-type/base.js +4 -0
- package/emotion/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/emotion/es/components/NumberInput/variations/_disabled/base.js +3 -0
- package/emotion/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/emotion/es/components/NumberInput/variations/_segmentation/base.js +6 -0
- package/emotion/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/emotion/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/emotion/es/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/emotion/es/components/NumberInput/variations/_size/base.js +7 -0
- package/emotion/es/components/NumberInput/variations/_size/tokens.json +22 -0
- package/emotion/es/components/NumberInput/variations/_view/base.js +7 -0
- package/emotion/es/components/NumberInput/variations/_view/tokens.json +14 -0
- package/emotion/es/components/Tabs/tokens.js +1 -2
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -15
- package/emotion/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +13 -13
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -15
- package/emotion/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +13 -13
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +14 -17
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
- package/emotion/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
- package/emotion/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
- package/emotion/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
- package/emotion/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
- package/emotion/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +15 -18
- package/emotion/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +6 -9
- package/emotion/es/index.js +2 -1
- package/es/components/Badge/Badge.css +3 -3
- package/es/components/Badge/Badge.js +4 -11
- package/es/components/Badge/Badge.js.map +1 -1
- package/es/components/Badge/Badge.styles.js +5 -5
- package/es/components/Badge/Badge.styles.js.map +1 -1
- package/es/components/Badge/Badge.styles_8pi3br.css +4 -0
- package/es/components/Badge/Badge.tokens.js +1 -2
- package/es/components/Badge/Badge.tokens.js.map +1 -1
- package/es/components/NumberInput/NumberInput.css +52 -0
- package/es/components/NumberInput/NumberInput.js +200 -0
- package/es/components/NumberInput/NumberInput.js.map +1 -0
- package/es/components/NumberInput/NumberInput.styles.js +5 -0
- package/es/components/NumberInput/NumberInput.styles.js.map +1 -0
- package/es/components/NumberInput/NumberInput.styles_jeawjl.css +1 -0
- package/es/components/NumberInput/NumberInput.tokens.js +96 -0
- package/es/components/NumberInput/NumberInput.tokens.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js +15 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +18 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js.map +1 -0
- package/es/components/NumberInput/ui/ActionButton/ActionButton.styles_x642ct.css +1 -0
- package/es/components/NumberInput/ui/Input/Input.css +15 -0
- package/es/components/NumberInput/ui/Input/Input.js +200 -0
- package/es/components/NumberInput/ui/Input/Input.js.map +1 -0
- package/es/components/NumberInput/ui/Input/Input.styles.js +85 -0
- package/es/components/NumberInput/ui/Input/Input.styles.js.map +1 -0
- package/es/components/NumberInput/ui/Input/Input.styles_fhgb95.css +8 -0
- package/es/components/NumberInput/utils/index.js +6 -0
- package/es/components/NumberInput/utils/index.js.map +1 -0
- package/es/components/NumberInput/variations/_background-type/base.js +5 -0
- package/es/components/NumberInput/variations/_background-type/base.js.map +1 -0
- package/es/components/NumberInput/variations/_background-type/base_dx9knv.css +1 -0
- package/es/components/NumberInput/variations/_disabled/base.js +5 -0
- package/es/components/NumberInput/variations/_disabled/base.js.map +1 -0
- package/es/components/NumberInput/variations/_disabled/base_1sl0mh8.css +1 -0
- package/es/components/NumberInput/variations/_segmentation/base.js +5 -0
- package/es/components/NumberInput/variations/_segmentation/base.js.map +1 -0
- package/es/components/NumberInput/variations/_segmentation/base_14s5rot.css +1 -0
- package/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/es/components/NumberInput/variations/_shape/base.js.map +1 -0
- package/es/components/NumberInput/variations/_shape/base_k05biw.css +1 -0
- package/es/components/NumberInput/variations/_size/base.js +5 -0
- package/es/components/NumberInput/variations/_size/base.js.map +1 -0
- package/es/components/NumberInput/variations/_size/base_yqdmk4.css +1 -0
- package/es/components/NumberInput/variations/_view/base.js +5 -0
- package/es/components/NumberInput/variations/_view/base.js.map +1 -0
- package/es/components/NumberInput/variations/_view/base_tnfbb5.css +1 -0
- package/es/components/Tabs/tokens.js +1 -2
- package/es/components/Tabs/tokens.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.css +6 -6
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +4 -10
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +6 -6
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_uaaqqg.css +5 -0
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base.js +1 -1
- package/{cjs/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_j8lg9u.css → es/components/Tabs/ui/horizontal/HorizontalTabItem/variations/_view/base_4zingj.css} +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.css +6 -6
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +4 -10
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +6 -6
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js.map +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_1g7zipg.css +5 -0
- package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/base.js +1 -1
- package/es/components/Tabs/ui/vertical/VerticalTabItem/variations/_view/{base_12fk3xi.css → base_fueiq8.css} +1 -1
- package/es/index.css +38 -15
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Badge/Badge.js +3 -15
- package/styled-components/cjs/components/Badge/Badge.styles.js +2 -2
- package/styled-components/cjs/components/Badge/Badge.tokens.js +1 -2
- package/styled-components/cjs/components/NumberInput/NumberInput.js +214 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.styles.js +8 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.template-doc.mdx +214 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.tokens.js +99 -0
- package/styled-components/cjs/components/NumberInput/NumberInput.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/index.js +31 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.js +18 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.styles.js +15 -0
- package/styled-components/cjs/components/NumberInput/ui/ActionButton/ActionButton.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.js +212 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.styles.js +48 -0
- package/styled-components/cjs/components/NumberInput/ui/Input/Input.types.js +5 -0
- package/styled-components/cjs/components/NumberInput/ui/index.js +19 -0
- package/styled-components/cjs/components/NumberInput/utils/index.js +9 -0
- package/styled-components/cjs/components/NumberInput/variations/_background-type/base.js +10 -0
- package/styled-components/cjs/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/styled-components/cjs/components/NumberInput/variations/_disabled/base.js +9 -0
- package/styled-components/cjs/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/base.js +12 -0
- package/styled-components/cjs/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/styled-components/cjs/components/NumberInput/variations/_shape/base.js +11 -0
- package/styled-components/cjs/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/styled-components/cjs/components/NumberInput/variations/_size/base.js +13 -0
- package/styled-components/cjs/components/NumberInput/variations/_size/tokens.json +22 -0
- package/styled-components/cjs/components/NumberInput/variations/_view/base.js +13 -0
- package/styled-components/cjs/components/NumberInput/variations/_view/tokens.json +14 -0
- package/styled-components/cjs/components/Tabs/tokens.js +1 -2
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -14
- package/styled-components/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +8 -8
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -14
- package/styled-components/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +9 -9
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +46 -0
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js +46 -0
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
- package/styled-components/cjs/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
- package/styled-components/cjs/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Badge/Badge.js +3 -16
- package/styled-components/es/components/Badge/Badge.styles.js +3 -3
- package/styled-components/es/components/Badge/Badge.tokens.js +1 -2
- package/styled-components/es/components/NumberInput/NumberInput.js +206 -0
- package/styled-components/es/components/NumberInput/NumberInput.styles.js +2 -0
- package/styled-components/es/components/NumberInput/NumberInput.template-doc.mdx +214 -0
- package/styled-components/es/components/NumberInput/NumberInput.tokens.js +93 -0
- package/styled-components/es/components/NumberInput/NumberInput.types.js +1 -0
- package/styled-components/es/components/NumberInput/index.js +2 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.js +11 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.styles.js +8 -0
- package/styled-components/es/components/NumberInput/ui/ActionButton/ActionButton.types.js +1 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.js +203 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.styles.js +41 -0
- package/styled-components/es/components/NumberInput/ui/Input/Input.types.js +1 -0
- package/styled-components/es/components/NumberInput/ui/index.js +2 -0
- package/styled-components/es/components/NumberInput/utils/index.js +3 -0
- package/styled-components/es/components/NumberInput/variations/_background-type/base.js +4 -0
- package/styled-components/es/components/NumberInput/variations/_background-type/tokens.json +6 -0
- package/styled-components/es/components/NumberInput/variations/_disabled/base.js +3 -0
- package/styled-components/es/components/NumberInput/variations/_disabled/tokens.json +4 -0
- package/styled-components/es/components/NumberInput/variations/_segmentation/base.js +6 -0
- package/styled-components/es/components/NumberInput/variations/_segmentation/tokens.json +1 -0
- package/styled-components/es/components/NumberInput/variations/_shape/base.js +5 -0
- package/styled-components/es/components/NumberInput/variations/_shape/tokens.json +1 -0
- package/styled-components/es/components/NumberInput/variations/_size/base.js +7 -0
- package/styled-components/es/components/NumberInput/variations/_size/tokens.json +22 -0
- package/styled-components/es/components/NumberInput/variations/_view/base.js +7 -0
- package/styled-components/es/components/NumberInput/variations/_view/tokens.json +14 -0
- package/styled-components/es/components/Tabs/tokens.js +1 -2
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.js +3 -15
- package/styled-components/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.js +9 -9
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.js +3 -15
- package/styled-components/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.js +10 -10
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +0 -3
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +1 -5
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.config.js +40 -0
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +19 -51
- package/styled-components/es/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
- package/styled-components/es/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.config.js +40 -0
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.js +5 -0
- package/styled-components/es/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx +108 -0
- package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +19 -51
- package/styled-components/es/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.js +0 -3
- package/styled-components/es/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.js +0 -3
- package/styled-components/es/index.js +2 -1
- package/types/components/Badge/Badge.d.ts.map +1 -1
- package/types/components/Badge/Badge.styles.d.ts +1 -1
- package/types/components/Badge/Badge.styles.d.ts.map +1 -1
- package/types/components/Badge/Badge.tokens.d.ts +0 -1
- package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +0 -5
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/NumberInput/NumberInput.d.ts +38 -0
- package/types/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.styles.d.ts +2 -0
- package/types/components/NumberInput/NumberInput.styles.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.tokens.d.ts +88 -0
- package/types/components/NumberInput/NumberInput.tokens.d.ts.map +1 -0
- package/types/components/NumberInput/NumberInput.types.d.ts +112 -0
- package/types/components/NumberInput/NumberInput.types.d.ts.map +1 -0
- package/types/components/NumberInput/index.d.ts +3 -0
- package/types/components/NumberInput/index.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts +4 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts +45 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.styles.d.ts.map +1 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts +7 -0
- package/types/components/NumberInput/ui/ActionButton/ActionButton.types.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.d.ts +19 -0
- package/types/components/NumberInput/ui/Input/Input.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts +30 -0
- package/types/components/NumberInput/ui/Input/Input.styles.d.ts.map +1 -0
- package/types/components/NumberInput/ui/Input/Input.types.d.ts +19 -0
- package/types/components/NumberInput/ui/Input/Input.types.d.ts.map +1 -0
- package/types/components/NumberInput/ui/index.d.ts +3 -0
- package/types/components/NumberInput/ui/index.d.ts.map +1 -0
- package/types/components/NumberInput/utils/index.d.ts +4 -0
- package/types/components/NumberInput/utils/index.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_background-type/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_background-type/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_disabled/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_segmentation/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_segmentation/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_shape/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_shape/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_size/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_size/base.d.ts.map +1 -0
- package/types/components/NumberInput/variations/_view/base.d.ts +2 -0
- package/types/components/NumberInput/variations/_view/base.d.ts.map +1 -0
- package/types/components/Tabs/TabItem.types.d.ts +0 -5
- package/types/components/Tabs/TabItem.types.d.ts.map +1 -1
- package/types/components/Tabs/tokens.d.ts +0 -1
- package/types/components/Tabs/tokens.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts +1 -1
- package/types/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.d.ts.map +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts +1 -1
- package/types/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts +0 -3
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +0 -6
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts +39 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts +82 -0
- package/types/examples/plasma_b2c/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts +0 -6
- package/types/examples/plasma_b2c/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
- package/types/examples/plasma_b2c/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
- package/types/examples/plasma_b2c/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +0 -3
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts +39 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts +82 -0
- package/types/examples/plasma_web/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts +0 -6
- package/types/examples/plasma_web/components/Tabs/TabItem.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts +0 -3
- package/types/examples/plasma_web/components/Tabs/horizontal/HorizontalTabItem.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts +0 -3
- package/types/examples/plasma_web/components/Tabs/vertical/VerticalTabItem.config.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Badge/Badge.styles_hhbwyi.css +0 -4
- package/cjs/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +0 -5
- package/cjs/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +0 -5
- package/es/components/Badge/Badge.styles_hhbwyi.css +0 -4
- package/es/components/Tabs/ui/horizontal/HorizontalTabItem/HorizontalTabItem.styles_1yi1gll.css +0 -5
- package/es/components/Tabs/ui/vertical/VerticalTabItem/VerticalTabItem.styles_17vv6lq.css +0 -5
package/styled-components/cjs/examples/plasma_b2c/components/NumberInput/NumberInput.stories.tsx
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
import React, { ComponentProps, useState } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { action } from '@storybook/addon-actions';
|
4
|
+
|
5
|
+
import { WithTheme } from '../../../_helpers';
|
6
|
+
|
7
|
+
import { NumberInput } from './NumberInput';
|
8
|
+
|
9
|
+
const onChange = action('onChange');
|
10
|
+
const onDecrement = action('onDecrement');
|
11
|
+
const onIncrement = action('onIncrement');
|
12
|
+
|
13
|
+
const views = ['default', 'secondary', 'accent', 'clear'];
|
14
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
15
|
+
const shapes = ['cornered', 'pilled'];
|
16
|
+
const inputBackgroundTypes = ['fill', 'clear'];
|
17
|
+
const segmentation = ['default', 'segmented', 'solid'];
|
18
|
+
|
19
|
+
const meta: Meta<typeof NumberInput> = {
|
20
|
+
title: 'plasma_b2c/NumberInput',
|
21
|
+
component: NumberInput,
|
22
|
+
decorators: [WithTheme],
|
23
|
+
argTypes: {
|
24
|
+
min: {
|
25
|
+
control: {
|
26
|
+
type: 'number',
|
27
|
+
},
|
28
|
+
},
|
29
|
+
max: {
|
30
|
+
control: {
|
31
|
+
type: 'number',
|
32
|
+
},
|
33
|
+
},
|
34
|
+
view: {
|
35
|
+
options: views,
|
36
|
+
control: {
|
37
|
+
type: 'select',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
size: {
|
41
|
+
options: sizes,
|
42
|
+
control: {
|
43
|
+
type: 'inline-radio',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
shape: {
|
47
|
+
options: shapes,
|
48
|
+
control: {
|
49
|
+
type: 'inline-radio',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
inputBackgroundType: {
|
53
|
+
options: inputBackgroundTypes,
|
54
|
+
control: {
|
55
|
+
type: 'inline-radio',
|
56
|
+
},
|
57
|
+
},
|
58
|
+
segmentation: {
|
59
|
+
options: segmentation,
|
60
|
+
control: {
|
61
|
+
type: 'select',
|
62
|
+
},
|
63
|
+
},
|
64
|
+
},
|
65
|
+
};
|
66
|
+
|
67
|
+
export default meta;
|
68
|
+
|
69
|
+
type StoryPropsDefault = ComponentProps<typeof NumberInput>;
|
70
|
+
|
71
|
+
const StoryDefault = (args: StoryPropsDefault) => {
|
72
|
+
const [value, setValue] = useState(5);
|
73
|
+
|
74
|
+
const handleChange = (_: any, newValue: number) => {
|
75
|
+
setValue(newValue);
|
76
|
+
onChange(newValue);
|
77
|
+
};
|
78
|
+
|
79
|
+
return (
|
80
|
+
<NumberInput
|
81
|
+
{...args}
|
82
|
+
value={value}
|
83
|
+
onChange={handleChange}
|
84
|
+
onDecrement={onDecrement}
|
85
|
+
onIncrement={onIncrement}
|
86
|
+
/>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
|
90
|
+
export const Default: StoryObj<StoryPropsDefault> = {
|
91
|
+
args: {
|
92
|
+
view: 'default',
|
93
|
+
size: 'l',
|
94
|
+
shape: 'cornered',
|
95
|
+
inputBackgroundType: 'fill',
|
96
|
+
segmentation: 'default',
|
97
|
+
min: 0,
|
98
|
+
max: 9,
|
99
|
+
step: 1,
|
100
|
+
width: 188,
|
101
|
+
isManualInput: false,
|
102
|
+
textBefore: '',
|
103
|
+
textAfter: '',
|
104
|
+
isLoading: false,
|
105
|
+
disabled: false,
|
106
|
+
},
|
107
|
+
render: StoryDefault,
|
108
|
+
};
|
@@ -29,7 +29,6 @@ type CustomStoryTabsProps = {
|
|
29
29
|
|
30
30
|
const contentLeftOptions = ['none', 'icon'];
|
31
31
|
const contentRightOptions = ['none', 'counter', 'icon'];
|
32
|
-
const labels = ['Label', 'Middle label', 'Very long label'];
|
33
32
|
|
34
33
|
const getContentLeft = (contentLeftOption: string, size: string) => {
|
35
34
|
const iconSize = size === 'xs' ? 'xs' : 's';
|
@@ -77,12 +76,6 @@ const meta: Meta<StoryTabsProps> = {
|
|
77
76
|
},
|
78
77
|
if: { arg: 'helperText', eq: '' },
|
79
78
|
},
|
80
|
-
maxItemWidth: {
|
81
|
-
control: {
|
82
|
-
type: 'text',
|
83
|
-
},
|
84
|
-
if: { arg: 'stretch', truthy: false },
|
85
|
-
},
|
86
79
|
},
|
87
80
|
};
|
88
81
|
|
@@ -97,14 +90,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
97
90
|
contentRight: contentRightOption,
|
98
91
|
hasDivider,
|
99
92
|
stretch,
|
100
|
-
maxItemWidth,
|
101
93
|
helperText,
|
102
94
|
} = props;
|
103
95
|
const items = Array(itemQuantity).fill(0);
|
104
96
|
const [index, setIndex] = useState(0);
|
105
97
|
|
106
98
|
return (
|
107
|
-
<Tabs
|
99
|
+
<Tabs view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
|
108
100
|
{items.map((_, i) => {
|
109
101
|
if (helperText !== '') {
|
110
102
|
return (
|
@@ -118,9 +110,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
118
110
|
value={helperText}
|
119
111
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
120
112
|
size={size as Size}
|
121
|
-
maxItemWidth={maxItemWidth}
|
122
113
|
>
|
123
|
-
{
|
114
|
+
{`Label${i + 1}`}
|
124
115
|
</TabItem>
|
125
116
|
);
|
126
117
|
}
|
@@ -136,9 +127,8 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
|
|
136
127
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
137
128
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
138
129
|
size={size as Size}
|
139
|
-
maxItemWidth={maxItemWidth}
|
140
130
|
>
|
141
|
-
{
|
131
|
+
{`Label${i + 1}`}
|
142
132
|
</TabItem>
|
143
133
|
);
|
144
134
|
})}
|
@@ -157,7 +147,6 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
|
|
157
147
|
hasDivider,
|
158
148
|
helperText,
|
159
149
|
width,
|
160
|
-
maxItemWidth,
|
161
150
|
} = props;
|
162
151
|
const items = Array(itemQuantity).fill(0);
|
163
152
|
const [index, setIndex] = useState(0);
|
@@ -177,9 +166,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
|
|
177
166
|
value={helperText}
|
178
167
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
179
168
|
size={size as Size}
|
180
|
-
maxItemWidth={maxItemWidth}
|
181
169
|
>
|
182
|
-
{
|
170
|
+
{`Label${i + 1}`}
|
183
171
|
</TabItem>
|
184
172
|
);
|
185
173
|
}
|
@@ -195,9 +183,8 @@ const StoryHorizontalScroll = (props: HorizontalStoryTabsProps) => {
|
|
195
183
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
196
184
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
197
185
|
size={size as Size}
|
198
|
-
maxItemWidth={maxItemWidth}
|
199
186
|
>
|
200
|
-
{
|
187
|
+
{`Label${i + 1}`}
|
201
188
|
</TabItem>
|
202
189
|
);
|
203
190
|
})}
|
@@ -215,7 +202,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
|
|
215
202
|
contentRight: contentRightOption,
|
216
203
|
hasDivider,
|
217
204
|
helperText,
|
218
|
-
maxItemWidth,
|
219
205
|
} = props;
|
220
206
|
const maxItemQuantity = 3;
|
221
207
|
const items = Array(itemQuantity).fill(0);
|
@@ -248,9 +234,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
|
|
248
234
|
value={helperText}
|
249
235
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
250
236
|
size={size as Size}
|
251
|
-
maxItemWidth={maxItemWidth}
|
252
237
|
>
|
253
|
-
{
|
238
|
+
{`Label${i + 1}`}
|
254
239
|
</TabItem>
|
255
240
|
);
|
256
241
|
}
|
@@ -266,9 +251,8 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
|
|
266
251
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
267
252
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
268
253
|
size={size as Size}
|
269
|
-
maxItemWidth={maxItemWidth}
|
270
254
|
>
|
271
|
-
{
|
255
|
+
{`Label${i + 1}`}
|
272
256
|
</TabItem>
|
273
257
|
);
|
274
258
|
})}
|
@@ -285,7 +269,6 @@ const StoryHorizontalShowAll = (props: HorizontalStoryTabsProps) => {
|
|
285
269
|
tabIndex={!disabled ? 0 : -1}
|
286
270
|
disabled={disabled}
|
287
271
|
size={size as Size}
|
288
|
-
maxItemWidth="auto"
|
289
272
|
>
|
290
273
|
ShowAll
|
291
274
|
</TabItem>
|
@@ -302,10 +285,9 @@ export const HorizontalTabs: StoryObj<HorizontalStoryTabsProps> = {
|
|
302
285
|
disabled: false,
|
303
286
|
hasDivider: true,
|
304
287
|
helperText: '',
|
305
|
-
itemQuantity:
|
288
|
+
itemQuantity: 8,
|
306
289
|
stretch: false,
|
307
290
|
width: '15rem',
|
308
|
-
maxItemWidth: '',
|
309
291
|
},
|
310
292
|
argTypes: {
|
311
293
|
contentLeft: {
|
@@ -361,7 +343,6 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
|
|
361
343
|
contentRight: contentRightOption,
|
362
344
|
hasDivider,
|
363
345
|
helperText,
|
364
|
-
maxItemWidth,
|
365
346
|
} = props;
|
366
347
|
const items = Array(itemQuantity).fill(0);
|
367
348
|
const [index, setIndex] = useState(0);
|
@@ -382,9 +363,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
|
|
382
363
|
value={helperText}
|
383
364
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
384
365
|
size={size as Size}
|
385
|
-
maxItemWidth={maxItemWidth}
|
386
366
|
>
|
387
|
-
{
|
367
|
+
{`Label${i + 1}`}
|
388
368
|
</TabItem>
|
389
369
|
);
|
390
370
|
}
|
@@ -401,9 +381,8 @@ const StoryVerticalDefault = (props: VerticalStoryTabsProps) => {
|
|
401
381
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
402
382
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
403
383
|
size={size as Size}
|
404
|
-
maxItemWidth={maxItemWidth}
|
405
384
|
>
|
406
|
-
{
|
385
|
+
{`Label${i + 1}`}
|
407
386
|
</TabItem>
|
408
387
|
);
|
409
388
|
})}
|
@@ -422,7 +401,6 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
|
|
422
401
|
hasDivider,
|
423
402
|
helperText,
|
424
403
|
height,
|
425
|
-
maxItemWidth,
|
426
404
|
} = props;
|
427
405
|
const items = Array(itemQuantity).fill(0);
|
428
406
|
const [index, setIndex] = useState(0);
|
@@ -450,9 +428,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
|
|
450
428
|
value={helperText}
|
451
429
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
452
430
|
size={size as Size}
|
453
|
-
maxItemWidth={maxItemWidth}
|
454
431
|
>
|
455
|
-
{
|
432
|
+
{`Label${i + 1}`}
|
456
433
|
</TabItem>
|
457
434
|
);
|
458
435
|
}
|
@@ -469,9 +446,8 @@ const StoryVerticalScroll = (props: VerticalStoryTabsProps) => {
|
|
469
446
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
470
447
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
471
448
|
size={size as Size}
|
472
|
-
maxItemWidth={maxItemWidth}
|
473
449
|
>
|
474
|
-
{
|
450
|
+
{`Label${i + 1}`}
|
475
451
|
</TabItem>
|
476
452
|
);
|
477
453
|
})}
|
@@ -489,7 +465,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
|
|
489
465
|
contentRight: contentRightOption,
|
490
466
|
hasDivider,
|
491
467
|
helperText,
|
492
|
-
maxItemWidth,
|
493
468
|
} = props;
|
494
469
|
const maxItemQuantity = 3;
|
495
470
|
const items = Array(itemQuantity).fill(0);
|
@@ -523,9 +498,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
|
|
523
498
|
value={helperText}
|
524
499
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
525
500
|
size={size as Size}
|
526
|
-
maxItemWidth={maxItemWidth}
|
527
501
|
>
|
528
|
-
{
|
502
|
+
{`Label${i + 1}`}
|
529
503
|
</TabItem>
|
530
504
|
);
|
531
505
|
}
|
@@ -542,9 +516,8 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
|
|
542
516
|
contentLeft={getContentLeft(contentLeftOption, size as Size)}
|
543
517
|
contentRight={getContentRight(contentRightOption, size as Size)}
|
544
518
|
size={size as Size}
|
545
|
-
maxItemWidth={maxItemWidth}
|
546
519
|
>
|
547
|
-
{
|
520
|
+
{`Label${i + 1}`}
|
548
521
|
</TabItem>
|
549
522
|
);
|
550
523
|
})}
|
@@ -561,7 +534,6 @@ const StoryVerticalShowAll = (props: VerticalStoryTabsProps) => {
|
|
561
534
|
tabIndex={!disabled ? 0 : -1}
|
562
535
|
disabled={disabled}
|
563
536
|
size={size as Size}
|
564
|
-
maxItemWidth="auto"
|
565
537
|
>
|
566
538
|
ShowAll
|
567
539
|
</TabItem>
|
@@ -576,11 +548,10 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
|
|
576
548
|
size: 'xs',
|
577
549
|
disabled: false,
|
578
550
|
hasDivider: true,
|
579
|
-
itemQuantity:
|
551
|
+
itemQuantity: 8,
|
580
552
|
orientation: 'vertical',
|
581
553
|
helperText: '',
|
582
554
|
height: '10rem',
|
583
|
-
maxItemWidth: '',
|
584
555
|
},
|
585
556
|
argTypes: {
|
586
557
|
contentLeft: {
|
@@ -633,7 +604,7 @@ export const VerticalTabs: StoryObj<VerticalStoryTabsProps> = {
|
|
633
604
|
};
|
634
605
|
|
635
606
|
const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
636
|
-
const { disabled, itemQuantity, size, helperText
|
607
|
+
const { disabled, itemQuantity, size, helperText } = props;
|
637
608
|
const items = Array(itemQuantity).fill(0);
|
638
609
|
const [index, setIndex] = useState(0);
|
639
610
|
|
@@ -649,7 +620,6 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
|
649
620
|
disabled={disabled}
|
650
621
|
value={helperText}
|
651
622
|
size={size as HeaderSize}
|
652
|
-
maxItemWidth={maxItemWidth}
|
653
623
|
>
|
654
624
|
{`Label${i + 1}`}
|
655
625
|
</TabItem>
|
@@ -659,7 +629,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
|
|
659
629
|
};
|
660
630
|
|
661
631
|
const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
|
662
|
-
const { disabled, itemQuantity, size, helperText, width
|
632
|
+
const { disabled, itemQuantity, size, helperText, width } = props;
|
663
633
|
const items = Array(itemQuantity).fill(0);
|
664
634
|
const [index, setIndex] = useState(0);
|
665
635
|
|
@@ -675,9 +645,8 @@ const StoryHeaderScroll = (props: HorizontalStoryTabsProps) => {
|
|
675
645
|
disabled={disabled}
|
676
646
|
value={helperText}
|
677
647
|
size={size as HeaderSize}
|
678
|
-
maxItemWidth={maxItemWidth}
|
679
648
|
>
|
680
|
-
{
|
649
|
+
{`Label${i + 1}`}
|
681
650
|
</TabItem>
|
682
651
|
))}
|
683
652
|
</Tabs>
|
@@ -689,9 +658,8 @@ export const HeaderTabs: StoryObj<HorizontalStoryTabsProps> = {
|
|
689
658
|
size: 'h5',
|
690
659
|
disabled: false,
|
691
660
|
helperText: '',
|
692
|
-
itemQuantity:
|
661
|
+
itemQuantity: 6,
|
693
662
|
width: '12rem',
|
694
|
-
maxItemWidth: '',
|
695
663
|
},
|
696
664
|
argTypes: {
|
697
665
|
clip: {
|
package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.config.js
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
|
+
var _NumberInput = /*#__PURE__*/require("../../../../components/NumberInput");
|
9
|
+
var config = exports.config = {
|
10
|
+
defaults: {
|
11
|
+
view: 'default',
|
12
|
+
size: 'l',
|
13
|
+
shape: 'cornered',
|
14
|
+
inputBackgroundType: 'fill'
|
15
|
+
},
|
16
|
+
variations: {
|
17
|
+
view: {
|
18
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--inverse-text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-solid-default-hover);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-active);", ":var(--surface-solid-default-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
|
19
|
+
secondary: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--text-primary-hover);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--text-primary-active);", ":var(--surface-transparent-secondary-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
|
20
|
+
accent: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--inverse-text-primary);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--inverse-text-primary);", ":var(--text-tertiary);", ":var(--inverse-text-tertiary);", ":var(--surface-accent);", ":var(--light-background-primary);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--surface-accent);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-accent-hover);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-active);", ":var(--surface-accent-active);", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.caretColorSolid, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.iconButtonColorSolidActive, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid),
|
21
|
+
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--text-accent);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-tertiary);", ":var(--text-tertiary);", ":var(--surface-accent);", ":var(--surface-accent);", ":transparent;", ":var(--text-primary);", ":transparent;", ":var(--text-primary);", ":var(--text-primary-hover);", ":transparent;", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":transparent;", ":0.4;", ":inherit;", ":inherit;"], _NumberInput.numberInputTokens.caretColor, _NumberInput.numberInputTokens.errorColor, _NumberInput.numberInputTokens.borderErrorColor, _NumberInput.numberInputTokens.color, _NumberInput.numberInputTokens.colorSolid, _NumberInput.numberInputTokens.additionalTextColor, _NumberInput.numberInputTokens.additionalTextColorSolid, _NumberInput.numberInputTokens.borderColorFocus, _NumberInput.numberInputTokens.borderColorSolidFocus, _NumberInput.numberInputTokens.backgroundColorSolid, _NumberInput.numberInputTokens.iconButtonColor, _NumberInput.numberInputTokens.iconButtonBackgroundColor, _NumberInput.numberInputTokens.iconButtonColorHover, _NumberInput.numberInputTokens.iconButtonColorSolidHover, _NumberInput.numberInputTokens.iconButtonBackgroundColorHover, _NumberInput.numberInputTokens.iconButtonColorActive, _NumberInput.numberInputTokens.backgroundColorFocus, _NumberInput.numberInputTokens.iconButtonBackgroundColorActive, _NumberInput.numberInputTokens.actionButtonDisabledOpacity, _NumberInput.numberInputTokens.loaderSpinnerColor, _NumberInput.numberInputTokens.loaderSpinnerColorSolid)
|
22
|
+
},
|
23
|
+
size: {
|
24
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":11.75rem;", ":3.5rem;", ":3.5rem;", ":1.5rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.875rem;", ":0.375rem;", ":0 0.125rem;", ":0.875rem;", ":3.5rem;", ":0.063rem;", ":1.063rem 1.125rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":0.25rem;", ":0.25rem;", ":1.375rem;"], _NumberInput.numberInputTokens.rootMinWidth, _NumberInput.numberInputTokens.iconButtonHeight, _NumberInput.numberInputTokens.iconButtonWidth, _NumberInput.numberInputTokens.iconButtonPadding, _NumberInput.numberInputTokens.iconButtonFontFamily, _NumberInput.numberInputTokens.iconButtonFontSize, _NumberInput.numberInputTokens.iconButtonFontStyle, _NumberInput.numberInputTokens.iconButtonFontWeight, _NumberInput.numberInputTokens.iconButtonLetterSpacing, _NumberInput.numberInputTokens.iconButtonLineHeight, _NumberInput.numberInputTokens.iconButtonRadius, _NumberInput.numberInputTokens.iconButtonSegmentationRadius, _NumberInput.numberInputTokens.inputWrapperMargin, _NumberInput.numberInputTokens.inputWrapperBorderRadius, _NumberInput.numberInputTokens.textWrapperHeight, _NumberInput.numberInputTokens.inputWrapperBorderWidth, _NumberInput.numberInputTokens.textWrapperPadding, _NumberInput.numberInputTokens.fontFamily, _NumberInput.numberInputTokens.fontSize, _NumberInput.numberInputTokens.fontStyle, _NumberInput.numberInputTokens.fontWeight, _NumberInput.numberInputTokens.letterSpacing, _NumberInput.numberInputTokens.lineHeight, _NumberInput.numberInputTokens.textBeforeMarginRight, _NumberInput.numberInputTokens.textAfterMarginLeft, _NumberInput.numberInputTokens.loaderSpinnerSize),
|
25
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":10.25rem;", ":3rem;", ":3rem;", ":1.25rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.75rem;", ":0.25rem;", ":0 0.125rem;", ":0.75rem;", ":3rem;", ":0.063rem;", ":0.875rem 1rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.25rem;", ":0.25rem;", ":1.375rem;"], _NumberInput.numberInputTokens.rootMinWidth, _NumberInput.numberInputTokens.iconButtonHeight, _NumberInput.numberInputTokens.iconButtonWidth, _NumberInput.numberInputTokens.iconButtonPadding, _NumberInput.numberInputTokens.iconButtonFontFamily, _NumberInput.numberInputTokens.iconButtonFontSize, _NumberInput.numberInputTokens.iconButtonFontStyle, _NumberInput.numberInputTokens.iconButtonFontWeight, _NumberInput.numberInputTokens.iconButtonLetterSpacing, _NumberInput.numberInputTokens.iconButtonLineHeight, _NumberInput.numberInputTokens.iconButtonRadius, _NumberInput.numberInputTokens.iconButtonSegmentationRadius, _NumberInput.numberInputTokens.inputWrapperMargin, _NumberInput.numberInputTokens.inputWrapperBorderRadius, _NumberInput.numberInputTokens.textWrapperHeight, _NumberInput.numberInputTokens.inputWrapperBorderWidth, _NumberInput.numberInputTokens.textWrapperPadding, _NumberInput.numberInputTokens.fontFamily, _NumberInput.numberInputTokens.fontSize, _NumberInput.numberInputTokens.fontStyle, _NumberInput.numberInputTokens.fontWeight, _NumberInput.numberInputTokens.letterSpacing, _NumberInput.numberInputTokens.lineHeight, _NumberInput.numberInputTokens.textBeforeMarginRight, _NumberInput.numberInputTokens.textAfterMarginLeft, _NumberInput.numberInputTokens.loaderSpinnerSize),
|
26
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":8.75rem;", ":2.5rem;", ":2.5rem;", ":1rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.625rem;", ":0.25rem;", ":0 0.125rem;", ":0.625rem;", ":2.5rem;", ":0.063rem;", ":0.688rem 0.875rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.25rem;", ":0.25rem;", ":1.375rem;"], _NumberInput.numberInputTokens.rootMinWidth, _NumberInput.numberInputTokens.iconButtonHeight, _NumberInput.numberInputTokens.iconButtonWidth, _NumberInput.numberInputTokens.iconButtonPadding, _NumberInput.numberInputTokens.iconButtonFontFamily, _NumberInput.numberInputTokens.iconButtonFontSize, _NumberInput.numberInputTokens.iconButtonFontStyle, _NumberInput.numberInputTokens.iconButtonFontWeight, _NumberInput.numberInputTokens.iconButtonLetterSpacing, _NumberInput.numberInputTokens.iconButtonLineHeight, _NumberInput.numberInputTokens.iconButtonRadius, _NumberInput.numberInputTokens.iconButtonSegmentationRadius, _NumberInput.numberInputTokens.inputWrapperMargin, _NumberInput.numberInputTokens.inputWrapperBorderRadius, _NumberInput.numberInputTokens.textWrapperHeight, _NumberInput.numberInputTokens.inputWrapperBorderWidth, _NumberInput.numberInputTokens.textWrapperPadding, _NumberInput.numberInputTokens.fontFamily, _NumberInput.numberInputTokens.fontSize, _NumberInput.numberInputTokens.fontStyle, _NumberInput.numberInputTokens.fontWeight, _NumberInput.numberInputTokens.letterSpacing, _NumberInput.numberInputTokens.lineHeight, _NumberInput.numberInputTokens.textBeforeMarginRight, _NumberInput.numberInputTokens.textAfterMarginLeft, _NumberInput.numberInputTokens.loaderSpinnerSize),
|
27
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":6.875rem;", ":2rem;", ":2rem;", ":0.75rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.5rem;", ":0.125rem;", ":0 0.125rem;", ":0.5rem;", ":2rem;", ":0.063rem;", ":0.563rem 0.625rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.25rem;", ":0.25rem;", ":1rem;"], _NumberInput.numberInputTokens.rootMinWidth, _NumberInput.numberInputTokens.iconButtonHeight, _NumberInput.numberInputTokens.iconButtonWidth, _NumberInput.numberInputTokens.iconButtonPadding, _NumberInput.numberInputTokens.iconButtonFontFamily, _NumberInput.numberInputTokens.iconButtonFontSize, _NumberInput.numberInputTokens.iconButtonFontStyle, _NumberInput.numberInputTokens.iconButtonFontWeight, _NumberInput.numberInputTokens.iconButtonLetterSpacing, _NumberInput.numberInputTokens.iconButtonLineHeight, _NumberInput.numberInputTokens.iconButtonRadius, _NumberInput.numberInputTokens.iconButtonSegmentationRadius, _NumberInput.numberInputTokens.inputWrapperMargin, _NumberInput.numberInputTokens.inputWrapperBorderRadius, _NumberInput.numberInputTokens.textWrapperHeight, _NumberInput.numberInputTokens.inputWrapperBorderWidth, _NumberInput.numberInputTokens.textWrapperPadding, _NumberInput.numberInputTokens.fontFamily, _NumberInput.numberInputTokens.fontSize, _NumberInput.numberInputTokens.fontStyle, _NumberInput.numberInputTokens.fontWeight, _NumberInput.numberInputTokens.letterSpacing, _NumberInput.numberInputTokens.lineHeight, _NumberInput.numberInputTokens.textBeforeMarginRight, _NumberInput.numberInputTokens.textAfterMarginLeft, _NumberInput.numberInputTokens.loaderSpinnerSize)
|
28
|
+
},
|
29
|
+
shape: {
|
30
|
+
cornered: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
31
|
+
pilled: /*#__PURE__*/(0, _styledComponents.css)(["", ":50%;"], _NumberInput.numberInputTokens.iconButtonRadius)
|
32
|
+
},
|
33
|
+
inputBackgroundType: {
|
34
|
+
fill: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--surface-transparent-tertiary);", ":var(--text-secondary);"], _NumberInput.numberInputTokens.borderColor, _NumberInput.numberInputTokens.borderColorHover),
|
35
|
+
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":transparent;", ":transparent;"], _NumberInput.numberInputTokens.borderColor, _NumberInput.numberInputTokens.borderColorHover)
|
36
|
+
},
|
37
|
+
segmentation: {
|
38
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)([""]),
|
39
|
+
segmented: /*#__PURE__*/(0, _styledComponents.css)([""]),
|
40
|
+
solid: /*#__PURE__*/(0, _styledComponents.css)(["", ":0;"], _NumberInput.numberInputTokens.iconButtonSegmentationRadius)
|
41
|
+
},
|
42
|
+
disabled: {
|
43
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.4;"], _NumberInput.numberInputTokens.disabledOpacity)
|
44
|
+
}
|
45
|
+
}
|
46
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.NumberInput = void 0;
|
7
|
+
var _NumberInput = /*#__PURE__*/require("../../../../components/NumberInput");
|
8
|
+
var _engines = /*#__PURE__*/require("../../../../engines");
|
9
|
+
var _NumberInput2 = /*#__PURE__*/require("./NumberInput.config");
|
10
|
+
var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_NumberInput.numberInputConfig, _NumberInput2.config);
|
11
|
+
var NumberInput = exports.NumberInput = /*#__PURE__*/(0, _engines.component)(mergedConfig);
|
package/styled-components/cjs/examples/plasma_web/components/NumberInput/NumberInput.stories.tsx
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
import React, { ComponentProps, useState } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { action } from '@storybook/addon-actions';
|
4
|
+
|
5
|
+
import { WithTheme } from '../../../_helpers';
|
6
|
+
|
7
|
+
import { NumberInput } from './NumberInput';
|
8
|
+
|
9
|
+
const onChange = action('onChange');
|
10
|
+
const onDecrement = action('onDecrement');
|
11
|
+
const onIncrement = action('onIncrement');
|
12
|
+
|
13
|
+
const views = ['default', 'secondary', 'accent', 'clear'];
|
14
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
15
|
+
const shapes = ['cornered', 'pilled'];
|
16
|
+
const inputBackgroundTypes = ['fill', 'clear'];
|
17
|
+
const segmentation = ['default', 'segmented', 'solid'];
|
18
|
+
|
19
|
+
const meta: Meta<typeof NumberInput> = {
|
20
|
+
title: 'plasma_web/NumberInput',
|
21
|
+
component: NumberInput,
|
22
|
+
decorators: [WithTheme],
|
23
|
+
argTypes: {
|
24
|
+
min: {
|
25
|
+
control: {
|
26
|
+
type: 'number',
|
27
|
+
},
|
28
|
+
},
|
29
|
+
max: {
|
30
|
+
control: {
|
31
|
+
type: 'number',
|
32
|
+
},
|
33
|
+
},
|
34
|
+
view: {
|
35
|
+
options: views,
|
36
|
+
control: {
|
37
|
+
type: 'select',
|
38
|
+
},
|
39
|
+
},
|
40
|
+
size: {
|
41
|
+
options: sizes,
|
42
|
+
control: {
|
43
|
+
type: 'inline-radio',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
shape: {
|
47
|
+
options: shapes,
|
48
|
+
control: {
|
49
|
+
type: 'inline-radio',
|
50
|
+
},
|
51
|
+
},
|
52
|
+
inputBackgroundType: {
|
53
|
+
options: inputBackgroundTypes,
|
54
|
+
control: {
|
55
|
+
type: 'inline-radio',
|
56
|
+
},
|
57
|
+
},
|
58
|
+
segmentation: {
|
59
|
+
options: segmentation,
|
60
|
+
control: {
|
61
|
+
type: 'select',
|
62
|
+
},
|
63
|
+
},
|
64
|
+
},
|
65
|
+
};
|
66
|
+
|
67
|
+
export default meta;
|
68
|
+
|
69
|
+
type StoryPropsDefault = ComponentProps<typeof NumberInput>;
|
70
|
+
|
71
|
+
const StoryDefault = (args: StoryPropsDefault) => {
|
72
|
+
const [value, setValue] = useState(5);
|
73
|
+
|
74
|
+
const handleChange = (_: any, newValue: number) => {
|
75
|
+
setValue(newValue);
|
76
|
+
onChange(newValue);
|
77
|
+
};
|
78
|
+
|
79
|
+
return (
|
80
|
+
<NumberInput
|
81
|
+
{...args}
|
82
|
+
value={value}
|
83
|
+
onChange={handleChange}
|
84
|
+
onDecrement={onDecrement}
|
85
|
+
onIncrement={onIncrement}
|
86
|
+
/>
|
87
|
+
);
|
88
|
+
};
|
89
|
+
|
90
|
+
export const Default: StoryObj<StoryPropsDefault> = {
|
91
|
+
args: {
|
92
|
+
view: 'default',
|
93
|
+
size: 'l',
|
94
|
+
shape: 'cornered',
|
95
|
+
inputBackgroundType: 'fill',
|
96
|
+
segmentation: 'default',
|
97
|
+
min: 0,
|
98
|
+
max: 9,
|
99
|
+
step: 1,
|
100
|
+
width: 188,
|
101
|
+
isManualInput: false,
|
102
|
+
textBefore: '',
|
103
|
+
textAfter: '',
|
104
|
+
isLoading: false,
|
105
|
+
disabled: false,
|
106
|
+
},
|
107
|
+
render: StoryDefault,
|
108
|
+
};
|