@jerco/ui 0.2.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.cjs ADDED
@@ -0,0 +1,1812 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ AlertDialog: () => AlertDialog,
34
+ AlertDialogAction: () => AlertDialogAction,
35
+ AlertDialogCancel: () => AlertDialogCancel,
36
+ AlertDialogContent: () => AlertDialogContent,
37
+ AlertDialogDescription: () => AlertDialogDescription,
38
+ AlertDialogFooter: () => AlertDialogFooter,
39
+ AlertDialogHeader: () => AlertDialogHeader,
40
+ AlertDialogTitle: () => AlertDialogTitle,
41
+ AlertDialogTrigger: () => AlertDialogTrigger,
42
+ AppNavigation: () => AppNavigation,
43
+ AppShell: () => AppShell,
44
+ AppShellCollapseButton: () => AppShellCollapseButton,
45
+ AppShellMenuButton: () => AppShellMenuButton,
46
+ Badge: () => Badge,
47
+ BrandLogo: () => BrandLogo,
48
+ Button: () => Button,
49
+ Card: () => Card,
50
+ CardContent: () => CardContent,
51
+ CardDescription: () => CardDescription,
52
+ CardFooter: () => CardFooter,
53
+ CardHeader: () => CardHeader,
54
+ CardTitle: () => CardTitle,
55
+ Checkbox: () => Checkbox,
56
+ CheckboxField: () => CheckboxField,
57
+ DataTable: () => DataTable,
58
+ DesignSystemProvider: () => DesignSystemProvider,
59
+ DeviceCard: () => DeviceCard,
60
+ Dialog: () => Dialog,
61
+ DialogClose: () => DialogClose,
62
+ DialogContent: () => DialogContent,
63
+ DialogDescription: () => DialogDescription,
64
+ DialogFooter: () => DialogFooter,
65
+ DialogHeader: () => DialogHeader,
66
+ DialogTitle: () => DialogTitle,
67
+ DialogTrigger: () => DialogTrigger,
68
+ DropdownMenu: () => DropdownMenu,
69
+ DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
70
+ DropdownMenuContent: () => DropdownMenuContent,
71
+ DropdownMenuGroup: () => DropdownMenuGroup,
72
+ DropdownMenuItem: () => DropdownMenuItem,
73
+ DropdownMenuLabel: () => DropdownMenuLabel,
74
+ DropdownMenuPortal: () => DropdownMenuPortal,
75
+ DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
76
+ DropdownMenuRadioItem: () => DropdownMenuRadioItem,
77
+ DropdownMenuSeparator: () => DropdownMenuSeparator,
78
+ DropdownMenuSub: () => DropdownMenuSub,
79
+ DropdownMenuSubContent: () => DropdownMenuSubContent,
80
+ DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
81
+ DropdownMenuTrigger: () => DropdownMenuTrigger,
82
+ EmptyState: () => EmptyState,
83
+ ErrorState: () => ErrorState,
84
+ Header: () => Header,
85
+ IconButton: () => IconButton,
86
+ Input: () => Input,
87
+ Label: () => Label2,
88
+ MainContent: () => MainContent,
89
+ MetricCard: () => MetricCard,
90
+ NativeSelect: () => NativeSelect,
91
+ PageHeader: () => PageHeader,
92
+ RadioField: () => RadioField,
93
+ RadioGroup: () => RadioGroup2,
94
+ RadioGroupItem: () => RadioGroupItem,
95
+ Select: () => Select,
96
+ SelectGroup: () => SelectGroup,
97
+ SelectLabel: () => SelectLabel,
98
+ SelectValue: () => SelectValue,
99
+ Separator: () => Separator2,
100
+ ServiceHealth: () => ServiceHealth,
101
+ Sidebar: () => Sidebar,
102
+ SimpleTooltip: () => SimpleTooltip,
103
+ Skeleton: () => Skeleton,
104
+ Spinner: () => Spinner,
105
+ StatusIndicator: () => StatusIndicator,
106
+ Switch: () => Switch,
107
+ SwitchField: () => SwitchField,
108
+ Tabs: () => Tabs,
109
+ TabsContent: () => TabsContent,
110
+ TabsList: () => TabsList,
111
+ TabsTrigger: () => TabsTrigger,
112
+ Textarea: () => Textarea,
113
+ Toast: () => Toast,
114
+ ToastAction: () => ToastAction,
115
+ ToastClose: () => ToastClose,
116
+ ToastDescription: () => ToastDescription,
117
+ ToastProvider: () => ToastProvider,
118
+ ToastTitle: () => ToastTitle,
119
+ ToastViewport: () => ToastViewport,
120
+ Tooltip: () => Tooltip,
121
+ TooltipContent: () => TooltipContent,
122
+ TooltipProvider: () => TooltipProvider,
123
+ TooltipTrigger: () => TooltipTrigger,
124
+ buttonVariants: () => buttonVariants,
125
+ createBrowserBooleanStateAdapter: () => createBrowserBooleanStateAdapter,
126
+ createBrowserDataTableUrlStateAdapter: () => createBrowserDataTableUrlStateAdapter,
127
+ createDataTableRequestManager: () => createDataTableRequestManager,
128
+ createDataTableUrlStateAdapter: () => createDataTableUrlStateAdapter,
129
+ matchNavigationPath: () => matchNavigationPath,
130
+ parseDataTableUrlState: () => parseDataTableUrlState,
131
+ serializeDataTableUrlState: () => serializeDataTableUrlState,
132
+ useDesignSystem: () => useDesignSystem
133
+ });
134
+ module.exports = __toCommonJS(index_exports);
135
+
136
+ // src/provider.tsx
137
+ var import_react = require("react");
138
+ var import_jsx_runtime = require("react/jsx-runtime");
139
+ var DesignSystemContext = (0, import_react.createContext)({
140
+ theme: "base-light",
141
+ density: "comfortable"
142
+ });
143
+ function DesignSystemProvider({
144
+ children,
145
+ theme = "base-light",
146
+ density = "comfortable",
147
+ target
148
+ }) {
149
+ (0, import_react.useEffect)(() => {
150
+ const element = target ?? document.documentElement;
151
+ const previousTheme = element.dataset.theme;
152
+ const previousDensity = element.dataset.density;
153
+ element.setAttribute("data-theme", theme);
154
+ element.setAttribute("data-density", density);
155
+ return () => {
156
+ if (previousTheme === void 0) element.removeAttribute("data-theme");
157
+ else element.setAttribute("data-theme", previousTheme);
158
+ if (previousDensity === void 0) element.removeAttribute("data-density");
159
+ else element.setAttribute("data-density", previousDensity);
160
+ };
161
+ }, [density, target, theme]);
162
+ const value = (0, import_react.useMemo)(() => ({ theme, density }), [density, theme]);
163
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DesignSystemContext.Provider, { value, children });
164
+ }
165
+ function useDesignSystem() {
166
+ return (0, import_react.useContext)(DesignSystemContext);
167
+ }
168
+
169
+ // src/adapters/data-table-state.ts
170
+ function parameterName(prefix, name) {
171
+ return prefix ? `${prefix}.${name}` : name;
172
+ }
173
+ function positiveInteger(value, fallback) {
174
+ const parsed = Number.parseInt(value ?? "", 10);
175
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
176
+ }
177
+ function parseDataTableUrlState(search, fallback, options = {}) {
178
+ const params = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search);
179
+ const query = params.get(parameterName(options.prefix, "q")) ?? fallback.query;
180
+ const pageSize = positiveInteger(
181
+ params.get(parameterName(options.prefix, "pageSize")),
182
+ fallback.pagination.pageSize
183
+ );
184
+ const page = positiveInteger(
185
+ params.get(parameterName(options.prefix, "page")),
186
+ fallback.pagination.pageIndex + 1
187
+ );
188
+ const sortingValue = params.get(parameterName(options.prefix, "sort"));
189
+ const sorting = sortingValue ? sortingValue.split(",").map((entry) => entry.trim()).filter(Boolean).map((entry) => {
190
+ const separator = entry.lastIndexOf(":");
191
+ const id = separator >= 0 ? entry.slice(0, separator) : entry;
192
+ const direction = separator >= 0 ? entry.slice(separator + 1) : "asc";
193
+ return { id, desc: direction === "desc" };
194
+ }).filter((entry) => entry.id) : fallback.sorting;
195
+ const filterPrefix = parameterName(options.prefix, "filter.");
196
+ const filters = { ...fallback.filters };
197
+ for (const [key, value] of params) {
198
+ if (key.startsWith(filterPrefix)) filters[key.slice(filterPrefix.length)] = value;
199
+ }
200
+ return {
201
+ query,
202
+ sorting,
203
+ filters,
204
+ pagination: { pageIndex: page - 1, pageSize }
205
+ };
206
+ }
207
+ function serializeDataTableUrlState(state, currentSearch = "", options = {}) {
208
+ const params = new URLSearchParams(
209
+ currentSearch.startsWith("?") ? currentSearch.slice(1) : currentSearch
210
+ );
211
+ const names = {
212
+ query: parameterName(options.prefix, "q"),
213
+ page: parameterName(options.prefix, "page"),
214
+ pageSize: parameterName(options.prefix, "pageSize"),
215
+ sorting: parameterName(options.prefix, "sort"),
216
+ filter: parameterName(options.prefix, "filter.")
217
+ };
218
+ for (const key of [...params.keys()]) {
219
+ if (key === names.query || key === names.page || key === names.pageSize || key === names.sorting || key.startsWith(names.filter)) {
220
+ params.delete(key);
221
+ }
222
+ }
223
+ if (state.query) params.set(names.query, state.query);
224
+ params.set(names.page, String(state.pagination.pageIndex + 1));
225
+ params.set(names.pageSize, String(state.pagination.pageSize));
226
+ if (state.sorting.length) {
227
+ params.set(
228
+ names.sorting,
229
+ state.sorting.map((entry) => `${entry.id}:${entry.desc ? "desc" : "asc"}`).join(",")
230
+ );
231
+ }
232
+ for (const [id, value] of Object.entries(state.filters).sort(
233
+ ([left], [right]) => left.localeCompare(right)
234
+ )) {
235
+ if (value && value !== "all") params.set(`${names.filter}${id}`, value);
236
+ }
237
+ const serialized = params.toString();
238
+ return serialized ? `?${serialized}` : "";
239
+ }
240
+ function createDataTableUrlStateAdapter(port, options = {}) {
241
+ return {
242
+ read: (fallback) => parseDataTableUrlState(port.getSearch(), fallback, options),
243
+ write: (state, mode = "push") => port.writeSearch(serializeDataTableUrlState(state, port.getSearch(), options), mode),
244
+ subscribe: (listener, fallback) => port.subscribe(() => listener(parseDataTableUrlState(port.getSearch(), fallback, options)))
245
+ };
246
+ }
247
+ function createBrowserDataTableUrlStateAdapter(options = {}) {
248
+ if (typeof window === "undefined") {
249
+ throw new Error(
250
+ "The browser URL adapter requires a window. Use createDataTableUrlStateAdapter for SSR or tests."
251
+ );
252
+ }
253
+ return createDataTableUrlStateAdapter(
254
+ {
255
+ getSearch: () => window.location.search,
256
+ writeSearch: (search, mode) => {
257
+ const url = `${window.location.pathname}${search}${window.location.hash}`;
258
+ window.history[mode === "replace" ? "replaceState" : "pushState"]({}, "", url);
259
+ },
260
+ subscribe: (listener) => {
261
+ window.addEventListener("popstate", listener);
262
+ return () => window.removeEventListener("popstate", listener);
263
+ }
264
+ },
265
+ options
266
+ );
267
+ }
268
+ function createDataTableRequestManager(loader) {
269
+ let sequence = 0;
270
+ let active;
271
+ return {
272
+ async run(state) {
273
+ active?.controller.abort();
274
+ const requestId = ++sequence;
275
+ const controller = new AbortController();
276
+ active = { requestId, controller };
277
+ try {
278
+ const value = await loader(state, { requestId, signal: controller.signal });
279
+ if (controller.signal.aborted) return { status: "aborted", requestId };
280
+ if (active?.requestId !== requestId) return { status: "stale", requestId };
281
+ active = void 0;
282
+ return { status: "applied", requestId, value };
283
+ } catch (error) {
284
+ if (controller.signal.aborted || error instanceof DOMException && error.name === "AbortError") {
285
+ return { status: "aborted", requestId };
286
+ }
287
+ if (active?.requestId !== requestId) return { status: "stale", requestId };
288
+ active = void 0;
289
+ throw error;
290
+ }
291
+ },
292
+ cancel() {
293
+ active?.controller.abort();
294
+ active = void 0;
295
+ },
296
+ getActiveRequestId: () => active?.requestId
297
+ };
298
+ }
299
+
300
+ // src/adapters/navigation-state.ts
301
+ function createBrowserBooleanStateAdapter(key, options = {}) {
302
+ const storage = options.storage ?? (typeof window !== "undefined" ? window.localStorage : void 0);
303
+ const eventSource = options.eventSource ?? (typeof window !== "undefined" ? {
304
+ addEventListener: (type, listener) => window.addEventListener(type, listener),
305
+ removeEventListener: (type, listener) => window.removeEventListener(type, listener)
306
+ } : void 0);
307
+ if (!storage) throw new Error("A storage implementation is required outside the browser.");
308
+ return {
309
+ read: () => {
310
+ const value = storage.getItem(key);
311
+ return value === null ? void 0 : value === "true";
312
+ },
313
+ write: (value) => storage.setItem(key, String(value)),
314
+ ...eventSource ? {
315
+ subscribe: (listener) => {
316
+ const onStorage = (event) => {
317
+ if (event.key !== key) return;
318
+ listener(event.newValue === null ? void 0 : event.newValue === "true");
319
+ };
320
+ eventSource.addEventListener("storage", onStorage);
321
+ return () => eventSource.removeEventListener("storage", onStorage);
322
+ }
323
+ } : {}
324
+ };
325
+ }
326
+ function normalizePath(path) {
327
+ const withoutQuery = path.split(/[?#]/, 1)[0] ?? "/";
328
+ if (withoutQuery === "/") return "/";
329
+ return withoutQuery.replace(/\/+$/, "");
330
+ }
331
+ function matchNavigationPath(currentPath, targetPath, end = false) {
332
+ if (!targetPath.startsWith("/")) return false;
333
+ const current = normalizePath(currentPath);
334
+ const target = normalizePath(targetPath);
335
+ if (target === "/" || end) return current === target;
336
+ return current === target || current.startsWith(`${target}/`);
337
+ }
338
+
339
+ // src/components/badge.tsx
340
+ var import_utils = require("@jerco/utils");
341
+ var import_class_variance_authority = require("class-variance-authority");
342
+ var import_jsx_runtime2 = require("react/jsx-runtime");
343
+ var badgeVariants = (0, import_class_variance_authority.cva)("j-badge", {
344
+ variants: {
345
+ variant: {
346
+ neutral: "j-badge--neutral",
347
+ success: "j-badge--success",
348
+ warning: "j-badge--warning",
349
+ danger: "j-badge--danger",
350
+ info: "j-badge--info"
351
+ }
352
+ },
353
+ defaultVariants: { variant: "neutral" }
354
+ });
355
+ function Badge({ className, variant, ...props }) {
356
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: (0, import_utils.cn)(badgeVariants({ variant }), className), ...props });
357
+ }
358
+
359
+ // src/components/alert-dialog.tsx
360
+ var import_utils2 = require("@jerco/utils");
361
+ var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
362
+ var import_react2 = require("react");
363
+ var import_jsx_runtime3 = require("react/jsx-runtime");
364
+ var AlertDialog = AlertDialogPrimitive.Root;
365
+ var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
366
+ var AlertDialogCancel = AlertDialogPrimitive.Cancel;
367
+ var AlertDialogAction = AlertDialogPrimitive.Action;
368
+ var AlertDialogContent = (0, import_react2.forwardRef)(function AlertDialogContent2({ className, ...props }, ref) {
369
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(AlertDialogPrimitive.Portal, { children: [
370
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogPrimitive.Overlay, { className: "j-dialog-overlay" }),
371
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
372
+ AlertDialogPrimitive.Content,
373
+ {
374
+ ref,
375
+ className: (0, import_utils2.cn)("j-dialog-content", className),
376
+ ...props
377
+ }
378
+ )
379
+ ] });
380
+ });
381
+ var AlertDialogTitle = (0, import_react2.forwardRef)(function AlertDialogTitle2({ className, ...props }, ref) {
382
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AlertDialogPrimitive.Title, { ref, className: (0, import_utils2.cn)("j-dialog-title", className), ...props });
383
+ });
384
+ var AlertDialogDescription = (0, import_react2.forwardRef)(function AlertDialogDescription2({ className, ...props }, ref) {
385
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
386
+ AlertDialogPrimitive.Description,
387
+ {
388
+ ref,
389
+ className: (0, import_utils2.cn)("j-dialog-description", className),
390
+ ...props
391
+ }
392
+ );
393
+ });
394
+ function AlertDialogHeader({ children }) {
395
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "j-dialog-header", children });
396
+ }
397
+ function AlertDialogFooter({ children }) {
398
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "j-dialog-footer", children });
399
+ }
400
+
401
+ // src/components/brand-logo.tsx
402
+ var import_utils3 = require("@jerco/utils");
403
+ var import_jsx_runtime4 = require("react/jsx-runtime");
404
+ function BrandLogo({ asset, name = "Product", className }) {
405
+ if (asset) return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: (0, import_utils3.cn)("j-brand-logo", className), children: asset });
406
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
407
+ "span",
408
+ {
409
+ className: (0, import_utils3.cn)("j-brand-logo j-brand-logo--placeholder", className),
410
+ "aria-label": `${name} placeholder logo`,
411
+ children: name.slice(0, 1).toUpperCase()
412
+ }
413
+ );
414
+ }
415
+
416
+ // src/components/button.tsx
417
+ var import_icons = require("@jerco/icons");
418
+ var import_utils4 = require("@jerco/utils");
419
+ var import_react_slot = require("@radix-ui/react-slot");
420
+ var import_class_variance_authority2 = require("class-variance-authority");
421
+ var import_react3 = require("react");
422
+ var import_jsx_runtime5 = require("react/jsx-runtime");
423
+ var buttonVariants = (0, import_class_variance_authority2.cva)("j-button", {
424
+ variants: {
425
+ variant: {
426
+ primary: "j-button--primary",
427
+ secondary: "j-button--secondary",
428
+ outline: "j-button--outline",
429
+ ghost: "j-button--ghost",
430
+ destructive: "j-button--destructive"
431
+ },
432
+ size: {
433
+ sm: "j-button--sm",
434
+ md: "j-button--md",
435
+ lg: "j-button--lg",
436
+ icon: "j-button--icon"
437
+ }
438
+ },
439
+ defaultVariants: { variant: "primary", size: "md" }
440
+ });
441
+ var Button = (0, import_react3.forwardRef)(function Button2({ className, variant, size, asChild = false, loading = false, disabled, children, ...props }, ref) {
442
+ const Component = asChild ? import_react_slot.Slot : "button";
443
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
444
+ Component,
445
+ {
446
+ ref,
447
+ className: (0, import_utils4.cn)(buttonVariants({ variant, size }), className),
448
+ disabled: asChild ? void 0 : disabled || loading,
449
+ "aria-disabled": disabled || loading || void 0,
450
+ "aria-busy": loading || void 0,
451
+ ...props,
452
+ children: [
453
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons.LoaderCircle, { className: "j-spinner j-icon", "aria-hidden": "true" }) : null,
454
+ children
455
+ ]
456
+ }
457
+ );
458
+ });
459
+ var IconButton = (0, import_react3.forwardRef)(function IconButton2({ label, children, ...props }, ref) {
460
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { ref, size: "icon", "aria-label": label, ...props, children });
461
+ });
462
+
463
+ // src/components/card.tsx
464
+ var import_utils5 = require("@jerco/utils");
465
+ var import_jsx_runtime6 = require("react/jsx-runtime");
466
+ function Card({ className, ...props }) {
467
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_utils5.cn)("j-card", className), ...props });
468
+ }
469
+ function CardHeader({ className, ...props }) {
470
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_utils5.cn)("j-card-header", className), ...props });
471
+ }
472
+ function CardTitle({ className, ...props }) {
473
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: (0, import_utils5.cn)("j-card-title", className), ...props });
474
+ }
475
+ function CardDescription({ className, ...props }) {
476
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: (0, import_utils5.cn)("j-card-description", className), ...props });
477
+ }
478
+ function CardContent({ className, ...props }) {
479
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_utils5.cn)("j-card-content", className), ...props });
480
+ }
481
+ function CardFooter({ className, ...props }) {
482
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: (0, import_utils5.cn)("j-card-footer", className), ...props });
483
+ }
484
+
485
+ // src/components/checkbox.tsx
486
+ var import_icons2 = require("@jerco/icons");
487
+ var import_utils6 = require("@jerco/utils");
488
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
489
+ var import_react4 = require("react");
490
+ var import_jsx_runtime7 = require("react/jsx-runtime");
491
+ var Checkbox = (0, import_react4.forwardRef)(function Checkbox2({ className, ...props }, ref) {
492
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckboxPrimitive.Root, { ref, className: (0, import_utils6.cn)("j-checkbox", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckboxPrimitive.Indicator, { className: "j-checkbox-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_icons2.Check, { "aria-hidden": "true" }) }) });
493
+ });
494
+ function CheckboxField({ label, description, id, ...props }) {
495
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "j-choice-field", children: [
496
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Checkbox, { id, ...props }),
497
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
498
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { className: "j-choice-label", htmlFor: id, children: label }),
499
+ description ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "j-choice-description", children: description }) : null
500
+ ] })
501
+ ] });
502
+ }
503
+
504
+ // src/components/data-table.tsx
505
+ var import_icons5 = require("@jerco/icons");
506
+ var import_utils11 = require("@jerco/utils");
507
+ var import_react_table = require("@tanstack/react-table");
508
+ var import_react_virtual = require("@tanstack/react-virtual");
509
+ var import_react8 = require("react");
510
+
511
+ // src/components/dropdown-menu.tsx
512
+ var import_icons3 = require("@jerco/icons");
513
+ var import_utils7 = require("@jerco/utils");
514
+ var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
515
+ var import_react5 = require("react");
516
+ var import_jsx_runtime8 = require("react/jsx-runtime");
517
+ var DropdownMenu = DropdownPrimitive.Root;
518
+ var DropdownMenuTrigger = DropdownPrimitive.Trigger;
519
+ var DropdownMenuGroup = DropdownPrimitive.Group;
520
+ var DropdownMenuPortal = DropdownPrimitive.Portal;
521
+ var DropdownMenuSub = DropdownPrimitive.Sub;
522
+ var DropdownMenuRadioGroup = DropdownPrimitive.RadioGroup;
523
+ var DropdownMenuContent = (0, import_react5.forwardRef)(function DropdownMenuContent2({ className, sideOffset = 6, ...props }, ref) {
524
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
525
+ DropdownPrimitive.Content,
526
+ {
527
+ ref,
528
+ sideOffset,
529
+ className: (0, import_utils7.cn)("j-dropdown-content", className),
530
+ ...props
531
+ }
532
+ ) });
533
+ });
534
+ var DropdownMenuItem = (0, import_react5.forwardRef)(function DropdownMenuItem2({ className, inset, ...props }, ref) {
535
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
536
+ DropdownPrimitive.Item,
537
+ {
538
+ ref,
539
+ className: (0, import_utils7.cn)("j-dropdown-item", inset && "j-dropdown-item--inset", className),
540
+ ...props
541
+ }
542
+ );
543
+ });
544
+ var DropdownMenuCheckboxItem = (0, import_react5.forwardRef)(function DropdownMenuCheckboxItem2({ className, children, ...props }, ref) {
545
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
546
+ DropdownPrimitive.CheckboxItem,
547
+ {
548
+ ref,
549
+ className: (0, import_utils7.cn)("j-dropdown-item j-dropdown-check-item", className),
550
+ ...props,
551
+ children: [
552
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "j-dropdown-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.Check, { "aria-hidden": "true" }) }) }),
553
+ children
554
+ ]
555
+ }
556
+ );
557
+ });
558
+ var DropdownMenuRadioItem = (0, import_react5.forwardRef)(function DropdownMenuRadioItem2({ className, children, ...props }, ref) {
559
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
560
+ DropdownPrimitive.RadioItem,
561
+ {
562
+ ref,
563
+ className: (0, import_utils7.cn)("j-dropdown-item j-dropdown-check-item", className),
564
+ ...props,
565
+ children: [
566
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "j-dropdown-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "j-dropdown-dot" }) }) }),
567
+ children
568
+ ]
569
+ }
570
+ );
571
+ });
572
+ var DropdownMenuLabel = (0, import_react5.forwardRef)(function DropdownMenuLabel2({ className, ...props }, ref) {
573
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DropdownPrimitive.Label, { ref, className: (0, import_utils7.cn)("j-dropdown-label", className), ...props });
574
+ });
575
+ var DropdownMenuSeparator = (0, import_react5.forwardRef)(function DropdownMenuSeparator2({ className, ...props }, ref) {
576
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
577
+ DropdownPrimitive.Separator,
578
+ {
579
+ ref,
580
+ className: (0, import_utils7.cn)("j-dropdown-separator", className),
581
+ ...props
582
+ }
583
+ );
584
+ });
585
+ var DropdownMenuSubTrigger = (0, import_react5.forwardRef)(function DropdownMenuSubTrigger2({ className, children, ...props }, ref) {
586
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DropdownPrimitive.SubTrigger, { ref, className: (0, import_utils7.cn)("j-dropdown-item", className), ...props, children: [
587
+ children,
588
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons3.ChevronRight, { className: "j-dropdown-chevron", "aria-hidden": "true" })
589
+ ] });
590
+ });
591
+ var DropdownMenuSubContent = (0, import_react5.forwardRef)(function DropdownMenuSubContent2({ className, ...props }, ref) {
592
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
593
+ DropdownPrimitive.SubContent,
594
+ {
595
+ ref,
596
+ className: (0, import_utils7.cn)("j-dropdown-content", className),
597
+ ...props
598
+ }
599
+ );
600
+ });
601
+
602
+ // src/components/input.tsx
603
+ var import_utils8 = require("@jerco/utils");
604
+ var import_react6 = require("react");
605
+ var import_jsx_runtime9 = require("react/jsx-runtime");
606
+ var Input = (0, import_react6.forwardRef)(function Input2({ className, invalid, ...props }, ref) {
607
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
608
+ "input",
609
+ {
610
+ ref,
611
+ className: (0, import_utils8.cn)("j-input", className),
612
+ "aria-invalid": invalid || void 0,
613
+ ...props
614
+ }
615
+ );
616
+ });
617
+ var Textarea = (0, import_react6.forwardRef)(function Textarea2({ className, invalid, ...props }, ref) {
618
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
619
+ "textarea",
620
+ {
621
+ ref,
622
+ className: (0, import_utils8.cn)("j-input j-textarea", className),
623
+ "aria-invalid": invalid || void 0,
624
+ ...props
625
+ }
626
+ );
627
+ });
628
+ var Label2 = (0, import_react6.forwardRef)(
629
+ function Label3({ className, ...props }, ref) {
630
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("label", { ref, className: (0, import_utils8.cn)("j-label", className), ...props });
631
+ }
632
+ );
633
+ function Separator2({ className }) {
634
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: (0, import_utils8.cn)("j-separator", className), role: "separator" });
635
+ }
636
+
637
+ // src/components/select.tsx
638
+ var import_icons4 = require("@jerco/icons");
639
+ var import_utils9 = require("@jerco/utils");
640
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
641
+ var import_react7 = require("react");
642
+ var import_jsx_runtime10 = require("react/jsx-runtime");
643
+ function Select({
644
+ options,
645
+ label,
646
+ placeholder = "Select an option",
647
+ ...props
648
+ }) {
649
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SelectPrimitive.Root, { ...props, children: [
650
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(SelectPrimitive.Trigger, { className: "j-select", "aria-label": label, children: [
651
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Value, { placeholder }),
652
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_icons4.ChevronDown, { className: "j-icon", "aria-hidden": "true" }) })
653
+ ] }),
654
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Content, { className: "j-select-content", position: "popper", sideOffset: 6, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Viewport, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
655
+ SelectPrimitive.Item,
656
+ {
657
+ className: "j-select-item",
658
+ value: option.value,
659
+ ...option.disabled === void 0 ? {} : { disabled: option.disabled },
660
+ children: [
661
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.ItemText, { children: option.label }),
662
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.ItemIndicator, { className: "j-select-check", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_icons4.Check, { className: "j-icon", "aria-hidden": "true" }) })
663
+ ]
664
+ },
665
+ option.value
666
+ )) }) }) })
667
+ ] });
668
+ }
669
+ var SelectGroup = SelectPrimitive.Group;
670
+ var SelectValue = SelectPrimitive.Value;
671
+ var SelectLabel = (0, import_react7.forwardRef)(function SelectLabel2({ className, ...props }, ref) {
672
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SelectPrimitive.Label, { ref, className: (0, import_utils9.cn)("j-select-label", className), ...props });
673
+ });
674
+ function NativeSelect({
675
+ label,
676
+ children,
677
+ className,
678
+ ...props
679
+ }) {
680
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("select", { className: (0, import_utils9.cn)("j-select j-native-select", className), "aria-label": label, ...props, children });
681
+ }
682
+
683
+ // src/components/skeleton.tsx
684
+ var import_utils10 = require("@jerco/utils");
685
+ var import_jsx_runtime11 = require("react/jsx-runtime");
686
+ function Skeleton({ className, ...props }) {
687
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: (0, import_utils10.cn)("j-skeleton", className), "aria-hidden": "true", ...props });
688
+ }
689
+
690
+ // src/components/data-table.tsx
691
+ var import_jsx_runtime12 = require("react/jsx-runtime");
692
+ function resolveUpdate(updater, current) {
693
+ return typeof updater === "function" ? updater(current) : updater;
694
+ }
695
+ function DataTable({
696
+ data,
697
+ columns,
698
+ getRowId,
699
+ getSearchText,
700
+ searchPlaceholder = "Search",
701
+ filters = [],
702
+ pageSize = 10,
703
+ paginate = true,
704
+ server,
705
+ virtualization,
706
+ loading = false,
707
+ emptyState = "No results found.",
708
+ bulkActions,
709
+ className
710
+ }) {
711
+ const [localQuery, setLocalQuery] = (0, import_react8.useState)("");
712
+ const [localFilterValues, setLocalFilterValues] = (0, import_react8.useState)({});
713
+ const [localSorting, setLocalSorting] = (0, import_react8.useState)([]);
714
+ const [localPagination, setLocalPagination] = (0, import_react8.useState)({
715
+ pageIndex: 0,
716
+ pageSize
717
+ });
718
+ const [columnVisibility, setColumnVisibility] = (0, import_react8.useState)({});
719
+ const [rowSelection, setRowSelection] = (0, import_react8.useState)({});
720
+ const scrollRef = (0, import_react8.useRef)(null);
721
+ const query = server?.state.query ?? localQuery;
722
+ const filterValues = server?.state.filters ?? localFilterValues;
723
+ const sorting = server?.state.sorting ?? localSorting;
724
+ const pagination = server?.state.pagination ?? localPagination;
725
+ const updateServerState = (next) => {
726
+ if (!server) return;
727
+ server.onStateChange({ ...server.state, ...next });
728
+ };
729
+ const updatePagination = (updater) => {
730
+ const next = resolveUpdate(updater, pagination);
731
+ if (server) updateServerState({ pagination: next });
732
+ else setLocalPagination(next);
733
+ };
734
+ const updateSorting = (updater) => {
735
+ const next = resolveUpdate(updater, sorting);
736
+ const nextPagination = { ...pagination, pageIndex: 0 };
737
+ if (server) updateServerState({ sorting: next, pagination: nextPagination });
738
+ else {
739
+ setLocalSorting(next);
740
+ setLocalPagination(nextPagination);
741
+ }
742
+ };
743
+ const updateQuery = (next) => {
744
+ const nextPagination = { ...pagination, pageIndex: 0 };
745
+ if (server) updateServerState({ query: next, pagination: nextPagination });
746
+ else {
747
+ setLocalQuery(next);
748
+ setLocalPagination(nextPagination);
749
+ }
750
+ };
751
+ const updateFilter = (id, value) => {
752
+ const nextFilters = { ...filterValues, [id]: value };
753
+ const nextPagination = { ...pagination, pageIndex: 0 };
754
+ if (server) updateServerState({ filters: nextFilters, pagination: nextPagination });
755
+ else {
756
+ setLocalFilterValues(nextFilters);
757
+ setLocalPagination(nextPagination);
758
+ }
759
+ };
760
+ const filteredData = (0, import_react8.useMemo)(() => {
761
+ if (server) return data;
762
+ const normalized = query.trim().toLocaleLowerCase();
763
+ return data.filter((row) => {
764
+ const matchesQuery = !normalized || (getSearchText?.(row) ?? Object.values(row).join(" ")).toLocaleLowerCase().includes(normalized);
765
+ const matchesFilters = filters.every((filter) => {
766
+ const value = filterValues[filter.id];
767
+ return !value || value === "all" || filter.getValue(row) === value;
768
+ });
769
+ return matchesQuery && matchesFilters;
770
+ });
771
+ }, [data, filterValues, filters, getSearchText, query, server]);
772
+ const selectionColumn = (0, import_react8.useMemo)(
773
+ () => ({
774
+ id: "select",
775
+ size: 44,
776
+ enableSorting: false,
777
+ enableHiding: false,
778
+ header: ({ table: table2 }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
779
+ Checkbox,
780
+ {
781
+ "aria-label": "Select all visible rows",
782
+ checked: table2.getIsAllPageRowsSelected() || (table2.getIsSomePageRowsSelected() ? "indeterminate" : false),
783
+ onCheckedChange: (checked) => table2.toggleAllPageRowsSelected(Boolean(checked))
784
+ }
785
+ ),
786
+ cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
787
+ Checkbox,
788
+ {
789
+ "aria-label": `Select row ${row.index + 1}`,
790
+ checked: row.getIsSelected(),
791
+ onCheckedChange: (checked) => row.toggleSelected(Boolean(checked))
792
+ }
793
+ )
794
+ }),
795
+ []
796
+ );
797
+ const table = (0, import_react_table.useReactTable)({
798
+ data: filteredData,
799
+ columns: [selectionColumn, ...columns],
800
+ ...getRowId ? { getRowId } : {},
801
+ state: { sorting, columnVisibility, rowSelection, pagination },
802
+ onSortingChange: updateSorting,
803
+ onColumnVisibilityChange: setColumnVisibility,
804
+ onRowSelectionChange: setRowSelection,
805
+ onPaginationChange: updatePagination,
806
+ getCoreRowModel: (0, import_react_table.getCoreRowModel)(),
807
+ ...server ? {
808
+ manualPagination: true,
809
+ manualSorting: true,
810
+ manualFiltering: true,
811
+ pageCount: server.pageCount,
812
+ rowCount: server.rowCount
813
+ } : {
814
+ getSortedRowModel: (0, import_react_table.getSortedRowModel)(),
815
+ ...paginate ? { getPaginationRowModel: (0, import_react_table.getPaginationRowModel)() } : {}
816
+ },
817
+ columnResizeMode: "onChange",
818
+ enableRowSelection: true
819
+ });
820
+ const selectedRows = table.getSelectedRowModel().rows;
821
+ const visibleColumnCount = table.getVisibleLeafColumns().length;
822
+ const rows = table.getRowModel().rows;
823
+ const rowVirtualizer = (0, import_react_virtual.useVirtualizer)({
824
+ count: virtualization ? rows.length : 0,
825
+ getScrollElement: () => scrollRef.current,
826
+ estimateSize: () => virtualization?.estimateRowHeight ?? 48,
827
+ overscan: virtualization?.overscan ?? 6
828
+ });
829
+ const virtualRows = virtualization ? rowVirtualizer.getVirtualItems() : [];
830
+ const paddingTop = virtualRows.length ? virtualRows[0].start : 0;
831
+ const paddingBottom = virtualRows.length ? rowVirtualizer.getTotalSize() - virtualRows[virtualRows.length - 1].end : 0;
832
+ const renderRow = (row) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { "data-selected": row.getIsSelected() || void 0, children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("td", { children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id);
833
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", { className: (0, import_utils11.cn)("j-data-table", className), "aria-busy": loading || void 0, children: [
834
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "j-data-table-toolbar", children: [
835
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "j-data-table-search", children: [
836
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.Search, { "aria-hidden": "true" }),
837
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
838
+ Input,
839
+ {
840
+ "aria-label": searchPlaceholder,
841
+ placeholder: searchPlaceholder,
842
+ value: query,
843
+ onChange: (event) => updateQuery(event.target.value)
844
+ }
845
+ )
846
+ ] }),
847
+ filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
848
+ NativeSelect,
849
+ {
850
+ label: filter.label,
851
+ value: filterValues[filter.id] ?? "all",
852
+ onChange: (event) => updateFilter(filter.id, event.target.value),
853
+ children: [
854
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("option", { value: "all", children: [
855
+ "All ",
856
+ filter.label.toLocaleLowerCase()
857
+ ] }),
858
+ filter.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: option.value, children: option.label }, option.value))
859
+ ]
860
+ },
861
+ filter.id
862
+ )),
863
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenu, { children: [
864
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Button, { variant: "outline", children: [
865
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.Columns3, { "aria-hidden": "true" }),
866
+ " Columns"
867
+ ] }) }),
868
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DropdownMenuContent, { align: "end", children: [
869
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuLabel, { children: "Visible columns" }),
870
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuSeparator, {}),
871
+ table.getAllLeafColumns().filter((column) => column.getCanHide()).map((column) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
872
+ DropdownMenuCheckboxItem,
873
+ {
874
+ checked: column.getIsVisible(),
875
+ onCheckedChange: (value) => column.toggleVisibility(Boolean(value)),
876
+ children: column.id
877
+ },
878
+ column.id
879
+ ))
880
+ ] })
881
+ ] })
882
+ ] }),
883
+ selectedRows.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "j-data-table-selection", role: "status", children: [
884
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
885
+ selectedRows.length,
886
+ " selected"
887
+ ] }),
888
+ bulkActions?.(selectedRows)
889
+ ] }) : null,
890
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
891
+ "div",
892
+ {
893
+ ref: scrollRef,
894
+ className: (0, import_utils11.cn)("j-data-table-scroll", virtualization && "j-data-table-scroll--virtual"),
895
+ style: virtualization ? { maxHeight: virtualization.height ?? 480 } : void 0,
896
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("table", { "aria-rowcount": server?.rowCount, children: [
897
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: headerGroup.headers.map((header) => {
898
+ const sorted = header.column.getIsSorted();
899
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
900
+ "th",
901
+ {
902
+ style: { width: header.getSize() },
903
+ scope: "col",
904
+ "aria-sort": sorted === "asc" ? "ascending" : sorted === "desc" ? "descending" : void 0,
905
+ children: [
906
+ header.isPlaceholder ? null : header.column.getCanSort() ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
907
+ "button",
908
+ {
909
+ className: "j-data-table-sort",
910
+ onClick: header.column.getToggleSortingHandler(),
911
+ children: [
912
+ (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
913
+ sorted === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.ChevronUp, { "aria-hidden": "true" }) : sorted === "desc" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.ChevronDown, { "aria-hidden": "true" }) : null
914
+ ]
915
+ }
916
+ ) : (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
917
+ header.column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
918
+ "div",
919
+ {
920
+ className: "j-data-table-resizer",
921
+ onMouseDown: header.getResizeHandler(),
922
+ onTouchStart: header.getResizeHandler()
923
+ }
924
+ ) : null
925
+ ]
926
+ },
927
+ header.id
928
+ );
929
+ }) }, headerGroup.id)) }),
930
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tbody", { children: loading ? Array.from({ length: Math.min(pageSize, 5) }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("td", { colSpan: visibleColumnCount, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Skeleton, { className: "j-data-table-skeleton" }) }) }, index)) : rows.length ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
931
+ virtualization && paddingTop > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("td", { colSpan: visibleColumnCount, style: { height: paddingTop, padding: 0 } }) }) : null,
932
+ virtualization ? virtualRows.map((virtualRow) => rows[virtualRow.index]).map(renderRow) : rows.map(renderRow),
933
+ virtualization && paddingBottom > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
934
+ "td",
935
+ {
936
+ colSpan: visibleColumnCount,
937
+ style: { height: paddingBottom, padding: 0 }
938
+ }
939
+ ) }) : null
940
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("td", { className: "j-data-table-empty", colSpan: visibleColumnCount, children: emptyState }) }) })
941
+ ] })
942
+ }
943
+ ),
944
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "j-data-table-footer", children: [
945
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: server ? `${data.length} of ${server.rowCount} rows` : `${filteredData.length} rows` }),
946
+ paginate || server ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
947
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
948
+ "Page ",
949
+ pagination.pageIndex + 1,
950
+ " of ",
951
+ Math.max(table.getPageCount(), 1)
952
+ ] }),
953
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "j-data-table-pagination", children: [
954
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
955
+ IconButton,
956
+ {
957
+ label: "Previous page",
958
+ variant: "outline",
959
+ disabled: !table.getCanPreviousPage(),
960
+ onClick: () => table.previousPage(),
961
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.ChevronLeft, { "aria-hidden": "true" })
962
+ }
963
+ ),
964
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
965
+ IconButton,
966
+ {
967
+ label: "Next page",
968
+ variant: "outline",
969
+ disabled: !table.getCanNextPage(),
970
+ onClick: () => table.nextPage(),
971
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_icons5.ChevronRight, { "aria-hidden": "true" })
972
+ }
973
+ )
974
+ ] })
975
+ ] }) : null
976
+ ] })
977
+ ] });
978
+ }
979
+
980
+ // src/components/device-card.tsx
981
+ var import_icons7 = require("@jerco/icons");
982
+ var import_utils13 = require("@jerco/utils");
983
+
984
+ // src/components/status-indicator.tsx
985
+ var import_icons6 = require("@jerco/icons");
986
+ var import_utils12 = require("@jerco/utils");
987
+ var import_jsx_runtime13 = require("react/jsx-runtime");
988
+ var statusMeta = {
989
+ online: { defaultLabel: "Online", icon: import_icons6.CheckCircle2 },
990
+ healthy: { defaultLabel: "Healthy", icon: import_icons6.CheckCircle2 },
991
+ degraded: { defaultLabel: "Degraded", icon: import_icons6.TriangleAlert },
992
+ warning: { defaultLabel: "Warning", icon: import_icons6.TriangleAlert },
993
+ offline: { defaultLabel: "Offline", icon: import_icons6.XCircle },
994
+ error: { defaultLabel: "Error", icon: import_icons6.AlertCircle },
995
+ unknown: { defaultLabel: "Unknown", icon: import_icons6.Circle }
996
+ };
997
+ function StatusIndicator({
998
+ status,
999
+ label,
1000
+ showIcon = true,
1001
+ className
1002
+ }) {
1003
+ const meta = statusMeta[status];
1004
+ const Icon2 = meta.icon;
1005
+ const visibleLabel = label ?? meta.defaultLabel;
1006
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1007
+ "span",
1008
+ {
1009
+ className: (0, import_utils12.cn)("j-status", `j-status--${status}`, className),
1010
+ role: "status",
1011
+ "aria-label": visibleLabel,
1012
+ children: [
1013
+ showIcon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon2, { className: "j-status-icon", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "j-status-dot", "aria-hidden": "true" }),
1014
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: visibleLabel })
1015
+ ]
1016
+ }
1017
+ );
1018
+ }
1019
+
1020
+ // src/components/device-card.tsx
1021
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1022
+ function DeviceCard({
1023
+ name,
1024
+ type,
1025
+ status,
1026
+ address,
1027
+ latency,
1028
+ description,
1029
+ icon: Icon2 = import_icons7.Router,
1030
+ actions,
1031
+ loading = false,
1032
+ className
1033
+ }) {
1034
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Card, { className: (0, import_utils13.cn)("j-device-card", className), "aria-busy": loading || void 0, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1035
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Skeleton, { className: "j-device-card-icon" }),
1036
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Skeleton, { className: "j-device-card-line" }),
1037
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Skeleton, { className: "j-device-card-line j-device-card-line--short" }),
1038
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "j-sr-only", children: [
1039
+ "Loading ",
1040
+ name
1041
+ ] })
1042
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1043
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "j-device-card-header", children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "j-device-card-icon", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Icon2, { "aria-hidden": "true" }) }),
1045
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
1046
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { children: name }),
1047
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: type })
1048
+ ] }),
1049
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "j-device-card-actions", children: actions }) : null
1050
+ ] }),
1051
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "j-device-card-status", children: [
1052
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(StatusIndicator, { status }),
1053
+ latency ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: latency }) : null
1054
+ ] }),
1055
+ address ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { className: "j-device-card-address", children: address }) : null,
1056
+ description ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "j-device-card-description", children: description }) : null
1057
+ ] }) });
1058
+ }
1059
+
1060
+ // src/components/dialog.tsx
1061
+ var import_icons8 = require("@jerco/icons");
1062
+ var import_utils14 = require("@jerco/utils");
1063
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1064
+ var import_react9 = require("react");
1065
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1066
+ var Dialog = DialogPrimitive.Root;
1067
+ var DialogTrigger = DialogPrimitive.Trigger;
1068
+ var DialogClose = DialogPrimitive.Close;
1069
+ var DialogContent = (0, import_react9.forwardRef)(function DialogContent2({ className, children, ...props }, ref) {
1070
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Portal, { children: [
1071
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPrimitive.Overlay, { className: "j-dialog-overlay" }),
1072
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DialogPrimitive.Content, { ref, className: (0, import_utils14.cn)("j-dialog-content", className), ...props, children: [
1073
+ children,
1074
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconButton, { className: "j-dialog-close", variant: "ghost", label: "Close dialog", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_icons8.X, { className: "j-icon", "aria-hidden": "true" }) }) })
1075
+ ] })
1076
+ ] });
1077
+ });
1078
+ var DialogTitle = (0, import_react9.forwardRef)(function DialogTitle2({ className, ...props }, ref) {
1079
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPrimitive.Title, { ref, className: (0, import_utils14.cn)("j-dialog-title", className), ...props });
1080
+ });
1081
+ var DialogDescription = (0, import_react9.forwardRef)(function DialogDescription2({ className, ...props }, ref) {
1082
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1083
+ DialogPrimitive.Description,
1084
+ {
1085
+ ref,
1086
+ className: (0, import_utils14.cn)("j-dialog-description", className),
1087
+ ...props
1088
+ }
1089
+ );
1090
+ });
1091
+ function DialogHeader({ children }) {
1092
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "j-dialog-header", children });
1093
+ }
1094
+ function DialogFooter({ children }) {
1095
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "j-dialog-footer", children });
1096
+ }
1097
+
1098
+ // src/components/layout.tsx
1099
+ var import_icons9 = require("@jerco/icons");
1100
+ var import_utils15 = require("@jerco/utils");
1101
+ var import_react10 = require("react");
1102
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1103
+ var AppShellContext = (0, import_react10.createContext)(null);
1104
+ function AppShell({
1105
+ className,
1106
+ defaultMobileOpen = false,
1107
+ defaultSidebarCollapsed = false,
1108
+ sidebarCollapsed: controlledSidebarCollapsed,
1109
+ onSidebarCollapsedChange,
1110
+ sidebarPersistence,
1111
+ ...props
1112
+ }) {
1113
+ const navigationId = (0, import_react10.useId)();
1114
+ const [mobileOpen, setMobileOpen] = (0, import_react10.useState)(defaultMobileOpen);
1115
+ const [internalSidebarCollapsed, setInternalSidebarCollapsed] = (0, import_react10.useState)(
1116
+ () => sidebarPersistence?.read() ?? defaultSidebarCollapsed
1117
+ );
1118
+ const sidebarCollapsed = controlledSidebarCollapsed ?? internalSidebarCollapsed;
1119
+ const setSidebarCollapsed = (0, import_react10.useCallback)(
1120
+ (collapsed) => {
1121
+ if (controlledSidebarCollapsed === void 0) setInternalSidebarCollapsed(collapsed);
1122
+ sidebarPersistence?.write(collapsed);
1123
+ onSidebarCollapsedChange?.(collapsed);
1124
+ },
1125
+ [controlledSidebarCollapsed, onSidebarCollapsedChange, sidebarPersistence]
1126
+ );
1127
+ (0, import_react10.useEffect)(() => {
1128
+ if (!mobileOpen) return;
1129
+ const close = (event) => {
1130
+ if (event.key === "Escape") setMobileOpen(false);
1131
+ };
1132
+ window.addEventListener("keydown", close);
1133
+ return () => window.removeEventListener("keydown", close);
1134
+ }, [mobileOpen]);
1135
+ (0, import_react10.useEffect)(() => {
1136
+ if (!sidebarPersistence?.subscribe) return;
1137
+ return sidebarPersistence.subscribe((collapsed) => {
1138
+ if (collapsed !== void 0 && controlledSidebarCollapsed === void 0) {
1139
+ setInternalSidebarCollapsed(collapsed);
1140
+ }
1141
+ });
1142
+ }, [controlledSidebarCollapsed, sidebarPersistence]);
1143
+ const value = (0, import_react10.useMemo)(
1144
+ () => ({ navigationId, mobileOpen, setMobileOpen, sidebarCollapsed, setSidebarCollapsed }),
1145
+ [mobileOpen, navigationId, setSidebarCollapsed, sidebarCollapsed]
1146
+ );
1147
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AppShellContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1148
+ "div",
1149
+ {
1150
+ className: (0, import_utils15.cn)(
1151
+ "j-app-shell",
1152
+ mobileOpen && "j-app-shell--nav-open",
1153
+ sidebarCollapsed && "j-app-shell--collapsed",
1154
+ className
1155
+ ),
1156
+ ...props
1157
+ }
1158
+ ) });
1159
+ }
1160
+ function Sidebar({ className, children, ...props }) {
1161
+ const shell = (0, import_react10.useContext)(AppShellContext);
1162
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1163
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1164
+ "button",
1165
+ {
1166
+ className: "j-sidebar-overlay",
1167
+ "aria-label": "Close navigation",
1168
+ tabIndex: shell?.mobileOpen ? 0 : -1,
1169
+ onClick: () => shell?.setMobileOpen(false)
1170
+ }
1171
+ ),
1172
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1173
+ "aside",
1174
+ {
1175
+ id: shell?.navigationId,
1176
+ className: (0, import_utils15.cn)("j-sidebar", className),
1177
+ "aria-label": props["aria-label"] ?? "Primary navigation",
1178
+ ...props,
1179
+ children: [
1180
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "j-sidebar-mobile-header", children: [
1181
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: "Navigation" }),
1182
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1183
+ IconButton,
1184
+ {
1185
+ label: "Close navigation",
1186
+ variant: "ghost",
1187
+ onClick: () => shell?.setMobileOpen(false),
1188
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons9.X, { "aria-hidden": "true" })
1189
+ }
1190
+ )
1191
+ ] }),
1192
+ children
1193
+ ]
1194
+ }
1195
+ )
1196
+ ] });
1197
+ }
1198
+ function AppShellMenuButton({
1199
+ className,
1200
+ label = "Open navigation",
1201
+ ...props
1202
+ }) {
1203
+ const shell = (0, import_react10.useContext)(AppShellContext);
1204
+ if (!shell) throw new Error("AppShellMenuButton must be used inside AppShell");
1205
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1206
+ IconButton,
1207
+ {
1208
+ className: (0, import_utils15.cn)("j-app-shell-menu", className),
1209
+ label,
1210
+ variant: "ghost",
1211
+ "aria-controls": shell.navigationId,
1212
+ "aria-expanded": shell.mobileOpen,
1213
+ onClick: () => shell.setMobileOpen(!shell.mobileOpen),
1214
+ ...props,
1215
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons9.Menu, { "aria-hidden": "true" })
1216
+ }
1217
+ );
1218
+ }
1219
+ function AppShellCollapseButton({
1220
+ className,
1221
+ ...props
1222
+ }) {
1223
+ const shell = (0, import_react10.useContext)(AppShellContext);
1224
+ if (!shell) throw new Error("AppShellCollapseButton must be used inside AppShell");
1225
+ const label = shell.sidebarCollapsed ? "Expand navigation" : "Collapse navigation";
1226
+ const Icon2 = shell.sidebarCollapsed ? import_icons9.PanelLeftOpen : import_icons9.PanelLeftClose;
1227
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1228
+ IconButton,
1229
+ {
1230
+ className: (0, import_utils15.cn)("j-app-shell-collapse", className),
1231
+ label,
1232
+ variant: "ghost",
1233
+ "aria-pressed": shell.sidebarCollapsed,
1234
+ onClick: () => shell.setSidebarCollapsed(!shell.sidebarCollapsed),
1235
+ ...props,
1236
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon2, { "aria-hidden": "true" })
1237
+ }
1238
+ );
1239
+ }
1240
+ function Header({ className, ...props }) {
1241
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("header", { className: (0, import_utils15.cn)("j-header", className), ...props });
1242
+ }
1243
+ function MainContent({ className, ...props }) {
1244
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("main", { className: (0, import_utils15.cn)("j-main-content", className), ...props });
1245
+ }
1246
+ function itemIsActive(item, currentPath, isPathActive) {
1247
+ if (item.active !== void 0) return item.active;
1248
+ if (!currentPath || !item.href) return false;
1249
+ return isPathActive ? isPathActive(currentPath, item.href, item) : matchNavigationPath(currentPath, item.href, item.matchEnd);
1250
+ }
1251
+ function branchIsActive(item, currentPath, isPathActive) {
1252
+ return itemIsActive(item, currentPath, isPathActive) || Boolean(item.items?.some((child) => branchIsActive(child, currentPath, isPathActive)));
1253
+ }
1254
+ function collectExpanded(items, currentPath, isPathActive, result = /* @__PURE__ */ new Set(), includeDefaults = true) {
1255
+ for (const item of items) {
1256
+ const id = item.id ?? `${item.href ?? "group"}-${item.label}`;
1257
+ if (includeDefaults && item.defaultExpanded || item.items?.some((child) => branchIsActive(child, currentPath, isPathActive))) {
1258
+ result.add(id);
1259
+ }
1260
+ if (item.items) collectExpanded(item.items, currentPath, isPathActive, result, includeDefaults);
1261
+ }
1262
+ return result;
1263
+ }
1264
+ function NavigationBranch({
1265
+ items,
1266
+ level,
1267
+ expanded,
1268
+ toggle,
1269
+ shell,
1270
+ currentPath,
1271
+ isPathActive,
1272
+ onNavigate,
1273
+ renderLink
1274
+ }) {
1275
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1276
+ "div",
1277
+ {
1278
+ className: (0, import_utils15.cn)("j-app-navigation-list", level > 0 && "j-app-navigation-sublist"),
1279
+ role: level > 0 ? "group" : void 0,
1280
+ children: items.map((navigationItem) => {
1281
+ const {
1282
+ id: providedId,
1283
+ label,
1284
+ icon: Icon2,
1285
+ badge,
1286
+ active,
1287
+ items: nestedItems,
1288
+ defaultExpanded,
1289
+ matchEnd,
1290
+ className,
1291
+ onClick,
1292
+ ...item
1293
+ } = navigationItem;
1294
+ const id = providedId ?? `${item.href ?? "group"}-${label}`;
1295
+ if (nestedItems?.length) {
1296
+ const open = expanded.has(id);
1297
+ const nestedActive = branchIsActive(navigationItem, currentPath, isPathActive);
1298
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1299
+ "div",
1300
+ {
1301
+ className: "j-app-navigation-group",
1302
+ "data-active": nestedActive || void 0,
1303
+ children: [
1304
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1305
+ "button",
1306
+ {
1307
+ type: "button",
1308
+ className: (0, import_utils15.cn)("j-app-navigation-link j-app-navigation-group-trigger", className),
1309
+ "aria-expanded": open,
1310
+ "aria-controls": `${id}-children`,
1311
+ "data-default-expanded": defaultExpanded || void 0,
1312
+ title: shell?.sidebarCollapsed ? label : void 0,
1313
+ onClick: () => toggle(id),
1314
+ children: [
1315
+ Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon2, { "aria-hidden": "true" }) : null,
1316
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: label }),
1317
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "j-app-navigation-badge", children: badge }) : null,
1318
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons9.ChevronDown, { className: "j-app-navigation-chevron", "aria-hidden": "true" })
1319
+ ]
1320
+ }
1321
+ ),
1322
+ open ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { id: `${id}-children`, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1323
+ NavigationBranch,
1324
+ {
1325
+ items: nestedItems,
1326
+ level: level + 1,
1327
+ expanded,
1328
+ toggle,
1329
+ shell,
1330
+ currentPath,
1331
+ isPathActive,
1332
+ onNavigate,
1333
+ renderLink
1334
+ }
1335
+ ) }) : null
1336
+ ]
1337
+ },
1338
+ id
1339
+ );
1340
+ }
1341
+ const resolvedActive = active ?? (currentPath && item.href ? isPathActive ? isPathActive(currentPath, item.href, navigationItem) : matchNavigationPath(currentPath, item.href, matchEnd) : false);
1342
+ const linkClassName = (0, import_utils15.cn)("j-app-navigation-link", className);
1343
+ const children = /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1344
+ Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon2, { "aria-hidden": "true" }) : null,
1345
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: label }),
1346
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "j-app-navigation-badge", children: badge }) : null
1347
+ ] });
1348
+ const handleClick = (event) => {
1349
+ onClick?.(event);
1350
+ onNavigate?.(navigationItem, event);
1351
+ if (!event.defaultPrevented) shell?.setMobileOpen(false);
1352
+ };
1353
+ return renderLink ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react10.Fragment, { children: renderLink({
1354
+ item: navigationItem,
1355
+ active: resolvedActive,
1356
+ className: linkClassName,
1357
+ children,
1358
+ onClick: handleClick
1359
+ }) }, id) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1360
+ "a",
1361
+ {
1362
+ className: linkClassName,
1363
+ "aria-current": resolvedActive ? "page" : void 0,
1364
+ title: shell?.sidebarCollapsed ? label : void 0,
1365
+ onClick: handleClick,
1366
+ ...item,
1367
+ children
1368
+ },
1369
+ id
1370
+ );
1371
+ })
1372
+ }
1373
+ );
1374
+ }
1375
+ function AppNavigation({
1376
+ items,
1377
+ label = "Primary navigation",
1378
+ footer,
1379
+ currentPath,
1380
+ isPathActive,
1381
+ onNavigate,
1382
+ renderLink,
1383
+ className,
1384
+ ...props
1385
+ }) {
1386
+ const shell = (0, import_react10.useContext)(AppShellContext);
1387
+ const [expanded, setExpanded] = (0, import_react10.useState)(() => collectExpanded(items, currentPath, isPathActive));
1388
+ const visibleExpanded = (0, import_react10.useMemo)(
1389
+ () => /* @__PURE__ */ new Set([
1390
+ ...expanded,
1391
+ ...collectExpanded(items, currentPath, isPathActive, /* @__PURE__ */ new Set(), false)
1392
+ ]),
1393
+ [currentPath, expanded, isPathActive, items]
1394
+ );
1395
+ const toggle = (id) => setExpanded((current) => {
1396
+ const next = new Set(current);
1397
+ if (next.has(id)) next.delete(id);
1398
+ else next.add(id);
1399
+ return next;
1400
+ });
1401
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: (0, import_utils15.cn)("j-app-navigation", className), "aria-label": label, ...props, children: [
1402
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1403
+ NavigationBranch,
1404
+ {
1405
+ items,
1406
+ level: 0,
1407
+ expanded: visibleExpanded,
1408
+ toggle,
1409
+ shell,
1410
+ currentPath,
1411
+ isPathActive,
1412
+ onNavigate,
1413
+ renderLink
1414
+ }
1415
+ ),
1416
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "j-app-navigation-footer", children: footer }) : null
1417
+ ] });
1418
+ }
1419
+ function PageHeader({
1420
+ title,
1421
+ description,
1422
+ eyebrow,
1423
+ actions,
1424
+ className,
1425
+ ...props
1426
+ }) {
1427
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: (0, import_utils15.cn)("j-page-header", className), ...props, children: [
1428
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
1429
+ eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "j-page-eyebrow", children: eyebrow }) : null,
1430
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h1", { className: "j-page-title", children: title }),
1431
+ description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "j-page-description", children: description }) : null
1432
+ ] }),
1433
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "j-page-actions", children: actions }) : null
1434
+ ] });
1435
+ }
1436
+
1437
+ // src/components/metric-card.tsx
1438
+ var import_utils16 = require("@jerco/utils");
1439
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1440
+ function MetricCard({
1441
+ label,
1442
+ value,
1443
+ description,
1444
+ trend,
1445
+ status,
1446
+ icon: Icon2,
1447
+ loading = false,
1448
+ className
1449
+ }) {
1450
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Card, { className: (0, import_utils16.cn)("j-metric-card", className), "aria-busy": loading || void 0, children: [
1451
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "j-metric-card-header", children: [
1452
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "j-metric-label", children: label }),
1453
+ Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon2, { className: "j-metric-icon", "aria-hidden": "true" }) : null
1454
+ ] }),
1455
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1456
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { className: "j-metric-skeleton-value" }),
1457
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Skeleton, { className: "j-metric-skeleton-text" }),
1458
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "j-sr-only", children: [
1459
+ "Loading ",
1460
+ label
1461
+ ] })
1462
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1463
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "j-metric-value", children: value }),
1464
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "j-metric-meta", children: [
1465
+ trend ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "j-metric-trend", children: trend }) : null,
1466
+ status ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(StatusIndicator, { status }) : null
1467
+ ] }),
1468
+ description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "j-metric-description", children: description }) : null
1469
+ ] })
1470
+ ] });
1471
+ }
1472
+
1473
+ // src/components/operational-state.tsx
1474
+ var import_icons10 = require("@jerco/icons");
1475
+ var import_utils17 = require("@jerco/utils");
1476
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1477
+ function EmptyState({
1478
+ icon: Icon2 = import_icons10.Info,
1479
+ title,
1480
+ description,
1481
+ action,
1482
+ compact = false,
1483
+ className
1484
+ }) {
1485
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1486
+ "div",
1487
+ {
1488
+ className: (0, import_utils17.cn)("j-operational-state", compact && "j-operational-state--compact", className),
1489
+ children: [
1490
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { className: "j-operational-state-icon", "aria-hidden": "true" }),
1491
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: title }),
1492
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: description }),
1493
+ action ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "j-operational-state-action", children: action }) : null
1494
+ ]
1495
+ }
1496
+ );
1497
+ }
1498
+ function ErrorState({
1499
+ icon: Icon2 = import_icons10.AlertCircle,
1500
+ title,
1501
+ description,
1502
+ action,
1503
+ onRetry,
1504
+ retryLabel = "Try again",
1505
+ compact = false,
1506
+ className
1507
+ }) {
1508
+ const resolvedAction = action ?? (onRetry ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Button, { variant: "outline", onClick: onRetry, children: [
1509
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_icons10.RefreshCw, { "aria-hidden": "true" }),
1510
+ " ",
1511
+ retryLabel
1512
+ ] }) : null);
1513
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1514
+ "div",
1515
+ {
1516
+ className: (0, import_utils17.cn)(
1517
+ "j-operational-state j-operational-state--error",
1518
+ compact && "j-operational-state--compact",
1519
+ className
1520
+ ),
1521
+ role: "alert",
1522
+ children: [
1523
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { className: "j-operational-state-icon", "aria-hidden": "true" }),
1524
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { children: title }),
1525
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { children: description }),
1526
+ resolvedAction ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "j-operational-state-action", children: resolvedAction }) : null
1527
+ ]
1528
+ }
1529
+ );
1530
+ }
1531
+
1532
+ // src/components/radio-group.tsx
1533
+ var import_utils18 = require("@jerco/utils");
1534
+ var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
1535
+ var import_react11 = require("react");
1536
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1537
+ var RadioGroup2 = (0, import_react11.forwardRef)(function RadioGroup3({ className, ...props }, ref) {
1538
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadioGroupPrimitive.Root, { ref, className: (0, import_utils18.cn)("j-radio-group", className), ...props });
1539
+ });
1540
+ var RadioGroupItem = (0, import_react11.forwardRef)(function RadioGroupItem2({ className, ...props }, ref) {
1541
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadioGroupPrimitive.Item, { ref, className: (0, import_utils18.cn)("j-radio", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadioGroupPrimitive.Indicator, { className: "j-radio-indicator" }) });
1542
+ });
1543
+ function RadioField({
1544
+ id,
1545
+ label,
1546
+ description,
1547
+ value
1548
+ }) {
1549
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "j-choice-field", children: [
1550
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(RadioGroupItem, { id, value }),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
1552
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { className: "j-choice-label", htmlFor: id, children: label }),
1553
+ description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "j-choice-description", children: description }) : null
1554
+ ] })
1555
+ ] });
1556
+ }
1557
+
1558
+ // src/components/service-health.tsx
1559
+ var import_icons11 = require("@jerco/icons");
1560
+ var import_utils19 = require("@jerco/utils");
1561
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1562
+ function ServiceHealth({
1563
+ name,
1564
+ status,
1565
+ endpoint,
1566
+ latency,
1567
+ description,
1568
+ meta,
1569
+ className
1570
+ }) {
1571
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", { className: (0, import_utils19.cn)("j-service-health", className), children: [
1572
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "j-service-health-icon", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons11.Activity, { "aria-hidden": "true" }) }),
1573
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "j-service-health-main", children: [
1574
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "j-service-health-title", children: [
1575
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h3", { children: name }),
1576
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StatusIndicator, { status })
1577
+ ] }),
1578
+ endpoint ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("code", { children: endpoint }) : null,
1579
+ description ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { children: description }) : null
1580
+ ] }),
1581
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "j-service-health-meta", children: [
1582
+ latency ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("strong", { children: latency }) : null,
1583
+ meta
1584
+ ] })
1585
+ ] });
1586
+ }
1587
+
1588
+ // src/components/spinner.tsx
1589
+ var import_icons12 = require("@jerco/icons");
1590
+ var import_utils20 = require("@jerco/utils");
1591
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1592
+ function Spinner({ label = "Loading", className }) {
1593
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("span", { className: (0, import_utils20.cn)("j-spinner-wrap", className), role: "status", children: [
1594
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons12.LoaderCircle, { className: "j-spinner", "aria-hidden": "true" }),
1595
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "j-sr-only", children: label })
1596
+ ] });
1597
+ }
1598
+
1599
+ // src/components/switch.tsx
1600
+ var import_utils21 = require("@jerco/utils");
1601
+ var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
1602
+ var import_react12 = require("react");
1603
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1604
+ var Switch = (0, import_react12.forwardRef)(function Switch2({ className, ...props }, ref) {
1605
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SwitchPrimitive.Root, { ref, className: (0, import_utils21.cn)("j-switch", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SwitchPrimitive.Thumb, { className: "j-switch-thumb" }) });
1606
+ });
1607
+ function SwitchField({
1608
+ id,
1609
+ label,
1610
+ description,
1611
+ ...props
1612
+ }) {
1613
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "j-switch-field", children: [
1614
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
1615
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("label", { className: "j-choice-label", htmlFor: id, children: label }),
1616
+ description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "j-choice-description", children: description }) : null
1617
+ ] }),
1618
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Switch, { id, ...props })
1619
+ ] });
1620
+ }
1621
+
1622
+ // src/components/tabs.tsx
1623
+ var import_utils22 = require("@jerco/utils");
1624
+ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
1625
+ var import_react13 = require("react");
1626
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1627
+ var Tabs = TabsPrimitive.Root;
1628
+ var TabsList = (0, import_react13.forwardRef)(function TabsList2({ className, ...props }, ref) {
1629
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TabsPrimitive.List, { ref, className: (0, import_utils22.cn)("j-tabs-list", className), ...props });
1630
+ });
1631
+ var TabsTrigger = (0, import_react13.forwardRef)(function TabsTrigger2({ className, ...props }, ref) {
1632
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TabsPrimitive.Trigger, { ref, className: (0, import_utils22.cn)("j-tabs-trigger", className), ...props });
1633
+ });
1634
+ var TabsContent = (0, import_react13.forwardRef)(function TabsContent2({ className, ...props }, ref) {
1635
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TabsPrimitive.Content, { ref, className: (0, import_utils22.cn)("j-tabs-content", className), ...props });
1636
+ });
1637
+
1638
+ // src/components/toast.tsx
1639
+ var import_icons13 = require("@jerco/icons");
1640
+ var import_utils23 = require("@jerco/utils");
1641
+ var ToastPrimitive = __toESM(require("@radix-ui/react-toast"), 1);
1642
+ var import_react14 = require("react");
1643
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1644
+ var ToastProvider = ToastPrimitive.Provider;
1645
+ var Toast = (0, import_react14.forwardRef)(function Toast2({ className, tone = "neutral", ...props }, ref) {
1646
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1647
+ ToastPrimitive.Root,
1648
+ {
1649
+ ref,
1650
+ className: (0, import_utils23.cn)("j-toast", `j-toast--${tone}`, className),
1651
+ ...props
1652
+ }
1653
+ );
1654
+ });
1655
+ var ToastTitle = (0, import_react14.forwardRef)(function ToastTitle2({ className, ...props }, ref) {
1656
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastPrimitive.Title, { ref, className: (0, import_utils23.cn)("j-toast-title", className), ...props });
1657
+ });
1658
+ var ToastDescription = (0, import_react14.forwardRef)(function ToastDescription2({ className, ...props }, ref) {
1659
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1660
+ ToastPrimitive.Description,
1661
+ {
1662
+ ref,
1663
+ className: (0, import_utils23.cn)("j-toast-description", className),
1664
+ ...props
1665
+ }
1666
+ );
1667
+ });
1668
+ var ToastAction = ToastPrimitive.Action;
1669
+ var ToastClose = (0, import_react14.forwardRef)(function ToastClose2({ className, children, ...props }, ref) {
1670
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1671
+ ToastPrimitive.Close,
1672
+ {
1673
+ ref,
1674
+ className: (0, import_utils23.cn)("j-toast-close", className),
1675
+ "aria-label": "Dismiss notification",
1676
+ ...props,
1677
+ children: children ?? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons13.X, { "aria-hidden": "true" })
1678
+ }
1679
+ );
1680
+ });
1681
+ var ToastViewport = (0, import_react14.forwardRef)(function ToastViewport2({ className, ...props }, ref) {
1682
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToastPrimitive.Viewport, { ref, className: (0, import_utils23.cn)("j-toast-viewport", className), ...props });
1683
+ });
1684
+
1685
+ // src/components/tooltip.tsx
1686
+ var import_utils24 = require("@jerco/utils");
1687
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
1688
+ var import_react15 = require("react");
1689
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1690
+ var TooltipProvider = TooltipPrimitive.Provider;
1691
+ var Tooltip = TooltipPrimitive.Root;
1692
+ var TooltipTrigger = TooltipPrimitive.Trigger;
1693
+ var TooltipContent = (0, import_react15.forwardRef)(function TooltipContent2({ className, sideOffset = 6, ...props }, ref) {
1694
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1695
+ TooltipPrimitive.Content,
1696
+ {
1697
+ ref,
1698
+ className: (0, import_utils24.cn)("j-tooltip", className),
1699
+ sideOffset,
1700
+ ...props
1701
+ }
1702
+ ) });
1703
+ });
1704
+ function SimpleTooltip({ content, children }) {
1705
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
1706
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipTrigger, { asChild: true, children }),
1707
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipContent, { children: content })
1708
+ ] }) });
1709
+ }
1710
+ // Annotate the CommonJS export names for ESM import in node:
1711
+ 0 && (module.exports = {
1712
+ AlertDialog,
1713
+ AlertDialogAction,
1714
+ AlertDialogCancel,
1715
+ AlertDialogContent,
1716
+ AlertDialogDescription,
1717
+ AlertDialogFooter,
1718
+ AlertDialogHeader,
1719
+ AlertDialogTitle,
1720
+ AlertDialogTrigger,
1721
+ AppNavigation,
1722
+ AppShell,
1723
+ AppShellCollapseButton,
1724
+ AppShellMenuButton,
1725
+ Badge,
1726
+ BrandLogo,
1727
+ Button,
1728
+ Card,
1729
+ CardContent,
1730
+ CardDescription,
1731
+ CardFooter,
1732
+ CardHeader,
1733
+ CardTitle,
1734
+ Checkbox,
1735
+ CheckboxField,
1736
+ DataTable,
1737
+ DesignSystemProvider,
1738
+ DeviceCard,
1739
+ Dialog,
1740
+ DialogClose,
1741
+ DialogContent,
1742
+ DialogDescription,
1743
+ DialogFooter,
1744
+ DialogHeader,
1745
+ DialogTitle,
1746
+ DialogTrigger,
1747
+ DropdownMenu,
1748
+ DropdownMenuCheckboxItem,
1749
+ DropdownMenuContent,
1750
+ DropdownMenuGroup,
1751
+ DropdownMenuItem,
1752
+ DropdownMenuLabel,
1753
+ DropdownMenuPortal,
1754
+ DropdownMenuRadioGroup,
1755
+ DropdownMenuRadioItem,
1756
+ DropdownMenuSeparator,
1757
+ DropdownMenuSub,
1758
+ DropdownMenuSubContent,
1759
+ DropdownMenuSubTrigger,
1760
+ DropdownMenuTrigger,
1761
+ EmptyState,
1762
+ ErrorState,
1763
+ Header,
1764
+ IconButton,
1765
+ Input,
1766
+ Label,
1767
+ MainContent,
1768
+ MetricCard,
1769
+ NativeSelect,
1770
+ PageHeader,
1771
+ RadioField,
1772
+ RadioGroup,
1773
+ RadioGroupItem,
1774
+ Select,
1775
+ SelectGroup,
1776
+ SelectLabel,
1777
+ SelectValue,
1778
+ Separator,
1779
+ ServiceHealth,
1780
+ Sidebar,
1781
+ SimpleTooltip,
1782
+ Skeleton,
1783
+ Spinner,
1784
+ StatusIndicator,
1785
+ Switch,
1786
+ SwitchField,
1787
+ Tabs,
1788
+ TabsContent,
1789
+ TabsList,
1790
+ TabsTrigger,
1791
+ Textarea,
1792
+ Toast,
1793
+ ToastAction,
1794
+ ToastClose,
1795
+ ToastDescription,
1796
+ ToastProvider,
1797
+ ToastTitle,
1798
+ ToastViewport,
1799
+ Tooltip,
1800
+ TooltipContent,
1801
+ TooltipProvider,
1802
+ TooltipTrigger,
1803
+ buttonVariants,
1804
+ createBrowserBooleanStateAdapter,
1805
+ createBrowserDataTableUrlStateAdapter,
1806
+ createDataTableRequestManager,
1807
+ createDataTableUrlStateAdapter,
1808
+ matchNavigationPath,
1809
+ parseDataTableUrlState,
1810
+ serializeDataTableUrlState,
1811
+ useDesignSystem
1812
+ });