@cytario/design 4.0.0 → 5.0.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 +3 -71
- package/dist/index.js +104 -589
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -2032,240 +2032,6 @@ import {
|
|
|
2032
2032
|
TabPanel as TabPanel2
|
|
2033
2033
|
} from "react-aria-components";
|
|
2034
2034
|
|
|
2035
|
-
// src/components/Tree/Tree.tsx
|
|
2036
|
-
import { useCallback as useCallback2, useImperativeHandle, useRef as useRef2, useState as useState2 } from "react";
|
|
2037
|
-
import { Tree as ArboristTree } from "react-arborist";
|
|
2038
|
-
import { ChevronRight as ChevronRight2, Folder, File } from "lucide-react";
|
|
2039
|
-
import { Check as Check4 } from "lucide-react";
|
|
2040
|
-
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2041
|
-
var rowHeightMap = {
|
|
2042
|
-
compact: 32,
|
|
2043
|
-
comfortable: 40
|
|
2044
|
-
};
|
|
2045
|
-
function NodeRenderer({
|
|
2046
|
-
node,
|
|
2047
|
-
style,
|
|
2048
|
-
tree,
|
|
2049
|
-
dragHandle,
|
|
2050
|
-
checkedIds,
|
|
2051
|
-
onCheckToggle,
|
|
2052
|
-
selectionMode,
|
|
2053
|
-
size,
|
|
2054
|
-
onHover,
|
|
2055
|
-
onHoverEnd,
|
|
2056
|
-
onToggle
|
|
2057
|
-
}) {
|
|
2058
|
-
const data = node.data;
|
|
2059
|
-
const isCheckbox = selectionMode === "checkbox";
|
|
2060
|
-
const isChecked = isCheckbox && checkedIds.has(node.id);
|
|
2061
|
-
const isSelected = node.isSelected && !isCheckbox;
|
|
2062
|
-
const isCompact = size === "compact";
|
|
2063
|
-
const IconComponent = data.icon ? data.icon : node.isInternal ? Folder : File;
|
|
2064
|
-
return /* @__PURE__ */ jsxs21(
|
|
2065
|
-
"div",
|
|
2066
|
-
{
|
|
2067
|
-
ref: dragHandle,
|
|
2068
|
-
style,
|
|
2069
|
-
className: [
|
|
2070
|
-
"relative flex items-center cursor-default select-none",
|
|
2071
|
-
isCompact ? "gap-0.5 px-2" : "gap-1 px-3",
|
|
2072
|
-
"text-sm text-(--color-text-primary)",
|
|
2073
|
-
"outline-none",
|
|
2074
|
-
// Full-width background via pseudo-element
|
|
2075
|
-
"before:absolute before:inset-y-0 before:left-[-100vw] before:right-0 before:-z-10 before:transition-colors",
|
|
2076
|
-
isSelected ? "before:bg-(--color-surface-selected) hover:before:bg-(--color-surface-selected-hover) border-l-2 border-l-(--color-brand-accent)" : "hover:before:bg-(--color-surface-hover)",
|
|
2077
|
-
node.isFocused ? "outline-2 outline-(--color-border-focus) outline-offset-[-2px]" : ""
|
|
2078
|
-
].filter(Boolean).join(" "),
|
|
2079
|
-
role: "treeitem",
|
|
2080
|
-
"aria-selected": isCheckbox ? isChecked : node.isSelected,
|
|
2081
|
-
"aria-expanded": node.isInternal ? node.isOpen : void 0,
|
|
2082
|
-
"aria-level": node.level + 1,
|
|
2083
|
-
onPointerEnter: () => onHover?.(node.data),
|
|
2084
|
-
onPointerLeave: () => onHoverEnd?.(node.data),
|
|
2085
|
-
onClick: (e) => {
|
|
2086
|
-
if (isCheckbox) {
|
|
2087
|
-
onCheckToggle(node.id);
|
|
2088
|
-
} else {
|
|
2089
|
-
node.handleClick(e);
|
|
2090
|
-
}
|
|
2091
|
-
},
|
|
2092
|
-
onKeyDown: (e) => {
|
|
2093
|
-
if (isCheckbox && (e.key === " " || e.key === "Enter")) {
|
|
2094
|
-
e.preventDefault();
|
|
2095
|
-
onCheckToggle(node.id);
|
|
2096
|
-
}
|
|
2097
|
-
},
|
|
2098
|
-
children: [
|
|
2099
|
-
/* @__PURE__ */ jsx34(
|
|
2100
|
-
"button",
|
|
2101
|
-
{
|
|
2102
|
-
type: "button",
|
|
2103
|
-
className: [
|
|
2104
|
-
"flex items-center justify-center w-6 h-6 shrink-0",
|
|
2105
|
-
"rounded-sm",
|
|
2106
|
-
"text-(--color-text-secondary)",
|
|
2107
|
-
"hover:text-(--color-text-primary)",
|
|
2108
|
-
"transition-transform",
|
|
2109
|
-
node.isInternal ? "visible" : "invisible"
|
|
2110
|
-
].filter(Boolean).join(" "),
|
|
2111
|
-
onClick: (e) => {
|
|
2112
|
-
e.stopPropagation();
|
|
2113
|
-
node.toggle();
|
|
2114
|
-
onToggle?.(node.data);
|
|
2115
|
-
},
|
|
2116
|
-
tabIndex: -1,
|
|
2117
|
-
"aria-label": node.isOpen ? "Collapse" : "Expand",
|
|
2118
|
-
children: /* @__PURE__ */ jsx34(
|
|
2119
|
-
ChevronRight2,
|
|
2120
|
-
{
|
|
2121
|
-
size: 14,
|
|
2122
|
-
className: [
|
|
2123
|
-
"transition-transform",
|
|
2124
|
-
node.isOpen ? "rotate-90" : ""
|
|
2125
|
-
].filter(Boolean).join(" ")
|
|
2126
|
-
}
|
|
2127
|
-
)
|
|
2128
|
-
}
|
|
2129
|
-
),
|
|
2130
|
-
isCheckbox && /* @__PURE__ */ jsx34(
|
|
2131
|
-
"div",
|
|
2132
|
-
{
|
|
2133
|
-
className: [
|
|
2134
|
-
"flex items-center justify-center w-5 h-5 shrink-0",
|
|
2135
|
-
"rounded-sm border transition-colors",
|
|
2136
|
-
isChecked ? "bg-(--color-action-primary) border-(--color-action-primary)" : "bg-(--color-surface-default) border-(--color-border-default) hover:border-(--color-border-strong)"
|
|
2137
|
-
].join(" "),
|
|
2138
|
-
role: "checkbox",
|
|
2139
|
-
"aria-checked": isChecked,
|
|
2140
|
-
"aria-label": `Select ${data.name}`,
|
|
2141
|
-
children: isChecked && /* @__PURE__ */ jsx34(
|
|
2142
|
-
Check4,
|
|
2143
|
-
{
|
|
2144
|
-
className: "w-3 h-3 text-(--color-text-inverse)",
|
|
2145
|
-
strokeWidth: 3
|
|
2146
|
-
}
|
|
2147
|
-
)
|
|
2148
|
-
}
|
|
2149
|
-
),
|
|
2150
|
-
/* @__PURE__ */ jsx34(
|
|
2151
|
-
IconComponent,
|
|
2152
|
-
{
|
|
2153
|
-
size: 16,
|
|
2154
|
-
className: "shrink-0 text-(--color-text-secondary)",
|
|
2155
|
-
"aria-hidden": "true"
|
|
2156
|
-
}
|
|
2157
|
-
),
|
|
2158
|
-
/* @__PURE__ */ jsx34("span", { className: "truncate", children: data.name })
|
|
2159
|
-
]
|
|
2160
|
-
}
|
|
2161
|
-
);
|
|
2162
|
-
}
|
|
2163
|
-
function Tree({
|
|
2164
|
-
data,
|
|
2165
|
-
"aria-label": ariaLabel,
|
|
2166
|
-
size = "comfortable",
|
|
2167
|
-
selectionMode = "single",
|
|
2168
|
-
selectedIds,
|
|
2169
|
-
onSelectionChange,
|
|
2170
|
-
onActivate,
|
|
2171
|
-
onToggle,
|
|
2172
|
-
onHover,
|
|
2173
|
-
onHoverEnd,
|
|
2174
|
-
openByDefault = false,
|
|
2175
|
-
searchTerm,
|
|
2176
|
-
searchMatch,
|
|
2177
|
-
height = 400,
|
|
2178
|
-
indent = 24,
|
|
2179
|
-
disableDrag = true,
|
|
2180
|
-
disableDrop = true,
|
|
2181
|
-
treeRef,
|
|
2182
|
-
className
|
|
2183
|
-
}) {
|
|
2184
|
-
const internalRef = useRef2(null);
|
|
2185
|
-
useImperativeHandle(treeRef, () => internalRef.current, []);
|
|
2186
|
-
const [internalChecked, setInternalChecked] = useState2(
|
|
2187
|
-
() => /* @__PURE__ */ new Set()
|
|
2188
|
-
);
|
|
2189
|
-
const checkedIds = selectedIds ?? internalChecked;
|
|
2190
|
-
const handleCheckToggle = useCallback2(
|
|
2191
|
-
(id) => {
|
|
2192
|
-
const next = new Set(checkedIds);
|
|
2193
|
-
if (next.has(id)) {
|
|
2194
|
-
next.delete(id);
|
|
2195
|
-
} else {
|
|
2196
|
-
next.add(id);
|
|
2197
|
-
}
|
|
2198
|
-
if (onSelectionChange) {
|
|
2199
|
-
onSelectionChange(next);
|
|
2200
|
-
} else {
|
|
2201
|
-
setInternalChecked(next);
|
|
2202
|
-
}
|
|
2203
|
-
},
|
|
2204
|
-
[checkedIds, onSelectionChange]
|
|
2205
|
-
);
|
|
2206
|
-
const handleSelect = useCallback2(
|
|
2207
|
-
(nodes) => {
|
|
2208
|
-
if (selectionMode === "checkbox" || selectionMode === "none") return;
|
|
2209
|
-
if (onSelectionChange) {
|
|
2210
|
-
onSelectionChange(new Set(nodes.map((n) => n.id)));
|
|
2211
|
-
}
|
|
2212
|
-
},
|
|
2213
|
-
[selectionMode, onSelectionChange]
|
|
2214
|
-
);
|
|
2215
|
-
const handleActivate = useCallback2(
|
|
2216
|
-
(node) => {
|
|
2217
|
-
if (onActivate) {
|
|
2218
|
-
onActivate(node.data);
|
|
2219
|
-
}
|
|
2220
|
-
},
|
|
2221
|
-
[onActivate]
|
|
2222
|
-
);
|
|
2223
|
-
const arboristSearchMatch = searchMatch ? (node, term) => searchMatch(node.data, term) : void 0;
|
|
2224
|
-
const selectionProp = selectionMode === "single" && selectedIds && selectedIds.size > 0 ? [...selectedIds][0] : void 0;
|
|
2225
|
-
return /* @__PURE__ */ jsx34(
|
|
2226
|
-
"div",
|
|
2227
|
-
{
|
|
2228
|
-
role: "tree",
|
|
2229
|
-
"aria-label": ariaLabel,
|
|
2230
|
-
className: ["outline-none overflow-hidden", className].filter(Boolean).join(" "),
|
|
2231
|
-
children: /* @__PURE__ */ jsx34(
|
|
2232
|
-
ArboristTree,
|
|
2233
|
-
{
|
|
2234
|
-
ref: internalRef,
|
|
2235
|
-
data,
|
|
2236
|
-
width: "100%",
|
|
2237
|
-
height,
|
|
2238
|
-
rowHeight: rowHeightMap[size],
|
|
2239
|
-
indent,
|
|
2240
|
-
openByDefault,
|
|
2241
|
-
searchTerm,
|
|
2242
|
-
searchMatch: arboristSearchMatch,
|
|
2243
|
-
disableDrag,
|
|
2244
|
-
disableDrop,
|
|
2245
|
-
disableMultiSelection: selectionMode === "single" || selectionMode === "none",
|
|
2246
|
-
selection: selectionProp,
|
|
2247
|
-
onSelect: handleSelect,
|
|
2248
|
-
onActivate: handleActivate,
|
|
2249
|
-
disableEdit: true,
|
|
2250
|
-
children: (props) => /* @__PURE__ */ jsx34(
|
|
2251
|
-
NodeRenderer,
|
|
2252
|
-
{
|
|
2253
|
-
...props,
|
|
2254
|
-
checkedIds,
|
|
2255
|
-
onCheckToggle: handleCheckToggle,
|
|
2256
|
-
selectionMode,
|
|
2257
|
-
size,
|
|
2258
|
-
onHover,
|
|
2259
|
-
onHoverEnd,
|
|
2260
|
-
onToggle
|
|
2261
|
-
}
|
|
2262
|
-
)
|
|
2263
|
-
}
|
|
2264
|
-
)
|
|
2265
|
-
}
|
|
2266
|
-
);
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
2035
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2270
2036
|
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
2271
2037
|
import { twMerge as twMerge10 } from "tailwind-merge";
|
|
@@ -2273,7 +2039,7 @@ import {
|
|
|
2273
2039
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2274
2040
|
ToggleButton as AriaToggleButton2
|
|
2275
2041
|
} from "react-aria-components";
|
|
2276
|
-
import { jsx as
|
|
2042
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2277
2043
|
var SegmentedControlContext = createContext5({
|
|
2278
2044
|
size: "md"
|
|
2279
2045
|
});
|
|
@@ -2293,7 +2059,7 @@ function SegmentedControl({
|
|
|
2293
2059
|
...props
|
|
2294
2060
|
}) {
|
|
2295
2061
|
const isNoneMode = selectionMode === "none";
|
|
2296
|
-
return /* @__PURE__ */
|
|
2062
|
+
return /* @__PURE__ */ jsx34(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx34(
|
|
2297
2063
|
AriaToggleButtonGroup,
|
|
2298
2064
|
{
|
|
2299
2065
|
...props,
|
|
@@ -2314,7 +2080,7 @@ function SegmentedControlItem({
|
|
|
2314
2080
|
...props
|
|
2315
2081
|
}) {
|
|
2316
2082
|
const { size } = useContext5(SegmentedControlContext);
|
|
2317
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ jsx34(
|
|
2318
2084
|
AriaToggleButton2,
|
|
2319
2085
|
{
|
|
2320
2086
|
...props,
|
|
@@ -2338,257 +2104,9 @@ function SegmentedControlItem({
|
|
|
2338
2104
|
);
|
|
2339
2105
|
}
|
|
2340
2106
|
|
|
2341
|
-
// src/components/FileCard/FileCard.tsx
|
|
2342
|
-
import { useCallback as useCallback3 } from "react";
|
|
2343
|
-
import { File as File2, Info as Info2 } from "lucide-react";
|
|
2344
|
-
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2345
|
-
function FileCard({
|
|
2346
|
-
name,
|
|
2347
|
-
icon: IconComponent = File2,
|
|
2348
|
-
size,
|
|
2349
|
-
compact = false,
|
|
2350
|
-
children,
|
|
2351
|
-
onInfo,
|
|
2352
|
-
onPress,
|
|
2353
|
-
className
|
|
2354
|
-
}) {
|
|
2355
|
-
const isInteractive = !!onPress;
|
|
2356
|
-
const radius = compact ? "rounded-md" : "rounded-lg";
|
|
2357
|
-
const iconSize = compact ? 24 : 32;
|
|
2358
|
-
const thumbnailClass = compact ? "aspect-square rounded-t-(--border-radius-md)" : "aspect-[4/3] rounded-t-(--border-radius-lg)";
|
|
2359
|
-
const handleInfoClick = useCallback3(
|
|
2360
|
-
(e) => {
|
|
2361
|
-
if (isInteractive) {
|
|
2362
|
-
e.stopPropagation();
|
|
2363
|
-
e.preventDefault();
|
|
2364
|
-
}
|
|
2365
|
-
onInfo?.();
|
|
2366
|
-
},
|
|
2367
|
-
[onInfo, isInteractive]
|
|
2368
|
-
);
|
|
2369
|
-
const handleKeyDown = useCallback3(
|
|
2370
|
-
(e) => {
|
|
2371
|
-
if (onPress && (e.key === "Enter" || e.key === " ")) {
|
|
2372
|
-
e.preventDefault();
|
|
2373
|
-
onPress();
|
|
2374
|
-
}
|
|
2375
|
-
},
|
|
2376
|
-
[onPress]
|
|
2377
|
-
);
|
|
2378
|
-
const cardContent = /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2379
|
-
/* @__PURE__ */ jsx36(
|
|
2380
|
-
"div",
|
|
2381
|
-
{
|
|
2382
|
-
className: `shrink-0 overflow-hidden bg-neutral-900 ${thumbnailClass}`,
|
|
2383
|
-
children: children ? /* @__PURE__ */ jsx36("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx36(IconComponent, { size: iconSize, className: "text-(--color-text-secondary)" }) })
|
|
2384
|
-
}
|
|
2385
|
-
),
|
|
2386
|
-
/* @__PURE__ */ jsx36(
|
|
2387
|
-
"div",
|
|
2388
|
-
{
|
|
2389
|
-
className: [
|
|
2390
|
-
"flex flex-col border-t border-(--color-border-default)",
|
|
2391
|
-
"bg-(--color-surface-default)",
|
|
2392
|
-
compact ? "px-2 py-1.5 rounded-b-(--border-radius-md)" : "gap-0.5 px-3 py-2 rounded-b-(--border-radius-lg)"
|
|
2393
|
-
].join(" "),
|
|
2394
|
-
children: compact ? /* @__PURE__ */ jsx36("span", { className: "text-xs font-medium text-(--color-text-primary) truncate", children: name }) : /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2395
|
-
/* @__PURE__ */ jsxs22("span", { className: "flex items-center gap-1.5", children: [
|
|
2396
|
-
/* @__PURE__ */ jsx36(
|
|
2397
|
-
IconComponent,
|
|
2398
|
-
{
|
|
2399
|
-
size: 16,
|
|
2400
|
-
className: "shrink-0 text-(--color-text-secondary)"
|
|
2401
|
-
}
|
|
2402
|
-
),
|
|
2403
|
-
/* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 text-sm font-medium text-(--color-text-primary) truncate", children: name }),
|
|
2404
|
-
onInfo && /* @__PURE__ */ jsx36(
|
|
2405
|
-
"span",
|
|
2406
|
-
{
|
|
2407
|
-
onClick: handleInfoClick,
|
|
2408
|
-
onKeyDown: (e) => {
|
|
2409
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
2410
|
-
handleInfoClick(e);
|
|
2411
|
-
}
|
|
2412
|
-
},
|
|
2413
|
-
role: "presentation",
|
|
2414
|
-
children: /* @__PURE__ */ jsx36(
|
|
2415
|
-
IconButton,
|
|
2416
|
-
{
|
|
2417
|
-
icon: Info2,
|
|
2418
|
-
"aria-label": `Show info for ${name}`,
|
|
2419
|
-
variant: "ghost",
|
|
2420
|
-
size: "sm",
|
|
2421
|
-
className: "shrink-0 -mt-0.5 -mr-1",
|
|
2422
|
-
onPress: onInfo
|
|
2423
|
-
}
|
|
2424
|
-
)
|
|
2425
|
-
}
|
|
2426
|
-
)
|
|
2427
|
-
] }),
|
|
2428
|
-
size && /* @__PURE__ */ jsx36("span", { className: "text-xs text-(--color-text-secondary) tabular-nums pl-[22px]", children: size })
|
|
2429
|
-
] })
|
|
2430
|
-
}
|
|
2431
|
-
)
|
|
2432
|
-
] });
|
|
2433
|
-
const baseStyles = [
|
|
2434
|
-
"group flex flex-col overflow-hidden",
|
|
2435
|
-
radius,
|
|
2436
|
-
"border border-(--color-border-default)",
|
|
2437
|
-
"shadow-sm",
|
|
2438
|
-
"transition-all",
|
|
2439
|
-
isInteractive && "hover:border-(--color-border-focus) hover:shadow-md cursor-pointer",
|
|
2440
|
-
isInteractive && "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2441
|
-
className
|
|
2442
|
-
].filter(Boolean).join(" ");
|
|
2443
|
-
if (onPress) {
|
|
2444
|
-
return /* @__PURE__ */ jsx36(
|
|
2445
|
-
"div",
|
|
2446
|
-
{
|
|
2447
|
-
role: "button",
|
|
2448
|
-
tabIndex: 0,
|
|
2449
|
-
"aria-label": name,
|
|
2450
|
-
className: baseStyles,
|
|
2451
|
-
onClick: onPress,
|
|
2452
|
-
onKeyDown: handleKeyDown,
|
|
2453
|
-
children: cardContent
|
|
2454
|
-
}
|
|
2455
|
-
);
|
|
2456
|
-
}
|
|
2457
|
-
return /* @__PURE__ */ jsx36("div", { className: baseStyles, children: cardContent });
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
2461
|
-
import { useCallback as useCallback4 } from "react";
|
|
2462
|
-
import { AlertCircle, Database } from "lucide-react";
|
|
2463
|
-
import { twMerge as twMerge11 } from "tailwind-merge";
|
|
2464
|
-
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2465
|
-
var statusDotStyles = {
|
|
2466
|
-
connected: "bg-(--color-status-success)",
|
|
2467
|
-
error: "border-2 border-(--color-status-danger) bg-transparent",
|
|
2468
|
-
loading: "bg-(--color-status-warning) animate-pulse"
|
|
2469
|
-
};
|
|
2470
|
-
function PreviewArea({
|
|
2471
|
-
status = "connected",
|
|
2472
|
-
errorMessage,
|
|
2473
|
-
children
|
|
2474
|
-
}) {
|
|
2475
|
-
if (status === "loading") {
|
|
2476
|
-
return /* @__PURE__ */ jsx37("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx37(Spinner, { size: "lg", "aria-label": "Loading connection" }) });
|
|
2477
|
-
}
|
|
2478
|
-
if (status === "error") {
|
|
2479
|
-
return /* @__PURE__ */ jsxs23("div", { className: "flex h-full flex-col items-center justify-center gap-2 bg-(--color-surface-danger) px-4", children: [
|
|
2480
|
-
/* @__PURE__ */ jsx37(
|
|
2481
|
-
Icon,
|
|
2482
|
-
{
|
|
2483
|
-
icon: AlertCircle,
|
|
2484
|
-
size: "lg",
|
|
2485
|
-
className: "text-(--color-text-danger)"
|
|
2486
|
-
}
|
|
2487
|
-
),
|
|
2488
|
-
errorMessage && /* @__PURE__ */ jsx37("p", { className: "text-center text-xs text-(--color-text-danger)", children: errorMessage })
|
|
2489
|
-
] });
|
|
2490
|
-
}
|
|
2491
|
-
if (children) {
|
|
2492
|
-
return /* @__PURE__ */ jsx37("div", { className: "h-full w-full overflow-hidden", children });
|
|
2493
|
-
}
|
|
2494
|
-
return /* @__PURE__ */ jsx37("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx37(
|
|
2495
|
-
Icon,
|
|
2496
|
-
{
|
|
2497
|
-
icon: Database,
|
|
2498
|
-
size: "xl",
|
|
2499
|
-
className: "text-(--color-text-secondary)"
|
|
2500
|
-
}
|
|
2501
|
-
) });
|
|
2502
|
-
}
|
|
2503
|
-
function StorageConnectionCard({
|
|
2504
|
-
name,
|
|
2505
|
-
status,
|
|
2506
|
-
errorMessage,
|
|
2507
|
-
meta,
|
|
2508
|
-
children,
|
|
2509
|
-
href,
|
|
2510
|
-
onPress,
|
|
2511
|
-
actions,
|
|
2512
|
-
className
|
|
2513
|
-
}) {
|
|
2514
|
-
const isInteractive = !!href || !!onPress;
|
|
2515
|
-
const handleKeyDown = useCallback4(
|
|
2516
|
-
(e) => {
|
|
2517
|
-
if (onPress && (e.key === "Enter" || e.key === " ")) {
|
|
2518
|
-
e.preventDefault();
|
|
2519
|
-
onPress();
|
|
2520
|
-
}
|
|
2521
|
-
},
|
|
2522
|
-
[onPress]
|
|
2523
|
-
);
|
|
2524
|
-
const cardContent = /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2525
|
-
/* @__PURE__ */ jsx37("div", { className: "aspect-[4/3] bg-neutral-900 overflow-hidden rounded-t-(--border-radius-lg)", children: /* @__PURE__ */ jsx37(PreviewArea, { status, errorMessage, children }) }),
|
|
2526
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 border-t border-(--color-border-default) bg-(--color-surface-default) px-3 py-2.5 rounded-b-(--border-radius-lg)", children: [
|
|
2527
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-2", children: [
|
|
2528
|
-
status && /* @__PURE__ */ jsx37(
|
|
2529
|
-
"span",
|
|
2530
|
-
{
|
|
2531
|
-
className: twMerge11(
|
|
2532
|
-
"mt-1.5 h-2 w-2 shrink-0 rounded-full",
|
|
2533
|
-
statusDotStyles[status]
|
|
2534
|
-
),
|
|
2535
|
-
"aria-label": `Status: ${status}`
|
|
2536
|
-
}
|
|
2537
|
-
),
|
|
2538
|
-
/* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 line-clamp-2 text-sm font-medium text-(--color-text-primary)", children: name }),
|
|
2539
|
-
actions && /* @__PURE__ */ jsx37(
|
|
2540
|
-
"span",
|
|
2541
|
-
{
|
|
2542
|
-
onClick: (e) => {
|
|
2543
|
-
if (isInteractive) {
|
|
2544
|
-
e.stopPropagation();
|
|
2545
|
-
e.preventDefault();
|
|
2546
|
-
}
|
|
2547
|
-
},
|
|
2548
|
-
onKeyDown: (e) => {
|
|
2549
|
-
if (isInteractive) {
|
|
2550
|
-
e.stopPropagation();
|
|
2551
|
-
}
|
|
2552
|
-
},
|
|
2553
|
-
role: "presentation",
|
|
2554
|
-
className: "shrink-0 -mt-1 -mr-1",
|
|
2555
|
-
children: actions
|
|
2556
|
-
}
|
|
2557
|
-
)
|
|
2558
|
-
] }),
|
|
2559
|
-
meta && /* @__PURE__ */ jsx37("div", { className: twMerge11("flex items-center gap-2", status && "pl-4"), children: meta })
|
|
2560
|
-
] })
|
|
2561
|
-
] });
|
|
2562
|
-
const baseStyles = twMerge11(
|
|
2563
|
-
"flex flex-col overflow-hidden rounded-lg",
|
|
2564
|
-
"border border-(--color-border-default)",
|
|
2565
|
-
"shadow-sm transition-all",
|
|
2566
|
-
isInteractive && "hover:border-(--color-border-focus) hover:shadow-md cursor-pointer",
|
|
2567
|
-
isInteractive && "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2568
|
-
className
|
|
2569
|
-
);
|
|
2570
|
-
if (href) {
|
|
2571
|
-
return /* @__PURE__ */ jsx37("a", { href, className: twMerge11(baseStyles, "no-underline"), children: cardContent });
|
|
2572
|
-
}
|
|
2573
|
-
if (onPress) {
|
|
2574
|
-
return /* @__PURE__ */ jsx37(
|
|
2575
|
-
"div",
|
|
2576
|
-
{
|
|
2577
|
-
role: "button",
|
|
2578
|
-
tabIndex: 0,
|
|
2579
|
-
className: baseStyles,
|
|
2580
|
-
onClick: onPress,
|
|
2581
|
-
onKeyDown: handleKeyDown,
|
|
2582
|
-
children: cardContent
|
|
2583
|
-
}
|
|
2584
|
-
);
|
|
2585
|
-
}
|
|
2586
|
-
return /* @__PURE__ */ jsx37("div", { className: baseStyles, children: cardContent });
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
2107
|
// src/components/Badge/Badge.tsx
|
|
2590
|
-
import { twMerge as
|
|
2591
|
-
import { jsx as
|
|
2108
|
+
import { twMerge as twMerge11 } from "tailwind-merge";
|
|
2109
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2592
2110
|
var variantStyles4 = {
|
|
2593
2111
|
neutral: "bg-(--color-badge-neutral-bg) text-(--color-badge-neutral-text)",
|
|
2594
2112
|
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text)",
|
|
@@ -2613,10 +2131,10 @@ function Badge({
|
|
|
2613
2131
|
icon: IconComponent,
|
|
2614
2132
|
className
|
|
2615
2133
|
}) {
|
|
2616
|
-
return /* @__PURE__ */
|
|
2134
|
+
return /* @__PURE__ */ jsxs21(
|
|
2617
2135
|
"span",
|
|
2618
2136
|
{
|
|
2619
|
-
className:
|
|
2137
|
+
className: twMerge11(
|
|
2620
2138
|
"inline-flex items-center gap-1 rounded-full",
|
|
2621
2139
|
"text-xs font-medium leading-tight",
|
|
2622
2140
|
variantStyles4[variant],
|
|
@@ -2624,7 +2142,7 @@ function Badge({
|
|
|
2624
2142
|
className
|
|
2625
2143
|
),
|
|
2626
2144
|
children: [
|
|
2627
|
-
IconComponent && /* @__PURE__ */
|
|
2145
|
+
IconComponent && /* @__PURE__ */ jsx35(IconComponent, { size: iconSizeMap4[size], "aria-hidden": "true" }),
|
|
2628
2146
|
children
|
|
2629
2147
|
]
|
|
2630
2148
|
}
|
|
@@ -2632,9 +2150,9 @@ function Badge({
|
|
|
2632
2150
|
}
|
|
2633
2151
|
|
|
2634
2152
|
// src/components/Card/Card.tsx
|
|
2635
|
-
import { useCallback as
|
|
2636
|
-
import { twMerge as
|
|
2637
|
-
import { Fragment as
|
|
2153
|
+
import { useCallback as useCallback2 } from "react";
|
|
2154
|
+
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
2155
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2638
2156
|
var paddingStyles = {
|
|
2639
2157
|
none: "p-0",
|
|
2640
2158
|
sm: "p-3",
|
|
@@ -2652,13 +2170,13 @@ function Card({
|
|
|
2652
2170
|
className
|
|
2653
2171
|
}) {
|
|
2654
2172
|
const isInteractive = interactive || !!href || !!onPress;
|
|
2655
|
-
const containerClass =
|
|
2173
|
+
const containerClass = twMerge12(
|
|
2656
2174
|
"bg-(--color-surface-default) border border-(--color-border-default) rounded-lg overflow-hidden shadow-sm",
|
|
2657
2175
|
isInteractive && "transition-all hover:shadow-md hover:border-(--color-border-focus) cursor-pointer",
|
|
2658
2176
|
(href || onPress) && "block focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
2659
2177
|
className
|
|
2660
2178
|
);
|
|
2661
|
-
const handleKeyDown =
|
|
2179
|
+
const handleKeyDown = useCallback2(
|
|
2662
2180
|
(e) => {
|
|
2663
2181
|
if (onPress && (e.key === "Enter" || e.key === " ")) {
|
|
2664
2182
|
e.preventDefault();
|
|
@@ -2667,22 +2185,22 @@ function Card({
|
|
|
2667
2185
|
},
|
|
2668
2186
|
[onPress]
|
|
2669
2187
|
);
|
|
2670
|
-
const content = /* @__PURE__ */
|
|
2671
|
-
header && /* @__PURE__ */
|
|
2188
|
+
const content = /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2189
|
+
header && /* @__PURE__ */ jsx36(
|
|
2672
2190
|
"div",
|
|
2673
2191
|
{
|
|
2674
|
-
className:
|
|
2192
|
+
className: twMerge12(
|
|
2675
2193
|
"border-b border-(--color-border-default)",
|
|
2676
2194
|
paddingStyles[padding]
|
|
2677
2195
|
),
|
|
2678
2196
|
children: header
|
|
2679
2197
|
}
|
|
2680
2198
|
),
|
|
2681
|
-
/* @__PURE__ */
|
|
2682
|
-
footer && /* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ jsx36("div", { className: paddingStyles[padding], children }),
|
|
2200
|
+
footer && /* @__PURE__ */ jsx36(
|
|
2683
2201
|
"div",
|
|
2684
2202
|
{
|
|
2685
|
-
className:
|
|
2203
|
+
className: twMerge12(
|
|
2686
2204
|
"border-t border-(--color-border-default)",
|
|
2687
2205
|
paddingStyles[padding]
|
|
2688
2206
|
),
|
|
@@ -2691,10 +2209,10 @@ function Card({
|
|
|
2691
2209
|
)
|
|
2692
2210
|
] });
|
|
2693
2211
|
if (href) {
|
|
2694
|
-
return /* @__PURE__ */
|
|
2212
|
+
return /* @__PURE__ */ jsx36("a", { href, className: containerClass, children: content });
|
|
2695
2213
|
}
|
|
2696
2214
|
if (onPress) {
|
|
2697
|
-
return /* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ jsx36(
|
|
2698
2216
|
"div",
|
|
2699
2217
|
{
|
|
2700
2218
|
role: "button",
|
|
@@ -2706,13 +2224,13 @@ function Card({
|
|
|
2706
2224
|
}
|
|
2707
2225
|
);
|
|
2708
2226
|
}
|
|
2709
|
-
return /* @__PURE__ */
|
|
2227
|
+
return /* @__PURE__ */ jsx36("div", { className: containerClass, children: content });
|
|
2710
2228
|
}
|
|
2711
2229
|
|
|
2712
2230
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2713
2231
|
import { ArrowUp, ArrowDown, Minus } from "lucide-react";
|
|
2714
|
-
import { twMerge as
|
|
2715
|
-
import { jsx as
|
|
2232
|
+
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
2233
|
+
import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2716
2234
|
function getDirection(current, previous) {
|
|
2717
2235
|
const diff = current - previous;
|
|
2718
2236
|
if (diff > 0) return "increase";
|
|
@@ -2765,16 +2283,16 @@ function DeltaIndicator({
|
|
|
2765
2283
|
className
|
|
2766
2284
|
}) {
|
|
2767
2285
|
if (unavailable) {
|
|
2768
|
-
return /* @__PURE__ */
|
|
2286
|
+
return /* @__PURE__ */ jsxs23(
|
|
2769
2287
|
"span",
|
|
2770
2288
|
{
|
|
2771
|
-
className:
|
|
2289
|
+
className: twMerge13(
|
|
2772
2290
|
"inline-flex items-center gap-1 font-medium",
|
|
2773
2291
|
"text-(--color-text-tertiary)",
|
|
2774
2292
|
className
|
|
2775
2293
|
),
|
|
2776
2294
|
children: [
|
|
2777
|
-
label && /* @__PURE__ */
|
|
2295
|
+
label && /* @__PURE__ */ jsx37("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
2778
2296
|
unavailableText
|
|
2779
2297
|
]
|
|
2780
2298
|
}
|
|
@@ -2804,10 +2322,10 @@ function DeltaIndicator({
|
|
|
2804
2322
|
}
|
|
2805
2323
|
}
|
|
2806
2324
|
const isPill = mode === "pill";
|
|
2807
|
-
return /* @__PURE__ */
|
|
2325
|
+
return /* @__PURE__ */ jsxs23(
|
|
2808
2326
|
"span",
|
|
2809
2327
|
{
|
|
2810
|
-
className:
|
|
2328
|
+
className: twMerge13(
|
|
2811
2329
|
"inline-flex items-center gap-1 font-medium",
|
|
2812
2330
|
colorStyles2,
|
|
2813
2331
|
isPill && [
|
|
@@ -2818,8 +2336,8 @@ function DeltaIndicator({
|
|
|
2818
2336
|
className
|
|
2819
2337
|
),
|
|
2820
2338
|
children: [
|
|
2821
|
-
label && /* @__PURE__ */
|
|
2822
|
-
/* @__PURE__ */
|
|
2339
|
+
label && /* @__PURE__ */ jsx37("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
2340
|
+
/* @__PURE__ */ jsx37(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2823
2341
|
valueText
|
|
2824
2342
|
]
|
|
2825
2343
|
}
|
|
@@ -2827,8 +2345,8 @@ function DeltaIndicator({
|
|
|
2827
2345
|
}
|
|
2828
2346
|
|
|
2829
2347
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2830
|
-
import { twMerge as
|
|
2831
|
-
import { jsx as
|
|
2348
|
+
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
2349
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2832
2350
|
var fillStyles = {
|
|
2833
2351
|
brand: "bg-(--color-progress-fill)",
|
|
2834
2352
|
success: "bg-(--color-progress-fill-success)",
|
|
@@ -2851,12 +2369,12 @@ function ProgressBar({
|
|
|
2851
2369
|
className
|
|
2852
2370
|
}) {
|
|
2853
2371
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2854
|
-
return /* @__PURE__ */
|
|
2855
|
-
(label || description || showValue) && /* @__PURE__ */
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2372
|
+
return /* @__PURE__ */ jsxs24("div", { className: twMerge14("w-full", className), children: [
|
|
2373
|
+
(label || description || showValue) && /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between mb-2", children: [
|
|
2374
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-medium text-(--color-text-primary)", children: label }),
|
|
2375
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm text-(--color-text-secondary)", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2858
2376
|
] }),
|
|
2859
|
-
/* @__PURE__ */
|
|
2377
|
+
/* @__PURE__ */ jsx38(
|
|
2860
2378
|
"div",
|
|
2861
2379
|
{
|
|
2862
2380
|
role: "progressbar",
|
|
@@ -2864,14 +2382,14 @@ function ProgressBar({
|
|
|
2864
2382
|
"aria-valuemin": 0,
|
|
2865
2383
|
"aria-valuemax": 100,
|
|
2866
2384
|
"aria-label": label ?? "Progress",
|
|
2867
|
-
className:
|
|
2385
|
+
className: twMerge14(
|
|
2868
2386
|
"w-full rounded-full bg-(--color-progress-track)",
|
|
2869
2387
|
sizeStyles9[size]
|
|
2870
2388
|
),
|
|
2871
|
-
children: /* @__PURE__ */
|
|
2389
|
+
children: /* @__PURE__ */ jsx38(
|
|
2872
2390
|
"div",
|
|
2873
2391
|
{
|
|
2874
|
-
className:
|
|
2392
|
+
className: twMerge14(
|
|
2875
2393
|
"h-full rounded-full transition-all duration-300",
|
|
2876
2394
|
fillStyles[variant]
|
|
2877
2395
|
),
|
|
@@ -2884,19 +2402,19 @@ function ProgressBar({
|
|
|
2884
2402
|
}
|
|
2885
2403
|
|
|
2886
2404
|
// src/components/Banner/Banner.tsx
|
|
2887
|
-
import { useState as
|
|
2405
|
+
import { useState as useState2 } from "react";
|
|
2888
2406
|
import {
|
|
2889
|
-
Info as
|
|
2407
|
+
Info as Info2,
|
|
2890
2408
|
AlertTriangle,
|
|
2891
|
-
AlertCircle
|
|
2409
|
+
AlertCircle,
|
|
2892
2410
|
CheckCircle2,
|
|
2893
2411
|
X as X3
|
|
2894
2412
|
} from "lucide-react";
|
|
2895
|
-
import { twMerge as
|
|
2896
|
-
import { jsx as
|
|
2413
|
+
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
2414
|
+
import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2897
2415
|
var variantConfig2 = {
|
|
2898
2416
|
info: {
|
|
2899
|
-
icon:
|
|
2417
|
+
icon: Info2,
|
|
2900
2418
|
containerClass: "bg-(--color-banner-info-bg) border-(--color-banner-info-border) text-(--color-banner-info-text)",
|
|
2901
2419
|
iconClass: "text-(--color-banner-info-icon)",
|
|
2902
2420
|
role: "status"
|
|
@@ -2908,7 +2426,7 @@ var variantConfig2 = {
|
|
|
2908
2426
|
role: "alert"
|
|
2909
2427
|
},
|
|
2910
2428
|
danger: {
|
|
2911
|
-
icon:
|
|
2429
|
+
icon: AlertCircle,
|
|
2912
2430
|
containerClass: "bg-(--color-banner-danger-bg) border-(--color-banner-danger-border) text-(--color-banner-danger-text)",
|
|
2913
2431
|
iconClass: "text-(--color-banner-danger-icon)",
|
|
2914
2432
|
role: "alert"
|
|
@@ -2929,7 +2447,7 @@ function Banner({
|
|
|
2929
2447
|
onDismiss,
|
|
2930
2448
|
className
|
|
2931
2449
|
}) {
|
|
2932
|
-
const [dismissed, setDismissed] =
|
|
2450
|
+
const [dismissed, setDismissed] = useState2(false);
|
|
2933
2451
|
if (dismissed) return null;
|
|
2934
2452
|
const config = variantConfig2[variant];
|
|
2935
2453
|
const IconComponent = icon ?? config.icon;
|
|
@@ -2937,40 +2455,40 @@ function Banner({
|
|
|
2937
2455
|
setDismissed(true);
|
|
2938
2456
|
onDismiss?.();
|
|
2939
2457
|
};
|
|
2940
|
-
return /* @__PURE__ */
|
|
2458
|
+
return /* @__PURE__ */ jsxs25(
|
|
2941
2459
|
"div",
|
|
2942
2460
|
{
|
|
2943
2461
|
role: config.role,
|
|
2944
|
-
className:
|
|
2462
|
+
className: twMerge15(
|
|
2945
2463
|
"flex items-start gap-3 rounded-lg border px-4 py-3",
|
|
2946
2464
|
"text-sm",
|
|
2947
2465
|
config.containerClass,
|
|
2948
2466
|
className
|
|
2949
2467
|
),
|
|
2950
2468
|
children: [
|
|
2951
|
-
/* @__PURE__ */
|
|
2469
|
+
/* @__PURE__ */ jsx39(
|
|
2952
2470
|
IconComponent,
|
|
2953
2471
|
{
|
|
2954
2472
|
size: 20,
|
|
2955
|
-
className:
|
|
2473
|
+
className: twMerge15("shrink-0 mt-0.5", config.iconClass),
|
|
2956
2474
|
"aria-hidden": "true"
|
|
2957
2475
|
}
|
|
2958
2476
|
),
|
|
2959
|
-
/* @__PURE__ */
|
|
2960
|
-
title && /* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex-1", children: [
|
|
2478
|
+
title && /* @__PURE__ */ jsxs25("span", { className: "font-medium", children: [
|
|
2961
2479
|
title,
|
|
2962
2480
|
" \u2014 "
|
|
2963
2481
|
] }),
|
|
2964
2482
|
children
|
|
2965
2483
|
] }),
|
|
2966
|
-
dismissible && /* @__PURE__ */
|
|
2484
|
+
dismissible && /* @__PURE__ */ jsx39(
|
|
2967
2485
|
"button",
|
|
2968
2486
|
{
|
|
2969
2487
|
type: "button",
|
|
2970
2488
|
onClick: handleDismiss,
|
|
2971
2489
|
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",
|
|
2972
2490
|
"aria-label": "Dismiss",
|
|
2973
|
-
children: /* @__PURE__ */
|
|
2491
|
+
children: /* @__PURE__ */ jsx39(X3, { size: 16, "aria-hidden": "true" })
|
|
2974
2492
|
}
|
|
2975
2493
|
)
|
|
2976
2494
|
]
|
|
@@ -2979,8 +2497,8 @@ function Banner({
|
|
|
2979
2497
|
}
|
|
2980
2498
|
|
|
2981
2499
|
// src/components/MetricCard/MetricCard.tsx
|
|
2982
|
-
import { twMerge as
|
|
2983
|
-
import { Fragment as
|
|
2500
|
+
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
2501
|
+
import { Fragment as Fragment9, jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2984
2502
|
var sizeConfig = {
|
|
2985
2503
|
sm: {
|
|
2986
2504
|
padding: "p-3",
|
|
@@ -3002,58 +2520,58 @@ function MetricCard({
|
|
|
3002
2520
|
className
|
|
3003
2521
|
}) {
|
|
3004
2522
|
const config = sizeConfig[size];
|
|
3005
|
-
const containerClass =
|
|
2523
|
+
const containerClass = twMerge16(
|
|
3006
2524
|
"bg-(--color-surface-default) border border-(--color-border-default) rounded-lg shadow-sm",
|
|
3007
2525
|
config.padding,
|
|
3008
2526
|
href && "block transition-shadow hover:shadow-md hover:border-(--color-border-focus) focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
3009
2527
|
className
|
|
3010
2528
|
);
|
|
3011
|
-
const content = /* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
2529
|
+
const content = /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
|
2530
|
+
/* @__PURE__ */ jsx40("div", { className: twMerge16(config.labelClass, "text-(--color-text-secondary)"), children: label }),
|
|
2531
|
+
/* @__PURE__ */ jsx40(
|
|
3014
2532
|
"div",
|
|
3015
2533
|
{
|
|
3016
|
-
className:
|
|
2534
|
+
className: twMerge16(
|
|
3017
2535
|
config.valueClass,
|
|
3018
2536
|
"font-semibold text-(--color-text-primary) mt-1 tabular-nums"
|
|
3019
2537
|
),
|
|
3020
2538
|
children: value
|
|
3021
2539
|
}
|
|
3022
2540
|
),
|
|
3023
|
-
secondary && /* @__PURE__ */
|
|
2541
|
+
secondary && /* @__PURE__ */ jsx40("div", { className: "mt-1 text-sm", children: secondary })
|
|
3024
2542
|
] });
|
|
3025
2543
|
if (href) {
|
|
3026
|
-
return /* @__PURE__ */
|
|
2544
|
+
return /* @__PURE__ */ jsx40("a", { href, className: containerClass, children: content });
|
|
3027
2545
|
}
|
|
3028
|
-
return /* @__PURE__ */
|
|
2546
|
+
return /* @__PURE__ */ jsx40("div", { className: containerClass, children: content });
|
|
3029
2547
|
}
|
|
3030
2548
|
|
|
3031
2549
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3032
|
-
import { twMerge as
|
|
3033
|
-
import { jsx as
|
|
2550
|
+
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
2551
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3034
2552
|
function SectionHeader({
|
|
3035
2553
|
title,
|
|
3036
2554
|
children,
|
|
3037
2555
|
className
|
|
3038
2556
|
}) {
|
|
3039
|
-
return /* @__PURE__ */
|
|
2557
|
+
return /* @__PURE__ */ jsxs27(
|
|
3040
2558
|
"div",
|
|
3041
2559
|
{
|
|
3042
|
-
className:
|
|
2560
|
+
className: twMerge17(
|
|
3043
2561
|
"flex flex-wrap items-center gap-3 py-4",
|
|
3044
2562
|
className
|
|
3045
2563
|
),
|
|
3046
2564
|
children: [
|
|
3047
|
-
/* @__PURE__ */
|
|
3048
|
-
children && /* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ jsx41(H2, { children: title }),
|
|
2566
|
+
children && /* @__PURE__ */ jsx41("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3049
2567
|
]
|
|
3050
2568
|
}
|
|
3051
2569
|
);
|
|
3052
2570
|
}
|
|
3053
2571
|
|
|
3054
2572
|
// src/components/Pill/Pill.tsx
|
|
3055
|
-
import { twMerge as
|
|
3056
|
-
import { jsx as
|
|
2573
|
+
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
2574
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3057
2575
|
var hashColors = {
|
|
3058
2576
|
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text) border-(--color-badge-purple-text)/20",
|
|
3059
2577
|
teal: "bg-(--color-badge-teal-bg) text-(--color-badge-teal-text) border-(--color-badge-teal-text)/20",
|
|
@@ -3079,7 +2597,7 @@ function Pill({
|
|
|
3079
2597
|
className,
|
|
3080
2598
|
...rest
|
|
3081
2599
|
}) {
|
|
3082
|
-
const cx =
|
|
2600
|
+
const cx = twMerge18(
|
|
3083
2601
|
`
|
|
3084
2602
|
inline-flex items-center
|
|
3085
2603
|
rounded-full
|
|
@@ -3091,12 +2609,12 @@ function Pill({
|
|
|
3091
2609
|
colorStyles[color],
|
|
3092
2610
|
className
|
|
3093
2611
|
);
|
|
3094
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsx42("span", { className: cx, ...rest, children });
|
|
3095
2613
|
}
|
|
3096
2614
|
|
|
3097
2615
|
// src/components/Pill/PathPill.tsx
|
|
3098
|
-
import { twMerge as
|
|
3099
|
-
import { jsx as
|
|
2616
|
+
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
2617
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3100
2618
|
function PathPill({
|
|
3101
2619
|
children,
|
|
3102
2620
|
visibleCount,
|
|
@@ -3108,17 +2626,17 @@ function PathPill({
|
|
|
3108
2626
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3109
2627
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3110
2628
|
const fullPath = segments.join(" / ");
|
|
3111
|
-
return /* @__PURE__ */
|
|
2629
|
+
return /* @__PURE__ */ jsx43(
|
|
3112
2630
|
"div",
|
|
3113
2631
|
{
|
|
3114
|
-
className:
|
|
2632
|
+
className: twMerge19("relative flex", className),
|
|
3115
2633
|
"aria-label": `Path: ${fullPath}`,
|
|
3116
2634
|
children: segments.map((segment, i) => {
|
|
3117
2635
|
const isCollapsed = i < dotCount;
|
|
3118
2636
|
const isLast = i === segments.length - 1;
|
|
3119
|
-
const cx =
|
|
2637
|
+
const cx = twMerge19(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3120
2638
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3121
|
-
return /* @__PURE__ */
|
|
2639
|
+
return /* @__PURE__ */ jsx43(
|
|
3122
2640
|
Pill,
|
|
3123
2641
|
{
|
|
3124
2642
|
className: cx,
|
|
@@ -3134,8 +2652,8 @@ function PathPill({
|
|
|
3134
2652
|
}
|
|
3135
2653
|
|
|
3136
2654
|
// src/components/FormWizard/FormWizard.tsx
|
|
3137
|
-
import { createContext as createContext6, useContext as useContext6, useCallback as
|
|
3138
|
-
import { jsx as
|
|
2655
|
+
import { createContext as createContext6, useContext as useContext6, useCallback as useCallback3, useMemo } from "react";
|
|
2656
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3139
2657
|
var FormWizardContext = createContext6({
|
|
3140
2658
|
currentStep: 0,
|
|
3141
2659
|
totalSteps: 1,
|
|
@@ -3155,7 +2673,7 @@ function FormWizard({
|
|
|
3155
2673
|
}) {
|
|
3156
2674
|
const canGoBack = currentStep > 0;
|
|
3157
2675
|
const isLastStep = currentStep >= totalSteps - 1;
|
|
3158
|
-
const goBack =
|
|
2676
|
+
const goBack = useCallback3(() => {
|
|
3159
2677
|
if (currentStep > 0) {
|
|
3160
2678
|
onStepChange(currentStep - 1);
|
|
3161
2679
|
}
|
|
@@ -3170,13 +2688,13 @@ function FormWizard({
|
|
|
3170
2688
|
}),
|
|
3171
2689
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3172
2690
|
);
|
|
3173
|
-
return /* @__PURE__ */
|
|
2691
|
+
return /* @__PURE__ */ jsx44(FormWizardContext.Provider, { value, children });
|
|
3174
2692
|
}
|
|
3175
2693
|
|
|
3176
2694
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3177
|
-
import { jsx as
|
|
2695
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3178
2696
|
function CheckIcon() {
|
|
3179
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ jsx45(
|
|
3180
2698
|
"svg",
|
|
3181
2699
|
{
|
|
3182
2700
|
"aria-hidden": "true",
|
|
@@ -3187,24 +2705,24 @@ function CheckIcon() {
|
|
|
3187
2705
|
strokeWidth: "2",
|
|
3188
2706
|
strokeLinecap: "round",
|
|
3189
2707
|
strokeLinejoin: "round",
|
|
3190
|
-
children: /* @__PURE__ */
|
|
2708
|
+
children: /* @__PURE__ */ jsx45("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3191
2709
|
}
|
|
3192
2710
|
);
|
|
3193
2711
|
}
|
|
3194
2712
|
function FormWizardProgress({ labels }) {
|
|
3195
2713
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3196
|
-
return /* @__PURE__ */
|
|
2714
|
+
return /* @__PURE__ */ jsx45("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx45("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3197
2715
|
const isCompleted = index < currentStep;
|
|
3198
2716
|
const isCurrent = index === currentStep;
|
|
3199
2717
|
const isFuture = index > currentStep;
|
|
3200
|
-
return /* @__PURE__ */
|
|
2718
|
+
return /* @__PURE__ */ jsxs28(
|
|
3201
2719
|
"li",
|
|
3202
2720
|
{
|
|
3203
2721
|
className: "flex flex-1 flex-col items-center",
|
|
3204
2722
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3205
2723
|
children: [
|
|
3206
|
-
/* @__PURE__ */
|
|
3207
|
-
index > 0 ? /* @__PURE__ */
|
|
2724
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex w-full items-center", children: [
|
|
2725
|
+
index > 0 ? /* @__PURE__ */ jsx45(
|
|
3208
2726
|
"div",
|
|
3209
2727
|
{
|
|
3210
2728
|
"aria-hidden": "true",
|
|
@@ -3213,8 +2731,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3213
2731
|
index <= currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3214
2732
|
].join(" ")
|
|
3215
2733
|
}
|
|
3216
|
-
) : /* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
2734
|
+
) : /* @__PURE__ */ jsx45("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
2735
|
+
/* @__PURE__ */ jsx45(
|
|
3218
2736
|
"div",
|
|
3219
2737
|
{
|
|
3220
2738
|
className: [
|
|
@@ -3226,10 +2744,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3226
2744
|
isFuture ? "border-2 border-(--color-border-default) bg-(--color-surface-default) text-(--color-text-tertiary)" : ""
|
|
3227
2745
|
].join(" "),
|
|
3228
2746
|
"aria-hidden": "true",
|
|
3229
|
-
children: isCompleted ? /* @__PURE__ */
|
|
2747
|
+
children: isCompleted ? /* @__PURE__ */ jsx45(CheckIcon, {}) : index + 1
|
|
3230
2748
|
}
|
|
3231
2749
|
),
|
|
3232
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
2750
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx45(
|
|
3233
2751
|
"div",
|
|
3234
2752
|
{
|
|
3235
2753
|
"aria-hidden": "true",
|
|
@@ -3238,9 +2756,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3238
2756
|
index < currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3239
2757
|
].join(" ")
|
|
3240
2758
|
}
|
|
3241
|
-
) : /* @__PURE__ */
|
|
2759
|
+
) : /* @__PURE__ */ jsx45("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3242
2760
|
] }),
|
|
3243
|
-
/* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx45(
|
|
3244
2762
|
"span",
|
|
3245
2763
|
{
|
|
3246
2764
|
className: [
|
|
@@ -3258,15 +2776,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3258
2776
|
}
|
|
3259
2777
|
|
|
3260
2778
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3261
|
-
import { jsx as
|
|
2779
|
+
import { jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3262
2780
|
function FormWizardNav({
|
|
3263
2781
|
onNext,
|
|
3264
2782
|
isSubmitting = false,
|
|
3265
2783
|
submitLabel = "Submit"
|
|
3266
2784
|
}) {
|
|
3267
2785
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3268
|
-
return /* @__PURE__ */
|
|
3269
|
-
canGoBack && /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-end gap-3", children: [
|
|
2787
|
+
canGoBack && /* @__PURE__ */ jsx46(
|
|
3270
2788
|
Button,
|
|
3271
2789
|
{
|
|
3272
2790
|
variant: "secondary",
|
|
@@ -3276,7 +2794,7 @@ function FormWizardNav({
|
|
|
3276
2794
|
children: "Back"
|
|
3277
2795
|
}
|
|
3278
2796
|
),
|
|
3279
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsx46(
|
|
3280
2798
|
Button,
|
|
3281
2799
|
{
|
|
3282
2800
|
variant: "primary",
|
|
@@ -3682,7 +3200,6 @@ export {
|
|
|
3682
3200
|
Dialog,
|
|
3683
3201
|
EmptyState,
|
|
3684
3202
|
Fieldset,
|
|
3685
|
-
FileCard,
|
|
3686
3203
|
FontSize2xl,
|
|
3687
3204
|
FontSize3xl,
|
|
3688
3205
|
FontSize4xl,
|
|
@@ -3748,7 +3265,6 @@ export {
|
|
|
3748
3265
|
Spacing6,
|
|
3749
3266
|
Spacing8,
|
|
3750
3267
|
Spinner,
|
|
3751
|
-
StorageConnectionCard,
|
|
3752
3268
|
Switch,
|
|
3753
3269
|
Tab,
|
|
3754
3270
|
TabList,
|
|
@@ -3762,7 +3278,6 @@ export {
|
|
|
3762
3278
|
ToggleButtonGroup,
|
|
3763
3279
|
ToggleButtonGroupItem,
|
|
3764
3280
|
Tooltip,
|
|
3765
|
-
Tree,
|
|
3766
3281
|
Tab2 as UnstyledTab,
|
|
3767
3282
|
TabList2 as UnstyledTabList,
|
|
3768
3283
|
TabPanel2 as UnstyledTabPanel,
|