@lindle/linoardo 1.0.41 → 1.0.43
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/chunk-F3PI7A6V.js +200 -0
- package/dist/chunk-F3PI7A6V.js.map +1 -0
- package/dist/{chunk-4J3SRVOS.js → chunk-FEGFA3FN.js} +45 -18
- package/dist/chunk-FEGFA3FN.js.map +1 -0
- package/dist/index.cjs +284 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +123 -12
- package/dist/index.js.map +1 -1
- package/dist/select.cjs +128 -105
- package/dist/select.cjs.map +1 -1
- package/dist/select.d.cts +1 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +1 -1
- package/dist/styles.css +47 -0
- package/dist/timeline.cjs +43 -16
- package/dist/timeline.cjs.map +1 -1
- package/dist/timeline.d.cts +4 -1
- package/dist/timeline.d.ts +4 -1
- package/dist/timeline.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4J3SRVOS.js.map +0 -1
- package/dist/chunk-LULQOD2K.js +0 -177
- package/dist/chunk-LULQOD2K.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1473,10 +1473,119 @@ var Dialog = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
|
1473
1473
|
});
|
|
1474
1474
|
Dialog.displayName = "Dialog";
|
|
1475
1475
|
var Dialog_default = Dialog;
|
|
1476
|
+
var overlayBaseClasses3 = "fixed inset-0 z-[55] bg-gray-900/55 backdrop-blur-[2px] transition-opacity duration-200 data-[state=closed]:opacity-0 data-[state=open]:opacity-100";
|
|
1477
|
+
var temporaryContainerBaseClasses = "fixed inset-y-0 z-[60] flex max-w-full transition-transform duration-200";
|
|
1478
|
+
var staticContainerBaseClasses = "relative flex h-full max-w-full";
|
|
1479
|
+
var drawerBaseClasses = "flex h-full w-full flex-col bg-white text-gray-900 shadow-xl shadow-black/10 ring-1 ring-black/5 focus-visible:outline-none dark:bg-gray-900 dark:text-gray-100 dark:ring-white/10";
|
|
1480
|
+
var resolveSizeValue2 = (value) => {
|
|
1481
|
+
if (value === void 0) {
|
|
1482
|
+
return void 0;
|
|
1483
|
+
}
|
|
1484
|
+
return typeof value === "number" ? `${value}px` : value;
|
|
1485
|
+
};
|
|
1486
|
+
var Drawer = React4__namespace.forwardRef((props, ref) => {
|
|
1487
|
+
const {
|
|
1488
|
+
location = "left",
|
|
1489
|
+
floating = false,
|
|
1490
|
+
temporary = false,
|
|
1491
|
+
open,
|
|
1492
|
+
keepMounted = false,
|
|
1493
|
+
scrim = true,
|
|
1494
|
+
width = "18rem",
|
|
1495
|
+
onClose,
|
|
1496
|
+
containerClassName,
|
|
1497
|
+
overlayClassName,
|
|
1498
|
+
overlayProps,
|
|
1499
|
+
portal = true,
|
|
1500
|
+
portalContainer,
|
|
1501
|
+
className,
|
|
1502
|
+
style,
|
|
1503
|
+
role,
|
|
1504
|
+
...rest
|
|
1505
|
+
} = props;
|
|
1506
|
+
const isOpen = open ?? !temporary;
|
|
1507
|
+
const state = isOpen ? "open" : "closed";
|
|
1508
|
+
const shouldRender = keepMounted || isOpen || temporary;
|
|
1509
|
+
const resolvedPortalContainer = portalContainer ?? (typeof document !== "undefined" ? document.body : null);
|
|
1510
|
+
const resolvedStyle = { ...style };
|
|
1511
|
+
if (resolvedStyle.width === void 0) {
|
|
1512
|
+
resolvedStyle.width = resolveSizeValue2(width);
|
|
1513
|
+
}
|
|
1514
|
+
const locationClass = location === "right" ? "right-0" : "left-0";
|
|
1515
|
+
const translateClass = isOpen ? "translate-x-0" : location === "right" ? "translate-x-full" : "-translate-x-full";
|
|
1516
|
+
const floatingClasses = floating ? "rounded-2xl shadow-2xl shadow-black/20 ring-1 ring-black/10 dark:ring-white/10" : void 0;
|
|
1517
|
+
const borderClasses = !floating && !temporary ? location === "right" ? "border-l border-gray-200 dark:border-gray-800" : "border-r border-gray-200 dark:border-gray-800" : void 0;
|
|
1518
|
+
const {
|
|
1519
|
+
className: overlayExtraClassName,
|
|
1520
|
+
onClick: overlayOnClick,
|
|
1521
|
+
...restOverlayProps
|
|
1522
|
+
} = overlayProps ?? {};
|
|
1523
|
+
const overlayNode = temporary && scrim && shouldRender ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1524
|
+
"div",
|
|
1525
|
+
{
|
|
1526
|
+
...restOverlayProps,
|
|
1527
|
+
className: tailwindMerge.twMerge(
|
|
1528
|
+
overlayBaseClasses3,
|
|
1529
|
+
isOpen ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0",
|
|
1530
|
+
overlayClassName,
|
|
1531
|
+
overlayExtraClassName
|
|
1532
|
+
),
|
|
1533
|
+
onClick: (event) => {
|
|
1534
|
+
overlayOnClick?.(event);
|
|
1535
|
+
if (!event.defaultPrevented) {
|
|
1536
|
+
onClose?.();
|
|
1537
|
+
}
|
|
1538
|
+
},
|
|
1539
|
+
"data-state": state,
|
|
1540
|
+
"aria-hidden": true
|
|
1541
|
+
}
|
|
1542
|
+
) : null;
|
|
1543
|
+
const drawerNode = shouldRender ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1544
|
+
"div",
|
|
1545
|
+
{
|
|
1546
|
+
className: tailwindMerge.twMerge(
|
|
1547
|
+
temporary ? temporaryContainerBaseClasses : staticContainerBaseClasses,
|
|
1548
|
+
temporary ? locationClass : void 0,
|
|
1549
|
+
temporary ? translateClass : void 0,
|
|
1550
|
+
temporary && !isOpen ? "pointer-events-none" : void 0,
|
|
1551
|
+
temporary && floating ? "p-4" : void 0,
|
|
1552
|
+
!temporary && location === "right" ? "ml-auto" : void 0,
|
|
1553
|
+
containerClassName
|
|
1554
|
+
),
|
|
1555
|
+
"data-state": state,
|
|
1556
|
+
"aria-hidden": temporary ? !isOpen : void 0,
|
|
1557
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1558
|
+
"div",
|
|
1559
|
+
{
|
|
1560
|
+
...rest,
|
|
1561
|
+
ref,
|
|
1562
|
+
role: role ?? "navigation",
|
|
1563
|
+
className: tailwindMerge.twMerge(drawerBaseClasses, floatingClasses, borderClasses, className),
|
|
1564
|
+
style: resolvedStyle,
|
|
1565
|
+
"data-state": state,
|
|
1566
|
+
children: props.children
|
|
1567
|
+
}
|
|
1568
|
+
)
|
|
1569
|
+
}
|
|
1570
|
+
) : null;
|
|
1571
|
+
const outputNode = temporary && portal && resolvedPortalContainer && drawerNode ? reactDom.createPortal(
|
|
1572
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1573
|
+
overlayNode,
|
|
1574
|
+
drawerNode
|
|
1575
|
+
] }),
|
|
1576
|
+
resolvedPortalContainer
|
|
1577
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1578
|
+
overlayNode,
|
|
1579
|
+
drawerNode
|
|
1580
|
+
] });
|
|
1581
|
+
return outputNode;
|
|
1582
|
+
});
|
|
1583
|
+
Drawer.displayName = "Drawer";
|
|
1584
|
+
var Drawer_default = Drawer;
|
|
1476
1585
|
var tooltipBaseClasses = "absolute z-[60] max-w-xs rounded-lg border border-white/10 bg-gray-900 px-3 py-2 text-xs font-medium text-white shadow-lg shadow-black/30 ring-1 ring-black/40 transition-all duration-150";
|
|
1477
1586
|
var wrapperBaseClasses = "relative inline-flex max-w-full align-middle";
|
|
1478
1587
|
var arrowBaseClasses = "pointer-events-none absolute h-2 w-2 rotate-45 border border-white/10 bg-gray-900 shadow-lg shadow-black/20";
|
|
1479
|
-
var
|
|
1588
|
+
var resolveSizeValue3 = (value) => {
|
|
1480
1589
|
if (value === void 0) {
|
|
1481
1590
|
return void 0;
|
|
1482
1591
|
}
|
|
@@ -1534,7 +1643,7 @@ var ToolTip = React4__namespace.forwardRef((props, forwardedRef) => {
|
|
|
1534
1643
|
const shouldRenderTooltip = hasRenderableContent && (shouldEnableTriggers || keepMounted);
|
|
1535
1644
|
const resolvedStyle = { ...style };
|
|
1536
1645
|
if (resolvedStyle.maxWidth === void 0) {
|
|
1537
|
-
resolvedStyle.maxWidth =
|
|
1646
|
+
resolvedStyle.maxWidth = resolveSizeValue3(maxWidth);
|
|
1538
1647
|
}
|
|
1539
1648
|
const baseVisibility = persistent ? "opacity-100 scale-100" : "opacity-0 scale-95";
|
|
1540
1649
|
const hoverClasses = !persistent && showOnHover ? " group-hover/tooltip:opacity-100 group-hover/tooltip:scale-100" : "";
|
|
@@ -2211,6 +2320,7 @@ var Tab = React4__namespace.forwardRef((props, ref) => {
|
|
|
2211
2320
|
children,
|
|
2212
2321
|
__tabsContext,
|
|
2213
2322
|
__tabsValue,
|
|
2323
|
+
__tabsIndex,
|
|
2214
2324
|
__tabsTabId,
|
|
2215
2325
|
__tabsPanelId,
|
|
2216
2326
|
...rest
|
|
@@ -3390,118 +3500,141 @@ var resolveIconClassName5 = (icon) => {
|
|
|
3390
3500
|
const classes = [...baseClasses, normalizedName];
|
|
3391
3501
|
return Array.from(new Set(classes)).join(" ");
|
|
3392
3502
|
};
|
|
3393
|
-
var Select = React4__namespace.default.forwardRef(
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3503
|
+
var Select = React4__namespace.default.forwardRef(
|
|
3504
|
+
({
|
|
3505
|
+
options,
|
|
3506
|
+
label,
|
|
3507
|
+
placeholder,
|
|
3508
|
+
variant = "outline",
|
|
3509
|
+
size = "medium",
|
|
3510
|
+
className,
|
|
3511
|
+
wrapperClassName,
|
|
3512
|
+
id,
|
|
3513
|
+
name,
|
|
3514
|
+
multiple,
|
|
3515
|
+
value,
|
|
3516
|
+
defaultValue,
|
|
3517
|
+
error,
|
|
3518
|
+
helperText,
|
|
3519
|
+
disabled,
|
|
3520
|
+
required,
|
|
3521
|
+
onChange,
|
|
3522
|
+
onBlur,
|
|
3523
|
+
onFocus,
|
|
3524
|
+
...props
|
|
3525
|
+
}, ref) => {
|
|
3526
|
+
const selectId = id || name || generateString();
|
|
3527
|
+
const inputName = name || selectId;
|
|
3528
|
+
const variantClass = variantClasses4[variant] ?? variantClasses4.outline;
|
|
3529
|
+
const sizeConfig = sizeClasses3[size] ?? sizeClasses3.medium;
|
|
3530
|
+
const sizeClass = `${sizeConfig.padding} ${sizeConfig.text}`;
|
|
3531
|
+
const normalizedOptions = options.map(normalizeOption);
|
|
3532
|
+
const selectedValueList = value !== void 0 ? (Array.isArray(value) ? value : [value]).map(String) : defaultValue !== void 0 ? (Array.isArray(defaultValue) ? defaultValue : [defaultValue]).map(String) : [];
|
|
3533
|
+
const selectedLabels = normalizedOptions.filter((option) => selectedValueList.includes(String(option.value))).map((option) => option.label);
|
|
3534
|
+
const hasSelection = selectedLabels.length > 0;
|
|
3535
|
+
const summaryText = hasSelection ? multiple ? selectedLabels.join(", ") : selectedLabels[0] : placeholder || "\xA0";
|
|
3536
|
+
const handleOptionChange = (event) => {
|
|
3537
|
+
onChange?.(event);
|
|
3538
|
+
if (multiple) return;
|
|
3539
|
+
const detailsEl = event.currentTarget.closest("details");
|
|
3540
|
+
detailsEl?.removeAttribute("open");
|
|
3541
|
+
};
|
|
3542
|
+
const handleDetailsBlur = (event) => {
|
|
3543
|
+
const nextFocus = event.relatedTarget;
|
|
3544
|
+
if (nextFocus && event.currentTarget.contains(nextFocus)) return;
|
|
3545
|
+
event.currentTarget.removeAttribute("open");
|
|
3546
|
+
};
|
|
3547
|
+
const handleDetailsFocus = (event) => {
|
|
3548
|
+
if (normalizedOptions.length === 0) {
|
|
3549
|
+
onFocus?.(event);
|
|
3550
|
+
}
|
|
3551
|
+
};
|
|
3552
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex flex-col gap-1", wrapperClassName), children: [
|
|
3553
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3433
3554
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3434
|
-
"
|
|
3555
|
+
"details",
|
|
3435
3556
|
{
|
|
3436
|
-
className:
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
error && "border-red-500 focus-visible:border-red-500 focus-visible:ring-red-500",
|
|
3442
|
-
disabled && "pointer-events-none opacity-50 cursor-not-allowed",
|
|
3443
|
-
className
|
|
3444
|
-
),
|
|
3445
|
-
style: { minHeight: "2.75rem" },
|
|
3446
|
-
onClick: (e) => disabled && e.preventDefault(),
|
|
3557
|
+
className: "group w-full",
|
|
3558
|
+
...props,
|
|
3559
|
+
onBlur: onBlur ? void 0 : handleDetailsBlur,
|
|
3560
|
+
onFocus: onFocus ? handleDetailsFocus : void 0,
|
|
3561
|
+
open: void 0,
|
|
3447
3562
|
children: [
|
|
3448
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3449
|
-
|
|
3563
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3564
|
+
"summary",
|
|
3565
|
+
{
|
|
3566
|
+
className: tailwindMerge.twMerge(
|
|
3567
|
+
baseClass2,
|
|
3568
|
+
variantClass,
|
|
3569
|
+
sizeClass,
|
|
3570
|
+
"list-none cursor-pointer flex items-center justify-between pr-10 relative [&::-webkit-details-marker]:hidden",
|
|
3571
|
+
error && "border-red-500 focus-visible:border-red-500 focus-visible:ring-red-500",
|
|
3572
|
+
disabled && "pointer-events-none opacity-50 cursor-not-allowed",
|
|
3573
|
+
className
|
|
3574
|
+
),
|
|
3575
|
+
style: { minHeight: "2.75rem" },
|
|
3576
|
+
onClick: (e) => disabled && e.preventDefault(),
|
|
3577
|
+
children: [
|
|
3578
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("truncate", !hasSelection && "text-gray-500 dark:text-gray-400"), children: summaryText }),
|
|
3579
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute inset-y-0 right-3 flex items-center text-gray-500 dark:text-gray-300", children: /* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-chevron-down text-base leading-none transition-transform duration-200 group-open:rotate-180", "aria-hidden": true }) })
|
|
3580
|
+
]
|
|
3581
|
+
}
|
|
3582
|
+
),
|
|
3583
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-lg border border-gray-200 bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-slate-800 dark:border-slate-700", children: normalizedOptions.map((option, index) => {
|
|
3584
|
+
const optionValueStr = String(option.value);
|
|
3585
|
+
const isSelected = Array.isArray(value) ? value.map(String).includes(optionValueStr) : String(value) === optionValueStr;
|
|
3586
|
+
const isDefaultSelected = Array.isArray(defaultValue) ? defaultValue.map(String).includes(optionValueStr) : String(defaultValue) === optionValueStr;
|
|
3587
|
+
const iconClassName = resolveIconClassName5(option.icon);
|
|
3588
|
+
const inputId = `${selectId}-${toIdSafe(optionValueStr)}-${index}`;
|
|
3589
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3590
|
+
"label",
|
|
3591
|
+
{
|
|
3592
|
+
htmlFor: inputId,
|
|
3593
|
+
className: tailwindMerge.twMerge(
|
|
3594
|
+
"relative flex cursor-pointer select-none items-center gap-2 px-4 py-2 text-sm text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-slate-700",
|
|
3595
|
+
option.disabled && "cursor-not-allowed opacity-50"
|
|
3596
|
+
),
|
|
3597
|
+
children: [
|
|
3598
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3599
|
+
"input",
|
|
3600
|
+
{
|
|
3601
|
+
type: multiple ? "checkbox" : "radio",
|
|
3602
|
+
id: inputId,
|
|
3603
|
+
name: inputName,
|
|
3604
|
+
value: option.value,
|
|
3605
|
+
disabled: option.disabled || disabled,
|
|
3606
|
+
checked: value !== void 0 ? isSelected : void 0,
|
|
3607
|
+
defaultChecked: defaultValue !== void 0 ? isDefaultSelected : void 0,
|
|
3608
|
+
onChange: handleOptionChange,
|
|
3609
|
+
onBlur,
|
|
3610
|
+
ref,
|
|
3611
|
+
required: required && !multiple,
|
|
3612
|
+
className: "peer sr-only"
|
|
3613
|
+
}
|
|
3614
|
+
),
|
|
3615
|
+
iconClassName && /* @__PURE__ */ jsxRuntime.jsx("i", { className: tailwindMerge.twMerge(iconClassName, "text-lg text-gray-500 peer-checked:text-primary dark:text-gray-400") }),
|
|
3616
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate peer-checked:font-medium peer-checked:text-primary", children: option.label }),
|
|
3617
|
+
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-check invisible ml-auto text-primary peer-checked:visible" })
|
|
3618
|
+
]
|
|
3619
|
+
},
|
|
3620
|
+
`${optionValueStr}-${index}`
|
|
3621
|
+
);
|
|
3622
|
+
}) })
|
|
3450
3623
|
]
|
|
3451
3624
|
}
|
|
3452
3625
|
),
|
|
3453
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
"label",
|
|
3461
|
-
{
|
|
3462
|
-
htmlFor: inputId,
|
|
3463
|
-
className: tailwindMerge.twMerge(
|
|
3464
|
-
"relative flex cursor-pointer select-none items-center gap-2 px-4 py-2 text-sm text-gray-900 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-slate-700",
|
|
3465
|
-
option.disabled && "cursor-not-allowed opacity-50"
|
|
3466
|
-
),
|
|
3467
|
-
children: [
|
|
3468
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3469
|
-
"input",
|
|
3470
|
-
{
|
|
3471
|
-
type: multiple ? "checkbox" : "radio",
|
|
3472
|
-
id: inputId,
|
|
3473
|
-
name: inputName,
|
|
3474
|
-
value: option.value,
|
|
3475
|
-
disabled: option.disabled || disabled,
|
|
3476
|
-
checked: value !== void 0 ? isSelected : void 0,
|
|
3477
|
-
defaultChecked: defaultValue !== void 0 ? isDefaultSelected : void 0,
|
|
3478
|
-
onChange: handleOptionChange,
|
|
3479
|
-
onBlur,
|
|
3480
|
-
ref,
|
|
3481
|
-
required: required && !multiple,
|
|
3482
|
-
className: "peer sr-only"
|
|
3483
|
-
}
|
|
3484
|
-
),
|
|
3485
|
-
iconClassName && /* @__PURE__ */ jsxRuntime.jsx("i", { className: tailwindMerge.twMerge(iconClassName, "text-lg text-gray-500 peer-checked:text-primary dark:text-gray-400") }),
|
|
3486
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate peer-checked:font-medium peer-checked:text-primary", children: option.label }),
|
|
3487
|
-
/* @__PURE__ */ jsxRuntime.jsx("i", { className: "mdi mdi-check invisible ml-auto text-primary peer-checked:visible" })
|
|
3488
|
-
]
|
|
3489
|
-
},
|
|
3490
|
-
`${optionValueStr}-${index}`
|
|
3491
|
-
);
|
|
3492
|
-
}) })
|
|
3626
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3627
|
+
"label",
|
|
3628
|
+
{
|
|
3629
|
+
className: tailwindMerge.twMerge("absolute left-3 -top-1.5 text-xs bg-white px-1 text-gray-500 transition-all dark:bg-slate-900 dark:text-gray-400"),
|
|
3630
|
+
children: label
|
|
3631
|
+
}
|
|
3632
|
+
)
|
|
3493
3633
|
] }),
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
children: label
|
|
3499
|
-
}
|
|
3500
|
-
)
|
|
3501
|
-
] }),
|
|
3502
|
-
helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("mt-1 text-xs text-gray-500", error && "text-red-500"), children: helperText })
|
|
3503
|
-
] });
|
|
3504
|
-
});
|
|
3634
|
+
helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: tailwindMerge.twMerge("mt-1 text-xs text-gray-500", error && "text-red-500"), children: helperText })
|
|
3635
|
+
] });
|
|
3636
|
+
}
|
|
3637
|
+
);
|
|
3505
3638
|
Select.displayName = "Select";
|
|
3506
3639
|
var Select_default = Select;
|
|
3507
3640
|
var paletteValues = {
|
|
@@ -4483,6 +4616,7 @@ var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
|
4483
4616
|
className,
|
|
4484
4617
|
children,
|
|
4485
4618
|
__timelineSide = "right",
|
|
4619
|
+
__timelineAxis = "center",
|
|
4486
4620
|
__timelineAlign = "center",
|
|
4487
4621
|
__timelineDensity = "default",
|
|
4488
4622
|
__timelineColor = "primary",
|
|
@@ -4493,20 +4627,25 @@ var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
|
4493
4627
|
__timelineCount = 1,
|
|
4494
4628
|
...rest
|
|
4495
4629
|
} = props;
|
|
4630
|
+
const timelineSide = side ?? __timelineSide;
|
|
4496
4631
|
const resolvedAlign = align ?? __timelineAlign;
|
|
4497
|
-
const resolvedSide = resolveSide(
|
|
4632
|
+
const resolvedSide = resolveSide(timelineSide, __timelineIndex);
|
|
4498
4633
|
const resolvedColor = color ?? __timelineColor;
|
|
4499
4634
|
const dotSizeClass = dotSizeClasses[__timelineDotSize] ?? dotSizeClasses.md;
|
|
4500
4635
|
const dotPalette = resolveDotPalette(resolvedColor, variant);
|
|
4501
4636
|
const iconNode = resolveIconNode3(icon);
|
|
4502
4637
|
const isLast = __timelineIndex >= __timelineCount - 1;
|
|
4503
4638
|
const showLine = !hideLine && !isLast;
|
|
4639
|
+
const hasOpposite = Boolean(opposite);
|
|
4640
|
+
const isAlternate = timelineSide === "alternate";
|
|
4641
|
+
const useAxisLayout = !hasOpposite && !isAlternate && __timelineAxis !== "center";
|
|
4504
4642
|
const lineStyle = {
|
|
4505
4643
|
width: __timelineLineWidth,
|
|
4506
4644
|
backgroundColor: __timelineLineColor
|
|
4507
4645
|
};
|
|
4508
4646
|
const baseItemClass = tailwindMerge.twMerge(
|
|
4509
|
-
"timeline-item grid
|
|
4647
|
+
"timeline-item grid gap-4",
|
|
4648
|
+
useAxisLayout ? __timelineAxis === "left" ? "grid-cols-[auto_1fr]" : "grid-cols-[1fr_auto]" : "grid-cols-[1fr_auto_1fr]",
|
|
4510
4649
|
alignClasses[resolvedAlign] ?? alignClasses.center,
|
|
4511
4650
|
className
|
|
4512
4651
|
);
|
|
@@ -4516,6 +4655,37 @@ var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
|
4516
4655
|
] });
|
|
4517
4656
|
const leftContent = resolvedSide === "left" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-right text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4518
4657
|
const rightContent = resolvedSide === "right" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left", contentClassName), children: contentNode }) : opposite ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col text-left text-sm text-gray-500", oppositeClassName), children: opposite }) : /* @__PURE__ */ jsxRuntime.jsx("div", {});
|
|
4658
|
+
if (useAxisLayout) {
|
|
4659
|
+
const contentAlignClass = resolvedSide === "left" ? "text-left" : "text-right";
|
|
4660
|
+
const contentContainer = /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-col", contentAlignClass, contentClassName), children: contentNode });
|
|
4661
|
+
const dotColumn = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full flex-col items-center", children: [
|
|
4662
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4663
|
+
"span",
|
|
4664
|
+
{
|
|
4665
|
+
className: tailwindMerge.twMerge(
|
|
4666
|
+
"flex items-center justify-center rounded-full ring-4 ring-white",
|
|
4667
|
+
dotSizeClass,
|
|
4668
|
+
dotPalette.dot,
|
|
4669
|
+
dotPalette.ring,
|
|
4670
|
+
dotClassName
|
|
4671
|
+
),
|
|
4672
|
+
children: dot ?? iconNode
|
|
4673
|
+
}
|
|
4674
|
+
),
|
|
4675
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4676
|
+
"span",
|
|
4677
|
+
{
|
|
4678
|
+
className: tailwindMerge.twMerge("mt-3 flex-1 bg-gray-200 dark:bg-gray-700", showLine ? void 0 : "invisible", lineClassName),
|
|
4679
|
+
style: lineStyle,
|
|
4680
|
+
"aria-hidden": true
|
|
4681
|
+
}
|
|
4682
|
+
)
|
|
4683
|
+
] });
|
|
4684
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, ref, className: baseItemClass, children: [
|
|
4685
|
+
__timelineAxis === "left" ? dotColumn : contentContainer,
|
|
4686
|
+
__timelineAxis === "left" ? contentContainer : dotColumn
|
|
4687
|
+
] });
|
|
4688
|
+
}
|
|
4519
4689
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, ref, className: baseItemClass, children: [
|
|
4520
4690
|
leftContent,
|
|
4521
4691
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full flex-col items-center", children: [
|
|
@@ -4535,11 +4705,7 @@ var TimeLineItem = React4__namespace.forwardRef((props, ref) => {
|
|
|
4535
4705
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4536
4706
|
"span",
|
|
4537
4707
|
{
|
|
4538
|
-
className: tailwindMerge.twMerge(
|
|
4539
|
-
"mt-3 flex-1 bg-gray-200 dark:bg-gray-700",
|
|
4540
|
-
showLine ? void 0 : "invisible",
|
|
4541
|
-
lineClassName
|
|
4542
|
-
),
|
|
4708
|
+
className: tailwindMerge.twMerge("mt-3 flex-1 bg-gray-200 dark:bg-gray-700", showLine ? void 0 : "invisible", lineClassName),
|
|
4543
4709
|
style: lineStyle,
|
|
4544
4710
|
"aria-hidden": true
|
|
4545
4711
|
}
|
|
@@ -4559,6 +4725,7 @@ var isTimeLineItem = (child) => {
|
|
|
4559
4725
|
var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
4560
4726
|
const {
|
|
4561
4727
|
side = "right",
|
|
4728
|
+
axis = "center",
|
|
4562
4729
|
align = "center",
|
|
4563
4730
|
density = "default",
|
|
4564
4731
|
color = "primary",
|
|
@@ -4577,6 +4744,7 @@ var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
|
4577
4744
|
}
|
|
4578
4745
|
return React4__namespace.cloneElement(child, {
|
|
4579
4746
|
__timelineSide: side,
|
|
4747
|
+
__timelineAxis: axis,
|
|
4580
4748
|
__timelineAlign: align,
|
|
4581
4749
|
__timelineDensity: density,
|
|
4582
4750
|
__timelineColor: color,
|
|
@@ -4587,15 +4755,7 @@ var TimeLine = React4__namespace.forwardRef((props, ref) => {
|
|
|
4587
4755
|
__timelineCount: childArray.length
|
|
4588
4756
|
});
|
|
4589
4757
|
});
|
|
4590
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4591
|
-
"div",
|
|
4592
|
-
{
|
|
4593
|
-
...rest,
|
|
4594
|
-
ref,
|
|
4595
|
-
className: tailwindMerge.twMerge("timeline flex flex-col", resolvedGap, className),
|
|
4596
|
-
children: resolvedChildren
|
|
4597
|
-
}
|
|
4598
|
-
);
|
|
4758
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, ref, className: tailwindMerge.twMerge("timeline flex flex-col", resolvedGap, className), children: resolvedChildren });
|
|
4599
4759
|
});
|
|
4600
4760
|
TimeLine.displayName = "TimeLine";
|
|
4601
4761
|
var TimeLineWithItem = TimeLine;
|
|
@@ -4610,6 +4770,7 @@ exports.Button = Button_default;
|
|
|
4610
4770
|
exports.Card = Card_default;
|
|
4611
4771
|
exports.Chip = Chip_default;
|
|
4612
4772
|
exports.Dialog = Dialog_default;
|
|
4773
|
+
exports.Drawer = Drawer_default;
|
|
4613
4774
|
exports.ExpansionPanel = ExpansionPanel_default;
|
|
4614
4775
|
exports.ExpansionPanelItem = ExpansionPanelItem_default;
|
|
4615
4776
|
exports.Hero = Hero_default;
|