@cytario/design 9.3.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.js +191 -210
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -168,6 +168,7 @@ import {
|
|
|
168
168
|
Columns3,
|
|
169
169
|
Copy,
|
|
170
170
|
CreditCard,
|
|
171
|
+
Crosshair,
|
|
171
172
|
Database,
|
|
172
173
|
Download,
|
|
173
174
|
Edit,
|
|
@@ -328,6 +329,7 @@ var iconRegistry = {
|
|
|
328
329
|
Columns3,
|
|
329
330
|
Copy,
|
|
330
331
|
CreditCard,
|
|
332
|
+
Crosshair,
|
|
331
333
|
Database,
|
|
332
334
|
Download,
|
|
333
335
|
Edit,
|
|
@@ -489,7 +491,7 @@ var buttonBaseClass = `
|
|
|
489
491
|
inline-flex items-center justify-center gap-2 shrink-0 cursor-pointer
|
|
490
492
|
rounded-full
|
|
491
493
|
font-medium
|
|
492
|
-
leading-
|
|
494
|
+
leading-none
|
|
493
495
|
outline-none transition-colors no-underline
|
|
494
496
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
495
497
|
disabled:opacity-50 disabled:pointer-events-none
|
|
@@ -1070,6 +1072,12 @@ var alignClasses = {
|
|
|
1070
1072
|
center: "text-center",
|
|
1071
1073
|
right: "text-right"
|
|
1072
1074
|
};
|
|
1075
|
+
var sizeStyles2 = {
|
|
1076
|
+
xs: "text-xs h-6",
|
|
1077
|
+
sm: "text-sm h-7",
|
|
1078
|
+
md: "text-base h-8",
|
|
1079
|
+
lg: "text-lg h-10"
|
|
1080
|
+
};
|
|
1073
1081
|
function Input({
|
|
1074
1082
|
as: FieldProp = TextField,
|
|
1075
1083
|
label,
|
|
@@ -1079,6 +1087,7 @@ function Input({
|
|
|
1079
1087
|
type = "text",
|
|
1080
1088
|
size = "md",
|
|
1081
1089
|
prefix,
|
|
1090
|
+
suffix,
|
|
1082
1091
|
align = "left",
|
|
1083
1092
|
isDisabled,
|
|
1084
1093
|
isRequired,
|
|
@@ -1089,6 +1098,29 @@ function Input({
|
|
|
1089
1098
|
const isInvalid = !!errorMessage;
|
|
1090
1099
|
const borderColor = isInvalid ? "border-destructive-border" : "border-border hover:border-border";
|
|
1091
1100
|
const radiusClass = "rounded-md";
|
|
1101
|
+
const inputCx = twMerge8(
|
|
1102
|
+
`
|
|
1103
|
+
w-full
|
|
1104
|
+
bg-transparent text-foreground
|
|
1105
|
+
placeholder:text-muted-foreground
|
|
1106
|
+
outline-none border-none
|
|
1107
|
+
`,
|
|
1108
|
+
sizeStyles2[size],
|
|
1109
|
+
alignClasses[align]
|
|
1110
|
+
);
|
|
1111
|
+
const containerCx = twMerge8(
|
|
1112
|
+
`
|
|
1113
|
+
flex items-center gap-1 px-2
|
|
1114
|
+
border bg-background
|
|
1115
|
+
outline-none transition-colors
|
|
1116
|
+
focus-within:ring-2
|
|
1117
|
+
focus-within:ring-ring
|
|
1118
|
+
focus-within:border-ring
|
|
1119
|
+
`,
|
|
1120
|
+
radiusClass,
|
|
1121
|
+
borderColor,
|
|
1122
|
+
isDisabled && "opacity-50 pointer-events-none"
|
|
1123
|
+
);
|
|
1092
1124
|
return /* @__PURE__ */ jsxs6(
|
|
1093
1125
|
Field,
|
|
1094
1126
|
{
|
|
@@ -1100,69 +1132,11 @@ function Input({
|
|
|
1100
1132
|
className: twMerge8("flex w-full flex-col gap-1", className),
|
|
1101
1133
|
children: [
|
|
1102
1134
|
label && /* @__PURE__ */ jsx14(Label, { isRequired, children: label }),
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
{
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
radiusClass,
|
|
1109
|
-
"border",
|
|
1110
|
-
"bg-background",
|
|
1111
|
-
"outline-none transition-colors",
|
|
1112
|
-
borderColor,
|
|
1113
|
-
"focus-within:ring-2 focus-within:ring-ring focus-within:border-ring",
|
|
1114
|
-
isDisabled && "opacity-50 pointer-events-none"
|
|
1115
|
-
),
|
|
1116
|
-
children: [
|
|
1117
|
-
/* @__PURE__ */ jsx14(
|
|
1118
|
-
"span",
|
|
1119
|
-
{
|
|
1120
|
-
className: twMerge8(
|
|
1121
|
-
"self-stretch flex items-center shrink-0 select-none",
|
|
1122
|
-
"bg-card",
|
|
1123
|
-
"border-r border-r-border",
|
|
1124
|
-
"text-muted-foreground",
|
|
1125
|
-
sizeStyles[size]
|
|
1126
|
-
),
|
|
1127
|
-
children: prefix
|
|
1128
|
-
}
|
|
1129
|
-
),
|
|
1130
|
-
/* @__PURE__ */ jsx14(
|
|
1131
|
-
AriaInput,
|
|
1132
|
-
{
|
|
1133
|
-
placeholder,
|
|
1134
|
-
className: twMerge8(
|
|
1135
|
-
"w-full bg-transparent",
|
|
1136
|
-
sizeStyles[size],
|
|
1137
|
-
alignClasses[align],
|
|
1138
|
-
"text-foreground",
|
|
1139
|
-
"placeholder:text-muted-foreground",
|
|
1140
|
-
"outline-none border-none"
|
|
1141
|
-
)
|
|
1142
|
-
}
|
|
1143
|
-
)
|
|
1144
|
-
]
|
|
1145
|
-
}
|
|
1146
|
-
) : /* @__PURE__ */ jsx14(
|
|
1147
|
-
AriaInput,
|
|
1148
|
-
{
|
|
1149
|
-
placeholder,
|
|
1150
|
-
className: twMerge8(
|
|
1151
|
-
"w-full",
|
|
1152
|
-
sizeStyles[size],
|
|
1153
|
-
alignClasses[align],
|
|
1154
|
-
radiusClass,
|
|
1155
|
-
"border",
|
|
1156
|
-
"text-foreground",
|
|
1157
|
-
"bg-background",
|
|
1158
|
-
"placeholder:text-muted-foreground",
|
|
1159
|
-
"outline-none transition-colors",
|
|
1160
|
-
borderColor,
|
|
1161
|
-
"focus:ring-2 focus:ring-ring focus:border-ring",
|
|
1162
|
-
"disabled:opacity-50 disabled:pointer-events-none"
|
|
1163
|
-
)
|
|
1164
|
-
}
|
|
1165
|
-
),
|
|
1135
|
+
/* @__PURE__ */ jsxs6("div", { className: containerCx, children: [
|
|
1136
|
+
prefix,
|
|
1137
|
+
/* @__PURE__ */ jsx14(AriaInput, { placeholder, className: inputCx }),
|
|
1138
|
+
suffix
|
|
1139
|
+
] }),
|
|
1166
1140
|
description && /* @__PURE__ */ jsx14(Text, { slot: "description", className: "text-sm text-muted-foreground", children: description }),
|
|
1167
1141
|
isInvalid && /* @__PURE__ */ jsx14(
|
|
1168
1142
|
Text,
|
|
@@ -1515,7 +1489,7 @@ import {
|
|
|
1515
1489
|
} from "react-aria-components";
|
|
1516
1490
|
import { X as X2 } from "lucide-react";
|
|
1517
1491
|
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1518
|
-
var
|
|
1492
|
+
var sizeStyles3 = {
|
|
1519
1493
|
sm: "max-w-md",
|
|
1520
1494
|
md: "max-w-lg",
|
|
1521
1495
|
lg: "max-w-2xl",
|
|
@@ -1547,7 +1521,7 @@ function Dialog({
|
|
|
1547
1521
|
{
|
|
1548
1522
|
className: [
|
|
1549
1523
|
"w-full mx-4",
|
|
1550
|
-
|
|
1524
|
+
sizeStyles3[size],
|
|
1551
1525
|
"bg-background rounded-lg shadow-xl max-h-[85vh] flex flex-col",
|
|
1552
1526
|
"entering:animate-in entering:zoom-in-95 entering:fade-in",
|
|
1553
1527
|
"exiting:animate-out exiting:zoom-out-95 exiting:fade-out",
|
|
@@ -1815,59 +1789,50 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1815
1789
|
|
|
1816
1790
|
// src/components/Form/Switch/Switch.tsx
|
|
1817
1791
|
import {
|
|
1818
|
-
|
|
1792
|
+
SwitchField,
|
|
1793
|
+
SwitchButton
|
|
1819
1794
|
} from "react-aria-components";
|
|
1795
|
+
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
1820
1796
|
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1821
|
-
var trackColorMap = {
|
|
1822
|
-
primary: "bg-primary",
|
|
1823
|
-
success: "bg-success",
|
|
1824
|
-
destructive: "bg-destructive"
|
|
1825
|
-
};
|
|
1826
|
-
var presetColors = new Set(Object.keys(trackColorMap));
|
|
1827
|
-
function isPresetColor(color) {
|
|
1828
|
-
return presetColors.has(color);
|
|
1829
|
-
}
|
|
1830
1797
|
function Switch({
|
|
1831
1798
|
children,
|
|
1832
|
-
color = "primary",
|
|
1799
|
+
color = "var(--color-primary)",
|
|
1833
1800
|
className,
|
|
1834
1801
|
...props
|
|
1835
1802
|
}) {
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1803
|
+
return /* @__PURE__ */ jsx23(SwitchField, { ...props, children: /* @__PURE__ */ jsx23(SwitchButton, { className: "relative cursor-pointer", children: ({ isSelected, isFocusVisible }) => /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
1804
|
+
/* @__PURE__ */ jsx23(
|
|
1805
|
+
"div",
|
|
1806
|
+
{
|
|
1807
|
+
className: twMerge12(
|
|
1808
|
+
`
|
|
1809
|
+
flex items-center
|
|
1810
|
+
border-2 border-border
|
|
1811
|
+
w-9 h-5 rounded-full transition-colors shrink-0
|
|
1812
|
+
`,
|
|
1813
|
+
isFocusVisible && "ring-2 ring-ring ring-offset-2",
|
|
1814
|
+
!isSelected && "bg-border"
|
|
1815
|
+
),
|
|
1816
|
+
style: isSelected ? { backgroundColor: color } : void 0,
|
|
1817
|
+
children: /* @__PURE__ */ jsx23(
|
|
1848
1818
|
"div",
|
|
1849
1819
|
{
|
|
1850
|
-
className:
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
className: [
|
|
1860
|
-
"w-4 h-4 rounded-full bg-background transition-transform shadow-sm",
|
|
1861
|
-
isSelected ? "translate-x-4" : "translate-x-0"
|
|
1862
|
-
].join(" ")
|
|
1863
|
-
}
|
|
1820
|
+
className: twMerge12(
|
|
1821
|
+
`
|
|
1822
|
+
absolute top-0 left-0 w-5 h-5
|
|
1823
|
+
rounded-full
|
|
1824
|
+
transition-transform
|
|
1825
|
+
border-2 border-border
|
|
1826
|
+
|
|
1827
|
+
`,
|
|
1828
|
+
isSelected ? "translate-x-4 bg-card" : "translate-x-0 bg-background"
|
|
1864
1829
|
)
|
|
1865
1830
|
}
|
|
1866
|
-
)
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
}
|
|
1870
|
-
);
|
|
1831
|
+
)
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
children && /* @__PURE__ */ jsx23("span", { children })
|
|
1835
|
+
] }) }) });
|
|
1871
1836
|
}
|
|
1872
1837
|
|
|
1873
1838
|
// src/components/Form/Radio/Radio.tsx
|
|
@@ -2068,7 +2033,7 @@ function Breadcrumbs({ items, className }) {
|
|
|
2068
2033
|
import {
|
|
2069
2034
|
ToggleButton as AriaToggleButton2
|
|
2070
2035
|
} from "react-aria-components";
|
|
2071
|
-
import { twMerge as
|
|
2036
|
+
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
2072
2037
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2073
2038
|
var squareSizeStyles2 = {
|
|
2074
2039
|
xs: "h-6 w-6 text-xs",
|
|
@@ -2118,7 +2083,7 @@ function ToggleButton({
|
|
|
2118
2083
|
AriaToggleButton2,
|
|
2119
2084
|
{
|
|
2120
2085
|
...props,
|
|
2121
|
-
className: ({ isSelected }) =>
|
|
2086
|
+
className: ({ isSelected }) => twMerge13(
|
|
2122
2087
|
"inline-flex items-center justify-center gap-2 cursor-pointer",
|
|
2123
2088
|
isSquare ? "rounded-none" : "rounded-md",
|
|
2124
2089
|
"font-medium",
|
|
@@ -2141,7 +2106,7 @@ import {
|
|
|
2141
2106
|
MenuItem as AriaMenuItem,
|
|
2142
2107
|
Popover as Popover2
|
|
2143
2108
|
} from "react-aria-components";
|
|
2144
|
-
import { twMerge as
|
|
2109
|
+
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
2145
2110
|
|
|
2146
2111
|
// src/components/Menu/menuStyles.ts
|
|
2147
2112
|
var popoverStyles = `
|
|
@@ -2168,7 +2133,7 @@ function Menu2({
|
|
|
2168
2133
|
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
2169
2134
|
return /* @__PURE__ */ jsxs18(MenuTrigger, { children: [
|
|
2170
2135
|
children,
|
|
2171
|
-
/* @__PURE__ */ jsx29(Popover2, { className:
|
|
2136
|
+
/* @__PURE__ */ jsx29(Popover2, { className: twMerge14(popoverStyles, className), children: items ? /* @__PURE__ */ jsx29(
|
|
2172
2137
|
AriaMenu,
|
|
2173
2138
|
{
|
|
2174
2139
|
items,
|
|
@@ -2227,7 +2192,7 @@ import {
|
|
|
2227
2192
|
Popover as Popover3,
|
|
2228
2193
|
Pressable
|
|
2229
2194
|
} from "react-aria-components";
|
|
2230
|
-
import { twMerge as
|
|
2195
|
+
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
2231
2196
|
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2232
2197
|
function useContextMenu({
|
|
2233
2198
|
content,
|
|
@@ -2293,7 +2258,7 @@ function useContextMenu({
|
|
|
2293
2258
|
isNonModal: true,
|
|
2294
2259
|
placement: "bottom start",
|
|
2295
2260
|
ref: popoverRef,
|
|
2296
|
-
className:
|
|
2261
|
+
className: twMerge15(popoverStyles, className),
|
|
2297
2262
|
children: /* @__PURE__ */ jsx30(
|
|
2298
2263
|
AriaMenu2,
|
|
2299
2264
|
{
|
|
@@ -2456,7 +2421,7 @@ import {
|
|
|
2456
2421
|
Popover as AriaPopover,
|
|
2457
2422
|
Button as AriaButton3
|
|
2458
2423
|
} from "react-aria-components";
|
|
2459
|
-
import { twMerge as
|
|
2424
|
+
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
2460
2425
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2461
2426
|
function Popover4({ children, isOpen, onOpenChange }) {
|
|
2462
2427
|
return /* @__PURE__ */ jsx36(DialogTrigger, { isOpen, onOpenChange, children });
|
|
@@ -2466,7 +2431,7 @@ function PopoverTrigger({ children, className }) {
|
|
|
2466
2431
|
inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer
|
|
2467
2432
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm
|
|
2468
2433
|
`;
|
|
2469
|
-
return /* @__PURE__ */ jsx36(AriaButton3, { className:
|
|
2434
|
+
return /* @__PURE__ */ jsx36(AriaButton3, { className: twMerge16(cx, className), children });
|
|
2470
2435
|
}
|
|
2471
2436
|
function PopoverContent({
|
|
2472
2437
|
placement = "bottom",
|
|
@@ -2493,7 +2458,7 @@ function PopoverContent({
|
|
|
2493
2458
|
...rest,
|
|
2494
2459
|
placement,
|
|
2495
2460
|
offset: offsetPx,
|
|
2496
|
-
className:
|
|
2461
|
+
className: twMerge16(cx, className),
|
|
2497
2462
|
children
|
|
2498
2463
|
}
|
|
2499
2464
|
);
|
|
@@ -2501,7 +2466,7 @@ function PopoverContent({
|
|
|
2501
2466
|
|
|
2502
2467
|
// src/components/Tabs/Tabs.tsx
|
|
2503
2468
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
2504
|
-
import { twMerge as
|
|
2469
|
+
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
2505
2470
|
import {
|
|
2506
2471
|
Tabs as AriaTabs,
|
|
2507
2472
|
TabList as AriaTabList,
|
|
@@ -2513,7 +2478,7 @@ var TabsContext = createContext2({
|
|
|
2513
2478
|
variant: "underline",
|
|
2514
2479
|
size: "md"
|
|
2515
2480
|
});
|
|
2516
|
-
var
|
|
2481
|
+
var sizeStyles4 = {
|
|
2517
2482
|
sm: "px-3 py-1.5 text-sm",
|
|
2518
2483
|
md: "px-4 py-2 text-base",
|
|
2519
2484
|
lg: "px-6 py-3 text-lg"
|
|
@@ -2531,7 +2496,7 @@ function Tabs({
|
|
|
2531
2496
|
{
|
|
2532
2497
|
...props,
|
|
2533
2498
|
orientation,
|
|
2534
|
-
className:
|
|
2499
|
+
className: twMerge17(
|
|
2535
2500
|
orientation === "vertical" ? "flex" : "",
|
|
2536
2501
|
className
|
|
2537
2502
|
),
|
|
@@ -2550,7 +2515,7 @@ function TabList({
|
|
|
2550
2515
|
AriaTabList,
|
|
2551
2516
|
{
|
|
2552
2517
|
...props,
|
|
2553
|
-
className: ({ orientation }) =>
|
|
2518
|
+
className: ({ orientation }) => twMerge17(
|
|
2554
2519
|
baseStyles,
|
|
2555
2520
|
orientation === "vertical" ? verticalStyles : "",
|
|
2556
2521
|
className
|
|
@@ -2566,14 +2531,14 @@ function Tab({ className, ...props }) {
|
|
|
2566
2531
|
...props,
|
|
2567
2532
|
className: ({ isSelected, isDisabled, isHovered, isPressed }) => {
|
|
2568
2533
|
if (variant === "unstyled") {
|
|
2569
|
-
return
|
|
2534
|
+
return twMerge17(
|
|
2570
2535
|
"cursor-pointer outline-none",
|
|
2571
2536
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2572
2537
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2573
2538
|
className
|
|
2574
2539
|
);
|
|
2575
2540
|
}
|
|
2576
|
-
return
|
|
2541
|
+
return twMerge17(
|
|
2577
2542
|
// Base
|
|
2578
2543
|
"cursor-pointer outline-none transition-colors",
|
|
2579
2544
|
"font-medium",
|
|
@@ -2582,7 +2547,7 @@ function Tab({ className, ...props }) {
|
|
|
2582
2547
|
// Disabled
|
|
2583
2548
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2584
2549
|
// Size
|
|
2585
|
-
|
|
2550
|
+
sizeStyles4[size],
|
|
2586
2551
|
...getTabVariantStyles(variant, {
|
|
2587
2552
|
isSelected,
|
|
2588
2553
|
isHovered,
|
|
@@ -2621,7 +2586,7 @@ function TabPanel({ className, ...props }) {
|
|
|
2621
2586
|
AriaTabPanel,
|
|
2622
2587
|
{
|
|
2623
2588
|
...props,
|
|
2624
|
-
className:
|
|
2589
|
+
className: twMerge17(
|
|
2625
2590
|
variant === "unstyled" ? "outline-none" : "mt-4 outline-none",
|
|
2626
2591
|
className
|
|
2627
2592
|
)
|
|
@@ -2639,7 +2604,7 @@ import {
|
|
|
2639
2604
|
|
|
2640
2605
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2641
2606
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
2642
|
-
import { twMerge as
|
|
2607
|
+
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
2643
2608
|
import {
|
|
2644
2609
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2645
2610
|
ToggleButton as AriaToggleButton3
|
|
@@ -2648,7 +2613,7 @@ import { jsx as jsx38 } from "react/jsx-runtime";
|
|
|
2648
2613
|
var SegmentedControlContext = createContext3({
|
|
2649
2614
|
size: "md"
|
|
2650
2615
|
});
|
|
2651
|
-
var
|
|
2616
|
+
var sizeStyles5 = {
|
|
2652
2617
|
sm: "px-2.5 py-1 text-xs",
|
|
2653
2618
|
md: "px-3 py-1.5 text-sm",
|
|
2654
2619
|
lg: "px-4 py-2 text-base"
|
|
@@ -2672,7 +2637,7 @@ function SegmentedControl({
|
|
|
2672
2637
|
selectedKeys: isNoneMode ? /* @__PURE__ */ new Set() : selectedKeys,
|
|
2673
2638
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2674
2639
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2675
|
-
className:
|
|
2640
|
+
className: twMerge18(
|
|
2676
2641
|
"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 gap-0.5",
|
|
2677
2642
|
className
|
|
2678
2643
|
),
|
|
@@ -2689,7 +2654,7 @@ function SegmentedControlItem({
|
|
|
2689
2654
|
AriaToggleButton3,
|
|
2690
2655
|
{
|
|
2691
2656
|
...props,
|
|
2692
|
-
className: ({ isSelected, isHovered, isPressed, isDisabled }) =>
|
|
2657
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge18(
|
|
2693
2658
|
// Base layout
|
|
2694
2659
|
"inline-flex items-center justify-center",
|
|
2695
2660
|
"rounded-md",
|
|
@@ -2700,7 +2665,7 @@ function SegmentedControlItem({
|
|
|
2700
2665
|
// Disabled
|
|
2701
2666
|
isDisabled && "opacity-50 pointer-events-none",
|
|
2702
2667
|
// Size
|
|
2703
|
-
|
|
2668
|
+
sizeStyles5[size],
|
|
2704
2669
|
// Selected state
|
|
2705
2670
|
isSelected ? "bg-background text-foreground shadow-sm font-semibold" : isPressed ? "bg-card text-foreground" : isHovered ? "bg-card text-foreground" : "bg-transparent text-muted-foreground",
|
|
2706
2671
|
className
|
|
@@ -2710,8 +2675,21 @@ function SegmentedControlItem({
|
|
|
2710
2675
|
}
|
|
2711
2676
|
|
|
2712
2677
|
// src/components/Badge/Badge.tsx
|
|
2713
|
-
import { twMerge as
|
|
2714
|
-
|
|
2678
|
+
import { twMerge as twMerge20 } from "tailwind-merge";
|
|
2679
|
+
|
|
2680
|
+
// src/components/MetricText/MetricText.tsx
|
|
2681
|
+
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
2682
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2683
|
+
function MetricText({ className, ...rest }) {
|
|
2684
|
+
const cx = twMerge19(
|
|
2685
|
+
"text-xs font-medium leading-none tracking-wider tabular-nums",
|
|
2686
|
+
className
|
|
2687
|
+
);
|
|
2688
|
+
return /* @__PURE__ */ jsx39("span", { className: cx, ...rest });
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
// src/components/Badge/Badge.tsx
|
|
2692
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2715
2693
|
var colorStyles = {
|
|
2716
2694
|
purple: "bg-badge-purple-bg text-badge-purple-text border-badge-purple-text/20",
|
|
2717
2695
|
teal: "bg-badge-teal-bg text-badge-teal-text border-badge-teal-text/20",
|
|
@@ -2720,7 +2698,7 @@ var colorStyles = {
|
|
|
2720
2698
|
green: "bg-badge-green-bg text-badge-green-text border-badge-green-text/20",
|
|
2721
2699
|
amber: "bg-badge-amber-bg text-badge-amber-text border-badge-amber-text/20"
|
|
2722
2700
|
};
|
|
2723
|
-
var
|
|
2701
|
+
var sizeStyles6 = {
|
|
2724
2702
|
xs: "px-1 py-0 text-[10px]",
|
|
2725
2703
|
sm: "px-1.5 py-0.5 text-xs",
|
|
2726
2704
|
md: "px-2 py-0.5 text-xs",
|
|
@@ -2735,18 +2713,17 @@ function Badge({
|
|
|
2735
2713
|
...rest
|
|
2736
2714
|
}) {
|
|
2737
2715
|
return /* @__PURE__ */ jsxs23(
|
|
2738
|
-
|
|
2716
|
+
MetricText,
|
|
2739
2717
|
{
|
|
2740
|
-
className:
|
|
2718
|
+
className: twMerge20(
|
|
2741
2719
|
"inline-flex items-center gap-1 rounded-full border",
|
|
2742
|
-
"font-medium leading-tight tracking-wider tabular-nums",
|
|
2743
2720
|
colorStyles[color],
|
|
2744
|
-
|
|
2721
|
+
sizeStyles6[size],
|
|
2745
2722
|
className
|
|
2746
2723
|
),
|
|
2747
2724
|
...rest,
|
|
2748
2725
|
children: [
|
|
2749
|
-
icon && /* @__PURE__ */
|
|
2726
|
+
icon && /* @__PURE__ */ jsx40(Icon, { icon, size: "xs" }),
|
|
2750
2727
|
children
|
|
2751
2728
|
]
|
|
2752
2729
|
}
|
|
@@ -2754,10 +2731,10 @@ function Badge({
|
|
|
2754
2731
|
}
|
|
2755
2732
|
|
|
2756
2733
|
// src/components/Card/Card.tsx
|
|
2757
|
-
import { twMerge as
|
|
2758
|
-
import { jsx as
|
|
2734
|
+
import { twMerge as twMerge21 } from "tailwind-merge";
|
|
2735
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2759
2736
|
function Card({ children, header, footer, className }) {
|
|
2760
|
-
const cx =
|
|
2737
|
+
const cx = twMerge21(
|
|
2761
2738
|
`
|
|
2762
2739
|
bg-card p-8
|
|
2763
2740
|
border border-border
|
|
@@ -2767,16 +2744,16 @@ function Card({ children, header, footer, className }) {
|
|
|
2767
2744
|
className
|
|
2768
2745
|
);
|
|
2769
2746
|
return /* @__PURE__ */ jsxs24("div", { className: cx, children: [
|
|
2770
|
-
header && /* @__PURE__ */
|
|
2747
|
+
header && /* @__PURE__ */ jsx41("div", { className: "border-b border-border", children: header }),
|
|
2771
2748
|
children,
|
|
2772
|
-
footer && /* @__PURE__ */
|
|
2749
|
+
footer && /* @__PURE__ */ jsx41("div", { className: "border-t border-border", children: footer })
|
|
2773
2750
|
] });
|
|
2774
2751
|
}
|
|
2775
2752
|
|
|
2776
2753
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2777
2754
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, Minus as Minus2 } from "lucide-react";
|
|
2778
|
-
import { twMerge as
|
|
2779
|
-
import { jsx as
|
|
2755
|
+
import { twMerge as twMerge22 } from "tailwind-merge";
|
|
2756
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2780
2757
|
function getDirection(current, previous) {
|
|
2781
2758
|
const diff = current - previous;
|
|
2782
2759
|
if (diff > 0) return "increase";
|
|
@@ -2832,13 +2809,13 @@ function DeltaIndicator({
|
|
|
2832
2809
|
return /* @__PURE__ */ jsxs25(
|
|
2833
2810
|
"span",
|
|
2834
2811
|
{
|
|
2835
|
-
className:
|
|
2812
|
+
className: twMerge22(
|
|
2836
2813
|
"inline-flex items-center gap-1 font-medium",
|
|
2837
2814
|
"text-muted-foreground",
|
|
2838
2815
|
className
|
|
2839
2816
|
),
|
|
2840
2817
|
children: [
|
|
2841
|
-
label && /* @__PURE__ */
|
|
2818
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2842
2819
|
unavailableText
|
|
2843
2820
|
]
|
|
2844
2821
|
}
|
|
@@ -2871,7 +2848,7 @@ function DeltaIndicator({
|
|
|
2871
2848
|
return /* @__PURE__ */ jsxs25(
|
|
2872
2849
|
"span",
|
|
2873
2850
|
{
|
|
2874
|
-
className:
|
|
2851
|
+
className: twMerge22(
|
|
2875
2852
|
"inline-flex items-center gap-1 font-medium",
|
|
2876
2853
|
colorStyles2,
|
|
2877
2854
|
isPill && [
|
|
@@ -2882,8 +2859,8 @@ function DeltaIndicator({
|
|
|
2882
2859
|
className
|
|
2883
2860
|
),
|
|
2884
2861
|
children: [
|
|
2885
|
-
label && /* @__PURE__ */
|
|
2886
|
-
/* @__PURE__ */
|
|
2862
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2863
|
+
/* @__PURE__ */ jsx42(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2887
2864
|
valueText
|
|
2888
2865
|
]
|
|
2889
2866
|
}
|
|
@@ -2891,8 +2868,8 @@ function DeltaIndicator({
|
|
|
2891
2868
|
}
|
|
2892
2869
|
|
|
2893
2870
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2894
|
-
import { twMerge as
|
|
2895
|
-
import { jsx as
|
|
2871
|
+
import { twMerge as twMerge23 } from "tailwind-merge";
|
|
2872
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2896
2873
|
var fillStyles = {
|
|
2897
2874
|
brand: "bg-progress-fill",
|
|
2898
2875
|
success: "bg-progress-fill-success",
|
|
@@ -2900,7 +2877,7 @@ var fillStyles = {
|
|
|
2900
2877
|
danger: "bg-progress-fill-danger",
|
|
2901
2878
|
neutral: "bg-muted-foreground"
|
|
2902
2879
|
};
|
|
2903
|
-
var
|
|
2880
|
+
var sizeStyles7 = {
|
|
2904
2881
|
sm: "h-1.5",
|
|
2905
2882
|
md: "h-3",
|
|
2906
2883
|
lg: "h-4"
|
|
@@ -2915,12 +2892,12 @@ function ProgressBar({
|
|
|
2915
2892
|
className
|
|
2916
2893
|
}) {
|
|
2917
2894
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2918
|
-
return /* @__PURE__ */ jsxs26("div", { className:
|
|
2895
|
+
return /* @__PURE__ */ jsxs26("div", { className: twMerge23("w-full", className), children: [
|
|
2919
2896
|
(label || description || showValue) && /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between mb-2", children: [
|
|
2920
|
-
/* @__PURE__ */
|
|
2921
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
2898
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-muted-foreground", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2922
2899
|
] }),
|
|
2923
|
-
/* @__PURE__ */
|
|
2900
|
+
/* @__PURE__ */ jsx43(
|
|
2924
2901
|
"div",
|
|
2925
2902
|
{
|
|
2926
2903
|
role: "progressbar",
|
|
@@ -2928,14 +2905,14 @@ function ProgressBar({
|
|
|
2928
2905
|
"aria-valuemin": 0,
|
|
2929
2906
|
"aria-valuemax": 100,
|
|
2930
2907
|
"aria-label": label ?? "Progress",
|
|
2931
|
-
className:
|
|
2908
|
+
className: twMerge23(
|
|
2932
2909
|
"w-full rounded-full bg-progress-track",
|
|
2933
|
-
|
|
2910
|
+
sizeStyles7[size]
|
|
2934
2911
|
),
|
|
2935
|
-
children: /* @__PURE__ */
|
|
2912
|
+
children: /* @__PURE__ */ jsx43(
|
|
2936
2913
|
"div",
|
|
2937
2914
|
{
|
|
2938
|
-
className:
|
|
2915
|
+
className: twMerge23(
|
|
2939
2916
|
"h-full rounded-full transition-all duration-300",
|
|
2940
2917
|
fillStyles[variant]
|
|
2941
2918
|
),
|
|
@@ -2955,8 +2932,8 @@ import {
|
|
|
2955
2932
|
AlertCircle as AlertCircle2,
|
|
2956
2933
|
CheckCircle2 as CheckCircle22
|
|
2957
2934
|
} from "lucide-react";
|
|
2958
|
-
import { twMerge as
|
|
2959
|
-
import { jsx as
|
|
2935
|
+
import { twMerge as twMerge24 } from "tailwind-merge";
|
|
2936
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2960
2937
|
var variantConfig2 = {
|
|
2961
2938
|
info: {
|
|
2962
2939
|
icon: Info3,
|
|
@@ -3004,19 +2981,19 @@ function Banner({
|
|
|
3004
2981
|
"div",
|
|
3005
2982
|
{
|
|
3006
2983
|
role: config.role,
|
|
3007
|
-
className:
|
|
2984
|
+
className: twMerge24(
|
|
3008
2985
|
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
3009
2986
|
"text-sm",
|
|
3010
2987
|
config.containerClass,
|
|
3011
2988
|
className
|
|
3012
2989
|
),
|
|
3013
2990
|
children: [
|
|
3014
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ jsx44(
|
|
3015
2992
|
Icon,
|
|
3016
2993
|
{
|
|
3017
2994
|
icon: resolvedIcon,
|
|
3018
2995
|
size: "md",
|
|
3019
|
-
className:
|
|
2996
|
+
className: twMerge24("mt-0.5", config.iconClass)
|
|
3020
2997
|
}
|
|
3021
2998
|
),
|
|
3022
2999
|
/* @__PURE__ */ jsxs27("div", { className: "flex-1", children: [
|
|
@@ -3026,14 +3003,14 @@ function Banner({
|
|
|
3026
3003
|
] }),
|
|
3027
3004
|
children
|
|
3028
3005
|
] }),
|
|
3029
|
-
dismissible && /* @__PURE__ */
|
|
3006
|
+
dismissible && /* @__PURE__ */ jsx44(
|
|
3030
3007
|
"button",
|
|
3031
3008
|
{
|
|
3032
3009
|
type: "button",
|
|
3033
3010
|
onClick: handleDismiss,
|
|
3034
3011
|
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
3035
3012
|
"aria-label": "Dismiss",
|
|
3036
|
-
children: /* @__PURE__ */
|
|
3013
|
+
children: /* @__PURE__ */ jsx44(Icon, { icon: "X", size: "sm" })
|
|
3037
3014
|
}
|
|
3038
3015
|
)
|
|
3039
3016
|
]
|
|
@@ -3042,8 +3019,8 @@ function Banner({
|
|
|
3042
3019
|
}
|
|
3043
3020
|
|
|
3044
3021
|
// src/components/MetricCard/MetricCard.tsx
|
|
3045
|
-
import { twMerge as
|
|
3046
|
-
import { Fragment as Fragment8, jsx as
|
|
3022
|
+
import { twMerge as twMerge25 } from "tailwind-merge";
|
|
3023
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3047
3024
|
var sizeConfig = {
|
|
3048
3025
|
sm: {
|
|
3049
3026
|
padding: "p-3",
|
|
@@ -3065,50 +3042,50 @@ function MetricCard({
|
|
|
3065
3042
|
className
|
|
3066
3043
|
}) {
|
|
3067
3044
|
const config = sizeConfig[size];
|
|
3068
|
-
const containerClass =
|
|
3045
|
+
const containerClass = twMerge25(
|
|
3069
3046
|
"bg-background border border-border rounded-lg shadow-sm",
|
|
3070
3047
|
config.padding,
|
|
3071
3048
|
href && "block transition-shadow hover:shadow-md hover:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 outline-none",
|
|
3072
3049
|
className
|
|
3073
3050
|
);
|
|
3074
3051
|
const content = /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3052
|
+
/* @__PURE__ */ jsx45("div", { className: twMerge25(config.labelClass, "text-muted-foreground"), children: label }),
|
|
3053
|
+
/* @__PURE__ */ jsx45(
|
|
3077
3054
|
"div",
|
|
3078
3055
|
{
|
|
3079
|
-
className:
|
|
3056
|
+
className: twMerge25(
|
|
3080
3057
|
config.valueClass,
|
|
3081
3058
|
"font-semibold text-foreground mt-1 tabular-nums"
|
|
3082
3059
|
),
|
|
3083
3060
|
children: value
|
|
3084
3061
|
}
|
|
3085
3062
|
),
|
|
3086
|
-
secondary && /* @__PURE__ */
|
|
3063
|
+
secondary && /* @__PURE__ */ jsx45("div", { className: "mt-1 text-sm", children: secondary })
|
|
3087
3064
|
] });
|
|
3088
3065
|
if (href) {
|
|
3089
|
-
return /* @__PURE__ */
|
|
3066
|
+
return /* @__PURE__ */ jsx45("a", { href, className: containerClass, children: content });
|
|
3090
3067
|
}
|
|
3091
|
-
return /* @__PURE__ */
|
|
3068
|
+
return /* @__PURE__ */ jsx45("div", { className: containerClass, children: content });
|
|
3092
3069
|
}
|
|
3093
3070
|
|
|
3094
3071
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3095
3072
|
import { forwardRef as forwardRef7 } from "react";
|
|
3096
|
-
import { twMerge as
|
|
3097
|
-
import { jsx as
|
|
3073
|
+
import { twMerge as twMerge26 } from "tailwind-merge";
|
|
3074
|
+
import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3098
3075
|
var SectionHeader = forwardRef7(
|
|
3099
3076
|
function SectionHeader2({ title, as = "h2", children, className, ...rest }, ref) {
|
|
3100
3077
|
return /* @__PURE__ */ jsxs29(
|
|
3101
3078
|
"div",
|
|
3102
3079
|
{
|
|
3103
3080
|
ref,
|
|
3104
|
-
className:
|
|
3081
|
+
className: twMerge26(
|
|
3105
3082
|
"flex flex-wrap items-center gap-3 pt-0 pb-4",
|
|
3106
3083
|
className
|
|
3107
3084
|
),
|
|
3108
3085
|
...rest,
|
|
3109
3086
|
children: [
|
|
3110
|
-
/* @__PURE__ */
|
|
3111
|
-
children && /* @__PURE__ */
|
|
3087
|
+
/* @__PURE__ */ jsx46(Heading, { as, children: title }),
|
|
3088
|
+
children && /* @__PURE__ */ jsx46("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3112
3089
|
]
|
|
3113
3090
|
}
|
|
3114
3091
|
);
|
|
@@ -3118,7 +3095,7 @@ var SectionHeader = forwardRef7(
|
|
|
3118
3095
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
3119
3096
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
3120
3097
|
import { Button as AriaButton4 } from "react-aria-components";
|
|
3121
|
-
import { jsx as
|
|
3098
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3122
3099
|
var LayoutContext = createContext4("stacked");
|
|
3123
3100
|
var listGapStyles = {
|
|
3124
3101
|
stacked: "gap-4",
|
|
@@ -3129,7 +3106,7 @@ function DescriptionList({
|
|
|
3129
3106
|
layout = "stacked",
|
|
3130
3107
|
className
|
|
3131
3108
|
}) {
|
|
3132
|
-
return /* @__PURE__ */
|
|
3109
|
+
return /* @__PURE__ */ jsx47(LayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx47(
|
|
3133
3110
|
"dl",
|
|
3134
3111
|
{
|
|
3135
3112
|
className: ["flex flex-col", listGapStyles[layout], className].filter(Boolean).join(" "),
|
|
@@ -3153,17 +3130,17 @@ function DescriptionListItem({
|
|
|
3153
3130
|
"text-sm m-0",
|
|
3154
3131
|
muted ? "text-muted-foreground" : "text-foreground"
|
|
3155
3132
|
].join(" ");
|
|
3156
|
-
const valueContent = /* @__PURE__ */
|
|
3133
|
+
const valueContent = /* @__PURE__ */ jsx47("dd", { className: valueClasses, children });
|
|
3157
3134
|
return /* @__PURE__ */ jsxs30("div", { className: itemLayoutStyles[layout], children: [
|
|
3158
|
-
/* @__PURE__ */
|
|
3159
|
-
fullValue ? /* @__PURE__ */
|
|
3135
|
+
/* @__PURE__ */ jsx47("dt", { className: labelClasses, children: label }),
|
|
3136
|
+
fullValue ? /* @__PURE__ */ jsx47(Tooltip, { content: fullValue, children: /* @__PURE__ */ jsx47(AriaButton4, { className: "text-left outline-none cursor-default", children: valueContent }) }) : valueContent
|
|
3160
3137
|
] });
|
|
3161
3138
|
}
|
|
3162
3139
|
DescriptionList.Item = DescriptionListItem;
|
|
3163
3140
|
|
|
3164
3141
|
// src/components/PathPill/PathPill.tsx
|
|
3165
|
-
import { twMerge as
|
|
3166
|
-
import { jsx as
|
|
3142
|
+
import { twMerge as twMerge27 } from "tailwind-merge";
|
|
3143
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3167
3144
|
var hashColors = [
|
|
3168
3145
|
"purple",
|
|
3169
3146
|
"teal",
|
|
@@ -3189,17 +3166,17 @@ function PathPill({
|
|
|
3189
3166
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3190
3167
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3191
3168
|
const fullPath = segments.join(" / ");
|
|
3192
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ jsx48(
|
|
3193
3170
|
"div",
|
|
3194
3171
|
{
|
|
3195
|
-
className:
|
|
3172
|
+
className: twMerge27("relative flex", className),
|
|
3196
3173
|
"aria-label": `Path: ${fullPath}`,
|
|
3197
3174
|
children: segments.map((segment, i) => {
|
|
3198
3175
|
const isCollapsed = i < dotCount;
|
|
3199
3176
|
const isLast = i === segments.length - 1;
|
|
3200
|
-
const cx =
|
|
3177
|
+
const cx = twMerge27(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3201
3178
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3202
|
-
return /* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsx48(
|
|
3203
3180
|
Badge,
|
|
3204
3181
|
{
|
|
3205
3182
|
className: cx,
|
|
@@ -3216,7 +3193,7 @@ function PathPill({
|
|
|
3216
3193
|
|
|
3217
3194
|
// src/components/FormWizard/FormWizard.tsx
|
|
3218
3195
|
import { createContext as createContext5, useContext as useContext5, useCallback as useCallback4, useMemo } from "react";
|
|
3219
|
-
import { jsx as
|
|
3196
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3220
3197
|
var FormWizardContext = createContext5({
|
|
3221
3198
|
currentStep: 0,
|
|
3222
3199
|
totalSteps: 1,
|
|
@@ -3251,13 +3228,13 @@ function FormWizard({
|
|
|
3251
3228
|
}),
|
|
3252
3229
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3253
3230
|
);
|
|
3254
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ jsx49(FormWizardContext.Provider, { value, children });
|
|
3255
3232
|
}
|
|
3256
3233
|
|
|
3257
3234
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3258
|
-
import { jsx as
|
|
3235
|
+
import { jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3259
3236
|
function CheckIcon() {
|
|
3260
|
-
return /* @__PURE__ */
|
|
3237
|
+
return /* @__PURE__ */ jsx50(
|
|
3261
3238
|
"svg",
|
|
3262
3239
|
{
|
|
3263
3240
|
"aria-hidden": "true",
|
|
@@ -3268,13 +3245,13 @@ function CheckIcon() {
|
|
|
3268
3245
|
strokeWidth: "2",
|
|
3269
3246
|
strokeLinecap: "round",
|
|
3270
3247
|
strokeLinejoin: "round",
|
|
3271
|
-
children: /* @__PURE__ */
|
|
3248
|
+
children: /* @__PURE__ */ jsx50("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3272
3249
|
}
|
|
3273
3250
|
);
|
|
3274
3251
|
}
|
|
3275
3252
|
function FormWizardProgress({ labels }) {
|
|
3276
3253
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3277
|
-
return /* @__PURE__ */
|
|
3254
|
+
return /* @__PURE__ */ jsx50("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx50("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3278
3255
|
const isCompleted = index < currentStep;
|
|
3279
3256
|
const isCurrent = index === currentStep;
|
|
3280
3257
|
const isFuture = index > currentStep;
|
|
@@ -3285,7 +3262,7 @@ function FormWizardProgress({ labels }) {
|
|
|
3285
3262
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3286
3263
|
children: [
|
|
3287
3264
|
/* @__PURE__ */ jsxs31("div", { className: "flex w-full items-center", children: [
|
|
3288
|
-
index > 0 ? /* @__PURE__ */
|
|
3265
|
+
index > 0 ? /* @__PURE__ */ jsx50(
|
|
3289
3266
|
"div",
|
|
3290
3267
|
{
|
|
3291
3268
|
"aria-hidden": "true",
|
|
@@ -3294,8 +3271,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3294
3271
|
index <= currentStep ? "bg-primary" : "bg-border"
|
|
3295
3272
|
].join(" ")
|
|
3296
3273
|
}
|
|
3297
|
-
) : /* @__PURE__ */
|
|
3298
|
-
/* @__PURE__ */
|
|
3274
|
+
) : /* @__PURE__ */ jsx50("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3275
|
+
/* @__PURE__ */ jsx50(
|
|
3299
3276
|
"div",
|
|
3300
3277
|
{
|
|
3301
3278
|
className: [
|
|
@@ -3307,10 +3284,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3307
3284
|
isFuture ? "border-2 border-border bg-background text-muted-foreground" : ""
|
|
3308
3285
|
].join(" "),
|
|
3309
3286
|
"aria-hidden": "true",
|
|
3310
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3287
|
+
children: isCompleted ? /* @__PURE__ */ jsx50(CheckIcon, {}) : index + 1
|
|
3311
3288
|
}
|
|
3312
3289
|
),
|
|
3313
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3290
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx50(
|
|
3314
3291
|
"div",
|
|
3315
3292
|
{
|
|
3316
3293
|
"aria-hidden": "true",
|
|
@@ -3319,9 +3296,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3319
3296
|
index < currentStep ? "bg-primary" : "bg-border"
|
|
3320
3297
|
].join(" ")
|
|
3321
3298
|
}
|
|
3322
|
-
) : /* @__PURE__ */
|
|
3299
|
+
) : /* @__PURE__ */ jsx50("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3323
3300
|
] }),
|
|
3324
|
-
/* @__PURE__ */
|
|
3301
|
+
/* @__PURE__ */ jsx50(
|
|
3325
3302
|
"span",
|
|
3326
3303
|
{
|
|
3327
3304
|
className: [
|
|
@@ -3339,7 +3316,7 @@ function FormWizardProgress({ labels }) {
|
|
|
3339
3316
|
}
|
|
3340
3317
|
|
|
3341
3318
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3342
|
-
import { jsx as
|
|
3319
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3343
3320
|
function FormWizardNav({
|
|
3344
3321
|
onNext,
|
|
3345
3322
|
isSubmitting = false,
|
|
@@ -3347,7 +3324,7 @@ function FormWizardNav({
|
|
|
3347
3324
|
}) {
|
|
3348
3325
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3349
3326
|
return /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3350
|
-
canGoBack && /* @__PURE__ */
|
|
3327
|
+
canGoBack && /* @__PURE__ */ jsx51(
|
|
3351
3328
|
Button,
|
|
3352
3329
|
{
|
|
3353
3330
|
variant: "secondary",
|
|
@@ -3357,7 +3334,7 @@ function FormWizardNav({
|
|
|
3357
3334
|
children: "Back"
|
|
3358
3335
|
}
|
|
3359
3336
|
),
|
|
3360
|
-
/* @__PURE__ */
|
|
3337
|
+
/* @__PURE__ */ jsx51(
|
|
3361
3338
|
Button,
|
|
3362
3339
|
{
|
|
3363
3340
|
variant: "primary",
|
|
@@ -3411,6 +3388,7 @@ export {
|
|
|
3411
3388
|
MenuSection,
|
|
3412
3389
|
MenuSeparator,
|
|
3413
3390
|
MetricCard,
|
|
3391
|
+
MetricText,
|
|
3414
3392
|
PathPill,
|
|
3415
3393
|
Popover4 as Popover,
|
|
3416
3394
|
PopoverContent,
|
|
@@ -3443,11 +3421,14 @@ export {
|
|
|
3443
3421
|
TabList2 as UnstyledTabList,
|
|
3444
3422
|
TabPanel2 as UnstyledTabPanel,
|
|
3445
3423
|
Tabs2 as UnstyledTabs,
|
|
3424
|
+
buttonBaseClass,
|
|
3446
3425
|
createToastBridge,
|
|
3447
3426
|
iconRegistry,
|
|
3448
3427
|
pillColorFromName,
|
|
3428
|
+
selectedStyles,
|
|
3449
3429
|
useContextMenu,
|
|
3450
3430
|
useFormWizard,
|
|
3451
|
-
useToast
|
|
3431
|
+
useToast,
|
|
3432
|
+
variantStyles
|
|
3452
3433
|
};
|
|
3453
3434
|
//# sourceMappingURL=index.js.map
|