@cytario/design 9.4.0 → 9.5.1
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 +19 -9
- package/dist/index.js +201 -215
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -491,7 +491,7 @@ var buttonBaseClass = `
|
|
|
491
491
|
inline-flex items-center justify-center gap-2 shrink-0 cursor-pointer
|
|
492
492
|
rounded-full
|
|
493
493
|
font-medium
|
|
494
|
-
leading-
|
|
494
|
+
leading-none
|
|
495
495
|
outline-none transition-colors no-underline
|
|
496
496
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
497
497
|
disabled:opacity-50 disabled:pointer-events-none
|
|
@@ -1072,6 +1072,12 @@ var alignClasses = {
|
|
|
1072
1072
|
center: "text-center",
|
|
1073
1073
|
right: "text-right"
|
|
1074
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
|
+
};
|
|
1075
1081
|
function Input({
|
|
1076
1082
|
as: FieldProp = TextField,
|
|
1077
1083
|
label,
|
|
@@ -1081,6 +1087,7 @@ function Input({
|
|
|
1081
1087
|
type = "text",
|
|
1082
1088
|
size = "md",
|
|
1083
1089
|
prefix,
|
|
1090
|
+
suffix,
|
|
1084
1091
|
align = "left",
|
|
1085
1092
|
isDisabled,
|
|
1086
1093
|
isRequired,
|
|
@@ -1091,6 +1098,29 @@ function Input({
|
|
|
1091
1098
|
const isInvalid = !!errorMessage;
|
|
1092
1099
|
const borderColor = isInvalid ? "border-destructive-border" : "border-border hover:border-border";
|
|
1093
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
|
+
);
|
|
1094
1124
|
return /* @__PURE__ */ jsxs6(
|
|
1095
1125
|
Field,
|
|
1096
1126
|
{
|
|
@@ -1102,69 +1132,11 @@ function Input({
|
|
|
1102
1132
|
className: twMerge8("flex w-full flex-col gap-1", className),
|
|
1103
1133
|
children: [
|
|
1104
1134
|
label && /* @__PURE__ */ jsx14(Label, { isRequired, children: label }),
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
{
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
radiusClass,
|
|
1111
|
-
"border",
|
|
1112
|
-
"bg-background",
|
|
1113
|
-
"outline-none transition-colors",
|
|
1114
|
-
borderColor,
|
|
1115
|
-
"focus-within:ring-2 focus-within:ring-ring focus-within:border-ring",
|
|
1116
|
-
isDisabled && "opacity-50 pointer-events-none"
|
|
1117
|
-
),
|
|
1118
|
-
children: [
|
|
1119
|
-
/* @__PURE__ */ jsx14(
|
|
1120
|
-
"span",
|
|
1121
|
-
{
|
|
1122
|
-
className: twMerge8(
|
|
1123
|
-
"self-stretch flex items-center shrink-0 select-none",
|
|
1124
|
-
"bg-card",
|
|
1125
|
-
"border-r border-r-border",
|
|
1126
|
-
"text-muted-foreground",
|
|
1127
|
-
sizeStyles[size]
|
|
1128
|
-
),
|
|
1129
|
-
children: prefix
|
|
1130
|
-
}
|
|
1131
|
-
),
|
|
1132
|
-
/* @__PURE__ */ jsx14(
|
|
1133
|
-
AriaInput,
|
|
1134
|
-
{
|
|
1135
|
-
placeholder,
|
|
1136
|
-
className: twMerge8(
|
|
1137
|
-
"w-full bg-transparent",
|
|
1138
|
-
sizeStyles[size],
|
|
1139
|
-
alignClasses[align],
|
|
1140
|
-
"text-foreground",
|
|
1141
|
-
"placeholder:text-muted-foreground",
|
|
1142
|
-
"outline-none border-none"
|
|
1143
|
-
)
|
|
1144
|
-
}
|
|
1145
|
-
)
|
|
1146
|
-
]
|
|
1147
|
-
}
|
|
1148
|
-
) : /* @__PURE__ */ jsx14(
|
|
1149
|
-
AriaInput,
|
|
1150
|
-
{
|
|
1151
|
-
placeholder,
|
|
1152
|
-
className: twMerge8(
|
|
1153
|
-
"w-full",
|
|
1154
|
-
sizeStyles[size],
|
|
1155
|
-
alignClasses[align],
|
|
1156
|
-
radiusClass,
|
|
1157
|
-
"border",
|
|
1158
|
-
"text-foreground",
|
|
1159
|
-
"bg-background",
|
|
1160
|
-
"placeholder:text-muted-foreground",
|
|
1161
|
-
"outline-none transition-colors",
|
|
1162
|
-
borderColor,
|
|
1163
|
-
"focus:ring-2 focus:ring-ring focus:border-ring",
|
|
1164
|
-
"disabled:opacity-50 disabled:pointer-events-none"
|
|
1165
|
-
)
|
|
1166
|
-
}
|
|
1167
|
-
),
|
|
1135
|
+
/* @__PURE__ */ jsxs6("div", { className: containerCx, children: [
|
|
1136
|
+
prefix,
|
|
1137
|
+
/* @__PURE__ */ jsx14(AriaInput, { placeholder, className: inputCx }),
|
|
1138
|
+
suffix
|
|
1139
|
+
] }),
|
|
1168
1140
|
description && /* @__PURE__ */ jsx14(Text, { slot: "description", className: "text-sm text-muted-foreground", children: description }),
|
|
1169
1141
|
isInvalid && /* @__PURE__ */ jsx14(
|
|
1170
1142
|
Text,
|
|
@@ -1517,7 +1489,7 @@ import {
|
|
|
1517
1489
|
} from "react-aria-components";
|
|
1518
1490
|
import { X as X2 } from "lucide-react";
|
|
1519
1491
|
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1520
|
-
var
|
|
1492
|
+
var sizeStyles3 = {
|
|
1521
1493
|
sm: "max-w-md",
|
|
1522
1494
|
md: "max-w-lg",
|
|
1523
1495
|
lg: "max-w-2xl",
|
|
@@ -1549,7 +1521,7 @@ function Dialog({
|
|
|
1549
1521
|
{
|
|
1550
1522
|
className: [
|
|
1551
1523
|
"w-full mx-4",
|
|
1552
|
-
|
|
1524
|
+
sizeStyles3[size],
|
|
1553
1525
|
"bg-background rounded-lg shadow-xl max-h-[85vh] flex flex-col",
|
|
1554
1526
|
"entering:animate-in entering:zoom-in-95 entering:fade-in",
|
|
1555
1527
|
"exiting:animate-out exiting:zoom-out-95 exiting:fade-out",
|
|
@@ -1817,59 +1789,50 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1817
1789
|
|
|
1818
1790
|
// src/components/Form/Switch/Switch.tsx
|
|
1819
1791
|
import {
|
|
1820
|
-
|
|
1792
|
+
SwitchField,
|
|
1793
|
+
SwitchButton
|
|
1821
1794
|
} from "react-aria-components";
|
|
1795
|
+
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
1822
1796
|
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1823
|
-
var trackColorMap = {
|
|
1824
|
-
primary: "bg-primary",
|
|
1825
|
-
success: "bg-success",
|
|
1826
|
-
destructive: "bg-destructive"
|
|
1827
|
-
};
|
|
1828
|
-
var presetColors = new Set(Object.keys(trackColorMap));
|
|
1829
|
-
function isPresetColor(color) {
|
|
1830
|
-
return presetColors.has(color);
|
|
1831
|
-
}
|
|
1832
1797
|
function Switch({
|
|
1833
1798
|
children,
|
|
1834
|
-
color = "primary",
|
|
1799
|
+
color = "var(--color-primary)",
|
|
1835
1800
|
className,
|
|
1836
1801
|
...props
|
|
1837
1802
|
}) {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
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(
|
|
1850
1818
|
"div",
|
|
1851
1819
|
{
|
|
1852
|
-
className:
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
className: [
|
|
1862
|
-
"w-4 h-4 rounded-full bg-background transition-transform shadow-sm",
|
|
1863
|
-
isSelected ? "translate-x-4" : "translate-x-0"
|
|
1864
|
-
].join(" ")
|
|
1865
|
-
}
|
|
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"
|
|
1866
1829
|
)
|
|
1867
1830
|
}
|
|
1868
|
-
)
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
}
|
|
1872
|
-
);
|
|
1831
|
+
)
|
|
1832
|
+
}
|
|
1833
|
+
),
|
|
1834
|
+
children && /* @__PURE__ */ jsx23("span", { children })
|
|
1835
|
+
] }) }) });
|
|
1873
1836
|
}
|
|
1874
1837
|
|
|
1875
1838
|
// src/components/Form/Radio/Radio.tsx
|
|
@@ -1877,17 +1840,24 @@ import {
|
|
|
1877
1840
|
RadioGroup as AriaRadioGroup,
|
|
1878
1841
|
Radio as AriaRadio
|
|
1879
1842
|
} from "react-aria-components";
|
|
1843
|
+
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
1880
1844
|
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1881
|
-
function RadioGroup({
|
|
1845
|
+
function RadioGroup({
|
|
1846
|
+
children,
|
|
1847
|
+
className,
|
|
1848
|
+
orientation = "vertical",
|
|
1849
|
+
...props
|
|
1850
|
+
}) {
|
|
1882
1851
|
return /* @__PURE__ */ jsx24(
|
|
1883
1852
|
AriaRadioGroup,
|
|
1884
1853
|
{
|
|
1885
1854
|
...props,
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
"disabled:opacity-50",
|
|
1855
|
+
orientation,
|
|
1856
|
+
className: twMerge13(
|
|
1857
|
+
"flex gap-2 disabled:opacity-50",
|
|
1858
|
+
orientation === "horizontal" ? "flex-row" : "flex-col",
|
|
1889
1859
|
className
|
|
1890
|
-
|
|
1860
|
+
),
|
|
1891
1861
|
children
|
|
1892
1862
|
}
|
|
1893
1863
|
);
|
|
@@ -2070,7 +2040,7 @@ function Breadcrumbs({ items, className }) {
|
|
|
2070
2040
|
import {
|
|
2071
2041
|
ToggleButton as AriaToggleButton2
|
|
2072
2042
|
} from "react-aria-components";
|
|
2073
|
-
import { twMerge as
|
|
2043
|
+
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
2074
2044
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2075
2045
|
var squareSizeStyles2 = {
|
|
2076
2046
|
xs: "h-6 w-6 text-xs",
|
|
@@ -2120,7 +2090,7 @@ function ToggleButton({
|
|
|
2120
2090
|
AriaToggleButton2,
|
|
2121
2091
|
{
|
|
2122
2092
|
...props,
|
|
2123
|
-
className: ({ isSelected }) =>
|
|
2093
|
+
className: ({ isSelected }) => twMerge14(
|
|
2124
2094
|
"inline-flex items-center justify-center gap-2 cursor-pointer",
|
|
2125
2095
|
isSquare ? "rounded-none" : "rounded-md",
|
|
2126
2096
|
"font-medium",
|
|
@@ -2143,7 +2113,7 @@ import {
|
|
|
2143
2113
|
MenuItem as AriaMenuItem,
|
|
2144
2114
|
Popover as Popover2
|
|
2145
2115
|
} from "react-aria-components";
|
|
2146
|
-
import { twMerge as
|
|
2116
|
+
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
2147
2117
|
|
|
2148
2118
|
// src/components/Menu/menuStyles.ts
|
|
2149
2119
|
var popoverStyles = `
|
|
@@ -2170,7 +2140,7 @@ function Menu2({
|
|
|
2170
2140
|
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
2171
2141
|
return /* @__PURE__ */ jsxs18(MenuTrigger, { children: [
|
|
2172
2142
|
children,
|
|
2173
|
-
/* @__PURE__ */ jsx29(Popover2, { className:
|
|
2143
|
+
/* @__PURE__ */ jsx29(Popover2, { className: twMerge15(popoverStyles, className), children: items ? /* @__PURE__ */ jsx29(
|
|
2174
2144
|
AriaMenu,
|
|
2175
2145
|
{
|
|
2176
2146
|
items,
|
|
@@ -2229,7 +2199,7 @@ import {
|
|
|
2229
2199
|
Popover as Popover3,
|
|
2230
2200
|
Pressable
|
|
2231
2201
|
} from "react-aria-components";
|
|
2232
|
-
import { twMerge as
|
|
2202
|
+
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
2233
2203
|
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2234
2204
|
function useContextMenu({
|
|
2235
2205
|
content,
|
|
@@ -2295,7 +2265,7 @@ function useContextMenu({
|
|
|
2295
2265
|
isNonModal: true,
|
|
2296
2266
|
placement: "bottom start",
|
|
2297
2267
|
ref: popoverRef,
|
|
2298
|
-
className:
|
|
2268
|
+
className: twMerge16(popoverStyles, className),
|
|
2299
2269
|
children: /* @__PURE__ */ jsx30(
|
|
2300
2270
|
AriaMenu2,
|
|
2301
2271
|
{
|
|
@@ -2458,7 +2428,7 @@ import {
|
|
|
2458
2428
|
Popover as AriaPopover,
|
|
2459
2429
|
Button as AriaButton3
|
|
2460
2430
|
} from "react-aria-components";
|
|
2461
|
-
import { twMerge as
|
|
2431
|
+
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
2462
2432
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2463
2433
|
function Popover4({ children, isOpen, onOpenChange }) {
|
|
2464
2434
|
return /* @__PURE__ */ jsx36(DialogTrigger, { isOpen, onOpenChange, children });
|
|
@@ -2468,7 +2438,7 @@ function PopoverTrigger({ children, className }) {
|
|
|
2468
2438
|
inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer
|
|
2469
2439
|
focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm
|
|
2470
2440
|
`;
|
|
2471
|
-
return /* @__PURE__ */ jsx36(AriaButton3, { className:
|
|
2441
|
+
return /* @__PURE__ */ jsx36(AriaButton3, { className: twMerge17(cx, className), children });
|
|
2472
2442
|
}
|
|
2473
2443
|
function PopoverContent({
|
|
2474
2444
|
placement = "bottom",
|
|
@@ -2495,7 +2465,7 @@ function PopoverContent({
|
|
|
2495
2465
|
...rest,
|
|
2496
2466
|
placement,
|
|
2497
2467
|
offset: offsetPx,
|
|
2498
|
-
className:
|
|
2468
|
+
className: twMerge17(cx, className),
|
|
2499
2469
|
children
|
|
2500
2470
|
}
|
|
2501
2471
|
);
|
|
@@ -2503,7 +2473,7 @@ function PopoverContent({
|
|
|
2503
2473
|
|
|
2504
2474
|
// src/components/Tabs/Tabs.tsx
|
|
2505
2475
|
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
2506
|
-
import { twMerge as
|
|
2476
|
+
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
2507
2477
|
import {
|
|
2508
2478
|
Tabs as AriaTabs,
|
|
2509
2479
|
TabList as AriaTabList,
|
|
@@ -2515,7 +2485,7 @@ var TabsContext = createContext2({
|
|
|
2515
2485
|
variant: "underline",
|
|
2516
2486
|
size: "md"
|
|
2517
2487
|
});
|
|
2518
|
-
var
|
|
2488
|
+
var sizeStyles4 = {
|
|
2519
2489
|
sm: "px-3 py-1.5 text-sm",
|
|
2520
2490
|
md: "px-4 py-2 text-base",
|
|
2521
2491
|
lg: "px-6 py-3 text-lg"
|
|
@@ -2533,7 +2503,7 @@ function Tabs({
|
|
|
2533
2503
|
{
|
|
2534
2504
|
...props,
|
|
2535
2505
|
orientation,
|
|
2536
|
-
className:
|
|
2506
|
+
className: twMerge18(
|
|
2537
2507
|
orientation === "vertical" ? "flex" : "",
|
|
2538
2508
|
className
|
|
2539
2509
|
),
|
|
@@ -2552,7 +2522,7 @@ function TabList({
|
|
|
2552
2522
|
AriaTabList,
|
|
2553
2523
|
{
|
|
2554
2524
|
...props,
|
|
2555
|
-
className: ({ orientation }) =>
|
|
2525
|
+
className: ({ orientation }) => twMerge18(
|
|
2556
2526
|
baseStyles,
|
|
2557
2527
|
orientation === "vertical" ? verticalStyles : "",
|
|
2558
2528
|
className
|
|
@@ -2568,14 +2538,14 @@ function Tab({ className, ...props }) {
|
|
|
2568
2538
|
...props,
|
|
2569
2539
|
className: ({ isSelected, isDisabled, isHovered, isPressed }) => {
|
|
2570
2540
|
if (variant === "unstyled") {
|
|
2571
|
-
return
|
|
2541
|
+
return twMerge18(
|
|
2572
2542
|
"cursor-pointer outline-none",
|
|
2573
2543
|
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2574
2544
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2575
2545
|
className
|
|
2576
2546
|
);
|
|
2577
2547
|
}
|
|
2578
|
-
return
|
|
2548
|
+
return twMerge18(
|
|
2579
2549
|
// Base
|
|
2580
2550
|
"cursor-pointer outline-none transition-colors",
|
|
2581
2551
|
"font-medium",
|
|
@@ -2584,7 +2554,7 @@ function Tab({ className, ...props }) {
|
|
|
2584
2554
|
// Disabled
|
|
2585
2555
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
2586
2556
|
// Size
|
|
2587
|
-
|
|
2557
|
+
sizeStyles4[size],
|
|
2588
2558
|
...getTabVariantStyles(variant, {
|
|
2589
2559
|
isSelected,
|
|
2590
2560
|
isHovered,
|
|
@@ -2623,7 +2593,7 @@ function TabPanel({ className, ...props }) {
|
|
|
2623
2593
|
AriaTabPanel,
|
|
2624
2594
|
{
|
|
2625
2595
|
...props,
|
|
2626
|
-
className:
|
|
2596
|
+
className: twMerge18(
|
|
2627
2597
|
variant === "unstyled" ? "outline-none" : "mt-4 outline-none",
|
|
2628
2598
|
className
|
|
2629
2599
|
)
|
|
@@ -2641,7 +2611,7 @@ import {
|
|
|
2641
2611
|
|
|
2642
2612
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2643
2613
|
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
2644
|
-
import { twMerge as
|
|
2614
|
+
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
2645
2615
|
import {
|
|
2646
2616
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2647
2617
|
ToggleButton as AriaToggleButton3
|
|
@@ -2650,7 +2620,7 @@ import { jsx as jsx38 } from "react/jsx-runtime";
|
|
|
2650
2620
|
var SegmentedControlContext = createContext3({
|
|
2651
2621
|
size: "md"
|
|
2652
2622
|
});
|
|
2653
|
-
var
|
|
2623
|
+
var sizeStyles5 = {
|
|
2654
2624
|
sm: "px-2.5 py-1 text-xs",
|
|
2655
2625
|
md: "px-3 py-1.5 text-sm",
|
|
2656
2626
|
lg: "px-4 py-2 text-base"
|
|
@@ -2674,7 +2644,7 @@ function SegmentedControl({
|
|
|
2674
2644
|
selectedKeys: isNoneMode ? /* @__PURE__ */ new Set() : selectedKeys,
|
|
2675
2645
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2676
2646
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2677
|
-
className:
|
|
2647
|
+
className: twMerge19(
|
|
2678
2648
|
"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 gap-0.5",
|
|
2679
2649
|
className
|
|
2680
2650
|
),
|
|
@@ -2691,7 +2661,7 @@ function SegmentedControlItem({
|
|
|
2691
2661
|
AriaToggleButton3,
|
|
2692
2662
|
{
|
|
2693
2663
|
...props,
|
|
2694
|
-
className: ({ isSelected, isHovered, isPressed, isDisabled }) =>
|
|
2664
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge19(
|
|
2695
2665
|
// Base layout
|
|
2696
2666
|
"inline-flex items-center justify-center",
|
|
2697
2667
|
"rounded-md",
|
|
@@ -2702,7 +2672,7 @@ function SegmentedControlItem({
|
|
|
2702
2672
|
// Disabled
|
|
2703
2673
|
isDisabled && "opacity-50 pointer-events-none",
|
|
2704
2674
|
// Size
|
|
2705
|
-
|
|
2675
|
+
sizeStyles5[size],
|
|
2706
2676
|
// Selected state
|
|
2707
2677
|
isSelected ? "bg-background text-foreground shadow-sm font-semibold" : isPressed ? "bg-card text-foreground" : isHovered ? "bg-card text-foreground" : "bg-transparent text-muted-foreground",
|
|
2708
2678
|
className
|
|
@@ -2712,8 +2682,21 @@ function SegmentedControlItem({
|
|
|
2712
2682
|
}
|
|
2713
2683
|
|
|
2714
2684
|
// src/components/Badge/Badge.tsx
|
|
2715
|
-
import { twMerge as
|
|
2716
|
-
|
|
2685
|
+
import { twMerge as twMerge21 } from "tailwind-merge";
|
|
2686
|
+
|
|
2687
|
+
// src/components/MetricText/MetricText.tsx
|
|
2688
|
+
import { twMerge as twMerge20 } from "tailwind-merge";
|
|
2689
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2690
|
+
function MetricText({ className, ...rest }) {
|
|
2691
|
+
const cx = twMerge20(
|
|
2692
|
+
"text-xs font-medium leading-none tracking-wider tabular-nums",
|
|
2693
|
+
className
|
|
2694
|
+
);
|
|
2695
|
+
return /* @__PURE__ */ jsx39("span", { className: cx, ...rest });
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
// src/components/Badge/Badge.tsx
|
|
2699
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2717
2700
|
var colorStyles = {
|
|
2718
2701
|
purple: "bg-badge-purple-bg text-badge-purple-text border-badge-purple-text/20",
|
|
2719
2702
|
teal: "bg-badge-teal-bg text-badge-teal-text border-badge-teal-text/20",
|
|
@@ -2722,7 +2705,7 @@ var colorStyles = {
|
|
|
2722
2705
|
green: "bg-badge-green-bg text-badge-green-text border-badge-green-text/20",
|
|
2723
2706
|
amber: "bg-badge-amber-bg text-badge-amber-text border-badge-amber-text/20"
|
|
2724
2707
|
};
|
|
2725
|
-
var
|
|
2708
|
+
var sizeStyles6 = {
|
|
2726
2709
|
xs: "px-1 py-0 text-[10px]",
|
|
2727
2710
|
sm: "px-1.5 py-0.5 text-xs",
|
|
2728
2711
|
md: "px-2 py-0.5 text-xs",
|
|
@@ -2737,18 +2720,17 @@ function Badge({
|
|
|
2737
2720
|
...rest
|
|
2738
2721
|
}) {
|
|
2739
2722
|
return /* @__PURE__ */ jsxs23(
|
|
2740
|
-
|
|
2723
|
+
MetricText,
|
|
2741
2724
|
{
|
|
2742
|
-
className:
|
|
2725
|
+
className: twMerge21(
|
|
2743
2726
|
"inline-flex items-center gap-1 rounded-full border",
|
|
2744
|
-
"font-medium leading-tight tracking-wider tabular-nums",
|
|
2745
2727
|
colorStyles[color],
|
|
2746
|
-
|
|
2728
|
+
sizeStyles6[size],
|
|
2747
2729
|
className
|
|
2748
2730
|
),
|
|
2749
2731
|
...rest,
|
|
2750
2732
|
children: [
|
|
2751
|
-
icon && /* @__PURE__ */
|
|
2733
|
+
icon && /* @__PURE__ */ jsx40(Icon, { icon, size: "xs" }),
|
|
2752
2734
|
children
|
|
2753
2735
|
]
|
|
2754
2736
|
}
|
|
@@ -2756,10 +2738,10 @@ function Badge({
|
|
|
2756
2738
|
}
|
|
2757
2739
|
|
|
2758
2740
|
// src/components/Card/Card.tsx
|
|
2759
|
-
import { twMerge as
|
|
2760
|
-
import { jsx as
|
|
2741
|
+
import { twMerge as twMerge22 } from "tailwind-merge";
|
|
2742
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2761
2743
|
function Card({ children, header, footer, className }) {
|
|
2762
|
-
const cx =
|
|
2744
|
+
const cx = twMerge22(
|
|
2763
2745
|
`
|
|
2764
2746
|
bg-card p-8
|
|
2765
2747
|
border border-border
|
|
@@ -2769,16 +2751,16 @@ function Card({ children, header, footer, className }) {
|
|
|
2769
2751
|
className
|
|
2770
2752
|
);
|
|
2771
2753
|
return /* @__PURE__ */ jsxs24("div", { className: cx, children: [
|
|
2772
|
-
header && /* @__PURE__ */
|
|
2754
|
+
header && /* @__PURE__ */ jsx41("div", { className: "border-b border-border", children: header }),
|
|
2773
2755
|
children,
|
|
2774
|
-
footer && /* @__PURE__ */
|
|
2756
|
+
footer && /* @__PURE__ */ jsx41("div", { className: "border-t border-border", children: footer })
|
|
2775
2757
|
] });
|
|
2776
2758
|
}
|
|
2777
2759
|
|
|
2778
2760
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2779
2761
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, Minus as Minus2 } from "lucide-react";
|
|
2780
|
-
import { twMerge as
|
|
2781
|
-
import { jsx as
|
|
2762
|
+
import { twMerge as twMerge23 } from "tailwind-merge";
|
|
2763
|
+
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2782
2764
|
function getDirection(current, previous) {
|
|
2783
2765
|
const diff = current - previous;
|
|
2784
2766
|
if (diff > 0) return "increase";
|
|
@@ -2834,13 +2816,13 @@ function DeltaIndicator({
|
|
|
2834
2816
|
return /* @__PURE__ */ jsxs25(
|
|
2835
2817
|
"span",
|
|
2836
2818
|
{
|
|
2837
|
-
className:
|
|
2819
|
+
className: twMerge23(
|
|
2838
2820
|
"inline-flex items-center gap-1 font-medium",
|
|
2839
2821
|
"text-muted-foreground",
|
|
2840
2822
|
className
|
|
2841
2823
|
),
|
|
2842
2824
|
children: [
|
|
2843
|
-
label && /* @__PURE__ */
|
|
2825
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2844
2826
|
unavailableText
|
|
2845
2827
|
]
|
|
2846
2828
|
}
|
|
@@ -2873,7 +2855,7 @@ function DeltaIndicator({
|
|
|
2873
2855
|
return /* @__PURE__ */ jsxs25(
|
|
2874
2856
|
"span",
|
|
2875
2857
|
{
|
|
2876
|
-
className:
|
|
2858
|
+
className: twMerge23(
|
|
2877
2859
|
"inline-flex items-center gap-1 font-medium",
|
|
2878
2860
|
colorStyles2,
|
|
2879
2861
|
isPill && [
|
|
@@ -2884,8 +2866,8 @@ function DeltaIndicator({
|
|
|
2884
2866
|
className
|
|
2885
2867
|
),
|
|
2886
2868
|
children: [
|
|
2887
|
-
label && /* @__PURE__ */
|
|
2888
|
-
/* @__PURE__ */
|
|
2869
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-sm text-muted-foreground mr-1", children: label }),
|
|
2870
|
+
/* @__PURE__ */ jsx42(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2889
2871
|
valueText
|
|
2890
2872
|
]
|
|
2891
2873
|
}
|
|
@@ -2893,8 +2875,8 @@ function DeltaIndicator({
|
|
|
2893
2875
|
}
|
|
2894
2876
|
|
|
2895
2877
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2896
|
-
import { twMerge as
|
|
2897
|
-
import { jsx as
|
|
2878
|
+
import { twMerge as twMerge24 } from "tailwind-merge";
|
|
2879
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2898
2880
|
var fillStyles = {
|
|
2899
2881
|
brand: "bg-progress-fill",
|
|
2900
2882
|
success: "bg-progress-fill-success",
|
|
@@ -2902,7 +2884,7 @@ var fillStyles = {
|
|
|
2902
2884
|
danger: "bg-progress-fill-danger",
|
|
2903
2885
|
neutral: "bg-muted-foreground"
|
|
2904
2886
|
};
|
|
2905
|
-
var
|
|
2887
|
+
var sizeStyles7 = {
|
|
2906
2888
|
sm: "h-1.5",
|
|
2907
2889
|
md: "h-3",
|
|
2908
2890
|
lg: "h-4"
|
|
@@ -2917,12 +2899,12 @@ function ProgressBar({
|
|
|
2917
2899
|
className
|
|
2918
2900
|
}) {
|
|
2919
2901
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2920
|
-
return /* @__PURE__ */ jsxs26("div", { className:
|
|
2902
|
+
return /* @__PURE__ */ jsxs26("div", { className: twMerge24("w-full", className), children: [
|
|
2921
2903
|
(label || description || showValue) && /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between mb-2", children: [
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm font-medium text-foreground", children: label }),
|
|
2905
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-muted-foreground", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2924
2906
|
] }),
|
|
2925
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ jsx43(
|
|
2926
2908
|
"div",
|
|
2927
2909
|
{
|
|
2928
2910
|
role: "progressbar",
|
|
@@ -2930,14 +2912,14 @@ function ProgressBar({
|
|
|
2930
2912
|
"aria-valuemin": 0,
|
|
2931
2913
|
"aria-valuemax": 100,
|
|
2932
2914
|
"aria-label": label ?? "Progress",
|
|
2933
|
-
className:
|
|
2915
|
+
className: twMerge24(
|
|
2934
2916
|
"w-full rounded-full bg-progress-track",
|
|
2935
|
-
|
|
2917
|
+
sizeStyles7[size]
|
|
2936
2918
|
),
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2919
|
+
children: /* @__PURE__ */ jsx43(
|
|
2938
2920
|
"div",
|
|
2939
2921
|
{
|
|
2940
|
-
className:
|
|
2922
|
+
className: twMerge24(
|
|
2941
2923
|
"h-full rounded-full transition-all duration-300",
|
|
2942
2924
|
fillStyles[variant]
|
|
2943
2925
|
),
|
|
@@ -2957,8 +2939,8 @@ import {
|
|
|
2957
2939
|
AlertCircle as AlertCircle2,
|
|
2958
2940
|
CheckCircle2 as CheckCircle22
|
|
2959
2941
|
} from "lucide-react";
|
|
2960
|
-
import { twMerge as
|
|
2961
|
-
import { jsx as
|
|
2942
|
+
import { twMerge as twMerge25 } from "tailwind-merge";
|
|
2943
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2962
2944
|
var variantConfig2 = {
|
|
2963
2945
|
info: {
|
|
2964
2946
|
icon: Info3,
|
|
@@ -3006,19 +2988,19 @@ function Banner({
|
|
|
3006
2988
|
"div",
|
|
3007
2989
|
{
|
|
3008
2990
|
role: config.role,
|
|
3009
|
-
className:
|
|
2991
|
+
className: twMerge25(
|
|
3010
2992
|
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
3011
2993
|
"text-sm",
|
|
3012
2994
|
config.containerClass,
|
|
3013
2995
|
className
|
|
3014
2996
|
),
|
|
3015
2997
|
children: [
|
|
3016
|
-
/* @__PURE__ */
|
|
2998
|
+
/* @__PURE__ */ jsx44(
|
|
3017
2999
|
Icon,
|
|
3018
3000
|
{
|
|
3019
3001
|
icon: resolvedIcon,
|
|
3020
3002
|
size: "md",
|
|
3021
|
-
className:
|
|
3003
|
+
className: twMerge25("mt-0.5", config.iconClass)
|
|
3022
3004
|
}
|
|
3023
3005
|
),
|
|
3024
3006
|
/* @__PURE__ */ jsxs27("div", { className: "flex-1", children: [
|
|
@@ -3028,14 +3010,14 @@ function Banner({
|
|
|
3028
3010
|
] }),
|
|
3029
3011
|
children
|
|
3030
3012
|
] }),
|
|
3031
|
-
dismissible && /* @__PURE__ */
|
|
3013
|
+
dismissible && /* @__PURE__ */ jsx44(
|
|
3032
3014
|
"button",
|
|
3033
3015
|
{
|
|
3034
3016
|
type: "button",
|
|
3035
3017
|
onClick: handleDismiss,
|
|
3036
3018
|
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",
|
|
3037
3019
|
"aria-label": "Dismiss",
|
|
3038
|
-
children: /* @__PURE__ */
|
|
3020
|
+
children: /* @__PURE__ */ jsx44(Icon, { icon: "X", size: "sm" })
|
|
3039
3021
|
}
|
|
3040
3022
|
)
|
|
3041
3023
|
]
|
|
@@ -3044,8 +3026,8 @@ function Banner({
|
|
|
3044
3026
|
}
|
|
3045
3027
|
|
|
3046
3028
|
// src/components/MetricCard/MetricCard.tsx
|
|
3047
|
-
import { twMerge as
|
|
3048
|
-
import { Fragment as Fragment8, jsx as
|
|
3029
|
+
import { twMerge as twMerge26 } from "tailwind-merge";
|
|
3030
|
+
import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3049
3031
|
var sizeConfig = {
|
|
3050
3032
|
sm: {
|
|
3051
3033
|
padding: "p-3",
|
|
@@ -3067,50 +3049,50 @@ function MetricCard({
|
|
|
3067
3049
|
className
|
|
3068
3050
|
}) {
|
|
3069
3051
|
const config = sizeConfig[size];
|
|
3070
|
-
const containerClass =
|
|
3052
|
+
const containerClass = twMerge26(
|
|
3071
3053
|
"bg-background border border-border rounded-lg shadow-sm",
|
|
3072
3054
|
config.padding,
|
|
3073
3055
|
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",
|
|
3074
3056
|
className
|
|
3075
3057
|
);
|
|
3076
3058
|
const content = /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
3077
|
-
/* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3059
|
+
/* @__PURE__ */ jsx45("div", { className: twMerge26(config.labelClass, "text-muted-foreground"), children: label }),
|
|
3060
|
+
/* @__PURE__ */ jsx45(
|
|
3079
3061
|
"div",
|
|
3080
3062
|
{
|
|
3081
|
-
className:
|
|
3063
|
+
className: twMerge26(
|
|
3082
3064
|
config.valueClass,
|
|
3083
3065
|
"font-semibold text-foreground mt-1 tabular-nums"
|
|
3084
3066
|
),
|
|
3085
3067
|
children: value
|
|
3086
3068
|
}
|
|
3087
3069
|
),
|
|
3088
|
-
secondary && /* @__PURE__ */
|
|
3070
|
+
secondary && /* @__PURE__ */ jsx45("div", { className: "mt-1 text-sm", children: secondary })
|
|
3089
3071
|
] });
|
|
3090
3072
|
if (href) {
|
|
3091
|
-
return /* @__PURE__ */
|
|
3073
|
+
return /* @__PURE__ */ jsx45("a", { href, className: containerClass, children: content });
|
|
3092
3074
|
}
|
|
3093
|
-
return /* @__PURE__ */
|
|
3075
|
+
return /* @__PURE__ */ jsx45("div", { className: containerClass, children: content });
|
|
3094
3076
|
}
|
|
3095
3077
|
|
|
3096
3078
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3097
3079
|
import { forwardRef as forwardRef7 } from "react";
|
|
3098
|
-
import { twMerge as
|
|
3099
|
-
import { jsx as
|
|
3080
|
+
import { twMerge as twMerge27 } from "tailwind-merge";
|
|
3081
|
+
import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3100
3082
|
var SectionHeader = forwardRef7(
|
|
3101
3083
|
function SectionHeader2({ title, as = "h2", children, className, ...rest }, ref) {
|
|
3102
3084
|
return /* @__PURE__ */ jsxs29(
|
|
3103
3085
|
"div",
|
|
3104
3086
|
{
|
|
3105
3087
|
ref,
|
|
3106
|
-
className:
|
|
3088
|
+
className: twMerge27(
|
|
3107
3089
|
"flex flex-wrap items-center gap-3 pt-0 pb-4",
|
|
3108
3090
|
className
|
|
3109
3091
|
),
|
|
3110
3092
|
...rest,
|
|
3111
3093
|
children: [
|
|
3112
|
-
/* @__PURE__ */
|
|
3113
|
-
children && /* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ jsx46(Heading, { as, children: title }),
|
|
3095
|
+
children && /* @__PURE__ */ jsx46("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3114
3096
|
]
|
|
3115
3097
|
}
|
|
3116
3098
|
);
|
|
@@ -3120,7 +3102,7 @@ var SectionHeader = forwardRef7(
|
|
|
3120
3102
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
3121
3103
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
3122
3104
|
import { Button as AriaButton4 } from "react-aria-components";
|
|
3123
|
-
import { jsx as
|
|
3105
|
+
import { jsx as jsx47, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3124
3106
|
var LayoutContext = createContext4("stacked");
|
|
3125
3107
|
var listGapStyles = {
|
|
3126
3108
|
stacked: "gap-4",
|
|
@@ -3131,7 +3113,7 @@ function DescriptionList({
|
|
|
3131
3113
|
layout = "stacked",
|
|
3132
3114
|
className
|
|
3133
3115
|
}) {
|
|
3134
|
-
return /* @__PURE__ */
|
|
3116
|
+
return /* @__PURE__ */ jsx47(LayoutContext.Provider, { value: layout, children: /* @__PURE__ */ jsx47(
|
|
3135
3117
|
"dl",
|
|
3136
3118
|
{
|
|
3137
3119
|
className: ["flex flex-col", listGapStyles[layout], className].filter(Boolean).join(" "),
|
|
@@ -3155,17 +3137,17 @@ function DescriptionListItem({
|
|
|
3155
3137
|
"text-sm m-0",
|
|
3156
3138
|
muted ? "text-muted-foreground" : "text-foreground"
|
|
3157
3139
|
].join(" ");
|
|
3158
|
-
const valueContent = /* @__PURE__ */
|
|
3140
|
+
const valueContent = /* @__PURE__ */ jsx47("dd", { className: valueClasses, children });
|
|
3159
3141
|
return /* @__PURE__ */ jsxs30("div", { className: itemLayoutStyles[layout], children: [
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
fullValue ? /* @__PURE__ */
|
|
3142
|
+
/* @__PURE__ */ jsx47("dt", { className: labelClasses, children: label }),
|
|
3143
|
+
fullValue ? /* @__PURE__ */ jsx47(Tooltip, { content: fullValue, children: /* @__PURE__ */ jsx47(AriaButton4, { className: "text-left outline-none cursor-default", children: valueContent }) }) : valueContent
|
|
3162
3144
|
] });
|
|
3163
3145
|
}
|
|
3164
3146
|
DescriptionList.Item = DescriptionListItem;
|
|
3165
3147
|
|
|
3166
3148
|
// src/components/PathPill/PathPill.tsx
|
|
3167
|
-
import { twMerge as
|
|
3168
|
-
import { jsx as
|
|
3149
|
+
import { twMerge as twMerge28 } from "tailwind-merge";
|
|
3150
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3169
3151
|
var hashColors = [
|
|
3170
3152
|
"purple",
|
|
3171
3153
|
"teal",
|
|
@@ -3191,17 +3173,17 @@ function PathPill({
|
|
|
3191
3173
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3192
3174
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3193
3175
|
const fullPath = segments.join(" / ");
|
|
3194
|
-
return /* @__PURE__ */
|
|
3176
|
+
return /* @__PURE__ */ jsx48(
|
|
3195
3177
|
"div",
|
|
3196
3178
|
{
|
|
3197
|
-
className:
|
|
3179
|
+
className: twMerge28("relative flex", className),
|
|
3198
3180
|
"aria-label": `Path: ${fullPath}`,
|
|
3199
3181
|
children: segments.map((segment, i) => {
|
|
3200
3182
|
const isCollapsed = i < dotCount;
|
|
3201
3183
|
const isLast = i === segments.length - 1;
|
|
3202
|
-
const cx =
|
|
3184
|
+
const cx = twMerge28(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3203
3185
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3204
|
-
return /* @__PURE__ */
|
|
3186
|
+
return /* @__PURE__ */ jsx48(
|
|
3205
3187
|
Badge,
|
|
3206
3188
|
{
|
|
3207
3189
|
className: cx,
|
|
@@ -3218,7 +3200,7 @@ function PathPill({
|
|
|
3218
3200
|
|
|
3219
3201
|
// src/components/FormWizard/FormWizard.tsx
|
|
3220
3202
|
import { createContext as createContext5, useContext as useContext5, useCallback as useCallback4, useMemo } from "react";
|
|
3221
|
-
import { jsx as
|
|
3203
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3222
3204
|
var FormWizardContext = createContext5({
|
|
3223
3205
|
currentStep: 0,
|
|
3224
3206
|
totalSteps: 1,
|
|
@@ -3253,13 +3235,13 @@ function FormWizard({
|
|
|
3253
3235
|
}),
|
|
3254
3236
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3255
3237
|
);
|
|
3256
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsx49(FormWizardContext.Provider, { value, children });
|
|
3257
3239
|
}
|
|
3258
3240
|
|
|
3259
3241
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3260
|
-
import { jsx as
|
|
3242
|
+
import { jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3261
3243
|
function CheckIcon() {
|
|
3262
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsx50(
|
|
3263
3245
|
"svg",
|
|
3264
3246
|
{
|
|
3265
3247
|
"aria-hidden": "true",
|
|
@@ -3270,13 +3252,13 @@ function CheckIcon() {
|
|
|
3270
3252
|
strokeWidth: "2",
|
|
3271
3253
|
strokeLinecap: "round",
|
|
3272
3254
|
strokeLinejoin: "round",
|
|
3273
|
-
children: /* @__PURE__ */
|
|
3255
|
+
children: /* @__PURE__ */ jsx50("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3274
3256
|
}
|
|
3275
3257
|
);
|
|
3276
3258
|
}
|
|
3277
3259
|
function FormWizardProgress({ labels }) {
|
|
3278
3260
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3279
|
-
return /* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ jsx50("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx50("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3280
3262
|
const isCompleted = index < currentStep;
|
|
3281
3263
|
const isCurrent = index === currentStep;
|
|
3282
3264
|
const isFuture = index > currentStep;
|
|
@@ -3287,7 +3269,7 @@ function FormWizardProgress({ labels }) {
|
|
|
3287
3269
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3288
3270
|
children: [
|
|
3289
3271
|
/* @__PURE__ */ jsxs31("div", { className: "flex w-full items-center", children: [
|
|
3290
|
-
index > 0 ? /* @__PURE__ */
|
|
3272
|
+
index > 0 ? /* @__PURE__ */ jsx50(
|
|
3291
3273
|
"div",
|
|
3292
3274
|
{
|
|
3293
3275
|
"aria-hidden": "true",
|
|
@@ -3296,8 +3278,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3296
3278
|
index <= currentStep ? "bg-primary" : "bg-border"
|
|
3297
3279
|
].join(" ")
|
|
3298
3280
|
}
|
|
3299
|
-
) : /* @__PURE__ */
|
|
3300
|
-
/* @__PURE__ */
|
|
3281
|
+
) : /* @__PURE__ */ jsx50("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3282
|
+
/* @__PURE__ */ jsx50(
|
|
3301
3283
|
"div",
|
|
3302
3284
|
{
|
|
3303
3285
|
className: [
|
|
@@ -3309,10 +3291,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3309
3291
|
isFuture ? "border-2 border-border bg-background text-muted-foreground" : ""
|
|
3310
3292
|
].join(" "),
|
|
3311
3293
|
"aria-hidden": "true",
|
|
3312
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3294
|
+
children: isCompleted ? /* @__PURE__ */ jsx50(CheckIcon, {}) : index + 1
|
|
3313
3295
|
}
|
|
3314
3296
|
),
|
|
3315
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3297
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx50(
|
|
3316
3298
|
"div",
|
|
3317
3299
|
{
|
|
3318
3300
|
"aria-hidden": "true",
|
|
@@ -3321,9 +3303,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3321
3303
|
index < currentStep ? "bg-primary" : "bg-border"
|
|
3322
3304
|
].join(" ")
|
|
3323
3305
|
}
|
|
3324
|
-
) : /* @__PURE__ */
|
|
3306
|
+
) : /* @__PURE__ */ jsx50("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3325
3307
|
] }),
|
|
3326
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsx50(
|
|
3327
3309
|
"span",
|
|
3328
3310
|
{
|
|
3329
3311
|
className: [
|
|
@@ -3341,7 +3323,7 @@ function FormWizardProgress({ labels }) {
|
|
|
3341
3323
|
}
|
|
3342
3324
|
|
|
3343
3325
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3344
|
-
import { jsx as
|
|
3326
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3345
3327
|
function FormWizardNav({
|
|
3346
3328
|
onNext,
|
|
3347
3329
|
isSubmitting = false,
|
|
@@ -3349,7 +3331,7 @@ function FormWizardNav({
|
|
|
3349
3331
|
}) {
|
|
3350
3332
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3351
3333
|
return /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3352
|
-
canGoBack && /* @__PURE__ */
|
|
3334
|
+
canGoBack && /* @__PURE__ */ jsx51(
|
|
3353
3335
|
Button,
|
|
3354
3336
|
{
|
|
3355
3337
|
variant: "secondary",
|
|
@@ -3359,7 +3341,7 @@ function FormWizardNav({
|
|
|
3359
3341
|
children: "Back"
|
|
3360
3342
|
}
|
|
3361
3343
|
),
|
|
3362
|
-
/* @__PURE__ */
|
|
3344
|
+
/* @__PURE__ */ jsx51(
|
|
3363
3345
|
Button,
|
|
3364
3346
|
{
|
|
3365
3347
|
variant: "primary",
|
|
@@ -3413,6 +3395,7 @@ export {
|
|
|
3413
3395
|
MenuSection,
|
|
3414
3396
|
MenuSeparator,
|
|
3415
3397
|
MetricCard,
|
|
3398
|
+
MetricText,
|
|
3416
3399
|
PathPill,
|
|
3417
3400
|
Popover4 as Popover,
|
|
3418
3401
|
PopoverContent,
|
|
@@ -3445,11 +3428,14 @@ export {
|
|
|
3445
3428
|
TabList2 as UnstyledTabList,
|
|
3446
3429
|
TabPanel2 as UnstyledTabPanel,
|
|
3447
3430
|
Tabs2 as UnstyledTabs,
|
|
3431
|
+
buttonBaseClass,
|
|
3448
3432
|
createToastBridge,
|
|
3449
3433
|
iconRegistry,
|
|
3450
3434
|
pillColorFromName,
|
|
3435
|
+
selectedStyles,
|
|
3451
3436
|
useContextMenu,
|
|
3452
3437
|
useFormWizard,
|
|
3453
|
-
useToast
|
|
3438
|
+
useToast,
|
|
3439
|
+
variantStyles
|
|
3454
3440
|
};
|
|
3455
3441
|
//# sourceMappingURL=index.js.map
|