@salutejs/plasma-new-hope 0.166.1-dev.0 → 0.167.0-canary.1459.11348453591.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +34 -19
- package/cjs/components/Autocomplete/Autocomplete.js +6 -2
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +38 -18
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +38 -18
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +38 -18
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +33 -18
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +33 -18
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +35 -20
- package/cjs/components/Range/Range.css +39 -19
- package/cjs/components/Slider/Slider.css +39 -19
- package/cjs/components/Slider/Slider.js +2 -0
- package/cjs/components/Slider/Slider.js.map +1 -1
- package/cjs/components/Slider/components/Double/Double.css +39 -19
- package/cjs/components/TextArea/TextArea.js +110 -30
- package/cjs/components/TextArea/TextArea.js.map +1 -1
- package/cjs/components/TextArea/TextArea.styles.js +160 -63
- package/cjs/components/TextArea/TextArea.styles.js.map +1 -1
- package/cjs/components/TextArea/TextArea.styles_mcxlmk.css +17 -0
- package/cjs/components/TextArea/TextArea.tokens.js +43 -4
- package/cjs/components/TextArea/TextArea.tokens.js.map +1 -1
- package/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
- package/cjs/components/TextArea/hooks/useAutoResize.js.map +1 -1
- package/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/cjs/components/TextArea/variations/_clear/base.js.map +1 -1
- package/cjs/components/TextArea/variations/_clear/base_1ezvvtt.css +1 -0
- package/cjs/components/TextArea/variations/_hint-size/base.js +9 -0
- package/cjs/components/TextArea/variations/_hint-size/base.js.map +1 -0
- package/cjs/components/TextArea/variations/_hint-size/base_1ipgv90.css +1 -0
- package/cjs/components/TextArea/variations/_hint-view/base.js +9 -0
- package/cjs/components/TextArea/variations/_hint-view/base.js.map +1 -0
- package/cjs/components/TextArea/variations/_hint-view/base_111a0qe.css +1 -0
- package/cjs/components/TextArea/variations/_view/base.js +1 -1
- package/cjs/components/TextArea/variations/_view/base.js.map +1 -1
- package/cjs/components/TextArea/variations/_view/base_1xgrm3x.css +1 -0
- package/cjs/components/TextField/TextField.js +98 -9
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +76 -23
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/TextField.styles_17xt45g.css +21 -0
- package/cjs/components/TextField/TextField.tokens.js +40 -1
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/variations/_clear/base.js +1 -1
- package/cjs/components/TextField/variations/_clear/base.js.map +1 -1
- package/cjs/components/TextField/variations/_clear/base_1pkwm4m.css +1 -0
- package/cjs/components/TextField/variations/_disabled/base.js +1 -1
- package/cjs/components/TextField/variations/_disabled/{base_2tv0nz.css → base_4d3opa.css} +1 -1
- package/cjs/components/TextField/variations/_hint-size/base.js +9 -0
- package/cjs/components/TextField/variations/_hint-size/base.js.map +1 -0
- package/cjs/components/TextField/variations/_hint-size/base_1x99605.css +1 -0
- package/cjs/components/TextField/variations/_hint-view/base.js +9 -0
- package/cjs/components/TextField/variations/_hint-view/base.js.map +1 -0
- package/cjs/components/TextField/variations/_hint-view/base_l8etux.css +1 -0
- package/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/cjs/components/TextField/variations/_label-placement/base.js.map +1 -1
- package/cjs/components/TextField/variations/_label-placement/base_3domm.css +1 -0
- package/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/cjs/components/TextField/variations/_read-only/base.js.map +1 -1
- package/cjs/components/TextField/variations/_read-only/base_17ypmu7.css +1 -0
- package/cjs/components/TextField/variations/_size/base.js +1 -1
- package/cjs/components/TextField/variations/_size/base.js.map +1 -1
- package/cjs/components/TextField/variations/_size/base_1xdmaqh.css +1 -0
- package/cjs/components/TextField/variations/_view/base.js +1 -1
- package/cjs/components/TextField/variations/_view/base.js.map +1 -1
- package/cjs/components/TextField/variations/_view/base_qhyte8.css +1 -0
- package/cjs/components/TextFieldGroup/TextFieldGroup.css +1 -1
- package/cjs/components/TextFieldGroup/variations/_shape/base.js +1 -1
- package/cjs/components/TextFieldGroup/variations/_shape/base_52bndd.css +1 -0
- package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +23 -0
- package/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js.map +1 -0
- package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +23 -0
- package/cjs/components/_Icon/Icons/IconInfoCircleOutline.js.map +1 -0
- package/cjs/index.css +54 -34
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +6 -2
- package/emotion/cjs/components/TextArea/TextArea.js +113 -35
- package/emotion/cjs/components/TextArea/TextArea.styles.js +99 -41
- package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +6 -1
- package/emotion/cjs/components/TextArea/TextArea.tokens.js +43 -4
- package/emotion/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
- package/emotion/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/TextArea/variations/_hint-size/base.js +11 -0
- package/emotion/cjs/components/TextArea/variations/_hint-size/tokens.json +21 -0
- package/emotion/cjs/components/TextArea/variations/_hint-view/base.js +11 -0
- package/emotion/cjs/components/TextArea/variations/_hint-view/tokens.json +5 -0
- package/emotion/cjs/components/TextArea/variations/_view/base.js +2 -1
- package/emotion/cjs/components/TextField/TextField.js +100 -12
- package/emotion/cjs/components/TextField/TextField.styles.js +84 -37
- package/emotion/cjs/components/TextField/TextField.template-doc.mdx +7 -1
- package/emotion/cjs/components/TextField/TextField.tokens.js +40 -1
- package/emotion/cjs/components/TextField/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/TextField/variations/_hint-size/base.js +11 -0
- package/emotion/cjs/components/TextField/variations/_hint-size/tokens.json +21 -0
- package/emotion/cjs/components/TextField/variations/_hint-view/base.js +11 -0
- package/emotion/cjs/components/TextField/variations/_hint-view/tokens.json +5 -0
- package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/emotion/cjs/components/TextField/variations/_size/base.js +1 -1
- package/emotion/cjs/components/TextField/variations/_view/base.js +1 -1
- package/emotion/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +22 -0
- package/emotion/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +22 -0
- package/emotion/cjs/components/_Icon/index.js +8 -1
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +19 -10
- package/emotion/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +22 -13
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +19 -10
- package/emotion/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +22 -13
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
- package/emotion/es/components/Autocomplete/Autocomplete.js +6 -2
- package/emotion/es/components/TextArea/TextArea.js +114 -36
- package/emotion/es/components/TextArea/TextArea.styles.js +98 -40
- package/emotion/es/components/TextArea/TextArea.template-doc.mdx +6 -1
- package/emotion/es/components/TextArea/TextArea.tokens.js +43 -4
- package/emotion/es/components/TextArea/hooks/useAutoResize.js +2 -4
- package/emotion/es/components/TextArea/variations/_clear/base.js +2 -2
- package/emotion/es/components/TextArea/variations/_hint-size/base.js +5 -0
- package/emotion/es/components/TextArea/variations/_hint-size/tokens.json +21 -0
- package/emotion/es/components/TextArea/variations/_hint-view/base.js +5 -0
- package/emotion/es/components/TextArea/variations/_hint-view/tokens.json +5 -0
- package/emotion/es/components/TextArea/variations/_view/base.js +2 -1
- package/emotion/es/components/TextField/TextField.js +100 -12
- package/emotion/es/components/TextField/TextField.styles.js +83 -36
- package/emotion/es/components/TextField/TextField.template-doc.mdx +7 -1
- package/emotion/es/components/TextField/TextField.tokens.js +40 -1
- package/emotion/es/components/TextField/variations/_clear/base.js +2 -2
- package/emotion/es/components/TextField/variations/_hint-size/base.js +5 -0
- package/emotion/es/components/TextField/variations/_hint-size/tokens.json +21 -0
- package/emotion/es/components/TextField/variations/_hint-view/base.js +5 -0
- package/emotion/es/components/TextField/variations/_hint-view/tokens.json +5 -0
- package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/es/components/TextField/variations/_read-only/base.js +2 -2
- package/emotion/es/components/TextField/variations/_size/base.js +2 -2
- package/emotion/es/components/TextField/variations/_view/base.js +2 -2
- package/emotion/es/components/_Icon/Icon.assets/InfoCircleOutline.js +15 -0
- package/emotion/es/components/_Icon/Icons/IconInfoCircleOutline.js +15 -0
- package/emotion/es/components/_Icon/index.js +2 -1
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +19 -10
- package/emotion/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +22 -13
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.config.js +19 -10
- package/emotion/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
- package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +22 -13
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
- package/es/components/Autocomplete/Autocomplete.css +34 -19
- package/es/components/Autocomplete/Autocomplete.js +6 -2
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.css +38 -18
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +38 -18
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +38 -18
- package/es/components/DatePicker/RangeDate/RangeDate.css +33 -18
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +33 -18
- package/es/components/DatePicker/SingleDate/SingleDate.css +35 -20
- package/es/components/Range/Range.css +39 -19
- package/es/components/Slider/Slider.css +39 -19
- package/es/components/Slider/Slider.js +2 -0
- package/es/components/Slider/Slider.js.map +1 -1
- package/es/components/Slider/components/Double/Double.css +39 -19
- package/es/components/TextArea/TextArea.js +114 -34
- package/es/components/TextArea/TextArea.js.map +1 -1
- package/es/components/TextArea/TextArea.styles.js +155 -64
- package/es/components/TextArea/TextArea.styles.js.map +1 -1
- package/es/components/TextArea/TextArea.styles_mcxlmk.css +17 -0
- package/es/components/TextArea/TextArea.tokens.js +43 -4
- package/es/components/TextArea/TextArea.tokens.js.map +1 -1
- package/es/components/TextArea/hooks/useAutoResize.js +2 -4
- package/es/components/TextArea/hooks/useAutoResize.js.map +1 -1
- package/es/components/TextArea/variations/_clear/base.js +1 -1
- package/es/components/TextArea/variations/_clear/base.js.map +1 -1
- package/es/components/TextArea/variations/_clear/base_1ezvvtt.css +1 -0
- package/es/components/TextArea/variations/_hint-size/base.js +5 -0
- package/es/components/TextArea/variations/_hint-size/base.js.map +1 -0
- package/es/components/TextArea/variations/_hint-size/base_1ipgv90.css +1 -0
- package/es/components/TextArea/variations/_hint-view/base.js +5 -0
- package/es/components/TextArea/variations/_hint-view/base.js.map +1 -0
- package/es/components/TextArea/variations/_hint-view/base_111a0qe.css +1 -0
- package/es/components/TextArea/variations/_view/base.js +1 -1
- package/es/components/TextArea/variations/_view/base.js.map +1 -1
- package/es/components/TextArea/variations/_view/base_1xgrm3x.css +1 -0
- package/es/components/TextField/TextField.js +100 -11
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +71 -24
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/TextField.styles_17xt45g.css +21 -0
- package/es/components/TextField/TextField.tokens.js +40 -1
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/variations/_clear/base.js +1 -1
- package/es/components/TextField/variations/_clear/base.js.map +1 -1
- package/es/components/TextField/variations/_clear/base_1pkwm4m.css +1 -0
- package/es/components/TextField/variations/_disabled/base.js +1 -1
- package/es/components/TextField/variations/_disabled/{base_2tv0nz.css → base_4d3opa.css} +1 -1
- package/es/components/TextField/variations/_hint-size/base.js +5 -0
- package/es/components/TextField/variations/_hint-size/base.js.map +1 -0
- package/es/components/TextField/variations/_hint-size/base_1x99605.css +1 -0
- package/es/components/TextField/variations/_hint-view/base.js +5 -0
- package/es/components/TextField/variations/_hint-view/base.js.map +1 -0
- package/es/components/TextField/variations/_hint-view/base_l8etux.css +1 -0
- package/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/es/components/TextField/variations/_label-placement/base.js.map +1 -1
- package/es/components/TextField/variations/_label-placement/base_3domm.css +1 -0
- package/es/components/TextField/variations/_read-only/base.js +1 -1
- package/es/components/TextField/variations/_read-only/base.js.map +1 -1
- package/es/components/TextField/variations/_read-only/base_17ypmu7.css +1 -0
- package/es/components/TextField/variations/_size/base.js +1 -1
- package/es/components/TextField/variations/_size/base.js.map +1 -1
- package/es/components/TextField/variations/_size/base_1xdmaqh.css +1 -0
- package/es/components/TextField/variations/_view/base.js +1 -1
- package/es/components/TextField/variations/_view/base.js.map +1 -1
- package/es/components/TextField/variations/_view/base_qhyte8.css +1 -0
- package/es/components/TextFieldGroup/TextFieldGroup.css +1 -1
- package/es/components/TextFieldGroup/variations/_shape/base.js +1 -1
- package/es/components/TextFieldGroup/variations/_shape/base_52bndd.css +1 -0
- package/es/components/_Icon/Icon.assets/InfoCircleOutline.js +19 -0
- package/es/components/_Icon/Icon.assets/InfoCircleOutline.js.map +1 -0
- package/es/components/_Icon/Icons/IconInfoCircleOutline.js +19 -0
- package/es/components/_Icon/Icons/IconInfoCircleOutline.js.map +1 -0
- package/es/index.css +54 -34
- package/package.json +2 -2
- package/styled-components/cjs/components/Autocomplete/Autocomplete.js +6 -2
- package/styled-components/cjs/components/TextArea/TextArea.js +112 -34
- package/styled-components/cjs/components/TextArea/TextArea.styles.js +85 -42
- package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +6 -1
- package/styled-components/cjs/components/TextArea/TextArea.tokens.js +43 -4
- package/styled-components/cjs/components/TextArea/hooks/useAutoResize.js +2 -4
- package/styled-components/cjs/components/TextArea/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/TextArea/variations/_hint-size/base.js +11 -0
- package/styled-components/cjs/components/TextArea/variations/_hint-size/tokens.json +21 -0
- package/styled-components/cjs/components/TextArea/variations/_hint-view/base.js +11 -0
- package/styled-components/cjs/components/TextArea/variations/_hint-view/tokens.json +5 -0
- package/styled-components/cjs/components/TextArea/variations/_view/base.js +2 -1
- package/styled-components/cjs/components/TextField/TextField.js +99 -11
- package/styled-components/cjs/components/TextField/TextField.styles.js +46 -21
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +7 -1
- package/styled-components/cjs/components/TextField/TextField.tokens.js +40 -1
- package/styled-components/cjs/components/TextField/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_hint-size/base.js +11 -0
- package/styled-components/cjs/components/TextField/variations/_hint-size/tokens.json +21 -0
- package/styled-components/cjs/components/TextField/variations/_hint-view/base.js +11 -0
- package/styled-components/cjs/components/TextField/variations/_hint-view/tokens.json +5 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_read-only/base.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_size/base.js +1 -1
- package/styled-components/cjs/components/TextField/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/_Icon/Icon.assets/InfoCircleOutline.js +22 -0
- package/styled-components/cjs/components/_Icon/Icons/IconInfoCircleOutline.js +22 -0
- package/styled-components/cjs/components/_Icon/index.js +8 -1
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.config.js +18 -9
- package/styled-components/cjs/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +18 -9
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.config.js +18 -9
- package/styled-components/cjs/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +18 -9
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
- package/styled-components/es/components/Autocomplete/Autocomplete.js +6 -2
- package/styled-components/es/components/TextArea/TextArea.js +113 -35
- package/styled-components/es/components/TextArea/TextArea.styles.js +84 -41
- package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +6 -1
- package/styled-components/es/components/TextArea/TextArea.tokens.js +43 -4
- package/styled-components/es/components/TextArea/hooks/useAutoResize.js +2 -4
- package/styled-components/es/components/TextArea/variations/_clear/base.js +2 -2
- package/styled-components/es/components/TextArea/variations/_hint-size/base.js +5 -0
- package/styled-components/es/components/TextArea/variations/_hint-size/tokens.json +21 -0
- package/styled-components/es/components/TextArea/variations/_hint-view/base.js +5 -0
- package/styled-components/es/components/TextArea/variations/_hint-view/tokens.json +5 -0
- package/styled-components/es/components/TextArea/variations/_view/base.js +2 -1
- package/styled-components/es/components/TextField/TextField.js +99 -11
- package/styled-components/es/components/TextField/TextField.styles.js +45 -20
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +7 -1
- package/styled-components/es/components/TextField/TextField.tokens.js +40 -1
- package/styled-components/es/components/TextField/variations/_clear/base.js +2 -2
- package/styled-components/es/components/TextField/variations/_hint-size/base.js +5 -0
- package/styled-components/es/components/TextField/variations/_hint-size/tokens.json +21 -0
- package/styled-components/es/components/TextField/variations/_hint-view/base.js +5 -0
- package/styled-components/es/components/TextField/variations/_hint-view/tokens.json +5 -0
- package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/es/components/TextField/variations/_read-only/base.js +2 -2
- package/styled-components/es/components/TextField/variations/_size/base.js +2 -2
- package/styled-components/es/components/TextField/variations/_view/base.js +2 -2
- package/styled-components/es/components/_Icon/Icon.assets/InfoCircleOutline.js +15 -0
- package/styled-components/es/components/_Icon/Icons/IconInfoCircleOutline.js +15 -0
- package/styled-components/es/components/_Icon/index.js +2 -1
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.config.js +18 -9
- package/styled-components/es/examples/plasma_b2c/components/TextArea/TextArea.stories.tsx +70 -0
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +18 -9
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +71 -1
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.config.js +18 -9
- package/styled-components/es/examples/plasma_web/components/TextArea/TextArea.stories.tsx +70 -0
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +18 -9
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +80 -10
- package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +424 -0
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +424 -0
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +424 -0
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +424 -0
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +424 -0
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.d.ts +9 -3
- package/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.styles.d.ts +11 -1
- package/types/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.tokens.d.ts +39 -0
- package/types/components/TextArea/TextArea.tokens.d.ts.map +1 -1
- package/types/components/TextArea/TextArea.types.d.ts +83 -3
- package/types/components/TextArea/TextArea.types.d.ts.map +1 -1
- package/types/components/TextArea/hooks/useAutoResize.d.ts.map +1 -1
- package/types/components/TextArea/variations/_clear/base.d.ts.map +1 -1
- package/types/components/TextArea/variations/_hint-size/base.d.ts +2 -0
- package/types/components/TextArea/variations/_hint-size/base.d.ts.map +1 -0
- package/types/components/TextArea/variations/_hint-view/base.d.ts +2 -0
- package/types/components/TextArea/variations/_hint-view/base.d.ts.map +1 -0
- package/types/components/TextArea/variations/_view/base.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts +9 -3
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +8 -0
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +39 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +78 -2
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/components/TextField/variations/_clear/base.d.ts.map +1 -1
- package/types/components/TextField/variations/_hint-size/base.d.ts +2 -0
- package/types/components/TextField/variations/_hint-size/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_hint-view/base.d.ts +2 -0
- package/types/components/TextField/variations/_hint-view/base.d.ts.map +1 -0
- package/types/components/TextField/variations/_label-placement/base.d.ts.map +1 -1
- package/types/components/TextField/variations/_read-only/base.d.ts.map +1 -1
- package/types/components/TextField/variations/_size/base.d.ts.map +1 -1
- package/types/components/TextField/variations/_view/base.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/InfoCircleOutline.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/InfoCircleOutline.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts +4 -0
- package/types/components/_Icon/Icons/IconInfoCircleOutline.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +1 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +788 -12
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts +9 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts +473 -0
- package/types/examples/plasma_b2c/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts +9 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +433 -0
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Mask/Mask.d.ts +788 -12
- package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts +9 -0
- package/types/examples/plasma_web/components/TextArea/TextArea.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextArea/TextArea.d.ts +473 -0
- package/types/examples/plasma_web/components/TextArea/TextArea.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts +9 -0
- package/types/examples/plasma_web/components/TextField/TextField.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +433 -0
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/cjs/components/TextArea/TextArea.styles_es0miz.css +0 -11
- package/cjs/components/TextArea/variations/_clear/base_vidplj.css +0 -1
- package/cjs/components/TextArea/variations/_view/base_td55th.css +0 -1
- package/cjs/components/TextField/TextField.styles_1d2ryq.css +0 -15
- package/cjs/components/TextField/variations/_clear/base_rit6gc.css +0 -1
- package/cjs/components/TextField/variations/_label-placement/base_1ghihns.css +0 -1
- package/cjs/components/TextField/variations/_read-only/base_1n7tghz.css +0 -1
- package/cjs/components/TextField/variations/_size/base_1h8l0kj.css +0 -1
- package/cjs/components/TextField/variations/_view/base_1noe46b.css +0 -1
- package/cjs/components/TextFieldGroup/variations/_shape/base_1e0je21.css +0 -1
- package/es/components/TextArea/TextArea.styles_es0miz.css +0 -11
- package/es/components/TextArea/variations/_clear/base_vidplj.css +0 -1
- package/es/components/TextArea/variations/_view/base_td55th.css +0 -1
- package/es/components/TextField/TextField.styles_1d2ryq.css +0 -15
- package/es/components/TextField/variations/_clear/base_rit6gc.css +0 -1
- package/es/components/TextField/variations/_label-placement/base_1ghihns.css +0 -1
- package/es/components/TextField/variations/_read-only/base_1n7tghz.css +0 -1
- package/es/components/TextField/variations/_size/base_1h8l0kj.css +0 -1
- package/es/components/TextField/variations/_view/base_1noe46b.css +0 -1
- package/es/components/TextFieldGroup/variations/_shape/base_1e0je21.css +0 -1
@@ -19,6 +19,7 @@ export var classes = {
|
|
19
19
|
outerLabelPlacement: 'label-placement-outer',
|
20
20
|
/** Класс для view `clear` */
|
21
21
|
clear: 'textarea-clear',
|
22
|
+
hasHint: 'textarea-has-hint',
|
22
23
|
hasRightContent: 'textarea-has-right-content',
|
23
24
|
hasDivider: 'textarea-has-divider'
|
24
25
|
};
|
@@ -185,6 +186,7 @@ export var tokens = {
|
|
185
186
|
indicatorLabelPlacementOuterRight: '--plasma-textarea-indicator-placement-outer-right',
|
186
187
|
clearIndicatorLabelPlacementInner: '--plasma-textarea__clear-indicator-placement-inner',
|
187
188
|
clearIndicatorLabelPlacementInnerRight: '--plasma-textarea__clear-indicator-placement-inner-right',
|
189
|
+
clearIndicatorHintInnerRight: '--plasma-textarea__clear-indicator-hint-placement-inner-right',
|
188
190
|
scrollbarWidth: '--plasma-textarea-scrollbar-width',
|
189
191
|
scrollbarBorderWidth: '--plasma-textarea-scrollbar-border-width',
|
190
192
|
scrollbarThumbBackgroundColor: '--plasma-textarea-scrollbar-thumb-background-color',
|
@@ -193,8 +195,45 @@ export var tokens = {
|
|
193
195
|
scrollbarTrackBackgroundColor: '--plasma-textarea-scrollbar-track-background-color',
|
194
196
|
scrollbarTrackBackgroundColorHover: '--plasma-textarea-scrollbar-track-background-color-hover',
|
195
197
|
scrollbarTrackBackgroundColorActive: '--plasma-textarea-scrollbar-track-background-color-active',
|
196
|
-
dividerColor: '--plasma-
|
197
|
-
dividerColorHover: '--plasma-
|
198
|
-
dividerColorFocus: '--plasma-
|
199
|
-
dividerColorReadOnly: '--plasma-
|
198
|
+
dividerColor: '--plasma-textarea-divider-color',
|
199
|
+
dividerColorHover: '--plasma-textarea-divider-color-hover',
|
200
|
+
dividerColorFocus: '--plasma-textarea-divider-color-focus',
|
201
|
+
dividerColorReadOnly: '--plasma-textarea-divider-color-readonly',
|
202
|
+
titleCaptionColor: '--plasma-textarea__title-caption-color',
|
203
|
+
titleCaptionColorReadOnly: '--plasma-textarea__title-caption-color-readonly',
|
204
|
+
titleCaptionInnerLabelOffset: '--plasma-textarea__title-caption-label-inner-offset',
|
205
|
+
titleCaptionFontFamily: '--plasma-textarea__title-caption-font-family',
|
206
|
+
titleCaptionFontStyle: '--plasma-textarea__title-caption-font-style',
|
207
|
+
titleCaptionFontSize: '--plasma-textarea__title-caption-font-size',
|
208
|
+
titleCaptionFontWeight: '--plasma-textarea__title-caption-font-weight',
|
209
|
+
titleCaptionLetterSpacing: '--plasma-textarea__title-caption-letter-spacing',
|
210
|
+
titleCaptionLineHeight: '--plasma-textarea__title-caption-line-height',
|
211
|
+
/** Токены для tooltip */
|
212
|
+
hintMargin: '--plasma-textarea__hint-margin',
|
213
|
+
hintTargetSize: '--plasma-textarea__hint-target-size',
|
214
|
+
hintIconColor: '--plasma-textarea__hint-icon-color',
|
215
|
+
hintInnerLabelPlacementOffset: '--plasma-textarea__hint-inner-label-placement-offset',
|
216
|
+
clearHintInnerLabelPlacementOffset: '--plasma-textarea__clear-hint-inner-label-placement-offset',
|
217
|
+
tooltipBackgroundColor: '--plasma-textarea__tooltip-background-color',
|
218
|
+
tooltipBoxShadow: '--plasma-textarea__tooltip-box-shadow',
|
219
|
+
tooltipColor: '--plasma-textarea__tooltip-color',
|
220
|
+
tooltipPaddingTop: '--plasma-textarea__tooltip-padding-top',
|
221
|
+
tooltipPaddingRight: '--plasma-textarea__tooltip-padding-right',
|
222
|
+
tooltipPaddingBottom: '--plasma-textarea__tooltip-padding-bottom',
|
223
|
+
tooltipPaddingLeft: '--plasma-textarea__tooltip-padding-left',
|
224
|
+
tooltipMinHeight: '--plasma-textarea__tooltip-min-height',
|
225
|
+
tooltipBorderRadius: '--plasma-textarea__tooltip-border-radius',
|
226
|
+
tooltipTextFontFamily: '--plasma-textarea__tooltip-text-font-family',
|
227
|
+
tooltipTextFontSize: '--plasma-textarea__tooltip-text-font-size',
|
228
|
+
tooltipTextFontStyle: '--plasma-textarea__tooltip-text-font-style',
|
229
|
+
tooltipTextFontWeight: '--plasma-textarea__tooltip-text-font-weight',
|
230
|
+
tooltipTextFontLetterSpacing: '--plasma-textarea__tooltip-text-font-letter-spacing',
|
231
|
+
tooltipTextFontLineHeight: '--plasma-textarea__tooltip-text-font-line-height',
|
232
|
+
tooltipContentLeftMargin: '--plasma-textarea__tooltip-content-left-margin',
|
233
|
+
tooltipArrowMaskWidth: '--plasma-textarea__tooltip-arrow-mask-width',
|
234
|
+
tooltipArrowMaskHeight: '--plasma-textarea__tooltip-arrow-mask-height',
|
235
|
+
tooltipArrowMaskImage: '--plasma-textarea__tooltip-arrow-mask-image',
|
236
|
+
tooltipArrowHeight: '--plasma-textarea__tooltip-arrow-height',
|
237
|
+
tooltipArrowEdgeMargin: '--plasma-textarea__tooltip-arrow-edge-margin',
|
238
|
+
tooltipArrowBackground: '--plasma-textarea__tooltip-arrow-background'
|
200
239
|
};
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import { useEffect, useRef } from 'react';
|
2
2
|
export var ROOT_FONT_SIZE = 16;
|
3
3
|
export var useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto) {
|
4
|
-
var isManualResize = useRef(false);
|
5
4
|
var previousHeight = useRef();
|
6
5
|
useEffect(function () {
|
7
|
-
if (active && ref && ref.current
|
6
|
+
if (active && ref && ref.current) {
|
8
7
|
// проверка на пользовательский resize (вручную)
|
9
8
|
var height = ref.current.clientHeight / ROOT_FONT_SIZE;
|
10
9
|
if (previousHeight.current !== undefined && previousHeight.current !== height) {
|
11
|
-
isManualResize.current = true;
|
12
10
|
return;
|
13
11
|
}
|
14
12
|
var style = getComputedStyle(ref.current);
|
@@ -23,5 +21,5 @@ export var useAutoResize = function useAutoResize(active, ref, value, minAuto, m
|
|
23
21
|
ref.current.style.height = "".concat(newHeight, "rem");
|
24
22
|
previousHeight.current = newHeight;
|
25
23
|
}
|
26
|
-
}, [ref, active, value]);
|
24
|
+
}, [ref, active, value, minAuto, maxAuto]);
|
27
25
|
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes, tokens } from '../../TextArea.tokens';
|
3
|
-
import { StyledContainer, StyledContent, StyledHelpers,
|
4
|
-
export var base = /*#__PURE__*/css(["&.", "{border:unset;", "{box-shadow:unset;background-color:unset;border-radius:0;padding-bottom:var(", ");}", "{margin-bottom:var(", ");}", "{right:0;bottom:unset;}", ",", "{padding-left:0;}", "{background-color:unset;border-radius:0;padding-top:var(", ");padding-right:0;}", "{color:var(", ");padding-right:0;&.", "{padding-right:var(", ");}}", "{&:not(.", "){", "{color:var(", ");}&.", " ", "{color:var(", ");}}&.", "{color:var(", ");}}", "{padding-left:0;}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}.", "{border:unset;border-radius:0;}&:focus-within:not([readonly]) .", "{background-color:unset;box-shadow:unset;}&:focus-within:not([readonly]) .", "{border:unset;}&:focus-within:not([readonly]) .", "{background-color:unset;}&.", "{", "{position:relative;--plasma_private-textarea-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textarea-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}}}"], classes.clear, StyledTextAreaWrapper, tokens.inputPaddingTop,
|
3
|
+
import { OuterLabelWrapper, StyledContainer, StyledContent, StyledHelpers, StyledHintWrapper, StyledIndicator, StyledPlaceholder, StyledTextArea, StyledTextAreaWrapper } from '../../TextArea.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["&.", "{border:unset;", "{box-shadow:unset;background-color:unset;border-radius:0;padding-bottom:var(", ");}", "{margin-bottom:var(", ");}", "{right:0;bottom:unset;}", ",", "{padding-left:0;}", "{background-color:unset;border-radius:0;padding-top:var(", ");padding-right:0;}", "{color:var(", ");padding-right:0;&.", "{padding-right:var(", ");}}", "{&:not(.", "){", "{color:var(", ");}&.", " ", "{color:var(", ");}}&.", "{color:var(", ");}}", "{padding-left:0;}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{&.", "{inset:var(", ");}}", "{&.", ".align-right{inset:var(", ");}}}.", "{border:unset;border-radius:0;}&:focus-within:not([readonly]) .", "{background-color:unset;box-shadow:unset;}&:focus-within:not([readonly]) .", "{border:unset;}&:focus-within:not([readonly]) .", "{background-color:unset;}&.", "{", "{position:relative;--plasma_private-textarea-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textarea-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textarea-divider-color:var( ", ",var(", ") );}}}"], classes.clear, StyledTextAreaWrapper, tokens.inputPaddingTop, OuterLabelWrapper, tokens.clearLabelMarginBottom, StyledContent, StyledTextArea, StyledHelpers, StyledHelpers, tokens.clearHelpersPaddingTop, StyledTextArea, tokens.clearInputColor, classes.hasRightContent, tokens.clearInputPaddingRightWithRightContent, StyledContainer, classes.innerPlaceholderUp, StyledPlaceholder, tokens.clearPlaceholderColor, classes.focusedOuterPlaceholderColor, StyledPlaceholder, tokens.clearPlaceholderColorFocus, classes.innerPlaceholderUp, tokens.placeholderColor, StyledPlaceholder, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.hasHint, StyledHintWrapper, classes.innerLabelPlacement, tokens.clearHintInnerLabelPlacementOffset, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorHintInnerRight, classes.styledContainer, classes.styledTextAreaWrapper, classes.styledContainer, classes.styledHelpers, classes.hasDivider, StyledTextAreaWrapper, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), StyledTextAreaWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor));
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tooltipTokens } from '../../../Tooltip';
|
3
|
+
import { tokens } from '../../TextArea.tokens';
|
4
|
+
import { Hint } from '../../TextArea.styles';
|
5
|
+
export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.paddingTop, tokens.tooltipPaddingTop, tooltipTokens.paddingRight, tokens.tooltipPaddingRight, tooltipTokens.paddingBottom, tokens.tooltipPaddingBottom, tooltipTokens.paddingLeft, tokens.tooltipPaddingLeft, tooltipTokens.minHeight, tokens.tooltipMinHeight, tooltipTokens.borderRadius, tokens.tooltipBorderRadius, tooltipTokens.textFontFamily, tokens.tooltipTextFontFamily, tooltipTokens.textFontSize, tokens.tooltipTextFontSize, tooltipTokens.textFontStyle, tokens.tooltipTextFontStyle, tooltipTokens.textFontWeight, tokens.tooltipTextFontWeight, tooltipTokens.textFontLetterSpacing, tokens.tooltipTextFontLetterSpacing, tooltipTokens.textFontLineHeight, tokens.tooltipTextFontLineHeight, tooltipTokens.contentLeftMargin, tokens.tooltipContentLeftMargin, tooltipTokens.arrowMaskWidth, tokens.tooltipArrowMaskWidth, tooltipTokens.arrowMaskHeight, tokens.tooltipArrowMaskHeight, tooltipTokens.arrowMaskImage, tokens.tooltipArrowMaskImage, tooltipTokens.arrowHeight, tokens.tooltipArrowHeight, tooltipTokens.arrowEdgeMargin, tokens.tooltipArrowEdgeMargin, tooltipTokens.arrowBackground, tokens.tooltipArrowBackground);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[
|
2
|
+
"--plasma-textarea__tooltip-padding-top",
|
3
|
+
"--plasma-textarea__tooltip-padding-right",
|
4
|
+
"--plasma-textarea__tooltip-padding-bottom",
|
5
|
+
"--plasma-textarea__tooltip-padding-left",
|
6
|
+
"--plasma-textarea__tooltip-min-height",
|
7
|
+
"--plasma-textarea__tooltip-border-radius",
|
8
|
+
"--plasma-textarea__tooltip-text-font-family",
|
9
|
+
"--plasma-textarea__tooltip-text-font-size",
|
10
|
+
"--plasma-textarea__tooltip-text-font-style",
|
11
|
+
"--plasma-textarea__tooltip-text-font-weight",
|
12
|
+
"--plasma-textarea__tooltip-text-font-letter-spacing",
|
13
|
+
"--plasma-textarea__tooltip-text-font-line-height",
|
14
|
+
"--plasma-textarea__tooltip-content-left-margin",
|
15
|
+
"--plasma-textarea__tooltip-arrow-mask-width",
|
16
|
+
"--plasma-textarea__tooltip-arrow-mask-height",
|
17
|
+
"--plasma-textarea__tooltip-arrow-mask-image",
|
18
|
+
"--plasma-textarea__tooltip-arrow-height",
|
19
|
+
"--plasma-textarea__tooltip-arrow-edge-margin",
|
20
|
+
"--plasma-textarea__tooltip-arrow-background"
|
21
|
+
]
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tooltipTokens } from '../../../Tooltip';
|
3
|
+
import { Hint } from '../../TextArea.styles';
|
4
|
+
import { tokens } from '../../TextArea.tokens';
|
5
|
+
export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.backgroundColor, tokens.tooltipBackgroundColor, tooltipTokens.boxShadow, tokens.tooltipBoxShadow, tooltipTokens.color, tokens.tooltipColor);
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { tokens, classes } from '../../TextArea.tokens';
|
3
|
+
import { TitleCaption } from '../../TextArea.styles';
|
3
4
|
var styledContainer = classes.styledContainer,
|
4
5
|
styledTextAreaWrapper = classes.styledTextAreaWrapper,
|
5
6
|
styledHelpers = classes.styledHelpers;
|
6
7
|
var exclusionSelectors = /*#__PURE__*/"not(.".concat(classes.clear, "):not([disabled]):not([readonly]):not(:focus-within)");
|
7
|
-
export var base = /*#__PURE__*/css([".", "{transition:box-shadow 0.1s ease-in-out;border-radius:var(", ");border:var(", ") solid var(", ");}.", "{transition:background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out;box-shadow:inset 0 0 0 var(", ",1px) var(", ");padding-right:var(", ",1px);}&:focus-within:not([readonly]) .", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ",1px) var(", ");}&:focus-within:not([readonly]) .", "{border:var(", ") solid var(", ");}&:focus-within:not([readonly]) .", "{background-color:var(", ");}&:hover:", " .", "{border:var(", ") solid var(", ");}&:hover:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:hover:", " .", " + .", "{background-color:var(", ");}&:active:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:active:", " .", " + .", "{background-color:var(", ");}"],
|
8
|
+
export var base = /*#__PURE__*/css(["", "{color:var(", ");}.", "{transition:box-shadow 0.1s ease-in-out;border-radius:var(", ");border:var(", ") solid var(", ");}.", "{transition:background-color 0.1s ease-in-out,box-shadow 0.1s ease-in-out;box-shadow:inset 0 0 0 var(", ",1px) var(", ");padding-right:var(", ",1px);}&:focus-within:not([readonly]) .", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ",1px) var(", ");}&:focus-within:not([readonly]) .", "{border:var(", ") solid var(", ");}&:focus-within:not([readonly]) .", "{background-color:var(", ");}&:hover:", " .", "{border:var(", ") solid var(", ");}&:hover:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:hover:", " .", " + .", "{background-color:var(", ");}&:active:", " .", "{box-shadow:inset 0 0 0 var(", ",1px) var(", ");background-color:var(", ");}&:active:", " .", " + .", "{background-color:var(", ");}"], TitleCaption, tokens.titleCaptionColor, styledContainer, tokens.borderRadius, tokens.borderSize, tokens.borderColor, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColor, tokens.borderSize, styledTextAreaWrapper, tokens.inputBackgroundColorFocus, tokens.borderSize, tokens.inputBorderColorFocus, styledContainer, tokens.borderSize, tokens.borderColorFocus, styledHelpers, tokens.helpersBackgroundColorFocus, exclusionSelectors, styledContainer, tokens.borderSize, tokens.borderColorHover, exclusionSelectors, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColorHover, tokens.inputBackgroundColorHover, exclusionSelectors, styledTextAreaWrapper, styledHelpers, tokens.helpersBackgroundColorHover, exclusionSelectors, styledTextAreaWrapper, tokens.borderSize, tokens.inputBorderColorActive, tokens.inputBackgroundColorActive, exclusionSelectors, styledTextAreaWrapper, styledHelpers, tokens.helpersBackgroundColorActive);
|
@@ -1,4 +1,5 @@
|
|
1
|
-
var
|
1
|
+
var _IconInfoCircleOutlin;
|
2
|
+
var _excluded = ["id", "className", "style", "contentLeft", "contentRight", "label", "labelPlacement", "textBefore", "textAfter", "placeholder", "leftHelper", "enumerationType", "requiredPlacement", "titleCaption", "hasHint", "hintTrigger", "hintText", "hintView", "hintSize", "hintTargetIcon", "hintPlacement", "hintHasArrow", "hintOffset", "hintWidth", "hintContentLeft", "view", "size", "readOnly", "disabled", "required", "clear", "optional", "hasDivider", "value", "chips", "onChange", "onChangeChips", "onSearch", "onKeyDown"];
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
5
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -8,17 +9,21 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
8
9
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
9
10
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
10
11
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
11
|
-
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
12
|
+
import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
12
13
|
import { safeUseId, useForkRef } from '@salutejs/plasma-core';
|
13
14
|
import { css } from 'styled-components';
|
14
15
|
import { cx } from '../../utils';
|
16
|
+
import { IconInfoCircleOutline } from '../_Icon';
|
17
|
+
import { useOutsideClick } from '../../hooks';
|
15
18
|
import { base as sizeCSS } from './variations/_size/base';
|
16
19
|
import { base as viewCSS } from './variations/_view/base';
|
17
20
|
import { base as clearCSS } from './variations/_clear/base';
|
18
21
|
import { base as disabledCSS } from './variations/_disabled/base';
|
19
22
|
import { base as readOnlyCSS } from './variations/_read-only/base';
|
20
23
|
import { base as labelPlacementCSS } from './variations/_label-placement/base';
|
21
|
-
import {
|
24
|
+
import { base as hintViewCSS } from './variations/_hint-view/base';
|
25
|
+
import { base as hintSizeCSS } from './variations/_hint-size/base';
|
26
|
+
import { Input, InputContainer, LeftHelper, Label, InputWrapper, InputLabelWrapper, StyledContentLeft, StyledContentRight, StyledChips, StyledTextBefore, StyledTextAfter, StyledIndicator, StyledOptionalText, InputPlaceholder, OuterLabelWrapper, TitleCaption, StyledHintWrapper, HintTargetWrapper, StyledIndicatorWrapper, Hint } from './TextField.styles';
|
22
27
|
import { classes } from './TextField.tokens';
|
23
28
|
import { TextFieldChip } from './ui';
|
24
29
|
import { useKeyNavigation } from './hooks';
|
@@ -42,6 +47,23 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
42
47
|
enumerationType = _ref$enumerationType === void 0 ? 'plain' : _ref$enumerationType,
|
43
48
|
_ref$requiredPlacemen = _ref.requiredPlacement,
|
44
49
|
requiredPlacement = _ref$requiredPlacemen === void 0 ? 'right' : _ref$requiredPlacemen,
|
50
|
+
titleCaption = _ref.titleCaption,
|
51
|
+
hasHint = _ref.hasHint,
|
52
|
+
_ref$hintTrigger = _ref.hintTrigger,
|
53
|
+
hintTrigger = _ref$hintTrigger === void 0 ? 'hover' : _ref$hintTrigger,
|
54
|
+
hintText = _ref.hintText,
|
55
|
+
_ref$hintView = _ref.hintView,
|
56
|
+
hintView = _ref$hintView === void 0 ? 'default' : _ref$hintView,
|
57
|
+
_ref$hintSize = _ref.hintSize,
|
58
|
+
hintSize = _ref$hintSize === void 0 ? 'm' : _ref$hintSize,
|
59
|
+
hintTargetIcon = _ref.hintTargetIcon,
|
60
|
+
_ref$hintPlacement = _ref.hintPlacement,
|
61
|
+
hintPlacement = _ref$hintPlacement === void 0 ? 'auto' : _ref$hintPlacement,
|
62
|
+
hintHasArrow = _ref.hintHasArrow,
|
63
|
+
_ref$hintOffset = _ref.hintOffset,
|
64
|
+
hintOffset = _ref$hintOffset === void 0 ? [0, 0] : _ref$hintOffset,
|
65
|
+
hintWidth = _ref.hintWidth,
|
66
|
+
hintContentLeft = _ref.hintContentLeft,
|
45
67
|
view = _ref.view,
|
46
68
|
size = _ref.size,
|
47
69
|
_ref$readOnly = _ref.readOnly,
|
@@ -78,10 +100,15 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
78
100
|
_useState4 = _slicedToArray(_useState3, 2),
|
79
101
|
chips = _useState4[0],
|
80
102
|
setChips = _useState4[1];
|
103
|
+
var _useState5 = useState(false),
|
104
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
105
|
+
isHintVisible = _useState6[0],
|
106
|
+
setIsHintVisible = _useState6[1];
|
81
107
|
var uniqId = safeUseId();
|
82
108
|
var innerId = id || uniqId;
|
83
109
|
var labelId = safeUseId();
|
84
110
|
var helperTextId = safeUseId();
|
111
|
+
var hintId = safeUseId();
|
85
112
|
var isDefaultView = view === 'default' || readOnly || disabled;
|
86
113
|
var isChipEnumeration = enumerationType === 'chip';
|
87
114
|
var isChipsVisible = isChipEnumeration && Boolean(chips === null || chips === void 0 ? void 0 : chips.length);
|
@@ -96,14 +123,37 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
96
123
|
var placeholderShown = Boolean(innerPlaceholderValue) && !hasValue;
|
97
124
|
var clearClass = clear ? classes.clear : undefined;
|
98
125
|
var hasDividerClass = hasDivider ? classes.hasDivider : undefined;
|
126
|
+
var hasHintClass = hasHint ? classes.hasHint : undefined;
|
99
127
|
var requiredPlacementClass = requiredPlacement === 'right' ? 'align-right ' : undefined;
|
100
128
|
var labelPlacementClass = innerLabelPlacementValue ? classes["".concat(innerLabelPlacementValue, "LabelPlacement")] : undefined;
|
101
129
|
var hasValueClass = hasValue ? classes.hasValue : undefined;
|
102
130
|
var wrapperWithoutLeftContent = !contentLeft && isChipsVisible ? classes.hasEmptyContentLeft : undefined;
|
103
131
|
var wrapperWithoutRightContent = !contentRight && isChipsVisible ? classes.hasEmptyContentRight : undefined;
|
132
|
+
var hintRef = useOutsideClick(function () {
|
133
|
+
setIsHintVisible(false);
|
134
|
+
});
|
135
|
+
var hintInnerRef = useRef(null);
|
136
|
+
var hintForkRef = useForkRef(hintRef, hintInnerRef);
|
104
137
|
var handleInput = function handleInput(event) {
|
105
138
|
setHasValue(Boolean(event.target.value));
|
106
139
|
};
|
140
|
+
var handleHintShow = function handleHintShow() {
|
141
|
+
return setIsHintVisible(true);
|
142
|
+
};
|
143
|
+
var handleHintHide = function handleHintHide() {
|
144
|
+
return setIsHintVisible(false);
|
145
|
+
};
|
146
|
+
var handleHintClick = function handleHintClick(event) {
|
147
|
+
if (hasHint && hintTrigger === 'click') {
|
148
|
+
var _hintInnerRef$current;
|
149
|
+
event.stopPropagation();
|
150
|
+
var targetIsPopover = event.target === hintInnerRef.current;
|
151
|
+
var rootHasTarget = (_hintInnerRef$current = hintInnerRef.current) === null || _hintInnerRef$current === void 0 ? void 0 : _hintInnerRef$current.contains(event.target);
|
152
|
+
if (!targetIsPopover && !rootHasTarget) {
|
153
|
+
setIsHintVisible(true);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
};
|
107
157
|
var handleChange = function handleChange(event) {
|
108
158
|
if (disabled || readOnly) {
|
109
159
|
return;
|
@@ -160,6 +210,31 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
160
210
|
onKeyDown(event);
|
161
211
|
}
|
162
212
|
};
|
213
|
+
var HintComponent = useMemo(function () {
|
214
|
+
return /*#__PURE__*/React.createElement(Hint, {
|
215
|
+
ref: hintForkRef,
|
216
|
+
text: String(hintText),
|
217
|
+
opened: isHintVisible,
|
218
|
+
target: /*#__PURE__*/React.createElement(HintTargetWrapper, _extends({
|
219
|
+
id: hintId
|
220
|
+
}, hintTrigger === 'hover' ? {
|
221
|
+
onMouseEnter: handleHintShow,
|
222
|
+
onMouseLeave: handleHintHide
|
223
|
+
} : {
|
224
|
+
onClick: handleHintClick
|
225
|
+
}), hintTargetIcon || _IconInfoCircleOutlin || (_IconInfoCircleOutlin = /*#__PURE__*/React.createElement(IconInfoCircleOutline, {
|
226
|
+
size: "xs",
|
227
|
+
color: "inherit"
|
228
|
+
}))),
|
229
|
+
placement: hintPlacement,
|
230
|
+
hasArrow: hintHasArrow,
|
231
|
+
offset: hintOffset,
|
232
|
+
minWidth: hintWidth,
|
233
|
+
maxWidth: hintWidth,
|
234
|
+
contentLeft: hintContentLeft,
|
235
|
+
frame: hintId
|
236
|
+
});
|
237
|
+
}, [hintText, isHintVisible, hintId, hintTrigger, handleHintShow, handleHintHide, handleHintClick, hintTargetIcon, hintPlacement, hintHasArrow, hintOffset, hintWidth, hintContentLeft]);
|
163
238
|
useEffect(function () {
|
164
239
|
if (!isChipEnumeration && !(values !== null && values !== void 0 && values.length)) {
|
165
240
|
return;
|
@@ -182,7 +257,7 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
182
257
|
var innerOptional = Boolean(required ? false : optional);
|
183
258
|
var hasPlaceholderOptional = innerOptional && !innerLabelValue && !hasOuterLabel;
|
184
259
|
var optionalTextNode = innerOptional ? /*#__PURE__*/React.createElement(StyledOptionalText, null, Boolean(hasPlaceholderOptional ? innerPlaceholderValue : innerLabelValue) && '\xa0', optionalText) : null;
|
185
|
-
return /*#__PURE__*/React.createElement(Root, {
|
260
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
186
261
|
view: view,
|
187
262
|
size: size,
|
188
263
|
disabled: disabled,
|
@@ -190,21 +265,28 @@ export var textFieldRoot = function textFieldRoot(Root) {
|
|
190
265
|
clear: clear,
|
191
266
|
labelPlacement: innerLabelPlacementValue,
|
192
267
|
onClick: handleInputFocus,
|
193
|
-
className: cx(labelPlacementClass, clearClass, hasDividerClass, classes.textFieldGroupItem, className),
|
268
|
+
className: cx(labelPlacementClass, clearClass, hasDividerClass, hasHintClass, classes.textFieldGroupItem, className),
|
194
269
|
style: style
|
195
|
-
},
|
270
|
+
}, hasHint && {
|
271
|
+
hintView: hintView,
|
272
|
+
hintSize: hintSize
|
273
|
+
}), (hasOuterLabel || titleCaption) && /*#__PURE__*/React.createElement(OuterLabelWrapper, {
|
274
|
+
isInnnerLabel: labelPlacement === 'inner'
|
275
|
+
}, hasOuterLabel && /*#__PURE__*/React.createElement(StyledIndicatorWrapper, null, /*#__PURE__*/React.createElement(Label, {
|
196
276
|
id: labelId,
|
197
277
|
htmlFor: id
|
198
|
-
}, required && /*#__PURE__*/React.createElement(StyledIndicator, {
|
199
|
-
className: cx(classes.outerLabelPlacement, requiredPlacementClass)
|
200
|
-
}),
|
278
|
+
}, innerLabelValue), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, null, HintComponent), required && /*#__PURE__*/React.createElement(StyledIndicator, {
|
279
|
+
className: cx(classes.outerLabelPlacement, requiredPlacementClass, hasHintClass)
|
280
|
+
}), optionalTextNode), titleCaption && /*#__PURE__*/React.createElement(TitleCaption, null, titleCaption)), /*#__PURE__*/React.createElement(InputWrapper
|
201
281
|
// Ref для внутреннего использования. Не отдается наружу.
|
202
282
|
, {
|
203
283
|
ref: rest.inputWrapperRef,
|
204
284
|
className: cx(withHasChips, wrapperWithoutLeftContent, wrapperWithoutRightContent)
|
205
|
-
}, !hasOuterLabel && required && /*#__PURE__*/React.createElement(StyledIndicator, {
|
285
|
+
}, !hasOuterLabel && /*#__PURE__*/React.createElement(React.Fragment, null, required && /*#__PURE__*/React.createElement(StyledIndicator, {
|
206
286
|
className: cx(classes.innerLabelPlacement, requiredPlacementClass)
|
207
|
-
}),
|
287
|
+
}), hasHint && /*#__PURE__*/React.createElement(StyledHintWrapper, {
|
288
|
+
className: classes.innerLabelPlacement
|
289
|
+
}, HintComponent)), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, {
|
208
290
|
isClear: clear,
|
209
291
|
isDefaultView: isDefaultView
|
210
292
|
}, contentLeft), /*#__PURE__*/React.createElement(InputLabelWrapper, {
|
@@ -280,6 +362,12 @@ export var textFieldConfig = {
|
|
280
362
|
},
|
281
363
|
labelPlacement: {
|
282
364
|
css: labelPlacementCSS
|
365
|
+
},
|
366
|
+
hintView: {
|
367
|
+
css: hintViewCSS
|
368
|
+
},
|
369
|
+
hintSize: {
|
370
|
+
css: hintSizeCSS
|
283
371
|
}
|
284
372
|
},
|
285
373
|
defaults: {
|
@@ -1,51 +1,76 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
+
import { component, mergeConfig } from '../../engines';
|
3
|
+
import { tooltipConfig } from '../Tooltip';
|
2
4
|
import { classes, tokens } from './TextField.tokens';
|
3
|
-
|
5
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(tooltipConfig);
|
6
|
+
var Tooltip = /*#__PURE__*/component(mergedConfig);
|
7
|
+
export var Hint = /*#__PURE__*/styled(Tooltip).withConfig({
|
4
8
|
componentId: "plasma-new-hope__sc-g4vxbb-0"
|
9
|
+
})([""]);
|
10
|
+
export var InputWrapper = /*#__PURE__*/styled.div.withConfig({
|
11
|
+
componentId: "plasma-new-hope__sc-g4vxbb-1"
|
5
12
|
})(["position:relative;display:flex;align-items:center;box-sizing:border-box;"]);
|
6
13
|
export var InputLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
7
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
14
|
+
componentId: "plasma-new-hope__sc-g4vxbb-2"
|
8
15
|
})(["flex:1;overflow:scroll;position:relative;width:100%;display:inline-flex;align-items:center;::-webkit-scrollbar{display:none;}scrollbar-width:none;overscroll-behavior:contain;&.", "{height:var(", ");border-radius:var(", ");}"], /*#__PURE__*/String(classes.hasChips), tokens.chipHeight, tokens.chipBorderRadius);
|
9
16
|
export var StyledChips = /*#__PURE__*/styled.div.withConfig({
|
10
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
17
|
+
componentId: "plasma-new-hope__sc-g4vxbb-3"
|
11
18
|
})(["display:flex;gap:var(", ");margin-right:var(", ");user-select:none;"], tokens.chipGap, tokens.chipGap);
|
12
19
|
export var Input = /*#__PURE__*/styled.input.withConfig({
|
13
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
20
|
+
componentId: "plasma-new-hope__sc-g4vxbb-4"
|
14
21
|
})(["box-sizing:border-box;appearance:none;border:0;padding:0;background-color:transparent;outline:none;width:100%;z-index:1;&::placeholder{opacity:0;}"]);
|
15
22
|
export var InputContainer = /*#__PURE__*/styled.div.withConfig({
|
16
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
23
|
+
componentId: "plasma-new-hope__sc-g4vxbb-5"
|
17
24
|
})(["position:relative;flex:1;min-width:60%;"]);
|
18
25
|
export var InputPlaceholder = /*#__PURE__*/styled.div.withConfig({
|
19
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
26
|
+
componentId: "plasma-new-hope__sc-g4vxbb-6"
|
20
27
|
})(["position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;white-space:nowrap;pointer-events:none;user-select:none;font:inherit;letter-spacing:inherit;line-height:inherit;color:var(", ");"], tokens.placeholderColor);
|
28
|
+
export var OuterLabelWrapper = /*#__PURE__*/styled.div.withConfig({
|
29
|
+
componentId: "plasma-new-hope__sc-g4vxbb-7"
|
30
|
+
})(["display:flex;align-items:center;margin-bottom:", ";"], function (_ref) {
|
31
|
+
var isInnnerLabel = _ref.isInnnerLabel;
|
32
|
+
return isInnnerLabel ? "var(".concat(tokens.titleCaptionInnerLabelOffset, ")") : "var(".concat(tokens.labelOffset, ")");
|
33
|
+
});
|
34
|
+
export var TitleCaption = /*#__PURE__*/styled.div.withConfig({
|
35
|
+
componentId: "plasma-new-hope__sc-g4vxbb-8"
|
36
|
+
})(["display:inline-block;margin-left:auto;"]);
|
37
|
+
export var StyledIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
|
38
|
+
componentId: "plasma-new-hope__sc-g4vxbb-9"
|
39
|
+
})(["position:relative;display:inline-flex;align-items:center;"]);
|
21
40
|
export var Label = /*#__PURE__*/styled.label.withConfig({
|
22
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
23
|
-
})(["
|
41
|
+
componentId: "plasma-new-hope__sc-g4vxbb-10"
|
42
|
+
})(["display:inline-flex;"]);
|
24
43
|
var StyledContentSlot = /*#__PURE__*/styled.div.withConfig({
|
25
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
26
|
-
})(["color:", ";line-height:0;"], function (
|
27
|
-
var isDefaultView =
|
28
|
-
isClear =
|
44
|
+
componentId: "plasma-new-hope__sc-g4vxbb-11"
|
45
|
+
})(["color:", ";line-height:0;"], function (_ref2) {
|
46
|
+
var isDefaultView = _ref2.isDefaultView,
|
47
|
+
isClear = _ref2.isClear;
|
29
48
|
return !isDefaultView && isClear ? "var(".concat(tokens.clearColor, ")") : "var(".concat(tokens.contentSlotColor, ")");
|
30
49
|
});
|
31
50
|
export var StyledContentLeft = /*#__PURE__*/styled(StyledContentSlot).withConfig({
|
32
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
51
|
+
componentId: "plasma-new-hope__sc-g4vxbb-12"
|
33
52
|
})(["margin:var(", ");"], tokens.leftContentMargin);
|
34
53
|
export var StyledContentRight = /*#__PURE__*/styled.div.withConfig({
|
35
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
54
|
+
componentId: "plasma-new-hope__sc-g4vxbb-13"
|
36
55
|
})(["line-height:0;margin:var(", ");color:var(", ",var(", "));&:hover{color:var(", ");color:var(", ",var(", "));cursor:pointer;}&:active{color:var(", ",var(", "));}"], tokens.rightContentMargin, tokens.contentSlotRightColor, tokens.contentSlotColor, tokens.contentSlotColorHover, tokens.contentSlotRightColorHover, tokens.contentSlotColorHover, tokens.contentSlotRightColorActive, tokens.contentSlotColorActive);
|
37
56
|
export var LeftHelper = /*#__PURE__*/styled.div.withConfig({
|
38
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
57
|
+
componentId: "plasma-new-hope__sc-g4vxbb-14"
|
39
58
|
})([""]);
|
40
59
|
export var StyledTextBefore = /*#__PURE__*/styled.div.withConfig({
|
41
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
60
|
+
componentId: "plasma-new-hope__sc-g4vxbb-15"
|
42
61
|
})([""]);
|
43
62
|
export var StyledTextAfter = /*#__PURE__*/styled.div.withConfig({
|
44
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
63
|
+
componentId: "plasma-new-hope__sc-g4vxbb-16"
|
45
64
|
})([""]);
|
46
65
|
export var StyledOptionalText = /*#__PURE__*/styled.span.withConfig({
|
47
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
66
|
+
componentId: "plasma-new-hope__sc-g4vxbb-17"
|
48
67
|
})(["color:var(", ");"], tokens.optionalColor);
|
68
|
+
export var StyledHintWrapper = /*#__PURE__*/styled.div.withConfig({
|
69
|
+
componentId: "plasma-new-hope__sc-g4vxbb-18"
|
70
|
+
})(["display:inline-block;line-height:0;&.", "{position:absolute;margin:0;inset:var(", ");}"], classes.innerLabelPlacement, tokens.hintInnerLabelPlacementOffset);
|
71
|
+
export var HintTargetWrapper = /*#__PURE__*/styled.div.withConfig({
|
72
|
+
componentId: "plasma-new-hope__sc-g4vxbb-19"
|
73
|
+
})(["color:var(", ");display:flex;justify-content:center;align-items:center;"], tokens.hintIconColor);
|
49
74
|
export var StyledIndicator = /*#__PURE__*/styled.div.withConfig({
|
50
|
-
componentId: "plasma-new-hope__sc-g4vxbb-
|
51
|
-
})(["position:absolute;border-radius:50%;background-color:var(", ");&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}"], tokens.indicatorColor, classes.outerLabelPlacement, tokens.indicatorSizeOuter, tokens.indicatorSizeOuter, tokens.indicatorLabelPlacementOuter, tokens.indicatorLabelPlacementOuterRight, classes.innerLabelPlacement, tokens.indicatorSizeInner, tokens.indicatorSizeInner, tokens.indicatorLabelPlacementInner, tokens.indicatorLabelPlacementInnerRight);
|
75
|
+
componentId: "plasma-new-hope__sc-g4vxbb-20"
|
76
|
+
})(["position:absolute;border-radius:50%;background-color:var(", ");&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");&.", "{right:calc(-1 * var(", "));}}}&.", "{width:var(", ");height:var(", ");inset:var(", ");&.align-right{inset:var(", ");}}"], tokens.indicatorColor, classes.outerLabelPlacement, tokens.indicatorSizeOuter, tokens.indicatorSizeOuter, tokens.indicatorLabelPlacementOuter, tokens.indicatorLabelPlacementOuterRight, classes.hasHint, tokens.indicatorSizeOuter, classes.innerLabelPlacement, tokens.indicatorSizeInner, tokens.indicatorSizeInner, tokens.indicatorLabelPlacementInner, tokens.indicatorLabelPlacementInnerRight);
|
@@ -125,7 +125,8 @@ export function App() {
|
|
125
125
|
```
|
126
126
|
|
127
127
|
### Подсказка
|
128
|
-
Для вывода подсказки снизу от поля используйте свойство `helperText
|
128
|
+
Для вывода подсказки снизу от поля используйте свойство `helperText`,
|
129
|
+
для подсказки в виде Tooltip - `hasHint`, для подсказки сверху справа - `titleCaption`:
|
129
130
|
|
130
131
|
```tsx live
|
131
132
|
import React from 'react';
|
@@ -138,6 +139,11 @@ export function App() {
|
|
138
139
|
placeholder="Введите значение"
|
139
140
|
defaultValue="Значение"
|
140
141
|
helperText="Подсказка снизу"
|
142
|
+
titleCaption="Подсказка сверху"
|
143
|
+
hasHint
|
144
|
+
hintText="Подсказка в виде Tooltip"
|
145
|
+
hintView="default"
|
146
|
+
hintSize="m"
|
141
147
|
/>
|
142
148
|
</div>
|
143
149
|
);
|
@@ -8,6 +8,7 @@ export var classes = {
|
|
8
8
|
hideLabel: 'hide-label',
|
9
9
|
clear: 'textfield-clear',
|
10
10
|
hasDivider: 'textfield-has-divider',
|
11
|
+
hasHint: 'textfield-has-hint',
|
11
12
|
textFieldGroupItem: 'text-field-group-item'
|
12
13
|
};
|
13
14
|
export var tokens = {
|
@@ -77,6 +78,15 @@ export var tokens = {
|
|
77
78
|
labelInnerLineHeight: '--plasma-textfield-placement_inner__label-line-height',
|
78
79
|
labelInnerPadding: '--plasma-textfield-placement_inner__label-padding',
|
79
80
|
contentLabelInnerPadding: '--plasma-textfield-placement_inner__content-padding',
|
81
|
+
titleCaptionColor: '--plasma-textfield__title-caption-color',
|
82
|
+
titleCaptionColorReadOnly: '--plasma-textfield__title-caption-color-readonly',
|
83
|
+
titleCaptionInnerLabelOffset: '--plasma-textfield__title-caption-label-inner-offset',
|
84
|
+
titleCaptionFontFamily: '--plasma-textfield__title-caption-font-family',
|
85
|
+
titleCaptionFontStyle: '--plasma-textfield__title-caption-font-style',
|
86
|
+
titleCaptionFontSize: '--plasma-textfield__title-caption-font-size',
|
87
|
+
titleCaptionFontWeight: '--plasma-textfield__title-caption-font-weight',
|
88
|
+
titleCaptionLetterSpacing: '--plasma-textfield__title-caption-letter-spacing',
|
89
|
+
titleCaptionLineHeight: '--plasma-textfield__title-caption-line-height',
|
80
90
|
leftHelperColor: '--plasma-textfield__left-helper-color',
|
81
91
|
leftHelperColorReadOnly: '--plasma-textfield__left-helper-color-readonly',
|
82
92
|
leftHelperOffset: '--plasma-textfield__left-helper-offset',
|
@@ -93,6 +103,34 @@ export var tokens = {
|
|
93
103
|
textAfterMargin: '--plasma-textfield__after-text-margin',
|
94
104
|
/** Прозрачность для всего компонента в состоянии disabled */
|
95
105
|
disabledOpacity: '--plasma-textfield-disabled-opacity',
|
106
|
+
/** Токены для tooltip */
|
107
|
+
hintMargin: '--plasma-textfield__hint-margin',
|
108
|
+
hintTargetSize: '--plasma-textfield__hint-target-size',
|
109
|
+
hintIconColor: '--plasma-textfield__hint-icon-color',
|
110
|
+
hintInnerLabelPlacementOffset: '--plasma-textfield__hint-inner-label-placement-offset',
|
111
|
+
clearHintInnerLabelPlacementOffset: '--plasma-textfield__clear-hint-inner-label-placement-offset',
|
112
|
+
tooltipBackgroundColor: '--plasma-textfield__tooltip-background-color',
|
113
|
+
tooltipBoxShadow: '--plasma-textfield__tooltip-box-shadow',
|
114
|
+
tooltipColor: '--plasma-textfield__tooltip-color',
|
115
|
+
tooltipPaddingTop: '--plasma-textfield__tooltip-padding-top',
|
116
|
+
tooltipPaddingRight: '--plasma-textfield__tooltip-padding-right',
|
117
|
+
tooltipPaddingBottom: '--plasma-textfield__tooltip-padding-bottom',
|
118
|
+
tooltipPaddingLeft: '--plasma-textfield__tooltip-padding-left',
|
119
|
+
tooltipMinHeight: '--plasma-textfield__tooltip-min-height',
|
120
|
+
tooltipBorderRadius: '--plasma-textfield__tooltip-border-radius',
|
121
|
+
tooltipTextFontFamily: '--plasma-textfield__tooltip-text-font-family',
|
122
|
+
tooltipTextFontSize: '--plasma-textfield__tooltip-text-font-size',
|
123
|
+
tooltipTextFontStyle: '--plasma-textfield__tooltip-text-font-style',
|
124
|
+
tooltipTextFontWeight: '--plasma-textfield__tooltip-text-font-weight',
|
125
|
+
tooltipTextFontLetterSpacing: '--plasma-textfield__tooltip-text-font-letter-spacing',
|
126
|
+
tooltipTextFontLineHeight: '--plasma-textfield__tooltip-text-font-line-height',
|
127
|
+
tooltipContentLeftMargin: '--plasma-textfield__tooltip-content-left-margin',
|
128
|
+
tooltipArrowMaskWidth: '--plasma-textfield__tooltip-arrow-mask-width',
|
129
|
+
tooltipArrowMaskHeight: '--plasma-textfield__tooltip-arrow-mask-height',
|
130
|
+
tooltipArrowMaskImage: '--plasma-textfield__tooltip-arrow-mask-image',
|
131
|
+
tooltipArrowHeight: '--plasma-textfield__tooltip-arrow-height',
|
132
|
+
tooltipArrowEdgeMargin: '--plasma-textfield__tooltip-arrow-edge-margin',
|
133
|
+
tooltipArrowBackground: '--plasma-textfield__tooltip-arrow-background',
|
96
134
|
/** Токены чипа */
|
97
135
|
chipHeight: '--plasma-textfield__chip-height',
|
98
136
|
chipBorderRadius: '--plasma-textfield__chip-border-radius',
|
@@ -136,5 +174,6 @@ export var tokens = {
|
|
136
174
|
indicatorLabelPlacementInnerRight: '--plasma-textfield__indicator-placement-inner-right',
|
137
175
|
indicatorLabelPlacementOuterRight: '--plasma-textfield__indicator-placement-outer-right',
|
138
176
|
clearIndicatorLabelPlacementInner: '--plasma-textfield__clear-indicator-placement-inner',
|
139
|
-
clearIndicatorLabelPlacementInnerRight: '--plasma-textfield__clear-indicator-placement-inner-right'
|
177
|
+
clearIndicatorLabelPlacementInnerRight: '--plasma-textfield__clear-indicator-placement-inner-right',
|
178
|
+
clearIndicatorHintInnerRight: '--plasma-textfield__clear-indicator-hint-placement-inner-right'
|
140
179
|
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes, tokens } from '../../TextField.tokens';
|
3
|
-
import { Input, InputPlaceholder, InputWrapper,
|
4
|
-
export var base = /*#__PURE__*/css(["&.", "{&[readonly] ", ",", "{background-color:unset;box-shadow:none;border-radius:0;padding-left:0;padding-right:0;&:hover{background-color:unset;}}", "{margin-left:0;}", "{margin-right:0;}&.", "{", "{margin-bottom:var(", ");}}", "{color:var(", ");}", "{color:var(", ");}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{--plasma_private-textfield-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textfield-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textfield-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textfield-divider-color:var( ", ",var(", ") );", "{color:var(", ");}}}}"], classes.clear, InputWrapper, InputWrapper, StyledContentLeft, StyledContentRight, classes.outerLabelPlacement,
|
3
|
+
import { Input, InputPlaceholder, InputWrapper, OuterLabelWrapper, StyledContentLeft, StyledContentRight, StyledHintWrapper, StyledIndicator } from '../../TextField.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["&.", "{&[readonly] ", ",", "{background-color:unset;box-shadow:none;border-radius:0;padding-left:0;padding-right:0;&:hover{background-color:unset;}}", "{margin-left:0;}", "{margin-right:0;}&.", "{", "{margin-bottom:var(", ");}}", "{color:var(", ");}", "{color:var(", ");}", "{&.", "{inset:var(", ");&.align-right{inset:var(", ");}}}&.", "{", "{&.", "{inset:var(", ");}}", "{&.", ".align-right{inset:var(", ");}}}&.", "{", "{--plasma_private-textfield-divider-color:var(", ");&:before{content:'';position:absolute;height:0.063rem;width:100%;bottom:0;left:0;background-color:var(--plasma_private-textfield-divider-color);transition:background-color 0.1s ease-in;}}&:not([readonly]) ", ":hover{--plasma_private-textfield-divider-color:var( ", ",var(", ") );}&:not([readonly]) ", ":focus-within{--plasma_private-textfield-divider-color:var( ", ",var(", ") );", "{color:var(", ");}}}}"], classes.clear, InputWrapper, InputWrapper, StyledContentLeft, StyledContentRight, classes.outerLabelPlacement, OuterLabelWrapper, tokens.clearLabelOffset, Input, tokens.clearColor, InputPlaceholder, tokens.clearPlaceholderColor, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorLabelPlacementInner, tokens.clearIndicatorLabelPlacementInnerRight, classes.hasHint, StyledHintWrapper, classes.innerLabelPlacement, tokens.clearHintInnerLabelPlacementOffset, StyledIndicator, classes.innerLabelPlacement, tokens.clearIndicatorHintInnerRight, classes.hasDivider, InputWrapper, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorHover, /*#__PURE__*/String(tokens.dividerColor), InputWrapper, tokens.dividerColorFocus, /*#__PURE__*/String(tokens.dividerColor), InputPlaceholder, tokens.clearPlaceholderColorFocus);
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tokens } from '../../TextField.tokens';
|
3
|
+
import { tooltipTokens } from '../../../Tooltip';
|
4
|
+
import { Hint } from '../../TextField.styles';
|
5
|
+
export var base = /*#__PURE__*/css(["", "{", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");}"], Hint, tooltipTokens.paddingTop, tokens.tooltipPaddingTop, tooltipTokens.paddingRight, tokens.tooltipPaddingRight, tooltipTokens.paddingBottom, tokens.tooltipPaddingBottom, tooltipTokens.paddingLeft, tokens.tooltipPaddingLeft, tooltipTokens.minHeight, tokens.tooltipMinHeight, tooltipTokens.borderRadius, tokens.tooltipBorderRadius, tooltipTokens.textFontFamily, tokens.tooltipTextFontFamily, tooltipTokens.textFontSize, tokens.tooltipTextFontSize, tooltipTokens.textFontStyle, tokens.tooltipTextFontStyle, tooltipTokens.textFontWeight, tokens.tooltipTextFontWeight, tooltipTokens.textFontLetterSpacing, tokens.tooltipTextFontLetterSpacing, tooltipTokens.textFontLineHeight, tokens.tooltipTextFontLineHeight, tooltipTokens.contentLeftMargin, tokens.tooltipContentLeftMargin, tooltipTokens.arrowMaskWidth, tokens.tooltipArrowMaskWidth, tooltipTokens.arrowMaskHeight, tokens.tooltipArrowMaskHeight, tooltipTokens.arrowMaskImage, tokens.tooltipArrowMaskImage, tooltipTokens.arrowHeight, tokens.tooltipArrowHeight, tooltipTokens.arrowEdgeMargin, tokens.tooltipArrowEdgeMargin, tooltipTokens.arrowBackground, tokens.tooltipArrowBackground);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[
|
2
|
+
"--plasma-textfield__tooltip-padding-top",
|
3
|
+
"--plasma-textfield__tooltip-padding-right",
|
4
|
+
"--plasma-textfield__tooltip-padding-bottom",
|
5
|
+
"--plasma-textfield__tooltip-padding-left",
|
6
|
+
"--plasma-textfield__tooltip-min-height",
|
7
|
+
"--plasma-textfield__tooltip-border-radius",
|
8
|
+
"--plasma-textfield__tooltip-text-font-family",
|
9
|
+
"--plasma-textfield__tooltip-text-font-size",
|
10
|
+
"--plasma-textfield__tooltip-text-font-style",
|
11
|
+
"--plasma-textfield__tooltip-text-font-weight",
|
12
|
+
"--plasma-textfield__tooltip-text-font-letter-spacing",
|
13
|
+
"--plasma-textfield__tooltip-text-font-line-height",
|
14
|
+
"--plasma-textfield__tooltip-content-left-margin",
|
15
|
+
"--plasma-textfield__tooltip-arrow-mask-width",
|
16
|
+
"--plasma-textfield__tooltip-arrow-mask-height",
|
17
|
+
"--plasma-textfield__tooltip-arrow-mask-image",
|
18
|
+
"--plasma-textfield__tooltip-arrow-height",
|
19
|
+
"--plasma-textfield__tooltip-arrow-edge-margin",
|
20
|
+
"--plasma-textfield__tooltip-arrow-background"
|
21
|
+
]
|