@salutejs/plasma-new-hope 0.69.0-canary.1155.8506197081.0 → 0.70.0-canary.1160.8541256541.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Cell/Cell.css +3 -0
- package/cjs/components/Cell/Cell.js +71 -0
- package/cjs/components/Cell/Cell.js.map +1 -0
- package/cjs/components/Cell/Cell.styles.js +39 -0
- package/cjs/components/Cell/Cell.styles.js.map +1 -0
- package/cjs/components/Cell/Cell.styles_ygfo1w.css +1 -0
- package/cjs/components/Cell/Cell.tokens.js +50 -0
- package/cjs/components/Cell/Cell.tokens.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +20 -0
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.styles.js +13 -0
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.styles.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -0
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js +13 -0
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js.map +1 -0
- package/cjs/components/{TextField/_view → Cell/variations/_size}/base.js +2 -2
- package/cjs/components/Cell/variations/_size/base.js.map +1 -0
- package/cjs/components/{TextField/_size → Cell/variations/_view}/base.js +2 -2
- package/cjs/components/Cell/variations/_view/base.js.map +1 -0
- package/cjs/components/Cell/variations/_view/base_pir0qf.css +1 -0
- package/cjs/components/Pagination/Pagination.js +14 -13
- package/cjs/components/Pagination/Pagination.js.map +1 -1
- package/cjs/components/TextField/TextField.js +155 -29
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +27 -11
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/cjs/components/TextField/TextField.tokens.js +68 -20
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/TextField_wctd2m.css +1 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js +133 -0
- package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +38 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +26 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1rauupp.css +1 -0
- package/cjs/components/TextField/variations/_disabled/base.js +9 -0
- package/cjs/components/TextField/variations/_disabled/base.js.map +1 -0
- package/cjs/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/inner.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +2 -2
- package/cjs/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/cjs/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/cjs/components/TextField/variations/_read-only/base.js +9 -0
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -0
- package/cjs/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/cjs/components/TextField/variations/_size/base.js +9 -0
- package/cjs/components/TextField/variations/_size/base.js.map +1 -0
- package/cjs/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/cjs/components/TextField/{_disabled → variations/_view}/base.js +2 -2
- package/cjs/components/TextField/variations/_view/base.js.map +1 -0
- package/cjs/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/cjs/index.css +20 -9
- package/cjs/index.js +16 -2
- package/cjs/index.js.map +1 -1
- package/es/components/Cell/Cell.css +3 -0
- package/es/components/Cell/Cell.js +66 -0
- package/es/components/Cell/Cell.js.map +1 -0
- package/es/components/Cell/Cell.styles.js +31 -0
- package/es/components/Cell/Cell.styles.js.map +1 -0
- package/es/components/Cell/Cell.styles_ygfo1w.css +1 -0
- package/es/components/Cell/Cell.tokens.js +45 -0
- package/es/components/Cell/Cell.tokens.js.map +1 -0
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js +16 -0
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -0
- package/es/components/Cell/ui/CellTextbox/CellTextbox.styles.js +9 -0
- package/es/components/Cell/ui/CellTextbox/CellTextbox.styles.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +9 -0
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js +9 -0
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +9 -0
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js +9 -0
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +9 -0
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -0
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js +9 -0
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js.map +1 -0
- package/es/components/{TextField/_view → Cell/variations/_size}/base.js +2 -2
- package/es/components/Cell/variations/_size/base.js.map +1 -0
- package/es/components/Cell/variations/_size/base_x642ct.css +1 -0
- package/es/components/{TextField/_disabled → Cell/variations/_view}/base.js +2 -2
- package/es/components/Cell/variations/_view/base.js.map +1 -0
- package/es/components/Cell/variations/_view/base_pir0qf.css +1 -0
- package/es/components/Pagination/Pagination.js +15 -14
- package/es/components/Pagination/Pagination.js.map +1 -1
- package/es/components/TextField/TextField.js +158 -33
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +25 -12
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/TextField.styles_1b1mddp.css +8 -0
- package/es/components/TextField/TextField.tokens.js +68 -21
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/TextField_wctd2m.css +1 -0
- package/es/components/TextField/hooks/useKeyNavigation.js +128 -0
- package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +19 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +34 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +22 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js.map +1 -0
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles_1rauupp.css +1 -0
- package/es/components/TextField/variations/_disabled/base.js +5 -0
- package/es/components/TextField/variations/_disabled/base.js.map +1 -0
- package/es/components/TextField/variations/_disabled/base_1tnjoy9.css +1 -0
- package/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/base_x642ct.css +1 -0
- package/es/components/TextField/variations/_label-placement/inner.js +5 -0
- package/es/components/TextField/variations/_label-placement/inner.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/inner_gqlcj2.css +1 -0
- package/es/components/TextField/variations/_label-placement/outer.js +5 -0
- package/es/components/TextField/variations/_label-placement/outer.js.map +1 -0
- package/es/components/TextField/variations/_label-placement/outer_is41nj.css +1 -0
- package/es/components/TextField/variations/_read-only/base.js +5 -0
- package/es/components/TextField/variations/_read-only/base.js.map +1 -0
- package/es/components/TextField/variations/_read-only/base_134hshp.css +1 -0
- package/es/components/TextField/variations/_size/base.js +5 -0
- package/es/components/TextField/variations/_size/base.js.map +1 -0
- package/es/components/TextField/variations/_size/base_1khzr9t.css +1 -0
- package/es/components/TextField/{_size → variations/_view}/base.js +2 -2
- package/es/components/TextField/variations/_view/base.js.map +1 -0
- package/es/components/TextField/variations/_view/base_1qd77x6.css +1 -0
- package/es/index.css +20 -9
- package/es/index.js +8 -2
- package/es/index.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/Cell/Cell.js +71 -0
- package/styled-components/cjs/components/Cell/Cell.styles.js +35 -0
- package/styled-components/cjs/components/Cell/Cell.tokens.js +48 -0
- package/styled-components/cjs/components/Cell/Cell.types.js +5 -0
- package/styled-components/cjs/components/Cell/index.js +59 -0
- package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +19 -0
- package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.styles.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.types.js +5 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +12 -0
- package/styled-components/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js +12 -0
- package/styled-components/cjs/components/{TextField/_disabled → Cell/variations/_size}/base.js +1 -2
- package/styled-components/cjs/components/Cell/variations/_size/tokens.json +1 -0
- package/styled-components/cjs/components/Cell/variations/_stretching/base.js +9 -0
- package/styled-components/cjs/components/Cell/variations/_stretching/tokens.json +1 -0
- package/styled-components/cjs/components/Cell/variations/_view/base.js +9 -0
- package/styled-components/cjs/components/Cell/variations/_view/tokens.json +1 -0
- package/styled-components/cjs/components/Pagination/Pagination.js +14 -13
- package/styled-components/cjs/components/TextField/TextField.js +162 -32
- package/styled-components/cjs/components/TextField/TextField.styles.js +18 -10
- package/styled-components/cjs/components/TextField/TextField.tokens.js +68 -21
- package/styled-components/cjs/components/TextField/hooks/index.js +12 -0
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +139 -0
- package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.types.js +5 -0
- package/styled-components/cjs/components/TextField/index.js +2 -2
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +39 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +25 -0
- package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +5 -0
- package/styled-components/cjs/components/TextField/ui/index.js +12 -0
- package/styled-components/cjs/components/TextField/variations/_disabled/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/inner.js +10 -0
- package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/outer.js +3 -3
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/cjs/components/TextField/variations/_size/base.js +10 -0
- package/styled-components/cjs/components/TextField/variations/_view/base.js +10 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.config.js +21 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.js +35 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Cell/Cell.stories.tsx +128 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Chip/Chip.config.js +1 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Pagination/Pagination.config.js +4 -4
- package/styled-components/cjs/examples/plasma_b2c/components/Pagination/Pagination.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.config.js +21 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.js +35 -0
- package/styled-components/cjs/examples/plasma_web/components/Cell/Cell.stories.tsx +128 -0
- package/styled-components/cjs/examples/plasma_web/components/Chip/Chip.config.js +1 -2
- package/styled-components/cjs/examples/plasma_web/components/Pagination/Pagination.config.js +4 -4
- package/styled-components/cjs/examples/plasma_web/components/Pagination/Pagination.stories.tsx +14 -7
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +40 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.config.js +43 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.js +11 -0
- package/styled-components/cjs/examples/sds_engineer/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Cell/Cell.js +62 -0
- package/styled-components/es/components/Cell/Cell.styles.js +27 -0
- package/styled-components/es/components/Cell/Cell.tokens.js +42 -0
- package/styled-components/es/components/Cell/Cell.types.js +1 -0
- package/styled-components/es/components/Cell/index.js +6 -0
- package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.js +12 -0
- package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.styles.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.types.js +1 -0
- package/styled-components/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +5 -0
- package/styled-components/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.js +5 -0
- package/styled-components/es/components/Cell/variations/_size/base.js +2 -0
- package/styled-components/es/components/Cell/variations/_size/tokens.json +1 -0
- package/styled-components/es/components/Cell/variations/_stretching/base.js +3 -0
- package/styled-components/es/components/Cell/variations/_stretching/tokens.json +1 -0
- package/styled-components/es/components/Cell/variations/_view/base.js +3 -0
- package/styled-components/es/components/Cell/variations/_view/tokens.json +1 -0
- package/styled-components/es/components/Pagination/Pagination.js +14 -13
- package/styled-components/es/components/TextField/TextField.js +166 -36
- package/styled-components/es/components/TextField/TextField.styles.js +17 -9
- package/styled-components/es/components/TextField/TextField.tokens.js +67 -20
- package/styled-components/es/components/TextField/hooks/index.js +1 -0
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +133 -0
- package/styled-components/es/components/TextField/hooks/useKeyNavigation.types.js +1 -0
- package/styled-components/es/components/TextField/index.js +2 -2
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +30 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.styles.js +19 -0
- package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.types.js +1 -0
- package/styled-components/es/components/TextField/ui/index.js +1 -0
- package/styled-components/es/components/TextField/variations/_disabled/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/inner.js +4 -0
- package/styled-components/es/components/TextField/variations/_label-placement/outer.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_read-only/tokens.json +1 -0
- package/styled-components/es/components/TextField/variations/_size/base.js +4 -0
- package/styled-components/es/components/TextField/variations/_view/base.js +4 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.config.js +15 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.js +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Cell/Cell.stories.tsx +128 -0
- package/styled-components/es/examples/plasma_b2c/components/Chip/Chip.config.js +1 -2
- package/styled-components/es/examples/plasma_b2c/components/Pagination/Pagination.config.js +4 -4
- package/styled-components/es/examples/plasma_b2c/components/Pagination/Pagination.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.config.js +15 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.js +6 -0
- package/styled-components/es/examples/plasma_web/components/Cell/Cell.stories.tsx +128 -0
- package/styled-components/es/examples/plasma_web/components/Chip/Chip.config.js +1 -2
- package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.config.js +4 -4
- package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.stories.tsx +14 -7
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +34 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.config.js +37 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.js +5 -0
- package/styled-components/es/examples/sds_engineer/components/TextField/TextField.stories.tsx +123 -0
- package/styled-components/es/index.js +1 -0
- package/types/components/Cell/Cell.d.ts +23 -0
- package/types/components/Cell/Cell.d.ts.map +1 -0
- package/types/components/Cell/Cell.styles.d.ts +11 -0
- package/types/components/Cell/Cell.styles.d.ts.map +1 -0
- package/types/components/Cell/Cell.tokens.d.ts +43 -0
- package/types/components/Cell/Cell.tokens.d.ts.map +1 -0
- package/types/components/Cell/Cell.types.d.ts +51 -0
- package/types/components/Cell/Cell.types.d.ts.map +1 -0
- package/types/components/Cell/index.d.ts +9 -0
- package/types/components/Cell/index.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.d.ts +4 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.styles.d.ts +2 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.styles.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.types.d.ts +33 -0
- package/types/components/Cell/ui/CellTextbox/CellTextbox.types.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.d.ts +3 -0
- package/types/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.d.ts +2 -0
- package/types/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.styles.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.d.ts +3 -0
- package/types/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.d.ts +2 -0
- package/types/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.styles.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.d.ts +3 -0
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.d.ts.map +1 -0
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.d.ts +2 -0
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.styles.d.ts.map +1 -0
- package/types/components/Cell/variations/_size/base.d.ts.map +1 -0
- package/types/components/Cell/variations/_stretching/base.d.ts.map +1 -0
- package/types/components/Cell/variations/_view/base.d.ts.map +1 -0
- package/types/components/Chip/Chip.d.ts +26 -2
- package/types/components/Chip/Chip.d.ts.map +1 -1
- package/types/components/Chip/Chip.types.d.ts +6 -5
- package/types/components/Chip/Chip.types.d.ts.map +1 -1
- package/types/components/Combobox/ui/ComboboxChip/ComboboxChip.styles.d.ts +13 -1
- package/types/components/Combobox/ui/ComboboxChip/ComboboxChip.styles.d.ts.map +1 -1
- package/types/components/Indicator/Indicator.d.ts +2 -2
- package/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/types/components/Select/ui/SelectChip/SelectChip.styles.d.ts +13 -1
- package/types/components/Select/ui/SelectChip/SelectChip.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts +8 -3
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +6 -3
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +57 -8
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +29 -2
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/components/TextField/hooks/index.d.ts +2 -0
- package/types/components/TextField/hooks/index.d.ts.map +1 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts +17 -0
- package/types/components/TextField/hooks/useKeyNavigation.d.ts.map +1 -0
- package/types/components/TextField/hooks/useKeyNavigation.types.d.ts +18 -0
- package/types/components/TextField/hooks/useKeyNavigation.types.d.ts.map +1 -0
- package/types/components/TextField/index.d.ts +3 -2
- package/types/components/TextField/index.d.ts.map +1 -1
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts +7 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts +15 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.styles.d.ts.map +1 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts +37 -0
- package/types/components/TextField/ui/TextFieldChip/TextFieldChip.types.d.ts.map +1 -0
- package/types/components/TextField/ui/index.d.ts +2 -0
- package/types/components/TextField/ui/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_disabled/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/base.d.ts +2 -0
- package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/index.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/inner.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/outer.d.ts.map +1 -0
- package/types/components/TextField/variations/_read-only/base.d.ts +2 -0
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_size/base.d.ts +2 -0
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_view/base.d.ts +2 -0
- package/types/components/TextField/variations/_view/base.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts +14 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts +45 -0
- package/types/examples/plasma_b2c/components/Cell/Cell.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts +0 -1
- package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Chip/Chip.d.ts +13 -2
- package/types/examples/plasma_b2c/components/Chip/Chip.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +2 -2
- package/types/examples/plasma_b2c/components/Indicator/Indicator.d.ts +2 -2
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts +14 -0
- package/types/examples/plasma_web/components/Cell/Cell.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Cell/Cell.d.ts +45 -0
- package/types/examples/plasma_web/components/Cell/Cell.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Chip/Chip.config.d.ts +0 -1
- package/types/examples/plasma_web/components/Chip/Chip.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Chip/Chip.d.ts +13 -2
- package/types/examples/plasma_web/components/Chip/Chip.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +2 -2
- package/types/examples/plasma_web/components/Indicator/Indicator.d.ts +2 -2
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +26 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/Chip/Chip.d.ts +13 -1
- package/types/examples/sds_engineer/components/Chip/Chip.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts +32 -0
- package/types/examples/sds_engineer/components/TextField/TextField.config.d.ts.map +1 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts +26 -0
- package/types/examples/sds_engineer/components/TextField/TextField.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/cjs/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/cjs/components/TextField/TextField_1lzb2r1.css +0 -1
- package/cjs/components/TextField/_disabled/base.js.map +0 -1
- package/cjs/components/TextField/_disabled/base_so3w81.css +0 -1
- package/cjs/components/TextField/_label-placement/base.js.map +0 -1
- package/cjs/components/TextField/_label-placement/inner.js.map +0 -1
- package/cjs/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/cjs/components/TextField/_label-placement/outer.js.map +0 -1
- package/cjs/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/cjs/components/TextField/_size/base.js.map +0 -1
- package/cjs/components/TextField/_size/base_b5smyu.css +0 -1
- package/cjs/components/TextField/_view/base.js.map +0 -1
- package/cjs/components/TextField/_view/base_5bqzed.css +0 -1
- package/es/components/TextField/TextField.styles_2qw1n8.css +0 -5
- package/es/components/TextField/TextField_1lzb2r1.css +0 -1
- package/es/components/TextField/_disabled/base.js.map +0 -1
- package/es/components/TextField/_disabled/base_so3w81.css +0 -1
- package/es/components/TextField/_label-placement/base.js.map +0 -1
- package/es/components/TextField/_label-placement/inner.js +0 -5
- package/es/components/TextField/_label-placement/inner.js.map +0 -1
- package/es/components/TextField/_label-placement/inner_1tyuicp.css +0 -1
- package/es/components/TextField/_label-placement/outer.js +0 -5
- package/es/components/TextField/_label-placement/outer.js.map +0 -1
- package/es/components/TextField/_label-placement/outer_19ekaek.css +0 -1
- package/es/components/TextField/_size/base.js.map +0 -1
- package/es/components/TextField/_size/base_b5smyu.css +0 -1
- package/es/components/TextField/_view/base.js.map +0 -1
- package/es/components/TextField/_view/base_5bqzed.css +0 -1
- package/styled-components/cjs/components/TextField/_label-placement/inner.js +0 -10
- package/styled-components/cjs/components/TextField/_size/base.js +0 -10
- package/styled-components/cjs/components/TextField/_view/base.js +0 -10
- package/styled-components/es/components/TextField/_disabled/base.js +0 -3
- package/styled-components/es/components/TextField/_label-placement/inner.js +0 -4
- package/styled-components/es/components/TextField/_label-placement/outer.js +0 -4
- package/styled-components/es/components/TextField/_size/base.js +0 -4
- package/styled-components/es/components/TextField/_view/base.js +0 -4
- package/types/components/TextField/_disabled/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/base.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/index.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/inner.d.ts.map +0 -1
- package/types/components/TextField/_label-placement/outer.d.ts.map +0 -1
- package/types/components/TextField/_size/base.d.ts.map +0 -1
- package/types/components/TextField/_view/base.d.ts.map +0 -1
- /package/cjs/components/{TextField/_label-placement → Cell/variations/_size}/base_x642ct.css +0 -0
- /package/{es/components/TextField → cjs/components/TextField/variations}/_label-placement/base_x642ct.css +0 -0
- /package/styled-components/cjs/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/cjs/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/cjs/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_disabled → variations/_disabled}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/base.js +0 -0
- /package/styled-components/es/components/TextField/{_label-placement → variations/_label-placement}/index.js +0 -0
- /package/styled-components/es/components/TextField/{_size → variations/_size}/tokens.json +0 -0
- /package/styled-components/es/components/TextField/{_view → variations/_view}/tokens.json +0 -0
- /package/types/components/{TextField/_disabled → Cell/variations/_size}/base.d.ts +0 -0
- /package/types/components/{TextField/_label-placement → Cell/variations/_stretching}/base.d.ts +0 -0
- /package/types/components/{TextField/_size → Cell/variations/_view}/base.d.ts +0 -0
- /package/types/components/TextField/{_view → variations/_disabled}/base.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/index.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/inner.d.ts +0 -0
- /package/types/components/TextField/{_label-placement → variations/_label-placement}/outer.d.ts +0 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import styled from 'styled-components';
|
5
|
+
|
6
|
+
import { WithTheme } from '../../../_helpers';
|
7
|
+
import { Avatar } from '../Avatar/Avatar';
|
8
|
+
import { IconChevronLeft } from '../../../../components/_Icon';
|
9
|
+
|
10
|
+
import { Cell, CellTextbox, CellTextboxTitle } from './Cell';
|
11
|
+
|
12
|
+
type StoryProps = ComponentProps<typeof Cell> & {
|
13
|
+
itemsCount?: number;
|
14
|
+
disableLeftContent?: boolean;
|
15
|
+
disableRightContent?: boolean;
|
16
|
+
};
|
17
|
+
type Story = StoryObj<StoryProps>;
|
18
|
+
|
19
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
20
|
+
const stretchingValues = ['fixed', 'filled', 'auto'];
|
21
|
+
const alignLeft = ['top', 'center', 'bottom'];
|
22
|
+
const alignRight = ['top', 'center', 'bottom'];
|
23
|
+
|
24
|
+
type SizesCell = 'xs' | 'l' | 'm' | 's' | undefined;
|
25
|
+
type SizesAvatar = 'l' | 'm' | 's';
|
26
|
+
|
27
|
+
const getSize = (size: SizesCell): SizesAvatar => {
|
28
|
+
if (size === 'xs' || !size) {
|
29
|
+
return 's';
|
30
|
+
}
|
31
|
+
|
32
|
+
return size;
|
33
|
+
};
|
34
|
+
|
35
|
+
const meta: Meta<typeof Cell> = {
|
36
|
+
title: 'plasma_web/Cell',
|
37
|
+
decorators: [WithTheme],
|
38
|
+
argTypes: {
|
39
|
+
size: {
|
40
|
+
options: sizes,
|
41
|
+
control: {
|
42
|
+
type: 'select',
|
43
|
+
},
|
44
|
+
},
|
45
|
+
stretching: {
|
46
|
+
options: stretchingValues,
|
47
|
+
control: {
|
48
|
+
type: 'select',
|
49
|
+
},
|
50
|
+
},
|
51
|
+
alignContentLeft: {
|
52
|
+
options: alignLeft,
|
53
|
+
control: {
|
54
|
+
type: 'select',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
alignContentRight: {
|
58
|
+
options: alignRight,
|
59
|
+
control: {
|
60
|
+
type: 'select',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
},
|
64
|
+
};
|
65
|
+
|
66
|
+
export default meta;
|
67
|
+
|
68
|
+
const ChevronRight = styled(IconChevronLeft)`
|
69
|
+
transform: rotate(180deg);
|
70
|
+
color: var(--text-secondary);
|
71
|
+
`;
|
72
|
+
|
73
|
+
export const Default: Story = {
|
74
|
+
args: {
|
75
|
+
size: 'm',
|
76
|
+
stretching: 'filled',
|
77
|
+
disableLeftContent: false,
|
78
|
+
disableRightContent: false,
|
79
|
+
alignContentLeft: 'center',
|
80
|
+
alignContentRight: 'center',
|
81
|
+
title: 'Title',
|
82
|
+
subtitle: 'Subtitle',
|
83
|
+
label: 'Label',
|
84
|
+
},
|
85
|
+
render: ({ ...args }: StoryProps) => {
|
86
|
+
return (
|
87
|
+
<Cell
|
88
|
+
contentLeft={
|
89
|
+
!args.disableLeftContent && (
|
90
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
91
|
+
)
|
92
|
+
}
|
93
|
+
contentRight={!args.disableRightContent && <ChevronRight color="inherit" size="xs" />}
|
94
|
+
{...args}
|
95
|
+
/>
|
96
|
+
);
|
97
|
+
},
|
98
|
+
};
|
99
|
+
|
100
|
+
export const WithContentTextboxCustom: Story = {
|
101
|
+
args: {
|
102
|
+
size: 'm',
|
103
|
+
stretching: 'filled',
|
104
|
+
},
|
105
|
+
render: ({ ...args }: StoryProps) => {
|
106
|
+
const MyStyledText = styled.div`
|
107
|
+
font-size: 12px;
|
108
|
+
font-weight: 600;
|
109
|
+
opacity: 0.5;
|
110
|
+
`;
|
111
|
+
return (
|
112
|
+
<Cell
|
113
|
+
view="default"
|
114
|
+
size={args.size}
|
115
|
+
stretching={args.stretching}
|
116
|
+
contentLeft={
|
117
|
+
<Avatar size={getSize(args.size)} url="https://avatars.githubusercontent.com/u/1813468?v=4" />
|
118
|
+
}
|
119
|
+
contentRight={<ChevronRight color="inherit" size="xs" />}
|
120
|
+
>
|
121
|
+
<CellTextbox>
|
122
|
+
<CellTextboxTitle>Title</CellTextboxTitle>
|
123
|
+
<MyStyledText>My styled Text</MyStyledText>
|
124
|
+
</CellTextbox>
|
125
|
+
</Cell>
|
126
|
+
);
|
127
|
+
},
|
128
|
+
};
|
@@ -2,13 +2,12 @@ import { css } from 'styled-components';
|
|
2
2
|
import { chipTokens } from '../../../../components/Chip';
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
|
-
view: '
|
5
|
+
view: 'primary',
|
6
6
|
focused: 'true',
|
7
7
|
size: 'm'
|
8
8
|
},
|
9
9
|
variations: {
|
10
10
|
view: {
|
11
|
-
"default": /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 85% );", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 80% );", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);"], chipTokens.color, chipTokens.background, chipTokens.colorHover, chipTokens.backgroundHover, chipTokens.colorActive, chipTokens.backgroundActive, chipTokens.backgroundReadOnly, chipTokens.colorReadOnly, chipTokens.backgroundReadOnlyHover, chipTokens.colorReadOnlyHover),
|
12
11
|
primary: /*#__PURE__*/css(["", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 85% );", ":var(--inverse-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-solid-default) 80% );", ":var(--surface-solid-default);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--inverse-text-primary);"], chipTokens.color, chipTokens.background, chipTokens.colorHover, chipTokens.backgroundHover, chipTokens.colorActive, chipTokens.backgroundActive, chipTokens.backgroundReadOnly, chipTokens.colorReadOnly, chipTokens.backgroundReadOnlyHover, chipTokens.colorReadOnlyHover),
|
13
12
|
secondary: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-transparent-secondary) 85% );", ":var(--text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-transparent-secondary) 80% );", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);"], chipTokens.color, chipTokens.background, chipTokens.colorHover, chipTokens.backgroundHover, chipTokens.colorActive, chipTokens.backgroundActive, chipTokens.backgroundReadOnly, chipTokens.colorReadOnly, chipTokens.backgroundReadOnlyHover, chipTokens.colorReadOnlyHover),
|
14
13
|
positive: /*#__PURE__*/css(["", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":color-mix( in srgb,var(--inverse-text-primary),var(--surface-positive) 85% );", ":var(--on-dark-text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-positive) 85%);", ":var(--surface-positive);", ":var(--on-dark-text-primary);", ":var(--surface-positive);", ":var(--on-dark-text-primary);"], chipTokens.color, chipTokens.background, chipTokens.colorHover, chipTokens.backgroundHover, chipTokens.colorActive, chipTokens.backgroundActive, chipTokens.backgroundReadOnly, chipTokens.colorReadOnly, chipTokens.backgroundReadOnlyHover, chipTokens.colorReadOnlyHover)
|
@@ -18,10 +18,10 @@ export var config = {
|
|
18
18
|
clear: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 95%);", ":var(--text-primary);", ":color-mix(in srgb,var(--text-primary),var(--surface-clear) 90%);"], paginationTokens.paginationCurrentButtonColor, paginationTokens.paginationCurrentButtonBackgroundColor, paginationTokens.paginationCurrentButtonHoverColor, paginationTokens.paginationCurrentButtonHoverBackgroundColor, paginationTokens.paginationCurrentButtonActiveColor, paginationTokens.paginationCurrentButtonActiveBackgroundColor)
|
19
19
|
},
|
20
20
|
size: {
|
21
|
-
l: /*#__PURE__*/css(["", ":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);", ":3.5rem;", ":3rem;", ":2.25rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":6.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":6.375rem;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":6.375rem;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.
|
22
|
-
m: /*#__PURE__*/css(["", ":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);", ":3rem;", ":3rem;", ":2rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":5.875rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.875rem;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":5.875rem;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.
|
23
|
-
s: /*#__PURE__*/css(["", ":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);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":5.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.375rem;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":5.375rem;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.
|
24
|
-
xs: /*#__PURE__*/css(["", ":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);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":4.625rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":4.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":4.625rem;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.
|
21
|
+
l: /*#__PURE__*/css(["", ":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);", ":3.5rem;", ":3rem;", ":2.25rem;", ":0.875rem;", ":1.2rem;", ":1.45rem;", ":6.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":6.375rem;", ":1.5rem;", ":1rem;", ":1rem;", ":1rem;", ":1rem;", ":1.875rem;", ":transparent;", ":1rem;", ":6.375rem;", ":0 3.5rem 0 1.5rem;", ":0 3.625rem 0 0.375rem;", ":0 3.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.875rem;", ":4rem;", ":3.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
|
22
|
+
m: /*#__PURE__*/css(["", ":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);", ":3rem;", ":3rem;", ":2rem;", ":0.75rem;", ":1.05rem;", ":1.3rem;", ":5.875rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.875rem;", ":1.5rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.875rem;", ":5.875rem;", ":0 3.25rem 0 1.25rem;", ":0 3.375rem 0 0.375rem;", ":0 3.375rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.75rem;", ":3.5rem;", ":3rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
|
23
|
+
s: /*#__PURE__*/css(["", ":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);", ":2.5rem;", ":2.5rem;", ":1.75rem;", ":3rem;", ":0.625rem;", ":0.9rem;", ":1.15rem;", ":5.375rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":5.375rem;", ":1.5rem;", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":1.75rem;", ":transparent;", ":0.75rem;", ":5.375rem;", ":0 3rem 0 1rem;", ":0 3.125rem 0 0.375rem;", ":0 3.125rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.625rem;", ":3rem;", ":2.5rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth),
|
24
|
+
xs: /*#__PURE__*/css(["", ":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);", ":2rem;", ":2.5rem;", ":0.5rem;", ":2rem;", ":1.5rem;", ":0.75rem;", ":1rem;", ":4.625rem;", ":auto;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":0.125rem;", ":4.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":0.5rem;", ":1.25rem;", ":transparent;", ":0.5rem;", ":4.625rem;", ":0 2.5rem 0 0.75rem;", ":0 2.625rem 0 0.375rem;", ":0 2.625rem 0 0.625rem;", ":0.5rem;", ":0.375rem;", ":0.5rem;", ":2.5rem;", ":2rem;", ":0 0.625rem;", ":0.0625rem;"], paginationTokens.paginationFontFamily, paginationTokens.paginationFontSize, paginationTokens.paginationFontStyle, paginationTokens.paginationFontWeight, paginationTokens.paginationLetterSpacing, paginationTokens.paginationLineHeight, paginationTokens.buttonHeight, paginationTokens.paginationInputWidth, paginationTokens.buttonRadius, paginationTokens.buttonWidth, paginationTokens.buttonWidthShorter, paginationTokens.paginationIconSize, paginationTokens.paginationIconDoubleSize, paginationTokens.selectWidth, paginationTokens.selectHeight, paginationTokens.selectPaddingTop, paginationTokens.selectPaddingRight, paginationTokens.selectPaddingBottom, paginationTokens.selectPaddingLeft, paginationTokens.selectItemWidth, paginationTokens.selectItemHeight, paginationTokens.selectItemPaddingTop, paginationTokens.selectItemPaddingRight, paginationTokens.selectItemPaddingBottom, paginationTokens.selectItemPaddingLeft, paginationTokens.selectItemContentLeftWidth, paginationTokens.selectItemBackground, paginationTokens.selectTargetArrowRight, paginationTokens.selectTargetWidth, paginationTokens.selectTargetPadding, paginationTokens.selectTargetPaddingHasChips, paginationTokens.selectTargetPaddingWithInput, paginationTokens.selectTargetInnerTop, paginationTokens.selectTargetLabelInnerTop, paginationTokens.inputBorderRadius, paginationTokens.inputWidth, paginationTokens.inputHeight, paginationTokens.inputPadding, paginationTokens.inputBorderWidth)
|
25
25
|
},
|
26
26
|
type: {
|
27
27
|
compact: /*#__PURE__*/css([""]),
|
package/styled-components/es/examples/plasma_web/components/Pagination/Pagination.stories.tsx
CHANGED
@@ -53,7 +53,7 @@ type Story = StoryObj<typeof Pagination>;
|
|
53
53
|
|
54
54
|
export const Default: Story = {
|
55
55
|
args: {
|
56
|
-
count:
|
56
|
+
count: 2000,
|
57
57
|
value: 1,
|
58
58
|
slots: 9,
|
59
59
|
type: 'default',
|
@@ -72,12 +72,18 @@ const PaginationContent = (agrs) => {
|
|
72
72
|
const [pageValue, setPageValue] = useState(agrs.value);
|
73
73
|
const [perPageValue, setPerPageValue] = useState(agrs.perPage);
|
74
74
|
|
75
|
-
const
|
76
|
-
(page: number
|
77
|
-
setPerPageValue(perPage);
|
75
|
+
const handleChangePage = useCallback(
|
76
|
+
(page: number) => {
|
78
77
|
setPageValue(page);
|
79
78
|
},
|
80
|
-
[pageValue,
|
79
|
+
[pageValue, setPageValue],
|
80
|
+
);
|
81
|
+
|
82
|
+
const handleChangePerpage = useCallback(
|
83
|
+
(perPage: number) => {
|
84
|
+
setPerPageValue(perPage);
|
85
|
+
},
|
86
|
+
[perPageValue, setPerPageValue],
|
81
87
|
);
|
82
88
|
|
83
89
|
return (
|
@@ -104,7 +110,8 @@ const PaginationContent = (agrs) => {
|
|
104
110
|
Next
|
105
111
|
</Button>
|
106
112
|
}
|
107
|
-
|
113
|
+
onChangePageValue={handleChangePage}
|
114
|
+
onChangePerPageValue={handleChangePerpage}
|
108
115
|
/>
|
109
116
|
</>
|
110
117
|
);
|
@@ -112,7 +119,7 @@ const PaginationContent = (agrs) => {
|
|
112
119
|
|
113
120
|
export const Content: Story = {
|
114
121
|
args: {
|
115
|
-
count:
|
122
|
+
count: 2000,
|
116
123
|
value: 1,
|
117
124
|
slots: 9,
|
118
125
|
type: 'default',
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'default',
|
6
|
+
size: 'l',
|
7
|
+
labelPlacement: 'outer'
|
8
|
+
},
|
9
|
+
variations: {
|
10
|
+
view: {
|
11
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-transparent-tertiary);", ":var(--plasma-colors-secondary);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
12
|
+
positive: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--surface-positive);", ":var(--surface-positive);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
13
|
+
warning: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--surface-warning);", ":var(--surface-warning);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
14
|
+
negative: /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--surface-negative);", ":var(--surface-negative);", ":var(--surface-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.borderColor, tokens.borderColorHover, tokens.borderColorFocus, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
|
15
|
+
},
|
16
|
+
size: {
|
17
|
+
l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":0.0625rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem 0 -0.0625rem 0.75rem;", ":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.75rem;", ":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;", ":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.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
18
|
+
m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 0.875rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":0.0625rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem 0 -0.125rem 0.75rem;", ":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.625rem;", ":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;", ":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.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
19
|
+
s: /*#__PURE__*/css(["", ":2.5rem;", ":0.875rem 0.75rem 0.875rem 0.6875rem;", ":0.375rem;", ":0.625rem;", ":0.0625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem 0 -0.1875rem 0.75rem;", ":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.5rem;", ":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;", ":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.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
20
|
+
xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.5rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":0.0625rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem 0 -0.0625rem 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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":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;", ":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.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.borderWidth, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
|
21
|
+
},
|
22
|
+
labelPlacement: {
|
23
|
+
inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":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);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
|
24
|
+
outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
|
25
|
+
},
|
26
|
+
disabled: {
|
27
|
+
"true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
|
28
|
+
},
|
29
|
+
// TODO заменить --surface-transparent-primary на корректный токен
|
30
|
+
readOnly: {
|
31
|
+
"true": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-clear);", ":var(--surface-transparent-tertiary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.borderColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { component, mergeConfig } from '../../../../engines';
|
2
|
+
import { textFieldConfig } from '../../../../components/TextField';
|
3
|
+
import { config } from './TextField.config';
|
4
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
|
5
|
+
export var TextField = /*#__PURE__*/component(mergedConfig);
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import React, { ComponentProps, useState } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
import { action } from '@storybook/addon-actions';
|
4
|
+
import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
|
5
|
+
|
6
|
+
import { WithTheme } from '../../../_helpers';
|
7
|
+
|
8
|
+
import { TextField } from './TextField';
|
9
|
+
|
10
|
+
const onChange = action('onChange');
|
11
|
+
const onFocus = action('onFocus');
|
12
|
+
const onBlur = action('onBlur');
|
13
|
+
const onSearch = action('onSearch');
|
14
|
+
|
15
|
+
const sizes = ['l', 'm', 's', 'xs'];
|
16
|
+
const views = ['default', 'positive', 'warning', 'negative'];
|
17
|
+
const enumerationTypes = ['plain', 'chip'];
|
18
|
+
|
19
|
+
const meta: Meta<typeof TextField> = {
|
20
|
+
title: 'plasma_web/TextField',
|
21
|
+
component: TextField,
|
22
|
+
decorators: [WithTheme],
|
23
|
+
argTypes: {
|
24
|
+
view: {
|
25
|
+
options: views,
|
26
|
+
control: {
|
27
|
+
type: 'select',
|
28
|
+
},
|
29
|
+
},
|
30
|
+
maxLength: {
|
31
|
+
control: {
|
32
|
+
type: 'number',
|
33
|
+
},
|
34
|
+
},
|
35
|
+
enumerationType: {
|
36
|
+
options: enumerationTypes,
|
37
|
+
control: {
|
38
|
+
type: 'select',
|
39
|
+
},
|
40
|
+
},
|
41
|
+
size: {
|
42
|
+
options: sizes,
|
43
|
+
control: {
|
44
|
+
type: 'inline-radio',
|
45
|
+
},
|
46
|
+
},
|
47
|
+
},
|
48
|
+
};
|
49
|
+
|
50
|
+
export default meta;
|
51
|
+
|
52
|
+
type StoryPropsDefault = Omit<
|
53
|
+
ComponentProps<typeof TextField>,
|
54
|
+
| 'helperBlock'
|
55
|
+
| 'contentLeft'
|
56
|
+
| 'htmlSize'
|
57
|
+
| 'contentRight'
|
58
|
+
| 'type'
|
59
|
+
| 'name'
|
60
|
+
| 'onFocus'
|
61
|
+
| 'onBlur'
|
62
|
+
| 'onChange'
|
63
|
+
| 'value'
|
64
|
+
| 'checked'
|
65
|
+
| 'maxLength'
|
66
|
+
| 'minLength'
|
67
|
+
| 'required'
|
68
|
+
> & {
|
69
|
+
'storybook:contentLeft': boolean;
|
70
|
+
'storybook:contentRight': boolean;
|
71
|
+
};
|
72
|
+
|
73
|
+
const StoryDefault = ({
|
74
|
+
'storybook:contentLeft': enableContentLeft,
|
75
|
+
'storybook:contentRight': enableContentRight,
|
76
|
+
view,
|
77
|
+
...rest
|
78
|
+
}: StoryPropsDefault) => {
|
79
|
+
const [text, setText] = useState('Значение поля');
|
80
|
+
|
81
|
+
return (
|
82
|
+
<TextField
|
83
|
+
{...rest}
|
84
|
+
value={text}
|
85
|
+
contentLeft={enableContentLeft ? <IconPlaceholder /> : undefined}
|
86
|
+
contentRight={enableContentRight ? <IconPlaceholder /> : undefined}
|
87
|
+
view={view}
|
88
|
+
onChange={(_, value) => {
|
89
|
+
setText(value);
|
90
|
+
onChange(value);
|
91
|
+
}}
|
92
|
+
onFocus={onFocus}
|
93
|
+
onBlur={onBlur}
|
94
|
+
onSearch={onSearch}
|
95
|
+
/>
|
96
|
+
);
|
97
|
+
};
|
98
|
+
|
99
|
+
export const Default: StoryObj<StoryPropsDefault> = {
|
100
|
+
argTypes: {
|
101
|
+
labelPlacement: {
|
102
|
+
options: ['outer', 'inner'],
|
103
|
+
control: {
|
104
|
+
type: 'inline-radio',
|
105
|
+
},
|
106
|
+
},
|
107
|
+
},
|
108
|
+
args: {
|
109
|
+
id: 'example-text-field',
|
110
|
+
size: 'l',
|
111
|
+
view: 'default',
|
112
|
+
label: 'Лейбл',
|
113
|
+
labelPlacement: 'outer',
|
114
|
+
placeholder: 'Заполните поле',
|
115
|
+
leftHelper: 'Подсказка к полю',
|
116
|
+
enumerationType: 'plain',
|
117
|
+
disabled: false,
|
118
|
+
readOnly: false,
|
119
|
+
'storybook:contentLeft': true,
|
120
|
+
'storybook:contentRight': true,
|
121
|
+
},
|
122
|
+
render: (args) => <StoryDefault {...args} />,
|
123
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { textFieldTokens as tokens, textField_labelPlacement_inner as labelPlacement_inner, textField_labelPlacement_outer as labelPlacement_outer } from '../../../../components/TextField';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'default',
|
6
|
+
size: 'l',
|
7
|
+
labelPlacement: 'outer'
|
8
|
+
},
|
9
|
+
variations: {
|
10
|
+
view: {
|
11
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-transparent-primary);", ":var(--surface-transparent-secondary);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
12
|
+
// TODO заменить --surface-transparent-positive на корректный токен
|
13
|
+
positive: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-positive);", ":var(--surface-transparent-positive-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
14
|
+
// // TODO заменить --surface-transparent-warning на корректный токен
|
15
|
+
warning: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-warning);", ":var(--surface-transparent-warning-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor),
|
16
|
+
// // TODO заменить --surface-transparent-negative на корректный токен
|
17
|
+
negative: /*#__PURE__*/css(["", ":var(--plasma-colors-primary);", ":var(--surface-transparent-negative);", ":var(--surface-transparent-negative-active);", ":var(--text-accent);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--surface-clear);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-primary);", ":var(--surface-transparent-secondary-active);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":var(--surface-transparent-secondary);", ":var(--text-primary);", ":0.72;", ":var(--text-accent);"], tokens.color, tokens.backgroundColor, tokens.backgroundColorFocus, tokens.caretColor, tokens.placeholderColor, tokens.labelColor, tokens.leftHelperColor, tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.chipCloseIconColor, tokens.chipColor, tokens.chipBackground, tokens.chipColorHover, tokens.chipBackgroundHover, tokens.chipColorActive, tokens.chipBackgroundActive, tokens.chipBackgroundReadOnly, tokens.chipColorReadOnly, tokens.chipBackgroundReadOnlyHover, tokens.chipColorReadOnlyHover, tokens.chipOpacityReadonly, tokens.focusColor)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
l: /*#__PURE__*/css(["", ":3.5rem;", ":1.0625rem 1rem 1.0625rem 1.125rem;", ":0.375rem;", ":0.875rem;", ":-0.0625rem 0.5rem -0.0625rem -0.125rem;", ":-0.0625rem 0 -0.0625rem 0.75rem;", ":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.75rem;", ":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;", ":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.5625rem 0 0.125rem 0;", ":1.5625rem 0 0.5625rem 0;", ":0.25rem;", ":0.5rem;", ":auto;", ":2.75rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
21
|
+
m: /*#__PURE__*/css(["", ":3rem;", ":0.875rem 0.875rem 0.875rem 1rem;", ":0.375rem;", ":0.75rem;", ":-0.125rem 0.375rem -0.125rem -0.125rem;", ":-0.125rem 0 -0.125rem 0.75rem;", ":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.625rem;", ":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;", ":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.375rem 0 0.125rem 0;", ":1.375rem 0 0.375rem 0;", ":0.25rem;", ":0.375rem;", ":auto;", ":2.25rem;", ":0.625rem;", ":0.875rem;", ":0.5rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
22
|
+
s: /*#__PURE__*/css(["", ":2.5rem;", ":0.875rem 0.75rem 0.875rem 0.6875rem;", ":0.375rem;", ":0.625rem;", ":-0.1875rem 0.25rem -0.1875rem -0.125rem;", ":-0.1875rem 0 -0.1875rem 0.75rem;", ":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.5rem;", ":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;", ":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.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.25rem;", ":auto;", ":1.75rem;", ":0.5rem;", ":0.75rem;", ":0.375rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight),
|
23
|
+
xs: /*#__PURE__*/css(["", ":2rem;", ":0.5625rem 0.5rem 0.5625rem 0.625rem;", ":0.375rem;", ":0.5rem;", ":-0.0625rem 0.25rem -0.0625rem -0.125rem;", ":-0.0625rem 0 -0.0625rem 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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.375rem;", ":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;", ":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.3125rem 0 0 0;", ":1.0625rem 0 0.3125rem 0;", ":0.25rem;", ":0.125rem;", ":auto;", ":1.25rem;", ":0.375rem;", ":0.625rem;", ":0.25rem;", ":0rem;", ":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-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.height, tokens.padding, tokens.paddingWithChips, tokens.borderRadius, tokens.leftContentMargin, tokens.rightContentMargin, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.labelOffset, tokens.labelFontFamily, tokens.labelFontSize, tokens.labelFontStyle, tokens.labelFontWeight, tokens.labelLetterSpacing, tokens.labelLineHeight, tokens.leftHelperOffset, tokens.leftHelperFontFamily, tokens.leftHelperFontSize, tokens.leftHelperFontStyle, tokens.leftHelperFontWeight, tokens.leftHelperLetterSpacing, tokens.leftHelperLineHeight, tokens.labelInnerPadding, tokens.contentLabelInnerPadding, tokens.chipGap, tokens.chipBorderRadius, tokens.chipWidth, tokens.chipHeight, tokens.chipPaddingRight, tokens.chipPaddingLeft, tokens.chipClearContentMarginLeft, tokens.chipClearContentMarginRight, tokens.chipCloseIconSize, tokens.chipFontFamily, tokens.chipFontSize, tokens.chipFontStyle, tokens.chipFontWeight, tokens.chipLetterSpacing, tokens.chipLineHeight)
|
24
|
+
},
|
25
|
+
labelPlacement: {
|
26
|
+
inner: [labelPlacement_inner, /*#__PURE__*/css(["&.", "{", ":var(--plasma-input-label-color,var(--plasma-input-placeholder-color,var(--plasma-colors-secondary)));", ":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);}"], labelPlacement_inner, tokens.placeholderColor, tokens.labelInnerFontFamily, tokens.labelInnerFontSize, tokens.labelInnerFontStyle, tokens.labelInnerFontWeight, tokens.labelInnerLetterSpacing, tokens.labelInnerLineHeight)],
|
27
|
+
outer: [labelPlacement_outer, /*#__PURE__*/css(["&.", "{}"], labelPlacement_outer)]
|
28
|
+
},
|
29
|
+
disabled: {
|
30
|
+
"true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
|
31
|
+
},
|
32
|
+
// TODO заменить --surface-transparent-primary на корректный токен
|
33
|
+
readOnly: {
|
34
|
+
"true": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-primary);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--text-secondary);"], tokens.colorReadOnly, tokens.backgroundColorReadOnly, tokens.placeholderColorReadOnly, tokens.leftHelperColorReadOnly, tokens.labelColorReadOnly)
|
35
|
+
}
|
36
|
+
}
|
37
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { component, mergeConfig } from '../../../../engines';
|
2
|
+
import { textFieldConfig } from '../../../../components/TextField';
|
3
|
+
import { config } from './TextField.config';
|
4
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(textFieldConfig, config);
|
5
|
+
export var TextField = /*#__PURE__*/component(mergedConfig);
|