@kaizen/components 1.67.22 → 1.68.1
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/codemods/README.md +16 -1
- package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +9 -9
- package/dist/cjs/__actions__/Button/v3/Button.cjs +43 -8
- package/dist/cjs/__actions__/Button/v3/Button.module.css.cjs +21 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.cjs +37 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css.cjs +9 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.cjs +35 -0
- package/dist/cjs/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css.cjs +8 -0
- package/dist/cjs/__overlays__/Tooltip/v3/Tooltip.cjs +2 -2
- package/dist/esm/__actions__/Button/v3/Button.mjs +44 -9
- package/dist/esm/__actions__/Button/v3/Button.module.css.mjs +19 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.mjs +28 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css.mjs +7 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.mjs +26 -0
- package/dist/esm/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css.mjs +6 -0
- package/dist/esm/__overlays__/Tooltip/v3/Tooltip.mjs +1 -1
- package/dist/styles.css +276 -91
- package/dist/types/__actions__/Button/v3/Button.d.ts +17 -4
- package/dist/types/__actions__/Button/v3/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.d.ts +11 -0
- package/dist/types/__actions__/Button/v3/subcomponents/ButtonContent/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.d.ts +5 -0
- package/dist/types/__actions__/Button/v3/subcomponents/PendingContent/index.d.ts +1 -0
- package/dist/types/__actions__/Button/v3/subcomponents/index.d.ts +2 -0
- package/dist/types/__actions__/Button/v3/types.d.ts +21 -0
- package/package.json +1 -1
- package/src/__actions__/Button/v3/Button.module.css +235 -0
- package/src/__actions__/Button/v3/Button.tsx +92 -29
- package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +150 -0
- package/src/__actions__/Button/v3/_docs/Button--usage-guidelines.mdx +30 -0
- package/src/__actions__/Button/v3/_docs/Button.docs.stories.tsx +112 -50
- package/src/__actions__/Button/v3/_docs/Button.spec.stories.tsx +80 -120
- package/src/__actions__/Button/v3/_docs/Button.stickersheet.stories.tsx +183 -81
- package/src/__actions__/Button/v3/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.module.css +19 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/ButtonContent.tsx +40 -0
- package/src/__actions__/Button/v3/subcomponents/ButtonContent/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.module.css +16 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/PendingContent.tsx +28 -0
- package/src/__actions__/Button/v3/subcomponents/PendingContent/index.ts +1 -0
- package/src/__actions__/Button/v3/subcomponents/index.ts +2 -0
- package/src/__actions__/Button/v3/types.ts +25 -0
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +54 -18
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +30 -10
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -4
- package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +7 -7
- package/src/__overlays__/Tooltip/v3/Tooltip.tsx +1 -1
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +2 -0
- package/dist/cjs/__actions__/Button/v3/Button.module.scss.cjs +0 -9
- package/dist/esm/__actions__/Button/v3/Button.module.scss.mjs +0 -7
- package/src/__actions__/Button/v3/Button.module.scss +0 -104
- package/src/__actions__/Button/v3/_docs/ApiSpecification.mdx +0 -173
- package/src/__actions__/Button/v3/_docs/Button.mdx +0 -41
- package/src/__actions__/Button/v3/_docs/Button.stories.tsx +0 -98
package/dist/styles.css
CHANGED
|
@@ -32,6 +32,242 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
.Button-module_button__vlUCI {
|
|
36
|
+
/* RESET */
|
|
37
|
+
appearance: none;
|
|
38
|
+
background: transparent;
|
|
39
|
+
font: inherit;
|
|
40
|
+
margin: 0;
|
|
41
|
+
outline: none;
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
-moz-osx-font-smoothing: grayscale;
|
|
44
|
+
|
|
45
|
+
--button-min-x-y: var(--spacing-40);
|
|
46
|
+
--button-border-width: var(--border-solid-border-width);
|
|
47
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
48
|
+
--button-padding-x: calc(var(--spacing-16) - var(--button-border-width));
|
|
49
|
+
|
|
50
|
+
background-color: var(--button-bg-color, var(--color-blue-500));
|
|
51
|
+
border: var(--button-border-width) solid;
|
|
52
|
+
border-radius: var(--border-solid-border-radius);
|
|
53
|
+
border-color: var(--button-border-color, var(--color-blue-500));
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
color: var(--button-text-color, var(--color-white));
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
text-align: start;
|
|
60
|
+
font-family: var(
|
|
61
|
+
--button-font-family,
|
|
62
|
+
var(--typography-paragraph-body-font-family)
|
|
63
|
+
);
|
|
64
|
+
font-weight: var(--button-font-weight, 500);
|
|
65
|
+
font-size: var(--button-font-size, 1rem);
|
|
66
|
+
line-height: var(--button-line-height, 1.5rem);
|
|
67
|
+
min-height: var(--button-min-x-y);
|
|
68
|
+
min-width: var(--button-min-x-y);
|
|
69
|
+
position: relative;
|
|
70
|
+
padding: var(--button-padding-y) var(--button-padding-x);
|
|
71
|
+
|
|
72
|
+
&[data-hovered] {
|
|
73
|
+
--button-bg-color: var(--color-blue-600);
|
|
74
|
+
--button-border-color: var(--color-blue-600);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[data-pressed] {
|
|
78
|
+
--button-bg-color: var(--color-blue-700);
|
|
79
|
+
--button-border-color: var(--color-blue-700);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&[data-pending] {
|
|
83
|
+
--button-bg-color: var(--color-blue-700);
|
|
84
|
+
--button-border-color: var(--color-blue-700);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[data-focus-visible]::after {
|
|
88
|
+
content: "";
|
|
89
|
+
position: absolute;
|
|
90
|
+
background: transparent;
|
|
91
|
+
border-color: var(--color-blue-500);
|
|
92
|
+
border-radius: var(--border-focus-ring-border-radius);
|
|
93
|
+
border-width: var(--border-focus-ring-border-width);
|
|
94
|
+
border-style: var(--border-focus-ring-border-style);
|
|
95
|
+
inset: calc(-1 * (var(--border-focus-ring-border-width) * 2) - 1px);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.Button-module_fullWidth__qIkG6 {
|
|
100
|
+
width: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.Button-module_small__FYPwk {
|
|
104
|
+
--button-font-size: 0.75rem;
|
|
105
|
+
--button-line-height: 1rem;
|
|
106
|
+
--button-min-x-y: var(--spacing-32);
|
|
107
|
+
--icon-size: 16;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.Button-module_medium__4LOhQ {
|
|
111
|
+
--button-padding-x: calc(var(--spacing-20) - var(--button-border-width));
|
|
112
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
113
|
+
--button-min-x-y: var(--spacing-40);
|
|
114
|
+
--icon-size: 24;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.Button-module_large__MjtVH {
|
|
118
|
+
--button-padding-x: calc(var(--spacing-24) - var(--button-border-width));
|
|
119
|
+
--button-padding-y: calc(var(--spacing-12) - var(--button-border-width));
|
|
120
|
+
--button-min-x-y: var(--spacing-48);
|
|
121
|
+
--icon-size: 24;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.Button-module_smallIconButton__4gN-i,
|
|
125
|
+
.Button-module_mediumIconButton__CEXv- {
|
|
126
|
+
--button-padding-x: calc(var(--spacing-8) - var(--button-border-width));
|
|
127
|
+
--button-padding-y: calc(var(--spacing-8) - var(--button-border-width));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.Button-module_largeIconButton__Apt33 {
|
|
131
|
+
--button-padding-x: calc(var(--spacing-12) - var(--button-border-width));
|
|
132
|
+
--button-padding-y: calc(var(--spacing-12) - var(--button-border-width));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.Button-module_secondary__Mmev0 {
|
|
136
|
+
--button-bg-color: var(--color-white);
|
|
137
|
+
--button-border-color: var(--color-gray-500);
|
|
138
|
+
--button-text-color: var(--color-purple-800);
|
|
139
|
+
|
|
140
|
+
&[data-hovered] {
|
|
141
|
+
--button-bg-color: var(--color-gray-200);
|
|
142
|
+
--button-border-color: var(--color-gray-600);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&[data-pressed] {
|
|
146
|
+
--button-bg-color: var(--color-gray-300);
|
|
147
|
+
--button-border-color: var(--color-black);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&[data-pending] {
|
|
151
|
+
--button-bg-color: var(--color-gray-300);
|
|
152
|
+
--button-border-color: var(--color-black);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.Button-module_tertiary__MJjKC {
|
|
157
|
+
--button-bg-color: transparent;
|
|
158
|
+
--button-border-color: transparent;
|
|
159
|
+
--button-text-color: var(--color-purple-800);
|
|
160
|
+
|
|
161
|
+
&[data-hovered] {
|
|
162
|
+
--button-bg-color: var(--color-gray-200);
|
|
163
|
+
--button-border-color: var(--color-gray-200);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&[data-pressed] {
|
|
167
|
+
--button-bg-color: var(--color-gray-300);
|
|
168
|
+
--button-border-color: var(--color-gray-300);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&[data-pending] {
|
|
172
|
+
--button-bg-color: var(--color-gray-300);
|
|
173
|
+
--button-border-color: var(--color-gray-300);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.Button-module_primaryReversed__m4kze,
|
|
178
|
+
.Button-module_secondaryReversed__Q435c,
|
|
179
|
+
.Button-module_tertiaryReversed__Q-UqR {
|
|
180
|
+
&[data-focus-visible]::after {
|
|
181
|
+
border-color: var(--color-blue-300);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.Button-module_primaryReversed__m4kze {
|
|
186
|
+
--button-bg-color: var(--color-white);
|
|
187
|
+
--button-border-color: var(--color-white);
|
|
188
|
+
--button-text-color: var(--color-purple-800);
|
|
189
|
+
|
|
190
|
+
&[data-hovered] {
|
|
191
|
+
--button-bg-color: var(--color-white);
|
|
192
|
+
--button-border-color: var(--color-white);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&[data-pressed] {
|
|
196
|
+
--button-bg-color: var(--color-white);
|
|
197
|
+
--button-border-color: var(--color-white);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&[data-pending] {
|
|
201
|
+
--button-bg-color: var(--color-white);
|
|
202
|
+
--button-border-color: var(--color-white);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.Button-module_secondaryReversed__Q435c {
|
|
207
|
+
--button-bg-color: transparent;
|
|
208
|
+
--button-border-color: var(--color-white);
|
|
209
|
+
--button-text-color: var(--color-white);
|
|
210
|
+
|
|
211
|
+
&[data-hovered] {
|
|
212
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.2);
|
|
213
|
+
--button-border-color: var(--color-white);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&[data-pressed] {
|
|
217
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
218
|
+
--button-border-color: var(--color-white);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&[data-pending] {
|
|
222
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
223
|
+
--button-border-color: var(--color-white);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.Button-module_tertiaryReversed__Q-UqR {
|
|
228
|
+
--button-bg-color: transparent;
|
|
229
|
+
--button-border-color: transparent;
|
|
230
|
+
--button-text-color: var(--color-white);
|
|
231
|
+
|
|
232
|
+
&[data-hovered] {
|
|
233
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.2);
|
|
234
|
+
--button-border-color: transparent;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&[data-pressed] {
|
|
238
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
239
|
+
--button-border-color: transparent;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&[data-pending] {
|
|
243
|
+
--button-bg-color: rgba(var(--color-white-rgb), 0.1);
|
|
244
|
+
--button-border-color: transparent;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.Button-module_isDisabled__m1eE- {
|
|
249
|
+
--button-bg-color: var(--color-gray-400);
|
|
250
|
+
--button-border-color: var(--color-gray-400);
|
|
251
|
+
--button-text-color: var(--color-white);
|
|
252
|
+
|
|
253
|
+
&[data-hovered] {
|
|
254
|
+
--button-bg-color: var(--color-gray-400);
|
|
255
|
+
--button-border-color: var(--color-gray-400);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.Button-module_hideContentWidth__-E94d {
|
|
260
|
+
position: absolute;
|
|
261
|
+
left: 50%;
|
|
262
|
+
top: 50%;
|
|
263
|
+
transform: translate(-50%, -50%);
|
|
264
|
+
visibility: hidden;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.Button-module_retainContentWidth__b4IEC {
|
|
268
|
+
visibility: hidden;
|
|
269
|
+
}
|
|
270
|
+
|
|
35
271
|
.MenuItem-module_item__uImZI {
|
|
36
272
|
display: block;
|
|
37
273
|
font-family: var(--typography-paragraph-body-font-family);
|
|
@@ -72,6 +308,46 @@
|
|
|
72
308
|
opacity: 0.3;
|
|
73
309
|
}
|
|
74
310
|
|
|
311
|
+
.PendingContent-module_pendingContent__c4IFS {
|
|
312
|
+
display: inline-flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
gap: var(--button-pending-content-gap, var(--spacing-6));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.PendingContent-module_large__ypTxk {
|
|
318
|
+
--button-pending-content-gap: var(--spacing-8);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.PendingContent-module_centerSpinner__EYn7L {
|
|
322
|
+
position: absolute;
|
|
323
|
+
left: 50%;
|
|
324
|
+
top: 50%;
|
|
325
|
+
transform: translate(-50%, -50%);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.ButtonContent-module_buttonContent__v5mHZ {
|
|
329
|
+
display: inline-flex;
|
|
330
|
+
align-items: center;
|
|
331
|
+
gap: var(--button-icon-gap, var(--spacing-6));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.ButtonContent-module_large__mLOdb {
|
|
335
|
+
--button-icon-gap: var(--spacing-8);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.ButtonContent-module_buttonLabel__T5XAq {
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.ButtonContent-module_buttonIcon__qkAX- {
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.Focusable-module_focusableWrapper__NfuIi {
|
|
349
|
+
display: inline-flex;
|
|
350
|
+
}
|
|
75
351
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
76
352
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
77
353
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
@@ -128,97 +404,6 @@
|
|
|
128
404
|
opacity: 1;
|
|
129
405
|
}
|
|
130
406
|
}
|
|
131
|
-
.Button-module_button__QOSYH {
|
|
132
|
-
--button-min-height-width: var(--spacing-48);
|
|
133
|
-
--button-padding-x: calc(
|
|
134
|
-
var(--spacing-12) - var(--border-solid-border-width)
|
|
135
|
-
);
|
|
136
|
-
--button-padding-y: calc(
|
|
137
|
-
var(--spacing-8) - var(--border-solid-border-width)
|
|
138
|
-
);
|
|
139
|
-
--button-icon-size: var(--spacing-24);
|
|
140
|
-
appearance: none;
|
|
141
|
-
background: transparent;
|
|
142
|
-
color: inherit;
|
|
143
|
-
font: inherit;
|
|
144
|
-
margin: 0;
|
|
145
|
-
border: none;
|
|
146
|
-
border: var(--border-solid-border-width) var(--border-solid-border-style);
|
|
147
|
-
border-radius: var(--border-solid-border-radius);
|
|
148
|
-
box-sizing: border-box;
|
|
149
|
-
display: inline-flex;
|
|
150
|
-
align-items: center;
|
|
151
|
-
justify-content: center;
|
|
152
|
-
text-align: left;
|
|
153
|
-
gap: var(--spacing-8);
|
|
154
|
-
font-family: var(--typography-button-primary-font-family);
|
|
155
|
-
font-weight: var(--typography-button-primary-font-weight);
|
|
156
|
-
font-size: var(--typography-button-primary-font-size);
|
|
157
|
-
line-height: var(--typography-button-primary-line-height);
|
|
158
|
-
min-height: var(--button-min-height-width);
|
|
159
|
-
min-width: var(--button-min-height-width);
|
|
160
|
-
outline: none;
|
|
161
|
-
position: relative;
|
|
162
|
-
padding: var(--button-padding-y) var(--button-padding-x);
|
|
163
|
-
-webkit-font-smoothing: antialiased;
|
|
164
|
-
-moz-osx-font-smoothing: grayscale;
|
|
165
|
-
}
|
|
166
|
-
.Button-module_button__QOSYH[data-focus-visible]::after {
|
|
167
|
-
content: "";
|
|
168
|
-
position: absolute;
|
|
169
|
-
background: transparent;
|
|
170
|
-
border-color: var(--color-blue-500);
|
|
171
|
-
border-radius: var(--border-focus-ring-border-radius);
|
|
172
|
-
border-width: var(--border-focus-ring-border-width);
|
|
173
|
-
border-style: var(--border-focus-ring-border-style);
|
|
174
|
-
inset: calc(-1 * (var(--border-focus-ring-border-width) * 2 + 1px));
|
|
175
|
-
}
|
|
176
|
-
.Button-module_button__QOSYH svg {
|
|
177
|
-
height: var(--button-icon-size);
|
|
178
|
-
width: var(--button-icon-size);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.Button-module_default__gSx3e {
|
|
182
|
-
border-color: var(--color-gray-500);
|
|
183
|
-
color: var(--color-purple-800);
|
|
184
|
-
}
|
|
185
|
-
.Button-module_default__gSx3e[data-hovered], .Button-module_default__gSx3e[data-focus-visible], .Button-module_default__gSx3e[data-pressed] {
|
|
186
|
-
background-color: var(--color-gray-200);
|
|
187
|
-
border-color: var(--color-purple-800);
|
|
188
|
-
}
|
|
189
|
-
.Button-module_default__gSx3e[data-disabled] {
|
|
190
|
-
opacity: 0.3;
|
|
191
|
-
}
|
|
192
|
-
.Button-module_default__gSx3e.Button-module_reversed__DT-Id {
|
|
193
|
-
background-color: transparent;
|
|
194
|
-
border-color: rgba(var(--color-white-rgb), 0.65);
|
|
195
|
-
color: var(--color-white);
|
|
196
|
-
}
|
|
197
|
-
.Button-module_default__gSx3e.Button-module_reversed__DT-Id[data-hovered], .Button-module_default__gSx3e.Button-module_reversed__DT-Id[data-focus-visible] {
|
|
198
|
-
background-color: rgba(var(--color-white-rgb), 0.1);
|
|
199
|
-
border-color: var(--color-white);
|
|
200
|
-
}
|
|
201
|
-
.Button-module_default__gSx3e.Button-module_reversed__DT-Id[data-focus-visible]::after {
|
|
202
|
-
border-color: var(--color-blue-300);
|
|
203
|
-
}
|
|
204
|
-
.Button-module_default__gSx3e.Button-module_reversed__DT-Id[data-disabled]::after {
|
|
205
|
-
border-color: var(--color-gray-400);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.Button-module_small__S-t5B {
|
|
209
|
-
--button-min-height-width: 2.5rem;
|
|
210
|
-
--button-padding-x: calc(
|
|
211
|
-
var(--spacing-8) - var(--border-solid-border-width)
|
|
212
|
-
);
|
|
213
|
-
--button-padding-y: calc(
|
|
214
|
-
var(--spacing-8) - var(--border-solid-border-width)
|
|
215
|
-
);
|
|
216
|
-
--button-icon-size: var(--spacing-16);
|
|
217
|
-
gap: var(--spacing-8);
|
|
218
|
-
}
|
|
219
|
-
.Focusable-module_focusableWrapper__NfuIi {
|
|
220
|
-
display: inline-flex;
|
|
221
|
-
}
|
|
222
407
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
223
408
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
224
409
|
.OverlayArrow-module_overlayArrow__hoDyK {
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ButtonProps as RACButtonProps } from "react-aria-components";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import { ButtonSizes, ButtonVariants, PendingButtonProps } from "./types";
|
|
4
|
+
type ButtonBaseProps = Omit<RACButtonProps, "children"> & {
|
|
5
|
+
/** Used as the label for the button. */
|
|
6
|
+
children: RACButtonProps["children"];
|
|
7
|
+
/** Visually hides the Button's child content used as the label and the `pendingLabel`. Use for icon-only `Button`. @default "false" */
|
|
8
|
+
hasHiddenLabel?: boolean;
|
|
4
9
|
/** The visual style of the button.
|
|
5
10
|
* @default "default" */
|
|
6
11
|
variant?: ButtonVariants;
|
|
7
12
|
/** The visual size of the button. `medium` was formerly `regular`
|
|
8
13
|
* @default "medium" */
|
|
9
|
-
size?:
|
|
14
|
+
size?: ButtonSizes;
|
|
15
|
+
/** Renders an icon at the `iconPosition` provided. To the size scales with the button, we recommend using the `Icon` component from `"@kaizen/components/future"` */
|
|
16
|
+
icon?: JSX.Element;
|
|
17
|
+
/** Controls the position of the Icon passed in as props. @default "start" */
|
|
18
|
+
iconPosition?: "start" | "end";
|
|
19
|
+
/** Controls if the button inherits width from its parent. @default "false" */
|
|
20
|
+
isFullWidth?: boolean;
|
|
10
21
|
};
|
|
11
|
-
export
|
|
22
|
+
export type ButtonProps = ButtonBaseProps & PendingButtonProps;
|
|
23
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { ButtonProps } from "../../Button";
|
|
3
|
+
type ButtonContentProps = {
|
|
4
|
+
size?: ButtonProps["size"];
|
|
5
|
+
icon?: ButtonProps["icon"];
|
|
6
|
+
iconPosition?: ButtonProps["iconPosition"];
|
|
7
|
+
hasHiddenLabel?: ButtonProps["hasHiddenLabel"];
|
|
8
|
+
} & HTMLAttributes<HTMLSpanElement>;
|
|
9
|
+
/** Renders the inner content of the button, handling icon and label visibility */
|
|
10
|
+
export declare const ButtonContent: ({ children, hasHiddenLabel, size, icon, iconPosition, className, ...restProps }: ButtonContentProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ButtonContent";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ButtonSizes, PendingProps } from "../../types";
|
|
2
|
+
/** Renders the pending content of the button, handling pending label visibility and spinner positioning */
|
|
3
|
+
export declare const PendingContent: ({ pendingLabel, hasHiddenPendingLabel, size, }: PendingProps & {
|
|
4
|
+
size?: ButtonSizes;
|
|
5
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PendingContent";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ButtonVariants = "primary" | "secondary" | "tertiary";
|
|
2
|
+
export type ButtonSizes = "small" | "medium" | "large";
|
|
3
|
+
export type PendingPropsUndefined = {
|
|
4
|
+
isPending?: undefined;
|
|
5
|
+
/** Rendered as the child while `isPending` is `true`. This determines the accessible label for the Button while pending. */
|
|
6
|
+
pendingLabel?: never;
|
|
7
|
+
/** Visually hides the `pendingLabel` and renders the loading spinner. This will maintain the width of the Button's `children` to avoid layout shifts.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
hasHiddenPendingLabel?: never;
|
|
11
|
+
};
|
|
12
|
+
export type PendingProps = {
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
/** Rendered as the child while `pendingLabel` is `true`. This determines the accessible label for the Button while pending. */
|
|
15
|
+
pendingLabel: string;
|
|
16
|
+
/** Visually Hides the `pendingLabel` and renders the loading spinner. This will maintain the width of the Button's `children` to avoid layout shifts.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
hasHiddenPendingLabel?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type PendingButtonProps = PendingProps | PendingPropsUndefined;
|