@dmsi/wedgekit-react 0.0.160 → 0.0.162

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 (58) hide show
  1. package/dist/{chunk-NMVSRA5Y.js → chunk-4XA32LKR.js} +2 -3
  2. package/dist/{chunk-4T7F5BZZ.js → chunk-6LN6QT6M.js} +1 -1
  3. package/dist/{chunk-5GOJRLQO.js → chunk-FCREADUH.js} +1 -1
  4. package/dist/{chunk-IDN3IN2A.js → chunk-M3433XEJ.js} +9 -2
  5. package/dist/{chunk-YR7JUKYO.js → chunk-RLK4TBXR.js} +1 -1
  6. package/dist/{chunk-4NCDT5ZY.js → chunk-SBSHZ327.js} +1 -1
  7. package/dist/components/CalendarRange.cjs +2 -3
  8. package/dist/components/CalendarRange.js +1 -1
  9. package/dist/components/DataGridCell.cjs +1 -1
  10. package/dist/components/DataGridCell.js +3 -3
  11. package/dist/components/DataTable.cjs +1 -2
  12. package/dist/components/DataTable.js +1 -3
  13. package/dist/components/DateInput.cjs +12 -6
  14. package/dist/components/DateInput.js +3 -3
  15. package/dist/components/DateRangeInput.cjs +12 -6
  16. package/dist/components/DateRangeInput.js +3 -3
  17. package/dist/components/EditingContext.cjs +1 -2
  18. package/dist/components/EditingContext.js +1 -2
  19. package/dist/components/HorizontalDivider.js +8 -3
  20. package/dist/components/Menu.cjs +1 -1
  21. package/dist/components/Menu.js +2 -2
  22. package/dist/components/MobileDataGrid.cjs +7 -3
  23. package/dist/components/MobileDataGrid.js +7 -3
  24. package/dist/components/Modal.cjs +1 -1
  25. package/dist/components/Modal.js +2 -2
  26. package/dist/components/NavigationTabs.cjs +4 -4
  27. package/dist/components/NavigationTabs.js +4 -4
  28. package/dist/components/PDFViewer.cjs +1 -1
  29. package/dist/components/PDFViewer.js +2 -2
  30. package/dist/components/Radio.js +133 -5
  31. package/dist/components/Time.cjs +1 -1
  32. package/dist/components/Time.js +1 -1
  33. package/dist/components/WorldpayIframe.js +6 -3
  34. package/dist/components/index.cjs +29 -1041
  35. package/dist/components/index.js +3 -19
  36. package/dist/index.css +0 -6
  37. package/dist/utils/index.cjs +9 -2
  38. package/dist/utils/index.js +1 -1
  39. package/package.json +1 -1
  40. package/src/components/CalendarRange.tsx +15 -9
  41. package/src/components/DataTable.tsx +1 -3
  42. package/src/components/EditingContext.tsx +4 -3
  43. package/src/components/MobileDataGrid.tsx +12 -4
  44. package/src/components/NavigationTabs.tsx +1 -1
  45. package/src/components/index.ts +0 -1
  46. package/src/utils/date.ts +65 -35
  47. package/src/utils.ts +1 -1
  48. package/dist/chunk-BATIOCXB.js +0 -138
  49. package/dist/chunk-EPQLWHCL.js +0 -11
  50. package/dist/chunk-NT2ZKA4W.js +0 -266
  51. package/dist/chunk-RUTYNLKS.js +0 -112
  52. package/dist/chunk-WFGKIR5A.js +0 -9
  53. package/dist/components/PaymentOnAccountModal.cjs +0 -2381
  54. package/dist/components/PaymentOnAccountModal.js +0 -35
  55. package/dist/components/SelectPaymentMethod.cjs +0 -1355
  56. package/dist/components/SelectPaymentMethod.js +0 -22
  57. package/src/components/PaymentOnAccountModal.tsx +0 -121
  58. package/src/components/SelectPaymentMethod.tsx +0 -315
@@ -123,6 +123,7 @@ function CalendarRange({
123
123
  }
124
124
  return void 0;
125
125
  } catch (error) {
126
+ console.error("Invalid date format:", d, error);
126
127
  return Temporal.Now.plainDateISO();
127
128
  }
128
129
  };
@@ -224,9 +225,7 @@ function CalendarRange({
224
225
  /* @__PURE__ */ jsxs(
225
226
  "div",
226
227
  {
227
- className: clsx(
228
- "flex flex-col"
229
- ),
228
+ className: clsx("flex flex-col"),
230
229
  children: [
231
230
  /* @__PURE__ */ jsxs(
232
231
  "div",
@@ -8,7 +8,7 @@ function findDocumentRoot(element) {
8
8
  if (!element || !(element instanceof Node)) {
9
9
  return window.document.body;
10
10
  }
11
- var currentElement = element;
11
+ let currentElement = element;
12
12
  while (currentElement && currentElement.parentNode) {
13
13
  if (currentElement.parentNode === document) {
14
14
  return document.body;
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-WNQ53SVY.js";
19
19
  import {
20
20
  findDocumentRoot
21
- } from "./chunk-4T7F5BZZ.js";
21
+ } from "./chunk-6LN6QT6M.js";
22
22
 
23
23
  // src/components/Modal.tsx
24
24
  import clsx from "clsx";
@@ -59,8 +59,14 @@ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
59
59
  return formattedValue.length;
60
60
  }
61
61
  function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
62
- const targetDigitCount = countDigitsUpToCursor(originalValue, originalPosition);
63
- const newPosition = findPositionAfterDigitCount(formattedValue, targetDigitCount);
62
+ const targetDigitCount = countDigitsUpToCursor(
63
+ originalValue,
64
+ originalPosition
65
+ );
66
+ const newPosition = findPositionAfterDigitCount(
67
+ formattedValue,
68
+ targetDigitCount
69
+ );
64
70
  return Math.min(newPosition, formattedValue.length);
65
71
  }
66
72
  function parseDateParts(dateString) {
@@ -105,6 +111,7 @@ function formatDate(date) {
105
111
  }
106
112
  return formatDatePartsToDisplay(year, month, day);
107
113
  } catch (error) {
114
+ console.error("Error formatting date:", error);
108
115
  return "";
109
116
  }
110
117
  }
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-WNQ53SVY.js";
7
7
  import {
8
8
  findDocumentRoot
9
- } from "./chunk-4T7F5BZZ.js";
9
+ } from "./chunk-6LN6QT6M.js";
10
10
  import {
11
11
  __objRest,
12
12
  __spreadProps,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Menu
3
- } from "./chunk-YR7JUKYO.js";
3
+ } from "./chunk-RLK4TBXR.js";
4
4
  import {
5
5
  useSubMenuSystem
6
6
  } from "./chunk-5GUW4DUY.js";
@@ -336,6 +336,7 @@ function CalendarRange({
336
336
  }
337
337
  return void 0;
338
338
  } catch (error) {
339
+ console.error("Invalid date format:", d, error);
339
340
  return import_polyfill.Temporal.Now.plainDateISO();
340
341
  }
341
342
  };
@@ -437,9 +438,7 @@ function CalendarRange({
437
438
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
438
439
  "div",
439
440
  {
440
- className: (0, import_clsx3.default)(
441
- "flex flex-col"
442
- ),
441
+ className: (0, import_clsx3.default)("flex flex-col"),
443
442
  children: [
444
443
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
445
444
  "div",
@@ -2,7 +2,7 @@ import {
2
2
  CalendarRange,
3
3
  CalendarRange_default,
4
4
  isWeekend
5
- } from "../chunk-NMVSRA5Y.js";
5
+ } from "../chunk-4XA32LKR.js";
6
6
  import "../chunk-NKUETCDA.js";
7
7
  import "../chunk-RDLEIAQU.js";
8
8
  import "../chunk-ORMEWXMH.js";
@@ -1195,7 +1195,7 @@ function findDocumentRoot(element) {
1195
1195
  if (!element || !(element instanceof Node)) {
1196
1196
  return window.document.body;
1197
1197
  }
1198
- var currentElement = element;
1198
+ let currentElement = element;
1199
1199
  while (currentElement && currentElement.parentNode) {
1200
1200
  if (currentElement.parentNode === document) {
1201
1201
  return document.body;
@@ -4,12 +4,12 @@ import {
4
4
  DataGridCell,
5
5
  DragAlongCell,
6
6
  DraggableCellHeader
7
- } from "../chunk-4NCDT5ZY.js";
8
- import "../chunk-YR7JUKYO.js";
7
+ } from "../chunk-SBSHZ327.js";
8
+ import "../chunk-RLK4TBXR.js";
9
9
  import "../chunk-5GUW4DUY.js";
10
10
  import "../chunk-FFU6FB3K.js";
11
11
  import "../chunk-WNQ53SVY.js";
12
- import "../chunk-4T7F5BZZ.js";
12
+ import "../chunk-6LN6QT6M.js";
13
13
  import "../chunk-PMBEIP24.js";
14
14
  import "../chunk-4T3DRGLF.js";
15
15
  import "../chunk-5UH6QUFB.js";
@@ -249,12 +249,11 @@ var columns = [
249
249
  var EditingContext = (0, import_react2.createContext)({
250
250
  data: [],
251
251
  setValue: (row, key, value) => {
252
- console.log(row, key, value);
252
+ console.warn("TODO: Implement setValue logic", row, key, value);
253
253
  }
254
254
  });
255
255
  var EditingProvider = ({ data, children }) => {
256
256
  const [actual, setData] = (0, import_react2.useState)(data);
257
- (0, import_react2.useEffect)(() => console.log("data changed"), [actual]);
258
257
  const context = {
259
258
  data: actual,
260
259
  setValue: (row, key, value) => {
@@ -11,7 +11,6 @@ import {
11
11
  import React, {
12
12
  createContext,
13
13
  useContext,
14
- useEffect,
15
14
  useState
16
15
  } from "react";
17
16
  import {
@@ -178,12 +177,11 @@ var columns = [
178
177
  var EditingContext = createContext({
179
178
  data: [],
180
179
  setValue: (row, key, value) => {
181
- console.log(row, key, value);
180
+ console.warn("TODO: Implement setValue logic", row, key, value);
182
181
  }
183
182
  });
184
183
  var EditingProvider = ({ data, children }) => {
185
184
  const [actual, setData] = useState(data);
186
- useEffect(() => console.log("data changed"), [actual]);
187
185
  const context = {
188
186
  data: actual,
189
187
  setValue: (row, key, value) => {
@@ -800,6 +800,7 @@ function CalendarRange({
800
800
  }
801
801
  return void 0;
802
802
  } catch (error) {
803
+ console.error("Invalid date format:", d, error);
803
804
  return import_polyfill.Temporal.Now.plainDateISO();
804
805
  }
805
806
  };
@@ -901,9 +902,7 @@ function CalendarRange({
901
902
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
902
903
  "div",
903
904
  {
904
- className: (0, import_clsx5.default)(
905
- "flex flex-col"
906
- ),
905
+ className: (0, import_clsx5.default)("flex flex-col"),
907
906
  children: [
908
907
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
909
908
  "div",
@@ -1030,7 +1029,7 @@ function findDocumentRoot(element) {
1030
1029
  if (!element || !(element instanceof Node)) {
1031
1030
  return window.document.body;
1032
1031
  }
1033
- var currentElement = element;
1032
+ let currentElement = element;
1034
1033
  while (currentElement && currentElement.parentNode) {
1035
1034
  if (currentElement.parentNode === document) {
1036
1035
  return document.body;
@@ -1104,8 +1103,14 @@ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
1104
1103
  return formattedValue.length;
1105
1104
  }
1106
1105
  function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
1107
- const targetDigitCount = countDigitsUpToCursor(originalValue, originalPosition);
1108
- const newPosition = findPositionAfterDigitCount(formattedValue, targetDigitCount);
1106
+ const targetDigitCount = countDigitsUpToCursor(
1107
+ originalValue,
1108
+ originalPosition
1109
+ );
1110
+ const newPosition = findPositionAfterDigitCount(
1111
+ formattedValue,
1112
+ targetDigitCount
1113
+ );
1109
1114
  return Math.min(newPosition, formattedValue.length);
1110
1115
  }
1111
1116
  function parseDateParts(dateString) {
@@ -1150,6 +1155,7 @@ function formatDate(date) {
1150
1155
  }
1151
1156
  return formatDatePartsToDisplay(year, month, day);
1152
1157
  } catch (error) {
1158
+ console.error("Error formatting date:", error);
1153
1159
  return "";
1154
1160
  }
1155
1161
  }
@@ -4,10 +4,10 @@ import {
4
4
  formatInputValue,
5
5
  isValidDate,
6
6
  parseInputDate
7
- } from "../chunk-IDN3IN2A.js";
7
+ } from "../chunk-M3433XEJ.js";
8
8
  import {
9
9
  findDocumentRoot
10
- } from "../chunk-4T7F5BZZ.js";
10
+ } from "../chunk-6LN6QT6M.js";
11
11
  import {
12
12
  InputBase
13
13
  } from "../chunk-4T3DRGLF.js";
@@ -15,7 +15,7 @@ import "../chunk-5UH6QUFB.js";
15
15
  import "../chunk-JWCT72WR.js";
16
16
  import {
17
17
  CalendarRange
18
- } from "../chunk-NMVSRA5Y.js";
18
+ } from "../chunk-4XA32LKR.js";
19
19
  import {
20
20
  Icon
21
21
  } from "../chunk-NKUETCDA.js";
@@ -800,6 +800,7 @@ function CalendarRange({
800
800
  }
801
801
  return void 0;
802
802
  } catch (error) {
803
+ console.error("Invalid date format:", d, error);
803
804
  return import_polyfill.Temporal.Now.plainDateISO();
804
805
  }
805
806
  };
@@ -901,9 +902,7 @@ function CalendarRange({
901
902
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
902
903
  "div",
903
904
  {
904
- className: (0, import_clsx5.default)(
905
- "flex flex-col"
906
- ),
905
+ className: (0, import_clsx5.default)("flex flex-col"),
907
906
  children: [
908
907
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
909
908
  "div",
@@ -1030,7 +1029,7 @@ function findDocumentRoot(element) {
1030
1029
  if (!element || !(element instanceof Node)) {
1031
1030
  return window.document.body;
1032
1031
  }
1033
- var currentElement = element;
1032
+ let currentElement = element;
1034
1033
  while (currentElement && currentElement.parentNode) {
1035
1034
  if (currentElement.parentNode === document) {
1036
1035
  return document.body;
@@ -1104,8 +1103,14 @@ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
1104
1103
  return formattedValue.length;
1105
1104
  }
1106
1105
  function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
1107
- const targetDigitCount = countDigitsUpToCursor(originalValue, originalPosition);
1108
- const newPosition = findPositionAfterDigitCount(formattedValue, targetDigitCount);
1106
+ const targetDigitCount = countDigitsUpToCursor(
1107
+ originalValue,
1108
+ originalPosition
1109
+ );
1110
+ const newPosition = findPositionAfterDigitCount(
1111
+ formattedValue,
1112
+ targetDigitCount
1113
+ );
1109
1114
  return Math.min(newPosition, formattedValue.length);
1110
1115
  }
1111
1116
  function parseDateParts(dateString) {
@@ -1150,6 +1155,7 @@ function formatDate(date) {
1150
1155
  }
1151
1156
  return formatDatePartsToDisplay(year, month, day);
1152
1157
  } catch (error) {
1158
+ console.error("Error formatting date:", error);
1153
1159
  return "";
1154
1160
  }
1155
1161
  }
@@ -5,10 +5,10 @@ import {
5
5
  isValidDate,
6
6
  isValidDateRangeOrder,
7
7
  parseInputDate
8
- } from "../chunk-IDN3IN2A.js";
8
+ } from "../chunk-M3433XEJ.js";
9
9
  import {
10
10
  findDocumentRoot
11
- } from "../chunk-4T7F5BZZ.js";
11
+ } from "../chunk-6LN6QT6M.js";
12
12
  import {
13
13
  InputBase
14
14
  } from "../chunk-4T3DRGLF.js";
@@ -16,7 +16,7 @@ import "../chunk-5UH6QUFB.js";
16
16
  import "../chunk-JWCT72WR.js";
17
17
  import {
18
18
  CalendarRange
19
- } from "../chunk-NMVSRA5Y.js";
19
+ } from "../chunk-4XA32LKR.js";
20
20
  import {
21
21
  Icon
22
22
  } from "../chunk-NKUETCDA.js";
@@ -46,8 +46,7 @@ var import_react = require("react");
46
46
  var import_jsx_runtime = require("react/jsx-runtime");
47
47
  var EditingContext = (0, import_react.createContext)({
48
48
  data: [],
49
- setData: (row, key, value) => {
50
- console.log(row, key, value);
49
+ setData: () => {
51
50
  }
52
51
  });
53
52
  var EditingProvider = ({
@@ -9,8 +9,7 @@ import { createContext, useState } from "react";
9
9
  import { jsx } from "react/jsx-runtime";
10
10
  var EditingContext = createContext({
11
11
  data: [],
12
- setData: (row, key, value) => {
13
- console.log(row, key, value);
12
+ setData: () => {
14
13
  }
15
14
  });
16
15
  var EditingProvider = ({
@@ -1,7 +1,12 @@
1
- import {
2
- HorizontalDivider
3
- } from "../chunk-EPQLWHCL.js";
4
1
  import "../chunk-ORMEWXMH.js";
2
+
3
+ // src/components/HorizontalDivider.tsx
4
+ import clsx from "clsx";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function HorizontalDivider({ id, testid, hideOnMobile }) {
7
+ const hideOnMobileStyle = clsx(hideOnMobile && "hidden desktop:block");
8
+ return /* @__PURE__ */ jsx("hr", { id, "data-testid": testid, className: clsx("w-full border-t border-border-primary-normal", hideOnMobileStyle) });
9
+ }
5
10
  export {
6
11
  HorizontalDivider
7
12
  };
@@ -188,7 +188,7 @@ function findDocumentRoot(element) {
188
188
  if (!element || !(element instanceof Node)) {
189
189
  return window.document.body;
190
190
  }
191
- var currentElement = element;
191
+ let currentElement = element;
192
192
  while (currentElement && currentElement.parentNode) {
193
193
  if (currentElement.parentNode === document) {
194
194
  return document.body;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Menu
4
- } from "../chunk-YR7JUKYO.js";
4
+ } from "../chunk-RLK4TBXR.js";
5
5
  import "../chunk-5GUW4DUY.js";
6
6
  import "../chunk-WNQ53SVY.js";
7
- import "../chunk-4T7F5BZZ.js";
7
+ import "../chunk-6LN6QT6M.js";
8
8
  import "../chunk-ORMEWXMH.js";
9
9
  export {
10
10
  Menu
@@ -715,7 +715,11 @@ function MobileDataGrid({
715
715
  }
716
716
  );
717
717
  }
718
- function MobileDataGridHeader({ header, id, testid }) {
718
+ function MobileDataGridHeader({
719
+ header,
720
+ id,
721
+ testid
722
+ }) {
719
723
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id, "data-testid": testid, className: "sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
720
724
  Stack,
721
725
  {
@@ -749,7 +753,7 @@ function MobileDataGridCard({
749
753
  testid: testid ? `${testid}-docs-button` : void 0,
750
754
  iconOnly: true,
751
755
  variant: "tertiary",
752
- onClick: () => console.log("Edit", data.id),
756
+ onClick: () => console.warn("TODO: Implement Edit", data.id),
753
757
  leftIcon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "docs" })
754
758
  }
755
759
  ),
@@ -760,7 +764,7 @@ function MobileDataGridCard({
760
764
  testid: testid ? `${testid}-swap-button` : void 0,
761
765
  iconOnly: true,
762
766
  variant: "tertiary",
763
- onClick: () => console.log("Edit", data.id),
767
+ onClick: () => console.warn("TODO: Implement Edit", data.id),
764
768
  leftIcon: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "swap_vert" })
765
769
  }
766
770
  )
@@ -69,7 +69,11 @@ function MobileDataGrid({
69
69
  }
70
70
  );
71
71
  }
72
- function MobileDataGridHeader({ header, id, testid }) {
72
+ function MobileDataGridHeader({
73
+ header,
74
+ id,
75
+ testid
76
+ }) {
73
77
  return /* @__PURE__ */ jsx("div", { id, "data-testid": testid, className: "sticky top-0", children: /* @__PURE__ */ jsx(Theme, { theme: "brand", children: /* @__PURE__ */ jsx(
74
78
  Stack,
75
79
  {
@@ -103,7 +107,7 @@ function MobileDataGridCard({
103
107
  testid: testid ? `${testid}-docs-button` : void 0,
104
108
  iconOnly: true,
105
109
  variant: "tertiary",
106
- onClick: () => console.log("Edit", data.id),
110
+ onClick: () => console.warn("TODO: Implement Edit", data.id),
107
111
  leftIcon: /* @__PURE__ */ jsx(Icon, { name: "docs" })
108
112
  }
109
113
  ),
@@ -114,7 +118,7 @@ function MobileDataGridCard({
114
118
  testid: testid ? `${testid}-swap-button` : void 0,
115
119
  iconOnly: true,
116
120
  variant: "tertiary",
117
- onClick: () => console.log("Edit", data.id),
121
+ onClick: () => console.warn("TODO: Implement Edit", data.id),
118
122
  leftIcon: /* @__PURE__ */ jsx(Icon, { name: "swap_vert" })
119
123
  }
120
124
  )
@@ -584,7 +584,7 @@ function findDocumentRoot(element) {
584
584
  if (!element || !(element instanceof Node)) {
585
585
  return window.document.body;
586
586
  }
587
- var currentElement = element;
587
+ let currentElement = element;
588
588
  while (currentElement && currentElement.parentNode) {
589
589
  if (currentElement.parentNode === document) {
590
590
  return document.body;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Modal
4
- } from "../chunk-5GOJRLQO.js";
4
+ } from "../chunk-FCREADUH.js";
5
5
  import "../chunk-4RJKB7LC.js";
6
6
  import "../chunk-C4JGTH6G.js";
7
7
  import "../chunk-SYEJVSE4.js";
@@ -9,7 +9,7 @@ import "../chunk-R7ELP5C5.js";
9
9
  import "../chunk-ZFOANBWG.js";
10
10
  import "../chunk-AZ7LVLOK.js";
11
11
  import "../chunk-WNQ53SVY.js";
12
- import "../chunk-4T7F5BZZ.js";
12
+ import "../chunk-6LN6QT6M.js";
13
13
  import "../chunk-FKMKHLQH.js";
14
14
  import "../chunk-NKUETCDA.js";
15
15
  import "../chunk-RDLEIAQU.js";
@@ -463,14 +463,14 @@ var NavigationTabs = ({
463
463
  onTabChange,
464
464
  colorPrimitives = "dmsi"
465
465
  }) => {
466
- var _a, _b, _c;
467
- const [selectedTab, setSelectedTab] = (0, import_react.useState)((_a = tabs[0]) == null ? void 0 : _a.id);
466
+ var _a, _b, _c, _d;
467
+ const [selectedTab, setSelectedTab] = (0, import_react.useState)((_b = (_a = tabs[0]) == null ? void 0 : _a.id) != null ? _b : "");
468
468
  const handleTabClick = (id2) => {
469
469
  setSelectedTab(id2);
470
470
  onTabChange == null ? void 0 : onTabChange(id2);
471
471
  };
472
- const selectedContent = (_b = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _b.content;
473
- const selectedTabHasHref = (_c = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _c.href;
472
+ const selectedContent = (_c = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _c.content;
473
+ const selectedTabHasHref = (_d = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _d.href;
474
474
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { id, "data-testid": testid, children: [
475
475
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
476
476
  "div",
@@ -20,14 +20,14 @@ var NavigationTabs = ({
20
20
  onTabChange,
21
21
  colorPrimitives = "dmsi"
22
22
  }) => {
23
- var _a, _b, _c;
24
- const [selectedTab, setSelectedTab] = useState((_a = tabs[0]) == null ? void 0 : _a.id);
23
+ var _a, _b, _c, _d;
24
+ const [selectedTab, setSelectedTab] = useState((_b = (_a = tabs[0]) == null ? void 0 : _a.id) != null ? _b : "");
25
25
  const handleTabClick = (id2) => {
26
26
  setSelectedTab(id2);
27
27
  onTabChange == null ? void 0 : onTabChange(id2);
28
28
  };
29
- const selectedContent = (_b = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _b.content;
30
- const selectedTabHasHref = (_c = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _c.href;
29
+ const selectedContent = (_c = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _c.content;
30
+ const selectedTabHasHref = (_d = tabs.find((tab) => tab.id === selectedTab)) == null ? void 0 : _d.href;
31
31
  return /* @__PURE__ */ jsxs("div", { id, "data-testid": testid, children: [
32
32
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
33
33
  "div",
@@ -588,7 +588,7 @@ function findDocumentRoot(element) {
588
588
  if (!element || !(element instanceof Node)) {
589
589
  return window.document.body;
590
590
  }
591
- var currentElement = element;
591
+ let currentElement = element;
592
592
  while (currentElement && currentElement.parentNode) {
593
593
  if (currentElement.parentNode === document) {
594
594
  return document.body;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Modal
4
- } from "../chunk-5GOJRLQO.js";
4
+ } from "../chunk-FCREADUH.js";
5
5
  import "../chunk-4RJKB7LC.js";
6
6
  import "../chunk-C4JGTH6G.js";
7
7
  import "../chunk-SYEJVSE4.js";
@@ -15,7 +15,7 @@ import {
15
15
  Caption
16
16
  } from "../chunk-E7D24OHM.js";
17
17
  import "../chunk-WNQ53SVY.js";
18
- import "../chunk-4T7F5BZZ.js";
18
+ import "../chunk-6LN6QT6M.js";
19
19
  import {
20
20
  Stack
21
21
  } from "../chunk-N6JVLYEE.js";