@salutejs/plasma-new-hope 0.195.0-canary.1546.11913646617.0 → 0.195.0-canary.1556.11915399849.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Autocomplete/Autocomplete.css +17 -17
- package/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
- package/cjs/components/Badge/Badge.css +4 -4
- package/cjs/components/Badge/Badge.js +7 -17
- package/cjs/components/Badge/Badge.js.map +1 -1
- package/cjs/components/Badge/Badge.tokens.js +5 -10
- package/cjs/components/Badge/Badge.tokens.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/cjs/components/Badge/variations/_clear/base.js.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_oopyb7.css +1 -0
- package/cjs/components/Badge/variations/_size/base.js +1 -1
- package/cjs/components/Badge/variations/_size/base.js.map +1 -1
- package/{es/components/Badge/variations/_size/base_bu5opk.css → cjs/components/Badge/variations/_size/base_to0y5x.css} +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/cjs/components/Badge/variations/_transparent/base.js.map +1 -1
- package/cjs/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
- package/cjs/components/Badge/variations/_view/base.js +1 -1
- package/cjs/components/Badge/variations/_view/base.js.map +1 -1
- package/cjs/components/Badge/variations/_view/base_qlxank.css +1 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +17 -17
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
- package/cjs/components/DatePicker/RangeDate/RangeDate.css +17 -17
- package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
- package/cjs/components/DatePicker/SingleDate/SingleDate.css +17 -17
- package/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/cjs/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +17 -17
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
- package/cjs/components/Range/Range.css +17 -17
- package/cjs/components/Select/Select.css +17 -17
- package/cjs/components/Select/ui/Inner/Inner.css +17 -17
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +17 -17
- package/cjs/components/Select/ui/Target/Target.css +17 -17
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Slider/Slider.css +17 -17
- package/cjs/components/Slider/components/Double/Double.css +17 -17
- package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
- package/cjs/components/TextField/TextField.js +9 -5
- package/cjs/components/TextField/TextField.js.map +1 -1
- package/cjs/components/TextField/TextField.styles.js +20 -11
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
- package/cjs/components/TextField/TextField.tokens.js +1 -0
- package/cjs/components/TextField/TextField.tokens.js.map +1 -1
- package/cjs/components/TextField/ui/Hint/Hint.css +20 -20
- 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_y1lvvc.css +1 -0
- package/cjs/index.css +21 -21
- package/emotion/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/emotion/cjs/components/Badge/Badge.js +7 -17
- package/emotion/cjs/components/Badge/Badge.template-doc.mdx +16 -40
- package/emotion/cjs/components/Badge/Badge.tokens.js +6 -10
- package/emotion/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_size/base.js +1 -2
- package/emotion/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/emotion/cjs/components/Badge/variations/_view/base.js +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/emotion/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/emotion/cjs/components/TextField/TextField.js +10 -6
- package/emotion/cjs/components/TextField/TextField.styles.js +29 -26
- package/emotion/cjs/components/TextField/TextField.tokens.js +1 -0
- package/emotion/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
- package/emotion/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
- package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
- package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/emotion/es/components/Autocomplete/Autocomplete.js +7 -1
- package/emotion/es/components/Badge/Badge.js +8 -18
- package/emotion/es/components/Badge/Badge.template-doc.mdx +16 -40
- package/emotion/es/components/Badge/Badge.tokens.js +5 -9
- package/emotion/es/components/Badge/variations/_clear/base.js +2 -2
- package/emotion/es/components/Badge/variations/_size/base.js +2 -3
- package/emotion/es/components/Badge/variations/_transparent/base.js +2 -2
- package/emotion/es/components/Badge/variations/_view/base.js +2 -2
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/emotion/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/emotion/es/components/TextField/TextField.js +10 -6
- package/emotion/es/components/TextField/TextField.styles.js +29 -26
- package/emotion/es/components/TextField/TextField.tokens.js +1 -0
- package/emotion/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.config.js +15 -15
- package/emotion/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
- package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/emotion/es/examples/plasma_web/components/Badge/Badge.config.js +14 -14
- package/emotion/es/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
- package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/es/components/Autocomplete/Autocomplete.css +17 -17
- package/es/components/Autocomplete/Autocomplete.js +7 -1
- package/es/components/Autocomplete/Autocomplete.js.map +1 -1
- package/es/components/Badge/Badge.css +4 -4
- package/es/components/Badge/Badge.js +10 -20
- package/es/components/Badge/Badge.js.map +1 -1
- package/es/components/Badge/Badge.tokens.js +6 -10
- package/es/components/Badge/Badge.tokens.js.map +1 -1
- package/es/components/Badge/variations/_clear/base.js +1 -1
- package/es/components/Badge/variations/_clear/base.js.map +1 -1
- package/es/components/Badge/variations/_clear/base_oopyb7.css +1 -0
- package/es/components/Badge/variations/_size/base.js +1 -1
- package/es/components/Badge/variations/_size/base.js.map +1 -1
- package/{cjs/components/Badge/variations/_size/base_bu5opk.css → es/components/Badge/variations/_size/base_to0y5x.css} +1 -1
- package/es/components/Badge/variations/_transparent/base.js +1 -1
- package/es/components/Badge/variations/_transparent/base.js.map +1 -1
- package/es/components/Badge/variations/_transparent/base_1l6036y.css +1 -0
- package/es/components/Badge/variations/_view/base.js +1 -1
- package/es/components/Badge/variations/_view/base.js.map +1 -1
- package/es/components/Badge/variations/_view/base_qlxank.css +1 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +17 -17
- package/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +17 -17
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +17 -17
- package/es/components/DatePicker/RangeDate/RangeDate.css +17 -17
- package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +17 -17
- package/es/components/DatePicker/SingleDate/SingleDate.css +17 -17
- package/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/es/components/DatePicker/SingleDate/SingleDate.js.map +1 -1
- package/es/components/Pagination/Pagination.css +17 -17
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +17 -17
- package/es/components/Range/Range.css +17 -17
- package/es/components/Select/Select.css +17 -17
- package/es/components/Select/ui/Inner/Inner.css +17 -17
- package/es/components/Select/ui/Inner/ui/Item/Item.css +17 -17
- package/es/components/Select/ui/Target/Target.css +17 -17
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +17 -17
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/components/Slider/Slider.css +17 -17
- package/es/components/Slider/components/Double/Double.css +17 -17
- package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +17 -17
- package/es/components/TextField/TextField.js +9 -5
- package/es/components/TextField/TextField.js.map +1 -1
- package/es/components/TextField/TextField.styles.js +20 -11
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/{TextField.styles_j7dqpn.css → TextField.styles_ppcxpx.css} +1 -1
- package/es/components/TextField/TextField.tokens.js +1 -0
- package/es/components/TextField/TextField.tokens.js.map +1 -1
- package/es/components/TextField/ui/Hint/Hint.css +20 -20
- 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_y1lvvc.css +1 -0
- package/es/index.css +21 -21
- package/package.json +2 -2
- package/styled-components/cjs/components/Autocomplete/Autocomplete.js +7 -1
- package/styled-components/cjs/components/Badge/Badge.js +7 -17
- package/styled-components/cjs/components/Badge/Badge.template-doc.mdx +16 -40
- package/styled-components/cjs/components/Badge/Badge.tokens.js +6 -10
- package/styled-components/cjs/components/Badge/variations/_clear/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_size/base.js +1 -2
- package/styled-components/cjs/components/Badge/variations/_transparent/base.js +1 -1
- package/styled-components/cjs/components/Badge/variations/_view/base.js +1 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/styled-components/cjs/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/styled-components/cjs/components/TextField/TextField.js +9 -5
- package/styled-components/cjs/components/TextField/TextField.styles.js +9 -6
- package/styled-components/cjs/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/cjs/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
- package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/cjs/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
- package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/styled-components/es/components/Autocomplete/Autocomplete.js +7 -1
- package/styled-components/es/components/Badge/Badge.js +8 -18
- package/styled-components/es/components/Badge/Badge.template-doc.mdx +16 -40
- package/styled-components/es/components/Badge/Badge.tokens.js +5 -9
- package/styled-components/es/components/Badge/variations/_clear/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_size/base.js +2 -3
- package/styled-components/es/components/Badge/variations/_transparent/base.js +2 -2
- package/styled-components/es/components/Badge/variations/_view/base.js +2 -2
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -2
- package/styled-components/es/components/DatePicker/SingleDate/SingleDate.js +9 -4
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +10 -3
- package/styled-components/es/components/TextField/TextField.js +9 -5
- package/styled-components/es/components/TextField/TextField.styles.js +9 -6
- package/styled-components/es/components/TextField/TextField.tokens.js +1 -0
- package/styled-components/es/components/TextField/variations/_label-placement/base.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_b2c/components/Badge/Badge.stories.tsx +6 -23
- package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +7 -0
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.config.js +5 -5
- package/styled-components/es/examples/plasma_web/components/Badge/Badge.stories.tsx +6 -27
- package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +9 -2
- package/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts +717 -61
- package/types/components/Autocomplete/ui/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/Badge/Badge.d.ts.map +1 -1
- package/types/components/Badge/Badge.tokens.d.ts +4 -8
- package/types/components/Badge/Badge.tokens.d.ts.map +1 -1
- package/types/components/Badge/Badge.types.d.ts +5 -18
- package/types/components/Badge/Badge.types.d.ts.map +1 -1
- package/types/components/Badge/variations/_clear/base.d.ts.map +1 -1
- package/types/components/Badge/variations/_size/base.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +30 -10
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts +717 -61
- package/types/components/Combobox/ComboboxNew/ui/Target/Target.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts +2 -2
- package/types/components/DatePicker/SingleDate/SingleDate.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts +717 -61
- package/types/components/DatePicker/SingleDate/SingleDate.styles.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +28 -9
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +176 -4
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Range/Range.styles.d.ts +717 -61
- package/types/components/Range/Range.styles.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +30 -10
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/Target.d.ts +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts +1 -1
- package/types/components/Select/ui/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts +717 -61
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Slider/components/Double/Double.styles.d.ts +717 -61
- package/types/components/Slider/components/Double/Double.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.d.ts.map +1 -1
- package/types/components/TextField/TextField.styles.d.ts +3 -1
- package/types/components/TextField/TextField.styles.d.ts.map +1 -1
- package/types/components/TextField/TextField.tokens.d.ts +1 -0
- package/types/components/TextField/TextField.tokens.d.ts.map +1 -1
- package/types/components/TextField/TextField.types.d.ts +43 -20
- package/types/components/TextField/TextField.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts +3 -5
- package/types/examples/plasma_b2c/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts +4 -61
- package/types/examples/plasma_b2c/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +1045 -133
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +47 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts +1246 -62
- package/types/examples/plasma_b2c/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +176 -4
- package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts +717 -61
- package/types/examples/plasma_b2c/components/TextField/TextField.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts +3 -5
- package/types/examples/plasma_web/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Badge/Badge.d.ts +4 -61
- package/types/examples/plasma_web/components/Badge/Badge.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +1045 -133
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +47 -1
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Mask/Mask.d.ts +1246 -62
- package/types/examples/plasma_web/components/Mask/Mask.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Select/Select.d.ts +176 -4
- package/types/examples/plasma_web/components/Select/Select.d.ts.map +1 -1
- package/types/examples/plasma_web/components/TextField/TextField.d.ts +717 -61
- package/types/examples/plasma_web/components/TextField/TextField.d.ts.map +1 -1
- package/cjs/components/Badge/variations/_clear/base_wiboj8.css +0 -1
- package/cjs/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
- package/cjs/components/Badge/variations/_view/base_j3xzf3.css +0 -1
- package/cjs/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
- package/es/components/Badge/variations/_clear/base_wiboj8.css +0 -1
- package/es/components/Badge/variations/_transparent/base_aapqhz.css +0 -1
- package/es/components/Badge/variations/_view/base_j3xzf3.css +0 -1
- package/es/components/TextField/variations/_label-placement/base_gttvto.css +0 -1
@@ -7,4 +7,4 @@ exports.base = void 0;
|
|
7
7
|
var _styledComponents = /*#__PURE__*/require("styled-components");
|
8
8
|
var _TextField = /*#__PURE__*/require("../../TextField.tokens");
|
9
9
|
var _TextField2 = /*#__PURE__*/require("../../TextField.styles");
|
10
|
-
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
|
10
|
+
var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["&.", "{", "{position:relative;display:inline-block;color:var(", ");}}&.", "{", "{padding:var(", ");}", ",", "{padding:var(", ");}", ":focus ~ ", ",", ".", " ~ ", ",", ".", " ~ ", "{color:var(", ");align-items:flex-start;padding:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}", "{color:var(", ");pointer-events:none;position:absolute;top:0;display:flex;align-items:center;box-sizing:border-box;height:var(", ");padding-top:calc(calc(var(", ") - var(", ")) / 2);padding-bottom:calc(calc(var(", ") - var(", ")) / 2);}&.", " ", "{color:var(", ");}}"], _TextField.classes.outerLabelPlacement, _TextField2.Label, _TextField.tokens.labelColor, _TextField.classes.innerLabelPlacement, _TextField2.InputContainer, _TextField.tokens.contentLabelInnerPadding, _TextField2.StyledTextAfter, _TextField2.StyledTextBefore, _TextField.tokens.contentLabelInnerPadding, _TextField2.Input, _TextField2.Label, _TextField2.Input, _TextField.classes.hasValue, _TextField2.Label, _TextField2.Input, _TextField.classes.forcePlaceholder, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.labelInnerPadding, _TextField.tokens.labelInnerFontFamily, _TextField.tokens.labelInnerFontSize, _TextField.tokens.labelInnerFontStyle, _TextField.tokens.labelInnerFontWeight, _TextField.tokens.labelInnerLetterSpacing, _TextField.tokens.labelInnerLineHeight, _TextField2.Label, _TextField.tokens.placeholderColor, _TextField.tokens.height, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.tokens.height, _TextField.tokens.labelLineHeight, _TextField.classes.clear, _TextField2.Label, _TextField.tokens.clearPlaceholderColor);
|
@@ -22,10 +22,10 @@ var config = exports.config = {
|
|
22
22
|
light: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], _Badge.badgeTokens.color, _Badge.badgeTokens.background, _Badge.badgeTokens.colorTransparent, _Badge.badgeTokens.backgroundTransparent, _Badge.badgeTokens.colorClear)
|
23
23
|
},
|
24
24
|
size: {
|
25
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":1.75rem;", ":0
|
26
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.5rem;", ":0
|
27
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.25rem;", ":0
|
28
|
-
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.25rem;", ":1rem;", ":0
|
25
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
26
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
27
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
28
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight)
|
29
29
|
},
|
30
30
|
pilled: {
|
31
31
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":1.25rem;"], _Badge.badgeTokens.pilledBorderRadius)
|
@@ -34,7 +34,7 @@ var config = exports.config = {
|
|
34
34
|
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
35
35
|
},
|
36
36
|
clear: {
|
37
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)([""
|
37
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
38
38
|
},
|
39
39
|
truncate: {
|
40
40
|
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
@@ -34,10 +34,6 @@ const meta: Meta<typeof Badge> = {
|
|
34
34
|
maxWidth: {
|
35
35
|
control: { type: 'text' },
|
36
36
|
},
|
37
|
-
text: {
|
38
|
-
control: { type: 'text' },
|
39
|
-
if: { arg: 'enableText', truthy: true },
|
40
|
-
},
|
41
37
|
...disableProps(['contentLeft', 'contentRight']),
|
42
38
|
},
|
43
39
|
};
|
@@ -47,7 +43,6 @@ export default meta;
|
|
47
43
|
type StoryProps = ComponentProps<typeof Badge> & {
|
48
44
|
enableContentLeft: boolean;
|
49
45
|
enableContentRight: boolean;
|
50
|
-
enableText: boolean;
|
51
46
|
};
|
52
47
|
type Story = StoryObj<StoryProps>;
|
53
48
|
|
@@ -68,14 +63,13 @@ export const Default: Story = {
|
|
68
63
|
},
|
69
64
|
enableContentRight: {
|
70
65
|
control: { type: 'boolean' },
|
71
|
-
if: { arg: '
|
66
|
+
if: { arg: 'enableContentLeft', truthy: false },
|
72
67
|
},
|
73
68
|
},
|
74
69
|
args: {
|
70
|
+
text: 'Hello Kitty',
|
75
71
|
view: 'default',
|
76
72
|
size: 'm',
|
77
|
-
enableText: true,
|
78
|
-
text: 'Hello',
|
79
73
|
enableContentLeft: false,
|
80
74
|
enableContentRight: false,
|
81
75
|
clear: false,
|
@@ -83,24 +77,13 @@ export const Default: Story = {
|
|
83
77
|
transparent: false,
|
84
78
|
maxWidth: '',
|
85
79
|
},
|
86
|
-
render: ({ enableContentLeft, enableContentRight,
|
87
|
-
const iconSize =
|
88
|
-
switch (size) {
|
89
|
-
case 'l':
|
90
|
-
return '1rem';
|
91
|
-
case 'xs':
|
92
|
-
return '0.625rem';
|
93
|
-
default:
|
94
|
-
return '0.75rem';
|
95
|
-
}
|
96
|
-
};
|
80
|
+
render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
|
81
|
+
const iconSize = size === 'l' ? '1rem' : '0.75rem';
|
97
82
|
|
98
83
|
return (
|
99
84
|
<Badge
|
100
|
-
contentLeft={
|
101
|
-
|
102
|
-
}
|
103
|
-
contentRight={enableContentRight ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
|
85
|
+
contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
|
86
|
+
contentRight={enableContentRight ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
|
104
87
|
size={size}
|
105
88
|
{...rest}
|
106
89
|
/>
|
package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx
CHANGED
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
+
hasPlaceholder: {
|
91
|
+
control: {
|
92
|
+
type: 'boolean',
|
93
|
+
},
|
94
|
+
if: { arg: 'labelPlacement', eq: 'inner' },
|
95
|
+
},
|
90
96
|
size: {
|
91
97
|
options: sizes,
|
92
98
|
control: {
|
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
210
216
|
view: 'default',
|
211
217
|
label: 'Лейбл',
|
212
218
|
labelPlacement: 'outer',
|
219
|
+
hasPlaceholder: false,
|
213
220
|
titleCaption: 'Подпись к полю',
|
214
221
|
textBefore: '',
|
215
222
|
textAfter: '',
|
@@ -22,10 +22,10 @@ var config = exports.config = {
|
|
22
22
|
light: /*#__PURE__*/(0, _styledComponents.css)(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-text-primary);", ":var(--on-dark-surface-transparent-card);", ":var(--on-dark-text-primary);"], _Badge.badgeTokens.color, _Badge.badgeTokens.background, _Badge.badgeTokens.colorTransparent, _Badge.badgeTokens.backgroundTransparent, _Badge.badgeTokens.colorClear)
|
23
23
|
},
|
24
24
|
size: {
|
25
|
-
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":1.75rem;", ":0
|
26
|
-
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.5rem;", ":0
|
27
|
-
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.25rem;", ":0
|
28
|
-
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.25rem;", ":1rem;", ":0
|
25
|
+
l: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.5rem;", ":1.75rem;", ":0.6875rem;", ":0.6875rem;", ":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.0625rem;", ":0.25rem;", ":0.25rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
26
|
+
m: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.5rem;", ":0.5625rem;", ":0.5625rem;", ":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.0625rem;", ":0.1875rem;", ":0.1875rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
27
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.375rem;", ":1.25rem;", ":0.4375rem;", ":0.4375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight),
|
28
|
+
xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.25rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);", ":-0.0625rem;", ":0.125rem;", ":0.125rem;", ":-0.0625rem;"], _Badge.badgeTokens.borderRadius, _Badge.badgeTokens.height, _Badge.badgeTokens.paddingRight, _Badge.badgeTokens.paddingLeft, _Badge.badgeTokens.fontFamily, _Badge.badgeTokens.fontSize, _Badge.badgeTokens.fontStyle, _Badge.badgeTokens.fontWeight, _Badge.badgeTokens.letterSpacing, _Badge.badgeTokens.lineHeight, _Badge.badgeTokens.leftContentMarginLeft, _Badge.badgeTokens.leftContentMarginRight, _Badge.badgeTokens.rightContentMarginLeft, _Badge.badgeTokens.rightContentMarginRight)
|
29
29
|
},
|
30
30
|
pilled: {
|
31
31
|
"true": /*#__PURE__*/(0, _styledComponents.css)(["", ":1.25rem;"], _Badge.badgeTokens.pilledBorderRadius)
|
@@ -34,7 +34,7 @@ var config = exports.config = {
|
|
34
34
|
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
35
35
|
},
|
36
36
|
clear: {
|
37
|
-
"true": /*#__PURE__*/(0, _styledComponents.css)([""
|
37
|
+
"true": /*#__PURE__*/(0, _styledComponents.css)([""])
|
38
38
|
}
|
39
39
|
}
|
40
40
|
};
|
@@ -31,13 +31,6 @@ const meta: Meta<typeof Badge> = {
|
|
31
31
|
control: { type: 'boolean' },
|
32
32
|
if: { arg: 'clear', truthy: false },
|
33
33
|
},
|
34
|
-
maxWidth: {
|
35
|
-
control: { type: 'text' },
|
36
|
-
},
|
37
|
-
text: {
|
38
|
-
control: { type: 'text' },
|
39
|
-
if: { arg: 'enableText', truthy: true },
|
40
|
-
},
|
41
34
|
...disableProps(['contentLeft', 'contentRight']),
|
42
35
|
},
|
43
36
|
};
|
@@ -47,7 +40,6 @@ export default meta;
|
|
47
40
|
type StoryProps = ComponentProps<typeof Badge> & {
|
48
41
|
enableContentLeft: boolean;
|
49
42
|
enableContentRight: boolean;
|
50
|
-
enableText: boolean;
|
51
43
|
};
|
52
44
|
type Story = StoryObj<StoryProps>;
|
53
45
|
|
@@ -68,39 +60,26 @@ export const Default: Story = {
|
|
68
60
|
},
|
69
61
|
enableContentRight: {
|
70
62
|
control: { type: 'boolean' },
|
71
|
-
if: { arg: '
|
63
|
+
if: { arg: 'enableContentLeft', truthy: false },
|
72
64
|
},
|
73
65
|
},
|
74
66
|
args: {
|
67
|
+
text: 'Hello',
|
75
68
|
view: 'default',
|
76
69
|
size: 'm',
|
77
|
-
enableText: true,
|
78
|
-
text: 'Hello',
|
79
70
|
enableContentLeft: false,
|
80
71
|
enableContentRight: false,
|
81
72
|
clear: false,
|
82
73
|
pilled: false,
|
83
74
|
transparent: false,
|
84
|
-
maxWidth: '',
|
85
75
|
},
|
86
|
-
render: ({ enableContentLeft, enableContentRight,
|
87
|
-
const iconSize =
|
88
|
-
switch (size) {
|
89
|
-
case 'l':
|
90
|
-
return '1rem';
|
91
|
-
case 'xs':
|
92
|
-
return '0.625rem';
|
93
|
-
default:
|
94
|
-
return '0.75rem';
|
95
|
-
}
|
96
|
-
};
|
76
|
+
render: ({ enableContentLeft, enableContentRight, size, ...rest }: StoryProps) => {
|
77
|
+
const iconSize = size === 'l' ? '1rem' : '0.75rem';
|
97
78
|
|
98
79
|
return (
|
99
80
|
<Badge
|
100
|
-
contentLeft={
|
101
|
-
|
102
|
-
}
|
103
|
-
contentRight={enableContentRight ? <BellIcon width={iconSize()} height={iconSize()} /> : undefined}
|
81
|
+
contentLeft={enableContentLeft ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
|
82
|
+
contentRight={enableContentRight ? <BellIcon width={iconSize} height={iconSize} /> : undefined}
|
104
83
|
size={size}
|
105
84
|
{...rest}
|
106
85
|
/>
|
package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx
CHANGED
@@ -87,6 +87,12 @@ const meta: Meta<typeof TextField> = {
|
|
87
87
|
type: 'inline-radio',
|
88
88
|
},
|
89
89
|
},
|
90
|
+
hasPlaceholder: {
|
91
|
+
control: {
|
92
|
+
type: 'boolean',
|
93
|
+
},
|
94
|
+
if: { arg: 'labelPlacement', eq: 'inner' },
|
95
|
+
},
|
90
96
|
size: {
|
91
97
|
options: sizes,
|
92
98
|
control: {
|
@@ -210,6 +216,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
210
216
|
view: 'default',
|
211
217
|
label: 'Лейбл',
|
212
218
|
labelPlacement: 'outer',
|
219
|
+
hasPlaceholder: false,
|
213
220
|
titleCaption: 'Подпись к полю',
|
214
221
|
textBefore: '',
|
215
222
|
textAfter: '',
|
@@ -219,11 +226,11 @@ export const Default: StoryObj<StoryPropsDefault> = {
|
|
219
226
|
readOnly: false,
|
220
227
|
enableContentLeft: true,
|
221
228
|
enableContentRight: true,
|
222
|
-
clear: false,
|
223
|
-
hasDivider: false,
|
224
229
|
optional: false,
|
225
230
|
required: false,
|
226
231
|
requiredPlacement: 'right',
|
232
|
+
clear: false,
|
233
|
+
hasDivider: false,
|
227
234
|
hasHint: true,
|
228
235
|
hintText: 'Текст подсказки',
|
229
236
|
hintTrigger: 'hover',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
|
1
|
+
var _excluded = ["value", "onChange", "suggestions", "view", "size", "labelPlacement", "hasPlaceholder", "disabled", "readOnly", "label", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "onScroll", "listMaxHeight", "listWidth", "portal", "filter", "onSuggestionSelect", "threshold", "renderList", "renderListEnd", "onSearch", "hintText"];
|
2
2
|
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
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
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."); }
|
@@ -28,6 +28,7 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
28
28
|
view = _ref.view,
|
29
29
|
size = _ref.size,
|
30
30
|
labelPlacement = _ref.labelPlacement,
|
31
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
31
32
|
disabled = _ref.disabled,
|
32
33
|
readOnly = _ref.readOnly,
|
33
34
|
label = _ref.label,
|
@@ -147,6 +148,11 @@ export var autocompleteRoot = function autocompleteRoot(Root) {
|
|
147
148
|
"aria-activedescendant": "".concat(listId, "/").concat(focused),
|
148
149
|
"aria-describedby": helperTextId,
|
149
150
|
hintText: String(hintText || '')
|
151
|
+
}, labelPlacement === 'inner' ? {
|
152
|
+
labelPlacement: labelPlacement,
|
153
|
+
hasPlaceholder: hasPlaceholder
|
154
|
+
} : {
|
155
|
+
labelPlacement: labelPlacement
|
150
156
|
}, rest)),
|
151
157
|
preventOverflow: false,
|
152
158
|
ref: targetRef,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["children", "className", "
|
2
|
+
var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent", "clear", "maxWidth"];
|
3
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); }
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
@@ -16,20 +16,16 @@ import { base as pilledCSS } from './variations/_pilled/base';
|
|
16
16
|
import { base as transparentCSS } from './variations/_transparent/base';
|
17
17
|
import { base as clearCSS } from './variations/_clear/base';
|
18
18
|
import { StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Badge.styles';
|
19
|
-
import { classes
|
19
|
+
import { classes } from './Badge.tokens';
|
20
20
|
export var badgeRoot = function badgeRoot(Root) {
|
21
21
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
22
|
-
var _StyledContentLeft, _StyledContentMain, _StyledContentMain2, _StyledContentRight;
|
23
22
|
var children = props.children,
|
24
23
|
className = props.className,
|
25
|
-
style = props.style,
|
26
24
|
text = props.text,
|
27
25
|
contentLeft = props.contentLeft,
|
28
26
|
contentRight = props.contentRight,
|
29
27
|
size = props.size,
|
30
28
|
view = props.view,
|
31
|
-
customColor = props.customColor,
|
32
|
-
customBackgroundColor = props.customBackgroundColor,
|
33
29
|
_props$pilled = props.pilled,
|
34
30
|
pilled = _props$pilled === void 0 ? false : _props$pilled,
|
35
31
|
_props$transparent = props.transparent,
|
@@ -44,25 +40,19 @@ export var badgeRoot = function badgeRoot(Root) {
|
|
44
40
|
var clearClass = clear ? classes.badgeClear : undefined;
|
45
41
|
var truncateClass = maxWidth !== 'auto' ? classes.badgeTruncate : undefined;
|
46
42
|
var txt = !text && typeof children === 'string' ? children : text;
|
47
|
-
var iconOnlyClass = !txt && contentLeft ? classes.iconOnly : undefined;
|
48
|
-
var BadgeContent = function BadgeContent() {
|
49
|
-
if (contentLeft) {
|
50
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _StyledContentLeft || (_StyledContentLeft = /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft)), txt ? _StyledContentMain || (_StyledContentMain = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children);
|
51
|
-
}
|
52
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, txt ? _StyledContentMain2 || (_StyledContentMain2 = /*#__PURE__*/React.createElement(StyledContentMain, null, txt)) : children, contentRight && (_StyledContentRight || (_StyledContentRight = /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight))));
|
53
|
-
};
|
54
43
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
55
44
|
ref: ref,
|
56
|
-
className: cx(pilledClass, transparentClass, clearClass, truncateClass,
|
45
|
+
className: cx(pilledClass, transparentClass, clearClass, truncateClass, className),
|
57
46
|
view: view,
|
58
47
|
size: size,
|
59
48
|
pilled: pilled,
|
60
49
|
transparent: transparent,
|
61
|
-
clear: clear
|
62
|
-
|
50
|
+
clear: clear
|
51
|
+
}, rest, {
|
52
|
+
style: _objectSpread(_objectSpread({}, rest.style), {}, {
|
63
53
|
maxWidth: maxWidth
|
64
|
-
}
|
65
|
-
},
|
54
|
+
})
|
55
|
+
}), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight));
|
66
56
|
});
|
67
57
|
};
|
68
58
|
export var badgeConfig = {
|
@@ -52,7 +52,16 @@ export function App() {
|
|
52
52
|
```
|
53
53
|
|
54
54
|
### Вид badge
|
55
|
-
Вид `badge` задается с помощью свойства `view`.
|
55
|
+
Вид `badge` задается с помощью свойства `view`. Возможные значения свойства `view`:
|
56
|
+
|
57
|
+
+ `"primary"` – основной badge;
|
58
|
+
+ `"accent"` – бейдж акцентного цвета;
|
59
|
+
+ `"positive"` – успешное завершение;
|
60
|
+
+ `"warning"` – предупреждение;
|
61
|
+
+ `"negative"` – ошибка;
|
62
|
+
+ `"dark"` – темный badge;
|
63
|
+
+ `"light"` – светлый badge.
|
64
|
+
|
56
65
|
Так же на вид badge влияет свойства `transparent` и `clear`.
|
57
66
|
|
58
67
|
```tsx live
|
@@ -63,7 +72,7 @@ export function App() {
|
|
63
72
|
const Badges = ({transparent, clear}) => {
|
64
73
|
return (
|
65
74
|
<div style=\{{ display: 'flex', gap: '0.5rem' }}>
|
66
|
-
<Badge text="Бейдж" size="l" view="
|
75
|
+
<Badge text="Бейдж" size="l" view="primary" transparent={transparent} clear={clear} />
|
67
76
|
<Badge text="Бейдж" size="l" view="accent" transparent={transparent} clear={clear} />
|
68
77
|
<Badge text="Бейдж" size="l" view="positive" transparent={transparent} clear={clear} />
|
69
78
|
<Badge text="Бейдж" size="l" view="warning" transparent={transparent} clear={clear} />
|
@@ -85,8 +94,7 @@ export function App() {
|
|
85
94
|
```
|
86
95
|
|
87
96
|
### Иконка слева / справа
|
88
|
-
В левой
|
89
|
-
Если же нужен Badge с иконкой без текста, нужно использовать `contentLeft`.
|
97
|
+
В левой и/или правой части badge можно отобразить иконку:
|
90
98
|
|
91
99
|
```tsx live
|
92
100
|
import React from 'react';
|
@@ -99,49 +107,17 @@ export function App() {
|
|
99
107
|
<Badge
|
100
108
|
text="Бейдж"
|
101
109
|
size="l"
|
102
|
-
view="
|
110
|
+
view="primary"
|
103
111
|
contentLeft={
|
104
112
|
<IconEye color="inherit" size="xs" />
|
105
|
-
}
|
106
|
-
/>
|
113
|
+
} />
|
107
114
|
<Badge
|
108
115
|
text="Бейдж"
|
109
116
|
size="l"
|
110
|
-
view="
|
117
|
+
view="primary"
|
111
118
|
contentRight={
|
112
119
|
<IconEye color="inherit" size="xs" />
|
113
|
-
}
|
114
|
-
/>
|
115
|
-
<Badge
|
116
|
-
size="l"
|
117
|
-
view="default"
|
118
|
-
contentLeft={
|
119
|
-
<IconEye color="inherit" size="xs" />
|
120
|
-
}
|
121
|
-
/>
|
122
|
-
</div>
|
123
|
-
);
|
124
|
-
}
|
125
|
-
```
|
126
|
-
|
127
|
-
### Задание цвета текста и фона
|
128
|
-
Цвет текста и фона можно задать с помощью свойств
|
129
|
-
`customColor` и `customBackgroundColor` соответственно.
|
130
|
-
|
131
|
-
```tsx live
|
132
|
-
import React from 'react';
|
133
|
-
import { Badge } from '@salutejs/{{ package }}';
|
134
|
-
|
135
|
-
export function App() {
|
136
|
-
return (
|
137
|
-
<div>
|
138
|
-
<Badge
|
139
|
-
text="Бейдж"
|
140
|
-
size="l"
|
141
|
-
view="default"
|
142
|
-
customColor="antiquewhite"
|
143
|
-
customBackgroundColor="darkolivegreen"
|
144
|
-
/>
|
120
|
+
} />
|
145
121
|
</div>
|
146
122
|
);
|
147
123
|
}
|
@@ -2,12 +2,7 @@ export var classes = {
|
|
2
2
|
badgePilled: 'badge-pilled',
|
3
3
|
badgeTransparent: 'badge-transparent',
|
4
4
|
badgeClear: 'badge-clear',
|
5
|
-
badgeTruncate: 'badge-truncate'
|
6
|
-
iconOnly: 'badge-icon-only'
|
7
|
-
};
|
8
|
-
export var privateTokens = {
|
9
|
-
customBackground: '--plasma-badge-custom-background',
|
10
|
-
customColor: '--plasma-badge-custom-color'
|
5
|
+
badgeTruncate: 'badge-truncate'
|
11
6
|
};
|
12
7
|
export var tokens = {
|
13
8
|
background: '--plasma-badge-background',
|
@@ -15,12 +10,13 @@ export var tokens = {
|
|
15
10
|
backgroundTransparent: '--plasma-badge-background-transparent',
|
16
11
|
colorTransparent: '--plasma-badge-color-transparent',
|
17
12
|
colorClear: '--plasma-badge-color-clear',
|
18
|
-
backgroundClear: '--plasma-badge-background-clear',
|
19
13
|
borderRadius: '--plasma-badge-border-radius',
|
20
14
|
pilledBorderRadius: '--plasma-badge-pilled-border-radius',
|
21
15
|
height: '--plasma-badge-height',
|
22
|
-
|
23
|
-
|
16
|
+
paddingTop: '--plasma-badge-padding-top',
|
17
|
+
paddingRight: '--plasma-badge-padding-right',
|
18
|
+
paddingBottom: '--plasma-badge-padding-bottom',
|
19
|
+
paddingLeft: '--plasma-badge-padding-left',
|
24
20
|
fontFamily: '--plasma-badge-font-family',
|
25
21
|
fontSize: '--plasma-badge-font-size',
|
26
22
|
fontStyle: '--plasma-badge-font-style',
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css(["&.", "{color:var(", "
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:transparent;padding:0;}"], classes.badgeClear, tokens.colorClear);
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import {
|
3
|
-
|
4
|
-
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding:var(", ");&.", "{padding:var(", ");", "{margin:0;}}"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.padding, classes.iconOnly, tokens.paddingIconOnly, StyledContentLeft);
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");border-radius:var(", ");height:var(", ");padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.borderRadius, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css(["&.", "{color:var(", "
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["&.", "{color:var(", ");background-color:var(", ");}"], classes.badgeTransparent, tokens.colorTransparent, tokens.backgroundTransparent);
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
|
-
import {
|
3
|
-
export var base = /*#__PURE__*/css(["color:var(", "
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css(["color:var(", ");background-color:var(", ");"], tokens.color, tokens.background);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
1
|
+
var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "hasPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
|
2
2
|
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
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
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."); }
|
@@ -55,6 +55,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
55
55
|
view = props.view,
|
56
56
|
size = props.size,
|
57
57
|
labelPlacement = props.labelPlacement,
|
58
|
+
hasPlaceholder = props.hasPlaceholder,
|
58
59
|
_props$readOnly = props.readOnly,
|
59
60
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
60
61
|
_props$disabled = props.disabled,
|
@@ -368,7 +369,6 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
368
369
|
onChange: handleTextValueChange,
|
369
370
|
size: size,
|
370
371
|
view: view,
|
371
|
-
labelPlacement: labelPlacement,
|
372
372
|
disabled: disabled,
|
373
373
|
readOnly: readOnly,
|
374
374
|
label: label,
|
@@ -391,6 +391,11 @@ export var comboboxRoot = function comboboxRoot(Root) {
|
|
391
391
|
"aria-controls": "".concat(treeId, "_tree_level_1"),
|
392
392
|
"aria-expanded": isCurrentListOpen,
|
393
393
|
"aria-activedescendant": activeDescendantItemValue ? getItemId(treeId, activeDescendantItemValue) : ''
|
394
|
+
}, labelPlacement === 'inner' ? {
|
395
|
+
labelPlacement: labelPlacement,
|
396
|
+
hasPlaceholder: hasPlaceholder
|
397
|
+
} : {
|
398
|
+
labelPlacement: labelPlacement
|
394
399
|
}, multiple ? {
|
395
400
|
enumerationType: 'chip',
|
396
401
|
chips: getChips(),
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["className", "opened", "label", "labelPlacement", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
|
1
|
+
var _excluded = ["className", "opened", "label", "labelPlacement", "hasPlaceholder", "placeholder", "leftHelper", "contentLeft", "contentRight", "textBefore", "textAfter", "view", "size", "readOnly", "disabled", "name", "defaultDate", "valueError", "valueSuccess", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onChangeValue", "onCommitDate", "onToggle", "onFocus", "onBlur", "onChange"];
|
2
2
|
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
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
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."); }
|
@@ -28,6 +28,7 @@ export var datePickerRoot = function datePickerRoot(Root) {
|
|
28
28
|
label = _ref.label,
|
29
29
|
_ref$labelPlacement = _ref.labelPlacement,
|
30
30
|
labelPlacement = _ref$labelPlacement === void 0 ? 'outer' : _ref$labelPlacement,
|
31
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
31
32
|
placeholder = _ref.placeholder,
|
32
33
|
leftHelper = _ref.leftHelper,
|
33
34
|
contentLeft = _ref.contentLeft,
|
@@ -164,10 +165,14 @@ export var datePickerRoot = function datePickerRoot(Root) {
|
|
164
165
|
},
|
165
166
|
onFocus: onFocus,
|
166
167
|
onBlur: onBlur,
|
167
|
-
onKeyDown: onKeyDown
|
168
|
-
}, innerLabelPlacement && {
|
169
|
-
label: label,
|
168
|
+
onKeyDown: onKeyDown,
|
170
169
|
labelPlacement: labelPlacement
|
170
|
+
}, labelPlacement === 'inner' ? {
|
171
|
+
label: label,
|
172
|
+
labelPlacement: labelPlacement,
|
173
|
+
hasPlaceholder: hasPlaceholder
|
174
|
+
} : {
|
175
|
+
labelPlacement: undefined
|
171
176
|
}));
|
172
177
|
useEffect(function () {
|
173
178
|
setIsInnerOpen(function (prevOpen) {
|