analytica-frontend-lib 1.0.16 → 1.0.17
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/index.css +119 -0
- package/dist/index.d.mts +72 -2
- package/dist/index.d.ts +72 -2
- package/dist/index.js +213 -44
- package/dist/index.mjs +210 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
Button: () => Button,
|
|
24
|
+
CheckBox: () => CheckBox,
|
|
24
25
|
DropdownMenu: () => DropdownMenu,
|
|
25
26
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
26
27
|
IconButton: () => IconButton,
|
|
@@ -251,25 +252,192 @@ var Text = ({
|
|
|
251
252
|
);
|
|
252
253
|
};
|
|
253
254
|
|
|
254
|
-
// src/components/
|
|
255
|
+
// src/components/CheckBox/CheckBox.tsx
|
|
255
256
|
var import_react2 = require("react");
|
|
257
|
+
var import_phosphor_react = require("phosphor-react");
|
|
256
258
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
+
var SIZE_CLASSES2 = {
|
|
260
|
+
small: {
|
|
261
|
+
checkbox: "w-4 h-4",
|
|
262
|
+
// 16px x 16px
|
|
263
|
+
textSize: "sm",
|
|
264
|
+
spacing: "gap-1.5",
|
|
265
|
+
// 6px
|
|
266
|
+
borderWidth: "border-2",
|
|
267
|
+
iconSize: 14,
|
|
268
|
+
// pixels for Phosphor icons
|
|
269
|
+
labelHeight: "h-[21px]"
|
|
270
|
+
},
|
|
271
|
+
medium: {
|
|
272
|
+
checkbox: "w-5 h-5",
|
|
273
|
+
// 20px x 20px
|
|
274
|
+
textSize: "md",
|
|
275
|
+
spacing: "gap-2",
|
|
276
|
+
// 8px
|
|
277
|
+
borderWidth: "border-2",
|
|
278
|
+
iconSize: 16,
|
|
279
|
+
// pixels for Phosphor icons
|
|
280
|
+
labelHeight: "h-6"
|
|
281
|
+
},
|
|
282
|
+
large: {
|
|
283
|
+
checkbox: "w-6 h-6",
|
|
284
|
+
// 24px x 24px
|
|
285
|
+
textSize: "lg",
|
|
286
|
+
spacing: "gap-2",
|
|
287
|
+
// 8px
|
|
288
|
+
borderWidth: "border-[3px]",
|
|
289
|
+
// 3px border
|
|
290
|
+
iconSize: 20,
|
|
291
|
+
// pixels for Phosphor icons
|
|
292
|
+
labelHeight: "h-[27px]"
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
var BASE_CHECKBOX_CLASSES = "rounded border cursor-pointer transition-all duration-200 flex items-center justify-center focus:outline-none";
|
|
296
|
+
var STATE_CLASSES = {
|
|
297
|
+
default: {
|
|
298
|
+
unchecked: "border-border-400 bg-background hover:border-border-500",
|
|
299
|
+
checked: "border-primary-950 bg-primary-950 text-text hover:border-primary-800 hover:bg-primary-800"
|
|
300
|
+
},
|
|
301
|
+
hovered: {
|
|
302
|
+
unchecked: "border-border-500 bg-background",
|
|
303
|
+
checked: "border-primary-800 bg-primary-800 text-text"
|
|
304
|
+
},
|
|
305
|
+
focused: {
|
|
306
|
+
unchecked: "border-indicator-info bg-background ring-2 ring-indicator-info/20",
|
|
307
|
+
checked: "border-indicator-info bg-primary-950 text-text ring-2 ring-indicator-info/20"
|
|
308
|
+
},
|
|
309
|
+
invalid: {
|
|
310
|
+
unchecked: "border-error-700 bg-background hover:border-error-600",
|
|
311
|
+
checked: "border-error-700 bg-primary-950 text-text"
|
|
312
|
+
},
|
|
313
|
+
disabled: {
|
|
314
|
+
unchecked: "border-border-400 bg-background cursor-not-allowed opacity-40",
|
|
315
|
+
checked: "border-primary-600 bg-primary-600 text-text cursor-not-allowed opacity-40"
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
var CheckBox = (0, import_react2.forwardRef)(
|
|
319
|
+
({
|
|
320
|
+
label,
|
|
321
|
+
size = "medium",
|
|
322
|
+
state = "default",
|
|
323
|
+
indeterminate = false,
|
|
324
|
+
errorMessage,
|
|
325
|
+
helperText,
|
|
326
|
+
className = "",
|
|
327
|
+
labelClassName = "",
|
|
328
|
+
checked: checkedProp,
|
|
329
|
+
disabled,
|
|
330
|
+
id,
|
|
331
|
+
onChange,
|
|
332
|
+
...props
|
|
333
|
+
}, ref) => {
|
|
334
|
+
const generatedId = (0, import_react2.useId)();
|
|
335
|
+
const inputId = id ?? `checkbox-${generatedId}`;
|
|
336
|
+
const [internalChecked, setInternalChecked] = (0, import_react2.useState)(false);
|
|
337
|
+
const isControlled = checkedProp !== void 0;
|
|
338
|
+
const checked = isControlled ? checkedProp : internalChecked;
|
|
339
|
+
const handleChange = (event) => {
|
|
340
|
+
if (!isControlled) {
|
|
341
|
+
setInternalChecked(event.target.checked);
|
|
342
|
+
}
|
|
343
|
+
onChange?.(event);
|
|
344
|
+
};
|
|
345
|
+
const currentState = disabled ? "disabled" : state;
|
|
346
|
+
const sizeClasses = SIZE_CLASSES2[size];
|
|
347
|
+
const checkVariant = checked || indeterminate ? "checked" : "unchecked";
|
|
348
|
+
const stylingClasses = STATE_CLASSES[currentState][checkVariant];
|
|
349
|
+
const borderWidthClass = state === "focused" || state === "hovered" && size === "large" ? "border-[3px]" : sizeClasses.borderWidth;
|
|
350
|
+
const checkboxClasses = `${BASE_CHECKBOX_CLASSES} ${sizeClasses.checkbox} ${borderWidthClass} ${stylingClasses} ${className}`;
|
|
351
|
+
const renderIcon = () => {
|
|
352
|
+
if (indeterminate) {
|
|
353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
354
|
+
import_phosphor_react.Minus,
|
|
355
|
+
{
|
|
356
|
+
size: sizeClasses.iconSize,
|
|
357
|
+
weight: "bold",
|
|
358
|
+
color: "currentColor"
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
if (checked) {
|
|
363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
364
|
+
import_phosphor_react.Check,
|
|
365
|
+
{
|
|
366
|
+
size: sizeClasses.iconSize,
|
|
367
|
+
weight: "bold",
|
|
368
|
+
color: "currentColor"
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
return null;
|
|
373
|
+
};
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col", children: [
|
|
375
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
376
|
+
"div",
|
|
377
|
+
{
|
|
378
|
+
className: `flex flex-row items-center ${sizeClasses.spacing} ${disabled ? "opacity-40" : ""}`,
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
381
|
+
"input",
|
|
382
|
+
{
|
|
383
|
+
ref,
|
|
384
|
+
type: "checkbox",
|
|
385
|
+
id: inputId,
|
|
386
|
+
checked,
|
|
387
|
+
disabled,
|
|
388
|
+
onChange: handleChange,
|
|
389
|
+
className: "sr-only",
|
|
390
|
+
...props
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: inputId, className: checkboxClasses, children: renderIcon() }),
|
|
394
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
395
|
+
"div",
|
|
396
|
+
{
|
|
397
|
+
className: `flex flex-row items-center ${sizeClasses.labelHeight}`,
|
|
398
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
399
|
+
Text,
|
|
400
|
+
{
|
|
401
|
+
as: "label",
|
|
402
|
+
htmlFor: inputId,
|
|
403
|
+
size: sizeClasses.textSize,
|
|
404
|
+
weight: "normal",
|
|
405
|
+
color: "black",
|
|
406
|
+
className: `cursor-pointer select-none leading-[150%] flex items-center font-roboto ${labelClassName}`,
|
|
407
|
+
children: label
|
|
408
|
+
}
|
|
409
|
+
)
|
|
410
|
+
}
|
|
411
|
+
)
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-error-600", children: errorMessage }),
|
|
416
|
+
helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperText })
|
|
417
|
+
] });
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
CheckBox.displayName = "CheckBox";
|
|
421
|
+
|
|
422
|
+
// src/components/Table/Table.tsx
|
|
423
|
+
var import_react3 = require("react");
|
|
424
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
425
|
+
var Table = (0, import_react3.forwardRef)(
|
|
426
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "border border-border-200 rounded-xl relative w-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
259
427
|
"table",
|
|
260
428
|
{
|
|
261
429
|
ref,
|
|
262
430
|
className: `w-full caption-bottom text-sm ${className ?? ""}`,
|
|
263
431
|
...props,
|
|
264
432
|
children: [
|
|
265
|
-
/* @__PURE__ */ (0,
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("caption", { className: "sr-only", children: "My Table" }),
|
|
266
434
|
children
|
|
267
435
|
]
|
|
268
436
|
}
|
|
269
437
|
) })
|
|
270
438
|
);
|
|
271
439
|
Table.displayName = "Table";
|
|
272
|
-
var TableHeader = (0,
|
|
440
|
+
var TableHeader = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
273
441
|
"thead",
|
|
274
442
|
{
|
|
275
443
|
ref,
|
|
@@ -278,7 +446,7 @@ var TableHeader = (0, import_react2.forwardRef)(({ className, ...props }, ref) =
|
|
|
278
446
|
}
|
|
279
447
|
));
|
|
280
448
|
TableHeader.displayName = "TableHeader";
|
|
281
|
-
var TableBody = (0,
|
|
449
|
+
var TableBody = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
282
450
|
"tbody",
|
|
283
451
|
{
|
|
284
452
|
ref,
|
|
@@ -287,7 +455,7 @@ var TableBody = (0, import_react2.forwardRef)(({ className, ...props }, ref) =>
|
|
|
287
455
|
}
|
|
288
456
|
));
|
|
289
457
|
TableBody.displayName = "TableBody";
|
|
290
|
-
var TableFooter = (0,
|
|
458
|
+
var TableFooter = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
291
459
|
"tfoot",
|
|
292
460
|
{
|
|
293
461
|
ref,
|
|
@@ -302,9 +470,9 @@ var VARIANT_STATES_ROW = {
|
|
|
302
470
|
invalid: "border-b-2 border-indicator-error",
|
|
303
471
|
disabled: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed"
|
|
304
472
|
};
|
|
305
|
-
var TableRow = (0,
|
|
473
|
+
var TableRow = (0, import_react3.forwardRef)(
|
|
306
474
|
({ state = "default", className, ...props }, ref) => {
|
|
307
|
-
return /* @__PURE__ */ (0,
|
|
475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
308
476
|
"tr",
|
|
309
477
|
{
|
|
310
478
|
ref,
|
|
@@ -321,7 +489,7 @@ var TableRow = (0, import_react2.forwardRef)(
|
|
|
321
489
|
}
|
|
322
490
|
);
|
|
323
491
|
TableRow.displayName = "TableRow";
|
|
324
|
-
var TableHead = (0,
|
|
492
|
+
var TableHead = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
325
493
|
"th",
|
|
326
494
|
{
|
|
327
495
|
ref,
|
|
@@ -330,7 +498,7 @@ var TableHead = (0, import_react2.forwardRef)(({ className, ...props }, ref) =>
|
|
|
330
498
|
}
|
|
331
499
|
));
|
|
332
500
|
TableHead.displayName = "TableHead";
|
|
333
|
-
var TableCell = (0,
|
|
501
|
+
var TableCell = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
334
502
|
"td",
|
|
335
503
|
{
|
|
336
504
|
ref,
|
|
@@ -339,7 +507,7 @@ var TableCell = (0, import_react2.forwardRef)(({ className, ...props }, ref) =>
|
|
|
339
507
|
}
|
|
340
508
|
));
|
|
341
509
|
TableCell.displayName = "TableCell";
|
|
342
|
-
var TableCaption = (0,
|
|
510
|
+
var TableCaption = (0, import_react3.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
343
511
|
"caption",
|
|
344
512
|
{
|
|
345
513
|
ref,
|
|
@@ -350,23 +518,23 @@ var TableCaption = (0, import_react2.forwardRef)(({ className, ...props }, ref)
|
|
|
350
518
|
TableCaption.displayName = "TableCaption";
|
|
351
519
|
|
|
352
520
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
353
|
-
var
|
|
354
|
-
var
|
|
355
|
-
var DropdownMenuContext = (0,
|
|
521
|
+
var import_react4 = require("react");
|
|
522
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
523
|
+
var DropdownMenuContext = (0, import_react4.createContext)(
|
|
356
524
|
void 0
|
|
357
525
|
);
|
|
358
526
|
var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
359
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
527
|
+
const [internalOpen, setInternalOpen] = (0, import_react4.useState)(false);
|
|
360
528
|
const isControlled = open !== void 0;
|
|
361
529
|
const currentOpen = isControlled ? open : internalOpen;
|
|
362
|
-
const setOpen = (0,
|
|
530
|
+
const setOpen = (0, import_react4.useCallback)(
|
|
363
531
|
(newOpen) => {
|
|
364
532
|
if (onOpenChange) onOpenChange(newOpen);
|
|
365
533
|
if (!isControlled) setInternalOpen(newOpen);
|
|
366
534
|
},
|
|
367
535
|
[isControlled, onOpenChange]
|
|
368
536
|
);
|
|
369
|
-
const menuRef = (0,
|
|
537
|
+
const menuRef = (0, import_react4.useRef)(null);
|
|
370
538
|
const handleEscape = (event) => {
|
|
371
539
|
if (event.key === "Escape") {
|
|
372
540
|
setOpen(false);
|
|
@@ -377,7 +545,7 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
377
545
|
setOpen(false);
|
|
378
546
|
}
|
|
379
547
|
};
|
|
380
|
-
(0,
|
|
548
|
+
(0, import_react4.useEffect)(() => {
|
|
381
549
|
if (currentOpen) {
|
|
382
550
|
document.addEventListener("mousedown", handleClickOutside);
|
|
383
551
|
document.addEventListener("keydown", handleEscape);
|
|
@@ -387,18 +555,18 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
|
|
|
387
555
|
document.removeEventListener("keydown", handleEscape);
|
|
388
556
|
};
|
|
389
557
|
}, [currentOpen]);
|
|
390
|
-
const value = (0,
|
|
558
|
+
const value = (0, import_react4.useMemo)(
|
|
391
559
|
() => ({ open: currentOpen, setOpen }),
|
|
392
560
|
[currentOpen, setOpen]
|
|
393
561
|
);
|
|
394
|
-
return /* @__PURE__ */ (0,
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "relative", ref: menuRef, children }) });
|
|
395
563
|
};
|
|
396
|
-
var DropdownMenuTrigger = (0,
|
|
397
|
-
const context = (0,
|
|
564
|
+
var DropdownMenuTrigger = (0, import_react4.forwardRef)(({ className, children, onClick, ...props }, ref) => {
|
|
565
|
+
const context = (0, import_react4.useContext)(DropdownMenuContext);
|
|
398
566
|
if (!context)
|
|
399
567
|
throw new Error("DropdownMenuTrigger must be used within a DropdownMenu");
|
|
400
568
|
const { open, setOpen } = context;
|
|
401
|
-
return /* @__PURE__ */ (0,
|
|
569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
402
570
|
"button",
|
|
403
571
|
{
|
|
404
572
|
ref,
|
|
@@ -430,7 +598,7 @@ var ALIGN_CLASSES = {
|
|
|
430
598
|
center: "left-1/2 -translate-x-1/2",
|
|
431
599
|
end: "right-0"
|
|
432
600
|
};
|
|
433
|
-
var MenuLabel = (0,
|
|
601
|
+
var MenuLabel = (0, import_react4.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
434
602
|
"fieldset",
|
|
435
603
|
{
|
|
436
604
|
ref,
|
|
@@ -440,7 +608,7 @@ var MenuLabel = (0, import_react3.forwardRef)(({ className, inset, ...props }, r
|
|
|
440
608
|
}
|
|
441
609
|
));
|
|
442
610
|
MenuLabel.displayName = "MenuLabel";
|
|
443
|
-
var MenuContent = (0,
|
|
611
|
+
var MenuContent = (0, import_react4.forwardRef)(
|
|
444
612
|
({
|
|
445
613
|
className,
|
|
446
614
|
align = "start",
|
|
@@ -449,9 +617,9 @@ var MenuContent = (0, import_react3.forwardRef)(
|
|
|
449
617
|
children,
|
|
450
618
|
...props
|
|
451
619
|
}, ref) => {
|
|
452
|
-
const { open } = (0,
|
|
453
|
-
const [isVisible, setIsVisible] = (0,
|
|
454
|
-
(0,
|
|
620
|
+
const { open } = (0, import_react4.useContext)(DropdownMenuContext);
|
|
621
|
+
const [isVisible, setIsVisible] = (0, import_react4.useState)(open);
|
|
622
|
+
(0, import_react4.useEffect)(() => {
|
|
455
623
|
if (open) {
|
|
456
624
|
setIsVisible(true);
|
|
457
625
|
} else {
|
|
@@ -465,7 +633,7 @@ var MenuContent = (0, import_react3.forwardRef)(
|
|
|
465
633
|
const horizontal = ALIGN_CLASSES[align];
|
|
466
634
|
return `absolute ${vertical} ${horizontal}`;
|
|
467
635
|
};
|
|
468
|
-
return /* @__PURE__ */ (0,
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
469
637
|
"div",
|
|
470
638
|
{
|
|
471
639
|
ref,
|
|
@@ -489,7 +657,7 @@ var MenuContent = (0, import_react3.forwardRef)(
|
|
|
489
657
|
}
|
|
490
658
|
);
|
|
491
659
|
MenuContent.displayName = "MenuContent";
|
|
492
|
-
var MenuItem = (0,
|
|
660
|
+
var MenuItem = (0, import_react4.forwardRef)(
|
|
493
661
|
({
|
|
494
662
|
className,
|
|
495
663
|
inset,
|
|
@@ -510,7 +678,7 @@ var MenuItem = (0, import_react3.forwardRef)(
|
|
|
510
678
|
}
|
|
511
679
|
onClick?.(e);
|
|
512
680
|
};
|
|
513
|
-
return /* @__PURE__ */ (0,
|
|
681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
514
682
|
"div",
|
|
515
683
|
{
|
|
516
684
|
ref,
|
|
@@ -539,7 +707,7 @@ var MenuItem = (0, import_react3.forwardRef)(
|
|
|
539
707
|
}
|
|
540
708
|
);
|
|
541
709
|
MenuItem.displayName = "MenuItem";
|
|
542
|
-
var MenuSeparator = (0,
|
|
710
|
+
var MenuSeparator = (0, import_react4.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
543
711
|
"div",
|
|
544
712
|
{
|
|
545
713
|
ref,
|
|
@@ -550,9 +718,9 @@ var MenuSeparator = (0, import_react3.forwardRef)(({ className, ...props }, ref)
|
|
|
550
718
|
MenuSeparator.displayName = "MenuSeparator";
|
|
551
719
|
|
|
552
720
|
// src/components/NavButton/NavButton.tsx
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var NavButton = (0,
|
|
721
|
+
var import_react5 = require("react");
|
|
722
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
723
|
+
var NavButton = (0, import_react5.forwardRef)(
|
|
556
724
|
({ icon, label, selected = false, className = "", disabled, ...props }, ref) => {
|
|
557
725
|
const baseClasses = [
|
|
558
726
|
"flex",
|
|
@@ -579,7 +747,7 @@ var NavButton = (0, import_react4.forwardRef)(
|
|
|
579
747
|
];
|
|
580
748
|
const stateClasses = selected ? ["bg-primary-50", "text-primary-950"] : [];
|
|
581
749
|
const allClasses = [...baseClasses, ...stateClasses].join(" ");
|
|
582
|
-
return /* @__PURE__ */ (0,
|
|
750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
583
751
|
"button",
|
|
584
752
|
{
|
|
585
753
|
ref,
|
|
@@ -589,8 +757,8 @@ var NavButton = (0, import_react4.forwardRef)(
|
|
|
589
757
|
"aria-pressed": selected,
|
|
590
758
|
...props,
|
|
591
759
|
children: [
|
|
592
|
-
/* @__PURE__ */ (0,
|
|
593
|
-
/* @__PURE__ */ (0,
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "flex items-center justify-center w-5 h-5", children: icon }),
|
|
761
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "whitespace-nowrap", children: label })
|
|
594
762
|
]
|
|
595
763
|
}
|
|
596
764
|
);
|
|
@@ -599,9 +767,9 @@ var NavButton = (0, import_react4.forwardRef)(
|
|
|
599
767
|
NavButton.displayName = "NavButton";
|
|
600
768
|
|
|
601
769
|
// src/components/IconButton/IconButton.tsx
|
|
602
|
-
var
|
|
603
|
-
var
|
|
604
|
-
var IconButton = (0,
|
|
770
|
+
var import_react6 = require("react");
|
|
771
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
772
|
+
var IconButton = (0, import_react6.forwardRef)(
|
|
605
773
|
({ icon, size = "md", active = false, className = "", disabled, ...props }, ref) => {
|
|
606
774
|
const baseClasses = [
|
|
607
775
|
"inline-flex",
|
|
@@ -633,7 +801,7 @@ var IconButton = (0, import_react5.forwardRef)(
|
|
|
633
801
|
...activeClasses
|
|
634
802
|
].join(" ");
|
|
635
803
|
const ariaLabel = props["aria-label"] ?? "Bot\xE3o de a\xE7\xE3o";
|
|
636
|
-
return /* @__PURE__ */ (0,
|
|
804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
637
805
|
"button",
|
|
638
806
|
{
|
|
639
807
|
ref,
|
|
@@ -643,7 +811,7 @@ var IconButton = (0, import_react5.forwardRef)(
|
|
|
643
811
|
"aria-pressed": active,
|
|
644
812
|
"aria-label": ariaLabel,
|
|
645
813
|
...props,
|
|
646
|
-
children: /* @__PURE__ */ (0,
|
|
814
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "flex items-center justify-center", children: icon })
|
|
647
815
|
}
|
|
648
816
|
);
|
|
649
817
|
}
|
|
@@ -652,6 +820,7 @@ IconButton.displayName = "IconButton";
|
|
|
652
820
|
// Annotate the CommonJS export names for ESM import in node:
|
|
653
821
|
0 && (module.exports = {
|
|
654
822
|
Button,
|
|
823
|
+
CheckBox,
|
|
655
824
|
DropdownMenu,
|
|
656
825
|
DropdownMenuTrigger,
|
|
657
826
|
IconButton,
|