@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.mjs CHANGED
@@ -18353,7 +18353,7 @@ class bf extends se {
18353
18353
  }
18354
18354
  customElements.define("goa-tab", re(bf, { heading: {}, open: {} }, ["heading", "default"], [], true));
18355
18355
  function pf(t) {
18356
- de(t, "svelte-1i5xhlu", ":host{overflow-x:auto}.goatable.svelte-1i5xhlu{width:0}table.svelte-1i5xhlu{border-collapse:collapse}");
18356
+ de(t, "svelte-1wrp53x", ".goatable.svelte-1wrp53x{width:0}table.svelte-1wrp53x{border-collapse:collapse}");
18357
18357
  }
18358
18358
  function _f(t) {
18359
18359
  let e, n, l;
@@ -18370,7 +18370,7 @@ function _f(t) {
18370
18370
  return {
18371
18371
  c() {
18372
18372
  e = z("table"), o && o.c(), f(e, "style", n = /*width*/
18373
- t[0] && "width: 100%;"), f(e, "class", "svelte-1i5xhlu");
18373
+ t[0] && "width: 100%;"), f(e, "class", "svelte-1wrp53x");
18374
18374
  },
18375
18375
  m(r, s) {
18376
18376
  P(r, e, s), o && o.m(e, null), l = true;
@@ -18472,7 +18472,8 @@ function yf(t) {
18472
18472
  return n = c(t), l = a[n] = s[n](t), {
18473
18473
  c() {
18474
18474
  e = z("div"), l.c(), f(e, "class", i = ze(`goatable ${/*variant*/
18475
- t[1]}`) + " svelte-1i5xhlu"), f(e, "style", o = `
18475
+ t[1]}`) + " svelte-1wrp53x"), f(e, "style", o = `
18476
+ overflow-x: auto;
18476
18477
  ${`width: ${/*width*/
18477
18478
  t[0] || "100%"};`}
18478
18479
  ${fe(
@@ -18501,8 +18502,9 @@ function yf(t) {
18501
18502
  a[m] = null;
18502
18503
  }), 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*/
18503
18504
  2 && i !== (i = ze(`goatable ${/*variant*/
18504
- d[1]}`) + " svelte-1i5xhlu")) && f(e, "class", i), (!r || u & /*width, mt, mr, mb, ml*/
18505
+ d[1]}`) + " svelte-1wrp53x")) && f(e, "class", i), (!r || u & /*width, mt, mr, mb, ml*/
18505
18506
  61 && o !== (o = `
18507
+ overflow-x: auto;
18506
18508
  ${`width: ${/*width*/
18507
18509
  d[0] || "100%"};`}
18508
18510
  ${fe(
@@ -18671,7 +18673,7 @@ class zf extends se {
18671
18673
  this.$$set({ ml: e }), _();
18672
18674
  }
18673
18675
  }
18674
- customElements.define("goa-table", re(zf, { width: {}, stickyheader: {}, variant: {}, mt: {}, mr: {}, mb: {}, ml: {} }, ["default"], [], true));
18676
+ customElements.define("goa-table", re(zf, { width: {}, stickyheader: {}, variant: { reflect: true }, mt: {}, mr: {}, mb: {}, ml: {} }, ["default"], [], true));
18675
18677
  function Cf(t) {
18676
18678
  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}");
18677
18679
  }
@@ -20309,6 +20311,7 @@ function GoAAppHeaderMenu(props) {
20309
20311
  {
20310
20312
  heading: props.heading,
20311
20313
  leadingicon: props.leadingIcon,
20314
+ "data-testid": props.testId,
20312
20315
  children: props.children
20313
20316
  }
20314
20317
  );
@@ -20535,6 +20538,7 @@ function GoACalendar({
20535
20538
  value,
20536
20539
  min,
20537
20540
  max,
20541
+ testId,
20538
20542
  mt: mt2,
20539
20543
  mr: mr2,
20540
20544
  mb,
@@ -20559,6 +20563,7 @@ function GoACalendar({
20559
20563
  value: value == null ? void 0 : value.toISOString(),
20560
20564
  min: min == null ? void 0 : min.toISOString(),
20561
20565
  max: max == null ? void 0 : max.toISOString(),
20566
+ "data-testid": testId,
20562
20567
  mt: mt2,
20563
20568
  mr: mr2,
20564
20569
  mb,
@@ -20755,6 +20760,7 @@ function GoADatePicker({
20755
20760
  error,
20756
20761
  min,
20757
20762
  max,
20763
+ testId,
20758
20764
  mt: mt2,
20759
20765
  mr: mr2,
20760
20766
  mb,
@@ -20767,10 +20773,14 @@ function GoADatePicker({
20767
20773
  return;
20768
20774
  }
20769
20775
  const current = ref.current;
20770
- current.addEventListener("_change", (e) => {
20776
+ const handleChange = (e) => {
20771
20777
  onChange(name || "", e.detail.value);
20772
- });
20773
- });
20778
+ };
20779
+ current.addEventListener("_change", handleChange);
20780
+ return () => {
20781
+ current.removeEventListener("_change", handleChange);
20782
+ };
20783
+ }, [onChange]);
20774
20784
  return /* @__PURE__ */ jsx(
20775
20785
  "goa-date-picker",
20776
20786
  {
@@ -20780,6 +20790,7 @@ function GoADatePicker({
20780
20790
  error,
20781
20791
  min: min == null ? void 0 : min.toISOString(),
20782
20792
  max: max == null ? void 0 : max.toISOString(),
20793
+ "data-testid": testId,
20783
20794
  mt: mt2,
20784
20795
  mr: mr2,
20785
20796
  mb,
@@ -20793,6 +20804,7 @@ function GoADetails(props) {
20793
20804
  {
20794
20805
  heading: props.heading,
20795
20806
  open: props.open,
20807
+ "data-testid": props.testId,
20796
20808
  mt: props.mt,
20797
20809
  mr: props.mr,
20798
20810
  mb: props.mb,
@@ -20890,6 +20902,7 @@ function GoAFileUploadCard({
20890
20902
  type,
20891
20903
  progress,
20892
20904
  error,
20905
+ testId,
20893
20906
  onDelete,
20894
20907
  onCancel
20895
20908
  }) {
@@ -20915,7 +20928,8 @@ function GoAFileUploadCard({
20915
20928
  size,
20916
20929
  type,
20917
20930
  progress,
20918
- error
20931
+ error,
20932
+ "data-testid": testId
20919
20933
  }
20920
20934
  );
20921
20935
  }
@@ -20923,6 +20937,7 @@ function GoAFileUploadInput({
20923
20937
  variant,
20924
20938
  accept,
20925
20939
  maxFileSize,
20940
+ testId,
20926
20941
  onSelectFile
20927
20942
  }) {
20928
20943
  const el2 = useRef(null);
@@ -20944,7 +20959,8 @@ function GoAFileUploadInput({
20944
20959
  ref: el2,
20945
20960
  variant,
20946
20961
  accept,
20947
- maxfilesize: maxFileSize
20962
+ maxfilesize: maxFileSize,
20963
+ "data-testid": testId
20948
20964
  }
20949
20965
  );
20950
20966
  }
@@ -20955,8 +20971,15 @@ function GoAAppFooter({
20955
20971
  }) {
20956
20972
  return /* @__PURE__ */ jsx("goa-app-footer", { maxcontentwidth: maxContentWidth, "data-testid": testId, children });
20957
20973
  }
20958
- function GoAAppFooterMetaSection({ children }) {
20959
- return /* @__PURE__ */ jsx("goa-app-footer-meta-section", { slot: "meta", children });
20974
+ function GoAAppFooterMetaSection({ testId, children }) {
20975
+ return /* @__PURE__ */ jsx(
20976
+ "goa-app-footer-meta-section",
20977
+ {
20978
+ "data-testid": testId,
20979
+ slot: "meta",
20980
+ children
20981
+ }
20982
+ );
20960
20983
  }
20961
20984
  function GoAAppFooterNavSection({
20962
20985
  heading,
@@ -23336,16 +23359,30 @@ function GoARadioGroup({
23336
23359
  );
23337
23360
  }
23338
23361
  function GoASideMenuGroup(props) {
23339
- return /* @__PURE__ */ jsx("goa-side-menu-group", { heading: props.heading, children: props.children });
23362
+ return /* @__PURE__ */ jsx(
23363
+ "goa-side-menu-group",
23364
+ {
23365
+ heading: props.heading,
23366
+ "data-testid": props.testId,
23367
+ children: props.children
23368
+ }
23369
+ );
23340
23370
  }
23341
23371
  function GoASideMenuHeading(props) {
23342
- return /* @__PURE__ */ jsxs("goa-side-menu-heading", { icon: props.icon, children: [
23343
- props.children,
23344
- props.meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: props.meta })
23345
- ] });
23372
+ return /* @__PURE__ */ jsxs(
23373
+ "goa-side-menu-heading",
23374
+ {
23375
+ icon: props.icon,
23376
+ "data-testid": props.testId,
23377
+ children: [
23378
+ props.children,
23379
+ props.meta && /* @__PURE__ */ jsx("span", { slot: "meta", children: props.meta })
23380
+ ]
23381
+ }
23382
+ );
23346
23383
  }
23347
23384
  function GoASideMenu(props) {
23348
- return /* @__PURE__ */ jsx("goa-side-menu", { children: props.children });
23385
+ return /* @__PURE__ */ jsx("goa-side-menu", { "data-testid": props.testId, children: props.children });
23349
23386
  }
23350
23387
  const GoASkeleton = ({
23351
23388
  maxWidth,
@@ -23440,8 +23477,15 @@ function GoATableSortHeader({
23440
23477
  }) {
23441
23478
  return /* @__PURE__ */ jsx("goa-table-sort-header", { name, direction, children });
23442
23479
  }
23443
- function GoATabs({ initialTab, children }) {
23444
- return /* @__PURE__ */ jsx("goa-tabs", { initialtab: initialTab, children });
23480
+ function GoATabs({ initialTab, children, testId }) {
23481
+ return /* @__PURE__ */ jsx(
23482
+ "goa-tabs",
23483
+ {
23484
+ initialtab: initialTab,
23485
+ "data-testid": testId,
23486
+ children
23487
+ }
23488
+ );
23445
23489
  }
23446
23490
  function GoATab({ heading, children }) {
23447
23491
  return /* @__PURE__ */ jsxs("goa-tab", { children: [