@eqtylab/equality 1.9.0 → 2.0.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/dist/alert.module.module.css.module.css +19 -45
- package/dist/index.cjs +195 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24
- package/dist/index.d.ts +32 -24
- package/dist/index.js +193 -139
- package/dist/index.js.map +1 -1
- package/dist/table-components.module.module.css.module.css +34 -14
- package/dist/theme.module.module.css.module.css +11 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as React16 from 'react';
|
|
2
2
|
import { forwardRef, useRef, useMemo, useEffect, useSyncExternalStore, useState } from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import
|
|
4
|
+
import styles2 from './alert.module.module.css.module.css';
|
|
5
|
+
import * as LucideIcons from 'lucide-react';
|
|
6
|
+
import { Check, ChevronRight, Circle, ChevronDown, ChevronUp, X, SearchIcon, CalendarDays, ChevronLeft, Grid3X3, List, AlertOctagon, Home, Search, ArrowUp, ArrowDown, ArrowUpDown, TriangleAlert } from 'lucide-react';
|
|
7
|
+
import styles from './icon.module.module.css.module.css';
|
|
5
8
|
import { clsx } from 'clsx';
|
|
6
9
|
import { twMerge } from 'tailwind-merge';
|
|
7
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
11
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
9
|
-
import
|
|
12
|
+
import styles4 from './alert-dialog.module.module.css.module.css';
|
|
10
13
|
import { Slot } from '@radix-ui/react-slot';
|
|
11
|
-
import
|
|
14
|
+
import styles3 from './button.module.module.css.module.css';
|
|
12
15
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
13
|
-
import
|
|
14
|
-
import * as LucideIcons from 'lucide-react';
|
|
15
|
-
import { Check, ChevronRight, Circle, ChevronDown, ChevronUp, X, SearchIcon, CalendarDays, ChevronLeft, Grid3X3, List, AlertOctagon, Home, Search, ArrowUp, ArrowDown, ArrowUpDown, TriangleAlert } from 'lucide-react';
|
|
16
|
+
import styles5 from './avatar.module.module.css.module.css';
|
|
16
17
|
import styles7 from './badge.module.module.css.module.css';
|
|
17
|
-
import styles5 from './icon.module.module.css.module.css';
|
|
18
18
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
19
19
|
import styles6 from './tooltip.module.module.css.module.css';
|
|
20
20
|
import styles8 from './bar-graph.module.module.css.module.css';
|
|
@@ -94,47 +94,164 @@ import styles60 from './control-status-badge.module.module.css.module.css';
|
|
|
94
94
|
import styles61 from './theme.module.module.css.module.css';
|
|
95
95
|
|
|
96
96
|
// src/components/alert/alert.tsx
|
|
97
|
+
var ELEVATION = {
|
|
98
|
+
SUNKEN: "sunken",
|
|
99
|
+
BASE: "base",
|
|
100
|
+
RAISED: "raised",
|
|
101
|
+
OVERLAY: "overlay"
|
|
102
|
+
};
|
|
103
|
+
var generateElevationVariants = (styles62, baseClassName, defaultElevation) => {
|
|
104
|
+
const classNames = {};
|
|
105
|
+
Object.values(ELEVATION).forEach((elevation) => {
|
|
106
|
+
classNames[elevation] = styles62[`${baseClassName}--${elevation}`];
|
|
107
|
+
});
|
|
108
|
+
const variants = cva(styles62[baseClassName], {
|
|
109
|
+
variants: {
|
|
110
|
+
elevation: classNames
|
|
111
|
+
},
|
|
112
|
+
defaultVariants: {
|
|
113
|
+
elevation: defaultElevation
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return variants;
|
|
117
|
+
};
|
|
118
|
+
var getRelativeElevation = (elevation, offset) => {
|
|
119
|
+
const elevationIndex = Object.values(ELEVATION).indexOf(elevation);
|
|
120
|
+
const newElevationIndex = elevationIndex + offset;
|
|
121
|
+
const relativeElevation = Object.values(ELEVATION)[newElevationIndex];
|
|
122
|
+
if (!relativeElevation) {
|
|
123
|
+
console.warn(`Invalid elevation offset: from ${elevation} with offset ${offset}`);
|
|
124
|
+
}
|
|
125
|
+
return relativeElevation || elevation;
|
|
126
|
+
};
|
|
97
127
|
function cn(...inputs) {
|
|
98
128
|
return twMerge(clsx(inputs));
|
|
99
129
|
}
|
|
100
130
|
function getThemeProviderRoot() {
|
|
101
131
|
return document.getElementById("equality-theme-provider-root-portal");
|
|
102
132
|
}
|
|
103
|
-
var
|
|
133
|
+
var iconVariants = cva(styles["icon-container"], {
|
|
134
|
+
variants: {
|
|
135
|
+
size: {
|
|
136
|
+
xs: styles["size--xs"],
|
|
137
|
+
sm: styles["size--sm"],
|
|
138
|
+
md: styles["size--md"],
|
|
139
|
+
lg: styles["size--lg"]
|
|
140
|
+
},
|
|
141
|
+
background: {
|
|
142
|
+
square: styles["background--square"],
|
|
143
|
+
circle: styles["background--circle"],
|
|
144
|
+
transparent: styles["background--transparent"]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
defaultVariants: {
|
|
148
|
+
size: "md",
|
|
149
|
+
background: "transparent"
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
var iconElevationVariants = generateElevationVariants(styles, "icon-container", ELEVATION.RAISED);
|
|
153
|
+
var Icon = forwardRef(
|
|
154
|
+
({ className, size, background, icon, elevation = ELEVATION.RAISED, ...props }, ref) => {
|
|
155
|
+
let renderedIcon;
|
|
156
|
+
if (typeof icon === "string") {
|
|
157
|
+
const LucideIcon = LucideIcons[icon];
|
|
158
|
+
if (!LucideIcon) {
|
|
159
|
+
throw new Error(`Icon "${icon}" not found in lucide-react`);
|
|
160
|
+
}
|
|
161
|
+
renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles["icon"]) });
|
|
162
|
+
} else if (React16.isValidElement(icon)) {
|
|
163
|
+
const existingProps = icon.props;
|
|
164
|
+
renderedIcon = React16.cloneElement(
|
|
165
|
+
icon,
|
|
166
|
+
{
|
|
167
|
+
...existingProps,
|
|
168
|
+
className: cn(styles["icon"], existingProps.className)
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
} else {
|
|
172
|
+
throw new Error("Icon must be either a string (Lucide icon name) or a React element");
|
|
173
|
+
}
|
|
174
|
+
return /* @__PURE__ */ jsx(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
ref,
|
|
178
|
+
className: cn(
|
|
179
|
+
iconVariants({ size, background }),
|
|
180
|
+
iconElevationVariants({ elevation }),
|
|
181
|
+
className
|
|
182
|
+
),
|
|
183
|
+
...props,
|
|
184
|
+
children: renderedIcon
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
Icon.displayName = "Icon";
|
|
190
|
+
var alertVariants = cva(styles2["alert"], {
|
|
104
191
|
variants: {
|
|
105
192
|
variant: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
193
|
+
primary: styles2["alert--primary"],
|
|
194
|
+
neutral: styles2["alert--neutral"],
|
|
195
|
+
success: styles2["alert--success"],
|
|
196
|
+
warning: styles2["alert--warning"],
|
|
197
|
+
danger: styles2["alert--danger"]
|
|
110
198
|
}
|
|
111
199
|
},
|
|
112
200
|
defaultVariants: {
|
|
113
|
-
variant: "
|
|
201
|
+
variant: "primary"
|
|
114
202
|
}
|
|
115
203
|
});
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
204
|
+
var defaultVariantIcons = {
|
|
205
|
+
success: "Check",
|
|
206
|
+
warning: "OctagonAlert",
|
|
207
|
+
danger: "TriangleAlert"
|
|
208
|
+
};
|
|
209
|
+
var Alert = React16.forwardRef(
|
|
210
|
+
({ className, variant, title, description, icon, ...props }, ref) => {
|
|
211
|
+
const effectiveIcon = icon === void 0 ? variant ? defaultVariantIcons[variant] : void 0 : icon;
|
|
212
|
+
return /* @__PURE__ */ jsxs(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
ref,
|
|
216
|
+
role: "alert",
|
|
217
|
+
className: cn(
|
|
218
|
+
alertVariants({ variant }),
|
|
219
|
+
effectiveIcon ? styles2["alert--with-icon"] : "",
|
|
220
|
+
className
|
|
221
|
+
),
|
|
222
|
+
...props,
|
|
223
|
+
children: [
|
|
224
|
+
effectiveIcon ? /* @__PURE__ */ jsx(
|
|
225
|
+
Icon,
|
|
226
|
+
{
|
|
227
|
+
icon: effectiveIcon,
|
|
228
|
+
size: "sm",
|
|
229
|
+
background: "transparent",
|
|
230
|
+
className: styles2["alert-icon"]
|
|
231
|
+
}
|
|
232
|
+
) : null,
|
|
233
|
+
/* @__PURE__ */ jsx("h4", { className: styles2["alert-title"], children: title }),
|
|
234
|
+
/* @__PURE__ */ jsx("p", { className: styles2["alert-description"], children: description })
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
120
239
|
);
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
AlertDescription.displayName = "AlertDescription";
|
|
124
|
-
var buttonVariants = cva(styles2["button"], {
|
|
240
|
+
Alert.displayName = "Alert";
|
|
241
|
+
var buttonVariants = cva(styles3["button"], {
|
|
125
242
|
variants: {
|
|
126
243
|
variant: {
|
|
127
|
-
primary:
|
|
128
|
-
danger:
|
|
129
|
-
secondary:
|
|
130
|
-
tertiary:
|
|
131
|
-
link:
|
|
132
|
-
navigation:
|
|
244
|
+
primary: styles3["button--primary"],
|
|
245
|
+
danger: styles3["button--danger"],
|
|
246
|
+
secondary: styles3["button--secondary"],
|
|
247
|
+
tertiary: styles3["button--tertiary"],
|
|
248
|
+
link: styles3["button--link"],
|
|
249
|
+
navigation: styles3["button--navigation"]
|
|
133
250
|
},
|
|
134
251
|
size: {
|
|
135
|
-
sm:
|
|
136
|
-
md:
|
|
137
|
-
lg:
|
|
252
|
+
sm: styles3["size--sm"],
|
|
253
|
+
md: styles3["size--md"],
|
|
254
|
+
lg: styles3["size--lg"]
|
|
138
255
|
}
|
|
139
256
|
},
|
|
140
257
|
defaultVariants: {
|
|
@@ -188,7 +305,7 @@ var AlertDialogPortal = ({ children }) => /* @__PURE__ */ jsx(AlertDialogPrimiti
|
|
|
188
305
|
var AlertDialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
189
306
|
AlertDialogPrimitive.Overlay,
|
|
190
307
|
{
|
|
191
|
-
className: cn(
|
|
308
|
+
className: cn(styles4["alert-dialog-overlay"], className),
|
|
192
309
|
...props,
|
|
193
310
|
ref
|
|
194
311
|
}
|
|
@@ -200,21 +317,21 @@ var AlertDialogContent = React16.forwardRef(({ className, ...props }, ref) => /*
|
|
|
200
317
|
AlertDialogPrimitive.Content,
|
|
201
318
|
{
|
|
202
319
|
ref,
|
|
203
|
-
className: cn(
|
|
320
|
+
className: cn(styles4["alert-dialog-content"], className),
|
|
204
321
|
...props
|
|
205
322
|
}
|
|
206
323
|
)
|
|
207
324
|
] }));
|
|
208
325
|
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
209
|
-
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
326
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles4["alert-dialog-header"], className), ...props });
|
|
210
327
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
211
|
-
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(
|
|
328
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn(styles4["alert-dialog-footer"], className), ...props });
|
|
212
329
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
213
330
|
var AlertDialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
214
331
|
AlertDialogPrimitive.Title,
|
|
215
332
|
{
|
|
216
333
|
ref,
|
|
217
|
-
className: cn(
|
|
334
|
+
className: cn(styles4["alert-dialog-title"], className),
|
|
218
335
|
...props
|
|
219
336
|
}
|
|
220
337
|
));
|
|
@@ -223,7 +340,7 @@ var AlertDialogDescription = React16.forwardRef(({ className, ...props }, ref) =
|
|
|
223
340
|
AlertDialogPrimitive.Description,
|
|
224
341
|
{
|
|
225
342
|
ref,
|
|
226
|
-
className: cn(
|
|
343
|
+
className: cn(styles4["alert-dialog-description"], className),
|
|
227
344
|
...props
|
|
228
345
|
}
|
|
229
346
|
));
|
|
@@ -246,7 +363,7 @@ var AlertDialogCancel = React16.forwardRef(({ className, variant = "tertiary", s
|
|
|
246
363
|
AlertDialogPrimitive.Cancel,
|
|
247
364
|
{
|
|
248
365
|
ref,
|
|
249
|
-
className: cn(buttonVariants({ variant, size }),
|
|
366
|
+
className: cn(buttonVariants({ variant, size }), styles4["alert-dialog-cancel"], className),
|
|
250
367
|
...props,
|
|
251
368
|
children: [
|
|
252
369
|
prefix,
|
|
@@ -261,110 +378,23 @@ var Avatar = React16.forwardRef(
|
|
|
261
378
|
AvatarPrimitive.Root,
|
|
262
379
|
{
|
|
263
380
|
ref,
|
|
264
|
-
className: cn(
|
|
381
|
+
className: cn(styles5.avatar, styles5[size], styles5[shape], className),
|
|
265
382
|
...props
|
|
266
383
|
}
|
|
267
384
|
)
|
|
268
385
|
);
|
|
269
386
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
270
|
-
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(
|
|
387
|
+
var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn(styles5["avatar-image"], className), ...props }));
|
|
271
388
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
272
389
|
var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
273
390
|
AvatarPrimitive.Fallback,
|
|
274
391
|
{
|
|
275
392
|
ref,
|
|
276
|
-
className: cn(
|
|
393
|
+
className: cn(styles5["avatar-fallback"], className),
|
|
277
394
|
...props
|
|
278
395
|
}
|
|
279
396
|
));
|
|
280
397
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
281
|
-
var ELEVATION = {
|
|
282
|
-
SUNKEN: "sunken",
|
|
283
|
-
BASE: "base",
|
|
284
|
-
RAISED: "raised",
|
|
285
|
-
OVERLAY: "overlay"
|
|
286
|
-
};
|
|
287
|
-
var generateElevationVariants = (styles62, baseClassName, defaultElevation) => {
|
|
288
|
-
const classNames = {};
|
|
289
|
-
Object.values(ELEVATION).forEach((elevation) => {
|
|
290
|
-
classNames[elevation] = styles62[`${baseClassName}--${elevation}`];
|
|
291
|
-
});
|
|
292
|
-
const variants = cva(styles62[baseClassName], {
|
|
293
|
-
variants: {
|
|
294
|
-
elevation: classNames
|
|
295
|
-
},
|
|
296
|
-
defaultVariants: {
|
|
297
|
-
elevation: defaultElevation
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
return variants;
|
|
301
|
-
};
|
|
302
|
-
var getRelativeElevation = (elevation, offset) => {
|
|
303
|
-
const elevationIndex = Object.values(ELEVATION).indexOf(elevation);
|
|
304
|
-
const newElevationIndex = elevationIndex + offset;
|
|
305
|
-
const relativeElevation = Object.values(ELEVATION)[newElevationIndex];
|
|
306
|
-
if (!relativeElevation) {
|
|
307
|
-
console.warn(`Invalid elevation offset: from ${elevation} with offset ${offset}`);
|
|
308
|
-
}
|
|
309
|
-
return relativeElevation || elevation;
|
|
310
|
-
};
|
|
311
|
-
var iconVariants = cva(styles5["icon-container"], {
|
|
312
|
-
variants: {
|
|
313
|
-
size: {
|
|
314
|
-
xs: styles5["size--xs"],
|
|
315
|
-
sm: styles5["size--sm"],
|
|
316
|
-
md: styles5["size--md"],
|
|
317
|
-
lg: styles5["size--lg"]
|
|
318
|
-
},
|
|
319
|
-
background: {
|
|
320
|
-
square: styles5["background--square"],
|
|
321
|
-
circle: styles5["background--circle"],
|
|
322
|
-
transparent: styles5["background--transparent"]
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
defaultVariants: {
|
|
326
|
-
size: "md",
|
|
327
|
-
background: "transparent"
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
var iconElevationVariants = generateElevationVariants(styles5, "icon-container", ELEVATION.RAISED);
|
|
331
|
-
var Icon = forwardRef(
|
|
332
|
-
({ className, size, background, icon, elevation = ELEVATION.RAISED, ...props }, ref) => {
|
|
333
|
-
let renderedIcon;
|
|
334
|
-
if (typeof icon === "string") {
|
|
335
|
-
const LucideIcon = LucideIcons[icon];
|
|
336
|
-
if (!LucideIcon) {
|
|
337
|
-
throw new Error(`Icon "${icon}" not found in lucide-react`);
|
|
338
|
-
}
|
|
339
|
-
renderedIcon = /* @__PURE__ */ jsx(LucideIcon, { className: cn(styles5["icon"]) });
|
|
340
|
-
} else if (React16.isValidElement(icon)) {
|
|
341
|
-
const existingProps = icon.props;
|
|
342
|
-
renderedIcon = React16.cloneElement(
|
|
343
|
-
icon,
|
|
344
|
-
{
|
|
345
|
-
...existingProps,
|
|
346
|
-
className: cn(styles5["icon"], existingProps.className)
|
|
347
|
-
}
|
|
348
|
-
);
|
|
349
|
-
} else {
|
|
350
|
-
throw new Error("Icon must be either a string (Lucide icon name) or a React element");
|
|
351
|
-
}
|
|
352
|
-
return /* @__PURE__ */ jsx(
|
|
353
|
-
"div",
|
|
354
|
-
{
|
|
355
|
-
ref,
|
|
356
|
-
className: cn(
|
|
357
|
-
iconVariants({ size, background }),
|
|
358
|
-
iconElevationVariants({ elevation }),
|
|
359
|
-
className
|
|
360
|
-
),
|
|
361
|
-
...props,
|
|
362
|
-
children: renderedIcon
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
Icon.displayName = "Icon";
|
|
368
398
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
369
399
|
var Tooltip = TooltipPrimitive.Root;
|
|
370
400
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
@@ -404,7 +434,7 @@ var badgeVariants = cva(styles7["badge"], {
|
|
|
404
434
|
size: "md"
|
|
405
435
|
}
|
|
406
436
|
});
|
|
407
|
-
var
|
|
437
|
+
var defaultVariantIcons2 = {
|
|
408
438
|
success: "Check",
|
|
409
439
|
warning: "OctagonAlert",
|
|
410
440
|
danger: "TriangleAlert"
|
|
@@ -423,7 +453,7 @@ function Badge({
|
|
|
423
453
|
pill = true,
|
|
424
454
|
...props
|
|
425
455
|
}) {
|
|
426
|
-
const effectiveIcon = icon ?? (variant ?
|
|
456
|
+
const effectiveIcon = icon ?? (variant ? defaultVariantIcons2[variant] : void 0);
|
|
427
457
|
const renderClosable = () => {
|
|
428
458
|
if (closeable && handleClosable)
|
|
429
459
|
return /* @__PURE__ */ jsx(
|
|
@@ -1856,6 +1886,7 @@ var EmptyTableState = ({
|
|
|
1856
1886
|
icon,
|
|
1857
1887
|
title,
|
|
1858
1888
|
description,
|
|
1889
|
+
elevation = ELEVATION.RAISED,
|
|
1859
1890
|
showClearButton = false,
|
|
1860
1891
|
onClear,
|
|
1861
1892
|
className
|
|
@@ -1863,7 +1894,7 @@ var EmptyTableState = ({
|
|
|
1863
1894
|
const showButton = showClearButton && onClear;
|
|
1864
1895
|
return /* @__PURE__ */ jsxs("div", { className: cn(styles23["empty-table-state"], className), children: [
|
|
1865
1896
|
/* @__PURE__ */ jsxs("div", { className: styles23["icon-and-title-container"], children: [
|
|
1866
|
-
/* @__PURE__ */ jsx(Icon, { icon, size: "md", background: "circle" }),
|
|
1897
|
+
/* @__PURE__ */ jsx(Icon, { icon, size: "md", background: "circle", elevation }),
|
|
1867
1898
|
/* @__PURE__ */ jsx("span", { className: styles23["title"], children: title })
|
|
1868
1899
|
] }),
|
|
1869
1900
|
description && /* @__PURE__ */ jsx("span", { className: styles23["description"], children: description }),
|
|
@@ -3004,14 +3035,36 @@ var TableBody = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3004
3035
|
TableBody.displayName = "TableBody";
|
|
3005
3036
|
var TableFooter = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className: cn(styles52["table-footer"], className), ...props }));
|
|
3006
3037
|
TableFooter.displayName = "TableFooter";
|
|
3007
|
-
var TableRow = React16.forwardRef(
|
|
3008
|
-
"
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3038
|
+
var TableRow = React16.forwardRef(
|
|
3039
|
+
({ className, clickable, href, hrefLabel = "View details", children, onClick, ...props }, ref) => {
|
|
3040
|
+
const isClickable = clickable || !!href;
|
|
3041
|
+
const handleClick = (e) => {
|
|
3042
|
+
const target = e.target;
|
|
3043
|
+
if (target.closest("button, a:not([data-table-row-link])")) {
|
|
3044
|
+
return;
|
|
3045
|
+
}
|
|
3046
|
+
onClick?.(e);
|
|
3047
|
+
};
|
|
3048
|
+
return /* @__PURE__ */ jsxs(
|
|
3049
|
+
"tr",
|
|
3050
|
+
{
|
|
3051
|
+
ref,
|
|
3052
|
+
className: cn(
|
|
3053
|
+
styles52["table-row"],
|
|
3054
|
+
isClickable && styles52["table-row--clickable"],
|
|
3055
|
+
href && styles52["table-row--linked"],
|
|
3056
|
+
className
|
|
3057
|
+
),
|
|
3058
|
+
onClick: onClick ? handleClick : void 0,
|
|
3059
|
+
...props,
|
|
3060
|
+
children: [
|
|
3061
|
+
href && /* @__PURE__ */ jsx("a", { href, className: styles52["table-row-link"], "data-table-row-link": true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: hrefLabel }) }),
|
|
3062
|
+
children
|
|
3063
|
+
]
|
|
3064
|
+
}
|
|
3065
|
+
);
|
|
3013
3066
|
}
|
|
3014
|
-
)
|
|
3067
|
+
);
|
|
3015
3068
|
TableRow.displayName = "TableRow";
|
|
3016
3069
|
var TableHead = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className: cn(styles52["table-head"], className), ...props }));
|
|
3017
3070
|
TableHead.displayName = "TableHead";
|
|
@@ -3076,7 +3129,7 @@ var Tabs = ({
|
|
|
3076
3129
|
styles54["tabs-list"],
|
|
3077
3130
|
isFilled ? styles54["tabs-list--filled"] : styles54["tabs-list--transparent"]
|
|
3078
3131
|
),
|
|
3079
|
-
children: items.map(({ label, value, icon }) => {
|
|
3132
|
+
children: items.map(({ label, value, icon, suffix }) => {
|
|
3080
3133
|
const isActive = activeTab === value;
|
|
3081
3134
|
return /* @__PURE__ */ jsxs(
|
|
3082
3135
|
TabsTrigger,
|
|
@@ -3090,6 +3143,7 @@ var Tabs = ({
|
|
|
3090
3143
|
children: [
|
|
3091
3144
|
renderIcon(icon),
|
|
3092
3145
|
label,
|
|
3146
|
+
suffix,
|
|
3093
3147
|
renderActiveStyle(isActive)
|
|
3094
3148
|
]
|
|
3095
3149
|
},
|
|
@@ -3461,6 +3515,6 @@ var ThemeProvider = ({ customVars, children }) => {
|
|
|
3461
3515
|
] });
|
|
3462
3516
|
};
|
|
3463
3517
|
|
|
3464
|
-
export { Alert,
|
|
3518
|
+
export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
|
|
3465
3519
|
//# sourceMappingURL=index.js.map
|
|
3466
3520
|
//# sourceMappingURL=index.js.map
|