@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
@@ -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
|
/>
|
@@ -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 '@emotion/react';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css("&.", classes.badgeClear, "{color:var(",
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css("&.", classes.badgeClear, "{color:var(", tokens.colorClear, ");background-color:transparent;padding:0;};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fY2xlYXIvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL19jbGVhci9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZUNsZWFyfSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuY29sb3JDbGVhcn0pO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgICAgICAgcGFkZGluZzogMDtcbiAgICB9XG5gO1xuIl19 */"));
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import { css } from '@emotion/react';
|
2
|
-
import {
|
3
|
-
|
4
|
-
export var base = /*#__PURE__*/css("font-family:var(", tokens.fontFamily, ");font-size:var(", tokens.fontSize, ");font-style:var(", tokens.fontStyle, ");font-weight:var(", tokens.fontWeight, ");letter-spacing:var(", tokens.letterSpacing, ");line-height:var(", tokens.lineHeight, ");border-radius:var(", tokens.borderRadius, ");height:var(", tokens.height, ");padding:var(", tokens.padding, ");&.", classes.iconOnly, "{padding:var(", tokens.paddingIconOnly, ");", StyledContentLeft, "{margin:0;}};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fc2l6ZS9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUt1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcbmltcG9ydCB7IFN0eWxlZENvbnRlbnRMZWZ0IH0gZnJvbSAnLi4vLi4vQmFkZ2Uuc3R5bGVzJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZm9udC1mYW1pbHk6IHZhcigke3Rva2Vucy5mb250RmFtaWx5fSk7XG4gICAgZm9udC1zaXplOiB2YXIoJHt0b2tlbnMuZm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuZm9udFN0eWxlfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5mb250V2VpZ2h0fSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5sZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5saW5lSGVpZ2h0fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5cbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5oZWlnaHR9KTtcblxuICAgIHBhZGRpbmc6IHZhcigke3Rva2Vucy5wYWRkaW5nfSk7XG5cbiAgICAmLiR7Y2xhc3Nlcy5pY29uT25seX0ge1xuICAgICAgICBwYWRkaW5nOiB2YXIoJHt0b2tlbnMucGFkZGluZ0ljb25Pbmx5fSk7XG5cbiAgICAgICAgJHtTdHlsZWRDb250ZW50TGVmdH0ge1xuICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICB9XG4gICAgfVxuYDtcbiJdfQ== */"));
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css("font-family:var(", tokens.fontFamily, ");font-size:var(", tokens.fontSize, ");font-style:var(", tokens.fontStyle, ");font-weight:var(", tokens.fontWeight, ");letter-spacing:var(", tokens.letterSpacing, ");line-height:var(", tokens.lineHeight, ");border-radius:var(", tokens.borderRadius, ");height:var(", tokens.height, ");padding-top:var(", tokens.paddingTop, ");padding-right:var(", tokens.paddingRight, ");padding-bottom:var(", tokens.paddingBottom, ");padding-left:var(", tokens.paddingLeft, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fc2l6ZS9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3NpemUvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgZm9udC1mYW1pbHk6IHZhcigke3Rva2Vucy5mb250RmFtaWx5fSk7XG4gICAgZm9udC1zaXplOiB2YXIoJHt0b2tlbnMuZm9udFNpemV9KTtcbiAgICBmb250LXN0eWxlOiB2YXIoJHt0b2tlbnMuZm9udFN0eWxlfSk7XG4gICAgZm9udC13ZWlnaHQ6IHZhcigke3Rva2Vucy5mb250V2VpZ2h0fSk7XG4gICAgbGV0dGVyLXNwYWNpbmc6IHZhcigke3Rva2Vucy5sZXR0ZXJTcGFjaW5nfSk7XG4gICAgbGluZS1oZWlnaHQ6IHZhcigke3Rva2Vucy5saW5lSGVpZ2h0fSk7XG5cbiAgICBib3JkZXItcmFkaXVzOiB2YXIoJHt0b2tlbnMuYm9yZGVyUmFkaXVzfSk7XG5cbiAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5oZWlnaHR9KTtcblxuICAgIHBhZGRpbmctdG9wOiB2YXIoJHt0b2tlbnMucGFkZGluZ1RvcH0pO1xuICAgIHBhZGRpbmctcmlnaHQ6IHZhcigke3Rva2Vucy5wYWRkaW5nUmlnaHR9KTtcbiAgICBwYWRkaW5nLWJvdHRvbTogdmFyKCR7dG9rZW5zLnBhZGRpbmdCb3R0b219KTtcbiAgICBwYWRkaW5nLWxlZnQ6IHZhcigke3Rva2Vucy5wYWRkaW5nTGVmdH0pO1xuYDtcbiJdfQ== */"));
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from '@emotion/react';
|
2
|
-
import { classes,
|
3
|
-
export var base = /*#__PURE__*/css("&.", classes.badgeTransparent, "{color:var(",
|
2
|
+
import { classes, tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css("&.", classes.badgeTransparent, "{color:var(", tokens.colorTransparent, ");background-color:var(", tokens.backgroundTransparent, ");};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdHJhbnNwYXJlbnQvYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9CYWRnZS92YXJpYXRpb25zL190cmFuc3BhcmVudC9iYXNlLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuLi8uLi9CYWRnZS50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICAmLiR7Y2xhc3Nlcy5iYWRnZVRyYW5zcGFyZW50fSB7XG4gICAgICAgIGNvbG9yOiB2YXIoJHt0b2tlbnMuY29sb3JUcmFuc3BhcmVudH0pO1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoJHt0b2tlbnMuYmFja2dyb3VuZFRyYW5zcGFyZW50fSk7XG4gICAgfVxuYDtcbiJdfQ== */"));
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from '@emotion/react';
|
2
|
-
import {
|
3
|
-
export var base = /*#__PURE__*/css("color:var(",
|
2
|
+
import { tokens } from '../../Badge.tokens';
|
3
|
+
export var base = /*#__PURE__*/css("color:var(", tokens.color, ");background-color:var(", tokens.background, ");;label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvQmFkZ2UvdmFyaWF0aW9ucy9fdmlldy9iYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL0JhZGdlL3ZhcmlhdGlvbnMvX3ZpZXcvYmFzZS50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgdG9rZW5zIH0gZnJvbSAnLi4vLi4vQmFkZ2UudG9rZW5zJztcblxuZXhwb3J0IGNvbnN0IGJhc2UgPSBjc3NgXG4gICAgY29sb3I6IHZhcigke3Rva2Vucy5jb2xvcn0pO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigke3Rva2Vucy5iYWNrZ3JvdW5kfSk7XG5gO1xuIl19 */"));
|
@@ -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) {
|
@@ -10,9 +10,10 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
10
|
multiselect = _ref.multiselect,
|
11
11
|
value = _ref.value,
|
12
12
|
label = _ref.label,
|
13
|
+
labelPlacement = _ref.labelPlacement,
|
14
|
+
hasPlaceholder = _ref.hasPlaceholder,
|
13
15
|
placeholder = _ref.placeholder,
|
14
16
|
onKeyDown = _ref.onKeyDown,
|
15
|
-
labelPlacement = _ref.labelPlacement,
|
16
17
|
size = _ref.size,
|
17
18
|
view = _ref.view,
|
18
19
|
handleClickArrow = _ref.handleClickArrow,
|
@@ -58,10 +59,16 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
58
59
|
value: multiselect ? undefined : ((_valueToItemMap$get = valueToItemMap.get(value.toString())) === null || _valueToItemMap$get === void 0 ? void 0 : _valueToItemMap$get.label) || '',
|
59
60
|
size: size,
|
60
61
|
view: view,
|
61
|
-
chipView: chipView
|
62
|
+
chipView: chipView
|
63
|
+
}, labelPlacement === 'inner' ? {
|
64
|
+
label: label,
|
62
65
|
labelPlacement: labelPlacement,
|
63
|
-
|
66
|
+
hasPlaceholder: hasPlaceholder
|
67
|
+
} : {
|
64
68
|
label: label,
|
69
|
+
labelPlacement: labelPlacement
|
70
|
+
}, {
|
71
|
+
disabled: disabled,
|
65
72
|
placeholder: value instanceof Array && value.length ? '' : placeholder,
|
66
73
|
contentLeft: contentLeft,
|
67
74
|
contentRight: /*#__PURE__*/React.createElement(IconArrowWrapper, {
|