@ozen-ui/kit 0.37.2 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ButtonBase/package.json +5 -0
- package/ButtonNext/package.json +5 -0
- package/IconButtonNext/package.json +5 -0
- package/README.md +2 -2
- package/__inner__/cjs/components/Accordion/Accordion.css +18 -17
- package/__inner__/cjs/components/Alert/Alert.css +4 -4
- package/__inner__/cjs/components/Breadcrumbs/Breadcrumbs.css +0 -4
- package/__inner__/cjs/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
- package/__inner__/cjs/components/Button/Button.d.ts +3 -0
- package/__inner__/cjs/components/Button/Button.js +8 -3
- package/__inner__/cjs/components/ButtonBase/ButtonBase.css +10 -0
- package/__inner__/cjs/components/ButtonBase/ButtonBase.d.ts +20 -0
- package/__inner__/cjs/components/ButtonBase/ButtonBase.js +30 -0
- package/__inner__/cjs/components/ButtonBase/constants.d.ts +1 -0
- package/__inner__/cjs/components/ButtonBase/constants.js +4 -0
- package/__inner__/cjs/components/ButtonBase/index.d.ts +1 -0
- package/__inner__/cjs/components/ButtonBase/index.js +4 -0
- package/__inner__/cjs/components/ButtonNext/Button.css +333 -0
- package/__inner__/cjs/components/ButtonNext/Button.d.ts +51 -0
- package/__inner__/cjs/components/ButtonNext/Button.js +60 -0
- package/__inner__/cjs/components/ButtonNext/constants.d.ts +4 -0
- package/__inner__/cjs/components/ButtonNext/constants.js +7 -0
- package/__inner__/cjs/components/ButtonNext/index.d.ts +1 -0
- package/__inner__/cjs/components/ButtonNext/index.js +4 -0
- package/__inner__/cjs/components/Card/Card.css +3 -3
- package/__inner__/cjs/components/Chip/Chip.css +10 -9
- package/__inner__/cjs/components/ChipNext/Chip.css +8 -8
- package/__inner__/cjs/components/Container/Container.css +30 -30
- package/__inner__/cjs/components/DataList/DataList.css +3 -3
- package/__inner__/cjs/components/Drawer/Drawer.css +2 -2
- package/__inner__/cjs/components/FieldControl/FieldControl.css +5 -5
- package/__inner__/cjs/components/File/File.css +2 -2
- package/__inner__/cjs/components/FilePicker/FilePicker.css +5 -5
- package/__inner__/cjs/components/FormControlLabel/FormControlLabel.css +5 -5
- package/__inner__/cjs/components/FormGroup/FormGroup.css +2 -2
- package/__inner__/cjs/components/FormTitle/FormTitle.css +5 -5
- package/__inner__/cjs/components/IconButton/IconButton.d.ts +3 -0
- package/__inner__/cjs/components/IconButton/IconButton.js +7 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.css +348 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.d.ts +41 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.js +70 -0
- package/__inner__/cjs/components/IconButtonNext/constants.d.ts +4 -0
- package/__inner__/cjs/components/IconButtonNext/constants.js +7 -0
- package/__inner__/cjs/components/IconButtonNext/index.d.ts +1 -0
- package/__inner__/cjs/components/IconButtonNext/index.js +4 -0
- package/__inner__/cjs/components/List/List.css +5 -5
- package/__inner__/cjs/components/Modal/Modal.css +1 -1
- package/__inner__/cjs/components/SectionMessage/SectionMessage.css +5 -5
- package/__inner__/cjs/components/Segment/components/SegmentItem.css +5 -3
- package/__inner__/cjs/components/Slider/Slider.css +1 -1
- package/__inner__/cjs/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
- package/__inner__/cjs/components/Tabs/components/Tab/Tab.css +1 -1
- package/__inner__/cjs/components/Tag/Tag.css +1 -1
- package/__inner__/cjs/components/Textarea/Textarea.css +1 -1
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +4 -0
- package/__inner__/cjs/components/Tooltip/Tooltip.css +2 -2
- package/__inner__/cjs/components/Typography/Typography.css +26 -26
- package/__inner__/esm/components/Accordion/Accordion.css +18 -17
- package/__inner__/esm/components/Alert/Alert.css +4 -4
- package/__inner__/esm/components/Breadcrumbs/Breadcrumbs.css +0 -4
- package/__inner__/esm/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
- package/__inner__/esm/components/Button/Button.d.ts +3 -0
- package/__inner__/esm/components/Button/Button.js +8 -3
- package/__inner__/esm/components/ButtonBase/ButtonBase.css +10 -0
- package/__inner__/esm/components/ButtonBase/ButtonBase.d.ts +20 -0
- package/__inner__/esm/components/ButtonBase/ButtonBase.js +27 -0
- package/__inner__/esm/components/ButtonBase/constants.d.ts +1 -0
- package/__inner__/esm/components/ButtonBase/constants.js +1 -0
- package/__inner__/esm/components/ButtonBase/index.d.ts +1 -0
- package/__inner__/esm/components/ButtonBase/index.js +1 -0
- package/__inner__/esm/components/ButtonNext/Button.css +333 -0
- package/__inner__/esm/components/ButtonNext/Button.d.ts +51 -0
- package/__inner__/esm/components/ButtonNext/Button.js +57 -0
- package/__inner__/esm/components/ButtonNext/constants.d.ts +4 -0
- package/__inner__/esm/components/ButtonNext/constants.js +4 -0
- package/__inner__/esm/components/ButtonNext/index.d.ts +1 -0
- package/__inner__/esm/components/ButtonNext/index.js +1 -0
- package/__inner__/esm/components/Card/Card.css +3 -3
- package/__inner__/esm/components/Chip/Chip.css +10 -9
- package/__inner__/esm/components/ChipNext/Chip.css +8 -8
- package/__inner__/esm/components/Container/Container.css +30 -30
- package/__inner__/esm/components/DataList/DataList.css +3 -3
- package/__inner__/esm/components/Drawer/Drawer.css +2 -2
- package/__inner__/esm/components/FieldControl/FieldControl.css +5 -5
- package/__inner__/esm/components/File/File.css +2 -2
- package/__inner__/esm/components/FilePicker/FilePicker.css +5 -5
- package/__inner__/esm/components/FormControlLabel/FormControlLabel.css +5 -5
- package/__inner__/esm/components/FormGroup/FormGroup.css +2 -2
- package/__inner__/esm/components/FormTitle/FormTitle.css +5 -5
- package/__inner__/esm/components/IconButton/IconButton.d.ts +3 -0
- package/__inner__/esm/components/IconButton/IconButton.js +7 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.css +348 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.d.ts +41 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.js +67 -0
- package/__inner__/esm/components/IconButtonNext/constants.d.ts +4 -0
- package/__inner__/esm/components/IconButtonNext/constants.js +4 -0
- package/__inner__/esm/components/IconButtonNext/index.d.ts +1 -0
- package/__inner__/esm/components/IconButtonNext/index.js +1 -0
- package/__inner__/esm/components/List/List.css +5 -5
- package/__inner__/esm/components/Modal/Modal.css +1 -1
- package/__inner__/esm/components/SectionMessage/SectionMessage.css +5 -5
- package/__inner__/esm/components/Segment/components/SegmentItem.css +5 -3
- package/__inner__/esm/components/Slider/Slider.css +1 -1
- package/__inner__/esm/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
- package/__inner__/esm/components/Tabs/components/Tab/Tab.css +1 -1
- package/__inner__/esm/components/Tag/Tag.css +1 -1
- package/__inner__/esm/components/Textarea/Textarea.css +1 -1
- package/__inner__/esm/components/ThemeProvider/types.d.ts +4 -0
- package/__inner__/esm/components/Tooltip/Tooltip.css +2 -2
- package/__inner__/esm/components/Typography/Typography.css +26 -26
- package/package.json +4 -4
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
2
|
+
.ButtonNext {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-wrap: nowrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
border: none;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
color: var(--button-font-color);
|
|
12
|
+
block-size: var(--button-height);
|
|
13
|
+
min-inline-size: var(--button-min-width);
|
|
14
|
+
padding: 0 var(--button-padding-x);
|
|
15
|
+
background-color: var(--button-bg-color);
|
|
16
|
+
border-radius: var(--border-radius-xs);
|
|
17
|
+
transition:
|
|
18
|
+
background-color var(--transition-default),
|
|
19
|
+
border-color var(--transition-default),
|
|
20
|
+
box-shadow var(--transition-default),
|
|
21
|
+
opacity var(--transition-default);
|
|
22
|
+
-webkit-tap-highlight-color: unset;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.ButtonNext > svg {
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
.ButtonNext_size_2xs {
|
|
29
|
+
--button-height: var(--control-height-2xs);
|
|
30
|
+
--button-padding-x: var(--control-padding-xs);
|
|
31
|
+
--button-min-width: 56px;
|
|
32
|
+
|
|
33
|
+
font: var(--typography-text-2xs-font);
|
|
34
|
+
|
|
35
|
+
letter-spacing: var(--typography-text-2xs-letter_spacing, 0);
|
|
36
|
+
|
|
37
|
+
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
38
|
+
}
|
|
39
|
+
.ButtonNext_size_xs {
|
|
40
|
+
--button-height: var(--control-height-xs);
|
|
41
|
+
--button-padding-x: var(--control-padding-xs);
|
|
42
|
+
--button-min-width: 64px;
|
|
43
|
+
|
|
44
|
+
font: var(--typography-text-xs-font);
|
|
45
|
+
|
|
46
|
+
letter-spacing: var(--typography-text-xs-letter_spacing, 0);
|
|
47
|
+
|
|
48
|
+
text-transform: var(--typography-text-xs-text_transform, none);
|
|
49
|
+
}
|
|
50
|
+
.ButtonNext_size_s {
|
|
51
|
+
--button-height: var(--control-height-s);
|
|
52
|
+
--button-padding-x: var(--control-padding-s);
|
|
53
|
+
--button-min-width: 72px;
|
|
54
|
+
|
|
55
|
+
font: var(--typography-text-s-font);
|
|
56
|
+
|
|
57
|
+
letter-spacing: var(--typography-text-s-letter_spacing, 0);
|
|
58
|
+
|
|
59
|
+
text-transform: var(--typography-text-s-text_transform, none);
|
|
60
|
+
}
|
|
61
|
+
.ButtonNext_size_m {
|
|
62
|
+
--button-height: var(--control-height-m);
|
|
63
|
+
--button-padding-x: var(--control-padding-m);
|
|
64
|
+
--button-min-width: 80px;
|
|
65
|
+
|
|
66
|
+
font: var(--typography-text-m-font);
|
|
67
|
+
|
|
68
|
+
letter-spacing: var(--typography-text-m-letter_spacing, 0);
|
|
69
|
+
|
|
70
|
+
text-transform: var(--typography-text-m-text_transform, none);
|
|
71
|
+
}
|
|
72
|
+
.ButtonNext_size_l {
|
|
73
|
+
--button-height: var(--control-height-l);
|
|
74
|
+
--button-padding-x: var(--control-padding-l);
|
|
75
|
+
--button-min-width: 88px;
|
|
76
|
+
|
|
77
|
+
font: var(--typography-text-l-font);
|
|
78
|
+
|
|
79
|
+
letter-spacing: var(--typography-text-l-letter_spacing, 0);
|
|
80
|
+
|
|
81
|
+
text-transform: var(--typography-text-l-text_transform, none);
|
|
82
|
+
}
|
|
83
|
+
.ButtonNext_variant_contained.ButtonNext_color_primary {
|
|
84
|
+
--button-bg-color: var(--color-background-action);
|
|
85
|
+
--button-bg-color-hover: var(--color-background-action-hover);
|
|
86
|
+
--button-bg-color-active: var(--color-background-action-pressed);
|
|
87
|
+
--button-bg-color-focus: var(--color-background-action);
|
|
88
|
+
--button-font-color: var(--color-content-action-on);
|
|
89
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
90
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
91
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
92
|
+
}
|
|
93
|
+
.ButtonNext_variant_contained.ButtonNext_color_secondary {
|
|
94
|
+
--button-bg-color: var(--color-background-action-secondary);
|
|
95
|
+
--button-bg-color-hover: var(--color-background-action-secondary-hover);
|
|
96
|
+
--button-bg-color-active: var(--color-background-action-secondary-pressed);
|
|
97
|
+
--button-bg-color-focus: var(--color-background-action-secondary);
|
|
98
|
+
--button-font-color: var(--color-content-action-on);
|
|
99
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
100
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
101
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
102
|
+
}
|
|
103
|
+
.ButtonNext_variant_contained.ButtonNext_color_tertiary {
|
|
104
|
+
--button-bg-color: var(--color-background-tertiary);
|
|
105
|
+
--button-bg-color-hover: var(--color-background-tertiary-hover);
|
|
106
|
+
--button-bg-color-active: var(--color-background-tertiary-pressed);
|
|
107
|
+
--button-bg-color-focus: var(--color-background-tertiary);
|
|
108
|
+
--button-font-color: var(--color-content-primary);
|
|
109
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
110
|
+
--button-font-color-active: var(--color-content-primary);
|
|
111
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
112
|
+
}
|
|
113
|
+
.ButtonNext_variant_contained.ButtonNext_color_error {
|
|
114
|
+
--button-bg-color: var(--color-background-error);
|
|
115
|
+
--button-bg-color-hover: var(--color-background-error-hover);
|
|
116
|
+
--button-bg-color-active: var(--color-background-error-pressed);
|
|
117
|
+
--button-bg-color-focus: var(--color-background-error);
|
|
118
|
+
--button-font-color: var(--color-content-action-on);
|
|
119
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
120
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
121
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
122
|
+
}
|
|
123
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_primary {
|
|
124
|
+
--button-bg-color: var(--color-background-action-light);
|
|
125
|
+
--button-bg-color-hover: var(--color-background-action-light-hover);
|
|
126
|
+
--button-bg-color-active: var(--color-background-action-light-pressed);
|
|
127
|
+
--button-bg-color-focus: unset;
|
|
128
|
+
--button-font-color: var(--color-content-action);
|
|
129
|
+
--button-font-color-hover: var(--color-content-action);
|
|
130
|
+
--button-font-color-active: var(--color-content-action);
|
|
131
|
+
--button-font-color-focus: var(--color-content-action);
|
|
132
|
+
}
|
|
133
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_secondary {
|
|
134
|
+
--button-bg-color: var(--color-background-secondary);
|
|
135
|
+
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
136
|
+
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
137
|
+
--button-bg-color-focus: unset;
|
|
138
|
+
--button-font-color: var(--color-content-primary);
|
|
139
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
140
|
+
--button-font-color-active: var(--color-content-primary);
|
|
141
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
142
|
+
}
|
|
143
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_tertiary {
|
|
144
|
+
--button-bg-color: var(--color-background-primary);
|
|
145
|
+
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
146
|
+
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
147
|
+
--button-bg-color-focus: unset;
|
|
148
|
+
--button-font-color: var(--color-content-secondary);
|
|
149
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
150
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
151
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
152
|
+
}
|
|
153
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_error {
|
|
154
|
+
--button-bg-color: var(--color-background-error-light);
|
|
155
|
+
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
156
|
+
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
157
|
+
--button-bg-color-focus: unset;
|
|
158
|
+
--button-font-color: var(--color-content-error);
|
|
159
|
+
--button-font-color-hover: var(--color-content-error);
|
|
160
|
+
--button-font-color-active: var(--color-content-error);
|
|
161
|
+
--button-font-color-focus: var(--color-content-error);
|
|
162
|
+
}
|
|
163
|
+
.ButtonNext_variant_ghost.ButtonNext_color_primary {
|
|
164
|
+
--button-bg-color: unset;
|
|
165
|
+
--button-bg-color-hover: var(--color-background-success-light-hover);
|
|
166
|
+
--button-bg-color-active: var(--color-background-success-light-pressed);
|
|
167
|
+
--button-bg-color-focus: unset;
|
|
168
|
+
--button-font-color: var(--color-content-action);
|
|
169
|
+
--button-font-color-hover: var(--color-content-action);
|
|
170
|
+
--button-font-color-active: var(--color-content-action);
|
|
171
|
+
--button-font-color-focus: var(--color-content-action);
|
|
172
|
+
}
|
|
173
|
+
.ButtonNext_variant_ghost.ButtonNext_color_secondary {
|
|
174
|
+
--button-bg-color: unset;
|
|
175
|
+
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
176
|
+
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
177
|
+
--button-bg-color-focus: unset;
|
|
178
|
+
--button-font-color: var(--color-content-primary);
|
|
179
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
180
|
+
--button-font-color-active: var(--color-content-primary);
|
|
181
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
182
|
+
}
|
|
183
|
+
.ButtonNext_variant_ghost.ButtonNext_color_tertiary {
|
|
184
|
+
--button-bg-color: unset;
|
|
185
|
+
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
186
|
+
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
187
|
+
--button-bg-color-focus: unset;
|
|
188
|
+
--button-font-color: var(--color-content-secondary);
|
|
189
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
190
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
191
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
192
|
+
}
|
|
193
|
+
.ButtonNext_variant_ghost.ButtonNext_color_error {
|
|
194
|
+
--button-bg-color: unset;
|
|
195
|
+
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
196
|
+
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
197
|
+
--button-bg-color-focus: unset;
|
|
198
|
+
--button-font-color: var(--color-content-error);
|
|
199
|
+
--button-font-color-hover: var(--color-content-error);
|
|
200
|
+
--button-font-color-active: var(--color-content-error);
|
|
201
|
+
--button-font-color-focus: var(--color-content-error);
|
|
202
|
+
}
|
|
203
|
+
.ButtonNext_variant_function {
|
|
204
|
+
--button-height: auto;
|
|
205
|
+
--button-min-width: auto;
|
|
206
|
+
--button-padding-x: 0;
|
|
207
|
+
}
|
|
208
|
+
.ButtonNext_variant_function.ButtonNext_color_primary,
|
|
209
|
+
.ButtonNext_variant_function.ButtonNext_color_secondary,
|
|
210
|
+
.ButtonNext_variant_function.ButtonNext_color_tertiary,
|
|
211
|
+
.ButtonNext_variant_function.ButtonNext_color_error {
|
|
212
|
+
--button-bg-color: unset;
|
|
213
|
+
--button-bg-color-hover: unset;
|
|
214
|
+
--button-bg-color-active: unset;
|
|
215
|
+
--button-bg-color-focus: unset;
|
|
216
|
+
}
|
|
217
|
+
.ButtonNext_variant_function.ButtonNext_color_primary {
|
|
218
|
+
--button-font-color: var(--color-content-action);
|
|
219
|
+
--button-font-color-hover: var(--color-background-action-hover);
|
|
220
|
+
--button-font-color-active: var(--color-background-action-pressed);
|
|
221
|
+
--button-font-color-focus: var(--color-background-action-pressed);
|
|
222
|
+
}
|
|
223
|
+
.ButtonNext_variant_function.ButtonNext_color_secondary {
|
|
224
|
+
--button-font-color: var(--color-content-action-secondary);
|
|
225
|
+
--button-font-color-hover: var(--color-content-action-secondary-hover);
|
|
226
|
+
--button-font-color-active: var(--color-content-action-secondary-pressed);
|
|
227
|
+
--button-font-color-focus: var(--color-content-action-secondary-pressed);
|
|
228
|
+
}
|
|
229
|
+
.ButtonNext_variant_function.ButtonNext_color_tertiary {
|
|
230
|
+
--button-font-color: var(--color-content-secondary);
|
|
231
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
232
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
233
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
234
|
+
}
|
|
235
|
+
.ButtonNext_variant_function.ButtonNext_color_error {
|
|
236
|
+
--button-font-color: var(--color-content-error);
|
|
237
|
+
--button-font-color-hover: var(--color-content-error-hover);
|
|
238
|
+
--button-font-color-active: var(--color-content-error-pressed);
|
|
239
|
+
--button-font-color-focus: var(--color-content-error-pressed);
|
|
240
|
+
}
|
|
241
|
+
.ButtonNext_variant_contained.ButtonNext_disabled,
|
|
242
|
+
.ButtonNext_variant_contained.ButtonNext_loading,
|
|
243
|
+
.ButtonNext_variant_contained-additional.ButtonNext_disabled,
|
|
244
|
+
.ButtonNext_variant_contained-additional.ButtonNext_loading,
|
|
245
|
+
.ButtonNext_variant_ghost.ButtonNext_disabled,
|
|
246
|
+
.ButtonNext_variant_ghost.ButtonNext_loading,
|
|
247
|
+
.ButtonNext_variant_function.ButtonNext_disabled,
|
|
248
|
+
.ButtonNext_variant_function.ButtonNext_loading {
|
|
249
|
+
--button-font-color: var(--color-content-disabled);
|
|
250
|
+
}
|
|
251
|
+
.ButtonNext_variant_contained.ButtonNext_disabled,
|
|
252
|
+
.ButtonNext_variant_contained.ButtonNext_loading,
|
|
253
|
+
.ButtonNext_variant_contained-additional.ButtonNext_disabled,
|
|
254
|
+
.ButtonNext_variant_contained-additional.ButtonNext_loading {
|
|
255
|
+
--button-bg-color: var(--color-background-disabled);
|
|
256
|
+
--button-bg-color-hover: var(--color-background-disabled);
|
|
257
|
+
--button-bg-color-active: var(--color-background-disabled);
|
|
258
|
+
}
|
|
259
|
+
.ButtonNext_variant_ghost.ButtonNext_disabled,
|
|
260
|
+
.ButtonNext_variant_ghost.ButtonNext_loading,
|
|
261
|
+
.ButtonNext_variant_function.ButtonNext_disabled,
|
|
262
|
+
.ButtonNext_variant_function.ButtonNext_loading {
|
|
263
|
+
--button-bg-color: unset;
|
|
264
|
+
--button-bg-color-hover: unset;
|
|
265
|
+
--button-bg-color-active: unset;
|
|
266
|
+
}
|
|
267
|
+
.ButtonNext:focus:not(:focus-visible, :active, :hover) {
|
|
268
|
+
box-shadow: none;
|
|
269
|
+
color: var(--button-font-color);
|
|
270
|
+
}
|
|
271
|
+
.ButtonNext:focus:not(:focus-visible) {
|
|
272
|
+
box-shadow: none;
|
|
273
|
+
}
|
|
274
|
+
.ButtonNext:focus {
|
|
275
|
+
outline: 0;
|
|
276
|
+
box-shadow: var(--shadow-outline-focused);
|
|
277
|
+
background-color: var(--button-bg-color-focus);
|
|
278
|
+
color: var(--button-font-color-focus);
|
|
279
|
+
}
|
|
280
|
+
.ButtonNext:hover {
|
|
281
|
+
background-color: var(--button-bg-color-hover);
|
|
282
|
+
color: var(--button-font-color-hover);
|
|
283
|
+
}
|
|
284
|
+
.ButtonNext:active {
|
|
285
|
+
background-color: var(--button-bg-color-active);
|
|
286
|
+
color: var(--button-font-color-active);
|
|
287
|
+
}
|
|
288
|
+
.ButtonNext_fullWidth {
|
|
289
|
+
inline-size: 100%;
|
|
290
|
+
}
|
|
291
|
+
.ButtonNext_disabled,
|
|
292
|
+
.ButtonNext_loading {
|
|
293
|
+
pointer-events: none;
|
|
294
|
+
cursor: auto;
|
|
295
|
+
}
|
|
296
|
+
.ButtonNext_loading .ButtonNext-Content {
|
|
297
|
+
visibility: hidden;
|
|
298
|
+
}
|
|
299
|
+
.ButtonNext-Content {
|
|
300
|
+
flex-grow: 1;
|
|
301
|
+
flex-shrink: 1;
|
|
302
|
+
display: flex;
|
|
303
|
+
text-align: center;
|
|
304
|
+
place-content: center;
|
|
305
|
+
align-items: center;
|
|
306
|
+
min-inline-size: 0;
|
|
307
|
+
gap: var(--spacing-2xs);
|
|
308
|
+
}
|
|
309
|
+
.ButtonNext-Label {
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
text-overflow: ellipsis;
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
}
|
|
314
|
+
.ButtonNext-Loader {
|
|
315
|
+
position: absolute;
|
|
316
|
+
}
|
|
317
|
+
.ButtonNext-Loader_animation-enter {
|
|
318
|
+
opacity: 0;
|
|
319
|
+
}
|
|
320
|
+
.ButtonNext-Loader_animation-enter-active {
|
|
321
|
+
opacity: 1;
|
|
322
|
+
transition: opacity var(--transition-default);
|
|
323
|
+
}
|
|
324
|
+
.ButtonNext-Loader_animation-exit {
|
|
325
|
+
opacity: 1;
|
|
326
|
+
}
|
|
327
|
+
.ButtonNext-Loader_animation-exit-active {
|
|
328
|
+
opacity: 0;
|
|
329
|
+
transition: opacity var(--transition-default);
|
|
330
|
+
}
|
|
331
|
+
.ButtonNext .Loader {
|
|
332
|
+
color: var(--color-content-disabled);
|
|
333
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import './Button.css';
|
|
2
|
+
import type { ReactNode, ElementType, ComponentPropsWithRef } from 'react';
|
|
3
|
+
import type { IconProps, IconSize } from '@ozen-ui/icons';
|
|
4
|
+
import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
|
|
5
|
+
import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
|
|
6
|
+
import type { RenderContentType } from '../../utils/renderContent';
|
|
7
|
+
import { BUTTON_DEFAULT_TAG } from './constants';
|
|
8
|
+
export declare const buttonVariant: readonly ["contained", "contained-additional", "ghost", "function"];
|
|
9
|
+
export declare const buttonColorVariant: readonly ["primary", "secondary", "tertiary", "error"];
|
|
10
|
+
export type ButtonVariant = (typeof buttonVariant)[number];
|
|
11
|
+
export type ButtonColorVariant = (typeof buttonColorVariant)[number];
|
|
12
|
+
export type ButtonIcon = RenderContentType<IconProps & {
|
|
13
|
+
size?: IconSize;
|
|
14
|
+
}>['content'];
|
|
15
|
+
type ButtonBaseProps = {
|
|
16
|
+
/**
|
|
17
|
+
* Вариант отображения кнопки
|
|
18
|
+
* @default contained
|
|
19
|
+
* */
|
|
20
|
+
variant?: ButtonVariant;
|
|
21
|
+
/**
|
|
22
|
+
* Размер
|
|
23
|
+
* @default m
|
|
24
|
+
* */
|
|
25
|
+
size?: FormElementSizeVariant;
|
|
26
|
+
/**
|
|
27
|
+
* Цвет
|
|
28
|
+
* @default primary
|
|
29
|
+
* */
|
|
30
|
+
color?: ButtonColorVariant;
|
|
31
|
+
/** Содержимое кнопки */
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
/** Если {true} делает кнопку заблокированной */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Если {true} переводит кнопку в состояние загрузки */
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
/** Дополнительные CSS-классы */
|
|
38
|
+
className?: string;
|
|
39
|
+
/** Иконка слева */
|
|
40
|
+
iconLeft?: ButtonIcon;
|
|
41
|
+
/** Иконка справа */
|
|
42
|
+
iconRight?: ButtonIcon;
|
|
43
|
+
/** Если {true} растягивает кнопку на всю ширину родительского контейнера */
|
|
44
|
+
fullWidth?: boolean;
|
|
45
|
+
/** Свойства лейбла кнопки */
|
|
46
|
+
labelProps?: ComponentPropsWithRef<'span'>;
|
|
47
|
+
};
|
|
48
|
+
export type ButtonProps<As extends ElementType = typeof BUTTON_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ButtonBaseProps, As>;
|
|
49
|
+
export declare const cnButton: import("@bem-react/classname").ClassNameFormatter;
|
|
50
|
+
export declare const Button: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ButtonBaseProps, "button">;
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import './Button.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { CSSTransition } from 'react-transition-group';
|
|
5
|
+
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
6
|
+
import { cn } from '../../utils/classname';
|
|
7
|
+
import { getIconSizeToFormElement } from '../../utils/getIconSizeToFormElement';
|
|
8
|
+
import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
9
|
+
import { renderContent } from '../../utils/renderContent';
|
|
10
|
+
import { ButtonBase } from '../ButtonBase';
|
|
11
|
+
import { Loader } from '../Loader';
|
|
12
|
+
import { BUTTON_DEFAULT_SIZE, BUTTON_DEFAULT_VARIANT, BUTTON_DEFAULT_COLOR, BUTTON_DEFAULT_TAG, } from './constants';
|
|
13
|
+
export var buttonVariant = [
|
|
14
|
+
'contained',
|
|
15
|
+
'contained-additional',
|
|
16
|
+
'ghost',
|
|
17
|
+
'function',
|
|
18
|
+
];
|
|
19
|
+
export var buttonColorVariant = [
|
|
20
|
+
'primary',
|
|
21
|
+
'secondary',
|
|
22
|
+
'tertiary',
|
|
23
|
+
'error',
|
|
24
|
+
];
|
|
25
|
+
export var cnButton = cn('ButtonNext');
|
|
26
|
+
export var Button = polymorphicComponentWithRef(function (inProps, ref) {
|
|
27
|
+
var props = useThemeProps({
|
|
28
|
+
props: inProps,
|
|
29
|
+
name: 'ButtonNext',
|
|
30
|
+
});
|
|
31
|
+
var _a = props.as, Tag = _a === void 0 ? BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? BUTTON_DEFAULT_SIZE : _d, iconLeft = props.iconLeft, iconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, labelProps = props.labelProps, onClick = props.onClick, other = __rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "labelProps", "onClick"]);
|
|
32
|
+
var iconSize = getIconSizeToFormElement(size);
|
|
33
|
+
var renderIcon = function (content) {
|
|
34
|
+
return renderContent({
|
|
35
|
+
content: content,
|
|
36
|
+
props: {
|
|
37
|
+
size: getIconSizeToFormElement(size),
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
var childContent = (React.createElement(React.Fragment, null,
|
|
42
|
+
React.createElement("span", { className: cnButton('Content') },
|
|
43
|
+
renderIcon(iconLeft),
|
|
44
|
+
React.createElement("span", __assign({}, labelProps, { className: cnButton('Label', [labelProps === null || labelProps === void 0 ? void 0 : labelProps.className]), ref: labelProps === null || labelProps === void 0 ? void 0 : labelProps.ref }), children),
|
|
45
|
+
renderIcon(iconRight)),
|
|
46
|
+
React.createElement(CSSTransition, { in: loading, timeout: 120, classNames: cnButton('Loader', { animation: true }), unmountOnExit: true },
|
|
47
|
+
React.createElement(Loader, { size: iconSize, className: cnButton('Loader') }))));
|
|
48
|
+
return (React.createElement(ButtonBase, __assign({ as: Tag, disabled: disabled, loading: loading, onClick: onClick, className: cnButton({
|
|
49
|
+
variant: variant,
|
|
50
|
+
size: size,
|
|
51
|
+
disabled: disabled,
|
|
52
|
+
loading: loading,
|
|
53
|
+
color: color,
|
|
54
|
+
fullWidth: fullWidth,
|
|
55
|
+
}, [className]) }, other, { ref: ref }), childContent));
|
|
56
|
+
});
|
|
57
|
+
Button.displayName = 'Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.Card_size_s {
|
|
17
|
-
--card-padding: var(--
|
|
17
|
+
--card-padding: var(--spacing-s);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.Card_size_m {
|
|
21
|
-
--card-padding: var(--
|
|
21
|
+
--card-padding: var(--spacing-m);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.Card_size_l {
|
|
25
|
-
--card-padding: var(--
|
|
25
|
+
--card-padding: var(--spacing-l);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.Card_interactive {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
11
11
|
|
|
12
12
|
--chip-min-width: 64px;
|
|
13
|
-
--chip-height: var(--
|
|
14
|
-
--chip-padding-x: var(--
|
|
13
|
+
--chip-height: var(--spacing-m);
|
|
14
|
+
--chip-padding-x: var(--spacing-xs);
|
|
15
15
|
}
|
|
16
16
|
.Chip_size_s {
|
|
17
17
|
font: var(--typography-text-s-font);
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
20
20
|
|
|
21
21
|
--chip-min-width: 72px;
|
|
22
|
-
--chip-height: var(--
|
|
23
|
-
--chip-padding-x: var(--
|
|
22
|
+
--chip-height: var(--spacing-l);
|
|
23
|
+
--chip-padding-x: var(--spacing-s);
|
|
24
24
|
}
|
|
25
25
|
.Chip_size_m {
|
|
26
26
|
font: var(--typography-text-m-font);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
text-transform: var(--typography-text-m-text_transform, none);
|
|
29
29
|
|
|
30
30
|
--chip-min-width: 80px;
|
|
31
|
-
--chip-height: var(--
|
|
31
|
+
--chip-height: var(--spacing-xl);
|
|
32
32
|
--chip-padding-x: 20px;
|
|
33
33
|
}
|
|
34
34
|
.Chip_size_l {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
text-transform: var(--typography-text-l-text_transform, none);
|
|
38
38
|
|
|
39
39
|
--chip-min-width: 88px;
|
|
40
|
-
--chip-height: var(--
|
|
41
|
-
--chip-padding-x: var(--
|
|
40
|
+
--chip-height: var(--spacing-2xl);
|
|
41
|
+
--chip-padding-x: var(--spacing-m);
|
|
42
42
|
}
|
|
43
43
|
.Chip_color_primary {
|
|
44
44
|
--chip-bg-color: var(--color-background-action-light);
|
|
@@ -59,8 +59,9 @@
|
|
|
59
59
|
color: var(--chip-text-color);
|
|
60
60
|
padding: 0 var(--chip-padding-x);
|
|
61
61
|
border-radius: var(--chip-border-radius);
|
|
62
|
-
gap: var(--
|
|
63
|
-
transition:
|
|
62
|
+
gap: var(--spacing-2xs);
|
|
63
|
+
transition:
|
|
64
|
+
border-color var(--transition-default),
|
|
64
65
|
color var(--transition-default),
|
|
65
66
|
background-color var(--transition-default),
|
|
66
67
|
box-shadow var(--transition-default);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
padding: 0 var(--chip-padding-x);
|
|
9
9
|
min-inline-size: var(--chip-min-width);
|
|
10
10
|
color: var(--chip-text-color);
|
|
11
|
-
gap: var(--
|
|
11
|
+
gap: var(--spacing-2xs);
|
|
12
12
|
display: inline-flex;
|
|
13
13
|
justify-content: center;
|
|
14
14
|
align-items: center;
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
42
42
|
|
|
43
43
|
--chip-min-width: 64px;
|
|
44
|
-
--chip-height: var(--
|
|
45
|
-
--chip-padding-x: var(--
|
|
44
|
+
--chip-height: var(--spacing-m);
|
|
45
|
+
--chip-padding-x: var(--spacing-xs);
|
|
46
46
|
}
|
|
47
47
|
.ChipNext_size_s {
|
|
48
48
|
font: var(--typography-text-s-font);
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
51
51
|
|
|
52
52
|
--chip-min-width: 72px;
|
|
53
|
-
--chip-height: var(--
|
|
54
|
-
--chip-padding-x: var(--
|
|
53
|
+
--chip-height: var(--spacing-l);
|
|
54
|
+
--chip-padding-x: var(--spacing-s);
|
|
55
55
|
}
|
|
56
56
|
.ChipNext_size_m {
|
|
57
57
|
font: var(--typography-text-m-font);
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
text-transform: var(--typography-text-m-text_transform, none);
|
|
60
60
|
|
|
61
61
|
--chip-min-width: 80px;
|
|
62
|
-
--chip-height: var(--
|
|
62
|
+
--chip-height: var(--spacing-xl);
|
|
63
63
|
--chip-padding-x: 20px;
|
|
64
64
|
}
|
|
65
65
|
.ChipNext_size_l {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
text-transform: var(--typography-text-l-text_transform, none);
|
|
69
69
|
|
|
70
70
|
--chip-min-width: 88px;
|
|
71
|
-
--chip-height: var(--
|
|
72
|
-
--chip-padding-x: var(--
|
|
71
|
+
--chip-height: var(--spacing-2xl);
|
|
72
|
+
--chip-padding-x: var(--spacing-m);
|
|
73
73
|
}
|
|
74
74
|
.ChipNext_color_primary {
|
|
75
75
|
--chip-bg-color: var(--color-background-action-light);
|