@oods/components-react 0.3.3 → 0.4.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 CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var React7 = require('react');
3
+ var React8 = require('react');
4
4
  var reactSlot = require('@radix-ui/react-slot');
5
- var jsxRuntime = require('react/jsx-runtime');
6
5
  var componentContracts = require('@oods/component-contracts');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
7
 
8
8
  function _interopNamespace(e) {
9
9
  if (e && e.__esModule) return e;
@@ -23,342 +23,25 @@ function _interopNamespace(e) {
23
23
  return Object.freeze(n);
24
24
  }
25
25
 
26
- var React7__namespace = /*#__PURE__*/_interopNamespace(React7);
26
+ var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
27
27
 
28
28
  // src/presentational.tsx
29
-
30
- // src/status-map.json
31
- var status_map_default = {
32
- domains: {
33
- subscription: {
34
- future: {
35
- description: "Subscription is scheduled but not yet active.",
36
- chip: {
37
- foreground: "color.text.info",
38
- background: "color.background.info.subtle",
39
- border: "color.border.info",
40
- icon: "icon.status.scheduled"
41
- },
42
- banner: {
43
- foreground: "color.text.info",
44
- background: "color.background.surface.default",
45
- border: "color.border.info",
46
- icon: "icon.status.scheduled"
47
- }
48
- },
49
- trialing: {
50
- description: "Subscription is in a trial period before billing begins.",
51
- chip: {
52
- foreground: "color.text.accent",
53
- background: "color.background.accent.subtle",
54
- border: "color.border.accent",
55
- icon: "icon.status.trial"
56
- },
57
- banner: {
58
- foreground: "color.text.accent",
59
- background: "color.background.surface.default",
60
- border: "color.border.accent",
61
- icon: "icon.status.trial"
62
- }
63
- },
64
- active: {
65
- description: "Subscription is paid and service is provisioned.",
66
- chip: {
67
- foreground: "color.text.positive",
68
- background: "color.background.positive.subtle",
69
- border: "color.border.positive",
70
- icon: "icon.status.success"
71
- },
72
- banner: {
73
- foreground: "color.text.positive",
74
- background: "color.background.surface.default",
75
- border: "color.border.positive",
76
- icon: "icon.status.success"
77
- }
78
- },
79
- paused: {
80
- description: "Billing paused temporarily by finance or customer request.",
81
- chip: {
82
- foreground: "color.text.neutral",
83
- background: "color.background.neutral.subtle",
84
- border: "color.border.neutral",
85
- icon: "icon.status.paused"
86
- },
87
- banner: {
88
- foreground: "color.text.neutral",
89
- background: "color.background.surface.muted",
90
- border: "color.border.neutral",
91
- icon: "icon.status.paused"
92
- }
93
- },
94
- pending_cancellation: {
95
- description: "Subscription will cancel at period end but remains active now.",
96
- chip: {
97
- foreground: "color.text.info",
98
- background: "color.background.info.subtle",
99
- border: "color.border.info",
100
- icon: "icon.status.pending"
101
- },
102
- banner: {
103
- foreground: "color.text.info",
104
- background: "color.background.surface.default",
105
- border: "color.border.info",
106
- icon: "icon.status.pending"
107
- }
108
- },
109
- past_due: {
110
- description: "Renewal payment failed; smart retries ongoing and access retained during the grace window.",
111
- chip: {
112
- foreground: "color.text.danger",
113
- background: "color.background.danger.subtle",
114
- border: "color.border.danger",
115
- icon: "icon.status.warning"
116
- },
117
- banner: {
118
- foreground: "color.text.onbold",
119
- background: "color.background.danger.bold",
120
- border: "color.border.danger",
121
- icon: "icon.status.warning"
122
- }
123
- },
124
- unpaid: {
125
- description: "Payment retries exhausted; service access revoked.",
126
- chip: {
127
- foreground: "color.text.danger",
128
- background: "color.background.danger.subtle",
129
- border: "color.border.danger",
130
- icon: "icon.status.error"
131
- },
132
- banner: {
133
- foreground: "color.text.onbold",
134
- background: "color.background.danger.bold",
135
- border: "color.border.danger",
136
- icon: "icon.status.error"
137
- }
138
- },
139
- terminated: {
140
- description: "Subscription ended; service access revoked and billing stopped.",
141
- chip: {
142
- foreground: "color.text.disabled",
143
- background: "color.background.disabled",
144
- border: "color.border.disabled",
145
- icon: "icon.status.canceled"
146
- },
147
- banner: {
148
- foreground: "color.text.neutral",
149
- background: "color.background.neutral.subtle",
150
- border: "color.border.neutral",
151
- icon: "icon.status.canceled"
152
- }
153
- }
154
- },
155
- invoice: {
156
- draft: {
157
- description: "Invoice is editable and not yet finalized.",
158
- chip: {
159
- foreground: "color.text.neutral",
160
- background: "color.background.neutral.subtle",
161
- border: "color.border.neutral",
162
- icon: "icon.status.draft"
163
- },
164
- banner: {
165
- foreground: "color.text.neutral",
166
- background: "color.background.surface.muted",
167
- border: "color.border.neutral",
168
- icon: "icon.status.draft"
169
- }
170
- },
171
- posted: {
172
- description: "Invoice finalized with terms before collection.",
173
- chip: {
174
- foreground: "color.text.info",
175
- background: "color.background.info.subtle",
176
- border: "color.border.info",
177
- icon: "icon.status.pending"
178
- },
179
- banner: {
180
- foreground: "color.text.info",
181
- background: "color.background.surface.default",
182
- border: "color.border.info",
183
- icon: "icon.status.pending"
184
- }
185
- },
186
- paid: {
187
- description: "Invoice collected successfully in full.",
188
- chip: {
189
- foreground: "color.text.positive",
190
- background: "color.background.positive.subtle",
191
- border: "color.border.positive",
192
- icon: "icon.status.success"
193
- },
194
- banner: {
195
- foreground: "color.text.positive",
196
- background: "color.background.surface.default",
197
- border: "color.border.positive",
198
- icon: "icon.status.success"
199
- }
200
- },
201
- past_due: {
202
- description: "Invoice is unpaid past its due date.",
203
- chip: {
204
- foreground: "color.text.danger",
205
- background: "color.background.danger.subtle",
206
- border: "color.border.danger",
207
- icon: "icon.status.error"
208
- },
209
- banner: {
210
- foreground: "color.text.onbold",
211
- background: "color.background.danger.bold",
212
- border: "color.border.danger",
213
- icon: "icon.status.error"
214
- }
215
- },
216
- void: {
217
- description: "Invoice canceled and no longer payable.",
218
- chip: {
219
- foreground: "color.text.disabled",
220
- background: "color.background.disabled",
221
- border: "color.border.disabled",
222
- icon: "icon.status.void"
223
- },
224
- banner: {
225
- foreground: "color.text.neutral",
226
- background: "color.background.neutral.subtle",
227
- border: "color.border.neutral",
228
- icon: "icon.status.void"
229
- }
230
- }
231
- }
232
- }
233
- };
234
-
235
- // src/status.ts
236
- var TONE_ALIASES = {
237
- info: "info",
238
- informational: "info",
239
- accent: "accent",
240
- highlight: "accent",
241
- positive: "success",
242
- success: "success",
243
- ok: "success",
244
- warning: "warning",
245
- caution: "warning",
246
- danger: "critical",
247
- critical: "critical",
248
- error: "critical",
249
- negative: "critical",
250
- neutral: "neutral",
251
- pending: "info"
252
- };
253
- var toLabel = (status) => status.split(/[_-]/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
254
- var inferTone = (entry) => {
255
- if (!entry) return "neutral";
256
- for (const reference of [entry.foreground, entry.background, entry.border]) {
257
- const segments = reference.replace(/^\{|\}$/g, "").split(/[\s./_-]+/).reverse();
258
- for (const segment of segments) {
259
- const tone = TONE_ALIASES[segment.toLowerCase()];
260
- if (tone) return tone;
261
- }
262
- }
263
- return "neutral";
29
+ var REACT_NAMES = {
30
+ viewBox: "viewBox",
31
+ fill: "fill",
32
+ stroke: "stroke",
33
+ "stroke-width": "strokeWidth",
34
+ "stroke-linecap": "strokeLinecap",
35
+ "stroke-linejoin": "strokeLinejoin",
36
+ "aria-hidden": "aria-hidden",
37
+ focusable: "focusable"
264
38
  };
265
- var componentTokenSet = (tone) => {
266
- const normalized = tone === "positive" ? "success" : tone === "danger" ? "critical" : tone;
267
- return {
268
- background: `var(--sys-status-${normalized}-surface)`,
269
- border: `var(--sys-status-${normalized}-border)`,
270
- foreground: `var(--sys-status-${normalized}-text)`
271
- };
272
- };
273
- var rawTokenSet = (entry) => {
274
- const tone = inferTone(entry);
275
- return componentTokenSet(tone);
276
- };
277
- var bannerFallback = (tone) => tone === "neutral" ? {
278
- background: "var(--cmp-banner-background)",
279
- border: "var(--cmp-banner-border)",
280
- foreground: "var(--cmp-banner-text)"
281
- } : componentTokenSet(tone);
282
- var fallback = (domain, status, tone = "neutral") => ({
283
- domain,
284
- status,
285
- label: toLabel(status || "Unknown"),
286
- description: "Status not found in registry; falling back to the requested token set.",
287
- tone,
288
- badge: { subtle: componentTokenSet(tone), solid: componentTokenSet(tone) },
289
- banner: { subtle: bannerFallback(tone), solid: componentTokenSet(tone) }
290
- });
291
- var registry = /* @__PURE__ */ new Map();
292
- for (const [domain, entries] of Object.entries(status_map_default.domains)) {
293
- const domainEntries = /* @__PURE__ */ new Map();
294
- for (const [status, entry] of Object.entries(entries)) {
295
- const tone = inferTone(entry.chip);
296
- domainEntries.set(status.toLowerCase(), {
297
- domain,
298
- status,
299
- label: toLabel(status),
300
- description: entry.description,
301
- tone,
302
- iconName: entry.chip.icon ?? entry.banner?.icon,
303
- badge: { subtle: rawTokenSet(entry.chip), solid: componentTokenSet(tone) },
304
- banner: {
305
- subtle: entry.banner ? rawTokenSet(entry.banner) : bannerFallback(tone),
306
- solid: componentTokenSet(tone)
307
- }
308
- });
309
- }
310
- registry.set(domain, domainEntries);
311
- }
312
- var LEGACY_STATUS_ALIASES = {
313
- subscription: { delinquent: "unpaid" }
314
- };
315
- Object.freeze([...registry.keys()]);
316
- function getStatusPresentation(domain, status) {
317
- const entries = registry.get(domain);
318
- if (!entries) return fallback(domain, status);
319
- const normalized = status.toLowerCase();
320
- const direct = entries.get(normalized);
321
- if (direct) return direct;
322
- const alias = LEGACY_STATUS_ALIASES[domain]?.[normalized];
323
- const aliased = alias ? entries.get(alias) : void 0;
324
- return aliased ? { ...aliased, status, label: toLabel(status) } : fallback(domain, status);
325
- }
326
- function getToneTokenSet(tone) {
327
- return componentTokenSet(tone);
328
- }
329
- function getBannerToneTokenSet(tone) {
330
- return bannerFallback(tone);
331
- }
332
- var ICON_GLYPHS = {
333
- success: "\u2714\uFE0E",
334
- warning: "\u26A0\uFE0E",
335
- critical: "\u2A2F",
336
- danger: "\u2A2F",
337
- error: "\u2A2F",
338
- negative: "\u2A2F",
339
- pending: "\u2026",
340
- processing: "\u27F3",
341
- paused: "\u23F8",
342
- canceled: "\u2205",
343
- cancelled: "\u2205",
344
- draft: "\u270E",
345
- void: "\u2205",
346
- paid: "\u2714\uFE0E",
347
- info: "\u2139\uFE0E",
348
- trial: "\u2605",
349
- future: "\u23F2",
350
- scheduled: "\u23F2",
351
- refunded: "\u21BA",
352
- locked: "\u{1F512}",
353
- unlocked: "\u{1F513}",
354
- default: "\u2022"
355
- };
356
- function resolveStatusGlyph(iconName) {
357
- const segment = iconName?.split(".").pop()?.toLowerCase();
358
- return segment ? ICON_GLYPHS[segment] ?? ICON_GLYPHS.default : void 0;
39
+ var svgProps = Object.fromEntries(Object.entries(componentContracts.STATUS_ICON_SVG_ATTRS).map(([name, value]) => [REACT_NAMES[name] ?? name, value]));
40
+ function StatusIcon({ name }) {
41
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { ...svgProps, children: componentContracts.STATUS_ICON_SHAPES[name].map((shape, index) => React8__namespace.createElement(shape.tag, { key: index, ...shape.attrs })) });
359
42
  }
360
43
  var classes = (...values) => values.filter(Boolean).join(" ");
361
- var Badge = React7__namespace.forwardRef(
44
+ var Badge = React8__namespace.forwardRef(
362
45
  ({
363
46
  content,
364
47
  status,
@@ -375,11 +58,12 @@ var Badge = React7__namespace.forwardRef(
375
58
  "aria-label": ariaLabel,
376
59
  ...rest
377
60
  }, ref) => {
378
- const presentation = status ? getStatusPresentation(domain, status) : void 0;
61
+ const presentation = status ? componentContracts.getStatusPresentation(domain, status) : void 0;
379
62
  const tone = toneOverride ?? presentation?.tone ?? "neutral";
380
- const tokenSet = toneOverride !== void 0 ? getToneTokenSet(tone) : emphasis === "solid" ? presentation?.badge.solid ?? getToneTokenSet(tone) : presentation?.badge.subtle ?? getToneTokenSet(tone);
63
+ const tokenSet = toneOverride !== void 0 ? componentContracts.getToneTokenSet(tone) : emphasis === "solid" ? presentation?.badge.solid ?? componentContracts.getToneTokenSet(tone) : presentation?.badge.subtle ?? componentContracts.getToneTokenSet(tone);
381
64
  const resolvedContent = children ?? content ?? presentation?.label ?? status;
382
- const resolvedIcon = icon ?? resolveStatusGlyph(presentation?.iconName);
65
+ const statusIcon = componentContracts.resolveStatusIcon(presentation?.iconName);
66
+ const resolvedIcon = icon ?? (statusIcon ? /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { name: statusIcon }) : void 0);
383
67
  const resolvedShowIcon = showIcon ?? resolvedIcon !== void 0;
384
68
  const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
385
69
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -411,7 +95,7 @@ var Badge = React7__namespace.forwardRef(
411
95
  }
412
96
  );
413
97
  Badge.displayName = "OODS.Badge";
414
- var Banner = React7__namespace.forwardRef(
98
+ var Banner = React8__namespace.forwardRef(
415
99
  ({
416
100
  title,
417
101
  detail,
@@ -431,13 +115,14 @@ var Banner = React7__namespace.forwardRef(
431
115
  style,
432
116
  ...rest
433
117
  }, ref) => {
434
- const presentation = status ? getStatusPresentation(domain, status) : void 0;
118
+ const presentation = status ? componentContracts.getStatusPresentation(domain, status) : void 0;
435
119
  const tone = toneOverride ?? presentation?.tone ?? "neutral";
436
- const tokenSet = emphasis === "solid" ? presentation?.banner.solid ?? getToneTokenSet(tone) : presentation?.banner.subtle ?? getBannerToneTokenSet(tone);
120
+ const tokenSet = emphasis === "solid" ? presentation?.banner.solid ?? componentContracts.getToneTokenSet(tone) : presentation?.banner.subtle ?? componentContracts.getBannerToneTokenSet(tone);
437
121
  const heading = title ?? presentation?.label ?? status;
438
122
  const body = detail ?? description ?? children ?? content ?? presentation?.description;
439
123
  const role = tone === "critical" || tone === "danger" ? "alert" : "status";
440
- const resolvedIcon = icon ?? resolveStatusGlyph(presentation?.iconName);
124
+ const statusIcon = componentContracts.resolveStatusIcon(presentation?.iconName);
125
+ const resolvedIcon = icon ?? (statusIcon ? /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { name: statusIcon }) : void 0);
441
126
  const resolvedShowIcon = showIcon ?? resolvedIcon !== void 0;
442
127
  return /* @__PURE__ */ jsxRuntime.jsxs(
443
128
  "div",
@@ -472,7 +157,7 @@ var Banner = React7__namespace.forwardRef(
472
157
  className: "oods-banner-dismiss oods-banner__dismiss",
473
158
  "aria-label": dismissLabel,
474
159
  onClick: () => onDismiss(),
475
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xD7" })
160
+ children: /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { name: "x" })
476
161
  }
477
162
  ) : null
478
163
  ]
@@ -481,7 +166,7 @@ var Banner = React7__namespace.forwardRef(
481
166
  }
482
167
  );
483
168
  Banner.displayName = "OODS.Banner";
484
- var Button = React7__namespace.forwardRef(
169
+ var Button = React8__namespace.forwardRef(
485
170
  ({
486
171
  asChild = false,
487
172
  content,
@@ -527,7 +212,85 @@ var Button = React7__namespace.forwardRef(
527
212
  }
528
213
  );
529
214
  Button.displayName = "OODS.Button";
530
- var Card = React7__namespace.forwardRef(
215
+ var noSubscription = () => () => void 0;
216
+ var useIsomorphicLayoutEffect = typeof window === "undefined" ? React8__namespace.useEffect : React8__namespace.useLayoutEffect;
217
+ var canShowModal = () => typeof HTMLDialogElement !== "undefined" && typeof HTMLDialogElement.prototype.showModal === "function";
218
+ var hasContent = (node) => node !== void 0 && node !== null && node !== false && node !== "";
219
+ var Dialog = React8__namespace.forwardRef(
220
+ ({
221
+ id,
222
+ open = false,
223
+ modal = true,
224
+ title,
225
+ description,
226
+ dismissLabel = "Close",
227
+ size = "md",
228
+ actions,
229
+ children,
230
+ className,
231
+ onClose,
232
+ onKeyDown,
233
+ ...rest
234
+ }, ref) => {
235
+ const generatedId = React8__namespace.useId().replace(/[^\w-]/g, "");
236
+ const dialogId = id ?? `oods-dialog-${generatedId}`;
237
+ const element = React8__namespace.useRef(null);
238
+ const openRef = React8__namespace.useRef(open);
239
+ const serverMarkup = React8__namespace.useSyncExternalStore(noSubscription, () => false, () => true);
240
+ const managed = modal && !serverMarkup && canShowModal();
241
+ const setRef = React8__namespace.useCallback((node) => {
242
+ element.current = node;
243
+ if (typeof ref === "function") ref(node);
244
+ else if (ref) ref.current = node;
245
+ }, [ref]);
246
+ useIsomorphicLayoutEffect(() => {
247
+ openRef.current = open;
248
+ const dialog = element.current;
249
+ if (!dialog || !managed) return;
250
+ if (open && !dialog.open) dialog.showModal();
251
+ else if (!open && dialog.open) dialog.close();
252
+ }, [open, managed]);
253
+ const requestClose = (event) => {
254
+ event.preventDefault();
255
+ onClose?.();
256
+ };
257
+ return /* @__PURE__ */ jsxRuntime.jsxs(
258
+ "dialog",
259
+ {
260
+ ref: setRef,
261
+ id: dialogId,
262
+ className: classes("oods-dialog", className),
263
+ "data-oods-component": "Dialog",
264
+ "data-size": size,
265
+ "aria-labelledby": `${dialogId}-title`,
266
+ "aria-describedby": hasContent(description) ? `${dialogId}-description` : void 0,
267
+ open: managed ? void 0 : open,
268
+ onKeyDown: (event) => {
269
+ onKeyDown?.(event);
270
+ if (event.key === "Escape" && !event.defaultPrevented) requestClose(event);
271
+ },
272
+ onCancel: requestClose,
273
+ onClose: () => {
274
+ if (openRef.current && !element.current?.open) onClose?.();
275
+ },
276
+ ...rest,
277
+ children: [
278
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-dialog__header", children: [
279
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-dialog__heading", children: [
280
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { id: `${dialogId}-title`, className: "oods-dialog__title", children: title }),
281
+ hasContent(description) ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${dialogId}-description`, className: "oods-dialog__description", children: description }) : null
282
+ ] }),
283
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "oods-dialog__close", "aria-label": dismissLabel, onClick: () => onClose?.(), children: /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { name: "x" }) })
284
+ ] }),
285
+ hasContent(children) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-dialog__body", children }) : null,
286
+ hasContent(actions) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-dialog__footer", children: actions }) : null
287
+ ]
288
+ }
289
+ );
290
+ }
291
+ );
292
+ Dialog.displayName = "OODS.Dialog";
293
+ var Card = React8__namespace.forwardRef(
531
294
  ({ as = "div", elevated = false, className, ...rest }, ref) => {
532
295
  const Element = as;
533
296
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -543,7 +306,7 @@ var Card = React7__namespace.forwardRef(
543
306
  }
544
307
  );
545
308
  Card.displayName = "OODS.Card";
546
- var Text = React7__namespace.forwardRef(
309
+ var Text = React8__namespace.forwardRef(
547
310
  ({
548
311
  as = "span",
549
312
  content,
@@ -598,7 +361,7 @@ var FieldFrame = ({
598
361
  }) => {
599
362
  const resolvedHelp = help ?? description;
600
363
  const validationTone = validation?.state === "error" ? "critical" : validation?.state === "warning" ? "warning" : validation?.state;
601
- const validationTokens = validationTone ? getToneTokenSet(validationTone) : void 0;
364
+ const validationTokens = validationTone ? componentContracts.getToneTokenSet(validationTone) : void 0;
602
365
  const validationStyle = validationTokens ? {
603
366
  "--cmp-input-message-border": validationTokens.border,
604
367
  "--cmp-input-message-text": validationTokens.foreground,
@@ -652,7 +415,7 @@ var FieldFrame = ({
652
415
  }
653
416
  );
654
417
  };
655
- var InputPrimitive = React7__namespace.forwardRef(
418
+ var InputPrimitive = React8__namespace.forwardRef(
656
419
  ({
657
420
  id,
658
421
  label,
@@ -722,7 +485,7 @@ var InputPrimitive = React7__namespace.forwardRef(
722
485
  );
723
486
  InputPrimitive.displayName = "OODS.Input";
724
487
  var Input = InputPrimitive;
725
- var DatePicker = React7__namespace.forwardRef(
488
+ var DatePicker = React8__namespace.forwardRef(
726
489
  ({ pickerClassName, pickerStyle, inputClassName, inputStyle, className, style, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes2("oods-date-picker", className), style, "data-oods-component": "DatePicker", children: /* @__PURE__ */ jsxRuntime.jsx(
727
490
  Input,
728
491
  {
@@ -735,7 +498,7 @@ var DatePicker = React7__namespace.forwardRef(
735
498
  ) })
736
499
  );
737
500
  DatePicker.displayName = "OODS.DatePicker";
738
- var Checkbox = React7__namespace.forwardRef(
501
+ var Checkbox = React8__namespace.forwardRef(
739
502
  ({
740
503
  id,
741
504
  label,
@@ -798,7 +561,85 @@ var Checkbox = React7__namespace.forwardRef(
798
561
  }
799
562
  );
800
563
  Checkbox.displayName = "OODS.Checkbox";
801
- var Select = React7__namespace.forwardRef(
564
+ var Switch = React8__namespace.forwardRef(
565
+ ({
566
+ id,
567
+ label,
568
+ checked,
569
+ defaultChecked = false,
570
+ required,
571
+ help,
572
+ validation,
573
+ size = "md",
574
+ className,
575
+ style,
576
+ onClick,
577
+ onCheckedChange,
578
+ onUpdate,
579
+ "aria-describedby": nativeDescription,
580
+ ...rest
581
+ }, ref) => {
582
+ const [internalChecked, setInternalChecked] = React8__namespace.useState(defaultChecked);
583
+ const on = checked ?? internalChecked;
584
+ const validationId = validation?.id ?? `${id}-validation`;
585
+ const describedBy = [nativeDescription, help ? `${id}-help` : void 0, validation?.message ? validationId : void 0].filter(Boolean).join(" ") || void 0;
586
+ const tone = validation ? validation.state === "error" ? "critical" : validation.state : void 0;
587
+ const handleClick = (event) => {
588
+ onClick?.(event);
589
+ if (event.defaultPrevented) return;
590
+ const next = !on;
591
+ if (checked === void 0) setInternalChecked(next);
592
+ onCheckedChange?.(next);
593
+ onUpdate?.(next);
594
+ };
595
+ return /* @__PURE__ */ jsxRuntime.jsxs(
596
+ "div",
597
+ {
598
+ className: classes2("oods-field", "oods-switch", className),
599
+ style: {
600
+ ...tone ? {
601
+ "--cmp-input-message-border": `var(--sys-status-${tone}-border)`,
602
+ "--cmp-input-message-text": `var(--sys-status-${tone}-text)`
603
+ } : {},
604
+ ...style
605
+ },
606
+ "data-oods-component": "Switch",
607
+ "data-size": size,
608
+ "data-validation-state": validation?.state,
609
+ children: [
610
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-switch__row", children: [
611
+ /* @__PURE__ */ jsxRuntime.jsx(
612
+ "button",
613
+ {
614
+ ref,
615
+ id,
616
+ type: "button",
617
+ role: "switch",
618
+ className: "oods-switch__control",
619
+ "aria-checked": on,
620
+ "aria-labelledby": `${id}-label`,
621
+ "aria-describedby": describedBy,
622
+ "aria-required": required || void 0,
623
+ "aria-invalid": validation?.state === "error" || void 0,
624
+ onClick: handleClick,
625
+ ...rest,
626
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-switch__thumb", "aria-hidden": "true" })
627
+ }
628
+ ),
629
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { id: `${id}-label`, className: "oods-field-label oods-switch__label", htmlFor: id, children: [
630
+ label,
631
+ required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-field-required", "aria-hidden": "true", children: "*" }) : null
632
+ ] })
633
+ ] }),
634
+ help ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-help`, className: "oods-field-help", children: help }) : null,
635
+ validation?.message ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: validationId, className: "oods-field-error", role: validation.state === "error" ? "alert" : void 0, children: validation.message }) : null
636
+ ]
637
+ }
638
+ );
639
+ }
640
+ );
641
+ Switch.displayName = "OODS.Switch";
642
+ var Select = React8__namespace.forwardRef(
802
643
  ({
803
644
  id,
804
645
  label,
@@ -866,7 +707,7 @@ var Select = React7__namespace.forwardRef(
866
707
  }
867
708
  );
868
709
  Select.displayName = "OODS.Select";
869
- var Textarea = React7__namespace.forwardRef(
710
+ var Textarea = React8__namespace.forwardRef(
870
711
  ({
871
712
  id,
872
713
  label,
@@ -949,7 +790,7 @@ var maxColumns = (columns) => {
949
790
  const count = Number(columns);
950
791
  return Number.isFinite(count) && count > 0 ? count : void 0;
951
792
  };
952
- var Grid = React7__namespace.forwardRef(
793
+ var Grid = React8__namespace.forwardRef(
953
794
  ({
954
795
  columns = "auto-fit",
955
796
  minColumnWidth = "16rem",
@@ -979,7 +820,7 @@ var Grid = React7__namespace.forwardRef(
979
820
  )
980
821
  );
981
822
  Grid.displayName = "OODS.Grid";
982
- var Stack = React7__namespace.forwardRef(
823
+ var Stack = React8__namespace.forwardRef(
983
824
  ({
984
825
  direction = "column",
985
826
  gap = "md",
@@ -1011,19 +852,19 @@ var Stack = React7__namespace.forwardRef(
1011
852
  );
1012
853
  Stack.displayName = "OODS.Stack";
1013
854
  var classes4 = (...values) => values.filter(Boolean).join(" ");
1014
- var TableHead = React7__namespace.forwardRef(
855
+ var TableHead = React8__namespace.forwardRef(
1015
856
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: classes4("oods-table__header", className), ...rest })
1016
857
  );
1017
858
  TableHead.displayName = "OODS.Table.Head";
1018
- var TableBody = React7__namespace.forwardRef(
859
+ var TableBody = React8__namespace.forwardRef(
1019
860
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: classes4("oods-table__body", className), ...rest })
1020
861
  );
1021
862
  TableBody.displayName = "OODS.Table.Body";
1022
- var TableCaption = React7__namespace.forwardRef(
863
+ var TableCaption = React8__namespace.forwardRef(
1023
864
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx("caption", { ref, className: classes4("oods-table__caption", className), ...rest })
1024
865
  );
1025
866
  TableCaption.displayName = "OODS.Table.Caption";
1026
- var TableRow = React7__namespace.forwardRef(
867
+ var TableRow = React8__namespace.forwardRef(
1027
868
  ({
1028
869
  selectable = false,
1029
870
  selected = false,
@@ -1062,7 +903,7 @@ var TableRow = React7__namespace.forwardRef(
1062
903
  }
1063
904
  );
1064
905
  TableRow.displayName = "OODS.Table.Row";
1065
- var TableHeaderCell = React7__namespace.forwardRef(
906
+ var TableHeaderCell = React8__namespace.forwardRef(
1066
907
  ({ numeric = false, className, scope = "col", ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1067
908
  "th",
1068
909
  {
@@ -1079,7 +920,7 @@ var TableHeaderCell = React7__namespace.forwardRef(
1079
920
  )
1080
921
  );
1081
922
  TableHeaderCell.displayName = "OODS.Table.HeaderCell";
1082
- var TableCell = React7__namespace.forwardRef(
923
+ var TableCell = React8__namespace.forwardRef(
1083
924
  ({
1084
925
  numeric = false,
1085
926
  status,
@@ -1092,9 +933,9 @@ var TableCell = React7__namespace.forwardRef(
1092
933
  title,
1093
934
  ...rest
1094
935
  }, ref) => {
1095
- const presentation = status ? getStatusPresentation(statusDomain, status) : void 0;
936
+ const presentation = status ? componentContracts.getStatusPresentation(statusDomain, status) : void 0;
1096
937
  const tone = toneOverride ?? presentation?.tone;
1097
- const tokens = tone ? getToneTokenSet(tone) : void 0;
938
+ const tokens = tone ? componentContracts.getToneTokenSet(tone) : void 0;
1098
939
  const statusStyle = tokens ? statusEmphasis === "text" ? { "--table-cell-status-foreground": tokens.foreground } : {
1099
940
  "--table-cell-status-background": tokens.background,
1100
941
  "--table-cell-status-border": tokens.border,
@@ -1125,9 +966,10 @@ var TableCell = React7__namespace.forwardRef(
1125
966
  }
1126
967
  );
1127
968
  TableCell.displayName = "OODS.Table.Cell";
1128
- var TableRoot = React7__namespace.forwardRef(
969
+ var TableRoot = React8__namespace.forwardRef(
1129
970
  ({
1130
971
  caption,
972
+ showCaption = true,
1131
973
  columns,
1132
974
  rows,
1133
975
  density = "comfortable",
@@ -1153,7 +995,7 @@ var TableRoot = React7__namespace.forwardRef(
1153
995
  "data-density": density,
1154
996
  ...rest,
1155
997
  children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1156
- caption ? /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { children: caption }) : null,
998
+ caption ? /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { "data-visually-hidden": showCaption ? void 0 : "true", children: caption }) : null,
1157
999
  /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "oods-table__row", children: columns?.map((column) => /* @__PURE__ */ jsxRuntime.jsx(TableHeaderCell, { numeric: column.numeric, children: column.label }, column.key)) }) }),
1158
1000
  /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: (rows?.length ?? 0) === 0 ? /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "oods-table__row", children: /* @__PURE__ */ jsxRuntime.jsx(TableCell, { colSpan: Math.max(columns?.length ?? 0, 1), children: "No rows available." }) }) : rows?.map((row) => /* @__PURE__ */ jsxRuntime.jsx(
1159
1001
  "tr",
@@ -1206,7 +1048,7 @@ var partitionForOverflow = (items, visibleCount, selectedId) => {
1206
1048
  overflowItems: items.filter((item) => !visibleIds.has(item.id))
1207
1049
  };
1208
1050
  };
1209
- var Tabs = React7__namespace.forwardRef(
1051
+ var Tabs = React8__namespace.forwardRef(
1210
1052
  ({
1211
1053
  items,
1212
1054
  selectedId,
@@ -1220,22 +1062,22 @@ var Tabs = React7__namespace.forwardRef(
1220
1062
  "aria-label": ariaLabelAttribute,
1221
1063
  ...rest
1222
1064
  }, ref) => {
1223
- const instanceId = React7__namespace.useId().replaceAll(":", "");
1065
+ const instanceId = React8__namespace.useId().replaceAll(":", "");
1224
1066
  const controlled = selectedId !== void 0;
1225
1067
  const firstEnabled = items.find((item) => !item.disabled && !item.isDisabled)?.id ?? "";
1226
- const [internalSelectedId, setInternalSelectedId] = React7__namespace.useState(
1068
+ const [internalSelectedId, setInternalSelectedId] = React8__namespace.useState(
1227
1069
  defaultSelectedId ?? firstEnabled
1228
1070
  );
1229
1071
  const activeId = controlled ? selectedId : internalSelectedId;
1230
- const [focusedId, setFocusedId] = React7__namespace.useState(activeId);
1231
- const [visibleCount, setVisibleCount] = React7__namespace.useState(items.length);
1232
- const [menuOpen, setMenuOpen] = React7__namespace.useState(false);
1233
- const listRef = React7__namespace.useRef(null);
1234
- const tabRefs = React7__namespace.useRef(/* @__PURE__ */ new Map());
1235
- const itemWidths = React7__namespace.useRef(/* @__PURE__ */ new Map());
1236
- const focusRequestedByUser = React7__namespace.useRef(false);
1237
- React7__namespace.useEffect(() => setFocusedId(activeId), [activeId]);
1238
- const select = React7__namespace.useCallback(
1072
+ const [focusedId, setFocusedId] = React8__namespace.useState(activeId);
1073
+ const [visibleCount, setVisibleCount] = React8__namespace.useState(items.length);
1074
+ const [menuOpen, setMenuOpen] = React8__namespace.useState(false);
1075
+ const listRef = React8__namespace.useRef(null);
1076
+ const tabRefs = React8__namespace.useRef(/* @__PURE__ */ new Map());
1077
+ const itemWidths = React8__namespace.useRef(/* @__PURE__ */ new Map());
1078
+ const focusRequestedByUser = React8__namespace.useRef(false);
1079
+ React8__namespace.useEffect(() => setFocusedId(activeId), [activeId]);
1080
+ const select = React8__namespace.useCallback(
1239
1081
  (id) => {
1240
1082
  const item = items.find((candidate) => candidate.id === id);
1241
1083
  if (!item || item.disabled || item.isDisabled) return;
@@ -1247,7 +1089,7 @@ var Tabs = React7__namespace.forwardRef(
1247
1089
  },
1248
1090
  [controlled, items, onChange, onUpdate]
1249
1091
  );
1250
- const measure = React7__namespace.useCallback(() => {
1092
+ const measure = React8__namespace.useCallback(() => {
1251
1093
  const list = listRef.current;
1252
1094
  if (!list || items.length < 2) return;
1253
1095
  const available = list.offsetWidth;
@@ -1271,7 +1113,7 @@ var Tabs = React7__namespace.forwardRef(
1271
1113
  }
1272
1114
  setVisibleCount(Math.max(1, count));
1273
1115
  }, [items.length]);
1274
- React7__namespace.useLayoutEffect(() => {
1116
+ React8__namespace.useLayoutEffect(() => {
1275
1117
  measure();
1276
1118
  const list = listRef.current;
1277
1119
  if (!list || typeof ResizeObserver === "undefined") return void 0;
@@ -1299,7 +1141,7 @@ var Tabs = React7__namespace.forwardRef(
1299
1141
  if (!nextId) return;
1300
1142
  select(nextId);
1301
1143
  };
1302
- React7__namespace.useEffect(() => {
1144
+ React8__namespace.useEffect(() => {
1303
1145
  if (focusRequestedByUser.current && visibleItems.some((item) => item.id === focusedId)) {
1304
1146
  focusRequestedByUser.current = false;
1305
1147
  tabRefs.current.get(focusedId)?.focus();
@@ -1423,7 +1265,7 @@ var Tabs = React7__namespace.forwardRef(
1423
1265
  Tabs.displayName = "OODS.Tabs";
1424
1266
  var classes6 = (...values) => values.filter(Boolean).join(" ");
1425
1267
  var humanize = (value) => value.split(/[_-]/).filter(Boolean).map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1)).join(" ");
1426
- var StatusBadge = React7__namespace.forwardRef(
1268
+ var StatusBadge = React8__namespace.forwardRef(
1427
1269
  ({
1428
1270
  status,
1429
1271
  value,
@@ -1446,7 +1288,7 @@ var StatusBadge = React7__namespace.forwardRef(
1446
1288
  ...rest
1447
1289
  }, ref) => {
1448
1290
  const resolvedStatus = status ?? value ?? "unknown";
1449
- const presentation = getStatusPresentation(domain, resolvedStatus);
1291
+ const presentation = componentContracts.getStatusPresentation(domain, resolvedStatus);
1450
1292
  return /* @__PURE__ */ jsxRuntime.jsx(
1451
1293
  Badge,
1452
1294
  {
@@ -1467,8 +1309,8 @@ var StatusBadge = React7__namespace.forwardRef(
1467
1309
  }
1468
1310
  );
1469
1311
  StatusBadge.displayName = "OODS.StatusBadge";
1470
- function formatPrice(amount, currency, fallback2) {
1471
- if (amount === void 0 || !Number.isFinite(amount)) return fallback2;
1312
+ function formatPrice(amount, currency, fallback) {
1313
+ if (amount === void 0 || !Number.isFinite(amount)) return fallback;
1472
1314
  if (!currency) return new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }).format(amount);
1473
1315
  try {
1474
1316
  return new Intl.NumberFormat(void 0, {
@@ -1479,7 +1321,7 @@ function formatPrice(amount, currency, fallback2) {
1479
1321
  return `${currency.toUpperCase()} ${amount.toFixed(2)}`;
1480
1322
  }
1481
1323
  }
1482
- var PriceBadge = React7__namespace.forwardRef(
1324
+ var PriceBadge = React8__namespace.forwardRef(
1483
1325
  ({
1484
1326
  amountCents,
1485
1327
  unitAmountCents,
@@ -1554,7 +1396,7 @@ function normalizeTimelineEvents(values) {
1554
1396
  }];
1555
1397
  });
1556
1398
  }
1557
- var TimelinePrimitive = React7__namespace.forwardRef(
1399
+ var TimelinePrimitive = React8__namespace.forwardRef(
1558
1400
  ({
1559
1401
  componentId,
1560
1402
  defaultTitle,
@@ -1632,7 +1474,7 @@ var TimelinePrimitive = React7__namespace.forwardRef(
1632
1474
  }
1633
1475
  );
1634
1476
  TimelinePrimitive.displayName = "OODS.TimelinePrimitive";
1635
- var StatusTimeline = React7__namespace.forwardRef(
1477
+ var StatusTimeline = React8__namespace.forwardRef(
1636
1478
  (props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1637
1479
  TimelinePrimitive,
1638
1480
  {
@@ -1645,7 +1487,7 @@ var StatusTimeline = React7__namespace.forwardRef(
1645
1487
  )
1646
1488
  );
1647
1489
  StatusTimeline.displayName = "OODS.StatusTimeline";
1648
- var AuditTimeline = React7__namespace.forwardRef(
1490
+ var AuditTimeline = React8__namespace.forwardRef(
1649
1491
  ({ auditLog, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1650
1492
  TimelinePrimitive,
1651
1493
  {
@@ -1659,7 +1501,7 @@ var AuditTimeline = React7__namespace.forwardRef(
1659
1501
  )
1660
1502
  );
1661
1503
  AuditTimeline.displayName = "OODS.AuditTimeline";
1662
- var CancellationSummary = React7__namespace.forwardRef(
1504
+ var CancellationSummary = React8__namespace.forwardRef(
1663
1505
  ({
1664
1506
  label,
1665
1507
  title = label ?? "Cancellation Summary",
@@ -1716,7 +1558,7 @@ var CancellationSummary = React7__namespace.forwardRef(
1716
1558
  }
1717
1559
  );
1718
1560
  CancellationSummary.displayName = "OODS.CancellationSummary";
1719
- var SearchInput = React7__namespace.forwardRef(
1561
+ var SearchInput = React8__namespace.forwardRef(
1720
1562
  ({
1721
1563
  id,
1722
1564
  label = "Search",
@@ -1742,13 +1584,13 @@ var SearchInput = React7__namespace.forwardRef(
1742
1584
  onKeyDown,
1743
1585
  ...rest
1744
1586
  }, ref) => {
1745
- const generatedId = React7__namespace.useId();
1587
+ const generatedId = React8__namespace.useId();
1746
1588
  const resolvedId = id ?? `oods-search-${generatedId.replace(/:/g, "")}`;
1747
- const [uncontrolledValue, setUncontrolledValue] = React7__namespace.useState(defaultValue);
1589
+ const [uncontrolledValue, setUncontrolledValue] = React8__namespace.useState(defaultValue);
1748
1590
  const currentValue = value ?? uncontrolledValue;
1749
- const timerRef = React7__namespace.useRef(void 0);
1591
+ const timerRef = React8__namespace.useRef(void 0);
1750
1592
  const delay = Math.max(0, debounceMs ?? debounce ?? 0);
1751
- React7__namespace.useEffect(() => () => {
1593
+ React8__namespace.useEffect(() => () => {
1752
1594
  if (timerRef.current !== void 0) clearTimeout(timerRef.current);
1753
1595
  }, []);
1754
1596
  const publish = (nextValue) => {
@@ -1811,7 +1653,7 @@ var SearchInput = React7__namespace.forwardRef(
1811
1653
  "aria-label": "Clear search",
1812
1654
  disabled,
1813
1655
  onClick: clear,
1814
- children: "\xD7"
1656
+ children: /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { name: "x" })
1815
1657
  }
1816
1658
  ) : null
1817
1659
  ]
@@ -1832,7 +1674,7 @@ function visiblePages(page, totalPages) {
1832
1674
  }
1833
1675
  return result;
1834
1676
  }
1835
- var PaginationBar = React7__namespace.forwardRef(
1677
+ var PaginationBar = React8__namespace.forwardRef(
1836
1678
  ({
1837
1679
  page = 1,
1838
1680
  pageSize = 25,
@@ -1973,7 +1815,7 @@ function relativeLabel(date, now) {
1973
1815
  unit
1974
1816
  );
1975
1817
  }
1976
- var RelativeTimestamp = React7__namespace.forwardRef(
1818
+ var RelativeTimestamp = React8__namespace.forwardRef(
1977
1819
  ({
1978
1820
  datetime,
1979
1821
  timestamp,
@@ -1999,7 +1841,7 @@ var RelativeTimestamp = React7__namespace.forwardRef(
1999
1841
  const date = asDate(raw);
2000
1842
  if (hideWhenEmpty && !date) return null;
2001
1843
  const nowDate = asDate(now) ?? /* @__PURE__ */ new Date();
2002
- const iso = date?.toISOString() ?? (raw === void 0 ? void 0 : String(raw));
1844
+ const iso = date?.toISOString() ?? (raw === void 0 || raw === "" ? void 0 : String(raw));
2003
1845
  const absolute = componentContracts.formatDateTime(date, { timeZone: timezone });
2004
1846
  const content = relative ?? label ?? text ?? (now !== void 0 && date ? relativeLabel(date, nowDate) : absolute || children || "Unknown time");
2005
1847
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2021,8 +1863,8 @@ RelativeTimestamp.displayName = "OODS.RelativeTimestamp";
2021
1863
  var classes7 = (...values) => values.filter(Boolean).join(" ");
2022
1864
  var firstText = (...values) => values.find((value) => typeof value === "string" && value.trim().length > 0);
2023
1865
  function childContent(children) {
2024
- const flatten = (value) => React7__namespace.Children.toArray(value).flatMap((node) => {
2025
- if (React7__namespace.isValidElement(node) && node.type === React7__namespace.Fragment) {
1866
+ const flatten = (value) => React8__namespace.Children.toArray(value).flatMap((node) => {
1867
+ if (React8__namespace.isValidElement(node) && node.type === React8__namespace.Fragment) {
2026
1868
  return flatten(node.props.children);
2027
1869
  }
2028
1870
  return [node];
@@ -2034,16 +1876,16 @@ function childContent(children) {
2034
1876
  }
2035
1877
  return { authored: nodes.length > 0 };
2036
1878
  }
2037
- function headingElement(as, level, fallback2) {
1879
+ function headingElement(as, level, fallback) {
2038
1880
  if (as && /^h[1-6]$/.test(as)) return as;
2039
- const bounded = Number.isFinite(level) ? Math.max(1, Math.min(6, Math.trunc(level))) : fallback2;
1881
+ const bounded = Number.isFinite(level) ? Math.max(1, Math.min(6, Math.trunc(level))) : fallback;
2040
1882
  return `h${bounded}`;
2041
1883
  }
2042
1884
  function notEcho(supporting, heading) {
2043
1885
  if (!supporting || !heading) return supporting;
2044
1886
  return supporting.trim() === heading.trim() ? void 0 : supporting;
2045
1887
  }
2046
- var DetailHeader = React7__namespace.forwardRef(
1888
+ var DetailHeader = React8__namespace.forwardRef(
2047
1889
  ({ title, label, text, subtitle, sublabel, description, metadata, meta, level, as, children, className, ...rest }, ref) => {
2048
1890
  const Heading = headingElement(as, level, 2);
2049
1891
  const content = childContent(children);
@@ -2058,7 +1900,7 @@ var DetailHeader = React7__namespace.forwardRef(
2058
1900
  }
2059
1901
  );
2060
1902
  DetailHeader.displayName = "OODS.DetailHeader";
2061
- var CardHeader = React7__namespace.forwardRef(
1903
+ var CardHeader = React8__namespace.forwardRef(
2062
1904
  ({ title, label, text, supporting, supportingText, subtitle, description, level, as, children, className, ...rest }, ref) => {
2063
1905
  const Heading = headingElement(as, level, 2);
2064
1906
  const content = childContent(children);
@@ -2071,7 +1913,7 @@ var CardHeader = React7__namespace.forwardRef(
2071
1913
  }
2072
1914
  );
2073
1915
  CardHeader.displayName = "OODS.CardHeader";
2074
- var ColorSwatch = React7__namespace.forwardRef(
1916
+ var ColorSwatch = React8__namespace.forwardRef(
2075
1917
  ({ color, value, state, label, children, className, style, ...rest }, ref) => {
2076
1918
  const resolvedColor = firstText(color, value, state);
2077
1919
  const content = childContent(children);
@@ -2096,7 +1938,7 @@ var ColorSwatch = React7__namespace.forwardRef(
2096
1938
  }
2097
1939
  );
2098
1940
  ColorSwatch.displayName = "OODS.ColorSwatch";
2099
- var ColorizedBadge = React7__namespace.forwardRef(
1941
+ var ColorizedBadge = React8__namespace.forwardRef(
2100
1942
  ({ label, text, state, value, status, color, hue, swatch, variant, tone, emphasis, children, className, style, ...rest }, ref) => {
2101
1943
  const content = childContent(children);
2102
1944
  const resolvedLabel = content.scalar ?? firstText(label, text, state, value) ?? "Color";
@@ -2126,10 +1968,12 @@ var ColorizedBadge = React7__namespace.forwardRef(
2126
1968
  }
2127
1969
  );
2128
1970
  ColorizedBadge.displayName = "OODS.ColorizedBadge";
2129
- var VizAreaPreview = React7__namespace.forwardRef(
2130
- ({ width = 640, height = 360, svg, svgNarrow, svgWide, title, description, children, className, style, ...rest }, ref) => {
1971
+ var VizAreaPreview = React8__namespace.forwardRef(
1972
+ ({ width = 640, height = 360, svg, svgNarrow, svgWide, svgDark, svgDarkNarrow, svgDarkWide, svgHc, svgHcNarrow, svgHcWide, title, description, children, className, style, ...rest }, ref) => {
2131
1973
  const content = childContent(children);
2132
1974
  if (svg !== void 0) {
1975
+ const layers = componentContracts.vizPreviewLayers({ svg, svgNarrow, svgWide, svgDark, svgDarkNarrow, svgDarkWide, svgHc, svgHcNarrow, svgHcWide });
1976
+ const renders = (layer) => layer.renders.map(([attribute, markup]) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...{ [attribute]: "true" }, dangerouslySetInnerHTML: { __html: markup } }, attribute));
2133
1977
  return /* @__PURE__ */ jsxRuntime.jsxs(
2134
1978
  "figure",
2135
1979
  {
@@ -2148,9 +1992,7 @@ var VizAreaPreview = React7__namespace.forwardRef(
2148
1992
  ...rest,
2149
1993
  children: [
2150
1994
  title && !componentContracts.svgCarriesTitle(svg, title) ? /* @__PURE__ */ jsxRuntime.jsx("figcaption", { children: title }) : null,
2151
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-viz-svg": "true", dangerouslySetInnerHTML: { __html: componentContracts.assertStaticSvg(svg) } }),
2152
- svgNarrow !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-viz-svg-narrow": "true", dangerouslySetInnerHTML: { __html: componentContracts.assertStaticSvg(svgNarrow) } }) : null,
2153
- svgWide !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-viz-svg-wide": "true", dangerouslySetInnerHTML: { __html: componentContracts.assertStaticSvg(svgWide) } }) : null,
1995
+ layers.map((layer) => layer.theme === void 0 ? renders(layer) : /* @__PURE__ */ jsxRuntime.jsx("div", { "data-viz-theme": layer.theme, "data-viz-narrow": layer.narrow ? "true" : void 0, "data-viz-wide": layer.wide ? "true" : void 0, children: renders(layer) }, layer.theme)),
2154
1996
  description ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-viz-description": "true", children: description }) : null
2155
1997
  ]
2156
1998
  }
@@ -2195,13 +2037,13 @@ var descriptorLabel = (descriptor) => firstText(
2195
2037
  typeof descriptor.field === "string" ? descriptor.field : void 0
2196
2038
  ) ?? "Filter";
2197
2039
  function createPanelSection(component, className, panelType, defaultTitle) {
2198
- const Panel = React7__namespace.forwardRef(
2040
+ const Panel = React8__namespace.forwardRef(
2199
2041
  ({ title, label, heading, name, subtitle, description, metadata, summary: summary2, text, body, emptyMessage, children, className: consumerClassName, ...rest }, ref) => {
2200
2042
  const content = childContent(children);
2201
2043
  const authored = content.authored || content.scalar !== void 0;
2202
2044
  const resolvedTitle = firstText(title, label, heading, name) ?? defaultTitle;
2203
2045
  const resolvedSubtitle = firstText(subtitle, description, metadata);
2204
- const fallback2 = firstText(summary2, text, body, emptyMessage);
2046
+ const fallback = firstText(summary2, text, body, emptyMessage);
2205
2047
  return /* @__PURE__ */ jsxRuntime.jsxs(
2206
2048
  "section",
2207
2049
  {
@@ -2215,7 +2057,7 @@ function createPanelSection(component, className, panelType, defaultTitle) {
2215
2057
  /* @__PURE__ */ jsxRuntime.jsx("h2", { children: resolvedTitle }),
2216
2058
  resolvedSubtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-panel-subtitle": "true", children: resolvedSubtitle }) : null
2217
2059
  ] }),
2218
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-panel-content": "true", children: authored ? children : fallback2 ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-panel-summary": "true", children: fallback2 }) : null })
2060
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-panel-content": "true", children: authored ? children : fallback ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-panel-summary": "true", children: fallback }) : null })
2219
2061
  ]
2220
2062
  }
2221
2063
  );
@@ -2228,7 +2070,7 @@ var ClassificationPanel = createPanelSection("ClassificationPanel", "oods-classi
2228
2070
  var AddressCollectionPanel = createPanelSection("AddressCollectionPanel", "oods-address-collection-panel", "address", "Addresses");
2229
2071
  var MembershipPanel = createPanelSection("MembershipPanel", "oods-membership-panel", "membership", "Membership");
2230
2072
  var PreferencePanel = createPanelSection("PreferencePanel", "oods-preference-panel", "preference", "Preferences");
2231
- var FilterPanel = React7__namespace.forwardRef(
2073
+ var FilterPanel = React8__namespace.forwardRef(
2232
2074
  ({ filters, activeFilters, mode, collapsible = true, children, className, ...rest }, ref) => {
2233
2075
  const content = childContent(children);
2234
2076
  const authored = content.authored || content.scalar !== void 0;
@@ -2262,7 +2104,7 @@ var FilterPanel = React7__namespace.forwardRef(
2262
2104
  }
2263
2105
  );
2264
2106
  FilterPanel.displayName = "OODS.FilterPanel";
2265
- var PriceSummary = React7__namespace.forwardRef(
2107
+ var PriceSummary = React8__namespace.forwardRef(
2266
2108
  ({
2267
2109
  title,
2268
2110
  label,
@@ -2295,7 +2137,7 @@ var PriceSummary = React7__namespace.forwardRef(
2295
2137
  ["Interval", componentContracts.formatPriceCode(interval ?? billingInterval)]
2296
2138
  ];
2297
2139
  const terms = entries.filter((entry) => entry[1] !== void 0);
2298
- const fallback2 = firstText(summary2, text, description);
2140
+ const fallback = firstText(summary2, text, description);
2299
2141
  return /* @__PURE__ */ jsxRuntime.jsxs(
2300
2142
  "section",
2301
2143
  {
@@ -2309,7 +2151,7 @@ var PriceSummary = React7__namespace.forwardRef(
2309
2151
  authored ? children : terms.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("dl", { children: terms.map(([term, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-summary-item": "true", children: [
2310
2152
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: term }),
2311
2153
  /* @__PURE__ */ jsxRuntime.jsx("dd", { children: value })
2312
- ] }, term)) }) : fallback2 ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback2 }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
2154
+ ] }, term)) }) : fallback ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
2313
2155
  ]
2314
2156
  }
2315
2157
  );
@@ -2335,7 +2177,7 @@ var normalizeTagItems = (value) => {
2335
2177
  }
2336
2178
  return items.filter((item) => item.length > 0);
2337
2179
  };
2338
- var TagManager = React7__namespace.forwardRef(
2180
+ var TagManager = React8__namespace.forwardRef(
2339
2181
  ({ title, label, heading, name, description, subtitle, hint, tags, value, children, className, onSubmit, ...rest }, ref) => {
2340
2182
  const content = childContent(children);
2341
2183
  const authored = content.authored || content.scalar !== void 0;
@@ -2382,7 +2224,7 @@ var asCount = (value) => {
2382
2224
  };
2383
2225
  function createBadgeFamily(options) {
2384
2226
  const consumed = /* @__PURE__ */ new Set([...options.labelKeys, ...options.statusKeys, "variant", "tone", "emphasis"]);
2385
- const Family = React7__namespace.forwardRef((allProps, ref) => {
2227
+ const Family = React8__namespace.forwardRef((allProps, ref) => {
2386
2228
  const { children, className, ...rest } = allProps;
2387
2229
  const record = rest;
2388
2230
  const scalar = (key) => {
@@ -2442,7 +2284,7 @@ var PreferenceSummaryBadge = createBadgeFamily({
2442
2284
  labelKeys: ["label", "text", "namespace", "value"],
2443
2285
  statusKeys: ["status", "state", "version"]
2444
2286
  });
2445
- var RoleBadgeList = React7__namespace.forwardRef(
2287
+ var RoleBadgeList = React8__namespace.forwardRef(
2446
2288
  ({ roles, badges, roleLabels, value, variant, tone, label, text, children, className, ...rest }, ref) => {
2447
2289
  const content = childContent(children);
2448
2290
  const authored = content.authored || content.scalar !== void 0;
@@ -2462,7 +2304,7 @@ var RoleBadgeList = React7__namespace.forwardRef(
2462
2304
  }
2463
2305
  );
2464
2306
  RoleBadgeList.displayName = "OODS.RoleBadgeList";
2465
- var TagPills = React7__namespace.forwardRef(
2307
+ var TagPills = React8__namespace.forwardRef(
2466
2308
  ({ tags, value, maxVisible, overflowLabel, children, className, ...rest }, ref) => {
2467
2309
  const content = childContent(children);
2468
2310
  const authored = content.authored || content.scalar !== void 0;
@@ -2514,7 +2356,7 @@ var normalizeTimelineItems = (raw) => {
2514
2356
  };
2515
2357
  function createTimelineFamily(options) {
2516
2358
  const consumed = /* @__PURE__ */ new Set(["title", "label", "heading", "name", ...options.eventKeys]);
2517
- const Family = React7__namespace.forwardRef((allProps, ref) => {
2359
+ const Family = React8__namespace.forwardRef((allProps, ref) => {
2518
2360
  const { children, className, ...rest } = allProps;
2519
2361
  const record = rest;
2520
2362
  const text = (key) => {
@@ -2579,7 +2421,7 @@ var PreferenceTimeline = createTimelineFamily({
2579
2421
  timelineType: "preference",
2580
2422
  eventKeys: ["events", "changes", "history"]
2581
2423
  });
2582
- var AuditEvent = React7__namespace.forwardRef(
2424
+ var AuditEvent = React8__namespace.forwardRef(
2583
2425
  ({
2584
2426
  label,
2585
2427
  title,
@@ -2665,7 +2507,7 @@ var addressRecord = (form) => {
2665
2507
  };
2666
2508
  return { street: read("street"), city: read("city"), region: read("region"), postalCode: read("postalCode") };
2667
2509
  };
2668
- var AddressEditor = React7__namespace.forwardRef(
2510
+ var AddressEditor = React8__namespace.forwardRef(
2669
2511
  ({
2670
2512
  title,
2671
2513
  label,
@@ -2723,7 +2565,7 @@ var AddressEditor = React7__namespace.forwardRef(
2723
2565
  }
2724
2566
  );
2725
2567
  AddressEditor.displayName = "OODS.AddressEditor";
2726
- var PreferenceEditor = React7__namespace.forwardRef(
2568
+ var PreferenceEditor = React8__namespace.forwardRef(
2727
2569
  ({ title, label, heading, name, description, subtitle, hint, namespaces, namespace, document, json, value, children, className, onSubmit, ...rest }, ref) => {
2728
2570
  const content = childContent(children);
2729
2571
  const authored = content.authored || content.scalar !== void 0;
@@ -2760,7 +2602,7 @@ var PreferenceEditor = React7__namespace.forwardRef(
2760
2602
  }
2761
2603
  );
2762
2604
  PreferenceEditor.displayName = "OODS.PreferenceEditor";
2763
- var RoleAssignmentForm = React7__namespace.forwardRef(
2605
+ var RoleAssignmentForm = React8__namespace.forwardRef(
2764
2606
  ({ title, label, heading, name, description, subtitle, hint, roles, availableRoles, role, defaultRoleId, assignee, member, children, className, onSubmit, ...rest }, ref) => {
2765
2607
  const content = childContent(children);
2766
2608
  const authored = content.authored || content.scalar !== void 0;
@@ -2797,7 +2639,7 @@ var RoleAssignmentForm = React7__namespace.forwardRef(
2797
2639
  }
2798
2640
  );
2799
2641
  RoleAssignmentForm.displayName = "OODS.RoleAssignmentForm";
2800
- var StatusSelector = React7__namespace.forwardRef(
2642
+ var StatusSelector = React8__namespace.forwardRef(
2801
2643
  ({ label, title, help, options, states, value, status, children, className, onChange, onValueChange, onUpdate, ...rest }, ref) => {
2802
2644
  const content = childContent(children);
2803
2645
  const authored = content.authored || content.scalar !== void 0;
@@ -2839,7 +2681,7 @@ var StatusSelector = React7__namespace.forwardRef(
2839
2681
  }
2840
2682
  );
2841
2683
  StatusSelector.displayName = "OODS.StatusSelector";
2842
- var TagInput = React7__namespace.forwardRef(
2684
+ var TagInput = React8__namespace.forwardRef(
2843
2685
  ({ title, label, heading, name, description, subtitle, hint, tags, value, placeholder, children, className, onChange, onValueChange, onUpdate, ...rest }, ref) => {
2844
2686
  const content = childContent(children);
2845
2687
  const authored = content.authored || content.scalar !== void 0;
@@ -2886,7 +2728,7 @@ var TagInput = React7__namespace.forwardRef(
2886
2728
  }
2887
2729
  );
2888
2730
  TagInput.displayName = "OODS.TagInput";
2889
- var TemplatePicker = React7__namespace.forwardRef(
2731
+ var TemplatePicker = React8__namespace.forwardRef(
2890
2732
  ({ title, label, heading, name, description, subtitle, hint, templates, options, templateId, value, channels, channel, children, className, ...rest }, ref) => {
2891
2733
  const content = childContent(children);
2892
2734
  const authored = content.authored || content.scalar !== void 0;
@@ -2924,14 +2766,14 @@ var truncateLabel = (value, maxLength) => {
2924
2766
  const limit = typeof maxLength === "number" ? maxLength : Number(maxLength);
2925
2767
  return !Number.isFinite(limit) || limit <= 0 || value.length <= limit ? value : `${value.slice(0, Math.max(0, limit - 1)).trimEnd()}...`;
2926
2768
  };
2927
- var InlineLabel = React7__namespace.forwardRef(
2769
+ var InlineLabel = React8__namespace.forwardRef(
2928
2770
  ({ label, text, value, maxLength, children, className, ...rest }, ref) => {
2929
2771
  const content = childContent(children);
2930
2772
  return /* @__PURE__ */ jsxRuntime.jsx("span", { ref, className: classes7("oods-inline-label", className), "data-oods-component": "InlineLabel", ...rest, children: content.authored || content.scalar !== void 0 ? children : truncateLabel(firstText(label, text, value) ?? "", maxLength) });
2931
2773
  }
2932
2774
  );
2933
2775
  InlineLabel.displayName = "OODS.InlineLabel";
2934
- var LabelCell = React7__namespace.forwardRef(
2776
+ var LabelCell = React8__namespace.forwardRef(
2935
2777
  ({ label, text, value, description, subtitle, sublabel, supporting, truncate, maxLength, children, className, ...rest }, ref) => {
2936
2778
  const content = childContent(children);
2937
2779
  const limit = truncate ? maxLength ?? 40 : maxLength;
@@ -2944,7 +2786,7 @@ var LabelCell = React7__namespace.forwardRef(
2944
2786
  }
2945
2787
  );
2946
2788
  LabelCell.displayName = "OODS.LabelCell";
2947
- var FormLabelGroup = React7__namespace.forwardRef(
2789
+ var FormLabelGroup = React8__namespace.forwardRef(
2948
2790
  ({ label, text, title, placeholder, hint, description, htmlFor, for: forId, inputId, children, className, ...rest }, ref) => {
2949
2791
  const detail = firstText(placeholder, hint, description);
2950
2792
  return /* @__PURE__ */ jsxRuntime.jsxs("label", { ref, className: classes7("oods-form-label-group", className), "data-oods-component": "FormLabelGroup", htmlFor: htmlFor ?? forId ?? inputId, ...rest, children: [
@@ -2963,7 +2805,7 @@ var ClassificationBadge = createBadgeFamily({
2963
2805
  labelKeys: ["label", "text", "category", "value"],
2964
2806
  statusKeys: ["status", "state", "mode"]
2965
2807
  });
2966
- var ClassificationEditor = React7__namespace.forwardRef(
2808
+ var ClassificationEditor = React8__namespace.forwardRef(
2967
2809
  ({ title, label, heading, name, description, subtitle, hint, category, primaryCategory, tags, modes, mode, classificationMode, children, className, onSubmit, ...rest }, ref) => {
2968
2810
  const content = childContent(children);
2969
2811
  const tagText = typeof tags === "string" ? tags : tags === void 0 ? "" : JSON.stringify(tags);
@@ -3009,38 +2851,38 @@ var OwnerBadge = createBadgeFamily({
3009
2851
  labelKeys: ["label", "text", "owner", "ownerType", "value"],
3010
2852
  statusKeys: ["status", "state"]
3011
2853
  });
3012
- var OwnershipSummary = React7__namespace.forwardRef(
2854
+ var OwnershipSummary = React8__namespace.forwardRef(
3013
2855
  ({ title, label, heading, name, ownerLabel, ownerId, owner_id, ownerType, owner_type, role, ownershipRole, summary: summary2, text, description, children, className, ...rest }, ref) => {
3014
2856
  const content = childContent(children);
3015
2857
  const terms = [["Owner", ownerId === void 0 && owner_id === void 0 && ownerLabel === void 0 ? void 0 : componentContracts.formatReferenceLabel(ownerId ?? owner_id, ownerLabel, "Owner")], ["Owner Type", firstScalar(ownerType, owner_type)], ["Role", firstScalar(role, ownershipRole)]].filter((entry) => entry[1] !== void 0);
3016
- const fallback2 = firstText(summary2, text, description);
2858
+ const fallback = firstText(summary2, text, description);
3017
2859
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: classes7("oods-ownership-summary", className), "data-oods-component": "OwnershipSummary", "data-summary-type": "ownership", ...rest, children: [
3018
2860
  /* @__PURE__ */ jsxRuntime.jsx("h2", { "data-summary-title": "true", children: firstText(title, label, heading, name) ?? "Ownership Summary" }),
3019
2861
  content.authored || content.scalar !== void 0 ? children : terms.length ? /* @__PURE__ */ jsxRuntime.jsx("dl", { children: terms.map(([term, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-summary-item": "true", children: [
3020
2862
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: term }),
3021
2863
  /* @__PURE__ */ jsxRuntime.jsx("dd", { children: value })
3022
- ] }, term)) }) : fallback2 ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback2 }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
2864
+ ] }, term)) }) : fallback ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
3023
2865
  ] });
3024
2866
  }
3025
2867
  );
3026
2868
  OwnershipSummary.displayName = "OODS.OwnershipSummary";
3027
- var TagSummary = React7__namespace.forwardRef(
2869
+ var TagSummary = React8__namespace.forwardRef(
3028
2870
  ({ title, label, heading, name, tagCount, count, tags, summary: summary2, text, description, children, className, ...rest }, ref) => {
3029
2871
  const content = childContent(children);
3030
2872
  const tagText = Array.isArray(tags) ? normalizeTagItems(tags).join(", ") || void 0 : firstText(tags);
3031
2873
  const terms = [["Tag Count", firstScalar(tagCount, count)], ["Tags", tagText]].filter((entry) => entry[1] !== void 0);
3032
- const fallback2 = firstText(summary2, text, description);
2874
+ const fallback = firstText(summary2, text, description);
3033
2875
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: classes7("oods-tags-summary", className), "data-oods-component": "TagSummary", "data-summary-type": "tags", ...rest, children: [
3034
2876
  /* @__PURE__ */ jsxRuntime.jsx("h2", { "data-summary-title": "true", children: firstText(title, label, heading, name) ?? "Tag Summary" }),
3035
2877
  content.authored || content.scalar !== void 0 ? children : terms.length ? /* @__PURE__ */ jsxRuntime.jsx("dl", { children: terms.map(([term, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-summary-item": "true", children: [
3036
2878
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: term }),
3037
2879
  /* @__PURE__ */ jsxRuntime.jsx("dd", { children: value })
3038
- ] }, term)) }) : fallback2 ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback2 }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
2880
+ ] }, term)) }) : fallback ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
3039
2881
  ] });
3040
2882
  }
3041
2883
  );
3042
2884
  TagSummary.displayName = "OODS.TagSummary";
3043
- var OwnershipMeta = React7__namespace.forwardRef(
2885
+ var OwnershipMeta = React8__namespace.forwardRef(
3044
2886
  ({ title, label, heading, name, ownerType, owner_type, role, ownershipRole, children, className, ...rest }, ref) => {
3045
2887
  const content = childContent(children);
3046
2888
  const terms = [["Owner Type", firstScalar(ownerType, owner_type)], ["Role", firstScalar(role, ownershipRole)]].filter((entry) => entry[1] !== void 0);
@@ -3078,22 +2920,22 @@ var CancellationBadge = createBadgeFamily({
3078
2920
  booleanProps: ["cancelAtPeriodEnd", "isCancelled", "value"],
3079
2921
  booleanLabels: ["Cancellation scheduled", "No cancellation scheduled"]
3080
2922
  });
3081
- var ArchiveSummary = React7__namespace.forwardRef(
2923
+ var ArchiveSummary = React8__namespace.forwardRef(
3082
2924
  ({ title, label, heading, name, isArchived, archived, status, archivedAt, reason, archiveReason, summary: summary2, text, description, children, className, ...rest }, ref) => {
3083
2925
  const content = childContent(children);
3084
2926
  const terms = [["Archived", componentContracts.summaryValue(isArchived ?? archived ?? status)], ["Archived At", archivedAt ? componentContracts.formatDateTime(archivedAt) : void 0], ["Reason", firstText(reason, archiveReason)]].filter((entry) => entry[1] !== void 0);
3085
- const fallback2 = firstText(summary2, text, description);
2927
+ const fallback = firstText(summary2, text, description);
3086
2928
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { ref, className: classes7("oods-archive-summary", className), "data-oods-component": "ArchiveSummary", "data-summary-type": "archive", ...rest, children: [
3087
2929
  /* @__PURE__ */ jsxRuntime.jsx("h2", { "data-summary-title": "true", children: firstText(title, label, heading, name) ?? "Archive Summary" }),
3088
2930
  content.authored || content.scalar !== void 0 ? children : terms.length ? /* @__PURE__ */ jsxRuntime.jsx("dl", { children: terms.map(([term, value]) => /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-summary-item": "true", children: [
3089
2931
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: term }),
3090
2932
  /* @__PURE__ */ jsxRuntime.jsx("dd", { children: value })
3091
- ] }, term)) }) : fallback2 ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback2 }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
2933
+ ] }, term)) }) : fallback ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-summary-fallback": "true", children: fallback }) : /* @__PURE__ */ jsxRuntime.jsx("dl", {})
3092
2934
  ] });
3093
2935
  }
3094
2936
  );
3095
2937
  ArchiveSummary.displayName = "OODS.ArchiveSummary";
3096
- var PriceCardMeta = React7__namespace.forwardRef(
2938
+ var PriceCardMeta = React8__namespace.forwardRef(
3097
2939
  ({ title, label, heading, name, model, pricingModel, interval, billingInterval, children, className, ...rest }, ref) => {
3098
2940
  const content = childContent(children);
3099
2941
  const terms = [["Model", componentContracts.formatPriceCode(firstText(model, pricingModel))], ["Interval", componentContracts.formatPriceCode(firstText(interval, billingInterval))]].filter((entry) => entry[1] !== void 0);
@@ -3111,12 +2953,12 @@ var PriceCardMeta = React7__namespace.forwardRef(
3111
2953
  }
3112
2954
  );
3113
2955
  PriceCardMeta.displayName = "OODS.PriceCardMeta";
3114
- var CancellationForm = React7__namespace.forwardRef(
2956
+ var CancellationForm = React8__namespace.forwardRef(
3115
2957
  ({ title, label, heading, name, description, subtitle, hint, allowedReasons, reasonCode, reason, cancellationReason, embedded, reasonHelp, codeHelp, children, className, onSubmit, ...rest }, ref) => {
3116
2958
  const content = childContent(children);
3117
2959
  const choices = normalizeSelectOptions(allowedReasons ?? ["no_longer_needed", "budget", "duplicate"]);
3118
2960
  if (reasonCode && !choices.some((choice) => choice.value === reasonCode)) choices.unshift({ value: reasonCode, label: reasonCode });
3119
- return React7__namespace.createElement(embedded ? "fieldset" : "form", {
2961
+ return React8__namespace.createElement(embedded ? "fieldset" : "form", {
3120
2962
  ...rest,
3121
2963
  ref,
3122
2964
  className: classes7("oods-cancellation-form", className),
@@ -3148,11 +2990,11 @@ function BillingSummaryBadge({ id, amount, currency, minorUnits, interval, showI
3148
2990
  return /* @__PURE__ */ jsxRuntime.jsx("span", { id, className: `oods-billing-summary ${className ?? ""}`.trim(), "data-oods-component": "BillingSummaryBadge", children: showInterval ? componentContracts.billingSummary(amount, currency, minorUnits, interval) : componentContracts.formatBillingAmount(amount, currency, minorUnits) });
3149
2991
  }
3150
2992
  function BillingAmountInput({ id, amount, currency = "usd", minorUnits = componentContracts.BILLING_MINOR_UNITS, label = "Billing amount", name, disabled, className, help, onChange }) {
3151
- const generatedId = React7__namespace.useId();
2993
+ const generatedId = React8__namespace.useId();
3152
2994
  const controlId = id ?? `billing-amount-${generatedId}`;
3153
- const [text, setText] = React7__namespace.useState(() => componentContracts.billingAmountText(amount, minorUnits));
3154
- const [error, setError] = React7__namespace.useState(() => componentContracts.billingAmountMessage(amount, minorUnits));
3155
- React7__namespace.useEffect(() => {
2995
+ const [text, setText] = React8__namespace.useState(() => componentContracts.billingAmountText(amount, minorUnits));
2996
+ const [error, setError] = React8__namespace.useState(() => componentContracts.billingAmountMessage(amount, minorUnits));
2997
+ React8__namespace.useEffect(() => {
3156
2998
  setText(componentContracts.billingAmountText(amount, minorUnits));
3157
2999
  setError(componentContracts.billingAmountMessage(amount, minorUnits));
3158
3000
  }, [amount, minorUnits]);
@@ -3186,10 +3028,10 @@ function BillingAmountInput({ id, amount, currency = "usd", minorUnits = compone
3186
3028
  ] });
3187
3029
  }
3188
3030
  function BillingIntervalSelector({ id, interval, intervals = componentContracts.BILLING_INTERVALS, label = "Billing interval", name, disabled, className, help, onChange }) {
3189
- const generatedId = React7__namespace.useId();
3031
+ const generatedId = React8__namespace.useId();
3190
3032
  const controlId = id ?? `billing-interval-${generatedId}`;
3191
- const [value, setValue] = React7__namespace.useState(interval ?? "");
3192
- React7__namespace.useEffect(() => {
3033
+ const [value, setValue] = React8__namespace.useState(interval ?? "");
3034
+ React8__namespace.useEffect(() => {
3193
3035
  setValue(interval ?? "");
3194
3036
  }, [interval]);
3195
3037
  const error = componentContracts.billingIntervalMessage(value || void 0, intervals);
@@ -3297,8 +3139,8 @@ function AuditSummaryCard({ id, title = "Audit summary", showTransitionCount = t
3297
3139
  ] });
3298
3140
  }
3299
3141
  function SortIndicator({ id, label = "Sort", onChange, "data-oods-action": action, ...values }) {
3300
- const [state, setState] = React7__namespace.useState(() => componentContracts.initialSort(values));
3301
- React7__namespace.useEffect(() => setState(componentContracts.initialSort(values)), [values.sortField, values.sortDirection, values.sortActive, values.defaultSortField, values.defaultSortDirection]);
3142
+ const [state, setState] = React8__namespace.useState(() => componentContracts.initialSort(values));
3143
+ React8__namespace.useEffect(() => setState(componentContracts.initialSort(values)), [values.sortField, values.sortDirection, values.sortActive, values.defaultSortField, values.defaultSortDirection]);
3302
3144
  const sort = componentContracts.ariaSort(state);
3303
3145
  return /* @__PURE__ */ jsxRuntime.jsx("table", { id, className: "oods-sort-indicator", "data-oods-component": "SortIndicator", "aria-label": label, children: /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("th", { scope: "col", "aria-sort": sort, children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "data-oods-action": action, "aria-label": `${label} ${state.field}`, onClick: () => {
3304
3146
  const next = componentContracts.nextSort(state, values.triStateSort);
@@ -3306,7 +3148,7 @@ function SortIndicator({ id, label = "Sort", onChange, "data-oods-action": actio
3306
3148
  onChange?.(next);
3307
3149
  }, children: `${state.field}: ${sort}` }) }) }) }) });
3308
3150
  }
3309
- var TimelineEntryLabel = React7__namespace.forwardRef(({ compact = true, maxLength, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(InlineLabel, { ...props, ref, maxLength: maxLength ?? (compact ? 40 : void 0), "data-oods-component": "TimelineEntryLabel", "data-timeline-label": "true", "data-compact": compact }));
3151
+ var TimelineEntryLabel = React8__namespace.forwardRef(({ compact = true, maxLength, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(InlineLabel, { ...props, ref, maxLength: maxLength ?? (compact ? 40 : void 0), "data-oods-component": "TimelineEntryLabel", "data-timeline-label": "true", "data-compact": compact }));
3310
3152
  TimelineEntryLabel.displayName = "OODS.TimelineEntryLabel";
3311
3153
  function eventRecipe(id, kind, title) {
3312
3154
  return function TraitEvent({ id: elementId, title: heading = title, ...values }) {
@@ -3349,9 +3191,9 @@ function CommunicationDetailPanel({ id, title = "Communication", channels = [],
3349
3191
  ] });
3350
3192
  }
3351
3193
  function ColorStatePicker({ id, title = "Color state", colorStates = componentContracts.DEFAULT_COLOR_STATES, value, disabled, onChange }) {
3352
- const generatedId = React7__namespace.useId();
3353
- const [selected, setSelected] = React7__namespace.useState(value ?? colorStates[0] ?? "");
3354
- React7__namespace.useEffect(() => setSelected(value ?? colorStates[0] ?? ""), [value, colorStates]);
3194
+ const generatedId = React8__namespace.useId();
3195
+ const [selected, setSelected] = React8__namespace.useState(value ?? colorStates[0] ?? "");
3196
+ React8__namespace.useEffect(() => setSelected(value ?? colorStates[0] ?? ""), [value, colorStates]);
3355
3197
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { id, className: "oods-trait-recipe", "data-oods-component": "ColorStatePicker", children: [
3356
3198
  /* @__PURE__ */ jsxRuntime.jsx("legend", { children: title }),
3357
3199
  /* @__PURE__ */ jsxRuntime.jsx(Select, { id: `${id ?? generatedId}-state`, label: "Color state", name: "color_state", value: selected, disabled, options: [...!colorStates.includes(selected) ? [{ value: selected, label: selected || "Choose state", disabled: true }] : [], ...colorStates.map((value2) => ({ value: value2, label: componentContracts.formatReadOnlyValue(value2, "string", true) }))], onValueChange: (next) => {
@@ -3373,9 +3215,9 @@ function StatusColorLegend({ id, title = "Status colors", colorStates = componen
3373
3215
  ] });
3374
3216
  }
3375
3217
  function GeoFieldMappingForm({ id, title = "Geographic fields", embedded = false, disabled, onChange, ...values }) {
3376
- const generatedId = React7__namespace.useId();
3377
- const [value, setValue] = React7__namespace.useState(() => componentContracts.geoFieldMapping(values));
3378
- React7__namespace.useEffect(() => setValue(componentContracts.geoFieldMapping(values)), [values.latitude, values.longitude, values.identifier, values.autoDetect]);
3218
+ const generatedId = React8__namespace.useId();
3219
+ const [value, setValue] = React8__namespace.useState(() => componentContracts.geoFieldMapping(values));
3220
+ React8__namespace.useEffect(() => setValue(componentContracts.geoFieldMapping(values)), [values.latitude, values.longitude, values.identifier, values.autoDetect]);
3379
3221
  const update = (patch) => {
3380
3222
  const next = { ...value, ...patch };
3381
3223
  setValue(next);
@@ -3409,11 +3251,11 @@ function GeocodablePreview({ id, title = "Geographic data", resolution, requires
3409
3251
  }
3410
3252
  function controls(id) {
3411
3253
  const Component = ({ id: htmlId, title = componentContracts.VIZ_CONTROL_TITLES[id], value, channel = "x", disabled, onChange }) => {
3412
- const generatedId = React7__namespace.useId();
3413
- const [current, setCurrent] = React7__namespace.useState(value ?? {});
3414
- const [drafts, setDrafts] = React7__namespace.useState({});
3415
- const [errors, setErrors] = React7__namespace.useState({});
3416
- React7__namespace.useEffect(() => {
3254
+ const generatedId = React8__namespace.useId();
3255
+ const [current, setCurrent] = React8__namespace.useState(value ?? {});
3256
+ const [drafts, setDrafts] = React8__namespace.useState({});
3257
+ const [errors, setErrors] = React8__namespace.useState({});
3258
+ React8__namespace.useEffect(() => {
3417
3259
  setCurrent(value ?? {});
3418
3260
  setDrafts({});
3419
3261
  setErrors({});
@@ -3523,6 +3365,7 @@ exports.CommunicationDetailPanel = CommunicationDetailPanel;
3523
3365
  exports.CycleProgressCard = CycleProgressCard;
3524
3366
  exports.DatePicker = DatePicker;
3525
3367
  exports.DetailHeader = DetailHeader;
3368
+ exports.Dialog = Dialog;
3526
3369
  exports.FilterPanel = FilterPanel;
3527
3370
  exports.FormLabelGroup = FormLabelGroup;
3528
3371
  exports.GeoFieldMappingForm = GeoFieldMappingForm;
@@ -3561,6 +3404,7 @@ exports.StatusBadge = StatusBadge;
3561
3404
  exports.StatusColorLegend = StatusColorLegend;
3562
3405
  exports.StatusSelector = StatusSelector;
3563
3406
  exports.StatusTimeline = StatusTimeline;
3407
+ exports.Switch = Switch;
3564
3408
  exports.Table = Table;
3565
3409
  exports.Tabs = Tabs;
3566
3410
  exports.TagInput = TagInput;