@oods/components-vue 0.3.1 → 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
@@ -8,7 +8,7 @@ Vue components used by screens generated with OODS Foundry. The package exports
8
8
  npm install @oods/components-vue @oods/component-styles @oods/tokens @oods/component-contracts vue
9
9
  ```
10
10
 
11
- Use Vue 3. Bring your existing Vue app or use Forge's `code_generate` with `options.output: "application"` for an app entry and Vite configuration.
11
+ Use Vue 3. Bring your existing Vue app or use OODS Foundry's `code_generate` with `options.output: "application"` for an app entry and Vite configuration.
12
12
 
13
13
  ## First result
14
14
 
@@ -26,7 +26,7 @@ const review = () => window.alert('Connect this action to your application.');
26
26
 
27
27
  Set `data-brand="A"` and `data-theme="light"` on the root HTML element. The result is a button labelled “Review stock” that invokes the supplied handler. Set the theme to `dark` or `hc` for those scopes.
28
28
 
29
- Generated sample screens identify their sample data. A workflow's local store is not a production database; supply your data, navigation and persistence handlers. Retained component evidence covers named scenarios and themes, not every application you build. For your own implementation of a shipped component, use Forge's substitution mapping and inspect its advisory contract report.
29
+ Generated sample screens identify their sample data. A workflow's local store is not a production database; supply your data, navigation and persistence handlers. Retained component evidence covers named scenarios and themes, not every application you build. For your own implementation of a shipped component, use OODS Foundry's substitution mapping and inspect its advisory contract report.
30
30
 
31
31
  ## Limits
32
32
 
@@ -34,4 +34,4 @@ Use matching versions of the OODS packages. These packages are separate from the
34
34
 
35
35
  ## License
36
36
 
37
- Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
37
+ Apache License 2.0. See [LICENSE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.3.3/LICENSE) and [NOTICE](https://cdn.jsdelivr.net/npm/@oods/components-vue@0.3.3/NOTICE). Generated output belongs to its user; installed package dependencies retain their own licenses.
package/dist/index.cjs CHANGED
@@ -91,8 +91,8 @@ var Badge = vue.defineComponent({
91
91
  "--cmp-badge-text": `var(--sys-status-${palette}-text)`
92
92
  }
93
93
  }, [
94
- props.icon || slots.icon ? vue.h("span", { class: "oods-badge-icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
95
- slotOrValue(slots.default, props.content ?? statusLabel(props.status))
94
+ props.icon || slots.icon ? vue.h("span", { class: "oods-badge__icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
95
+ vue.h("span", { class: "oods-badge__label" }, [slotOrValue(slots.default, props.content ?? statusLabel(props.status))])
96
96
  ]);
97
97
  };
98
98
  }
@@ -116,7 +116,7 @@ var Banner = vue.defineComponent({
116
116
  return () => {
117
117
  const tone = resolveTone(props.tone, props.status, props.domain);
118
118
  const palette = tokenTone(tone);
119
- return vue.h("section", {
119
+ return vue.h("div", {
120
120
  class: "oods-banner",
121
121
  "data-oods-component": "Banner",
122
122
  "data-status": props.status,
@@ -131,17 +131,17 @@ var Banner = vue.defineComponent({
131
131
  "--cmp-banner-text": `var(--sys-status-${palette}-text)`
132
132
  }
133
133
  }, [
134
- vue.h("div", { class: "oods-banner-content" }, [
135
- props.title || props.status || slots.title ? vue.h("strong", { class: "oods-banner-title" }, [
134
+ vue.h("div", { class: "oods-banner__content" }, [
135
+ props.title || props.status || slots.title ? vue.h("strong", { class: "oods-banner__title" }, [
136
136
  slotOrValue(slots.title, props.title || statusLabel(props.status))
137
137
  ]) : null,
138
- props.detail ? vue.h("p", { class: "oods-banner-detail" }, props.detail) : null,
139
- slots.default || props.content ? vue.h(slots.default ? "div" : "p", { class: "oods-banner-body" }, [slotOrValue(slots.default, props.content)]) : null,
140
- slots.actions ? vue.h("div", { class: "oods-banner-actions" }, slots.actions()) : null
138
+ props.detail ? vue.h("p", { class: "oods-banner__detail" }, props.detail) : null,
139
+ slots.default || props.content ? vue.h(slots.default ? "div" : "p", { class: "oods-banner__body" }, [slotOrValue(slots.default, props.content)]) : null,
140
+ slots.actions ? vue.h("div", { class: "oods-banner__actions" }, slots.actions()) : null
141
141
  ]),
142
142
  props.dismissLabel ? vue.h("button", {
143
143
  type: "button",
144
- class: "oods-banner-dismiss",
144
+ class: "oods-banner-dismiss oods-banner__dismiss",
145
145
  "aria-label": props.dismissLabel,
146
146
  onClick: () => emit("dismiss")
147
147
  }, [vue.h("span", { "aria-hidden": "true" }, "\xD7")]) : null
@@ -433,6 +433,7 @@ var ColorizedBadge = vue.defineComponent({
433
433
  const color = firstText(props.color, props.hue, props.swatch, props.state);
434
434
  const variant = firstText(props.variant) ?? "colorized";
435
435
  return vue.h(Badge, {
436
+ class: "oods-colorized-badge",
436
437
  status,
437
438
  tone: props.tone,
438
439
  emphasis: props.emphasis,
@@ -721,7 +722,7 @@ function createBadgeFamily(options) {
721
722
  const content = authoredContent(slots.default?.());
722
723
  const scalar = scalarContent(content);
723
724
  const read = (key) => typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? String(record[key]) : record[key];
724
- const label = scalar ?? firstText(...options.labelKeys.map((key) => options.component === "CancellationBadge" && typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? record[key] ? "Cancellation scheduled" : "No cancellation scheduled" : read(key))) ?? options.defaultLabel;
725
+ const label = scalar ?? firstText(...options.labelKeys.map((key) => options.booleanLabels && typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? options.booleanLabels[record[key] ? 0 : 1] : read(key))) ?? options.defaultLabel;
725
726
  const status = firstText(...options.statusKeys.map(read));
726
727
  const variant = firstText(record.variant) ?? options.defaultVariant;
727
728
  return vue.h(Badge, {
@@ -1364,7 +1365,8 @@ var ArchivePill = createBadgeFamily({
1364
1365
  labelKeys: ["label", "text", "status", "state", "isArchived", "value"],
1365
1366
  statusKeys: ["status", "state", "isArchived", "value"],
1366
1367
  extraProps: ["isArchived"],
1367
- booleanProps: ["isArchived", "value"]
1368
+ booleanProps: ["isArchived", "value"],
1369
+ booleanLabels: ["Archived", "Not archived"]
1368
1370
  });
1369
1371
  var CancellationBadge = createBadgeFamily({
1370
1372
  component: "CancellationBadge",
@@ -1374,7 +1376,8 @@ var CancellationBadge = createBadgeFamily({
1374
1376
  labelKeys: ["label", "text", "status", "state", "cancelAtPeriodEnd", "value"],
1375
1377
  statusKeys: ["status", "state", "cancelAtPeriodEnd", "isCancelled", "value"],
1376
1378
  extraProps: ["cancelAtPeriodEnd", "isCancelled"],
1377
- booleanProps: ["cancelAtPeriodEnd", "isCancelled", "value"]
1379
+ booleanProps: ["cancelAtPeriodEnd", "isCancelled", "value"],
1380
+ booleanLabels: ["Cancellation scheduled", "No cancellation scheduled"]
1378
1381
  });
1379
1382
  var ArchiveSummary = vue.defineComponent({
1380
1383
  name: "OodsArchiveSummary",
@@ -1397,7 +1400,7 @@ var PriceCardMeta = vue.defineComponent({
1397
1400
  setup(props, { slots }) {
1398
1401
  return () => {
1399
1402
  const content = authoredContent(slots.default?.());
1400
- const terms = [["Model", firstText(props.model, props.pricingModel)], ["Interval", firstText(props.interval, props.billingInterval)]].filter((entry) => entry[1] !== void 0);
1403
+ const terms = [["Model", componentContracts.formatPriceCode(firstText(props.model, props.pricingModel))], ["Interval", componentContracts.formatPriceCode(firstText(props.interval, props.billingInterval))]].filter((entry) => entry[1] !== void 0);
1401
1404
  return vue.h("div", { class: "oods-price-card-meta", "data-oods-component": "PriceCardMeta", "data-meta-type": "price" }, content.length ? content : [
1402
1405
  vue.h("span", { "data-meta-title": "true" }, firstText(props.title, props.label, props.heading, props.name) ?? "Price"),
1403
1406
  ...terms.map(([term, value]) => vue.h("span", { key: term, "data-meta-item": "true" }, [vue.h("strong", `${term}:`), ` ${value}`]))
@@ -1504,7 +1507,9 @@ var Input = vue.defineComponent({
1504
1507
  name: "OodsInput",
1505
1508
  props: {
1506
1509
  ...textFieldProps,
1507
- type: { type: String, default: "text" }
1510
+ type: { type: String, default: "text" },
1511
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1512
+ inputClass: String
1508
1513
  },
1509
1514
  emits: {
1510
1515
  "update:modelValue": (_value) => true,
@@ -1522,7 +1527,7 @@ var Input = vue.defineComponent({
1522
1527
  };
1523
1528
  return () => renderField("Input", props, slots, metadata, vue.h("input", {
1524
1529
  id: metadata.controlId.value,
1525
- class: "oods-field-control",
1530
+ class: props.inputClass ? ["oods-field-control", props.inputClass] : "oods-field-control",
1526
1531
  type: props.type,
1527
1532
  name: props.name,
1528
1533
  value: props.type === "datetime-local" ? componentContracts.dateTimeInputValue(currentValue.value) : currentValue.value,
@@ -1725,25 +1730,25 @@ var Checkbox = vue.defineComponent({
1725
1730
  var TableCaption = vue.defineComponent({
1726
1731
  name: "OodsTableCaption",
1727
1732
  setup(_props, { slots }) {
1728
- return () => vue.h("caption", {}, slots.default?.());
1733
+ return () => vue.h("caption", { class: "oods-table__caption" }, slots.default?.());
1729
1734
  }
1730
1735
  });
1731
1736
  var TableHead = vue.defineComponent({
1732
1737
  name: "OodsTableHead",
1733
1738
  setup(_props, { slots }) {
1734
- return () => vue.h("thead", {}, slots.default?.());
1739
+ return () => vue.h("thead", { class: "oods-table__header" }, slots.default?.());
1735
1740
  }
1736
1741
  });
1737
1742
  var TableBody = vue.defineComponent({
1738
1743
  name: "OodsTableBody",
1739
1744
  setup(_props, { slots }) {
1740
- return () => vue.h("tbody", {}, slots.default?.());
1745
+ return () => vue.h("tbody", { class: "oods-table__body" }, slots.default?.());
1741
1746
  }
1742
1747
  });
1743
1748
  var TableRow = vue.defineComponent({
1744
1749
  name: "OodsTableRow",
1745
1750
  setup(_props, { slots }) {
1746
- return () => vue.h("tr", {}, slots.default?.());
1751
+ return () => vue.h("tr", { class: "oods-table__row" }, slots.default?.());
1747
1752
  }
1748
1753
  });
1749
1754
  var TableHeaderCell = vue.defineComponent({
@@ -1752,17 +1757,18 @@ var TableHeaderCell = vue.defineComponent({
1752
1757
  scope: { type: String, default: "col" }
1753
1758
  },
1754
1759
  setup(props, { slots }) {
1755
- return () => vue.h("th", { scope: props.scope }, slots.default?.());
1760
+ return () => vue.h("th", { class: "oods-table__header-cell", scope: props.scope }, slots.default?.());
1756
1761
  }
1757
1762
  });
1758
1763
  var TableCell = vue.defineComponent({
1759
1764
  name: "OodsTableCell",
1760
1765
  setup(_props, { slots }) {
1761
- return () => vue.h("td", {}, slots.default?.());
1766
+ return () => vue.h("td", { class: "oods-table__cell" }, slots.default?.());
1762
1767
  }
1763
1768
  });
1764
1769
  var Table = vue.defineComponent({
1765
1770
  name: "OodsTable",
1771
+ inheritAttrs: false,
1766
1772
  props: {
1767
1773
  caption: { type: String, default: "" },
1768
1774
  columns: { type: Array, default: () => [] },
@@ -1773,16 +1779,17 @@ var Table = vue.defineComponent({
1773
1779
  emits: {
1774
1780
  rowActivate: (_rowId) => true
1775
1781
  },
1776
- setup(props, { emit, slots }) {
1782
+ setup(props, { attrs, emit, slots }) {
1777
1783
  const activate = (row) => emit("rowActivate", row.id);
1778
- return () => vue.h("table", {
1779
- class: "oods-table",
1784
+ return () => vue.h("div", { class: "oods-table__container", "data-density": props.density }, [vue.h("table", {
1785
+ ...attrs,
1786
+ class: ["oods-table", attrs.class],
1780
1787
  "data-oods-component": "Table",
1781
1788
  "data-density": props.density
1782
1789
  }, [
1783
- vue.h(TableCaption, {}, {
1790
+ slots.caption || props.caption ? vue.h(TableCaption, {}, {
1784
1791
  default: () => slots.caption?.() ?? props.caption
1785
- }),
1792
+ }) : null,
1786
1793
  vue.h(TableHead, {}, {
1787
1794
  default: () => slots.head?.() ?? vue.h(TableRow, {}, {
1788
1795
  default: () => props.columns.map((column) => vue.h(TableHeaderCell, { key: column.key }, {
@@ -1797,7 +1804,7 @@ var Table = vue.defineComponent({
1797
1804
  }, {
1798
1805
  default: () => "No rows available."
1799
1806
  })
1800
- }) : props.rows.map((row, rowIndex) => slots.row?.({ row, rowIndex, activate: () => activate(row) }) ?? vue.h(TableRow, { key: row.id }, {
1807
+ }) : props.rows.map((row, rowIndex) => slots.row?.({ row, rowIndex, activate: () => activate(row) }) ?? vue.h(TableRow, { key: row.id, "data-selectable": props.selectable ? "true" : void 0 }, {
1801
1808
  default: () => props.columns.map((column, columnIndex) => {
1802
1809
  const content = slots.cell?.({ row, column, value: row[column.key] }) ?? String(row[column.key] ?? "");
1803
1810
  return vue.h(TableCell, { key: column.key }, {
@@ -1810,7 +1817,7 @@ var Table = vue.defineComponent({
1810
1817
  })
1811
1818
  })))
1812
1819
  })
1813
- ]);
1820
+ ])]);
1814
1821
  }
1815
1822
  });
1816
1823
  function itemDisabled(item) {
@@ -2332,12 +2339,12 @@ var timelineProps = {
2332
2339
  };
2333
2340
  function renderTimelineEvent(event, index, showActorId, showReason) {
2334
2341
  return vue.h("li", { key: `${event.timestamp ?? "event"}-${index}` }, [
2335
- vue.h("article", { "data-timeline-event": "true" }, [
2336
- vue.h("p", { "data-timeline-label": "true" }, event.label),
2342
+ vue.h("article", { class: "oods-timeline__event", "data-timeline-event": "true" }, [
2343
+ vue.h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
2337
2344
  event.timestamp ? vue.h("time", { "data-timeline-time": "true", datetime: event.timestamp }, componentContracts.formatDateTime(event.timestamp)) : null,
2338
- event.detail ? vue.h("p", { "data-timeline-detail": "true" }, event.detail) : null,
2339
- showActorId && event.actorId ? vue.h("p", { "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2340
- showReason && event.reason ? vue.h("p", { "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2345
+ event.detail ? vue.h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
2346
+ showActorId && event.actorId ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2347
+ showReason && event.reason ? vue.h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2341
2348
  ])
2342
2349
  ]);
2343
2350
  }
@@ -2355,16 +2362,16 @@ function timelineComponent(configuration) {
2355
2362
  const slottedEvents = slots.default?.();
2356
2363
  return vue.h("div", {
2357
2364
  ...attrs,
2358
- class: mergedClass("oods-timeline", attrs.class),
2365
+ class: mergedClass(`oods-timeline oods-${configuration.timelineType}-timeline`, attrs.class),
2359
2366
  role: "log",
2360
2367
  "aria-label": stringValue(attrs["aria-label"]) ?? title,
2361
2368
  "data-oods-component": configuration.componentId,
2362
2369
  "data-timeline-type": configuration.timelineType
2363
2370
  }, [
2364
- vue.h("h2", { "data-timeline-title": "true" }, title),
2365
- props.status ? vue.h("p", { "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
2371
+ vue.h("h2", { class: "oods-timeline__title", "data-timeline-title": "true" }, title),
2372
+ props.status ? vue.h("p", { class: "oods-timeline__current", "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
2366
2373
  props.allowedTransitions?.length ? vue.h("p", { "data-timeline-transitions": "true" }, `Allowed transitions: ${props.allowedTransitions.join(", ")}`) : null,
2367
- vue.h("ol", { "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
2374
+ vue.h("ol", { class: "oods-timeline__events", "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
2368
2375
  event,
2369
2376
  index,
2370
2377
  props.showActorId,
@@ -2520,8 +2527,7 @@ var SearchInput = vue.defineComponent({
2520
2527
  updateValue("");
2521
2528
  emit("clear");
2522
2529
  };
2523
- const submit = (event) => {
2524
- event.preventDefault();
2530
+ const searchNow = () => {
2525
2531
  if (!props.disabled) {
2526
2532
  if (timer !== void 0) clearTimeout(timer);
2527
2533
  emitSearch(currentValue.value);
@@ -2530,14 +2536,13 @@ var SearchInput = vue.defineComponent({
2530
2536
  return () => {
2531
2537
  const id = props.id ?? `oods-search-${generatedId.replace(/:/g, "")}`;
2532
2538
  const ariaLabel = stringValue(attrs["aria-label"]) ?? props.label ?? props.placeholder;
2533
- return vue.h("form", {
2539
+ return vue.h("div", {
2534
2540
  ...attrs,
2535
2541
  class: mergedClass("oods-search-input", attrs.class),
2536
2542
  role: "search",
2537
2543
  "aria-label": ariaLabel,
2538
2544
  "data-oods-component": "SearchInput",
2539
- "data-behavioral": "search",
2540
- onSubmit: submit
2545
+ "data-behavioral": "search"
2541
2546
  }, [
2542
2547
  vue.h(Input, {
2543
2548
  id,
@@ -2546,14 +2551,20 @@ var SearchInput = vue.defineComponent({
2546
2551
  value: currentValue.value,
2547
2552
  placeholder: props.placeholder,
2548
2553
  disabled: props.disabled,
2554
+ inputClass: "oods-search-input__control",
2549
2555
  "aria-label": props.label ? void 0 : ariaLabel,
2550
2556
  onInput: (value) => updateValue(value),
2551
2557
  onKeydown: (event) => {
2552
2558
  if (event.key === "Escape") clear();
2559
+ if (event.key === "Enter") {
2560
+ event.preventDefault();
2561
+ searchNow();
2562
+ }
2553
2563
  }
2554
2564
  }),
2555
2565
  props.clearable && currentValue.value ? vue.h("button", {
2556
2566
  type: "button",
2567
+ class: "oods-search-input__clear",
2557
2568
  "data-search-clear": "true",
2558
2569
  "aria-label": "Clear search",
2559
2570
  disabled: props.disabled,
@@ -2963,7 +2974,7 @@ function summary(id) {
2963
2974
  } });
2964
2975
  }
2965
2976
  function preview(id, type) {
2966
- return vue.defineComponent({ name: id, props: { svg: String, title: String, description: String, width: Number, height: Number }, setup(props, { slots }) {
2977
+ return vue.defineComponent({ name: id, props: { svg: String, svgNarrow: String, svgWide: String, title: String, description: String, width: Number, height: Number }, setup(props, { slots }) {
2967
2978
  return () => vue.h(VizAreaPreview, { ...props, title: props.title ?? `${type[0].toUpperCase()}${type.slice(1)} chart`, "data-oods-component": id, "data-viz-preview-type": type }, { default: slots.default ?? (() => vue.h(Text, { content: "No rendered chart supplied" })) });
2968
2979
  } });
2969
2980
  }
package/dist/index.d.cts CHANGED
@@ -1705,6 +1705,8 @@ declare const Input: vue.DefineComponent<vue.ExtractPropTypes<{
1705
1705
  type: StringConstructor;
1706
1706
  default: string;
1707
1707
  };
1708
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1709
+ inputClass: StringConstructor;
1708
1710
  id: StringConstructor;
1709
1711
  label: StringConstructor;
1710
1712
  modelValue: StringConstructor;
@@ -1734,6 +1736,8 @@ declare const Input: vue.DefineComponent<vue.ExtractPropTypes<{
1734
1736
  type: StringConstructor;
1735
1737
  default: string;
1736
1738
  };
1739
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1740
+ inputClass: StringConstructor;
1737
1741
  id: StringConstructor;
1738
1742
  label: StringConstructor;
1739
1743
  modelValue: StringConstructor;
@@ -3972,6 +3976,8 @@ declare const VizRoleBadge: vue.DefineComponent<vue.ExtractPropTypes<{
3972
3976
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3973
3977
  declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3974
3978
  svg: StringConstructor;
3979
+ svgNarrow: StringConstructor;
3980
+ svgWide: StringConstructor;
3975
3981
  title: StringConstructor;
3976
3982
  description: StringConstructor;
3977
3983
  width: NumberConstructor;
@@ -3980,6 +3986,8 @@ declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3980
3986
  [key: string]: any;
3981
3987
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
3982
3988
  svg: StringConstructor;
3989
+ svgNarrow: StringConstructor;
3990
+ svgWide: StringConstructor;
3983
3991
  title: StringConstructor;
3984
3992
  description: StringConstructor;
3985
3993
  width: NumberConstructor;
@@ -3987,6 +3995,8 @@ declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3987
3995
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3988
3996
  declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3989
3997
  svg: StringConstructor;
3998
+ svgNarrow: StringConstructor;
3999
+ svgWide: StringConstructor;
3990
4000
  title: StringConstructor;
3991
4001
  description: StringConstructor;
3992
4002
  width: NumberConstructor;
@@ -3995,6 +4005,8 @@ declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3995
4005
  [key: string]: any;
3996
4006
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
3997
4007
  svg: StringConstructor;
4008
+ svgNarrow: StringConstructor;
4009
+ svgWide: StringConstructor;
3998
4010
  title: StringConstructor;
3999
4011
  description: StringConstructor;
4000
4012
  width: NumberConstructor;
@@ -4002,6 +4014,8 @@ declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4002
4014
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4003
4015
  declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4004
4016
  svg: StringConstructor;
4017
+ svgNarrow: StringConstructor;
4018
+ svgWide: StringConstructor;
4005
4019
  title: StringConstructor;
4006
4020
  description: StringConstructor;
4007
4021
  width: NumberConstructor;
@@ -4010,6 +4024,8 @@ declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4010
4024
  [key: string]: any;
4011
4025
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4012
4026
  svg: StringConstructor;
4027
+ svgNarrow: StringConstructor;
4028
+ svgWide: StringConstructor;
4013
4029
  title: StringConstructor;
4014
4030
  description: StringConstructor;
4015
4031
  width: NumberConstructor;
@@ -4017,6 +4033,8 @@ declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4017
4033
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4018
4034
  declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4019
4035
  svg: StringConstructor;
4036
+ svgNarrow: StringConstructor;
4037
+ svgWide: StringConstructor;
4020
4038
  title: StringConstructor;
4021
4039
  description: StringConstructor;
4022
4040
  width: NumberConstructor;
@@ -4025,6 +4043,8 @@ declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4025
4043
  [key: string]: any;
4026
4044
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4027
4045
  svg: StringConstructor;
4046
+ svgNarrow: StringConstructor;
4047
+ svgWide: StringConstructor;
4028
4048
  title: StringConstructor;
4029
4049
  description: StringConstructor;
4030
4050
  width: NumberConstructor;
@@ -4032,6 +4052,8 @@ declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4032
4052
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4033
4053
  declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4034
4054
  svg: StringConstructor;
4055
+ svgNarrow: StringConstructor;
4056
+ svgWide: StringConstructor;
4035
4057
  title: StringConstructor;
4036
4058
  description: StringConstructor;
4037
4059
  width: NumberConstructor;
@@ -4040,6 +4062,8 @@ declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4040
4062
  [key: string]: any;
4041
4063
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4042
4064
  svg: StringConstructor;
4065
+ svgNarrow: StringConstructor;
4066
+ svgWide: StringConstructor;
4043
4067
  title: StringConstructor;
4044
4068
  description: StringConstructor;
4045
4069
  width: NumberConstructor;
@@ -4047,6 +4071,8 @@ declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4047
4071
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4048
4072
  declare const VizScatterPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4049
4073
  svg: StringConstructor;
4074
+ svgNarrow: StringConstructor;
4075
+ svgWide: StringConstructor;
4050
4076
  title: StringConstructor;
4051
4077
  description: StringConstructor;
4052
4078
  width: NumberConstructor;
@@ -4055,6 +4081,8 @@ declare const VizScatterPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4055
4081
  [key: string]: any;
4056
4082
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4057
4083
  svg: StringConstructor;
4084
+ svgNarrow: StringConstructor;
4085
+ svgWide: StringConstructor;
4058
4086
  title: StringConstructor;
4059
4087
  description: StringConstructor;
4060
4088
  width: NumberConstructor;
package/dist/index.d.ts CHANGED
@@ -1705,6 +1705,8 @@ declare const Input: vue.DefineComponent<vue.ExtractPropTypes<{
1705
1705
  type: StringConstructor;
1706
1706
  default: string;
1707
1707
  };
1708
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1709
+ inputClass: StringConstructor;
1708
1710
  id: StringConstructor;
1709
1711
  label: StringConstructor;
1710
1712
  modelValue: StringConstructor;
@@ -1734,6 +1736,8 @@ declare const Input: vue.DefineComponent<vue.ExtractPropTypes<{
1734
1736
  type: StringConstructor;
1735
1737
  default: string;
1736
1738
  };
1739
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1740
+ inputClass: StringConstructor;
1737
1741
  id: StringConstructor;
1738
1742
  label: StringConstructor;
1739
1743
  modelValue: StringConstructor;
@@ -3972,6 +3976,8 @@ declare const VizRoleBadge: vue.DefineComponent<vue.ExtractPropTypes<{
3972
3976
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3973
3977
  declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3974
3978
  svg: StringConstructor;
3979
+ svgNarrow: StringConstructor;
3980
+ svgWide: StringConstructor;
3975
3981
  title: StringConstructor;
3976
3982
  description: StringConstructor;
3977
3983
  width: NumberConstructor;
@@ -3980,6 +3986,8 @@ declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3980
3986
  [key: string]: any;
3981
3987
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
3982
3988
  svg: StringConstructor;
3989
+ svgNarrow: StringConstructor;
3990
+ svgWide: StringConstructor;
3983
3991
  title: StringConstructor;
3984
3992
  description: StringConstructor;
3985
3993
  width: NumberConstructor;
@@ -3987,6 +3995,8 @@ declare const VizHeatmapPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3987
3995
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
3988
3996
  declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3989
3997
  svg: StringConstructor;
3998
+ svgNarrow: StringConstructor;
3999
+ svgWide: StringConstructor;
3990
4000
  title: StringConstructor;
3991
4001
  description: StringConstructor;
3992
4002
  width: NumberConstructor;
@@ -3995,6 +4005,8 @@ declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
3995
4005
  [key: string]: any;
3996
4006
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
3997
4007
  svg: StringConstructor;
4008
+ svgNarrow: StringConstructor;
4009
+ svgWide: StringConstructor;
3998
4010
  title: StringConstructor;
3999
4011
  description: StringConstructor;
4000
4012
  width: NumberConstructor;
@@ -4002,6 +4014,8 @@ declare const VizGraphPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4002
4014
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4003
4015
  declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4004
4016
  svg: StringConstructor;
4017
+ svgNarrow: StringConstructor;
4018
+ svgWide: StringConstructor;
4005
4019
  title: StringConstructor;
4006
4020
  description: StringConstructor;
4007
4021
  width: NumberConstructor;
@@ -4010,6 +4024,8 @@ declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4010
4024
  [key: string]: any;
4011
4025
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4012
4026
  svg: StringConstructor;
4027
+ svgNarrow: StringConstructor;
4028
+ svgWide: StringConstructor;
4013
4029
  title: StringConstructor;
4014
4030
  description: StringConstructor;
4015
4031
  width: NumberConstructor;
@@ -4017,6 +4033,8 @@ declare const VizLinePreview: vue.DefineComponent<vue.ExtractPropTypes<{
4017
4033
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4018
4034
  declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4019
4035
  svg: StringConstructor;
4036
+ svgNarrow: StringConstructor;
4037
+ svgWide: StringConstructor;
4020
4038
  title: StringConstructor;
4021
4039
  description: StringConstructor;
4022
4040
  width: NumberConstructor;
@@ -4025,6 +4043,8 @@ declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4025
4043
  [key: string]: any;
4026
4044
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4027
4045
  svg: StringConstructor;
4046
+ svgNarrow: StringConstructor;
4047
+ svgWide: StringConstructor;
4028
4048
  title: StringConstructor;
4029
4049
  description: StringConstructor;
4030
4050
  width: NumberConstructor;
@@ -4032,6 +4052,8 @@ declare const VizMarkPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4032
4052
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4033
4053
  declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4034
4054
  svg: StringConstructor;
4055
+ svgNarrow: StringConstructor;
4056
+ svgWide: StringConstructor;
4035
4057
  title: StringConstructor;
4036
4058
  description: StringConstructor;
4037
4059
  width: NumberConstructor;
@@ -4040,6 +4062,8 @@ declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4040
4062
  [key: string]: any;
4041
4063
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4042
4064
  svg: StringConstructor;
4065
+ svgNarrow: StringConstructor;
4066
+ svgWide: StringConstructor;
4043
4067
  title: StringConstructor;
4044
4068
  description: StringConstructor;
4045
4069
  width: NumberConstructor;
@@ -4047,6 +4071,8 @@ declare const VizPointPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4047
4071
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
4048
4072
  declare const VizScatterPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4049
4073
  svg: StringConstructor;
4074
+ svgNarrow: StringConstructor;
4075
+ svgWide: StringConstructor;
4050
4076
  title: StringConstructor;
4051
4077
  description: StringConstructor;
4052
4078
  width: NumberConstructor;
@@ -4055,6 +4081,8 @@ declare const VizScatterPreview: vue.DefineComponent<vue.ExtractPropTypes<{
4055
4081
  [key: string]: any;
4056
4082
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
4057
4083
  svg: StringConstructor;
4084
+ svgNarrow: StringConstructor;
4085
+ svgWide: StringConstructor;
4058
4086
  title: StringConstructor;
4059
4087
  description: StringConstructor;
4060
4088
  width: NumberConstructor;
package/dist/index.js CHANGED
@@ -89,8 +89,8 @@ var Badge = defineComponent({
89
89
  "--cmp-badge-text": `var(--sys-status-${palette}-text)`
90
90
  }
91
91
  }, [
92
- props.icon || slots.icon ? h("span", { class: "oods-badge-icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
93
- slotOrValue(slots.default, props.content ?? statusLabel(props.status))
92
+ props.icon || slots.icon ? h("span", { class: "oods-badge__icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
93
+ h("span", { class: "oods-badge__label" }, [slotOrValue(slots.default, props.content ?? statusLabel(props.status))])
94
94
  ]);
95
95
  };
96
96
  }
@@ -114,7 +114,7 @@ var Banner = defineComponent({
114
114
  return () => {
115
115
  const tone = resolveTone(props.tone, props.status, props.domain);
116
116
  const palette = tokenTone(tone);
117
- return h("section", {
117
+ return h("div", {
118
118
  class: "oods-banner",
119
119
  "data-oods-component": "Banner",
120
120
  "data-status": props.status,
@@ -129,17 +129,17 @@ var Banner = defineComponent({
129
129
  "--cmp-banner-text": `var(--sys-status-${palette}-text)`
130
130
  }
131
131
  }, [
132
- h("div", { class: "oods-banner-content" }, [
133
- props.title || props.status || slots.title ? h("strong", { class: "oods-banner-title" }, [
132
+ h("div", { class: "oods-banner__content" }, [
133
+ props.title || props.status || slots.title ? h("strong", { class: "oods-banner__title" }, [
134
134
  slotOrValue(slots.title, props.title || statusLabel(props.status))
135
135
  ]) : null,
136
- props.detail ? h("p", { class: "oods-banner-detail" }, props.detail) : null,
137
- slots.default || props.content ? h(slots.default ? "div" : "p", { class: "oods-banner-body" }, [slotOrValue(slots.default, props.content)]) : null,
138
- slots.actions ? h("div", { class: "oods-banner-actions" }, slots.actions()) : null
136
+ props.detail ? h("p", { class: "oods-banner__detail" }, props.detail) : null,
137
+ slots.default || props.content ? h(slots.default ? "div" : "p", { class: "oods-banner__body" }, [slotOrValue(slots.default, props.content)]) : null,
138
+ slots.actions ? h("div", { class: "oods-banner__actions" }, slots.actions()) : null
139
139
  ]),
140
140
  props.dismissLabel ? h("button", {
141
141
  type: "button",
142
- class: "oods-banner-dismiss",
142
+ class: "oods-banner-dismiss oods-banner__dismiss",
143
143
  "aria-label": props.dismissLabel,
144
144
  onClick: () => emit("dismiss")
145
145
  }, [h("span", { "aria-hidden": "true" }, "\xD7")]) : null
@@ -431,6 +431,7 @@ var ColorizedBadge = defineComponent({
431
431
  const color = firstText(props.color, props.hue, props.swatch, props.state);
432
432
  const variant = firstText(props.variant) ?? "colorized";
433
433
  return h(Badge, {
434
+ class: "oods-colorized-badge",
434
435
  status,
435
436
  tone: props.tone,
436
437
  emphasis: props.emphasis,
@@ -719,7 +720,7 @@ function createBadgeFamily(options) {
719
720
  const content = authoredContent(slots.default?.());
720
721
  const scalar = scalarContent(content);
721
722
  const read = (key) => typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? String(record[key]) : record[key];
722
- const label = scalar ?? firstText(...options.labelKeys.map((key) => options.component === "CancellationBadge" && typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? record[key] ? "Cancellation scheduled" : "No cancellation scheduled" : read(key))) ?? options.defaultLabel;
723
+ const label = scalar ?? firstText(...options.labelKeys.map((key) => options.booleanLabels && typeof record[key] === "boolean" && options.booleanProps?.includes(key) ? options.booleanLabels[record[key] ? 0 : 1] : read(key))) ?? options.defaultLabel;
723
724
  const status = firstText(...options.statusKeys.map(read));
724
725
  const variant = firstText(record.variant) ?? options.defaultVariant;
725
726
  return h(Badge, {
@@ -1362,7 +1363,8 @@ var ArchivePill = createBadgeFamily({
1362
1363
  labelKeys: ["label", "text", "status", "state", "isArchived", "value"],
1363
1364
  statusKeys: ["status", "state", "isArchived", "value"],
1364
1365
  extraProps: ["isArchived"],
1365
- booleanProps: ["isArchived", "value"]
1366
+ booleanProps: ["isArchived", "value"],
1367
+ booleanLabels: ["Archived", "Not archived"]
1366
1368
  });
1367
1369
  var CancellationBadge = createBadgeFamily({
1368
1370
  component: "CancellationBadge",
@@ -1372,7 +1374,8 @@ var CancellationBadge = createBadgeFamily({
1372
1374
  labelKeys: ["label", "text", "status", "state", "cancelAtPeriodEnd", "value"],
1373
1375
  statusKeys: ["status", "state", "cancelAtPeriodEnd", "isCancelled", "value"],
1374
1376
  extraProps: ["cancelAtPeriodEnd", "isCancelled"],
1375
- booleanProps: ["cancelAtPeriodEnd", "isCancelled", "value"]
1377
+ booleanProps: ["cancelAtPeriodEnd", "isCancelled", "value"],
1378
+ booleanLabels: ["Cancellation scheduled", "No cancellation scheduled"]
1376
1379
  });
1377
1380
  var ArchiveSummary = defineComponent({
1378
1381
  name: "OodsArchiveSummary",
@@ -1395,7 +1398,7 @@ var PriceCardMeta = defineComponent({
1395
1398
  setup(props, { slots }) {
1396
1399
  return () => {
1397
1400
  const content = authoredContent(slots.default?.());
1398
- const terms = [["Model", firstText(props.model, props.pricingModel)], ["Interval", firstText(props.interval, props.billingInterval)]].filter((entry) => entry[1] !== void 0);
1401
+ const terms = [["Model", formatPriceCode(firstText(props.model, props.pricingModel))], ["Interval", formatPriceCode(firstText(props.interval, props.billingInterval))]].filter((entry) => entry[1] !== void 0);
1399
1402
  return h("div", { class: "oods-price-card-meta", "data-oods-component": "PriceCardMeta", "data-meta-type": "price" }, content.length ? content : [
1400
1403
  h("span", { "data-meta-title": "true" }, firstText(props.title, props.label, props.heading, props.name) ?? "Price"),
1401
1404
  ...terms.map(([term, value]) => h("span", { key: term, "data-meta-item": "true" }, [h("strong", `${term}:`), ` ${value}`]))
@@ -1502,7 +1505,9 @@ var Input = defineComponent({
1502
1505
  name: "OodsInput",
1503
1506
  props: {
1504
1507
  ...textFieldProps,
1505
- type: { type: String, default: "text" }
1508
+ type: { type: String, default: "text" },
1509
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
1510
+ inputClass: String
1506
1511
  },
1507
1512
  emits: {
1508
1513
  "update:modelValue": (_value) => true,
@@ -1520,7 +1525,7 @@ var Input = defineComponent({
1520
1525
  };
1521
1526
  return () => renderField("Input", props, slots, metadata, h("input", {
1522
1527
  id: metadata.controlId.value,
1523
- class: "oods-field-control",
1528
+ class: props.inputClass ? ["oods-field-control", props.inputClass] : "oods-field-control",
1524
1529
  type: props.type,
1525
1530
  name: props.name,
1526
1531
  value: props.type === "datetime-local" ? dateTimeInputValue(currentValue.value) : currentValue.value,
@@ -1723,25 +1728,25 @@ var Checkbox = defineComponent({
1723
1728
  var TableCaption = defineComponent({
1724
1729
  name: "OodsTableCaption",
1725
1730
  setup(_props, { slots }) {
1726
- return () => h("caption", {}, slots.default?.());
1731
+ return () => h("caption", { class: "oods-table__caption" }, slots.default?.());
1727
1732
  }
1728
1733
  });
1729
1734
  var TableHead = defineComponent({
1730
1735
  name: "OodsTableHead",
1731
1736
  setup(_props, { slots }) {
1732
- return () => h("thead", {}, slots.default?.());
1737
+ return () => h("thead", { class: "oods-table__header" }, slots.default?.());
1733
1738
  }
1734
1739
  });
1735
1740
  var TableBody = defineComponent({
1736
1741
  name: "OodsTableBody",
1737
1742
  setup(_props, { slots }) {
1738
- return () => h("tbody", {}, slots.default?.());
1743
+ return () => h("tbody", { class: "oods-table__body" }, slots.default?.());
1739
1744
  }
1740
1745
  });
1741
1746
  var TableRow = defineComponent({
1742
1747
  name: "OodsTableRow",
1743
1748
  setup(_props, { slots }) {
1744
- return () => h("tr", {}, slots.default?.());
1749
+ return () => h("tr", { class: "oods-table__row" }, slots.default?.());
1745
1750
  }
1746
1751
  });
1747
1752
  var TableHeaderCell = defineComponent({
@@ -1750,17 +1755,18 @@ var TableHeaderCell = defineComponent({
1750
1755
  scope: { type: String, default: "col" }
1751
1756
  },
1752
1757
  setup(props, { slots }) {
1753
- return () => h("th", { scope: props.scope }, slots.default?.());
1758
+ return () => h("th", { class: "oods-table__header-cell", scope: props.scope }, slots.default?.());
1754
1759
  }
1755
1760
  });
1756
1761
  var TableCell = defineComponent({
1757
1762
  name: "OodsTableCell",
1758
1763
  setup(_props, { slots }) {
1759
- return () => h("td", {}, slots.default?.());
1764
+ return () => h("td", { class: "oods-table__cell" }, slots.default?.());
1760
1765
  }
1761
1766
  });
1762
1767
  var Table = defineComponent({
1763
1768
  name: "OodsTable",
1769
+ inheritAttrs: false,
1764
1770
  props: {
1765
1771
  caption: { type: String, default: "" },
1766
1772
  columns: { type: Array, default: () => [] },
@@ -1771,16 +1777,17 @@ var Table = defineComponent({
1771
1777
  emits: {
1772
1778
  rowActivate: (_rowId) => true
1773
1779
  },
1774
- setup(props, { emit, slots }) {
1780
+ setup(props, { attrs, emit, slots }) {
1775
1781
  const activate = (row) => emit("rowActivate", row.id);
1776
- return () => h("table", {
1777
- class: "oods-table",
1782
+ return () => h("div", { class: "oods-table__container", "data-density": props.density }, [h("table", {
1783
+ ...attrs,
1784
+ class: ["oods-table", attrs.class],
1778
1785
  "data-oods-component": "Table",
1779
1786
  "data-density": props.density
1780
1787
  }, [
1781
- h(TableCaption, {}, {
1788
+ slots.caption || props.caption ? h(TableCaption, {}, {
1782
1789
  default: () => slots.caption?.() ?? props.caption
1783
- }),
1790
+ }) : null,
1784
1791
  h(TableHead, {}, {
1785
1792
  default: () => slots.head?.() ?? h(TableRow, {}, {
1786
1793
  default: () => props.columns.map((column) => h(TableHeaderCell, { key: column.key }, {
@@ -1795,7 +1802,7 @@ var Table = defineComponent({
1795
1802
  }, {
1796
1803
  default: () => "No rows available."
1797
1804
  })
1798
- }) : props.rows.map((row, rowIndex) => slots.row?.({ row, rowIndex, activate: () => activate(row) }) ?? h(TableRow, { key: row.id }, {
1805
+ }) : props.rows.map((row, rowIndex) => slots.row?.({ row, rowIndex, activate: () => activate(row) }) ?? h(TableRow, { key: row.id, "data-selectable": props.selectable ? "true" : void 0 }, {
1799
1806
  default: () => props.columns.map((column, columnIndex) => {
1800
1807
  const content = slots.cell?.({ row, column, value: row[column.key] }) ?? String(row[column.key] ?? "");
1801
1808
  return h(TableCell, { key: column.key }, {
@@ -1808,7 +1815,7 @@ var Table = defineComponent({
1808
1815
  })
1809
1816
  })))
1810
1817
  })
1811
- ]);
1818
+ ])]);
1812
1819
  }
1813
1820
  });
1814
1821
  function itemDisabled(item) {
@@ -2330,12 +2337,12 @@ var timelineProps = {
2330
2337
  };
2331
2338
  function renderTimelineEvent(event, index, showActorId, showReason) {
2332
2339
  return h("li", { key: `${event.timestamp ?? "event"}-${index}` }, [
2333
- h("article", { "data-timeline-event": "true" }, [
2334
- h("p", { "data-timeline-label": "true" }, event.label),
2340
+ h("article", { class: "oods-timeline__event", "data-timeline-event": "true" }, [
2341
+ h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
2335
2342
  event.timestamp ? h("time", { "data-timeline-time": "true", datetime: event.timestamp }, formatDateTime(event.timestamp)) : null,
2336
- event.detail ? h("p", { "data-timeline-detail": "true" }, event.detail) : null,
2337
- showActorId && event.actorId ? h("p", { "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2338
- showReason && event.reason ? h("p", { "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2343
+ event.detail ? h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
2344
+ showActorId && event.actorId ? h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
2345
+ showReason && event.reason ? h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
2339
2346
  ])
2340
2347
  ]);
2341
2348
  }
@@ -2353,16 +2360,16 @@ function timelineComponent(configuration) {
2353
2360
  const slottedEvents = slots.default?.();
2354
2361
  return h("div", {
2355
2362
  ...attrs,
2356
- class: mergedClass("oods-timeline", attrs.class),
2363
+ class: mergedClass(`oods-timeline oods-${configuration.timelineType}-timeline`, attrs.class),
2357
2364
  role: "log",
2358
2365
  "aria-label": stringValue(attrs["aria-label"]) ?? title,
2359
2366
  "data-oods-component": configuration.componentId,
2360
2367
  "data-timeline-type": configuration.timelineType
2361
2368
  }, [
2362
- h("h2", { "data-timeline-title": "true" }, title),
2363
- props.status ? h("p", { "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
2369
+ h("h2", { class: "oods-timeline__title", "data-timeline-title": "true" }, title),
2370
+ props.status ? h("p", { class: "oods-timeline__current", "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
2364
2371
  props.allowedTransitions?.length ? h("p", { "data-timeline-transitions": "true" }, `Allowed transitions: ${props.allowedTransitions.join(", ")}`) : null,
2365
- h("ol", { "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
2372
+ h("ol", { class: "oods-timeline__events", "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
2366
2373
  event,
2367
2374
  index,
2368
2375
  props.showActorId,
@@ -2518,8 +2525,7 @@ var SearchInput = defineComponent({
2518
2525
  updateValue("");
2519
2526
  emit("clear");
2520
2527
  };
2521
- const submit = (event) => {
2522
- event.preventDefault();
2528
+ const searchNow = () => {
2523
2529
  if (!props.disabled) {
2524
2530
  if (timer !== void 0) clearTimeout(timer);
2525
2531
  emitSearch(currentValue.value);
@@ -2528,14 +2534,13 @@ var SearchInput = defineComponent({
2528
2534
  return () => {
2529
2535
  const id = props.id ?? `oods-search-${generatedId.replace(/:/g, "")}`;
2530
2536
  const ariaLabel = stringValue(attrs["aria-label"]) ?? props.label ?? props.placeholder;
2531
- return h("form", {
2537
+ return h("div", {
2532
2538
  ...attrs,
2533
2539
  class: mergedClass("oods-search-input", attrs.class),
2534
2540
  role: "search",
2535
2541
  "aria-label": ariaLabel,
2536
2542
  "data-oods-component": "SearchInput",
2537
- "data-behavioral": "search",
2538
- onSubmit: submit
2543
+ "data-behavioral": "search"
2539
2544
  }, [
2540
2545
  h(Input, {
2541
2546
  id,
@@ -2544,14 +2549,20 @@ var SearchInput = defineComponent({
2544
2549
  value: currentValue.value,
2545
2550
  placeholder: props.placeholder,
2546
2551
  disabled: props.disabled,
2552
+ inputClass: "oods-search-input__control",
2547
2553
  "aria-label": props.label ? void 0 : ariaLabel,
2548
2554
  onInput: (value) => updateValue(value),
2549
2555
  onKeydown: (event) => {
2550
2556
  if (event.key === "Escape") clear();
2557
+ if (event.key === "Enter") {
2558
+ event.preventDefault();
2559
+ searchNow();
2560
+ }
2551
2561
  }
2552
2562
  }),
2553
2563
  props.clearable && currentValue.value ? h("button", {
2554
2564
  type: "button",
2565
+ class: "oods-search-input__clear",
2555
2566
  "data-search-clear": "true",
2556
2567
  "aria-label": "Clear search",
2557
2568
  disabled: props.disabled,
@@ -2961,7 +2972,7 @@ function summary(id) {
2961
2972
  } });
2962
2973
  }
2963
2974
  function preview(id, type) {
2964
- return defineComponent({ name: id, props: { svg: String, title: String, description: String, width: Number, height: Number }, setup(props, { slots }) {
2975
+ return defineComponent({ name: id, props: { svg: String, svgNarrow: String, svgWide: String, title: String, description: String, width: Number, height: Number }, setup(props, { slots }) {
2965
2976
  return () => h(VizAreaPreview, { ...props, title: props.title ?? `${type[0].toUpperCase()}${type.slice(1)} chart`, "data-oods-component": id, "data-viz-preview-type": type }, { default: slots.default ?? (() => h(Text, { content: "No rendered chart supplied" })) });
2966
2977
  } });
2967
2978
  }
package/dist/ported.cjs CHANGED
@@ -91,8 +91,8 @@ var Badge = vue.defineComponent({
91
91
  "--cmp-badge-text": `var(--sys-status-${palette}-text)`
92
92
  }
93
93
  }, [
94
- props.icon || slots.icon ? vue.h("span", { class: "oods-badge-icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
95
- slotOrValue(slots.default, props.content ?? statusLabel(props.status))
94
+ props.icon || slots.icon ? vue.h("span", { class: "oods-badge__icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
95
+ vue.h("span", { class: "oods-badge__label" }, [slotOrValue(slots.default, props.content ?? statusLabel(props.status))])
96
96
  ]);
97
97
  };
98
98
  }
@@ -116,7 +116,7 @@ vue.defineComponent({
116
116
  return () => {
117
117
  const tone = resolveTone(props.tone, props.status, props.domain);
118
118
  const palette = tokenTone(tone);
119
- return vue.h("section", {
119
+ return vue.h("div", {
120
120
  class: "oods-banner",
121
121
  "data-oods-component": "Banner",
122
122
  "data-status": props.status,
@@ -131,17 +131,17 @@ vue.defineComponent({
131
131
  "--cmp-banner-text": `var(--sys-status-${palette}-text)`
132
132
  }
133
133
  }, [
134
- vue.h("div", { class: "oods-banner-content" }, [
135
- props.title || props.status || slots.title ? vue.h("strong", { class: "oods-banner-title" }, [
134
+ vue.h("div", { class: "oods-banner__content" }, [
135
+ props.title || props.status || slots.title ? vue.h("strong", { class: "oods-banner__title" }, [
136
136
  slotOrValue(slots.title, props.title || statusLabel(props.status))
137
137
  ]) : null,
138
- props.detail ? vue.h("p", { class: "oods-banner-detail" }, props.detail) : null,
139
- slots.default || props.content ? vue.h(slots.default ? "div" : "p", { class: "oods-banner-body" }, [slotOrValue(slots.default, props.content)]) : null,
140
- slots.actions ? vue.h("div", { class: "oods-banner-actions" }, slots.actions()) : null
138
+ props.detail ? vue.h("p", { class: "oods-banner__detail" }, props.detail) : null,
139
+ slots.default || props.content ? vue.h(slots.default ? "div" : "p", { class: "oods-banner__body" }, [slotOrValue(slots.default, props.content)]) : null,
140
+ slots.actions ? vue.h("div", { class: "oods-banner__actions" }, slots.actions()) : null
141
141
  ]),
142
142
  props.dismissLabel ? vue.h("button", {
143
143
  type: "button",
144
- class: "oods-banner-dismiss",
144
+ class: "oods-banner-dismiss oods-banner__dismiss",
145
145
  "aria-label": props.dismissLabel,
146
146
  onClick: () => emit("dismiss")
147
147
  }, [vue.h("span", { "aria-hidden": "true" }, "\xD7")]) : null
@@ -355,7 +355,9 @@ var Input = vue.defineComponent({
355
355
  name: "OodsInput",
356
356
  props: {
357
357
  ...textFieldProps,
358
- type: { type: String, default: "text" }
358
+ type: { type: String, default: "text" },
359
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
360
+ inputClass: String
359
361
  },
360
362
  emits: {
361
363
  "update:modelValue": (_value) => true,
@@ -373,7 +375,7 @@ var Input = vue.defineComponent({
373
375
  };
374
376
  return () => renderField("Input", props, slots, metadata, vue.h("input", {
375
377
  id: metadata.controlId.value,
376
- class: "oods-field-control",
378
+ class: props.inputClass ? ["oods-field-control", props.inputClass] : "oods-field-control",
377
379
  type: props.type,
378
380
  name: props.name,
379
381
  value: props.type === "datetime-local" ? componentContracts.dateTimeInputValue(currentValue.value) : currentValue.value,
@@ -907,12 +909,12 @@ var timelineProps = {
907
909
  };
908
910
  function renderTimelineEvent(event, index, showActorId, showReason) {
909
911
  return vue.h("li", { key: `${event.timestamp ?? "event"}-${index}` }, [
910
- vue.h("article", { "data-timeline-event": "true" }, [
911
- vue.h("p", { "data-timeline-label": "true" }, event.label),
912
+ vue.h("article", { class: "oods-timeline__event", "data-timeline-event": "true" }, [
913
+ vue.h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
912
914
  event.timestamp ? vue.h("time", { "data-timeline-time": "true", datetime: event.timestamp }, componentContracts.formatDateTime(event.timestamp)) : null,
913
- event.detail ? vue.h("p", { "data-timeline-detail": "true" }, event.detail) : null,
914
- showActorId && event.actorId ? vue.h("p", { "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
915
- showReason && event.reason ? vue.h("p", { "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
915
+ event.detail ? vue.h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
916
+ showActorId && event.actorId ? vue.h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
917
+ showReason && event.reason ? vue.h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
916
918
  ])
917
919
  ]);
918
920
  }
@@ -930,16 +932,16 @@ function timelineComponent(configuration) {
930
932
  const slottedEvents = slots.default?.();
931
933
  return vue.h("div", {
932
934
  ...attrs,
933
- class: mergedClass("oods-timeline", attrs.class),
935
+ class: mergedClass(`oods-timeline oods-${configuration.timelineType}-timeline`, attrs.class),
934
936
  role: "log",
935
937
  "aria-label": stringValue(attrs["aria-label"]) ?? title,
936
938
  "data-oods-component": configuration.componentId,
937
939
  "data-timeline-type": configuration.timelineType
938
940
  }, [
939
- vue.h("h2", { "data-timeline-title": "true" }, title),
940
- props.status ? vue.h("p", { "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
941
+ vue.h("h2", { class: "oods-timeline__title", "data-timeline-title": "true" }, title),
942
+ props.status ? vue.h("p", { class: "oods-timeline__current", "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
941
943
  props.allowedTransitions?.length ? vue.h("p", { "data-timeline-transitions": "true" }, `Allowed transitions: ${props.allowedTransitions.join(", ")}`) : null,
942
- vue.h("ol", { "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
944
+ vue.h("ol", { class: "oods-timeline__events", "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
943
945
  event,
944
946
  index,
945
947
  props.showActorId,
@@ -1095,8 +1097,7 @@ var SearchInput = vue.defineComponent({
1095
1097
  updateValue("");
1096
1098
  emit("clear");
1097
1099
  };
1098
- const submit = (event) => {
1099
- event.preventDefault();
1100
+ const searchNow = () => {
1100
1101
  if (!props.disabled) {
1101
1102
  if (timer !== void 0) clearTimeout(timer);
1102
1103
  emitSearch(currentValue.value);
@@ -1105,14 +1106,13 @@ var SearchInput = vue.defineComponent({
1105
1106
  return () => {
1106
1107
  const id = props.id ?? `oods-search-${generatedId.replace(/:/g, "")}`;
1107
1108
  const ariaLabel = stringValue(attrs["aria-label"]) ?? props.label ?? props.placeholder;
1108
- return vue.h("form", {
1109
+ return vue.h("div", {
1109
1110
  ...attrs,
1110
1111
  class: mergedClass("oods-search-input", attrs.class),
1111
1112
  role: "search",
1112
1113
  "aria-label": ariaLabel,
1113
1114
  "data-oods-component": "SearchInput",
1114
- "data-behavioral": "search",
1115
- onSubmit: submit
1115
+ "data-behavioral": "search"
1116
1116
  }, [
1117
1117
  vue.h(Input, {
1118
1118
  id,
@@ -1121,14 +1121,20 @@ var SearchInput = vue.defineComponent({
1121
1121
  value: currentValue.value,
1122
1122
  placeholder: props.placeholder,
1123
1123
  disabled: props.disabled,
1124
+ inputClass: "oods-search-input__control",
1124
1125
  "aria-label": props.label ? void 0 : ariaLabel,
1125
1126
  onInput: (value) => updateValue(value),
1126
1127
  onKeydown: (event) => {
1127
1128
  if (event.key === "Escape") clear();
1129
+ if (event.key === "Enter") {
1130
+ event.preventDefault();
1131
+ searchNow();
1132
+ }
1128
1133
  }
1129
1134
  }),
1130
1135
  props.clearable && currentValue.value ? vue.h("button", {
1131
1136
  type: "button",
1137
+ class: "oods-search-input__clear",
1132
1138
  "data-search-clear": "true",
1133
1139
  "aria-label": "Clear search",
1134
1140
  disabled: props.disabled,
package/dist/ported.js CHANGED
@@ -89,8 +89,8 @@ var Badge = defineComponent({
89
89
  "--cmp-badge-text": `var(--sys-status-${palette}-text)`
90
90
  }
91
91
  }, [
92
- props.icon || slots.icon ? h("span", { class: "oods-badge-icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
93
- slotOrValue(slots.default, props.content ?? statusLabel(props.status))
92
+ props.icon || slots.icon ? h("span", { class: "oods-badge__icon", "aria-hidden": "true" }, [slotOrValue(slots.icon, props.icon)]) : null,
93
+ h("span", { class: "oods-badge__label" }, [slotOrValue(slots.default, props.content ?? statusLabel(props.status))])
94
94
  ]);
95
95
  };
96
96
  }
@@ -114,7 +114,7 @@ defineComponent({
114
114
  return () => {
115
115
  const tone = resolveTone(props.tone, props.status, props.domain);
116
116
  const palette = tokenTone(tone);
117
- return h("section", {
117
+ return h("div", {
118
118
  class: "oods-banner",
119
119
  "data-oods-component": "Banner",
120
120
  "data-status": props.status,
@@ -129,17 +129,17 @@ defineComponent({
129
129
  "--cmp-banner-text": `var(--sys-status-${palette}-text)`
130
130
  }
131
131
  }, [
132
- h("div", { class: "oods-banner-content" }, [
133
- props.title || props.status || slots.title ? h("strong", { class: "oods-banner-title" }, [
132
+ h("div", { class: "oods-banner__content" }, [
133
+ props.title || props.status || slots.title ? h("strong", { class: "oods-banner__title" }, [
134
134
  slotOrValue(slots.title, props.title || statusLabel(props.status))
135
135
  ]) : null,
136
- props.detail ? h("p", { class: "oods-banner-detail" }, props.detail) : null,
137
- slots.default || props.content ? h(slots.default ? "div" : "p", { class: "oods-banner-body" }, [slotOrValue(slots.default, props.content)]) : null,
138
- slots.actions ? h("div", { class: "oods-banner-actions" }, slots.actions()) : null
136
+ props.detail ? h("p", { class: "oods-banner__detail" }, props.detail) : null,
137
+ slots.default || props.content ? h(slots.default ? "div" : "p", { class: "oods-banner__body" }, [slotOrValue(slots.default, props.content)]) : null,
138
+ slots.actions ? h("div", { class: "oods-banner__actions" }, slots.actions()) : null
139
139
  ]),
140
140
  props.dismissLabel ? h("button", {
141
141
  type: "button",
142
- class: "oods-banner-dismiss",
142
+ class: "oods-banner-dismiss oods-banner__dismiss",
143
143
  "aria-label": props.dismissLabel,
144
144
  onClick: () => emit("dismiss")
145
145
  }, [h("span", { "aria-hidden": "true" }, "\xD7")]) : null
@@ -353,7 +353,9 @@ var Input = defineComponent({
353
353
  name: "OodsInput",
354
354
  props: {
355
355
  ...textFieldProps,
356
- type: { type: String, default: "text" }
356
+ type: { type: String, default: "text" },
357
+ /** A class for the input element itself, as React's inputClassName; the field's own class stays on its frame. */
358
+ inputClass: String
357
359
  },
358
360
  emits: {
359
361
  "update:modelValue": (_value) => true,
@@ -371,7 +373,7 @@ var Input = defineComponent({
371
373
  };
372
374
  return () => renderField("Input", props, slots, metadata, h("input", {
373
375
  id: metadata.controlId.value,
374
- class: "oods-field-control",
376
+ class: props.inputClass ? ["oods-field-control", props.inputClass] : "oods-field-control",
375
377
  type: props.type,
376
378
  name: props.name,
377
379
  value: props.type === "datetime-local" ? dateTimeInputValue(currentValue.value) : currentValue.value,
@@ -905,12 +907,12 @@ var timelineProps = {
905
907
  };
906
908
  function renderTimelineEvent(event, index, showActorId, showReason) {
907
909
  return h("li", { key: `${event.timestamp ?? "event"}-${index}` }, [
908
- h("article", { "data-timeline-event": "true" }, [
909
- h("p", { "data-timeline-label": "true" }, event.label),
910
+ h("article", { class: "oods-timeline__event", "data-timeline-event": "true" }, [
911
+ h("p", { class: "oods-timeline__label", "data-timeline-label": "true" }, event.label),
910
912
  event.timestamp ? h("time", { "data-timeline-time": "true", datetime: event.timestamp }, formatDateTime(event.timestamp)) : null,
911
- event.detail ? h("p", { "data-timeline-detail": "true" }, event.detail) : null,
912
- showActorId && event.actorId ? h("p", { "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
913
- showReason && event.reason ? h("p", { "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
913
+ event.detail ? h("p", { class: "oods-timeline__detail", "data-timeline-detail": "true" }, event.detail) : null,
914
+ showActorId && event.actorId ? h("p", { class: "oods-timeline__actor", "data-timeline-actor": "true" }, `Actor: ${event.actorId}`) : null,
915
+ showReason && event.reason ? h("p", { class: "oods-timeline__reason", "data-timeline-reason": "true" }, `Reason: ${event.reason}`) : null
914
916
  ])
915
917
  ]);
916
918
  }
@@ -928,16 +930,16 @@ function timelineComponent(configuration) {
928
930
  const slottedEvents = slots.default?.();
929
931
  return h("div", {
930
932
  ...attrs,
931
- class: mergedClass("oods-timeline", attrs.class),
933
+ class: mergedClass(`oods-timeline oods-${configuration.timelineType}-timeline`, attrs.class),
932
934
  role: "log",
933
935
  "aria-label": stringValue(attrs["aria-label"]) ?? title,
934
936
  "data-oods-component": configuration.componentId,
935
937
  "data-timeline-type": configuration.timelineType
936
938
  }, [
937
- h("h2", { "data-timeline-title": "true" }, title),
938
- props.status ? h("p", { "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
939
+ h("h2", { class: "oods-timeline__title", "data-timeline-title": "true" }, title),
940
+ props.status ? h("p", { class: "oods-timeline__current", "data-timeline-current": "true" }, `Current status: ${statusLabel2(props.status)}`) : null,
939
941
  props.allowedTransitions?.length ? h("p", { "data-timeline-transitions": "true" }, `Allowed transitions: ${props.allowedTransitions.join(", ")}`) : null,
940
- h("ol", { "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
942
+ h("ol", { class: "oods-timeline__events", "data-timeline-events": "true" }, slottedEvents?.length ? slottedEvents : events.length ? events.map((event, index) => renderTimelineEvent(
941
943
  event,
942
944
  index,
943
945
  props.showActorId,
@@ -1093,8 +1095,7 @@ var SearchInput = defineComponent({
1093
1095
  updateValue("");
1094
1096
  emit("clear");
1095
1097
  };
1096
- const submit = (event) => {
1097
- event.preventDefault();
1098
+ const searchNow = () => {
1098
1099
  if (!props.disabled) {
1099
1100
  if (timer !== void 0) clearTimeout(timer);
1100
1101
  emitSearch(currentValue.value);
@@ -1103,14 +1104,13 @@ var SearchInput = defineComponent({
1103
1104
  return () => {
1104
1105
  const id = props.id ?? `oods-search-${generatedId.replace(/:/g, "")}`;
1105
1106
  const ariaLabel = stringValue(attrs["aria-label"]) ?? props.label ?? props.placeholder;
1106
- return h("form", {
1107
+ return h("div", {
1107
1108
  ...attrs,
1108
1109
  class: mergedClass("oods-search-input", attrs.class),
1109
1110
  role: "search",
1110
1111
  "aria-label": ariaLabel,
1111
1112
  "data-oods-component": "SearchInput",
1112
- "data-behavioral": "search",
1113
- onSubmit: submit
1113
+ "data-behavioral": "search"
1114
1114
  }, [
1115
1115
  h(Input, {
1116
1116
  id,
@@ -1119,14 +1119,20 @@ var SearchInput = defineComponent({
1119
1119
  value: currentValue.value,
1120
1120
  placeholder: props.placeholder,
1121
1121
  disabled: props.disabled,
1122
+ inputClass: "oods-search-input__control",
1122
1123
  "aria-label": props.label ? void 0 : ariaLabel,
1123
1124
  onInput: (value) => updateValue(value),
1124
1125
  onKeydown: (event) => {
1125
1126
  if (event.key === "Escape") clear();
1127
+ if (event.key === "Enter") {
1128
+ event.preventDefault();
1129
+ searchNow();
1130
+ }
1126
1131
  }
1127
1132
  }),
1128
1133
  props.clearable && currentValue.value ? h("button", {
1129
1134
  type: "button",
1135
+ class: "oods-search-input__clear",
1130
1136
  "data-search-clear": "true",
1131
1137
  "aria-label": "Clear search",
1132
1138
  disabled: props.disabled,
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "@oods/components-vue",
3
- "version": "0.3.1",
4
- "description": "OODS Vue 3 component package.",
3
+ "version": "0.3.3",
4
+ "description": "Vue 3 components for OODS Foundry: the controls, layouts and domain views its generated screens use.",
5
+ "homepage": "https://oods-foundry.com/",
6
+ "bugs": {
7
+ "email": "derek@derekn.com"
8
+ },
9
+ "keywords": [
10
+ "oods",
11
+ "oods-foundry",
12
+ "vue",
13
+ "components",
14
+ "design-system",
15
+ "accessibility"
16
+ ],
5
17
  "type": "module",
6
18
  "license": "Apache-2.0",
7
19
  "engines": {
8
- "node": ">=20.11.1"
20
+ "node": ">=22.0.0"
9
21
  },
10
22
  "files": [
11
23
  "dist",
@@ -41,8 +53,8 @@
41
53
  "**/*.css"
42
54
  ],
43
55
  "dependencies": {
44
- "@oods/component-contracts": "0.3.1",
45
- "@oods/component-styles": "0.3.1"
56
+ "@oods/component-contracts": "0.3.3",
57
+ "@oods/component-styles": "0.3.3"
46
58
  },
47
59
  "peerDependencies": {
48
60
  "vue": "^3.5.0"