@oods/components-react 0.3.2 → 0.3.3

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/README.md CHANGED
@@ -32,4 +32,4 @@ Use matching versions of the OODS packages. These packages are separate from the
32
32
 
33
33
  ## License
34
34
 
35
- Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-react@0.3.2/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-react@0.3.2/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
35
+ Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-react@0.3.3/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-react@0.3.3/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
@@ -155,17 +155,16 @@ var InputPrimitive = React3.forwardRef(
155
155
  InputPrimitive.displayName = "OODS.Input";
156
156
  var Input = InputPrimitive;
157
157
  var DatePicker = React3.forwardRef(
158
- ({ pickerClassName, pickerStyle, inputClassName, inputStyle, ...rest }, ref) => /* @__PURE__ */ jsx(
158
+ ({ pickerClassName, pickerStyle, inputClassName, inputStyle, className, style, ...rest }, ref) => /* @__PURE__ */ jsx("div", { className: classes("oods-date-picker", className), style, "data-oods-component": "DatePicker", children: /* @__PURE__ */ jsx(
159
159
  Input,
160
160
  {
161
161
  ref,
162
162
  type: "date",
163
- "data-oods-component": "DatePicker",
164
163
  inputClassName: classes("form-field__date-picker", inputClassName, pickerClassName),
165
164
  inputStyle: { ...inputStyle, ...pickerStyle },
166
165
  ...rest
167
166
  }
168
- )
167
+ ) })
169
168
  );
170
169
  DatePicker.displayName = "OODS.DatePicker";
171
170
  var Checkbox = React3.forwardRef(
@@ -393,12 +392,12 @@ var Badge = React3.forwardRef(
393
392
  const resolvedContent = children ?? content ?? presentation?.label ?? status;
394
393
  const resolvedIcon = icon ?? resolveStatusGlyph(presentation?.iconName);
395
394
  const resolvedShowIcon = showIcon ?? resolvedIcon !== void 0;
396
- const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsx("span", { className: "oods-badge__icon statusable-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
395
+ const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsx("span", { className: "oods-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
397
396
  return /* @__PURE__ */ jsxs(
398
397
  "span",
399
398
  {
400
399
  ref,
401
- className: classes2("oods-badge", "statusable-badge", className),
400
+ className: classes2("oods-badge", className),
402
401
  "data-oods-component": "Badge",
403
402
  "data-status": status,
404
403
  "data-domain": domain,
@@ -410,16 +409,12 @@ var Badge = React3.forwardRef(
410
409
  "--cmp-badge-background": tokenSet.background,
411
410
  "--cmp-badge-border": tokenSet.border,
412
411
  "--cmp-badge-text": tokenSet.foreground,
413
- "--statusable-badge-background": tokenSet.background,
414
- "--statusable-badge-border": tokenSet.border,
415
- "--statusable-badge-foreground": tokenSet.foreground,
416
- "--statusable-badge-icon-color": tokenSet.foreground,
417
412
  ...style
418
413
  },
419
414
  ...rest,
420
415
  children: [
421
416
  iconPosition === "start" ? iconNode : null,
422
- /* @__PURE__ */ jsx("span", { className: "oods-badge__label statusable-badge__label", children: resolvedContent }),
417
+ /* @__PURE__ */ jsx("span", { className: "oods-badge__label", children: resolvedContent }),
423
418
  iconPosition === "end" ? iconNode : null
424
419
  ]
425
420
  }
@@ -461,7 +456,7 @@ var Banner = React3.forwardRef(
461
456
  ref,
462
457
  role,
463
458
  "aria-live": role === "alert" ? "assertive" : "polite",
464
- className: classes2("oods-banner", "statusable-banner", className),
459
+ className: classes2("oods-banner", className),
465
460
  "data-oods-component": "Banner",
466
461
  "data-status": status,
467
462
  "data-domain": domain,
@@ -471,25 +466,21 @@ var Banner = React3.forwardRef(
471
466
  "--cmp-banner-background": tokenSet.background,
472
467
  "--cmp-banner-border": tokenSet.border,
473
468
  "--cmp-banner-text": tokenSet.foreground,
474
- "--statusable-banner-background": tokenSet.background,
475
- "--statusable-banner-border": tokenSet.border,
476
- "--statusable-banner-foreground": tokenSet.foreground,
477
- "--statusable-banner-icon-color": tokenSet.foreground,
478
469
  ...style
479
470
  },
480
471
  ...rest,
481
472
  children: [
482
- resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsx("span", { className: "oods-banner__icon statusable-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
483
- /* @__PURE__ */ jsxs("div", { className: "oods-banner__content statusable-banner__content", children: [
484
- heading ? /* @__PURE__ */ jsx("strong", { className: "oods-banner__title statusable-banner__title", children: heading }) : null,
485
- body ? /* @__PURE__ */ jsx("p", { className: "oods-banner__detail statusable-banner__description", children: body }) : null,
486
- actions ? /* @__PURE__ */ jsx("div", { className: "oods-banner__actions statusable-banner__actions", children: actions }) : null
473
+ resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsx("span", { className: "oods-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
474
+ /* @__PURE__ */ jsxs("div", { className: "oods-banner__content", children: [
475
+ heading ? /* @__PURE__ */ jsx("strong", { className: "oods-banner__title", children: heading }) : null,
476
+ body ? /* @__PURE__ */ jsx("p", { className: "oods-banner__detail", children: body }) : null,
477
+ actions ? /* @__PURE__ */ jsx("div", { className: "oods-banner__actions", children: actions }) : null
487
478
  ] }),
488
479
  onDismiss ? /* @__PURE__ */ jsx(
489
480
  "button",
490
481
  {
491
482
  type: "button",
492
- className: "oods-banner-dismiss oods-banner__dismiss statusable-banner__dismiss",
483
+ className: "oods-banner-dismiss oods-banner__dismiss",
493
484
  "aria-label": dismissLabel,
494
485
  onClick: () => onDismiss(),
495
486
  children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "\xD7" })
@@ -612,6 +603,7 @@ var StatusBadge = React3.forwardRef(
612
603
  compact,
613
604
  variant,
614
605
  title,
606
+ className,
615
607
  "aria-label": ariaLabel,
616
608
  ...rest
617
609
  }, ref) => {
@@ -629,6 +621,7 @@ var StatusBadge = React3.forwardRef(
629
621
  content: children ?? content,
630
622
  title: title ?? presentation.description,
631
623
  "aria-label": ariaLabel ?? label ?? `Status: ${presentation.label}`,
624
+ className: classes3("oods-status-badge", className),
632
625
  "data-oods-component": "StatusBadge",
633
626
  ...rest
634
627
  }
@@ -767,29 +760,29 @@ var TimelinePrimitive = React3.forwardRef(
767
760
  "data-timeline-type": kind,
768
761
  ...rest,
769
762
  children: [
770
- /* @__PURE__ */ jsx("h2", { className: "oods-timeline__title", children: title }),
763
+ /* @__PURE__ */ jsx("h2", { className: "oods-timeline__title", "data-timeline-title": "true", children: title }),
771
764
  kind === "status" && status ? /* @__PURE__ */ jsxs("p", { className: "oods-timeline__current", "data-timeline-current": "true", children: [
772
765
  "Current status: ",
773
766
  humanize(status)
774
767
  ] }) : null,
775
- transitionCount > 0 ? /* @__PURE__ */ jsxs("p", { children: [
768
+ transitionCount > 0 ? /* @__PURE__ */ jsxs("p", { "data-timeline-transitions": "true", children: [
776
769
  "Allowed transitions: ",
777
770
  allowedTransitions?.join(", ")
778
771
  ] }) : null,
779
- children ?? /* @__PURE__ */ jsx("ol", { className: "oods-timeline__events", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
772
+ children ?? /* @__PURE__ */ jsx("ol", { className: "oods-timeline__events", "data-timeline-events": "true", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
780
773
  const timestamp = event.timestamp ?? event.datetime;
781
774
  const actor = event.actor ?? event.actorId ?? event.actor_id;
782
775
  const eventLabel = event.label ?? event.title ?? (event.from && event.to ? `${humanize(event.from)} \u2192 ${humanize(event.to)}` : void 0) ?? (event.status ? humanize(event.status) : void 0) ?? (event.state ? humanize(event.state) : void 0) ?? "Event";
783
776
  const detail = event.detail ?? event.description;
784
777
  return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("article", { className: "oods-timeline__event", "data-timeline-event": "true", children: [
785
- /* @__PURE__ */ jsx("p", { className: "oods-timeline__label", children: eventLabel }),
786
- timestamp ? /* @__PURE__ */ jsx("time", { dateTime: timestamp, children: formatDateTime(timestamp) }) : null,
787
- detail ? /* @__PURE__ */ jsx("p", { className: "oods-timeline__detail", children: detail }) : null,
788
- showActorId && actor ? /* @__PURE__ */ jsxs("p", { className: "oods-timeline__actor", children: [
778
+ /* @__PURE__ */ jsx("p", { className: "oods-timeline__label", "data-timeline-label": "true", children: eventLabel }),
779
+ timestamp ? /* @__PURE__ */ jsx("time", { "data-timeline-time": "true", dateTime: timestamp, children: formatDateTime(timestamp) }) : null,
780
+ detail ? /* @__PURE__ */ jsx("p", { className: "oods-timeline__detail", "data-timeline-detail": "true", children: detail }) : null,
781
+ showActorId && actor ? /* @__PURE__ */ jsxs("p", { className: "oods-timeline__actor", "data-timeline-actor": "true", children: [
789
782
  "Actor: ",
790
783
  actor
791
784
  ] }) : null,
792
- showReason && event.reason ? /* @__PURE__ */ jsxs("p", { className: "oods-timeline__reason", children: [
785
+ showReason && event.reason ? /* @__PURE__ */ jsxs("p", { className: "oods-timeline__reason", "data-timeline-reason": "true", children: [
793
786
  "Reason: ",
794
787
  event.reason
795
788
  ] }) : null
@@ -146,7 +146,7 @@ var TableRoot = React.forwardRef(
146
146
  ...rest,
147
147
  children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
148
148
  caption ? /* @__PURE__ */ jsx(TableCaption, { children: caption }) : null,
149
- /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx("tr", { children: columns?.map((column) => /* @__PURE__ */ jsx(TableHeaderCell, { numeric: column.numeric, children: column.label }, column.key)) }) }),
149
+ /* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsx("tr", { className: "oods-table__row", children: columns?.map((column) => /* @__PURE__ */ jsx(TableHeaderCell, { numeric: column.numeric, children: column.label }, column.key)) }) }),
150
150
  /* @__PURE__ */ jsx(TableBody, { children: (rows?.length ?? 0) === 0 ? /* @__PURE__ */ jsx("tr", { className: "oods-table__row", children: /* @__PURE__ */ jsx(TableCell, { colSpan: Math.max(columns?.length ?? 0, 1), children: "No rows available." }) }) : rows?.map((row) => /* @__PURE__ */ jsx(
151
151
  "tr",
152
152
  {
package/dist/index.cjs CHANGED
@@ -381,12 +381,12 @@ var Badge = React7__namespace.forwardRef(
381
381
  const resolvedContent = children ?? content ?? presentation?.label ?? status;
382
382
  const resolvedIcon = icon ?? resolveStatusGlyph(presentation?.iconName);
383
383
  const resolvedShowIcon = showIcon ?? resolvedIcon !== void 0;
384
- const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__icon statusable-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
384
+ const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
385
385
  return /* @__PURE__ */ jsxRuntime.jsxs(
386
386
  "span",
387
387
  {
388
388
  ref,
389
- className: classes("oods-badge", "statusable-badge", className),
389
+ className: classes("oods-badge", className),
390
390
  "data-oods-component": "Badge",
391
391
  "data-status": status,
392
392
  "data-domain": domain,
@@ -398,16 +398,12 @@ var Badge = React7__namespace.forwardRef(
398
398
  "--cmp-badge-background": tokenSet.background,
399
399
  "--cmp-badge-border": tokenSet.border,
400
400
  "--cmp-badge-text": tokenSet.foreground,
401
- "--statusable-badge-background": tokenSet.background,
402
- "--statusable-badge-border": tokenSet.border,
403
- "--statusable-badge-foreground": tokenSet.foreground,
404
- "--statusable-badge-icon-color": tokenSet.foreground,
405
401
  ...style
406
402
  },
407
403
  ...rest,
408
404
  children: [
409
405
  iconPosition === "start" ? iconNode : null,
410
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__label statusable-badge__label", children: resolvedContent }),
406
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__label", children: resolvedContent }),
411
407
  iconPosition === "end" ? iconNode : null
412
408
  ]
413
409
  }
@@ -449,7 +445,7 @@ var Banner = React7__namespace.forwardRef(
449
445
  ref,
450
446
  role,
451
447
  "aria-live": role === "alert" ? "assertive" : "polite",
452
- className: classes("oods-banner", "statusable-banner", className),
448
+ className: classes("oods-banner", className),
453
449
  "data-oods-component": "Banner",
454
450
  "data-status": status,
455
451
  "data-domain": domain,
@@ -459,25 +455,21 @@ var Banner = React7__namespace.forwardRef(
459
455
  "--cmp-banner-background": tokenSet.background,
460
456
  "--cmp-banner-border": tokenSet.border,
461
457
  "--cmp-banner-text": tokenSet.foreground,
462
- "--statusable-banner-background": tokenSet.background,
463
- "--statusable-banner-border": tokenSet.border,
464
- "--statusable-banner-foreground": tokenSet.foreground,
465
- "--statusable-banner-icon-color": tokenSet.foreground,
466
458
  ...style
467
459
  },
468
460
  ...rest,
469
461
  children: [
470
- resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-banner__icon statusable-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
471
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-banner__content statusable-banner__content", children: [
472
- heading ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "oods-banner__title statusable-banner__title", children: heading }) : null,
473
- body ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-banner__detail statusable-banner__description", children: body }) : null,
474
- actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-banner__actions statusable-banner__actions", children: actions }) : null
462
+ resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
463
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-banner__content", children: [
464
+ heading ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "oods-banner__title", children: heading }) : null,
465
+ body ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-banner__detail", children: body }) : null,
466
+ actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-banner__actions", children: actions }) : null
475
467
  ] }),
476
468
  onDismiss ? /* @__PURE__ */ jsxRuntime.jsx(
477
469
  "button",
478
470
  {
479
471
  type: "button",
480
- className: "oods-banner-dismiss oods-banner__dismiss statusable-banner__dismiss",
472
+ className: "oods-banner-dismiss oods-banner__dismiss",
481
473
  "aria-label": dismissLabel,
482
474
  onClick: () => onDismiss(),
483
475
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xD7" })
@@ -731,17 +723,16 @@ var InputPrimitive = React7__namespace.forwardRef(
731
723
  InputPrimitive.displayName = "OODS.Input";
732
724
  var Input = InputPrimitive;
733
725
  var DatePicker = React7__namespace.forwardRef(
734
- ({ pickerClassName, pickerStyle, inputClassName, inputStyle, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
726
+ ({ 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(
735
727
  Input,
736
728
  {
737
729
  ref,
738
730
  type: "date",
739
- "data-oods-component": "DatePicker",
740
731
  inputClassName: classes2("form-field__date-picker", inputClassName, pickerClassName),
741
732
  inputStyle: { ...inputStyle, ...pickerStyle },
742
733
  ...rest
743
734
  }
744
- )
735
+ ) })
745
736
  );
746
737
  DatePicker.displayName = "OODS.DatePicker";
747
738
  var Checkbox = React7__namespace.forwardRef(
@@ -1163,7 +1154,7 @@ var TableRoot = React7__namespace.forwardRef(
1163
1154
  ...rest,
1164
1155
  children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1165
1156
  caption ? /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { children: caption }) : null,
1166
- /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns?.map((column) => /* @__PURE__ */ jsxRuntime.jsx(TableHeaderCell, { numeric: column.numeric, children: column.label }, column.key)) }) }),
1157
+ /* @__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)) }) }),
1167
1158
  /* @__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(
1168
1159
  "tr",
1169
1160
  {
@@ -1450,6 +1441,7 @@ var StatusBadge = React7__namespace.forwardRef(
1450
1441
  compact,
1451
1442
  variant,
1452
1443
  title,
1444
+ className,
1453
1445
  "aria-label": ariaLabel,
1454
1446
  ...rest
1455
1447
  }, ref) => {
@@ -1467,6 +1459,7 @@ var StatusBadge = React7__namespace.forwardRef(
1467
1459
  content: children ?? content,
1468
1460
  title: title ?? presentation.description,
1469
1461
  "aria-label": ariaLabel ?? label ?? `Status: ${presentation.label}`,
1462
+ className: classes6("oods-status-badge", className),
1470
1463
  "data-oods-component": "StatusBadge",
1471
1464
  ...rest
1472
1465
  }
@@ -1605,29 +1598,29 @@ var TimelinePrimitive = React7__namespace.forwardRef(
1605
1598
  "data-timeline-type": kind,
1606
1599
  ...rest,
1607
1600
  children: [
1608
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "oods-timeline__title", children: title }),
1601
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "oods-timeline__title", "data-timeline-title": "true", children: title }),
1609
1602
  kind === "status" && status ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__current", "data-timeline-current": "true", children: [
1610
1603
  "Current status: ",
1611
1604
  humanize(status)
1612
1605
  ] }) : null,
1613
- transitionCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1606
+ transitionCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { "data-timeline-transitions": "true", children: [
1614
1607
  "Allowed transitions: ",
1615
1608
  allowedTransitions?.join(", ")
1616
1609
  ] }) : null,
1617
- children ?? /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "oods-timeline__events", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
1610
+ children ?? /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "oods-timeline__events", "data-timeline-events": "true", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
1618
1611
  const timestamp = event.timestamp ?? event.datetime;
1619
1612
  const actor = event.actor ?? event.actorId ?? event.actor_id;
1620
1613
  const eventLabel = event.label ?? event.title ?? (event.from && event.to ? `${humanize(event.from)} \u2192 ${humanize(event.to)}` : void 0) ?? (event.status ? humanize(event.status) : void 0) ?? (event.state ? humanize(event.state) : void 0) ?? "Event";
1621
1614
  const detail = event.detail ?? event.description;
1622
1615
  return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "oods-timeline__event", "data-timeline-event": "true", children: [
1623
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__label", children: eventLabel }),
1624
- timestamp ? /* @__PURE__ */ jsxRuntime.jsx("time", { dateTime: timestamp, children: componentContracts.formatDateTime(timestamp) }) : null,
1625
- detail ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__detail", children: detail }) : null,
1626
- showActorId && actor ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__actor", children: [
1616
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__label", "data-timeline-label": "true", children: eventLabel }),
1617
+ timestamp ? /* @__PURE__ */ jsxRuntime.jsx("time", { "data-timeline-time": "true", dateTime: timestamp, children: componentContracts.formatDateTime(timestamp) }) : null,
1618
+ detail ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__detail", "data-timeline-detail": "true", children: detail }) : null,
1619
+ showActorId && actor ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__actor", "data-timeline-actor": "true", children: [
1627
1620
  "Actor: ",
1628
1621
  actor
1629
1622
  ] }) : null,
1630
- showReason && event.reason ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__reason", children: [
1623
+ showReason && event.reason ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__reason", "data-timeline-reason": "true", children: [
1631
1624
  "Reason: ",
1632
1625
  event.reason
1633
1626
  ] }) : null
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Badge, Select, Input, Checkbox, Text } from './chunk-A4T7OOIY.js';
2
- export { AuditTimeline, Badge, Banner, Button, CancellationSummary, Card, Checkbox, DatePicker, Input, PaginationBar, PriceBadge, RelativeTimestamp, SearchInput, Select, StatusBadge, StatusTimeline, Text, Textarea } from './chunk-A4T7OOIY.js';
3
- export { Table } from './chunk-YCI5AEWL.js';
1
+ import { Badge, Select, Input, Checkbox, Text } from './chunk-BPEHI36W.js';
2
+ export { AuditTimeline, Badge, Banner, Button, CancellationSummary, Card, Checkbox, DatePicker, Input, PaginationBar, PriceBadge, RelativeTimestamp, SearchInput, Select, StatusBadge, StatusTimeline, Text, Textarea } from './chunk-BPEHI36W.js';
3
+ export { Table } from './chunk-XAWAMZUQ.js';
4
4
  import './chunk-G74PKSW3.js';
5
5
  import * as React3 from 'react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
package/dist/ported.cjs CHANGED
@@ -508,17 +508,16 @@ var InputPrimitive = React3__namespace.forwardRef(
508
508
  InputPrimitive.displayName = "OODS.Input";
509
509
  var Input = InputPrimitive;
510
510
  var DatePicker = React3__namespace.forwardRef(
511
- ({ pickerClassName, pickerStyle, inputClassName, inputStyle, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
511
+ ({ pickerClassName, pickerStyle, inputClassName, inputStyle, className, style, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes("oods-date-picker", className), style, "data-oods-component": "DatePicker", children: /* @__PURE__ */ jsxRuntime.jsx(
512
512
  Input,
513
513
  {
514
514
  ref,
515
515
  type: "date",
516
- "data-oods-component": "DatePicker",
517
516
  inputClassName: classes("form-field__date-picker", inputClassName, pickerClassName),
518
517
  inputStyle: { ...inputStyle, ...pickerStyle },
519
518
  ...rest
520
519
  }
521
- )
520
+ ) })
522
521
  );
523
522
  DatePicker.displayName = "OODS.DatePicker";
524
523
  var Checkbox = React3__namespace.forwardRef(
@@ -746,12 +745,12 @@ var Badge = React3__namespace.forwardRef(
746
745
  const resolvedContent = children ?? content ?? presentation?.label ?? status;
747
746
  const resolvedIcon = icon ?? resolveStatusGlyph(presentation?.iconName);
748
747
  const resolvedShowIcon = showIcon ?? resolvedIcon !== void 0;
749
- const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__icon statusable-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
748
+ const iconNode = resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__icon", "aria-hidden": "true", children: resolvedIcon }) : null;
750
749
  return /* @__PURE__ */ jsxRuntime.jsxs(
751
750
  "span",
752
751
  {
753
752
  ref,
754
- className: classes2("oods-badge", "statusable-badge", className),
753
+ className: classes2("oods-badge", className),
755
754
  "data-oods-component": "Badge",
756
755
  "data-status": status,
757
756
  "data-domain": domain,
@@ -763,16 +762,12 @@ var Badge = React3__namespace.forwardRef(
763
762
  "--cmp-badge-background": tokenSet.background,
764
763
  "--cmp-badge-border": tokenSet.border,
765
764
  "--cmp-badge-text": tokenSet.foreground,
766
- "--statusable-badge-background": tokenSet.background,
767
- "--statusable-badge-border": tokenSet.border,
768
- "--statusable-badge-foreground": tokenSet.foreground,
769
- "--statusable-badge-icon-color": tokenSet.foreground,
770
765
  ...style
771
766
  },
772
767
  ...rest,
773
768
  children: [
774
769
  iconPosition === "start" ? iconNode : null,
775
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__label statusable-badge__label", children: resolvedContent }),
770
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-badge__label", children: resolvedContent }),
776
771
  iconPosition === "end" ? iconNode : null
777
772
  ]
778
773
  }
@@ -814,7 +809,7 @@ var Banner = React3__namespace.forwardRef(
814
809
  ref,
815
810
  role,
816
811
  "aria-live": role === "alert" ? "assertive" : "polite",
817
- className: classes2("oods-banner", "statusable-banner", className),
812
+ className: classes2("oods-banner", className),
818
813
  "data-oods-component": "Banner",
819
814
  "data-status": status,
820
815
  "data-domain": domain,
@@ -824,25 +819,21 @@ var Banner = React3__namespace.forwardRef(
824
819
  "--cmp-banner-background": tokenSet.background,
825
820
  "--cmp-banner-border": tokenSet.border,
826
821
  "--cmp-banner-text": tokenSet.foreground,
827
- "--statusable-banner-background": tokenSet.background,
828
- "--statusable-banner-border": tokenSet.border,
829
- "--statusable-banner-foreground": tokenSet.foreground,
830
- "--statusable-banner-icon-color": tokenSet.foreground,
831
822
  ...style
832
823
  },
833
824
  ...rest,
834
825
  children: [
835
- resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-banner__icon statusable-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
836
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-banner__content statusable-banner__content", children: [
837
- heading ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "oods-banner__title statusable-banner__title", children: heading }) : null,
838
- body ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-banner__detail statusable-banner__description", children: body }) : null,
839
- actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-banner__actions statusable-banner__actions", children: actions }) : null
826
+ resolvedShowIcon && resolvedIcon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "oods-banner__icon", "aria-hidden": "true", children: resolvedIcon }) : null,
827
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oods-banner__content", children: [
828
+ heading ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: "oods-banner__title", children: heading }) : null,
829
+ body ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-banner__detail", children: body }) : null,
830
+ actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oods-banner__actions", children: actions }) : null
840
831
  ] }),
841
832
  onDismiss ? /* @__PURE__ */ jsxRuntime.jsx(
842
833
  "button",
843
834
  {
844
835
  type: "button",
845
- className: "oods-banner-dismiss oods-banner__dismiss statusable-banner__dismiss",
836
+ className: "oods-banner-dismiss oods-banner__dismiss",
846
837
  "aria-label": dismissLabel,
847
838
  onClick: () => onDismiss(),
848
839
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xD7" })
@@ -965,6 +956,7 @@ var StatusBadge = React3__namespace.forwardRef(
965
956
  compact,
966
957
  variant,
967
958
  title,
959
+ className,
968
960
  "aria-label": ariaLabel,
969
961
  ...rest
970
962
  }, ref) => {
@@ -982,6 +974,7 @@ var StatusBadge = React3__namespace.forwardRef(
982
974
  content: children ?? content,
983
975
  title: title ?? presentation.description,
984
976
  "aria-label": ariaLabel ?? label ?? `Status: ${presentation.label}`,
977
+ className: classes3("oods-status-badge", className),
985
978
  "data-oods-component": "StatusBadge",
986
979
  ...rest
987
980
  }
@@ -1120,29 +1113,29 @@ var TimelinePrimitive = React3__namespace.forwardRef(
1120
1113
  "data-timeline-type": kind,
1121
1114
  ...rest,
1122
1115
  children: [
1123
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "oods-timeline__title", children: title }),
1116
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "oods-timeline__title", "data-timeline-title": "true", children: title }),
1124
1117
  kind === "status" && status ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__current", "data-timeline-current": "true", children: [
1125
1118
  "Current status: ",
1126
1119
  humanize(status)
1127
1120
  ] }) : null,
1128
- transitionCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1121
+ transitionCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { "data-timeline-transitions": "true", children: [
1129
1122
  "Allowed transitions: ",
1130
1123
  allowedTransitions?.join(", ")
1131
1124
  ] }) : null,
1132
- children ?? /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "oods-timeline__events", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
1125
+ children ?? /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "oods-timeline__events", "data-timeline-events": "true", children: visibleEvents.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("li", { "data-timeline-empty": "true", children: "No events" }) : visibleEvents.map((event, index) => {
1133
1126
  const timestamp = event.timestamp ?? event.datetime;
1134
1127
  const actor = event.actor ?? event.actorId ?? event.actor_id;
1135
1128
  const eventLabel = event.label ?? event.title ?? (event.from && event.to ? `${humanize(event.from)} \u2192 ${humanize(event.to)}` : void 0) ?? (event.status ? humanize(event.status) : void 0) ?? (event.state ? humanize(event.state) : void 0) ?? "Event";
1136
1129
  const detail = event.detail ?? event.description;
1137
1130
  return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "oods-timeline__event", "data-timeline-event": "true", children: [
1138
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__label", children: eventLabel }),
1139
- timestamp ? /* @__PURE__ */ jsxRuntime.jsx("time", { dateTime: timestamp, children: componentContracts.formatDateTime(timestamp) }) : null,
1140
- detail ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__detail", children: detail }) : null,
1141
- showActorId && actor ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__actor", children: [
1131
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__label", "data-timeline-label": "true", children: eventLabel }),
1132
+ timestamp ? /* @__PURE__ */ jsxRuntime.jsx("time", { "data-timeline-time": "true", dateTime: timestamp, children: componentContracts.formatDateTime(timestamp) }) : null,
1133
+ detail ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "oods-timeline__detail", "data-timeline-detail": "true", children: detail }) : null,
1134
+ showActorId && actor ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__actor", "data-timeline-actor": "true", children: [
1142
1135
  "Actor: ",
1143
1136
  actor
1144
1137
  ] }) : null,
1145
- showReason && event.reason ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__reason", children: [
1138
+ showReason && event.reason ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "oods-timeline__reason", "data-timeline-reason": "true", children: [
1146
1139
  "Reason: ",
1147
1140
  event.reason
1148
1141
  ] }) : null
package/dist/ported.js CHANGED
@@ -1,2 +1,2 @@
1
- export { AuditTimeline, CancellationSummary, PaginationBar, PriceBadge, RelativeTimestamp, SearchInput, StatusBadge, StatusTimeline } from './chunk-A4T7OOIY.js';
1
+ export { AuditTimeline, CancellationSummary, PaginationBar, PriceBadge, RelativeTimestamp, SearchInput, StatusBadge, StatusTimeline } from './chunk-BPEHI36W.js';
2
2
  import './chunk-G74PKSW3.js';
package/dist/table.cjs CHANGED
@@ -468,7 +468,7 @@ var TableRoot = React__namespace.forwardRef(
468
468
  ...rest,
469
469
  children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
470
470
  caption ? /* @__PURE__ */ jsxRuntime.jsx(TableCaption, { children: caption }) : null,
471
- /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns?.map((column) => /* @__PURE__ */ jsxRuntime.jsx(TableHeaderCell, { numeric: column.numeric, children: column.label }, column.key)) }) }),
471
+ /* @__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)) }) }),
472
472
  /* @__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(
473
473
  "tr",
474
474
  {
package/dist/table.js CHANGED
@@ -1,2 +1,2 @@
1
- export { Table, TableBody, TableCaption, TableCell, TableHead, TableHeaderCell, TableRow } from './chunk-YCI5AEWL.js';
1
+ export { Table, TableBody, TableCaption, TableCell, TableHead, TableHeaderCell, TableRow } from './chunk-XAWAMZUQ.js';
2
2
  import './chunk-G74PKSW3.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oods/components-react",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "React components for OODS Foundry: the controls, layouts and domain views its generated screens use.",
5
5
  "homepage": "https://oods-foundry.com/",
6
6
  "bugs": {
@@ -64,8 +64,8 @@
64
64
  ],
65
65
  "dependencies": {
66
66
  "@radix-ui/react-slot": "^1.1.2",
67
- "@oods/component-contracts": "0.3.2",
68
- "@oods/component-styles": "0.3.2"
67
+ "@oods/component-contracts": "0.3.3",
68
+ "@oods/component-styles": "0.3.3"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": ">=18 <20",