infinity-ui-elements 1.9.13 → 1.9.16
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/components/BottomSheet/BottomSheet.d.ts +90 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.stories.d.ts +28 -0
- package/dist/components/BottomSheet/BottomSheet.stories.d.ts.map +1 -0
- package/dist/components/BottomSheet/index.d.ts +3 -0
- package/dist/components/BottomSheet/index.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +0 -14
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/TabItem/TabItem.d.ts +2 -2
- package/dist/components/TabItem/TabItem.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -4
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +211 -342
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +211 -343
- package/dist/index.js.map +1 -1
- package/package.json +4 -5
- package/dist/components/Chip/Chip.d.ts +0 -40
- package/dist/components/Chip/Chip.d.ts.map +0 -1
- package/dist/components/Chip/Chip.stories.d.ts +0 -12
- package/dist/components/Chip/Chip.stories.d.ts.map +0 -1
- package/dist/components/Chip/index.d.ts +0 -3
- package/dist/components/Chip/index.d.ts.map +0 -1
- package/dist/components/Table/DetailPanel.d.ts +0 -10
- package/dist/components/Table/DetailPanel.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -219,10 +219,10 @@ const buttonVariants = classVarianceAuthority.cva("items-center gap-3 justify-ce
|
|
|
219
219
|
white: "",
|
|
220
220
|
},
|
|
221
221
|
size: {
|
|
222
|
-
xsmall: "
|
|
223
|
-
small: "
|
|
224
|
-
medium: "
|
|
225
|
-
large: "
|
|
222
|
+
xsmall: "h-[28px] px-3 rounded-medium text-body-small-medium",
|
|
223
|
+
small: "h-[32px] px-4 rounded-medium text-body-small-medium",
|
|
224
|
+
medium: "h-[36px] px-5 py-2 rounded-large text-body-medium-medium",
|
|
225
|
+
large: "h-[44px] px-6 rounded-large text-body-large-medium",
|
|
226
226
|
},
|
|
227
227
|
isIconOnly: {
|
|
228
228
|
true: "aspect-square p-0",
|
|
@@ -519,7 +519,7 @@ const Button = React__namespace.forwardRef(({ className, variant = "primary", co
|
|
|
519
519
|
}
|
|
520
520
|
return `var(--color-action-ink-${color}-normal)`;
|
|
521
521
|
};
|
|
522
|
-
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isLoading && !isIconOnly && (jsxRuntime.jsx(reactSpinners.PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsxRuntime.jsx(reactSpinners.ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && jsxRuntime.jsx("span", { children: leadingIcon }), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsxRuntime.jsx("span", { children: trailingIcon })] }));
|
|
522
|
+
const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isLoading && !isIconOnly && (jsxRuntime.jsx(reactSpinners.PulseLoader, { color: getLoaderColor(), size: 10 })), isLoading && isIconOnly && (jsxRuntime.jsx(reactSpinners.ClipLoader, { color: getLoaderColor(), size: 20 })), !isLoading && leadingIcon && (jsxRuntime.jsx("span", { className: "mr-2", children: leadingIcon })), !isIconOnly && !isLoading && children, isIconOnly && !isLoading && children, !isLoading && trailingIcon && jsxRuntime.jsx("span", { children: trailingIcon })] }));
|
|
523
523
|
return (jsxRuntime.jsx(Comp, { className: cn(buttonVariants({
|
|
524
524
|
variant,
|
|
525
525
|
color,
|
|
@@ -1338,6 +1338,183 @@ const Badge = React__namespace.forwardRef(({ className, variant, size, color, sh
|
|
|
1338
1338
|
});
|
|
1339
1339
|
Badge.displayName = "Badge";
|
|
1340
1340
|
|
|
1341
|
+
const dividerVariants = classVarianceAuthority.cva("", {
|
|
1342
|
+
variants: {
|
|
1343
|
+
orientation: {
|
|
1344
|
+
horizontal: "w-full",
|
|
1345
|
+
vertical: "h-full",
|
|
1346
|
+
},
|
|
1347
|
+
thickness: {
|
|
1348
|
+
thinner: "",
|
|
1349
|
+
thin: "",
|
|
1350
|
+
thick: "",
|
|
1351
|
+
thicker: "",
|
|
1352
|
+
},
|
|
1353
|
+
lineStyle: {
|
|
1354
|
+
solid: "border-solid",
|
|
1355
|
+
dashed: "border-dashed",
|
|
1356
|
+
},
|
|
1357
|
+
variant: {
|
|
1358
|
+
normal: "",
|
|
1359
|
+
subtle: "",
|
|
1360
|
+
muted: "",
|
|
1361
|
+
},
|
|
1362
|
+
},
|
|
1363
|
+
compoundVariants: [
|
|
1364
|
+
// Horizontal orientation with thickness
|
|
1365
|
+
{
|
|
1366
|
+
orientation: "horizontal",
|
|
1367
|
+
thickness: "thinner",
|
|
1368
|
+
class: "border-t-[0.5px]",
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
orientation: "horizontal",
|
|
1372
|
+
thickness: "thin",
|
|
1373
|
+
class: "border-t-[1px]",
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
orientation: "horizontal",
|
|
1377
|
+
thickness: "thick",
|
|
1378
|
+
class: "border-t-[2px]",
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
orientation: "horizontal",
|
|
1382
|
+
thickness: "thicker",
|
|
1383
|
+
class: "border-t-[3px]",
|
|
1384
|
+
},
|
|
1385
|
+
// Vertical orientation with thickness
|
|
1386
|
+
{
|
|
1387
|
+
orientation: "vertical",
|
|
1388
|
+
thickness: "thinner",
|
|
1389
|
+
class: "border-l-[0.5px]",
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
orientation: "vertical",
|
|
1393
|
+
thickness: "thin",
|
|
1394
|
+
class: "border-l-[1px]",
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
orientation: "vertical",
|
|
1398
|
+
thickness: "thick",
|
|
1399
|
+
class: "border-l-[2px]",
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
orientation: "vertical",
|
|
1403
|
+
thickness: "thicker",
|
|
1404
|
+
class: "border-l-[3px]",
|
|
1405
|
+
},
|
|
1406
|
+
// Normal variant colors
|
|
1407
|
+
{
|
|
1408
|
+
variant: "normal",
|
|
1409
|
+
class: "border-surface-outline-neutral-normal",
|
|
1410
|
+
},
|
|
1411
|
+
// Subtle variant colors
|
|
1412
|
+
{
|
|
1413
|
+
variant: "subtle",
|
|
1414
|
+
class: "border-surface-outline-neutral-subtle",
|
|
1415
|
+
},
|
|
1416
|
+
// Muted variant colors
|
|
1417
|
+
{
|
|
1418
|
+
variant: "muted",
|
|
1419
|
+
class: "border-surface-outline-neutral-muted",
|
|
1420
|
+
},
|
|
1421
|
+
],
|
|
1422
|
+
defaultVariants: {
|
|
1423
|
+
orientation: "horizontal",
|
|
1424
|
+
thickness: "thin",
|
|
1425
|
+
lineStyle: "solid",
|
|
1426
|
+
variant: "normal",
|
|
1427
|
+
},
|
|
1428
|
+
});
|
|
1429
|
+
const Divider = React__namespace.forwardRef(({ className, orientation = "horizontal", thickness = "thin", lineStyle = "solid", variant = "normal", ...props }, ref) => {
|
|
1430
|
+
return (jsxRuntime.jsx("div", { ref: ref, role: "separator", "aria-orientation": orientation, className: cn(dividerVariants({ orientation, thickness, lineStyle, variant }), className), ...props }));
|
|
1431
|
+
});
|
|
1432
|
+
Divider.displayName = "Divider";
|
|
1433
|
+
|
|
1434
|
+
const BottomSheet = React__namespace.forwardRef(({ isOpen, onClose, title, description, footer, children, variant = "default", showCloseButton = true, showDragHandle = true, closeOnOverlayClick = true, closeOnEscape = true, closeOnSwipeDown = true, maxHeight = "90vh", className, contentClassName, headerClassName, bodyClassName, footerClassName, overlayClassName, ariaLabel, ariaDescribedBy, }, ref) => {
|
|
1435
|
+
const sheetRef = React__namespace.useRef(null);
|
|
1436
|
+
const contentRef = ref || sheetRef;
|
|
1437
|
+
const [isClosing, setIsClosing] = React__namespace.useState(false);
|
|
1438
|
+
const [touchStart, setTouchStart] = React__namespace.useState(null);
|
|
1439
|
+
const [touchEnd, setTouchEnd] = React__namespace.useState(null);
|
|
1440
|
+
// Handle escape key
|
|
1441
|
+
React__namespace.useEffect(() => {
|
|
1442
|
+
if (!isOpen || !closeOnEscape || !onClose)
|
|
1443
|
+
return;
|
|
1444
|
+
const handleEscape = (e) => {
|
|
1445
|
+
if (e.key === "Escape") {
|
|
1446
|
+
handleClose();
|
|
1447
|
+
}
|
|
1448
|
+
};
|
|
1449
|
+
document.addEventListener("keydown", handleEscape);
|
|
1450
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
1451
|
+
}, [isOpen, closeOnEscape, onClose]);
|
|
1452
|
+
// Prevent body scroll when bottom sheet is open
|
|
1453
|
+
React__namespace.useEffect(() => {
|
|
1454
|
+
if (isOpen) {
|
|
1455
|
+
document.body.style.overflow = "hidden";
|
|
1456
|
+
}
|
|
1457
|
+
else {
|
|
1458
|
+
document.body.style.overflow = "";
|
|
1459
|
+
}
|
|
1460
|
+
return () => {
|
|
1461
|
+
document.body.style.overflow = "";
|
|
1462
|
+
};
|
|
1463
|
+
}, [isOpen]);
|
|
1464
|
+
// Reset closing state when opening
|
|
1465
|
+
React__namespace.useEffect(() => {
|
|
1466
|
+
if (isOpen) {
|
|
1467
|
+
setIsClosing(false);
|
|
1468
|
+
}
|
|
1469
|
+
}, [isOpen]);
|
|
1470
|
+
// Handle close with animation
|
|
1471
|
+
const handleClose = () => {
|
|
1472
|
+
if (!onClose)
|
|
1473
|
+
return;
|
|
1474
|
+
setIsClosing(true);
|
|
1475
|
+
// Wait for animation to complete before calling onClose
|
|
1476
|
+
setTimeout(() => {
|
|
1477
|
+
onClose();
|
|
1478
|
+
setIsClosing(false);
|
|
1479
|
+
}, 300); // Match animation duration
|
|
1480
|
+
};
|
|
1481
|
+
// Handle overlay click
|
|
1482
|
+
const handleOverlayClick = (e) => {
|
|
1483
|
+
if (closeOnOverlayClick && e.target === e.currentTarget) {
|
|
1484
|
+
handleClose();
|
|
1485
|
+
}
|
|
1486
|
+
};
|
|
1487
|
+
// Handle touch events for swipe down
|
|
1488
|
+
const handleTouchStart = (e) => {
|
|
1489
|
+
if (!closeOnSwipeDown)
|
|
1490
|
+
return;
|
|
1491
|
+
setTouchEnd(null);
|
|
1492
|
+
setTouchStart(e.targetTouches[0].clientY);
|
|
1493
|
+
};
|
|
1494
|
+
const handleTouchMove = (e) => {
|
|
1495
|
+
if (!closeOnSwipeDown)
|
|
1496
|
+
return;
|
|
1497
|
+
setTouchEnd(e.targetTouches[0].clientY);
|
|
1498
|
+
};
|
|
1499
|
+
const handleTouchEnd = () => {
|
|
1500
|
+
if (!closeOnSwipeDown || !touchStart || !touchEnd)
|
|
1501
|
+
return;
|
|
1502
|
+
const distance = touchEnd - touchStart;
|
|
1503
|
+
const isSwipeDown = distance > 100; // Minimum swipe distance
|
|
1504
|
+
if (isSwipeDown) {
|
|
1505
|
+
handleClose();
|
|
1506
|
+
}
|
|
1507
|
+
setTouchStart(null);
|
|
1508
|
+
setTouchEnd(null);
|
|
1509
|
+
};
|
|
1510
|
+
// Don't render if not open and not closing
|
|
1511
|
+
if (!isOpen && !isClosing)
|
|
1512
|
+
return null;
|
|
1513
|
+
const hasHeader = title || description;
|
|
1514
|
+
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-end justify-center", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300", isClosing ? "opacity-0" : "opacity-100", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative z-10 w-full transition-transform duration-300", "flex flex-col overflow-hidden", variant === "default" && "bg-white rounded-t-2xl shadow-xl", isClosing ? "animate-slide-out-bottom" : "animate-slide-in-bottom", contentClassName), style: { maxHeight }, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, children: [showDragHandle && variant === "default" && (jsxRuntime.jsx("div", { className: "flex justify-center pt-3 pb-2", children: jsxRuntime.jsx("div", { className: "w-10 h-1 bg-neutral-300 rounded-full" }) })), hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4", variant === "default" && "px-6", variant === "default" && !showDragHandle && "pt-6", variant === "default" && showDragHandle && "pt-2", variant === "default" && !description && "pb-4", variant === "default" && description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: handleClose, color: "neutral", size: "small", "aria-label": "Close bottom sheet", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: cn("absolute z-10", variant === "default" && "top-4 right-4"), children: jsxRuntime.jsx(IconButton, { icon: "close", onClick: handleClose, color: "neutral", size: "small", "aria-label": "Close bottom sheet" }) })), jsxRuntime.jsx("div", { className: cn("flex-1 overflow-y-auto", variant === "default" && "px-6", variant === "default" && hasHeader && "py-4", variant === "default" && !hasHeader && !showDragHandle && "pt-6 pb-4", variant === "default" && !hasHeader && showDragHandle && "pt-2 pb-4", variant === "default" && !footer && "pb-6", bodyClassName), children: children }), footer && (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [variant === "default" && (jsxRuntime.jsx(Divider, { thickness: "thin", variant: "muted" })), jsxRuntime.jsx("div", { className: cn("flex items-center justify-end gap-3", variant === "default" && "px-6 py-4", footerClassName), children: footer })] }))] })] }));
|
|
1515
|
+
});
|
|
1516
|
+
BottomSheet.displayName = "BottomSheet";
|
|
1517
|
+
|
|
1341
1518
|
const buttonGroupVariants = classVarianceAuthority.cva("inline-flex", {
|
|
1342
1519
|
variants: {
|
|
1343
1520
|
variant: {
|
|
@@ -1676,175 +1853,6 @@ const Checkbox = React__namespace.forwardRef(({ label, errorText, size = "medium
|
|
|
1676
1853
|
});
|
|
1677
1854
|
Checkbox.displayName = "Checkbox";
|
|
1678
1855
|
|
|
1679
|
-
const chipVariants = classVarianceAuthority.cva("inline-flex items-center justify-center whitespace-nowrap rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none", {
|
|
1680
|
-
variants: {
|
|
1681
|
-
intent: {
|
|
1682
|
-
primary: "",
|
|
1683
|
-
positive: "",
|
|
1684
|
-
negative: "",
|
|
1685
|
-
},
|
|
1686
|
-
selection: {
|
|
1687
|
-
default: "",
|
|
1688
|
-
light: "",
|
|
1689
|
-
intense: "",
|
|
1690
|
-
},
|
|
1691
|
-
size: {
|
|
1692
|
-
xsmall: "h-[24px] px-3 gap-2 text-body-small-medium",
|
|
1693
|
-
small: "h-[28px] px-4 gap-2 text-body-medium-medium",
|
|
1694
|
-
medium: "h-[36px] px-5 gap-3 text-body-large-medium",
|
|
1695
|
-
large: "h-[44px] px-6 gap-3 text-heading-medium-medium",
|
|
1696
|
-
},
|
|
1697
|
-
isDisabled: {
|
|
1698
|
-
true: "cursor-not-allowed",
|
|
1699
|
-
false: "cursor-pointer",
|
|
1700
|
-
},
|
|
1701
|
-
},
|
|
1702
|
-
compoundVariants: [
|
|
1703
|
-
// Selection: default (neutral chip, intent influences focus ring/border)
|
|
1704
|
-
{
|
|
1705
|
-
selection: "default",
|
|
1706
|
-
class: `
|
|
1707
|
-
bg-surface-fill-neutral-intense
|
|
1708
|
-
text-action-ink-neutral-normal
|
|
1709
|
-
border-action-outline-neutral-faded
|
|
1710
|
-
hover:bg-action-fill-neutral-faded-hover
|
|
1711
|
-
hover:border-action-outline-neutral-faded-hover
|
|
1712
|
-
active:bg-action-fill-neutral-faded-activated
|
|
1713
|
-
active:border-action-outline-neutral-faded-activated
|
|
1714
|
-
disabled:bg-surface-fill-neutral-moderate
|
|
1715
|
-
disabled:text-surface-ink-neutral-disabled
|
|
1716
|
-
disabled:border-action-outline-neutral-disabled
|
|
1717
|
-
`,
|
|
1718
|
-
},
|
|
1719
|
-
{
|
|
1720
|
-
selection: "default",
|
|
1721
|
-
intent: "primary",
|
|
1722
|
-
class: "focus-visible:ring-action-outline-primary-faded-hover focus-visible:border-action-outline-primary-faded-hover",
|
|
1723
|
-
},
|
|
1724
|
-
{
|
|
1725
|
-
selection: "default",
|
|
1726
|
-
intent: "positive",
|
|
1727
|
-
class: "focus-visible:ring-action-outline-positive-faded-hover focus-visible:border-action-outline-positive-faded-hover",
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
selection: "default",
|
|
1731
|
-
intent: "negative",
|
|
1732
|
-
class: "focus-visible:ring-action-outline-negative-faded-hover focus-visible:border-action-outline-negative-faded-hover",
|
|
1733
|
-
},
|
|
1734
|
-
// Selection: light
|
|
1735
|
-
{
|
|
1736
|
-
selection: "light",
|
|
1737
|
-
intent: "primary",
|
|
1738
|
-
class: `
|
|
1739
|
-
bg-action-fill-primary-faded
|
|
1740
|
-
text-action-ink-primary-normal
|
|
1741
|
-
border-action-outline-primary-faded
|
|
1742
|
-
hover:bg-action-fill-primary-faded-hover
|
|
1743
|
-
hover:border-action-outline-primary-faded-hover
|
|
1744
|
-
active:bg-action-fill-primary-faded-activated
|
|
1745
|
-
active:border-action-outline-primary-faded-activated
|
|
1746
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1747
|
-
disabled:bg-action-fill-primary-disabled
|
|
1748
|
-
disabled:text-action-ink-primary-disabled
|
|
1749
|
-
disabled:border-action-outline-primary-disabled
|
|
1750
|
-
`,
|
|
1751
|
-
},
|
|
1752
|
-
{
|
|
1753
|
-
selection: "light",
|
|
1754
|
-
intent: "positive",
|
|
1755
|
-
class: `
|
|
1756
|
-
bg-action-fill-positive-faded
|
|
1757
|
-
text-action-ink-positive-normal
|
|
1758
|
-
border-action-outline-positive-faded
|
|
1759
|
-
hover:bg-action-fill-positive-faded-hover
|
|
1760
|
-
hover:border-action-outline-positive-faded-hover
|
|
1761
|
-
active:bg-action-fill-positive-faded-activated
|
|
1762
|
-
active:border-action-outline-positive-faded-activated
|
|
1763
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1764
|
-
disabled:bg-action-fill-positive-disabled
|
|
1765
|
-
disabled:text-action-ink-positive-disabled
|
|
1766
|
-
disabled:border-action-outline-positive-disabled
|
|
1767
|
-
`,
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
selection: "light",
|
|
1771
|
-
intent: "negative",
|
|
1772
|
-
class: `
|
|
1773
|
-
bg-action-fill-negative-faded
|
|
1774
|
-
text-action-ink-negative-normal
|
|
1775
|
-
border-action-outline-negative-faded
|
|
1776
|
-
hover:bg-action-fill-negative-faded-hover
|
|
1777
|
-
hover:border-action-outline-negative-faded-hover
|
|
1778
|
-
active:bg-action-fill-negative-faded-activated
|
|
1779
|
-
active:border-action-outline-negative-faded-activated
|
|
1780
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1781
|
-
disabled:bg-action-fill-negative-disabled
|
|
1782
|
-
disabled:text-action-ink-negative-disabled
|
|
1783
|
-
disabled:border-action-outline-negative-disabled
|
|
1784
|
-
`,
|
|
1785
|
-
},
|
|
1786
|
-
// Selection: intense
|
|
1787
|
-
{
|
|
1788
|
-
selection: "intense",
|
|
1789
|
-
intent: "primary",
|
|
1790
|
-
class: `
|
|
1791
|
-
bg-action-fill-primary-default
|
|
1792
|
-
text-action-ink-on-primary-normal
|
|
1793
|
-
border-transparent
|
|
1794
|
-
hover:bg-action-fill-primary-hover
|
|
1795
|
-
active:bg-action-fill-primary-activated
|
|
1796
|
-
focus-visible:ring-action-outline-primary-faded-hover
|
|
1797
|
-
disabled:bg-action-fill-primary-disabled
|
|
1798
|
-
disabled:text-action-ink-primary-disabled
|
|
1799
|
-
`,
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
selection: "intense",
|
|
1803
|
-
intent: "positive",
|
|
1804
|
-
class: `
|
|
1805
|
-
bg-action-fill-positive-default
|
|
1806
|
-
text-action-ink-on-primary-normal
|
|
1807
|
-
border-transparent
|
|
1808
|
-
hover:bg-action-fill-positive-hover
|
|
1809
|
-
active:bg-action-fill-positive-activated
|
|
1810
|
-
focus-visible:ring-action-outline-positive-faded-hover
|
|
1811
|
-
disabled:bg-action-fill-positive-disabled
|
|
1812
|
-
disabled:text-action-ink-positive-disabled
|
|
1813
|
-
`,
|
|
1814
|
-
},
|
|
1815
|
-
{
|
|
1816
|
-
selection: "intense",
|
|
1817
|
-
intent: "negative",
|
|
1818
|
-
class: `
|
|
1819
|
-
bg-action-fill-negative-default
|
|
1820
|
-
text-action-ink-on-primary-normal
|
|
1821
|
-
border-transparent
|
|
1822
|
-
hover:bg-action-fill-negative-hover
|
|
1823
|
-
active:bg-action-fill-negative-activated
|
|
1824
|
-
focus-visible:ring-action-outline-negative-faded-hover
|
|
1825
|
-
disabled:bg-action-fill-negative-disabled
|
|
1826
|
-
disabled:text-action-ink-negative-disabled
|
|
1827
|
-
`,
|
|
1828
|
-
},
|
|
1829
|
-
],
|
|
1830
|
-
defaultVariants: {
|
|
1831
|
-
intent: "primary",
|
|
1832
|
-
selection: "default",
|
|
1833
|
-
size: "medium",
|
|
1834
|
-
isDisabled: false,
|
|
1835
|
-
},
|
|
1836
|
-
});
|
|
1837
|
-
const Chip = React__namespace.forwardRef(({ className, intent = "primary", selection = "default", size = "medium", isDisabled = false, leadingComponent, trailingComponent, disabled, children, type, ...props }, ref) => {
|
|
1838
|
-
const finalDisabled = Boolean(disabled || isDisabled);
|
|
1839
|
-
return (jsxRuntime.jsxs("button", { ref: ref, type: type ?? "button", disabled: finalDisabled, className: cn(chipVariants({
|
|
1840
|
-
intent,
|
|
1841
|
-
selection,
|
|
1842
|
-
size,
|
|
1843
|
-
isDisabled: finalDisabled,
|
|
1844
|
-
}), className), ...props, children: [leadingComponent && (jsxRuntime.jsx("span", { className: "inline-flex items-center", children: leadingComponent })), jsxRuntime.jsx("span", { className: "inline-flex items-center", children: children }), trailingComponent && (jsxRuntime.jsx("span", { className: "inline-flex items-center", children: trailingComponent }))] }));
|
|
1845
|
-
});
|
|
1846
|
-
Chip.displayName = "Chip";
|
|
1847
|
-
|
|
1848
1856
|
const counterVariants = classVarianceAuthority.cva("inline-flex items-center justify-center transition-colors", {
|
|
1849
1857
|
variants: {
|
|
1850
1858
|
size: {
|
|
@@ -2634,7 +2642,7 @@ const DatePicker = React__namespace.forwardRef(({ className, value: controlledVa
|
|
|
2634
2642
|
});
|
|
2635
2643
|
DatePicker.displayName = "DatePicker";
|
|
2636
2644
|
|
|
2637
|
-
const listItemVariants = classVarianceAuthority.cva("flex
|
|
2645
|
+
const listItemVariants = classVarianceAuthority.cva("flex items-start gap-3 p-3 rounded-medium transition-colors cursor-pointer", {
|
|
2638
2646
|
variants: {
|
|
2639
2647
|
variant: {
|
|
2640
2648
|
default: `hover:bg-action-fill-neutral-faded
|
|
@@ -2700,7 +2708,7 @@ const ListItem = React__namespace.forwardRef(({ className, type = "single", lead
|
|
|
2700
2708
|
variant,
|
|
2701
2709
|
isDisabled,
|
|
2702
2710
|
isSelected: type === "multiple" ? internalSelected : false,
|
|
2703
|
-
}),
|
|
2711
|
+
}), containerClassName), onClick: handleClick, role: type === "multiple" ? "checkbox" : "button", "aria-checked": type === "multiple" ? internalSelected : undefined, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : 0, ...props, children: [type === "multiple" && (jsxRuntime.jsx(Checkbox, { checked: internalSelected, onChange: handleCheckboxChange, isDisabled: isDisabled, size: checkboxSize, className: "shrink-0 mt-0.5" })), leadingIcon && (jsxRuntime.jsx("div", { className: cn(`shrink-0 flex items-center justify-center mt-0.5`, variant === "primary"
|
|
2704
2712
|
? "text-action-ink-primary-normal"
|
|
2705
2713
|
: variant === "negative"
|
|
2706
2714
|
? "text-action-ink-negative-normal"
|
|
@@ -2835,7 +2843,7 @@ const formatMonthYear = (date) => {
|
|
|
2835
2843
|
year: "numeric",
|
|
2836
2844
|
});
|
|
2837
2845
|
};
|
|
2838
|
-
const DateRangePicker = React__namespace.forwardRef(({ className, value: controlledValue, defaultValue, onChange, placeholder = "Select date range", isDisabled = false, size = "medium",
|
|
2846
|
+
const DateRangePicker = React__namespace.forwardRef(({ className, value: controlledValue, defaultValue, onChange, placeholder = "Select date range", isDisabled = false, size = "medium", triggerClassName, calendarClassName, minDate, maxDate, formatDate = formatDateDefault, presets = defaultPresets, showPresets = true, selectedPresetLabel, ...props }, ref) => {
|
|
2839
2847
|
const [uncontrolledValue, setUncontrolledValue] = React__namespace.useState(defaultValue || { startDate: null, endDate: null });
|
|
2840
2848
|
const [tempValue, setTempValue] = React__namespace.useState(defaultValue || { startDate: null, endDate: null });
|
|
2841
2849
|
const [isOpen, setIsOpen] = React__namespace.useState(false);
|
|
@@ -3058,19 +3066,14 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3058
3066
|
}
|
|
3059
3067
|
return placeholder;
|
|
3060
3068
|
};
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
? "text-surface-ink-neutral-disabled"
|
|
3070
|
-
: "text-surface-ink-neutral-muted") }), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: displayText }), jsxRuntime.jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
3071
|
-
? "text-surface-ink-neutral-disabled"
|
|
3072
|
-
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }));
|
|
3073
|
-
return (jsxRuntime.jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [triggerElement, typeof document !== "undefined" &&
|
|
3069
|
+
return (jsxRuntime.jsxs("div", { ref: datePickerRef, className: cn("relative w-fit", className), children: [jsxRuntime.jsxs("div", { className: cn(dateRangePickerVariants({
|
|
3070
|
+
size,
|
|
3071
|
+
isDisabled,
|
|
3072
|
+
}), "cursor-pointer", triggerClassName), onClick: !isDisabled ? toggleOpen : undefined, role: "button", "aria-haspopup": "dialog", "aria-expanded": isOpen, "aria-disabled": isDisabled, ...props, children: [jsxRuntime.jsx(lucideReact.Calendar, { className: cn("shrink-0 w-4 h-4", isDisabled
|
|
3073
|
+
? "text-surface-ink-neutral-disabled"
|
|
3074
|
+
: "text-surface-ink-neutral-muted") }), jsxRuntime.jsx("span", { className: cn("flex-1 text-left truncate", !hasValue && "text-surface-ink-neutral-muted", isDisabled && "text-surface-ink-neutral-disabled"), children: getDisplayText() }), jsxRuntime.jsx(Icon, { name: "chevronDown", size: 16, className: cn("shrink-0 transition-transform", isDisabled
|
|
3075
|
+
? "text-surface-ink-neutral-disabled"
|
|
3076
|
+
: "text-surface-ink-neutral-muted", isOpen && "rotate-180") })] }), typeof document !== "undefined" &&
|
|
3074
3077
|
isOpen &&
|
|
3075
3078
|
!isDisabled &&
|
|
3076
3079
|
(() => {
|
|
@@ -3089,7 +3092,7 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3089
3092
|
? `${window.innerHeight - position.bottom - gap - 10}px`
|
|
3090
3093
|
: `${position.top - gap - 10}px`,
|
|
3091
3094
|
overflowY: "auto",
|
|
3092
|
-
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border
|
|
3095
|
+
}, className: cn("bg-surface-fill-neutral-intense rounded-large shadow-lg border border-surface-outline-neutral-subtle", calendarClassName), onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsxs("div", { className: "flex", children: [showPresets && presets.length > 0 && (jsxRuntime.jsx("div", { className: "w-48 border-r border-surface-outline-neutral-subtle p-4 flex flex-col", children: presets.map((preset) => (jsxRuntime.jsx(ListItem, { title: preset.label, type: "single", showChevron: false, isSelected: selectedPreset === preset.value, onClick: () => handlePresetClick(preset), containerClassName: "mb-1 last:mb-0" }, preset.value))) })), jsxRuntime.jsxs("div", { className: "p-4", children: [jsxRuntime.jsxs("div", { className: "flex gap-6", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [jsxRuntime.jsx("div", { className: "flex flex-col px-3", children: jsxRuntime.jsx("p", { className: "text-body-small-medium", children: "Start Date" }) }), jsxRuntime.jsxs("div", { className: "flex flex-col p-5 rounded-[8px] bg-surface-fill-neutral-moderate", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3 px-3", children: [jsxRuntime.jsx("h3", { className: "text-body-small-medium font-medium text-surface-ink-neutral-normal", children: formatMonthYear(startMonth) }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("button", { onClick: handlePrevStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Previous month", children: jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) }), jsxRuntime.jsx("button", { onClick: handleNextStartMonth, className: "p-1 hover:bg-surface-fill-neutral-faded rounded transition-colors", "aria-label": "Next month", children: jsxRuntime.jsx(lucideReact.ChevronRight, { className: "w-4 h-4 text-surface-ink-neutral-normal" }) })] })] }), jsxRuntime.jsx("div", { className: "date-range-calendar-wrapper", children: jsxRuntime.jsx(Calendar, { onChange: handleStartDateChange, value: tempValue.startDate, minDate: minDateParsed ?? undefined, maxDate: tempValue.endDate
|
|
3093
3096
|
? tempValue.endDate
|
|
3094
3097
|
: maxDateParsed ?? undefined, activeStartDate: startMonth, onActiveStartDateChange: ({ activeStartDate, }) => {
|
|
3095
3098
|
if (activeStartDate)
|
|
@@ -3121,113 +3124,20 @@ const DateRangePicker = React__namespace.forwardRef(({ className, value: control
|
|
|
3121
3124
|
"SAT",
|
|
3122
3125
|
];
|
|
3123
3126
|
return weekdayNames[date.getDay()];
|
|
3124
|
-
} }) })] })] })] })
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3127
|
+
} }) })] })] })] }), jsxRuntime.jsxs("div", { className: "mt-4 pt-4 border-t border-surface-outline-neutral-subtle flex items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "w-2 h-2 rounded-full bg-action-fill-primary-default" }), jsxRuntime.jsx("span", { className: "text-sm text-surface-ink-neutral-normal", children: tempValue.startDate && tempValue.endDate
|
|
3128
|
+
? isSameDay(tempValue.startDate, tempValue.endDate)
|
|
3129
|
+
? "Today"
|
|
3130
|
+
: `${formatDate(tempValue.startDate)} - ${formatDate(tempValue.endDate)}`
|
|
3131
|
+
: tempValue.startDate
|
|
3132
|
+
? `From ${formatDate(tempValue.startDate)}`
|
|
3133
|
+
: tempValue.endDate
|
|
3134
|
+
? `Until ${formatDate(tempValue.endDate)}`
|
|
3135
|
+
: "No selection" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx(Button, { variant: "secondary", color: "neutral", size: "small", onClick: handleCancel, children: "Cancel" }), jsxRuntime.jsx(Button, { variant: "primary", color: "primary", size: "small", onClick: handleApply, children: "Apply date range" })] })] })] })] }) }));
|
|
3133
3136
|
return reactDom.createPortal(calendarPopup, document.body);
|
|
3134
3137
|
})()] }));
|
|
3135
3138
|
});
|
|
3136
3139
|
DateRangePicker.displayName = "DateRangePicker";
|
|
3137
3140
|
|
|
3138
|
-
const dividerVariants = classVarianceAuthority.cva("", {
|
|
3139
|
-
variants: {
|
|
3140
|
-
orientation: {
|
|
3141
|
-
horizontal: "w-full",
|
|
3142
|
-
vertical: "h-full",
|
|
3143
|
-
},
|
|
3144
|
-
thickness: {
|
|
3145
|
-
thinner: "",
|
|
3146
|
-
thin: "",
|
|
3147
|
-
thick: "",
|
|
3148
|
-
thicker: "",
|
|
3149
|
-
},
|
|
3150
|
-
lineStyle: {
|
|
3151
|
-
solid: "border-solid",
|
|
3152
|
-
dashed: "border-dashed",
|
|
3153
|
-
},
|
|
3154
|
-
variant: {
|
|
3155
|
-
normal: "",
|
|
3156
|
-
subtle: "",
|
|
3157
|
-
muted: "",
|
|
3158
|
-
},
|
|
3159
|
-
},
|
|
3160
|
-
compoundVariants: [
|
|
3161
|
-
// Horizontal orientation with thickness
|
|
3162
|
-
{
|
|
3163
|
-
orientation: "horizontal",
|
|
3164
|
-
thickness: "thinner",
|
|
3165
|
-
class: "border-t-[0.5px]",
|
|
3166
|
-
},
|
|
3167
|
-
{
|
|
3168
|
-
orientation: "horizontal",
|
|
3169
|
-
thickness: "thin",
|
|
3170
|
-
class: "border-t-[1px]",
|
|
3171
|
-
},
|
|
3172
|
-
{
|
|
3173
|
-
orientation: "horizontal",
|
|
3174
|
-
thickness: "thick",
|
|
3175
|
-
class: "border-t-[2px]",
|
|
3176
|
-
},
|
|
3177
|
-
{
|
|
3178
|
-
orientation: "horizontal",
|
|
3179
|
-
thickness: "thicker",
|
|
3180
|
-
class: "border-t-[3px]",
|
|
3181
|
-
},
|
|
3182
|
-
// Vertical orientation with thickness
|
|
3183
|
-
{
|
|
3184
|
-
orientation: "vertical",
|
|
3185
|
-
thickness: "thinner",
|
|
3186
|
-
class: "border-l-[0.5px]",
|
|
3187
|
-
},
|
|
3188
|
-
{
|
|
3189
|
-
orientation: "vertical",
|
|
3190
|
-
thickness: "thin",
|
|
3191
|
-
class: "border-l-[1px]",
|
|
3192
|
-
},
|
|
3193
|
-
{
|
|
3194
|
-
orientation: "vertical",
|
|
3195
|
-
thickness: "thick",
|
|
3196
|
-
class: "border-l-[2px]",
|
|
3197
|
-
},
|
|
3198
|
-
{
|
|
3199
|
-
orientation: "vertical",
|
|
3200
|
-
thickness: "thicker",
|
|
3201
|
-
class: "border-l-[3px]",
|
|
3202
|
-
},
|
|
3203
|
-
// Normal variant colors
|
|
3204
|
-
{
|
|
3205
|
-
variant: "normal",
|
|
3206
|
-
class: "border-surface-outline-neutral-normal",
|
|
3207
|
-
},
|
|
3208
|
-
// Subtle variant colors
|
|
3209
|
-
{
|
|
3210
|
-
variant: "subtle",
|
|
3211
|
-
class: "border-surface-outline-neutral-subtle",
|
|
3212
|
-
},
|
|
3213
|
-
// Muted variant colors
|
|
3214
|
-
{
|
|
3215
|
-
variant: "muted",
|
|
3216
|
-
class: "border-surface-outline-neutral-muted",
|
|
3217
|
-
},
|
|
3218
|
-
],
|
|
3219
|
-
defaultVariants: {
|
|
3220
|
-
orientation: "horizontal",
|
|
3221
|
-
thickness: "thin",
|
|
3222
|
-
lineStyle: "solid",
|
|
3223
|
-
variant: "normal",
|
|
3224
|
-
},
|
|
3225
|
-
});
|
|
3226
|
-
const Divider = React__namespace.forwardRef(({ className, orientation = "horizontal", thickness = "thin", lineStyle = "solid", variant = "normal", ...props }, ref) => {
|
|
3227
|
-
return (jsxRuntime.jsx("div", { ref: ref, role: "separator", "aria-orientation": orientation, className: cn(dividerVariants({ orientation, thickness, lineStyle, variant }), className), ...props }));
|
|
3228
|
-
});
|
|
3229
|
-
Divider.displayName = "Divider";
|
|
3230
|
-
|
|
3231
3141
|
const DropdownMenu = React__namespace.forwardRef(({ items = [], customContent, customContentClassName, sectionHeading, isLoading = false, isEmpty = false, emptyTitle = "No Search Results Found", emptyDescription = "Add description of what the user can search for here.", emptyLinkText = "Link to support site", onEmptyLinkClick, primaryButtonText = "Primary", secondaryButtonText = "Secondary", onPrimaryClick, onSecondaryClick, showChevron = false, emptyIcon, disableFooter = false, showFooter, footerLayout = "horizontal", onClose, focusedIndex = -1, className, width = "auto", maxHeight = "400px", }, ref) => {
|
|
3232
3142
|
const renderContent = () => {
|
|
3233
3143
|
if (isLoading) {
|
|
@@ -3450,7 +3360,7 @@ const Modal = React__namespace.forwardRef(({ isOpen, onClose, title, description
|
|
|
3450
3360
|
if (!isOpen)
|
|
3451
3361
|
return null;
|
|
3452
3362
|
const hasHeader = title || description;
|
|
3453
|
-
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4 px-6 pt-6", !description && "pb-4", description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: "absolute top-4 right-4
|
|
3363
|
+
return (jsxRuntime.jsxs("div", { className: cn("fixed inset-0 z-9999 flex items-center justify-center p-4", className), role: "dialog", "aria-modal": "true", "aria-label": ariaLabel || title, "aria-describedby": ariaDescribedBy, children: [jsxRuntime.jsx("div", { className: cn("absolute inset-0 z-0 bg-black/50 backdrop-blur-sm transition-opacity", overlayClassName), onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { ref: contentRef, className: cn("relative transition-all z-10", "flex flex-col max-h-[90vh]", variant === "default" && "w-full bg-white rounded-large shadow-xl", variant === "default" && sizeConfig[size], contentClassName), children: [hasHeader && (jsxRuntime.jsxs("div", { className: cn("flex items-start justify-between gap-4", variant === "default" && "px-6 pt-6", variant === "default" && !description && "pb-4", variant === "default" && description && "pb-2", headerClassName), children: [jsxRuntime.jsxs("div", { className: "flex-1", children: [title && (jsxRuntime.jsx(Text, { as: "h2", variant: "body", size: "large", weight: "semibold", color: "default", children: title })), description && (jsxRuntime.jsx(Text, { as: "p", variant: "body", size: "small", weight: "regular", color: "subtle", className: "mt-1", children: description }))] }), showCloseButton && onClose && (jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal", className: "shrink-0" }))] })), !hasHeader && showCloseButton && onClose && (jsxRuntime.jsx("div", { className: cn("absolute z-10", variant === "default" && "top-4 right-4"), children: jsxRuntime.jsx(IconButton, { icon: "close", onClick: onClose, color: "neutral", size: "small", "aria-label": "Close modal" }) })), jsxRuntime.jsx("div", { className: cn("flex-1 overflow-y-auto", variant === "default" && "px-6", variant === "default" && hasHeader && "py-4", variant === "default" && !hasHeader && "pt-6 pb-4", variant === "default" && !footer && "pb-6", bodyClassName), children: children }), footer && (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [variant === "default" && (jsxRuntime.jsx(Divider, { thickness: "thin", variant: "muted" })), jsxRuntime.jsx("div", { className: cn("flex items-center justify-end gap-3", variant === "default" && "px-6 py-4", footerClassName), children: footer })] }))] })] }));
|
|
3454
3364
|
});
|
|
3455
3365
|
Modal.displayName = "Modal";
|
|
3456
3366
|
|
|
@@ -4809,7 +4719,7 @@ const switchVariants = classVarianceAuthority.cva("relative inline-flex items-ce
|
|
|
4809
4719
|
false: "",
|
|
4810
4720
|
},
|
|
4811
4721
|
isDisabled: {
|
|
4812
|
-
true: "cursor-not-allowed
|
|
4722
|
+
true: "cursor-not-allowed opacity-60",
|
|
4813
4723
|
false: "",
|
|
4814
4724
|
},
|
|
4815
4725
|
isFocused: {
|
|
@@ -5245,12 +5155,11 @@ function AvatarCell({ name, initials, avatar, subtitle, color = "a1", className,
|
|
|
5245
5155
|
return (jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", className), children: [avatar ? (jsxRuntime.jsx("img", { src: avatar, alt: name, className: "w-10 h-10 rounded-full object-cover" })) : (jsxRuntime.jsx("div", { className: cn("w-10 h-10 rounded-full flex items-center justify-center text-body-medium-medium", `bg-${color}`), children: initials || name.charAt(0).toUpperCase() })), jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsx("div", { className: "text-body-medium-medium text-surface-ink-neutral-normal", children: name }), subtitle && (jsxRuntime.jsx("div", { className: "text-body-small-regular text-surface-ink-neutral-muted", children: subtitle }))] })] }));
|
|
5246
5156
|
}
|
|
5247
5157
|
|
|
5248
|
-
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer`, {
|
|
5158
|
+
const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center justify-center gap-3 whitespace-nowrap transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 relative cursor-pointer -mb-[1.5px]`, {
|
|
5249
5159
|
variants: {
|
|
5250
5160
|
variant: {
|
|
5251
|
-
bordered: "border-b-[1.5px]
|
|
5252
|
-
borderless: "border-b-[1.5px]
|
|
5253
|
-
segmented: "rounded-lg",
|
|
5161
|
+
bordered: "border-b-[1.5px]",
|
|
5162
|
+
borderless: "border-b-[1.5px]",
|
|
5254
5163
|
},
|
|
5255
5164
|
size: {
|
|
5256
5165
|
small: "px-2 py-3 h-9",
|
|
@@ -5323,44 +5232,6 @@ const tabItemVariants = classVarianceAuthority.cva(`inline-flex items-center jus
|
|
|
5323
5232
|
isDisabled: true,
|
|
5324
5233
|
class: "text-text-body-disabled border-b-transparent",
|
|
5325
5234
|
},
|
|
5326
|
-
// Segmented variant - not selected
|
|
5327
|
-
{
|
|
5328
|
-
variant: "segmented",
|
|
5329
|
-
isSelected: false,
|
|
5330
|
-
isDisabled: false,
|
|
5331
|
-
class: `text-action-ink-neutral-muted
|
|
5332
|
-
hover:text-action-ink-neutral-subtle
|
|
5333
|
-
hover:bg-action-fill-neutral-faded-hover`,
|
|
5334
|
-
},
|
|
5335
|
-
// Segmented variant - selected
|
|
5336
|
-
{
|
|
5337
|
-
variant: "segmented",
|
|
5338
|
-
isSelected: true,
|
|
5339
|
-
isDisabled: false,
|
|
5340
|
-
class: "bg-action-fill-primary-faded text-action-ink-primary-subtle hover:text-action-ink-primary-normal",
|
|
5341
|
-
},
|
|
5342
|
-
// Segmented variant - disabled
|
|
5343
|
-
{
|
|
5344
|
-
variant: "segmented",
|
|
5345
|
-
isDisabled: true,
|
|
5346
|
-
class: "text-text-body-disabled bg-transparent",
|
|
5347
|
-
},
|
|
5348
|
-
// Segmented variant - size overrides (more compact)
|
|
5349
|
-
{
|
|
5350
|
-
variant: "segmented",
|
|
5351
|
-
size: "small",
|
|
5352
|
-
class: "px-3 py-1.5 h-auto! rounded-[4px]",
|
|
5353
|
-
},
|
|
5354
|
-
{
|
|
5355
|
-
variant: "segmented",
|
|
5356
|
-
size: "medium",
|
|
5357
|
-
class: "px-4 py-2 h-auto! rounded-[4px]",
|
|
5358
|
-
},
|
|
5359
|
-
{
|
|
5360
|
-
variant: "segmented",
|
|
5361
|
-
size: "large",
|
|
5362
|
-
class: "py-2 px-4 h-auto! rounded-[4px]",
|
|
5363
|
-
},
|
|
5364
5235
|
],
|
|
5365
5236
|
defaultVariants: {
|
|
5366
5237
|
variant: "bordered",
|
|
@@ -5396,11 +5267,9 @@ const Tabs = React__namespace.forwardRef(({ tabs, selectedTabId, defaultSelected
|
|
|
5396
5267
|
};
|
|
5397
5268
|
// Get the active tab content
|
|
5398
5269
|
const activeTab = tabs.find((tab) => tab.id === activeTabId);
|
|
5399
|
-
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center", {
|
|
5270
|
+
return (jsxRuntime.jsxs("div", { ref: ref, className: cn("w-full", className), ...props, children: [jsxRuntime.jsx("div", { role: "tablist", className: cn("inline-flex items-center gap-4", {
|
|
5400
5271
|
"w-full": isFullWidth,
|
|
5401
|
-
"
|
|
5402
|
-
"border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5403
|
-
"gap-1 p-1 rounded-xl bg-surface-background-neutral-faded-default": variant === "segmented",
|
|
5272
|
+
"border-b border-b-[1.5px] border-surface-outline-neutral-muted": variant === "bordered",
|
|
5404
5273
|
}, tabListClassName), children: tabs.map((tab) => (jsxRuntime.jsx(TabItem, { id: String(tab.id), leadingComponent: tab.leadingComponent, title: tab.title, trailingComponent: tab.trailingComponent, isSelected: tab.id === activeTabId, isDisabled: tab.isDisabled, variant: variant, size: size, isFullWidth: isFullWidth, onClick: () => !tab.isDisabled && handleTabClick(tab.id) }, tab.id))) }), renderContent && activeTab?.content && (jsxRuntime.jsx("div", { role: "tabpanel", className: cn("mt-4", contentClassName), "aria-labelledby": String(activeTabId), children: activeTab.content }))] }));
|
|
5405
5274
|
});
|
|
5406
5275
|
Tabs.displayName = "Tabs";
|
|
@@ -6189,10 +6058,10 @@ exports.Amount = Amount;
|
|
|
6189
6058
|
exports.Avatar = Avatar;
|
|
6190
6059
|
exports.AvatarCell = AvatarCell;
|
|
6191
6060
|
exports.Badge = Badge;
|
|
6061
|
+
exports.BottomSheet = BottomSheet;
|
|
6192
6062
|
exports.Button = Button;
|
|
6193
6063
|
exports.ButtonGroup = ButtonGroup;
|
|
6194
6064
|
exports.Checkbox = Checkbox;
|
|
6195
|
-
exports.Chip = Chip;
|
|
6196
6065
|
exports.Counter = Counter;
|
|
6197
6066
|
exports.DatePicker = DatePicker;
|
|
6198
6067
|
exports.DateRangePicker = DateRangePicker;
|
|
@@ -6236,7 +6105,6 @@ exports.badgeVariants = badgeVariants;
|
|
|
6236
6105
|
exports.buttonGroupVariants = buttonGroupVariants;
|
|
6237
6106
|
exports.buttonVariants = buttonVariants;
|
|
6238
6107
|
exports.checkboxVariants = checkboxVariants;
|
|
6239
|
-
exports.chipVariants = chipVariants;
|
|
6240
6108
|
exports.cn = cn;
|
|
6241
6109
|
exports.counterVariants = counterVariants;
|
|
6242
6110
|
exports.datePickerVariants = datePickerVariants;
|