@stella-source/stellasource-dsl 3.6.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/index.js +453 -263
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/RadioButton/RadioButton.d.ts +4 -0
  4. package/dist/cjs/types/components/RadioButton/RadioButton.stories.d.ts +14 -0
  5. package/dist/cjs/types/components/RadioButton/styles.d.ts +38 -0
  6. package/dist/cjs/types/components/RadioButton/types.d.ts +13 -0
  7. package/dist/cjs/types/components/RadioButtonGroup/RadioButtonGroup.d.ts +4 -0
  8. package/dist/cjs/types/components/RadioButtonGroup/RadioButtonGroup.stories.d.ts +87 -0
  9. package/dist/cjs/types/components/RadioButtonGroup/styles.d.ts +8 -0
  10. package/dist/cjs/types/components/RadioButtonGroup/types.d.ts +22 -0
  11. package/dist/cjs/types/components/StellaIcon/types.d.ts +1 -1
  12. package/dist/cjs/types/components/Table/Table.d.ts +1 -1
  13. package/dist/cjs/types/components/Table/Table.stories.d.ts +8 -0
  14. package/dist/cjs/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
  15. package/dist/cjs/types/components/Table/styles.d.ts +10 -1
  16. package/dist/cjs/types/components/Table/types.d.ts +8 -3
  17. package/dist/cjs/types/components/Table/useTableState.d.ts +9 -0
  18. package/dist/esm/index.esm.js +453 -263
  19. package/dist/esm/index.esm.js.map +1 -1
  20. package/dist/esm/types/components/RadioButton/RadioButton.d.ts +4 -0
  21. package/dist/esm/types/components/RadioButton/RadioButton.stories.d.ts +14 -0
  22. package/dist/esm/types/components/RadioButton/styles.d.ts +38 -0
  23. package/dist/esm/types/components/RadioButton/types.d.ts +13 -0
  24. package/dist/esm/types/components/RadioButtonGroup/RadioButtonGroup.d.ts +4 -0
  25. package/dist/esm/types/components/RadioButtonGroup/RadioButtonGroup.stories.d.ts +87 -0
  26. package/dist/esm/types/components/RadioButtonGroup/styles.d.ts +8 -0
  27. package/dist/esm/types/components/RadioButtonGroup/types.d.ts +22 -0
  28. package/dist/esm/types/components/StellaIcon/types.d.ts +1 -1
  29. package/dist/esm/types/components/Table/Table.d.ts +1 -1
  30. package/dist/esm/types/components/Table/Table.stories.d.ts +8 -0
  31. package/dist/esm/types/components/Table/TableComponents/CheckboxDropdownMenu.d.ts +26 -0
  32. package/dist/esm/types/components/Table/styles.d.ts +10 -1
  33. package/dist/esm/types/components/Table/types.d.ts +8 -3
  34. package/dist/esm/types/components/Table/useTableState.d.ts +9 -0
  35. package/dist/index.d.ts +9 -4
  36. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -961,7 +961,7 @@ const a$f = /* @__PURE__ */ new Map([
961
961
  ]
962
962
  ]);
963
963
 
964
- const H = /* @__PURE__ */ new Map([
964
+ const H$1 = /* @__PURE__ */ new Map([
965
965
  [
966
966
  "bold",
967
967
  /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M28,132a12,12,0,0,1,0-24H56a4,4,0,0,0,0-8H40a28,28,0,0,1-3.38-55.79A12,12,0,0,1,59.3,44H64a12,12,0,0,1,0,24H40a4,4,0,0,0,0,8H56a28,28,0,0,1,3.38,55.79A12,12,0,0,1,36.7,132ZM236,56V192a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V164a12,12,0,0,1,24,0v24H156V164H88a12,12,0,0,1,0-24h68V116H112a12,12,0,0,1,0-24H212V68H104a12,12,0,0,1,0-24H224A12,12,0,0,1,236,56Zm-56,84h32V116H180Zm32,48V164H180v24Z" }))
@@ -1573,6 +1573,33 @@ const e$j = /* @__PURE__ */ new Map([
1573
1573
  ]
1574
1574
  ]);
1575
1575
 
1576
+ const H = /* @__PURE__ */ new Map([
1577
+ [
1578
+ "bold",
1579
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM44,116H76v24H44Zm56,0H212v24H100ZM212,68V92H44V68ZM44,164H76v24H44Zm56,24V164H212v24Z" }))
1580
+ ],
1581
+ [
1582
+ "duotone",
1583
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M88,104v96H32V104Z", opacity: "0.2" }), /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
1584
+ ],
1585
+ [
1586
+ "fill",
1587
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
1588
+ ],
1589
+ [
1590
+ "light",
1591
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM38,110H82v36H38Zm56,0H218v36H94ZM218,62V98H38V62ZM38,192V158H82v36H40A2,2,0,0,1,38,192Zm178,2H94V158H218v34A2,2,0,0,1,216,194Z" }))
1592
+ ],
1593
+ [
1594
+ "regular",
1595
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z" }))
1596
+ ],
1597
+ [
1598
+ "thin",
1599
+ /* @__PURE__ */ a__namespace.createElement(a__namespace.Fragment, null, /* @__PURE__ */ a__namespace.createElement("path", { d: "M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52ZM36,108H84v40H36Zm56,0H220v40H92ZM220,60v40H36V60ZM36,192V156H84v40H40A4,4,0,0,1,36,192Zm180,4H92V156H220v36A4,4,0,0,1,216,196Z" }))
1600
+ ]
1601
+ ]);
1602
+
1576
1603
  const e$i = /* @__PURE__ */ new Map([
1577
1604
  [
1578
1605
  "bold",
@@ -1846,7 +1873,7 @@ const a$5 = /* @__PURE__ */ new Map([
1846
1873
  ]
1847
1874
  ]);
1848
1875
 
1849
- const o$m = a$n.createContext({
1876
+ const o$n = a$n.createContext({
1850
1877
  color: "currentColor",
1851
1878
  size: "1em",
1852
1879
  weight: "regular",
@@ -1870,7 +1897,7 @@ const p$2 = a__namespace.forwardRef(
1870
1897
  weight: f = "regular",
1871
1898
  mirrored: g = false,
1872
1899
  ...w
1873
- } = a__namespace.useContext(o$m);
1900
+ } = a__namespace.useContext(o$n);
1874
1901
  return /* @__PURE__ */ a__namespace.createElement(
1875
1902
  "svg",
1876
1903
  {
@@ -1892,9 +1919,9 @@ const p$2 = a__namespace.forwardRef(
1892
1919
  );
1893
1920
  p$2.displayName = "IconBase";
1894
1921
 
1895
- const o$l = a__namespace.forwardRef((e, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...e, weights: a$m }));
1896
- o$l.displayName = "ArrowCircleUpIcon";
1897
- const p$1 = o$l;
1922
+ const o$m = a__namespace.forwardRef((e, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...e, weights: a$m }));
1923
+ o$m.displayName = "ArrowCircleUpIcon";
1924
+ const p$1 = o$m;
1898
1925
 
1899
1926
  const r$7 = a__namespace.forwardRef((e, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...e, weights: a$l }));
1900
1927
  r$7.displayName = "ArrowUpIcon";
@@ -1911,9 +1938,9 @@ const e$d = a__namespace.forwardRef((o, t) => /* @__PURE__ */ a__namespace.creat
1911
1938
  e$d.displayName = "ArrowsOutLineVerticalIcon";
1912
1939
  const n$c = e$d;
1913
1940
 
1914
- const o$k = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$E }));
1915
- o$k.displayName = "AsteriskIcon";
1916
- const c$9 = o$k;
1941
+ const o$l = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$E }));
1942
+ o$l.displayName = "AsteriskIcon";
1943
+ const c$9 = o$l;
1917
1944
 
1918
1945
  const a$4 = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$D }));
1919
1946
  a$4.displayName = "BankIcon";
@@ -1949,16 +1976,16 @@ const c$6 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.creat
1949
1976
  c$6.displayName = "CheckCircleIcon";
1950
1977
  const s$2 = c$6;
1951
1978
 
1952
- const o$j = a__namespace.forwardRef((t, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...t, weights: l$6 }));
1953
- o$j.displayName = "CheckFatIcon";
1954
- const n$b = o$j;
1979
+ const o$k = a__namespace.forwardRef((t, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...t, weights: l$6 }));
1980
+ o$k.displayName = "CheckFatIcon";
1981
+ const n$b = o$k;
1955
1982
 
1956
- const o$i = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$y }));
1957
- o$i.displayName = "CheckSquareIcon";
1983
+ const o$j = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$y }));
1984
+ o$j.displayName = "CheckSquareIcon";
1958
1985
 
1959
- const o$h = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$i }));
1960
- o$h.displayName = "CircleHalfIcon";
1961
- const l = o$h;
1986
+ const o$i = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$i }));
1987
+ o$i.displayName = "CircleHalfIcon";
1988
+ const l = o$i;
1962
1989
 
1963
1990
  const e$9 = a__namespace.forwardRef((o, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...o, weights: e$x }));
1964
1991
  e$9.displayName = "CurrencyCircleDollarIcon";
@@ -1974,21 +2001,21 @@ const n$a = t$3;
1974
2001
  const t$2 = a__namespace.forwardRef((m, e) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: e, ...m, weights: a$h }));
1975
2002
  t$2.displayName = "EmptyIcon";
1976
2003
 
1977
- const o$g = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$g }));
1978
- o$g.displayName = "EyeIcon";
1979
- const n$9 = o$g;
2004
+ const o$h = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$g }));
2005
+ o$h.displayName = "EyeIcon";
2006
+ const n$9 = o$h;
1980
2007
 
1981
- const o$f = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: e$u }));
1982
- o$f.displayName = "EyeSlashIcon";
1983
- const n$8 = o$f;
2008
+ const o$g = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: e$u }));
2009
+ o$g.displayName = "EyeSlashIcon";
2010
+ const n$8 = o$g;
1984
2011
 
1985
- const o$e = a__namespace.forwardRef((n, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...n, weights: l$5 }));
1986
- o$e.displayName = "FunnelIcon";
1987
- const s$1 = o$e;
2012
+ const o$f = a__namespace.forwardRef((n, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...n, weights: l$5 }));
2013
+ o$f.displayName = "FunnelIcon";
2014
+ const s$1 = o$f;
1988
2015
 
1989
- const o$d = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: l$4 }));
1990
- o$d.displayName = "GearIcon";
1991
- const n$7 = o$d;
2016
+ const o$e = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: l$4 }));
2017
+ o$e.displayName = "GearIcon";
2018
+ const n$7 = o$e;
1992
2019
 
1993
2020
  const e$8 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: l$3 }));
1994
2021
  e$8.displayName = "HourglassSimpleLowIcon";
@@ -1997,41 +2024,41 @@ const e$7 = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.creat
1997
2024
  e$7.displayName = "InfoIcon";
1998
2025
  const c$4 = e$7;
1999
2026
 
2000
- const e$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: H }));
2027
+ const e$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: H$1 }));
2001
2028
  e$6.displayName = "InvoiceIcon";
2002
2029
  const m$8 = e$6;
2003
2030
 
2004
- const o$c = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$e }));
2005
- o$c.displayName = "KeyholeIcon";
2006
- const n$6 = o$c;
2031
+ const o$d = a__namespace.forwardRef((r, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...r, weights: a$e }));
2032
+ o$d.displayName = "KeyholeIcon";
2033
+ const n$6 = o$d;
2007
2034
 
2008
- const o$b = a__namespace.forwardRef((s, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...s, weights: l$2 }));
2009
- o$b.displayName = "ListChecksIcon";
2035
+ const o$c = a__namespace.forwardRef((s, t) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: t, ...s, weights: l$2 }));
2036
+ o$c.displayName = "ListChecksIcon";
2010
2037
 
2011
- const o$a = a__namespace.forwardRef((m, p) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: p, ...m, weights: e$t }));
2012
- o$a.displayName = "LockSimpleOpenIcon";
2013
- const a = o$a;
2038
+ const o$b = a__namespace.forwardRef((m, p) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: p, ...m, weights: e$t }));
2039
+ o$b.displayName = "LockSimpleOpenIcon";
2040
+ const a = o$b;
2014
2041
 
2015
- const o$9 = a__namespace.forwardRef((s, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...s, weights: a$d }));
2016
- o$9.displayName = "MagnifyingGlassIcon";
2017
- const f = o$9;
2042
+ const o$a = a__namespace.forwardRef((s, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...s, weights: a$d }));
2043
+ o$a.displayName = "MagnifyingGlassIcon";
2044
+ const f = o$a;
2018
2045
 
2019
- const o$8 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$s }));
2020
- o$8.displayName = "MinusSquareIcon";
2046
+ const o$9 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$s }));
2047
+ o$9.displayName = "MinusSquareIcon";
2021
2048
 
2022
2049
  const e$5 = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: e$r }));
2023
2050
  e$5.displayName = "MoneyWavyIcon";
2024
2051
 
2025
- const o$7 = a__namespace.forwardRef((t, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...t, weights: e$q }));
2026
- o$7.displayName = "NotePencilIcon";
2052
+ const o$8 = a__namespace.forwardRef((t, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...t, weights: e$q }));
2053
+ o$8.displayName = "NotePencilIcon";
2027
2054
 
2028
2055
  const t$1 = a__namespace.forwardRef((o, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...o, weights: e$p }));
2029
2056
  t$1.displayName = "PaletteIcon";
2030
2057
  const n$5 = t$1;
2031
2058
 
2032
- const o$6 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$o }));
2033
- o$6.displayName = "PaperclipIcon";
2034
- const m$7 = o$6;
2059
+ const o$7 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: e$o }));
2060
+ o$7.displayName = "PaperclipIcon";
2061
+ const m$7 = o$7;
2035
2062
 
2036
2063
  const e$4 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: a$c }));
2037
2064
  e$4.displayName = "PlusIcon";
@@ -2041,24 +2068,24 @@ const e$3 = a__namespace.forwardRef((t, r) => /* @__PURE__ */ a__namespace.creat
2041
2068
  e$3.displayName = "QuestionIcon";
2042
2069
  const m$6 = e$3;
2043
2070
 
2044
- const o$5 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: e$n }));
2045
- o$5.displayName = "ShieldCheckIcon";
2046
- const h = o$5;
2071
+ const o$6 = a__namespace.forwardRef((c, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...c, weights: e$n }));
2072
+ o$6.displayName = "ShieldCheckIcon";
2073
+ const h = o$6;
2047
2074
 
2048
2075
  const p = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$m }));
2049
2076
  p.displayName = "ShoppingCartSimpleIcon";
2050
2077
  const n$3 = p;
2051
2078
 
2052
- const o$4 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$l }));
2053
- o$4.displayName = "SlidersIcon";
2054
- const c$3 = o$4;
2079
+ const o$5 = a__namespace.forwardRef((r, s) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: s, ...r, weights: e$l }));
2080
+ o$5.displayName = "SlidersIcon";
2081
+ const c$3 = o$5;
2055
2082
 
2056
- const o$3 = a__namespace.forwardRef((r, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...r, weights: e$k }));
2057
- o$3.displayName = "SpinnerGapIcon";
2058
- const m$5 = o$3;
2083
+ const o$4 = a__namespace.forwardRef((r, n) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: n, ...r, weights: e$k }));
2084
+ o$4.displayName = "SpinnerGapIcon";
2085
+ const m$5 = o$4;
2059
2086
 
2060
- const o$2 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$a }));
2061
- o$2.displayName = "SquareIcon";
2087
+ const o$3 = a__namespace.forwardRef((r, a) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: a, ...r, weights: a$a }));
2088
+ o$3.displayName = "SquareIcon";
2062
2089
 
2063
2090
  const t = a__namespace.forwardRef((a, c) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: c, ...a, weights: a$9 }));
2064
2091
  t.displayName = "StackIcon";
@@ -2072,6 +2099,9 @@ const e$2 = a__namespace.forwardRef((o, r) => /* @__PURE__ */ a__namespace.creat
2072
2099
  e$2.displayName = "StudentIcon";
2073
2100
  const s = e$2;
2074
2101
 
2102
+ const o$2 = a__namespace.forwardRef((a, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...a, weights: H }));
2103
+ o$2.displayName = "TableIcon";
2104
+
2075
2105
  const m$4 = a__namespace.forwardRef((e, r) => /* @__PURE__ */ a__namespace.createElement(p$2, { ref: r, ...e, weights: e$i }));
2076
2106
  m$4.displayName = "ThumbsDownIcon";
2077
2107
  const c$2 = m$4;
@@ -2215,7 +2245,7 @@ const selectIcon = (iconName) => {
2215
2245
  case "sync":
2216
2246
  return { icon: r$6, color: Styles.color.blue.primary };
2217
2247
  case "check-square":
2218
- return { icon: o$i, color: Styles.color.blue.primary };
2248
+ return { icon: o$j, color: Styles.color.blue.primary };
2219
2249
  case "empty":
2220
2250
  return { icon: t$2, color: Styles.color.states.error };
2221
2251
  case "money":
@@ -2234,9 +2264,11 @@ const selectIcon = (iconName) => {
2234
2264
  case "truck":
2235
2265
  return { icon: r$2, color: Styles.color.grey.shadow };
2236
2266
  case "list-checks":
2237
- return { icon: o$b, color: Styles.color.blue.primary };
2267
+ return { icon: o$c, color: Styles.color.blue.primary };
2238
2268
  case "note-pencil":
2239
- return { icon: o$7, color: Styles.color.grey.charcoal };
2269
+ return { icon: o$8, color: Styles.color.grey.charcoal };
2270
+ case "table":
2271
+ return { icon: o$2, color: Styles.color.grey.charcoal };
2240
2272
  default:
2241
2273
  return {
2242
2274
  icon: ({ size, color, id, className, dataTestId }) => (a$n.createElement(StellaIcon$1, { size: size, color: color, id: id, className: className, "data-testid": dataTestId })),
@@ -2281,6 +2313,7 @@ const getFill = (iconName) => {
2281
2313
  "list-checks",
2282
2314
  "broadcast",
2283
2315
  "eye",
2316
+ "table",
2284
2317
  ];
2285
2318
  if (boldIcons.includes(iconName)) {
2286
2319
  return "bold";
@@ -21788,6 +21821,54 @@ function useReactTable(options) {
21788
21821
  return tableRef.current;
21789
21822
  }
21790
21823
 
21824
+ const TABLE_STORAGE_PREFIX = "ds-table-state";
21825
+ function loadTableState(tableId) {
21826
+ try {
21827
+ const raw = localStorage.getItem(`${TABLE_STORAGE_PREFIX}:${tableId}`);
21828
+ return raw ? JSON.parse(raw) : {};
21829
+ }
21830
+ catch {
21831
+ return {};
21832
+ }
21833
+ }
21834
+ function saveTableState(tableId, state) {
21835
+ try {
21836
+ localStorage.setItem(`${TABLE_STORAGE_PREFIX}:${tableId}`, JSON.stringify(state));
21837
+ }
21838
+ catch { }
21839
+ }
21840
+ function usePersistTableState(tableId, state, sizingDebounceMs = 300) {
21841
+ const debounceTimer = a$n.useRef(null);
21842
+ const latestSizing = a$n.useRef(state.columnSizing);
21843
+ a$n.useEffect(() => {
21844
+ latestSizing.current = state.columnSizing;
21845
+ }, [state.columnSizing]);
21846
+ // Persist visibility and sorting immediately
21847
+ a$n.useEffect(() => {
21848
+ saveTableState(tableId, {
21849
+ columnVisibility: state.columnVisibility,
21850
+ columnSizing: latestSizing.current,
21851
+ sorting: state.sorting,
21852
+ });
21853
+ }, [tableId, state.columnVisibility, state.sorting]);
21854
+ // Persist sizing debounced
21855
+ a$n.useEffect(() => {
21856
+ if (debounceTimer.current)
21857
+ clearTimeout(debounceTimer.current);
21858
+ debounceTimer.current = setTimeout(() => {
21859
+ saveTableState(tableId, {
21860
+ columnVisibility: state.columnVisibility,
21861
+ columnSizing: latestSizing.current,
21862
+ sorting: state.sorting,
21863
+ });
21864
+ }, sizingDebounceMs);
21865
+ return () => {
21866
+ if (debounceTimer.current)
21867
+ clearTimeout(debounceTimer.current);
21868
+ };
21869
+ }, [tableId, state.columnSizing]);
21870
+ }
21871
+
21791
21872
  const getSelectWidth = (digits) => {
21792
21873
  if (digits >= 10 && digits <= 99)
21793
21874
  return "36px";
@@ -22297,6 +22378,49 @@ const ClearFilterButtonRow = styled.div `
22297
22378
  align-items: "center";
22298
22379
  text-align: "center";
22299
22380
  `;
22381
+ const ExpandedContentRow = styled.tr `
22382
+ background-color: ${Styles.color.grey.pale};
22383
+ `;
22384
+ const ExpandedContentCell = styled.td `
22385
+ padding: 12px 16px;
22386
+ border-bottom: 1px solid ${Styles.color.grey.light};
22387
+ background-color: ${Styles.color.grey.pale};
22388
+ `;
22389
+ const ExpandChevronButton = styled.button `
22390
+ display: flex;
22391
+ align-items: center;
22392
+ justify-content: center;
22393
+ background: none;
22394
+ border: none;
22395
+ cursor: pointer;
22396
+ padding: 4px;
22397
+ border-radius: 4px;
22398
+ transition:
22399
+ transform 0.2s ease,
22400
+ background-color 0.15s ease;
22401
+
22402
+ & > svg {
22403
+ transition: transform 0.2s ease;
22404
+ transform: ${({ $expanded }) => $expanded ? "rotate(90deg)" : "rotate(0deg)"};
22405
+ fill: ${Styles.color.grey.charcoal};
22406
+ }
22407
+
22408
+ &:hover {
22409
+ background-color: ${Styles.color.grey.light};
22410
+ }
22411
+ `;
22412
+ const ActionBar = styled.div `
22413
+ display: flex;
22414
+ justify-content: space-between;
22415
+ height: fit-content;
22416
+ width: 100%;
22417
+ `;
22418
+ const GlobalActionWrapper = styled.div `
22419
+ display: flex;
22420
+ gap: 10px;
22421
+ width: fit-content;
22422
+ padding-bottom: 5px;
22423
+ `;
22300
22424
 
22301
22425
  const IndeterminateCheckbox = ({ isIndeterminate, isChecked, onChange, }) => {
22302
22426
  const ref = a$n.useRef(null);
@@ -22339,6 +22463,40 @@ function useDebounceCallback(callback, delay) {
22339
22463
  return [debounced, { flush, cancel }];
22340
22464
  }
22341
22465
 
22466
+ const CheckboxDropdownMenu = ({ options, selected, mode = "multiSelect", coords, menuRef, onApply, onClear, showSelectAll = true, showClear = false, searchInputId = "search", searchInputLabel = "Search", onSearch, onSearchBlur, serverSide = false, }) => {
22467
+ const [tempSelected, setTempSelected] = a$n.useState(selected);
22468
+ const toggleItem = (key) => {
22469
+ setTempSelected((prev) => prev.includes(key) ? prev.filter((i) => i !== key) : [...prev, key]);
22470
+ };
22471
+ const toggleAll = () => {
22472
+ setTempSelected((prev) => prev.length === options.length ? [] : options.map((o) => o.key));
22473
+ };
22474
+ const showApplyButton = mode === "multiSelect" || (mode === "search" && serverSide);
22475
+ return ReactDOM.createPortal(a$n.createElement(FilterMenu, { style: { top: coords.top, left: coords.left, position: "absolute" }, ref: menuRef },
22476
+ a$n.createElement(MenuItemGroup, null,
22477
+ mode === "search" && (a$n.createElement("div", { style: { padding: "4px 10px" } },
22478
+ a$n.createElement(TextInput, { id: searchInputId, label: searchInputLabel, placeholder: "Search", hideLabel: true, onChange: (value) => {
22479
+ setTempSelected(value === "" ? [] : [value]);
22480
+ if (!serverSide)
22481
+ onSearch?.(value);
22482
+ }, onBlur: () => !serverSide && onSearchBlur?.(), endIcon: "search", value: tempSelected?.[0] }))),
22483
+ mode === "multiSelect" && showSelectAll && (a$n.createElement(MenuItem, { key: "select-all" },
22484
+ a$n.createElement(Checkbox, { id: "all-checkbox", name: "all-checkbox", checked: options.every((opt) => tempSelected.includes(opt.key)), onChange: toggleAll }),
22485
+ a$n.createElement(FilterBoxLabel, { htmlFor: "all-checkbox" }, "Select All"))),
22486
+ mode !== "search" &&
22487
+ options.map(({ key, value }, index) => {
22488
+ if (mode === "singleSelect") {
22489
+ return (a$n.createElement(MenuItemOption, { key: `${key}-${index}`, id: `${key}-button`, onClick: () => onApply([key]), "$applied": selected.includes(key) }, value));
22490
+ }
22491
+ return (a$n.createElement(MenuItem, { key: key },
22492
+ a$n.createElement(Checkbox, { id: `${key}-checkbox`, name: `${key}-checkbox`, checked: tempSelected.includes(key), onChange: () => toggleItem(key) }),
22493
+ a$n.createElement(FilterLabelTransparent, null, value),
22494
+ a$n.createElement(FilterBoxLabel, { htmlFor: `${key}-checkbox` }, value)));
22495
+ })),
22496
+ showApplyButton && (a$n.createElement(MenuButton, { onClick: () => onApply(tempSelected) }, "Apply Selection")),
22497
+ showClear && a$n.createElement(MenuButton, { onClick: onClear }, "Clear Filter")), document.body);
22498
+ };
22499
+
22342
22500
  const normalizeOptions = (raw) => {
22343
22501
  return raw
22344
22502
  .map((item) => {
@@ -22355,27 +22513,29 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
22355
22513
  const column = header.column;
22356
22514
  const columnDef = column.columnDef;
22357
22515
  const meta = columnDef.meta;
22358
- // Filter dropdown logic
22359
22516
  const menuRef = a$n.useRef(null);
22360
22517
  const buttonRef = a$n.useRef(null);
22361
22518
  const [showFilter, setShowFilter] = a$n.useState(false);
22362
22519
  const [coords, setCoords] = a$n.useState({ top: 0, left: 0 });
22363
- const [tempFilters, setTempFilters] = a$n.useState([]);
22364
- const [currentAppliedFilters, setCurrentAppliedFilters] = a$n.useState([]);
22365
22520
  const [filterOptions, setFilterOptions] = a$n.useState([]);
22366
- const displayOptions = serverSide
22367
- ? filterOptions
22368
- : normalizeOptions(Array.from(header.column.getFacetedUniqueValues().keys()));
22369
22521
  const [textAlign, setTextAlign] = a$n.useState("left");
22370
22522
  const [handleSave, { flush }] = useDebounceCallback((value) => {
22371
- column?.setFilterValue([value]);
22372
- if (value === "")
22373
- column?.setFilterValue([]);
22523
+ column?.setFilterValue(value === "" ? [] : [value]);
22374
22524
  onFilterApply?.();
22375
22525
  }, 300);
22526
+ const displayOptions = serverSide
22527
+ ? filterOptions
22528
+ : normalizeOptions(Array.from(header.column.getFacetedUniqueValues().keys()));
22376
22529
  a$n.useEffect(() => {
22377
22530
  setFilterOptions(normalizeOptions(meta?.filterOptions || []));
22378
22531
  }, [meta]);
22532
+ a$n.useEffect(() => {
22533
+ setTextAlign(meta?.headerAlign || (meta?.dataType === "number" ? "right" : "left"));
22534
+ }, [meta]);
22535
+ a$n.useEffect(() => {
22536
+ if (meta?.pin)
22537
+ column.pin(meta.pin);
22538
+ }, []);
22379
22539
  const toggleMenu = (e) => {
22380
22540
  e.stopPropagation();
22381
22541
  if (buttonRef.current) {
@@ -22385,11 +22545,13 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
22385
22545
  left: rect.right + window.scrollX - 25,
22386
22546
  });
22387
22547
  }
22388
- showFilterMenu(!showFilter);
22548
+ const next = !showFilter;
22549
+ onFilterMenuInteraction?.(column.id, next);
22550
+ setShowFilter(next);
22389
22551
  };
22390
- const showFilterMenu = (active) => {
22391
- onFilterMenuInteraction?.(column.id, active);
22392
- setShowFilter(active);
22552
+ const closeMenu = () => {
22553
+ onFilterMenuInteraction?.(column.id, false);
22554
+ setShowFilter(false);
22393
22555
  };
22394
22556
  // Close on outside click
22395
22557
  a$n.useEffect(() => {
@@ -22397,28 +22559,14 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
22397
22559
  return;
22398
22560
  const handleClickOutside = (e) => {
22399
22561
  const target = e.target;
22400
- const insideButton = !!buttonRef.current?.contains(target);
22401
- const insideMenu = !!menuRef.current?.contains(target);
22402
- if (!insideButton && !insideMenu) {
22403
- setTempFilters(filters?.[header.id] || currentAppliedFilters);
22404
- showFilterMenu(false);
22562
+ if (!buttonRef.current?.contains(target) && !menuRef.current?.contains(target)) {
22563
+ closeMenu();
22405
22564
  }
22406
22565
  };
22407
22566
  document.addEventListener("click", handleClickOutside, true);
22408
22567
  return () => document.removeEventListener("click", handleClickOutside, true);
22409
22568
  }, [showFilter]);
22410
- a$n.useEffect(() => {
22411
- setTextAlign(meta?.headerAlign || (meta?.dataType === "number" ? "right" : "left"));
22412
- }, [meta]);
22413
- a$n.useEffect(() => {
22414
- const currentFilters = filters?.[header.id];
22415
- setTempFilters(currentFilters ? currentFilters : []);
22416
- }, [filters]);
22417
- a$n.useEffect(() => {
22418
- if (meta?.pin) {
22419
- column.pin(meta?.pin);
22420
- }
22421
- }, []);
22569
+ const appliedFilters = filters?.[header.id] ?? [];
22422
22570
  return (a$n.createElement(HeaderCell, { "$isPinnedLeft": column.getIsPinned() === "left", "$isPinnedRight": column.getIsPinned() === "right", "$columnInfo": column, "$filterMenuOpen": showFilter, style: {
22423
22571
  textAlign: meta?.headerAlign || (meta?.dataType === "number" ? "right" : "left"),
22424
22572
  width: header.getSize(),
@@ -22429,82 +22577,19 @@ const TableHeaderCell = ({ header, serverSide, filters, sorting, scrollPosition,
22429
22577
  ? "none"
22430
22578
  : undefined,
22431
22579
  } },
22432
- a$n.createElement(HeaderCellPosition, { style: {
22433
- justifyContent: textAlign === "left" ? "start" : "end",
22434
- } },
22580
+ a$n.createElement(HeaderCellPosition, { style: { justifyContent: textAlign === "left" ? "start" : "end" } },
22435
22581
  textAlign === "left" && (a$n.createElement("span", { style: { fontWeight: 600 } }, flexRender(columnDef.header, header.getContext()))),
22436
- header.column.getCanFilter() && (a$n.createElement("div", { style: {
22437
- display: "flex",
22438
- alignItems: "center",
22439
- position: "relative",
22440
- } },
22441
- a$n.createElement(CustomIconButton$1, { className: "icon", iconName: "filter", ariaLabel: "Filter Button", variant: "tertiary", "$active": filters[header.id]?.length > 0 || showFilter, onClick: (e) => toggleMenu(e), ref: buttonRef }),
22442
- showFilter &&
22443
- ReactDOM.createPortal(a$n.createElement(FilterMenu, { style: {
22444
- top: coords.top,
22445
- left: coords.left,
22446
- position: "absolute",
22447
- }, ref: menuRef },
22448
- a$n.createElement(MenuItemGroup, null,
22449
- meta?.filterMode === "search" && (a$n.createElement("div", { style: { padding: "4px 10px" } },
22450
- a$n.createElement(TextInput, { id: `${columnDef.header}-search`, label: `${columnDef.header} search`, placeholder: "Search", hideLabel: true, onChange: (value) => {
22451
- value === ""
22452
- ? setTempFilters([])
22453
- : setTempFilters([value]);
22454
- !serverSide && handleSave(value);
22455
- }, onBlur: () => !serverSide && flush(), endIcon: "search", value: tempFilters?.[0] }))),
22456
- (meta?.filterMode === "multiSelect" ||
22457
- !meta?.filterMode) && (a$n.createElement(MenuItem, { key: "select-all" },
22458
- a$n.createElement(Checkbox, { id: "all-checkbox", name: "all-checkbox", checked: displayOptions?.every((opt) => tempFilters?.includes(opt.key)), onChange: () => {
22459
- setTempFilters((prev) => {
22460
- if (prev?.length === displayOptions?.length) {
22461
- return [];
22462
- }
22463
- else {
22464
- return displayOptions.map((opt) => opt.key);
22465
- }
22466
- });
22467
- } }),
22468
- a$n.createElement(FilterBoxLabel, { htmlFor: "all-checkbox" }, "Select All"))),
22469
- displayOptions?.map(({ key, value }, index) => {
22470
- if (meta?.filterMode === "singleSelect") {
22471
- return (a$n.createElement(MenuItemOption, { key: `${key}-${index}`, id: `${key}-button`, onClick: () => {
22472
- setCurrentAppliedFilters([key]);
22473
- column?.setFilterValue([key]);
22474
- showFilterMenu(false);
22475
- onFilterApply?.();
22476
- }, "$applied": tempFilters?.includes(key) }, value));
22477
- }
22478
- if (meta?.filterMode === "multiSelect" ||
22479
- !meta?.filterMode) {
22480
- return (a$n.createElement(MenuItem, { key: key },
22481
- a$n.createElement(Checkbox, { id: `${key}-checkbox`, name: `${key}-checkbox`, checked: tempFilters?.includes(key), onChange: () => {
22482
- setTempFilters((prev) => {
22483
- if (prev?.includes(key))
22484
- return prev.filter((i) => i !== key);
22485
- else
22486
- return [...prev, key];
22487
- });
22488
- } }),
22489
- a$n.createElement(FilterLabelTransparent, null, value),
22490
- a$n.createElement(FilterBoxLabel, { htmlFor: `${key}-checkbox` }, value)));
22491
- }
22492
- })),
22493
- (meta?.filterMode === "multiSelect" ||
22494
- (meta?.filterMode === "search" && serverSide) ||
22495
- !meta?.filterMode) && (a$n.createElement(MenuButton, { key: "apply", onClick: () => {
22496
- setCurrentAppliedFilters(tempFilters);
22497
- column?.setFilterValue(tempFilters?.length > 0 ? tempFilters : []);
22498
- showFilterMenu(false);
22499
- onFilterApply?.();
22500
- } }, "Apply Selection")),
22501
- filters?.[header.id]?.length > 0 && (a$n.createElement(MenuButton, { key: "clear", onClick: () => {
22502
- column?.setFilterValue([]);
22503
- showFilterMenu(false);
22504
- setTempFilters([]);
22505
- setCurrentAppliedFilters([]);
22506
- onFilterApply?.();
22507
- } }, "Clear Filter"))), document.body))),
22582
+ header.column.getCanFilter() && (a$n.createElement("div", { style: { display: "flex", alignItems: "center", position: "relative" } },
22583
+ a$n.createElement(CustomIconButton$1, { className: "icon", iconName: "filter", ariaLabel: "Filter Button", variant: "tertiary", "$active": appliedFilters.length > 0 || showFilter, onClick: (e) => toggleMenu(e), ref: buttonRef }),
22584
+ showFilter && (a$n.createElement(CheckboxDropdownMenu, { options: displayOptions, selected: appliedFilters, mode: meta?.filterMode ?? "multiSelect", coords: coords, menuRef: menuRef, showSelectAll: meta?.filterMode !== "singleSelect", showClear: appliedFilters.length > 0, onApply: (selected) => {
22585
+ column?.setFilterValue(selected.length > 0 ? selected : []);
22586
+ closeMenu();
22587
+ onFilterApply?.();
22588
+ }, onClear: () => {
22589
+ column?.setFilterValue([]);
22590
+ closeMenu();
22591
+ onFilterApply?.();
22592
+ }, serverSide: serverSide, onSearch: handleSave, onSearchBlur: flush, searchInputId: `${String(columnDef.header)}-search`, searchInputLabel: `${String(columnDef.header)} search` })))),
22508
22593
  header.column.getCanSort() && (a$n.createElement(SortButton, { className: "icon", iconName: "sort", ariaLabel: "Sort Button", variant: "tertiary", "$active": sorting.some((s) => s.id === header.column.id), "$sort": column.getIsSorted(), onClick: (e) => header.column.getToggleSortingHandler()?.(e) })),
22509
22594
  textAlign === "right" && (a$n.createElement("span", { style: { fontWeight: 600 } }, flexRender(columnDef.header, header.getContext()))))));
22510
22595
  };
@@ -22564,7 +22649,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22564
22649
  startingPage: 1,
22565
22650
  rowsPerPage: 10,
22566
22651
  totalRows: data.length,
22567
- }, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, }) {
22652
+ }, selectionMenuItems, dataAuto, dataTestId, id, className, htmlProps, resetTrigger, emptyTableState, defaultFilters, staticFilters, enableShowHide, globalActions, showExpandedRowToggle = false, renderExpandedRow, }) {
22568
22653
  const [rowSelection, setRowSelection] = a$n.useState({});
22569
22654
  const [selectedRows] = a$n.useState({});
22570
22655
  const [pageIndex, setPageIndex] = a$n.useState(paginationDetails?.startingPage);
@@ -22575,9 +22660,20 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22575
22660
  const [localData, setLocalData] = a$n.useState(data);
22576
22661
  const [localColumns, setLocalColumns] = a$n.useState(columns);
22577
22662
  const [totalData, setTotalData] = a$n.useState(paginationDetails?.totalRows);
22578
- const [sorting, setSorting] = a$n.useState([]);
22663
+ const [sorting, setSorting] = a$n.useState(() => loadTableState(id).sorting ?? []);
22579
22664
  const [filters, setFilters] = a$n.useState({});
22580
22665
  const [rowState, setRowState] = a$n.useState({});
22666
+ const [columnVisibility, setColumnVisibility] = a$n.useState(() => {
22667
+ const persisted = loadTableState(id);
22668
+ if (persisted.columnVisibility)
22669
+ return persisted.columnVisibility;
22670
+ return Object.fromEntries(columns
22671
+ .filter((col) => col.meta?.defaultHidden)
22672
+ .map((col) => [
22673
+ "accessorKey" in col ? col.accessorKey : col.id,
22674
+ false,
22675
+ ]));
22676
+ });
22581
22677
  const [columnFilters, setColumnFilters] = a$n.useState(() => {
22582
22678
  const base = defaultFilters ?? [];
22583
22679
  if (!staticFilters?.length)
@@ -22600,12 +22696,27 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22600
22696
  });
22601
22697
  const [columnPinning, setColumnPinning] = a$n.useState({ left: ["select"], right: ["options"] });
22602
22698
  const scrollRef = a$n.useRef(null);
22699
+ const visibilityButtonRef = a$n.useRef(null);
22700
+ const visibilityMenuRef = a$n.useRef(null);
22701
+ const [showVisibilityMenu, setShowVisibilityMenu] = a$n.useState(false);
22702
+ const [visibilityMenuCoords, setVisibilityMenuCoords] = a$n.useState({
22703
+ top: 0,
22704
+ left: 0,
22705
+ });
22603
22706
  const [scrollState, setScrollState] = a$n.useState({
22604
22707
  atLeft: true,
22605
22708
  atRight: false,
22606
22709
  });
22607
22710
  const [rowStatusesState, setRowStatusesState] = a$n.useState(rowStatuses || {});
22608
22711
  const [filterMenuOpen, setFilterMenuOpen] = a$n.useState({});
22712
+ const [expandedRows, setExpandedRows] = a$n.useState(new Set());
22713
+ const toggleRowExpanded = (rowId) => {
22714
+ setExpandedRows((prev) => {
22715
+ const next = new Set(prev);
22716
+ next.has(rowId) ? next.delete(rowId) : next.add(rowId);
22717
+ return next;
22718
+ });
22719
+ };
22609
22720
  a$n.useEffect(() => {
22610
22721
  setRowStatusesState(rowStatuses || {});
22611
22722
  }, [rowStatuses]);
@@ -22620,6 +22731,19 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22620
22731
  if (paginationDetails && paginationDetails.startingPage !== pageIndex)
22621
22732
  setPageIndex(paginationDetails?.startingPage);
22622
22733
  }, [paginationDetails, data, columns]);
22734
+ a$n.useEffect(() => {
22735
+ if (!showVisibilityMenu)
22736
+ return;
22737
+ const handleClickOutside = (e) => {
22738
+ const target = e.target;
22739
+ if (!visibilityButtonRef.current?.contains(target) &&
22740
+ !visibilityMenuRef.current?.contains(target)) {
22741
+ setShowVisibilityMenu(false);
22742
+ }
22743
+ };
22744
+ document.addEventListener("click", handleClickOutside, true);
22745
+ return () => document.removeEventListener("click", handleClickOutside, true);
22746
+ }, [showVisibilityMenu]);
22623
22747
  a$n.useLayoutEffect(() => {
22624
22748
  const el = scrollRef.current;
22625
22749
  if (!el)
@@ -22666,6 +22790,18 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22666
22790
  };
22667
22791
  const enhancedColumns = a$n.useMemo(() => {
22668
22792
  const cols = [];
22793
+ if (showExpandedRowToggle) {
22794
+ cols.push({
22795
+ id: "expand",
22796
+ header: "",
22797
+ cell: ({ row }) => !!renderExpandedRow?.(row) ? (a$n.createElement(ExpandChevronButton, { "$expanded": expandedRows.has(row.id), onClick: (e) => {
22798
+ e.stopPropagation();
22799
+ toggleRowExpanded(row.id);
22800
+ }, "aria-label": expandedRows.has(row.id) ? "Collapse row" : "Expand row" },
22801
+ a$n.createElement(StellaIcon, { iconName: "chevron-right", size: 14 }))) : (a$n.createElement(a$n.Fragment, null)),
22802
+ size: 36,
22803
+ });
22804
+ }
22669
22805
  if (showSelection) {
22670
22806
  cols.push({
22671
22807
  id: "select",
@@ -22697,11 +22833,13 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22697
22833
  onRowSelect,
22698
22834
  showSelection,
22699
22835
  showRowOptions,
22836
+ expandedRows,
22700
22837
  ]);
22701
22838
  const table = useReactTable({
22702
22839
  data: localData,
22703
22840
  columns: enhancedColumns,
22704
22841
  state: {
22842
+ columnVisibility,
22705
22843
  pagination,
22706
22844
  sorting,
22707
22845
  columnFilters,
@@ -22717,6 +22855,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22717
22855
  enableRowSelection: showSelection,
22718
22856
  rowCount: serverSide ? paginationDetails?.totalRows : undefined,
22719
22857
  enableColumnPinning: true,
22858
+ onColumnVisibilityChange: setColumnVisibility,
22720
22859
  getCoreRowModel: getCoreRowModel(),
22721
22860
  getFacetedRowModel: !serverSide ? getFacetedRowModel() : undefined,
22722
22861
  getFacetedUniqueValues: !serverSide ? getFacetedUniqueValues() : undefined,
@@ -22770,6 +22909,7 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22770
22909
  },
22771
22910
  },
22772
22911
  });
22912
+ usePersistTableState(id, { columnVisibility, sorting });
22773
22913
  a$n.useEffect(() => {
22774
22914
  if (onRowSelect) {
22775
22915
  const selectedData = table
@@ -22797,95 +22937,145 @@ function Table({ columns, data, isLoading, serverSide = false, onPageChange, onS
22797
22937
  });
22798
22938
  table.toggleAllRowsSelected(false);
22799
22939
  };
22800
- return (a$n.createElement(TableWrapper, { className: className, id: id, "data-testid": dataTestId, "data-auto": dataAuto },
22801
- a$n.createElement(TableWrapperScroll, { "$stopScroll": Object.values(filterMenuOpen).some((value) => value), ref: scrollRef }, isLoading ? (a$n.createElement("div", null,
22802
- a$n.createElement("div", { style: {
22803
- width: "100%",
22804
- maxWidth: "100%",
22805
- height: "100%",
22806
- marginBottom: "4px",
22807
- backgroundColor: "#f9f9f9",
22808
- display: "flex",
22809
- flexDirection: "column",
22810
- overflow: "hidden",
22811
- boxSizing: "border-box",
22812
- } }, Array.from({
22813
- length: pagination?.pageSize,
22814
- }).map((_, index) => (a$n.createElement("div", { style: {
22815
- position: "relative",
22816
- display: "flex",
22817
- flexDirection: "row",
22818
- gap: "90px",
22819
- padding: "10px 25px",
22820
- backgroundColor: index === 0 ? "#ededed" : "transparent",
22821
- borderBottom: "1px solid #e0e0e0",
22822
- alignItems: "center",
22823
- height: "50px",
22824
- minHeight: "50px",
22825
- }, key: index + "loading-row" }, Array.from({
22826
- length: 10,
22827
- }).map((_, i) => (a$n.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a$n.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
22828
- a$n.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a$n.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
22829
- return (a$n.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
22830
- setFilterMenuOpen((prev) => ({
22831
- ...prev,
22832
- [id]: active,
22833
- }));
22834
- }, onFilterApply: () => {
22835
- setPageIndex(1);
22836
- setPagination((prev) => ({
22837
- ...prev,
22838
- pageIndex: 0,
22839
- }));
22840
- } }));
22841
- }))))),
22842
- a$n.createElement("tbody", null,
22843
- table.getRowModel().rows.length === 0 && (a$n.createElement(EmptyTableState, { header: emptyTableState?.header || "No data available.", subHeader: emptyTableState?.subHeader, showClearFilterButton: emptyTableState?.showClearFilterButton, onClearFilters: resetTable, colSpan: table.getVisibleLeafColumns().length, size: "large" })),
22844
- table.getRowModel().rows.map((row) => (a$n.createElement(CellRow, { key: row.id, onClick: () => onRowClick?.(row.original), "$isClickable": !!onRowClick }, row.getVisibleCells().map((cell) => {
22845
- const value = flexRender(cell.column.columnDef.cell, {
22846
- ...cell.getContext(),
22847
- localValue: rowState[row.id]?.[cell.column.id],
22848
- onLocalChange: (val) => handleInputChange(row.id, cell.column.id, val),
22849
- });
22850
- const meta = cell.column.columnDef.meta;
22851
- return (a$n.createElement(BodyCell, { key: cell.id, style: {
22852
- width: cell.column.getSize(),
22853
- textAlign: meta?.cellAlign ||
22854
- (typeof cell.getValue() === "number" ||
22855
- meta?.dataType === "number"
22856
- ? "right"
22857
- : "left"),
22858
- boxShadow: scrollState.atLeft &&
22859
- cell.column.getIsPinned() === "left"
22860
- ? "none"
22861
- : scrollState.atRight &&
22862
- cell.column.getIsPinned() === "right"
22863
- ? "none"
22864
- : undefined,
22865
- backgroundColor: table
22866
- .getSelectedRowModel()
22867
- .rows.find((r) => r.id === row.id)
22868
- ? "#EBF0FA"
22869
- : rowStatusesState?.[row.id] === "action-pending"
22870
- ? "#FFFDEB"
22871
- : rowStatusesState?.[row.id] === "completed"
22872
- ? "#F5F5F5"
22873
- : "",
22874
- }, "$isPinnedLeft": cell.column.getIsPinned() === "left", "$isPinnedRight": cell.column.getIsPinned() === "right", "$columnInfo": cell.column, "$isLastRow": serverSide
22875
- ? row.index === table.getRowModel().rows.length - 1
22876
- : row.index -
22877
- pagination.pageSize * pagination.pageIndex ===
22878
- table.getRowModel().rows.length - 1 }, value));
22879
- })))))))),
22880
- showPagination && paginationDetails?.totalRows > 0 && (a$n.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
22881
- table.toggleAllRowsSelected(false);
22882
- setPageIndex(page);
22883
- setPagination((prev) => ({
22884
- ...prev,
22885
- pageIndex: page - 1,
22886
- }));
22887
- onPageChange?.(page, pageSize);
22888
- }, resetTrigger: resetTrigger }))));
22940
+ return (a$n.createElement(a$n.Fragment, null,
22941
+ !isLoading && (a$n.createElement(ActionBar, null,
22942
+ a$n.createElement(GlobalActionWrapper, null, globalActions?.(table)),
22943
+ a$n.createElement(GlobalActionWrapper, null, enableShowHide && (a$n.createElement(a$n.Fragment, null,
22944
+ a$n.createElement(IconButton, { ref: visibilityButtonRef, ariaLabel: "Column show hide button", variant: "tertiary", iconName: "table", onClick: () => {
22945
+ const rect = visibilityButtonRef.current?.getBoundingClientRect();
22946
+ if (rect) {
22947
+ setVisibilityMenuCoords({
22948
+ top: rect.bottom + window.scrollY + 4,
22949
+ left: rect.right + window.scrollX - 140,
22950
+ });
22951
+ }
22952
+ setShowVisibilityMenu((prev) => !prev);
22953
+ } }),
22954
+ showVisibilityMenu && (a$n.createElement(CheckboxDropdownMenu, { options: table
22955
+ .getAllLeafColumns()
22956
+ .filter((col) => col.id !== "select" && col.id !== "options")
22957
+ .map((col) => ({
22958
+ key: col.id,
22959
+ value: typeof col.columnDef.header === "string"
22960
+ ? col.columnDef.header
22961
+ : col.id,
22962
+ })), selected: table
22963
+ .getAllLeafColumns()
22964
+ .filter((col) => col.getIsVisible())
22965
+ .map((col) => col.id), mode: "multiSelect", coords: visibilityMenuCoords, menuRef: visibilityMenuRef, showSelectAll: true, showClear: false, onApply: (selected) => {
22966
+ const next = {};
22967
+ table
22968
+ .getAllLeafColumns()
22969
+ .filter((col) => col.id !== "select" && col.id !== "options")
22970
+ .forEach((col) => {
22971
+ next[col.id] = selected.includes(col.id);
22972
+ });
22973
+ setColumnVisibility(next);
22974
+ setShowVisibilityMenu(false);
22975
+ }, onClear: () => { } }))))))),
22976
+ a$n.createElement(TableWrapper, { className: className, id: id, "data-testid": dataTestId, "data-auto": dataAuto },
22977
+ a$n.createElement(TableWrapperScroll, { "$stopScroll": Object.values(filterMenuOpen).some((value) => value), ref: scrollRef }, isLoading ? (a$n.createElement("div", null,
22978
+ a$n.createElement("div", { style: {
22979
+ width: "100%",
22980
+ maxWidth: "100%",
22981
+ height: "100%",
22982
+ marginBottom: "4px",
22983
+ backgroundColor: "#f9f9f9",
22984
+ display: "flex",
22985
+ flexDirection: "column",
22986
+ overflow: "hidden",
22987
+ boxSizing: "border-box",
22988
+ } }, Array.from({
22989
+ length: pagination?.pageSize,
22990
+ }).map((_, index) => (a$n.createElement("div", { style: {
22991
+ position: "relative",
22992
+ display: "flex",
22993
+ flexDirection: "row",
22994
+ gap: "90px",
22995
+ padding: "10px 25px",
22996
+ backgroundColor: index === 0 ? "#ededed" : "transparent",
22997
+ borderBottom: "1px solid #e0e0e0",
22998
+ alignItems: "center",
22999
+ height: "50px",
23000
+ minHeight: "50px",
23001
+ }, key: index + "loading-row" }, Array.from({
23002
+ length: 10,
23003
+ }).map((_, i) => (a$n.createElement(LoadingShimmer, { key: `${i}-loading`, "$width": "110px", "$height": "25px" }))))))))) : (a$n.createElement(StyledTable, { id: `${id}-table`, ...htmlProps },
23004
+ a$n.createElement("thead", null, table.getHeaderGroups().map((headerGroup) => (a$n.createElement(HeaderRow, { key: headerGroup.id }, headerGroup.headers.map((header, i) => {
23005
+ return (a$n.createElement(TableHeaderCell, { key: header.id, serverSide: serverSide, header: header, filters: filters, sorting: sorting, scrollPosition: scrollState, onFilterMenuInteraction: (id, active) => {
23006
+ setFilterMenuOpen((prev) => ({
23007
+ ...prev,
23008
+ [id]: active,
23009
+ }));
23010
+ }, onFilterApply: () => {
23011
+ setPageIndex(1);
23012
+ setPagination((prev) => ({
23013
+ ...prev,
23014
+ pageIndex: 0,
23015
+ }));
23016
+ } }));
23017
+ }))))),
23018
+ a$n.createElement("tbody", null,
23019
+ table.getRowModel().rows.length === 0 && (a$n.createElement(EmptyTableState, { header: emptyTableState?.header || "No data available.", subHeader: emptyTableState?.subHeader, showClearFilterButton: emptyTableState?.showClearFilterButton, onClearFilters: resetTable, colSpan: table.getVisibleLeafColumns().length, size: "large" })),
23020
+ table.getRowModel().rows.map((row) => (a$n.createElement(a$n.Fragment, { key: row.id },
23021
+ a$n.createElement(CellRow, { onClick: () => {
23022
+ if (!showExpandedRowToggle &&
23023
+ !!renderExpandedRow?.(row))
23024
+ toggleRowExpanded(row.id);
23025
+ onRowClick?.(row.original);
23026
+ }, "$isClickable": !!onRowClick }, row.getVisibleCells().map((cell) => {
23027
+ const value = flexRender(cell.column.columnDef.cell, {
23028
+ ...cell.getContext(),
23029
+ localValue: rowState[row.id]?.[cell.column.id],
23030
+ onLocalChange: (val) => handleInputChange(row.id, cell.column.id, val),
23031
+ });
23032
+ const meta = cell.column.columnDef
23033
+ .meta;
23034
+ return (a$n.createElement(BodyCell, { key: cell.id, style: {
23035
+ width: cell.column.getSize(),
23036
+ textAlign: meta?.cellAlign ||
23037
+ (typeof cell.getValue() === "number" ||
23038
+ meta?.dataType === "number"
23039
+ ? "right"
23040
+ : "left"),
23041
+ boxShadow: scrollState.atLeft &&
23042
+ cell.column.getIsPinned() === "left"
23043
+ ? "none"
23044
+ : scrollState.atRight &&
23045
+ cell.column.getIsPinned() === "right"
23046
+ ? "none"
23047
+ : undefined,
23048
+ backgroundColor: table
23049
+ .getSelectedRowModel()
23050
+ .rows.find((r) => r.id === row.id)
23051
+ ? "#EBF0FA"
23052
+ : rowStatusesState?.[row.id] ===
23053
+ "action-pending"
23054
+ ? "#FFFDEB"
23055
+ : rowStatusesState?.[row.id] === "completed"
23056
+ ? "#F5F5F5"
23057
+ : "",
23058
+ }, "$isPinnedLeft": cell.column.getIsPinned() === "left", "$isPinnedRight": cell.column.getIsPinned() === "right", "$columnInfo": cell.column, "$isLastRow": serverSide
23059
+ ? row.index ===
23060
+ table.getRowModel().rows.length - 1
23061
+ : row.index -
23062
+ pagination.pageSize *
23063
+ pagination.pageIndex ===
23064
+ table.getRowModel().rows.length - 1 }, value));
23065
+ })),
23066
+ expandedRows.has(row.id) &&
23067
+ renderExpandedRow &&
23068
+ !!renderExpandedRow(row) && (a$n.createElement(ExpandedContentRow, null,
23069
+ a$n.createElement(ExpandedContentCell, { colSpan: table.getVisibleLeafColumns().length }, renderExpandedRow(row))))))))))),
23070
+ showPagination && paginationDetails?.totalRows > 0 && (a$n.createElement(CustomPagination, { "$hasData": table.getRowModel().rows.length > 0, totalRows: serverSide ? totalData : table.getFilteredRowModel().rows.length, isLoading: isLoading, rowsPerPage: paginationDetails?.rowsPerPage, startingPage: pageIndex, onPageChange: (page, pageSize) => {
23071
+ table.toggleAllRowsSelected(false);
23072
+ setPageIndex(page);
23073
+ setPagination((prev) => ({
23074
+ ...prev,
23075
+ pageIndex: page - 1,
23076
+ }));
23077
+ onPageChange?.(page, pageSize);
23078
+ }, resetTrigger: resetTrigger })))));
22889
23079
  }
22890
23080
 
22891
23081
  const SyncContainer = styled.div `
@@ -22966,7 +23156,7 @@ const HeaderText = styled.span `
22966
23156
  color: #4d4d4d;
22967
23157
  text-align: right;
22968
23158
  font-family: Inter;
22969
- font-size: 16px;
23159
+ font-size: 14px;
22970
23160
  font-style: normal;
22971
23161
  font-weight: 500;
22972
23162
  line-height: normal;
@@ -22975,7 +23165,7 @@ const SubHeaderText = styled.span `
22975
23165
  color: #9f9f9f;
22976
23166
  text-align: right;
22977
23167
  font-family: Inter;
22978
- font-size: 12px;
23168
+ font-size: 11px;
22979
23169
  font-style: normal;
22980
23170
  font-weight: 500;
22981
23171
  line-height: normal;
@@ -23435,10 +23625,10 @@ const CheckBox = ({ id, className, label, checked, indeterminate = false, disabl
23435
23625
  ? Styles.color.grey.medium
23436
23626
  : Styles.color.core.primary;
23437
23627
  if (isIndeterminate)
23438
- return (a$n.createElement(o$8, { "data-testid": "indeterminate-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
23628
+ return (a$n.createElement(o$9, { "data-testid": "indeterminate-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
23439
23629
  if (isChecked)
23440
- return (a$n.createElement(o$i, { "data-testid": "check-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
23441
- return (a$n.createElement(o$2, { "data-testid": "square-icon", className: "checkbox-icon", size: 18, weight: "regular", color: color }));
23630
+ return (a$n.createElement(o$j, { "data-testid": "check-icon", className: "checkbox-icon", size: 18, weight: "fill", color: color }));
23631
+ return (a$n.createElement(o$3, { "data-testid": "square-icon", className: "checkbox-icon", size: 18, weight: "regular", color: color }));
23442
23632
  };
23443
23633
  return (a$n.createElement(CheckBoxWrapper, { id: `${id}-label`, className: className, "$disabled": disabled, "$align": align, "$fontSize": fontSize },
23444
23634
  a$n.createElement(HiddenInput, { id: id, ref: inputRef, checked: isChecked, disabled: disabled, onChange: handleChange, ...htmlProps }),