@trackunit/react-components 2.13.0 → 2.13.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/index.cjs.js +579 -468
- package/index.esm.js +580 -469
- package/package.json +6 -6
- package/src/components/Alert/Alert.variants.d.ts +220 -21
- package/src/components/Badge/Badge.variants.d.ts +82 -6
- package/src/components/Breadcrumb/Breadcrumb.variant.d.ts +45 -6
- package/src/components/Card/Card.variants.d.ts +202 -20
- package/src/components/Clickable/Clickable.variants.d.ts +27 -3
- package/src/components/Collapse/Collapse.variants.d.ts +248 -24
- package/src/components/CopyableText/CopyableText.variants.d.ts +41 -4
- package/src/components/DetailsList/DetailsList.variants.d.ts +30 -4
- package/src/components/EmptyState/EmptyState.variants.d.ts +12 -2
- package/src/components/EmptyValue/EmptyValue.variants.d.ts +6 -1
- package/src/components/ExternalLink/ExternalLink.variants.d.ts +27 -3
- package/src/components/Heading/Heading.variants.d.ts +66 -5
- package/src/components/Highlight/Highlight.variants.d.ts +59 -5
- package/src/components/HorizontalOverflowScroller/HorizontalOverflowScroller.variants.d.ts +12 -2
- package/src/components/HorizontalOverflowScroller/OverflowIndicator.variants.d.ts +56 -8
- package/src/components/Icon/Icon.variants.d.ts +174 -5
- package/src/components/Indicator/Indicator.variants.d.ts +340 -14
- package/src/components/InteractableItem/InteractableItem.variants.d.ts +95 -6
- package/src/components/KPI/KPI.variants.d.ts +66 -6
- package/src/components/KPICard/KPICard.variants.d.ts +84 -9
- package/src/components/LabeledValue/LabeledValue.variants.d.ts +72 -9
- package/src/components/List/List.variants.d.ts +81 -8
- package/src/components/ListItem/ListItem.variants.d.ts +64 -10
- package/src/components/Menu/MenuContent/MenuContent.variants.d.ts +51 -7
- package/src/components/Menu/MenuItem/MenuItem.variants.d.ts +224 -20
- package/src/components/Menu/MoreMenu/MoreMenu.variants.d.ts +6 -1
- package/src/components/Notice/Notice.variants.d.ts +92 -8
- package/src/components/Page/Page.variants.d.ts +63 -6
- package/src/components/Page/PageContent.d.ts +4 -0
- package/src/components/PageHeader/PageHeader.variants.d.ts +34 -5
- package/src/components/Pagination/Pagination.variants.d.ts +12 -2
- package/src/components/Popover/Popover.variants.d.ts +34 -5
- package/src/components/PreferenceCard/PreferenceCard.variants.d.ts +187 -20
- package/src/components/Sheet/Sheet.variants.d.ts +101 -10
- package/src/components/Sidebar/Sidebar.variants.d.ts +43 -4
- package/src/components/SidebarContentLayout/SidebarContentLayout.variants.d.ts +111 -9
- package/src/components/Skeleton/Skeleton.variants.d.ts +55 -3
- package/src/components/SkeletonLines/SkeletonLines.variants.d.ts +6 -1
- package/src/components/Spacer/Spacer.variants.d.ts +44 -4
- package/src/components/Spinner/Spinner.variants.d.ts +100 -10
- package/src/components/Tabs/Tabs.variants.d.ts +45 -6
- package/src/components/Tag/Tag.variants.d.ts +157 -11
- package/src/components/Text/Text.variants.d.ts +127 -11
- package/src/components/ToggleGroup/ToggleGroup.variants.d.ts +178 -17
- package/src/components/Tooltip/Tooltip.variants.d.ts +135 -12
- package/src/components/ValueBar/SegmentedValueBar.variants.d.ts +57 -6
- package/src/components/ValueBar/ValueBar.shared.d.ts +27 -3
- package/src/components/ValueBar/ValueBar.variants.d.ts +30 -3
- package/src/components/ZStack/ZStack.variants.d.ts +12 -2
- package/src/components/buttons/shared/Button.variants.d.ts +389 -20
|
@@ -1,20 +1,389 @@
|
|
|
1
|
-
export declare const cvaButton: (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
export declare const cvaButton: import("cva").CVAComponent<Omit<{
|
|
2
|
+
base: string[];
|
|
3
|
+
variants: {
|
|
4
|
+
variant: {
|
|
5
|
+
primary: string[];
|
|
6
|
+
"primary-danger": string[];
|
|
7
|
+
secondary: string[];
|
|
8
|
+
"secondary-danger": string[];
|
|
9
|
+
ghost: string[];
|
|
10
|
+
"ghost-neutral": string[];
|
|
11
|
+
filled: string[];
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
/**
|
|
15
|
+
* TLDR; Calculating min-height so button sizes are (more) consistently sized.
|
|
16
|
+
*
|
|
17
|
+
* OK. let me explain this one.
|
|
18
|
+
* min-h here is to match the height of a button that has text inside
|
|
19
|
+
* We could just use the same min-h-[var(--line-height-sm)]) for all sizes
|
|
20
|
+
* but then the button would be too small since button is using box-sizing: border-box
|
|
21
|
+
* and what we really want is to make sure it's _content_ is the same height as a
|
|
22
|
+
* button with text inside.
|
|
23
|
+
* We could then change the box-sizing to content-box but that would break other things
|
|
24
|
+
* and be inconsistent with almost all everything else.
|
|
25
|
+
*
|
|
26
|
+
* So we need to add padding to the min-height calculation. Two times the vertical
|
|
27
|
+
* padding aka py-1 * 2 aka --spacing-1 * 2 aka spacing-2 (for small).
|
|
28
|
+
*/
|
|
29
|
+
small: string[];
|
|
30
|
+
medium: string[];
|
|
31
|
+
large: string[];
|
|
32
|
+
};
|
|
33
|
+
fullWidth: {
|
|
34
|
+
true: string[];
|
|
35
|
+
false: never[];
|
|
36
|
+
};
|
|
37
|
+
square: {
|
|
38
|
+
true: string;
|
|
39
|
+
false: string;
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
true: string[];
|
|
43
|
+
false: never[];
|
|
44
|
+
};
|
|
45
|
+
loading: {
|
|
46
|
+
true: string[];
|
|
47
|
+
false: never[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
compoundVariants: ({
|
|
51
|
+
square: true;
|
|
52
|
+
size: "small";
|
|
53
|
+
className: "p-1"[];
|
|
54
|
+
loading?: undefined;
|
|
55
|
+
variant?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
square: true;
|
|
58
|
+
size: "medium";
|
|
59
|
+
className: "p-1.5"[];
|
|
60
|
+
loading?: undefined;
|
|
61
|
+
variant?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
square: true;
|
|
64
|
+
size: "large";
|
|
65
|
+
className: "p-2"[];
|
|
66
|
+
loading?: undefined;
|
|
67
|
+
variant?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
loading: true;
|
|
70
|
+
variant: "primary";
|
|
71
|
+
className: "disabled:bg-primary-600"[];
|
|
72
|
+
square?: undefined;
|
|
73
|
+
size?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
loading: true;
|
|
76
|
+
variant: "primary-danger";
|
|
77
|
+
className: "disabled:bg-danger-600"[];
|
|
78
|
+
square?: undefined;
|
|
79
|
+
size?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
loading: true;
|
|
82
|
+
variant: "secondary";
|
|
83
|
+
className: "disabled:bg-white"[];
|
|
84
|
+
square?: undefined;
|
|
85
|
+
size?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
loading: true;
|
|
88
|
+
variant: "secondary-danger";
|
|
89
|
+
className: ("disabled:bg-white" | "disabled:border-neutral-300")[];
|
|
90
|
+
square?: undefined;
|
|
91
|
+
size?: undefined;
|
|
92
|
+
})[];
|
|
93
|
+
defaultVariants: {
|
|
94
|
+
variant: "primary";
|
|
95
|
+
size: "medium";
|
|
96
|
+
fullWidth: false;
|
|
97
|
+
square: false;
|
|
98
|
+
disabled: false;
|
|
99
|
+
};
|
|
100
|
+
}, "defaultVariants"> & {
|
|
101
|
+
variants: {
|
|
102
|
+
variant: {
|
|
103
|
+
primary: string[];
|
|
104
|
+
"primary-danger": string[];
|
|
105
|
+
secondary: string[];
|
|
106
|
+
"secondary-danger": string[];
|
|
107
|
+
ghost: string[];
|
|
108
|
+
"ghost-neutral": string[];
|
|
109
|
+
filled: string[];
|
|
110
|
+
};
|
|
111
|
+
size: {
|
|
112
|
+
/**
|
|
113
|
+
* TLDR; Calculating min-height so button sizes are (more) consistently sized.
|
|
114
|
+
*
|
|
115
|
+
* OK. let me explain this one.
|
|
116
|
+
* min-h here is to match the height of a button that has text inside
|
|
117
|
+
* We could just use the same min-h-[var(--line-height-sm)]) for all sizes
|
|
118
|
+
* but then the button would be too small since button is using box-sizing: border-box
|
|
119
|
+
* and what we really want is to make sure it's _content_ is the same height as a
|
|
120
|
+
* button with text inside.
|
|
121
|
+
* We could then change the box-sizing to content-box but that would break other things
|
|
122
|
+
* and be inconsistent with almost all everything else.
|
|
123
|
+
*
|
|
124
|
+
* So we need to add padding to the min-height calculation. Two times the vertical
|
|
125
|
+
* padding aka py-1 * 2 aka --spacing-1 * 2 aka spacing-2 (for small).
|
|
126
|
+
*/
|
|
127
|
+
small: string[];
|
|
128
|
+
medium: string[];
|
|
129
|
+
large: string[];
|
|
130
|
+
};
|
|
131
|
+
fullWidth: {
|
|
132
|
+
true: string[];
|
|
133
|
+
false: never[];
|
|
134
|
+
};
|
|
135
|
+
square: {
|
|
136
|
+
true: string;
|
|
137
|
+
false: string;
|
|
138
|
+
};
|
|
139
|
+
disabled: {
|
|
140
|
+
true: string[];
|
|
141
|
+
false: never[];
|
|
142
|
+
};
|
|
143
|
+
loading: {
|
|
144
|
+
true: string[];
|
|
145
|
+
false: never[];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
defaultVariants: Omit<{}, "size" | "disabled" | "square" | "variant" | "fullWidth"> & {
|
|
149
|
+
variant: "primary";
|
|
150
|
+
size: "medium";
|
|
151
|
+
fullWidth: false;
|
|
152
|
+
square: false;
|
|
153
|
+
disabled: false;
|
|
154
|
+
};
|
|
155
|
+
}, {
|
|
156
|
+
variant: {
|
|
157
|
+
primary: string[];
|
|
158
|
+
"primary-danger": string[];
|
|
159
|
+
secondary: string[];
|
|
160
|
+
"secondary-danger": string[];
|
|
161
|
+
ghost: string[];
|
|
162
|
+
"ghost-neutral": string[];
|
|
163
|
+
filled: string[];
|
|
164
|
+
};
|
|
165
|
+
size: {
|
|
166
|
+
/**
|
|
167
|
+
* TLDR; Calculating min-height so button sizes are (more) consistently sized.
|
|
168
|
+
*
|
|
169
|
+
* OK. let me explain this one.
|
|
170
|
+
* min-h here is to match the height of a button that has text inside
|
|
171
|
+
* We could just use the same min-h-[var(--line-height-sm)]) for all sizes
|
|
172
|
+
* but then the button would be too small since button is using box-sizing: border-box
|
|
173
|
+
* and what we really want is to make sure it's _content_ is the same height as a
|
|
174
|
+
* button with text inside.
|
|
175
|
+
* We could then change the box-sizing to content-box but that would break other things
|
|
176
|
+
* and be inconsistent with almost all everything else.
|
|
177
|
+
*
|
|
178
|
+
* So we need to add padding to the min-height calculation. Two times the vertical
|
|
179
|
+
* padding aka py-1 * 2 aka --spacing-1 * 2 aka spacing-2 (for small).
|
|
180
|
+
*/
|
|
181
|
+
small: string[];
|
|
182
|
+
medium: string[];
|
|
183
|
+
large: string[];
|
|
184
|
+
};
|
|
185
|
+
fullWidth: {
|
|
186
|
+
true: string[];
|
|
187
|
+
false: never[];
|
|
188
|
+
};
|
|
189
|
+
square: {
|
|
190
|
+
true: string;
|
|
191
|
+
false: string;
|
|
192
|
+
};
|
|
193
|
+
disabled: {
|
|
194
|
+
true: string[];
|
|
195
|
+
false: never[];
|
|
196
|
+
};
|
|
197
|
+
loading: {
|
|
198
|
+
true: string[];
|
|
199
|
+
false: never[];
|
|
200
|
+
};
|
|
201
|
+
}>;
|
|
202
|
+
export declare const cvaButtonSpinnerContainer: import("cva").CVAComponent<Omit<{
|
|
203
|
+
base: string[];
|
|
204
|
+
}, "defaultVariants"> & {
|
|
205
|
+
variants: unknown;
|
|
206
|
+
defaultVariants: Omit<{}, never>;
|
|
207
|
+
}, unknown>;
|
|
208
|
+
export declare const cvaButtonSpinner: import("cva").CVAComponent<Omit<{
|
|
209
|
+
base: never[];
|
|
210
|
+
variants: {
|
|
211
|
+
variant: {
|
|
212
|
+
primary: string[];
|
|
213
|
+
"primary-danger": string[];
|
|
214
|
+
secondary: string[];
|
|
215
|
+
"secondary-danger": string[];
|
|
216
|
+
ghost: never[];
|
|
217
|
+
"ghost-neutral": never[];
|
|
218
|
+
filled: never[];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
defaultVariants: {
|
|
222
|
+
variant: "primary";
|
|
223
|
+
};
|
|
224
|
+
}, "defaultVariants"> & {
|
|
225
|
+
variants: {
|
|
226
|
+
variant: {
|
|
227
|
+
primary: string[];
|
|
228
|
+
"primary-danger": string[];
|
|
229
|
+
secondary: string[];
|
|
230
|
+
"secondary-danger": string[];
|
|
231
|
+
ghost: never[];
|
|
232
|
+
"ghost-neutral": never[];
|
|
233
|
+
filled: never[];
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
defaultVariants: Omit<{}, "variant"> & {
|
|
237
|
+
variant: "primary";
|
|
238
|
+
};
|
|
239
|
+
}, {
|
|
240
|
+
variant: {
|
|
241
|
+
primary: string[];
|
|
242
|
+
"primary-danger": string[];
|
|
243
|
+
secondary: string[];
|
|
244
|
+
"secondary-danger": string[];
|
|
245
|
+
ghost: never[];
|
|
246
|
+
"ghost-neutral": never[];
|
|
247
|
+
filled: never[];
|
|
248
|
+
};
|
|
249
|
+
}>;
|
|
250
|
+
export declare const cvaButtonPrefixSuffix: import("cva").CVAComponent<Omit<{
|
|
251
|
+
base: string[];
|
|
252
|
+
variants: {
|
|
253
|
+
size: {
|
|
254
|
+
small: string[];
|
|
255
|
+
medium: string[];
|
|
256
|
+
large: string[];
|
|
257
|
+
};
|
|
258
|
+
variant: {
|
|
259
|
+
primary: never[];
|
|
260
|
+
"primary-danger": never[];
|
|
261
|
+
secondary: string[];
|
|
262
|
+
"secondary-danger": never[];
|
|
263
|
+
ghost: never[];
|
|
264
|
+
"ghost-neutral": string[];
|
|
265
|
+
filled: never[];
|
|
266
|
+
};
|
|
267
|
+
disabled: {
|
|
268
|
+
true: never[];
|
|
269
|
+
false: never[];
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
compoundVariants: ({
|
|
273
|
+
variant: "secondary";
|
|
274
|
+
disabled: true;
|
|
275
|
+
className: ("text-neutral-400" | "group-focus:text-neutral-400" | "group-hover:text-neutral-400" | "group-active:text-neutral-400")[];
|
|
276
|
+
} | {
|
|
277
|
+
variant: "ghost-neutral";
|
|
278
|
+
disabled: true;
|
|
279
|
+
className: ("text-neutral-300" | "group-focus:text-neutral-300" | "group-hover:text-neutral-300" | "group-active:text-neutral-300")[];
|
|
280
|
+
} | {
|
|
281
|
+
variant: "ghost";
|
|
282
|
+
disabled: true;
|
|
283
|
+
className: ("text-neutral-300" | "group-focus:text-neutral-300" | "group-hover:text-neutral-300" | "group-active:text-neutral-300")[];
|
|
284
|
+
})[];
|
|
285
|
+
defaultVariants: {
|
|
286
|
+
size: "medium";
|
|
287
|
+
variant: "primary";
|
|
288
|
+
disabled: false;
|
|
289
|
+
};
|
|
290
|
+
}, "defaultVariants"> & {
|
|
291
|
+
variants: {
|
|
292
|
+
size: {
|
|
293
|
+
small: string[];
|
|
294
|
+
medium: string[];
|
|
295
|
+
large: string[];
|
|
296
|
+
};
|
|
297
|
+
variant: {
|
|
298
|
+
primary: never[];
|
|
299
|
+
"primary-danger": never[];
|
|
300
|
+
secondary: string[];
|
|
301
|
+
"secondary-danger": never[];
|
|
302
|
+
ghost: never[];
|
|
303
|
+
"ghost-neutral": string[];
|
|
304
|
+
filled: never[];
|
|
305
|
+
};
|
|
306
|
+
disabled: {
|
|
307
|
+
true: never[];
|
|
308
|
+
false: never[];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
defaultVariants: Omit<{}, "size" | "disabled" | "variant"> & {
|
|
312
|
+
size: "medium";
|
|
313
|
+
variant: "primary";
|
|
314
|
+
disabled: false;
|
|
315
|
+
};
|
|
316
|
+
}, {
|
|
317
|
+
size: {
|
|
318
|
+
small: string[];
|
|
319
|
+
medium: string[];
|
|
320
|
+
large: string[];
|
|
321
|
+
};
|
|
322
|
+
variant: {
|
|
323
|
+
primary: never[];
|
|
324
|
+
"primary-danger": never[];
|
|
325
|
+
secondary: string[];
|
|
326
|
+
"secondary-danger": never[];
|
|
327
|
+
ghost: never[];
|
|
328
|
+
"ghost-neutral": string[];
|
|
329
|
+
filled: never[];
|
|
330
|
+
};
|
|
331
|
+
disabled: {
|
|
332
|
+
true: never[];
|
|
333
|
+
false: never[];
|
|
334
|
+
};
|
|
335
|
+
}>;
|
|
336
|
+
export declare const cvaIconButton: import("cva").CVAComponent<Omit<{
|
|
337
|
+
base: never[];
|
|
338
|
+
variants: {
|
|
339
|
+
size: {
|
|
340
|
+
/**
|
|
341
|
+
* Sized to match a single text line (20px) so the button fits inside
|
|
342
|
+
* fixed-height contexts like table rows without clipping its hover state.
|
|
343
|
+
*
|
|
344
|
+
* `min-h-5` is what makes this an icon-only step: it overrides the
|
|
345
|
+
* text-height floor `cvaButton` applies for every size on its own scale.
|
|
346
|
+
*/
|
|
347
|
+
extraSmall: string[];
|
|
348
|
+
small: string[];
|
|
349
|
+
medium: string[];
|
|
350
|
+
large: string[];
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
defaultVariants: {
|
|
354
|
+
size: "medium";
|
|
355
|
+
};
|
|
356
|
+
}, "defaultVariants"> & {
|
|
357
|
+
variants: {
|
|
358
|
+
size: {
|
|
359
|
+
/**
|
|
360
|
+
* Sized to match a single text line (20px) so the button fits inside
|
|
361
|
+
* fixed-height contexts like table rows without clipping its hover state.
|
|
362
|
+
*
|
|
363
|
+
* `min-h-5` is what makes this an icon-only step: it overrides the
|
|
364
|
+
* text-height floor `cvaButton` applies for every size on its own scale.
|
|
365
|
+
*/
|
|
366
|
+
extraSmall: string[];
|
|
367
|
+
small: string[];
|
|
368
|
+
medium: string[];
|
|
369
|
+
large: string[];
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
defaultVariants: Omit<{}, "size"> & {
|
|
373
|
+
size: "medium";
|
|
374
|
+
};
|
|
375
|
+
}, {
|
|
376
|
+
size: {
|
|
377
|
+
/**
|
|
378
|
+
* Sized to match a single text line (20px) so the button fits inside
|
|
379
|
+
* fixed-height contexts like table rows without clipping its hover state.
|
|
380
|
+
*
|
|
381
|
+
* `min-h-5` is what makes this an icon-only step: it overrides the
|
|
382
|
+
* text-height floor `cvaButton` applies for every size on its own scale.
|
|
383
|
+
*/
|
|
384
|
+
extraSmall: string[];
|
|
385
|
+
small: string[];
|
|
386
|
+
medium: string[];
|
|
387
|
+
large: string[];
|
|
388
|
+
};
|
|
389
|
+
}>;
|