@abgov/react-components 4.17.0-alpha.22 → 4.17.0-alpha.24

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/index.js CHANGED
@@ -18355,7 +18355,7 @@ class bf extends se {
18355
18355
  }
18356
18356
  customElements.define("goa-tab", re(bf, { heading: {}, open: {} }, ["heading", "default"], [], true));
18357
18357
  function pf(t) {
18358
- de(t, "svelte-1i5xhlu", ":host{overflow-x:auto}.goatable.svelte-1i5xhlu{width:0}table.svelte-1i5xhlu{border-collapse:collapse}");
18358
+ de(t, "svelte-1wrp53x", ".goatable.svelte-1wrp53x{width:0}table.svelte-1wrp53x{border-collapse:collapse}");
18359
18359
  }
18360
18360
  function _f(t) {
18361
18361
  let e, n, l;
@@ -18372,7 +18372,7 @@ function _f(t) {
18372
18372
  return {
18373
18373
  c() {
18374
18374
  e = z("table"), o && o.c(), f(e, "style", n = /*width*/
18375
- t[0] && "width: 100%;"), f(e, "class", "svelte-1i5xhlu");
18375
+ t[0] && "width: 100%;"), f(e, "class", "svelte-1wrp53x");
18376
18376
  },
18377
18377
  m(r, s) {
18378
18378
  P(r, e, s), o && o.m(e, null), l = true;
@@ -18474,7 +18474,8 @@ function yf(t) {
18474
18474
  return n = c(t), l = a[n] = s[n](t), {
18475
18475
  c() {
18476
18476
  e = z("div"), l.c(), f(e, "class", i = ze(`goatable ${/*variant*/
18477
- t[1]}`) + " svelte-1i5xhlu"), f(e, "style", o = `
18477
+ t[1]}`) + " svelte-1wrp53x"), f(e, "style", o = `
18478
+ overflow-x: auto;
18478
18479
  ${`width: ${/*width*/
18479
18480
  t[0] || "100%"};`}
18480
18481
  ${fe(
@@ -18503,8 +18504,9 @@ function yf(t) {
18503
18504
  a[m] = null;
18504
18505
  }), Pe(), l = a[n], l ? l.p(d, u) : (l = a[n] = s[n](d), l.c()), N(l, 1), l.m(e, null)), (!r || u & /*variant*/
18505
18506
  2 && i !== (i = ze(`goatable ${/*variant*/
18506
- d[1]}`) + " svelte-1i5xhlu")) && f(e, "class", i), (!r || u & /*width, mt, mr, mb, ml*/
18507
+ d[1]}`) + " svelte-1wrp53x")) && f(e, "class", i), (!r || u & /*width, mt, mr, mb, ml*/
18507
18508
  61 && o !== (o = `
18509
+ overflow-x: auto;
18508
18510
  ${`width: ${/*width*/
18509
18511
  d[0] || "100%"};`}
18510
18512
  ${fe(
@@ -18673,7 +18675,7 @@ class zf extends se {
18673
18675
  this.$$set({ ml: e }), _();
18674
18676
  }
18675
18677
  }
18676
- customElements.define("goa-table", re(zf, { width: {}, stickyheader: {}, variant: {}, mt: {}, mr: {}, mb: {}, ml: {} }, ["default"], [], true));
18678
+ customElements.define("goa-table", re(zf, { width: {}, stickyheader: {}, variant: { reflect: true }, mt: {}, mr: {}, mb: {}, ml: {} }, ["default"], [], true));
18677
18679
  function Cf(t) {
18678
18680
  de(t, "svelte-w89d7d", ":host{display:flex;align-items:flex-end}button.svelte-w89d7d.svelte-w89d7d{border:none;background:none;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;color:inherit;width:100%;height:3.75rem;padding:0 1rem;justify-content:var(--header-text-align, flex-start);gap:0.25rem;align-items:center}button.svelte-w89d7d.svelte-w89d7d:hover{background-color:var(--goa-color-greyscale-100);cursor:pointer;color:var(--goa-color-interactive-hover)}button.svelte-w89d7d goa-icon.svelte-w89d7d{color:var(--goa-color-interactive-default)}button.svelte-w89d7d:hover goa-icon.svelte-w89d7d{color:var(--goa-color-interactive-hover)}button.svelte-w89d7d .direction--none goa-icon.svelte-w89d7d{color:var(--goa-color-greyscale-400)}button.svelte-w89d7d:hover .direction--none goa-icon.svelte-w89d7d{color:var(--goa-color-greyscale-400)}goa-icon.svelte-w89d7d.svelte-w89d7d{scale:0.8}.direction--none.svelte-w89d7d goa-icon.svelte-w89d7d{height:0.625rem}.direction--none.svelte-w89d7d.svelte-w89d7d{display:inline-flex;flex-direction:column;align-items:center}");
18679
18681
  }
@@ -20311,6 +20313,7 @@ function GoAAppHeaderMenu(props) {
20311
20313
  {
20312
20314
  heading: props.heading,
20313
20315
  leadingicon: props.leadingIcon,
20316
+ "data-testid": props.testId,
20314
20317
  children: props.children
20315
20318
  }
20316
20319
  );
@@ -20537,6 +20540,7 @@ function GoACalendar({
20537
20540
  value,
20538
20541
  min,
20539
20542
  max,
20543
+ testId,
20540
20544
  mt: mt2,
20541
20545
  mr: mr2,
20542
20546
  mb,
@@ -20561,6 +20565,7 @@ function GoACalendar({
20561
20565
  value: value == null ? void 0 : value.toISOString(),
20562
20566
  min: min == null ? void 0 : min.toISOString(),
20563
20567
  max: max == null ? void 0 : max.toISOString(),
20568
+ "data-testid": testId,
20564
20569
  mt: mt2,
20565
20570
  mr: mr2,
20566
20571
  mb,
@@ -20757,6 +20762,7 @@ function GoADatePicker({
20757
20762
  error,
20758
20763
  min,
20759
20764
  max,
20765
+ testId,
20760
20766
  mt: mt2,
20761
20767
  mr: mr2,
20762
20768
  mb,
@@ -20769,10 +20775,14 @@ function GoADatePicker({
20769
20775
  return;
20770
20776
  }
20771
20777
  const current = ref.current;
20772
- current.addEventListener("_change", (e) => {
20778
+ const handleChange = (e) => {
20773
20779
  onChange(name || "", e.detail.value);
20774
- });
20775
- });
20780
+ };
20781
+ current.addEventListener("_change", handleChange);
20782
+ return () => {
20783
+ current.removeEventListener("_change", handleChange);
20784
+ };
20785
+ }, [onChange]);
20776
20786
  return /* @__PURE__ */ jsxRuntime.jsx(
20777
20787
  "goa-date-picker",
20778
20788
  {
@@ -20782,6 +20792,7 @@ function GoADatePicker({
20782
20792
  error,
20783
20793
  min: min == null ? void 0 : min.toISOString(),
20784
20794
  max: max == null ? void 0 : max.toISOString(),
20795
+ "data-testid": testId,
20785
20796
  mt: mt2,
20786
20797
  mr: mr2,
20787
20798
  mb,
@@ -20795,6 +20806,7 @@ function GoADetails(props) {
20795
20806
  {
20796
20807
  heading: props.heading,
20797
20808
  open: props.open,
20809
+ "data-testid": props.testId,
20798
20810
  mt: props.mt,
20799
20811
  mr: props.mr,
20800
20812
  mb: props.mb,
@@ -20892,6 +20904,7 @@ function GoAFileUploadCard({
20892
20904
  type,
20893
20905
  progress,
20894
20906
  error,
20907
+ testId,
20895
20908
  onDelete,
20896
20909
  onCancel
20897
20910
  }) {
@@ -20917,7 +20930,8 @@ function GoAFileUploadCard({
20917
20930
  size,
20918
20931
  type,
20919
20932
  progress,
20920
- error
20933
+ error,
20934
+ "data-testid": testId
20921
20935
  }
20922
20936
  );
20923
20937
  }
@@ -20925,6 +20939,7 @@ function GoAFileUploadInput({
20925
20939
  variant,
20926
20940
  accept,
20927
20941
  maxFileSize,
20942
+ testId,
20928
20943
  onSelectFile
20929
20944
  }) {
20930
20945
  const el2 = react.useRef(null);
@@ -20946,7 +20961,8 @@ function GoAFileUploadInput({
20946
20961
  ref: el2,
20947
20962
  variant,
20948
20963
  accept,
20949
- maxfilesize: maxFileSize
20964
+ maxfilesize: maxFileSize,
20965
+ "data-testid": testId
20950
20966
  }
20951
20967
  );
20952
20968
  }
@@ -20957,8 +20973,15 @@ function GoAAppFooter({
20957
20973
  }) {
20958
20974
  return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, "data-testid": testId, children });
20959
20975
  }
20960
- function GoAAppFooterMetaSection({ children }) {
20961
- return /* @__PURE__ */ jsxRuntime.jsx("goa-app-footer-meta-section", { slot: "meta", children });
20976
+ function GoAAppFooterMetaSection({ testId, children }) {
20977
+ return /* @__PURE__ */ jsxRuntime.jsx(
20978
+ "goa-app-footer-meta-section",
20979
+ {
20980
+ "data-testid": testId,
20981
+ slot: "meta",
20982
+ children
20983
+ }
20984
+ );
20962
20985
  }
20963
20986
  function GoAAppFooterNavSection({
20964
20987
  heading,
@@ -23338,16 +23361,30 @@ function GoARadioGroup({
23338
23361
  );
23339
23362
  }
23340
23363
  function GoASideMenuGroup(props) {
23341
- return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu-group", { heading: props.heading, children: props.children });
23364
+ return /* @__PURE__ */ jsxRuntime.jsx(
23365
+ "goa-side-menu-group",
23366
+ {
23367
+ heading: props.heading,
23368
+ "data-testid": props.testId,
23369
+ children: props.children
23370
+ }
23371
+ );
23342
23372
  }
23343
23373
  function GoASideMenuHeading(props) {
23344
- return /* @__PURE__ */ jsxRuntime.jsxs("goa-side-menu-heading", { icon: props.icon, children: [
23345
- props.children,
23346
- props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
23347
- ] });
23374
+ return /* @__PURE__ */ jsxRuntime.jsxs(
23375
+ "goa-side-menu-heading",
23376
+ {
23377
+ icon: props.icon,
23378
+ "data-testid": props.testId,
23379
+ children: [
23380
+ props.children,
23381
+ props.meta && /* @__PURE__ */ jsxRuntime.jsx("span", { slot: "meta", children: props.meta })
23382
+ ]
23383
+ }
23384
+ );
23348
23385
  }
23349
23386
  function GoASideMenu(props) {
23350
- return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { children: props.children });
23387
+ return /* @__PURE__ */ jsxRuntime.jsx("goa-side-menu", { "data-testid": props.testId, children: props.children });
23351
23388
  }
23352
23389
  const GoASkeleton = ({
23353
23390
  maxWidth,
@@ -23442,8 +23479,15 @@ function GoATableSortHeader({
23442
23479
  }) {
23443
23480
  return /* @__PURE__ */ jsxRuntime.jsx("goa-table-sort-header", { name, direction, children });
23444
23481
  }
23445
- function GoATabs({ initialTab, children }) {
23446
- return /* @__PURE__ */ jsxRuntime.jsx("goa-tabs", { initialtab: initialTab, children });
23482
+ function GoATabs({ initialTab, children, testId }) {
23483
+ return /* @__PURE__ */ jsxRuntime.jsx(
23484
+ "goa-tabs",
23485
+ {
23486
+ initialtab: initialTab,
23487
+ "data-testid": testId,
23488
+ children
23489
+ }
23490
+ );
23447
23491
  }
23448
23492
  function GoATab({ heading, children }) {
23449
23493
  return /* @__PURE__ */ jsxRuntime.jsxs("goa-tab", { children: [