@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.
Files changed (111) hide show
  1. package/ButtonBase/package.json +5 -0
  2. package/ButtonNext/package.json +5 -0
  3. package/IconButtonNext/package.json +5 -0
  4. package/README.md +2 -2
  5. package/__inner__/cjs/components/Accordion/Accordion.css +18 -17
  6. package/__inner__/cjs/components/Alert/Alert.css +4 -4
  7. package/__inner__/cjs/components/Breadcrumbs/Breadcrumbs.css +0 -4
  8. package/__inner__/cjs/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
  9. package/__inner__/cjs/components/Button/Button.d.ts +3 -0
  10. package/__inner__/cjs/components/Button/Button.js +8 -3
  11. package/__inner__/cjs/components/ButtonBase/ButtonBase.css +10 -0
  12. package/__inner__/cjs/components/ButtonBase/ButtonBase.d.ts +20 -0
  13. package/__inner__/cjs/components/ButtonBase/ButtonBase.js +30 -0
  14. package/__inner__/cjs/components/ButtonBase/constants.d.ts +1 -0
  15. package/__inner__/cjs/components/ButtonBase/constants.js +4 -0
  16. package/__inner__/cjs/components/ButtonBase/index.d.ts +1 -0
  17. package/__inner__/cjs/components/ButtonBase/index.js +4 -0
  18. package/__inner__/cjs/components/ButtonNext/Button.css +333 -0
  19. package/__inner__/cjs/components/ButtonNext/Button.d.ts +51 -0
  20. package/__inner__/cjs/components/ButtonNext/Button.js +60 -0
  21. package/__inner__/cjs/components/ButtonNext/constants.d.ts +4 -0
  22. package/__inner__/cjs/components/ButtonNext/constants.js +7 -0
  23. package/__inner__/cjs/components/ButtonNext/index.d.ts +1 -0
  24. package/__inner__/cjs/components/ButtonNext/index.js +4 -0
  25. package/__inner__/cjs/components/Card/Card.css +3 -3
  26. package/__inner__/cjs/components/Chip/Chip.css +10 -9
  27. package/__inner__/cjs/components/ChipNext/Chip.css +8 -8
  28. package/__inner__/cjs/components/Container/Container.css +30 -30
  29. package/__inner__/cjs/components/DataList/DataList.css +3 -3
  30. package/__inner__/cjs/components/Drawer/Drawer.css +2 -2
  31. package/__inner__/cjs/components/FieldControl/FieldControl.css +5 -5
  32. package/__inner__/cjs/components/File/File.css +2 -2
  33. package/__inner__/cjs/components/FilePicker/FilePicker.css +5 -5
  34. package/__inner__/cjs/components/FormControlLabel/FormControlLabel.css +5 -5
  35. package/__inner__/cjs/components/FormGroup/FormGroup.css +2 -2
  36. package/__inner__/cjs/components/FormTitle/FormTitle.css +5 -5
  37. package/__inner__/cjs/components/IconButton/IconButton.d.ts +3 -0
  38. package/__inner__/cjs/components/IconButton/IconButton.js +7 -0
  39. package/__inner__/cjs/components/IconButtonNext/IconButton.css +348 -0
  40. package/__inner__/cjs/components/IconButtonNext/IconButton.d.ts +41 -0
  41. package/__inner__/cjs/components/IconButtonNext/IconButton.js +70 -0
  42. package/__inner__/cjs/components/IconButtonNext/constants.d.ts +4 -0
  43. package/__inner__/cjs/components/IconButtonNext/constants.js +7 -0
  44. package/__inner__/cjs/components/IconButtonNext/index.d.ts +1 -0
  45. package/__inner__/cjs/components/IconButtonNext/index.js +4 -0
  46. package/__inner__/cjs/components/List/List.css +5 -5
  47. package/__inner__/cjs/components/Modal/Modal.css +1 -1
  48. package/__inner__/cjs/components/SectionMessage/SectionMessage.css +5 -5
  49. package/__inner__/cjs/components/Segment/components/SegmentItem.css +5 -3
  50. package/__inner__/cjs/components/Slider/Slider.css +1 -1
  51. package/__inner__/cjs/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
  52. package/__inner__/cjs/components/Tabs/components/Tab/Tab.css +1 -1
  53. package/__inner__/cjs/components/Tag/Tag.css +1 -1
  54. package/__inner__/cjs/components/Textarea/Textarea.css +1 -1
  55. package/__inner__/cjs/components/ThemeProvider/types.d.ts +4 -0
  56. package/__inner__/cjs/components/Tooltip/Tooltip.css +2 -2
  57. package/__inner__/cjs/components/Typography/Typography.css +26 -26
  58. package/__inner__/esm/components/Accordion/Accordion.css +18 -17
  59. package/__inner__/esm/components/Alert/Alert.css +4 -4
  60. package/__inner__/esm/components/Breadcrumbs/Breadcrumbs.css +0 -4
  61. package/__inner__/esm/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
  62. package/__inner__/esm/components/Button/Button.d.ts +3 -0
  63. package/__inner__/esm/components/Button/Button.js +8 -3
  64. package/__inner__/esm/components/ButtonBase/ButtonBase.css +10 -0
  65. package/__inner__/esm/components/ButtonBase/ButtonBase.d.ts +20 -0
  66. package/__inner__/esm/components/ButtonBase/ButtonBase.js +27 -0
  67. package/__inner__/esm/components/ButtonBase/constants.d.ts +1 -0
  68. package/__inner__/esm/components/ButtonBase/constants.js +1 -0
  69. package/__inner__/esm/components/ButtonBase/index.d.ts +1 -0
  70. package/__inner__/esm/components/ButtonBase/index.js +1 -0
  71. package/__inner__/esm/components/ButtonNext/Button.css +333 -0
  72. package/__inner__/esm/components/ButtonNext/Button.d.ts +51 -0
  73. package/__inner__/esm/components/ButtonNext/Button.js +57 -0
  74. package/__inner__/esm/components/ButtonNext/constants.d.ts +4 -0
  75. package/__inner__/esm/components/ButtonNext/constants.js +4 -0
  76. package/__inner__/esm/components/ButtonNext/index.d.ts +1 -0
  77. package/__inner__/esm/components/ButtonNext/index.js +1 -0
  78. package/__inner__/esm/components/Card/Card.css +3 -3
  79. package/__inner__/esm/components/Chip/Chip.css +10 -9
  80. package/__inner__/esm/components/ChipNext/Chip.css +8 -8
  81. package/__inner__/esm/components/Container/Container.css +30 -30
  82. package/__inner__/esm/components/DataList/DataList.css +3 -3
  83. package/__inner__/esm/components/Drawer/Drawer.css +2 -2
  84. package/__inner__/esm/components/FieldControl/FieldControl.css +5 -5
  85. package/__inner__/esm/components/File/File.css +2 -2
  86. package/__inner__/esm/components/FilePicker/FilePicker.css +5 -5
  87. package/__inner__/esm/components/FormControlLabel/FormControlLabel.css +5 -5
  88. package/__inner__/esm/components/FormGroup/FormGroup.css +2 -2
  89. package/__inner__/esm/components/FormTitle/FormTitle.css +5 -5
  90. package/__inner__/esm/components/IconButton/IconButton.d.ts +3 -0
  91. package/__inner__/esm/components/IconButton/IconButton.js +7 -0
  92. package/__inner__/esm/components/IconButtonNext/IconButton.css +348 -0
  93. package/__inner__/esm/components/IconButtonNext/IconButton.d.ts +41 -0
  94. package/__inner__/esm/components/IconButtonNext/IconButton.js +67 -0
  95. package/__inner__/esm/components/IconButtonNext/constants.d.ts +4 -0
  96. package/__inner__/esm/components/IconButtonNext/constants.js +4 -0
  97. package/__inner__/esm/components/IconButtonNext/index.d.ts +1 -0
  98. package/__inner__/esm/components/IconButtonNext/index.js +1 -0
  99. package/__inner__/esm/components/List/List.css +5 -5
  100. package/__inner__/esm/components/Modal/Modal.css +1 -1
  101. package/__inner__/esm/components/SectionMessage/SectionMessage.css +5 -5
  102. package/__inner__/esm/components/Segment/components/SegmentItem.css +5 -3
  103. package/__inner__/esm/components/Slider/Slider.css +1 -1
  104. package/__inner__/esm/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
  105. package/__inner__/esm/components/Tabs/components/Tab/Tab.css +1 -1
  106. package/__inner__/esm/components/Tag/Tag.css +1 -1
  107. package/__inner__/esm/components/Textarea/Textarea.css +1 -1
  108. package/__inner__/esm/components/ThemeProvider/types.d.ts +4 -0
  109. package/__inner__/esm/components/Tooltip/Tooltip.css +2 -2
  110. package/__inner__/esm/components/Typography/Typography.css +26 -26
  111. package/package.json +4 -4
@@ -0,0 +1,348 @@
1
+ .IconButtonNext {
2
+ --icon-button-bg-color: var(--color-background-action);
3
+ --icon-button-bg-color-hover: var(--color-background-action-hover);
4
+ --icon-button-bg-color-active: var(--color-background-action-pressed);
5
+ --icon-button-font-color: var(--color-content-action-on);
6
+ block-size: var(--icon-button-size);
7
+ inline-size: var(--icon-button-size);
8
+ padding: 0;
9
+ box-sizing: border-box;
10
+ display: inline-flex;
11
+ flex-shrink: 0;
12
+ align-items: center;
13
+ justify-content: center;
14
+ cursor: pointer;
15
+ border-radius: var(--border-radius-xs);
16
+ border: none;
17
+ color: var(--icon-button-font-color);
18
+ background-color: var(--icon-button-bg-color);
19
+ opacity: 1;
20
+ transition:
21
+ background-color var(--transition-default),
22
+ box-shadow var(--transition-default),
23
+ opacity var(--transition-default);
24
+ -webkit-tap-highlight-color: transparent;
25
+ position: relative;
26
+ }
27
+
28
+ .IconButtonNext_size_2xs {
29
+ --icon-button-size: 32px;
30
+ }
31
+
32
+ .IconButtonNext_size_2xs.IconButtonNext_compressed:not(.IconButtonNext_variant_function) {
33
+ --icon-button-size: 24px;
34
+ }
35
+
36
+ .IconButtonNext_size_xs {
37
+ --icon-button-size: 40px;
38
+ }
39
+
40
+ .IconButtonNext_size_xs.IconButtonNext_compressed:not(.IconButtonNext_variant_function) {
41
+ --icon-button-size: 28px;
42
+ }
43
+
44
+ .IconButtonNext_size_s {
45
+ --icon-button-size: 48px;
46
+ }
47
+
48
+ .IconButtonNext_size_s.IconButtonNext_compressed:not(.IconButtonNext_variant_function) {
49
+ --icon-button-size: 32px;
50
+ }
51
+
52
+ .IconButtonNext_size_m {
53
+ --icon-button-size: 56px;
54
+ }
55
+
56
+ .IconButtonNext_size_m.IconButtonNext_compressed:not(.IconButtonNext_variant_function) {
57
+ --icon-button-size: 40px;
58
+ }
59
+
60
+ .IconButtonNext_size_l {
61
+ --icon-button-size: 64px;
62
+ }
63
+
64
+ .IconButtonNext_size_l.IconButtonNext_compressed:not(.IconButtonNext_variant_function) {
65
+ --icon-button-size: 48px;
66
+ }
67
+
68
+ /** contained */
69
+
70
+ .IconButtonNext_variant_contained.IconButtonNext_color_primary {
71
+ --icon-button-bg-color: var(--color-background-action);
72
+ --icon-button-bg-color-hover: var(--color-background-action-hover);
73
+ --icon-button-bg-color-active: var(--color-background-action-pressed);
74
+ --icon-button-font-color: var(--color-content-action-on);
75
+ --icon-button-font-color-hover: var(--color-content-action-on);
76
+ --icon-button-font-color-active: var(--color-content-action-on);
77
+ --icon-button-font-color-focus: var(--color-content-action-on);
78
+ }
79
+
80
+ .IconButtonNext_variant_contained.IconButtonNext_color_secondary {
81
+ --icon-button-bg-color: var(--color-content-action-secondary);
82
+ --icon-button-bg-color-hover: var(--color-content-action-secondary-hover);
83
+ --icon-button-bg-color-active: var(
84
+ --color-content-action-secondary-pressed
85
+ );
86
+ --icon-button-font-color: var(--color-content-action-on);
87
+ --icon-button-font-color-hover: var(--color-content-action-on);
88
+ --icon-button-font-color-active: var(--color-content-action-on);
89
+ --icon-button-font-color-focus: var(--color-content-action-on);
90
+ }
91
+
92
+ .IconButtonNext_variant_contained.IconButtonNext_color_tertiary {
93
+ --icon-button-bg-color: var(--color-background-tertiary);
94
+ --icon-button-bg-color-hover: var(--color-background-tertiary-hover);
95
+ --icon-button-bg-color-active: var(--color-background-tertiary-pressed);
96
+ --icon-button-font-color: var(--color-content-primary);
97
+ --icon-button-font-color-hover: var(--color-content-primary);
98
+ --icon-button-font-color-active: var(--color-content-primary);
99
+ --icon-button-font-color-focus: var(--color-content-primary);
100
+ }
101
+
102
+ .IconButtonNext_variant_contained.IconButtonNext_color_error {
103
+ --icon-button-bg-color: var(--color-background-error);
104
+ --icon-button-bg-color-hover: var(--color-background-error-hover);
105
+ --icon-button-bg-color-active: var(--color-background-error-pressed);
106
+ --icon-button-font-color: var(--color-content-action-on);
107
+ --icon-button-font-color-hover: var(--color-content-action-on);
108
+ --icon-button-font-color-active: var(--color-content-action-on);
109
+ --icon-button-font-color-focus: var(--color-content-action-on);
110
+ }
111
+
112
+ /** contained-additional */
113
+
114
+ .IconButtonNext_variant_contained-additional.IconButtonNext_color_primary {
115
+ --icon-button-bg-color: var(--color-background-action-light);
116
+ --icon-button-bg-color-hover: var(--color-background-action-light-hover);
117
+ --icon-button-bg-color-active: var(--color-background-action-light-pressed);
118
+ --icon-button-font-color: var(--color-content-action);
119
+ --icon-button-font-color-hover: var(--color-content-action);
120
+ --icon-button-font-color-active: var(--color-content-action);
121
+ --icon-button-font-color-focus: var(--color-content-action);
122
+ }
123
+
124
+ .IconButtonNext_variant_contained-additional.IconButtonNext_color_secondary {
125
+ --icon-button-bg-color: var(--color-background-secondary);
126
+ --icon-button-bg-color-hover: var(--color-background-secondary-hover);
127
+ --icon-button-bg-color-active: var(--color-background-secondary-pressed);
128
+ --icon-button-font-color: var(--color-content-primary);
129
+ --icon-button-font-color-hover: var(--color-content-primary);
130
+ --icon-button-font-color-active: var(--color-content-primary);
131
+ --icon-button-font-color-focus: var(--color-content-primary);
132
+ }
133
+
134
+ .IconButtonNext_variant_contained-additional.IconButtonNext_color_tertiary {
135
+ --icon-button-bg-color: var(--color-background-primary);
136
+ --icon-button-bg-color-hover: var(--color-background-primary-hover);
137
+ --icon-button-bg-color-active: var(--color-background-primary-pressed);
138
+ --icon-button-font-color: var(--color-content-secondary);
139
+ --icon-button-font-color-hover: var(--color-content-secondary);
140
+ --icon-button-font-color-active: var(--color-content-secondary);
141
+ --icon-button-font-color-focus: var(--color-content-secondary);
142
+ }
143
+
144
+ .IconButtonNext_variant_contained-additional.IconButtonNext_color_error {
145
+ --icon-button-bg-color: var(--color-background-error-light);
146
+ --icon-button-bg-color-hover: var(--color-background-error-light-hover);
147
+ --icon-button-bg-color-active: var(--color-background-error-light-pressed);
148
+ --icon-button-font-color: var(--color-content-error);
149
+ --icon-button-font-color-hover: var(--color-content-error);
150
+ --icon-button-font-color-active: var(--color-content-error);
151
+ --icon-button-font-color-focus: var(--color-content-error);
152
+ }
153
+
154
+ /** ghost */
155
+
156
+ .IconButtonNext_variant_ghost.IconButtonNext_color_primary {
157
+ --icon-button-bg-color: transparent;
158
+ --icon-button-bg-color-hover: var(--color-background-action-light-hover);
159
+ --icon-button-bg-color-active: var(--color-background-action-light-pressed);
160
+ --icon-button-font-color: var(--color-content-action);
161
+ --icon-button-font-color-hover: var(--color-content-action);
162
+ --icon-button-font-color-active: var(--color-content-action);
163
+ --icon-button-font-color-focus: var(--color-content-action);
164
+ }
165
+
166
+ .IconButtonNext_variant_ghost.IconButtonNext_color_secondary {
167
+ --icon-button-bg-color: transparent;
168
+ --icon-button-bg-color-hover: var(--color-background-secondary-hover);
169
+ --icon-button-bg-color-active: var(--color-background-secondary-pressed);
170
+ --icon-button-font-color: var(--color-content-primary);
171
+ --icon-button-font-color-hover: var(--color-content-primary);
172
+ --icon-button-font-color-active: var(--color-content-primary);
173
+ --icon-button-font-color-focus: var(--color-content-primary);
174
+ }
175
+
176
+ .IconButtonNext_variant_ghost.IconButtonNext_color_tertiary {
177
+ --icon-button-bg-color: transparent;
178
+ --icon-button-bg-color-hover: var(--color-background-primary-hover);
179
+ --icon-button-bg-color-active: var(--color-background-primary-pressed);
180
+ --icon-button-font-color: var(--color-content-secondary);
181
+ --icon-button-font-color-hover: var(--color-content-secondary);
182
+ --icon-button-font-color-active: var(--color-content-secondary);
183
+ --icon-button-font-color-focus: var(--color-content-secondary);
184
+ }
185
+
186
+ .IconButtonNext_variant_ghost.IconButtonNext_color_error {
187
+ --icon-button-bg-color: transparent;
188
+ --icon-button-bg-color-hover: var(--color-background-error-light-hover);
189
+ --icon-button-bg-color-active: var(--color-background-error-light-pressed);
190
+ --icon-button-font-color: var(--color-content-error);
191
+ --icon-button-font-color-hover: var(--color-content-error);
192
+ --icon-button-font-color-active: var(--color-content-error);
193
+ --icon-button-font-color-focus: var(--color-content-error);
194
+ }
195
+
196
+ /** function */
197
+
198
+ .IconButtonNext_variant_function {
199
+ --icon-button-size: auto;
200
+ }
201
+
202
+ .IconButtonNext_variant_function.IconButtonNext_color_primary,
203
+ .IconButtonNext_variant_function.IconButtonNext_color_secondary,
204
+ .IconButtonNext_variant_function.IconButtonNext_color_tertiary,
205
+ .IconButtonNext_variant_function.IconButtonNext_color_error {
206
+ --icon-button-bg-color: transparent;
207
+ --icon-button-bg-color-hover: transparent;
208
+ --icon-button-bg-color-active: transparent;
209
+ }
210
+
211
+ .IconButtonNext_variant_function.IconButtonNext_color_primary {
212
+ --icon-button-font-color: var(--color-content-action);
213
+ --icon-button-font-color-hover: var(--color-background-action-hover);
214
+ --icon-button-font-color-active: var(--color-background-action-pressed);
215
+ --icon-button-font-color-focus: var(--color-background-action-pressed);
216
+ }
217
+
218
+ .IconButtonNext_variant_function.IconButtonNext_color_secondary {
219
+ --icon-button-font-color: var(--color-content-action-secondary);
220
+ --icon-button-font-color-hover: var(--color-content-action-secondary-hover);
221
+ --icon-button-font-color-active: var(
222
+ --color-content-action-secondary-pressed
223
+ );
224
+ --icon-button-font-color-focus: var(
225
+ --color-content-action-secondary-pressed
226
+ );
227
+ }
228
+
229
+ .IconButtonNext_variant_function.IconButtonNext_color_tertiary {
230
+ --icon-button-font-color: var(--color-content-secondary);
231
+ --icon-button-font-color-hover: var(--color-content-secondary);
232
+ --icon-button-font-color-active: var(--color-content-secondary);
233
+ --icon-button-font-color-focus: var(--color-content-secondary);
234
+ }
235
+
236
+ .IconButtonNext_variant_function.IconButtonNext_color_error {
237
+ --icon-button-font-color: var(--color-content-error);
238
+ --icon-button-font-color-hover: var(--color-content-error-hover);
239
+ --icon-button-font-color-active: var(--color-content-error-pressed);
240
+ --icon-button-font-color-focus: var(--color-content-error-pressed);
241
+ }
242
+
243
+ /** floating */
244
+
245
+ .IconButtonNext_variant_floating {
246
+ --icon-button-bg-color: var(--color-background-main);
247
+ --icon-button-bg-color-hover: var(--color-background-main-hover);
248
+ --icon-button-bg-color-active: var(--color-background-main-pressed);
249
+ --icon-button-font-color: var(--color-content-primary);
250
+ --icon-button-font-color-active: var(--color-content-primary);
251
+ --icon-button-font-color-focus: var(--color-content-primary);
252
+ }
253
+
254
+ .IconButtonNext_variant_floating::after {
255
+ content: '';
256
+ inset: 0;
257
+ position: absolute;
258
+ inline-size: 100%;
259
+ border-radius: inherit;
260
+ box-shadow: 0 8px 32px rgb(0 0 0 / 8%);
261
+ }
262
+
263
+ /** rounded */
264
+
265
+ .IconButtonNext_variant_contained.IconButtonNext_rounded,
266
+ .IconButtonNext_variant_contained-additional.IconButtonNext_rounded,
267
+ .IconButtonNext_variant_ghost.IconButtonNext_rounded,
268
+ .IconButtonNext_variant_floating.IconButtonNext_rounded {
269
+ border-radius: 50%;
270
+ }
271
+
272
+ /** disabled */
273
+
274
+ .IconButtonNext_variant_contained.IconButtonNext_disabled,
275
+ .IconButtonNext_variant_contained.IconButtonNext_loading,
276
+ .IconButtonNext_variant_contained-additional.IconButtonNext_disabled,
277
+ .IconButtonNext_variant_contained-additional.IconButtonNext_loading,
278
+ .IconButtonNext_variant_ghost.IconButtonNext_disabled,
279
+ .IconButtonNext_variant_ghost.IconButtonNext_loading,
280
+ .IconButtonNext_variant_function.IconButtonNext_disabled,
281
+ .IconButtonNext_variant_function.IconButtonNext_loading,
282
+ .IconButtonNext_variant_floating.IconButtonNext_disabled,
283
+ .IconButtonNext_variant_floating.IconButtonNext_loading {
284
+ --icon-button-font-color: var(--color-content-disabled);
285
+ }
286
+
287
+ .IconButtonNext_variant_contained.IconButtonNext_disabled svg, .IconButtonNext_variant_contained.IconButtonNext_loading svg, .IconButtonNext_variant_contained-additional.IconButtonNext_disabled svg, .IconButtonNext_variant_contained-additional.IconButtonNext_loading svg, .IconButtonNext_variant_ghost.IconButtonNext_disabled svg, .IconButtonNext_variant_ghost.IconButtonNext_loading svg, .IconButtonNext_variant_function.IconButtonNext_disabled svg, .IconButtonNext_variant_function.IconButtonNext_loading svg, .IconButtonNext_variant_floating.IconButtonNext_disabled svg, .IconButtonNext_variant_floating.IconButtonNext_loading svg {
288
+ color: currentcolor;
289
+ }
290
+
291
+ .IconButtonNext_variant_contained.IconButtonNext_disabled,
292
+ .IconButtonNext_variant_contained.IconButtonNext_loading,
293
+ .IconButtonNext_variant_contained-additional.IconButtonNext_disabled,
294
+ .IconButtonNext_variant_contained-additional.IconButtonNext_loading,
295
+ .IconButtonNext_variant_floating.IconButtonNext_disabled,
296
+ .IconButtonNext_variant_floating.IconButtonNext_loading {
297
+ --icon-button-bg-color: var(--color-background-disabled);
298
+ --icon-button-bg-color-hover: var(--color-background-disabled);
299
+ --icon-button-bg-color-active: var(--color-background-disabled);
300
+ }
301
+
302
+ .IconButtonNext_variant_ghost.IconButtonNext_disabled,
303
+ .IconButtonNext_variant_ghost.IconButtonNext_loading,
304
+ .IconButtonNext_variant_function.IconButtonNext_disabled,
305
+ .IconButtonNext_variant_function.IconButtonNext_loading {
306
+ --icon-button-bg-color: transparent;
307
+ --icon-button-bg-color-hover: transparent;
308
+ --icon-button-bg-color-active: transparent;
309
+ }
310
+
311
+ /** focus */
312
+
313
+ .IconButtonNext:focus:not(:focus-visible, :active, :hover) {
314
+ box-shadow: none;
315
+ color: var(--icon-button-font-color);
316
+ }
317
+
318
+ .IconButtonNext:focus {
319
+ outline: 0;
320
+
321
+ /* the bug in outline property before chrome version 94 – doesn't repeat radius of an element */
322
+ box-shadow: var(--shadow-outline-focused);
323
+ color: var(--icon-button-font-color-focus);
324
+ }
325
+
326
+ .IconButtonNext:focus:not(:focus-visible) {
327
+ box-shadow: none;
328
+ }
329
+
330
+ /** hover */
331
+
332
+ .IconButtonNext:hover {
333
+ background-color: var(--icon-button-bg-color-hover);
334
+ color: var(--icon-button-font-color-hover);
335
+ }
336
+
337
+ /** active */
338
+
339
+ .IconButtonNext:active {
340
+ background-color: var(--icon-button-bg-color-active);
341
+ color: var(--icon-button-font-color-active);
342
+ }
343
+
344
+ .IconButtonNext_disabled,
345
+ .IconButtonNext_loading {
346
+ pointer-events: none;
347
+ cursor: auto;
348
+ }
@@ -0,0 +1,41 @@
1
+ import './IconButton.css';
2
+ import type { ElementType } from 'react';
3
+ import type { IconSize, IconProps } 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 { ICON_BUTTON_DEFAULT_TAG } from './constants';
8
+ export declare const iconButtonColorVariant: readonly ["primary", "secondary", "tertiary", "error"];
9
+ export declare const iconButtonVariant: readonly ["contained", "contained-additional", "ghost", "function", "floating"];
10
+ export type IconButtonVariant = (typeof iconButtonVariant)[number];
11
+ export type IconButtonColorVariant = (typeof iconButtonColorVariant)[number];
12
+ export type IconButtonIcon = RenderContentType<IconProps & {
13
+ size?: IconSize;
14
+ }>['content'];
15
+ type IconButtonBaseProps = {
16
+ /** Иконка */
17
+ icon: IconButtonIcon;
18
+ /** Вариант представления компонента */
19
+ variant?: IconButtonVariant;
20
+ /** Размер */
21
+ size?: FormElementSizeVariant;
22
+ /** Основной цвет компонента */
23
+ color?: IconButtonColorVariant;
24
+ /** Цвет иконки кнопки */
25
+ iconColor?: string;
26
+ /** Если {true} уменьшает размер компонента */
27
+ compressed?: boolean;
28
+ /** Если {true} делает компонент заблокированным */
29
+ disabled?: boolean;
30
+ /** Если {true} переводит компонент в состояние загрузки */
31
+ loading?: boolean;
32
+ /** Дополнительные CSS-классы */
33
+ className?: string;
34
+ /** Если {true} делает компонент круглым */
35
+ rounded?: boolean;
36
+ children?: never;
37
+ };
38
+ export type IconButtonProps<As extends ElementType = typeof ICON_BUTTON_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<IconButtonBaseProps, As>;
39
+ export declare const cnIconButton: import("@bem-react/classname").ClassNameFormatter;
40
+ export declare const IconButton: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<IconButtonBaseProps, "button">;
41
+ export {};
@@ -0,0 +1,67 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './IconButton.css';
3
+ import React, { useMemo } from 'react';
4
+ import { useThemeProps } from '../../hooks/useThemeProps';
5
+ import { cn } from '../../utils/classname';
6
+ import { getIconSizeToFormElement } from '../../utils/getIconSizeToFormElement';
7
+ import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
8
+ import { renderContent } from '../../utils/renderContent';
9
+ import { ButtonBase } from '../ButtonBase';
10
+ import { Loader } from '../Loader';
11
+ import { ICON_BUTTON_DEFAULT_SIZE, ICON_BUTTON_DEFAULT_VARIANT, ICON_BUTTON_DEFAULT_COLOR, ICON_BUTTON_DEFAULT_TAG, } from './constants';
12
+ export var iconButtonColorVariant = [
13
+ 'primary',
14
+ 'secondary',
15
+ 'tertiary',
16
+ 'error',
17
+ ];
18
+ export var iconButtonVariant = [
19
+ 'contained',
20
+ 'contained-additional',
21
+ 'ghost',
22
+ 'function',
23
+ 'floating',
24
+ ];
25
+ export var cnIconButton = cn('IconButtonNext');
26
+ var loaderSizeMapper = {
27
+ '2xs': 's',
28
+ xs: 's',
29
+ s: 's',
30
+ m: 'm',
31
+ l: 'l',
32
+ };
33
+ export var IconButton = polymorphicComponentWithRef(function (inProps, ref) {
34
+ var props = useThemeProps({
35
+ props: inProps,
36
+ name: 'IconButtonNext',
37
+ });
38
+ var _a = props.size, size = _a === void 0 ? ICON_BUTTON_DEFAULT_SIZE : _a, _b = props.variant, variant = _b === void 0 ? ICON_BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? ICON_BUTTON_DEFAULT_COLOR : _c, _d = props.as, Tag = _d === void 0 ? ICON_BUTTON_DEFAULT_TAG : _d, iconColor = props.iconColor, compressed = props.compressed, loading = props.loading, disabled = props.disabled, className = props.className, icon = props.icon, onClick = props.onClick, rounded = props.rounded, other = __rest(props, ["size", "variant", "color", "as", "iconColor", "compressed", "loading", "disabled", "className", "icon", "onClick", "rounded"]);
39
+ var renderIcon = function (content) {
40
+ return renderContent({
41
+ content: content,
42
+ props: {
43
+ size: getIconSizeToFormElement(size),
44
+ color: iconColor,
45
+ },
46
+ });
47
+ };
48
+ var resolvedChildren = useMemo(function () {
49
+ if (loading) {
50
+ return (React.createElement(Loader, { className: cnIconButton('Loader'), color: "var(--color-content-disabled)", size: loaderSizeMapper[size] }));
51
+ }
52
+ if (icon) {
53
+ return renderIcon(icon);
54
+ }
55
+ return null;
56
+ }, [loading, size, iconColor, icon, renderIcon]);
57
+ return (React.createElement(ButtonBase, __assign({ as: Tag, disabled: disabled, loading: loading, onClick: onClick, className: cnIconButton({
58
+ variant: variant,
59
+ size: size,
60
+ color: color,
61
+ disabled: disabled,
62
+ loading: loading,
63
+ compressed: compressed,
64
+ rounded: rounded,
65
+ }, [className]) }, other, { ref: ref }), resolvedChildren));
66
+ });
67
+ IconButton.displayName = 'IconButton';
@@ -0,0 +1,4 @@
1
+ export declare const ICON_BUTTON_DEFAULT_SIZE = "m";
2
+ export declare const ICON_BUTTON_DEFAULT_VARIANT = "ghost";
3
+ export declare const ICON_BUTTON_DEFAULT_COLOR = "secondary";
4
+ export declare const ICON_BUTTON_DEFAULT_TAG = "button";
@@ -0,0 +1,4 @@
1
+ export var ICON_BUTTON_DEFAULT_SIZE = 'm';
2
+ export var ICON_BUTTON_DEFAULT_VARIANT = 'ghost';
3
+ export var ICON_BUTTON_DEFAULT_COLOR = 'secondary';
4
+ export var ICON_BUTTON_DEFAULT_TAG = 'button';
@@ -0,0 +1 @@
1
+ export * from './IconButton';
@@ -0,0 +1 @@
1
+ export * from './IconButton';
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  .List_size_2xs {
32
- --list-gutter: var(--space-xs);
32
+ --list-gutter: var(--spacing-3xs);
33
33
  --list-item-min-height: 32px;
34
34
  --list-item-icon-min-width: 16px;
35
35
  --list-item-avatar-min-width: 16px;
@@ -40,7 +40,7 @@
40
40
  }
41
41
 
42
42
  .List_size_xs {
43
- --list-gutter: var(--space-xs);
43
+ --list-gutter: var(--spacing-3xs);
44
44
  --list-item-min-height: 40px;
45
45
  --list-item-icon-min-width: 16px;
46
46
  --list-item-avatar-min-width: 24px;
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  .List_size_s {
54
- --list-gutter: var(--space-xs);
54
+ --list-gutter: var(--spacing-3xs);
55
55
  --list-item-min-height: 48px;
56
56
  --list-item-icon-min-width: 16px;
57
57
  --list-item-avatar-min-width: 32px;
@@ -62,7 +62,7 @@
62
62
  }
63
63
 
64
64
  .List_size_m {
65
- --list-gutter: var(--space-s);
65
+ --list-gutter: var(--spacing-2xs);
66
66
  --list-item-min-height: 56px;
67
67
  --list-item-icon-min-width: 24px;
68
68
  --list-item-avatar-min-width: 40px;
@@ -73,7 +73,7 @@
73
73
  }
74
74
 
75
75
  .List_size_l {
76
- --list-gutter: var(--space-s);
76
+ --list-gutter: var(--spacing-2xs);
77
77
  --list-item-min-height: 64px;
78
78
  --list-item-icon-min-width: 24px;
79
79
  --list-item-avatar-min-width: 48px;
@@ -20,7 +20,7 @@
20
20
  inline-size: 400px;
21
21
  box-sizing: border-box;
22
22
  border: 2px solid black;
23
- padding: var(--space-2xl);
23
+ padding: var(--spacing-l);
24
24
  }
25
25
 
26
26
  .Modal_hidden {
@@ -44,7 +44,7 @@
44
44
  }
45
45
  .SectionMessage_size_xs {
46
46
  --section-message-padding: 12px;
47
- --section-message-column-gap: var(--space-s);
47
+ --section-message-column-gap: var(--spacing-2xs);
48
48
  --section-message-icon-padding: 0;
49
49
 
50
50
  font: var(--typography-text-xs-font);
@@ -60,7 +60,7 @@
60
60
  }
61
61
  .SectionMessage_size_s {
62
62
  --section-message-padding: 14px 16px;
63
- --section-message-column-gap: var(--space-m);
63
+ --section-message-column-gap: var(--spacing-xs);
64
64
 
65
65
  font: var(--typography-text-s-font);
66
66
 
@@ -75,7 +75,7 @@
75
75
  }
76
76
  .SectionMessage_size_m {
77
77
  --section-message-padding: 16px 20px;
78
- --section-message-column-gap: var(--space-m);
78
+ --section-message-column-gap: var(--spacing-xs);
79
79
  --section-message-icon-padding: 0;
80
80
 
81
81
  font: var(--typography-text-m-font);
@@ -91,7 +91,7 @@
91
91
  }
92
92
  .SectionMessage_size_l {
93
93
  --section-message-padding: 18px 24px;
94
- --section-message-column-gap: var(--space-l);
94
+ --section-message-column-gap: var(--spacing-s);
95
95
 
96
96
  font: var(--typography-text-l-font);
97
97
 
@@ -114,7 +114,7 @@
114
114
  align-items: center;
115
115
  }
116
116
  .SectionMessage-Action {
117
- margin-block-start: var(--space-s);
117
+ margin-block-start: var(--spacing-2xs);
118
118
  }
119
119
  .SectionMessage-Button.Button {
120
120
  color: var(--section-message-button-color);
@@ -4,15 +4,17 @@
4
4
  --segment-item-border-radius: var(--border-radius-xs);
5
5
  --segment-item-text-color: var(--color-content-primary);
6
6
  --segment-item-text-color-hover: var(--color-content-secondary);
7
- --segment-item-gap: var(--space-s);
7
+ --segment-item-gap: var(--spacing-2xs);
8
8
  gap: var(--segment-item-gap);
9
9
  padding: var(--segment-item-padding-vertical)
10
10
  var(--segment-item-padding-horizontal);
11
11
  background-color: var(--segment-item-background-color);
12
12
  border-radius: var(--segment-item-border-radius);
13
13
  color: var(--segment-item-text-color);
14
- transition: background-color var(--transition-default),
15
- color var(--transition-default), box-shadow var(--transition-default);
14
+ transition:
15
+ background-color var(--transition-default),
16
+ color var(--transition-default),
17
+ box-shadow var(--transition-default);
16
18
  display: flex;
17
19
  align-items: center;
18
20
  position: relative;
@@ -16,7 +16,7 @@
16
16
  --slider-inner-rail-background-color: var(--color-border-disabled);
17
17
  }
18
18
  .Slider_hasMarks .Slider-Container {
19
- margin-block-end: var(--space-xl);
19
+ margin-block-end: var(--spacing-m);
20
20
  }
21
21
  .Slider-Container {
22
22
  position: relative;
@@ -6,8 +6,8 @@
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  z-index: var(--z-index-snackbar);
9
- margin: var(--space-m);
10
- gap: var(--space-s);
9
+ margin: var(--spacing-xs);
10
+ gap: var(--spacing-2xs);
11
11
 
12
12
  /* workaround for a removed scroll bar on the body */
13
13
  border-inline-end: var(--removed-body-scroll-bar-size) solid transparent;
@@ -14,7 +14,7 @@
14
14
  white-space: nowrap;
15
15
  background: transparent;
16
16
  transition: var(--transition-default);
17
- gap: var(--space-s);
17
+ gap: var(--spacing-2xs);
18
18
  border: none;
19
19
  }
20
20
  .Tab:focus {
@@ -4,7 +4,7 @@
4
4
  align-items: center;
5
5
  border-radius: var(--border-radius-xs);
6
6
  padding: var(--tag-padding);
7
- gap: var(--space-xs);
7
+ gap: var(--spacing-3xs);
8
8
  outline: none;
9
9
  border: none;
10
10
  text-decoration: none;
@@ -83,7 +83,7 @@
83
83
 
84
84
  .Textarea-Counter {
85
85
  float: right;
86
- margin-inline-start: var(--space-l);
86
+ margin-inline-start: var(--spacing-s);
87
87
  color: var(--color-content-secondary);
88
88
  }
89
89