@foi/design-system 0.0.17 → 0.0.19

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 (112) hide show
  1. package/README.md +658 -63
  2. package/dist/{DatePicker.utils-ytCEcs6T.js → DatePicker.utils-BAUVa26Q.js} +2 -2
  3. package/dist/{DatePicker.utils-ytCEcs6T.js.map → DatePicker.utils-BAUVa26Q.js.map} +1 -1
  4. package/dist/{emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js → IconButton-C3x-E-ot.js} +458 -248
  5. package/dist/IconButton-C3x-E-ot.js.map +1 -0
  6. package/dist/{RadioGroup-DzEJw4WJ.js → RadioGroup-Cvt9MtvM.js} +71 -71
  7. package/dist/{RadioGroup-DzEJw4WJ.js.map → RadioGroup-Cvt9MtvM.js.map} +1 -1
  8. package/dist/RadioGroup.context-v_CCYB7_.js +392 -0
  9. package/dist/RadioGroup.context-v_CCYB7_.js.map +1 -0
  10. package/dist/{Switch-oAVuMb0V.js → Switch-6eNmT34-.js} +315 -315
  11. package/dist/{Switch-oAVuMb0V.js.map → Switch-6eNmT34-.js.map} +1 -1
  12. package/dist/{ThemeProvider-C47pyWG6.js → ThemeProvider-C_PzAJz3.js} +11 -6
  13. package/dist/{ThemeProvider-C47pyWG6.js.map → ThemeProvider-C_PzAJz3.js.map} +1 -1
  14. package/dist/Toast-_9W7YGxS.js +146 -0
  15. package/dist/Toast-_9W7YGxS.js.map +1 -0
  16. package/dist/atoms.mjs +4 -3
  17. package/dist/components/atoms/Button/Button.interface.d.ts +1 -1
  18. package/dist/components/atoms/Checkbox/Checkbox.interface.d.ts +3 -3
  19. package/dist/components/atoms/Chip/Chip.d.ts +4 -0
  20. package/dist/components/atoms/Chip/Chip.emotion.d.ts +2 -0
  21. package/dist/components/atoms/Chip/Chip.interface.d.ts +14 -0
  22. package/dist/components/atoms/Chip/index.d.ts +5 -0
  23. package/dist/components/atoms/DatePicker/DatePicker.interface.d.ts +2 -2
  24. package/dist/components/atoms/DatePicker/DatePickerMenu/DatePickerMenu.interface.d.ts +3 -3
  25. package/dist/components/atoms/IconButton/IconButton.interface.d.ts +2 -2
  26. package/dist/components/atoms/NumberField/NumberField.interface.d.ts +2 -2
  27. package/dist/components/atoms/Radio/Radio.interface.d.ts +2 -2
  28. package/dist/components/atoms/Select/Select.interface.d.ts +2 -2
  29. package/dist/components/atoms/Select/SelectMenu/SelectMenu.interface.d.ts +1 -1
  30. package/dist/components/atoms/Slider/Slider.interface.d.ts +4 -4
  31. package/dist/components/atoms/Switch/Switch.interface.d.ts +1 -1
  32. package/dist/components/atoms/TextField/TextField.interface.d.ts +2 -2
  33. package/dist/components/molecules/CheckboxGroup/CheckboxGroup.interface.d.ts +2 -2
  34. package/dist/components/molecules/CheckboxTree/CheckboxTree.interface.d.ts +2 -2
  35. package/dist/components/molecules/Modal/Modal.interface.d.ts +4 -4
  36. package/dist/components/molecules/RadioGroup/RadioGroup.interface.d.ts +2 -2
  37. package/dist/components/molecules/Toast/Toast.context.d.ts +2 -0
  38. package/dist/components/molecules/Toast/Toast.d.ts +4 -0
  39. package/dist/components/molecules/Toast/Toast.emotion.d.ts +4 -0
  40. package/dist/components/molecules/Toast/Toast.hook.d.ts +1 -0
  41. package/dist/components/molecules/Toast/Toast.interface.d.ts +33 -0
  42. package/dist/components/molecules/Toast/Toast.provider.d.ts +3 -0
  43. package/dist/components/molecules/Toast/index.d.ts +3 -0
  44. package/dist/components/organisms/DataGrid/DataGrid.interface.d.ts +3 -3
  45. package/dist/components/organisms/DataGrid/DataGridMenu/DataGridMenu.interface.d.ts +1 -1
  46. package/dist/hocs/ThemeProvider/ThemeProvider.interface.d.ts +6 -0
  47. package/dist/hocs/ThemeProvider/components/{Button.d.ts → atoms/Button.d.ts} +1 -1
  48. package/dist/hocs/ThemeProvider/components/{Checkbox.d.ts → atoms/Checkbox.d.ts} +1 -1
  49. package/dist/hocs/ThemeProvider/components/atoms/Chip.d.ts +13 -0
  50. package/dist/hocs/ThemeProvider/components/{DatePicker.d.ts → atoms/DatePicker.d.ts} +1 -1
  51. package/dist/hocs/ThemeProvider/components/{DatePickerMenu.d.ts → atoms/DatePickerMenu.d.ts} +1 -1
  52. package/dist/hocs/ThemeProvider/components/{IconButton.d.ts → atoms/IconButton.d.ts} +1 -1
  53. package/dist/hocs/ThemeProvider/components/{NumberField.d.ts → atoms/NumberField.d.ts} +1 -1
  54. package/dist/hocs/ThemeProvider/components/{Pagination.d.ts → atoms/Pagination.d.ts} +1 -1
  55. package/dist/hocs/ThemeProvider/components/{PaginationMenu.d.ts → atoms/PaginationMenu.d.ts} +1 -1
  56. package/dist/hocs/ThemeProvider/components/{Radio.d.ts → atoms/Radio.d.ts} +1 -1
  57. package/dist/hocs/ThemeProvider/components/{Select.d.ts → atoms/Select.d.ts} +1 -1
  58. package/dist/hocs/ThemeProvider/components/{SelectMenu.d.ts → atoms/SelectMenu.d.ts} +1 -1
  59. package/dist/hocs/ThemeProvider/components/{Slider.d.ts → atoms/Slider.d.ts} +1 -1
  60. package/dist/hocs/ThemeProvider/components/{Switch.d.ts → atoms/Switch.d.ts} +1 -1
  61. package/dist/hocs/ThemeProvider/components/{TextField.d.ts → atoms/TextField.d.ts} +1 -1
  62. package/dist/hocs/ThemeProvider/components/index.d.ts +23 -17
  63. package/dist/hocs/ThemeProvider/components/{CheckboxGroup.d.ts → molecules/CheckboxGroup.d.ts} +1 -1
  64. package/dist/hocs/ThemeProvider/components/{CheckboxTree.d.ts → molecules/CheckboxTree.d.ts} +1 -1
  65. package/dist/hocs/ThemeProvider/components/{Modal.d.ts → molecules/Modal.d.ts} +1 -1
  66. package/dist/hocs/ThemeProvider/components/{RadioGroup.d.ts → molecules/RadioGroup.d.ts} +1 -1
  67. package/dist/hocs/ThemeProvider/components/molecules/Toast.d.ts +16 -0
  68. package/dist/hocs/ThemeProvider/components/{DataGrid.d.ts → organisms/DataGrid.d.ts} +1 -1
  69. package/dist/hocs/ThemeProvider/components/{DataGridMenu.d.ts → organisms/DataGridMenu.d.ts} +1 -1
  70. package/dist/hocs/ThemeProvider/interfaces/Components.interface.d.ts +2 -0
  71. package/dist/hocs.mjs +1 -1
  72. package/dist/hooks.d.ts +2 -0
  73. package/dist/hooks.mjs +2 -1
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.mjs +247 -239
  76. package/dist/index.mjs.map +1 -1
  77. package/dist/molecules.d.ts +2 -0
  78. package/dist/molecules.mjs +3 -2
  79. package/dist/theme/dark/components/atoms/Chip.d.ts +13 -0
  80. package/dist/theme/dark/components/index.d.ts +287 -266
  81. package/dist/theme/dark/components/{Modal.d.ts → molecules/Modal.d.ts} +0 -3
  82. package/dist/theme/dark/components/molecules/Toast.d.ts +17 -0
  83. package/dist/theme/dark/index.d.ts +287 -266
  84. package/dist/theme/index.d.ts +287 -266
  85. package/dist/{theme-D01EcUA9.js → theme-BjrtNRDQ.js} +231 -222
  86. package/dist/theme-BjrtNRDQ.js.map +1 -0
  87. package/dist/theme.mjs +1 -1
  88. package/dist/utilities.mjs +1 -1
  89. package/package.json +1 -1
  90. package/dist/RadioGroup.context-Bu218uUX.js +0 -601
  91. package/dist/RadioGroup.context-Bu218uUX.js.map +0 -1
  92. package/dist/emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js.map +0 -1
  93. package/dist/theme-D01EcUA9.js.map +0 -1
  94. /package/dist/theme/dark/components/{Button.d.ts → atoms/Button.d.ts} +0 -0
  95. /package/dist/theme/dark/components/{Checkbox.d.ts → atoms/Checkbox.d.ts} +0 -0
  96. /package/dist/theme/dark/components/{DatePicker.d.ts → atoms/DatePicker.d.ts} +0 -0
  97. /package/dist/theme/dark/components/{DatePickerMenu.d.ts → atoms/DatePickerMenu.d.ts} +0 -0
  98. /package/dist/theme/dark/components/{IconButton.d.ts → atoms/IconButton.d.ts} +0 -0
  99. /package/dist/theme/dark/components/{NumberField.d.ts → atoms/NumberField.d.ts} +0 -0
  100. /package/dist/theme/dark/components/{Pagination.d.ts → atoms/Pagination.d.ts} +0 -0
  101. /package/dist/theme/dark/components/{PaginationMenu.d.ts → atoms/PaginationMenu.d.ts} +0 -0
  102. /package/dist/theme/dark/components/{Radio.d.ts → atoms/Radio.d.ts} +0 -0
  103. /package/dist/theme/dark/components/{Select.d.ts → atoms/Select.d.ts} +0 -0
  104. /package/dist/theme/dark/components/{SelectMenu.d.ts → atoms/SelectMenu.d.ts} +0 -0
  105. /package/dist/theme/dark/components/{Slider.d.ts → atoms/Slider.d.ts} +0 -0
  106. /package/dist/theme/dark/components/{Switch.d.ts → atoms/Switch.d.ts} +0 -0
  107. /package/dist/theme/dark/components/{TextField.d.ts → atoms/TextField.d.ts} +0 -0
  108. /package/dist/theme/dark/components/{CheckboxGroup.d.ts → molecules/CheckboxGroup.d.ts} +0 -0
  109. /package/dist/theme/dark/components/{CheckboxTree.d.ts → molecules/CheckboxTree.d.ts} +0 -0
  110. /package/dist/theme/dark/components/{RadioGroup.d.ts → molecules/RadioGroup.d.ts} +0 -0
  111. /package/dist/theme/dark/components/{DataGrid.d.ts → organisms/DataGrid.d.ts} +0 -0
  112. /package/dist/theme/dark/components/{DataGridMenu.d.ts → organisms/DataGridMenu.d.ts} +0 -0
package/dist/index.mjs CHANGED
@@ -1,14 +1,15 @@
1
- import { i as e, n as t, r as n, t as r } from "./emotion-react-jsx-runtime.browser.esm-Ch-DwUYg.js";
2
- import { n as i, r as a } from "./theme-D01EcUA9.js";
3
- import { n as o, o as s, r as c, s as l } from "./RadioGroup.context-Bu218uUX.js";
4
- import { a as u, c as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./Switch-oAVuMb0V.js";
5
- import { i as v, n as y, r as b, t as x } from "./RadioGroup-DzEJw4WJ.js";
6
- import { t as S } from "./ThemeProvider-C47pyWG6.js";
7
- import { useCallback as C, useEffect as w, useLayoutEffect as ee, useMemo as T, useRef as E, useState as D } from "react";
8
- import { css as O, keyframes as te } from "@emotion/react";
9
- import k from "react-dom";
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./IconButton-C3x-E-ot.js";
2
+ import { n as s, r as c } from "./theme-BjrtNRDQ.js";
3
+ import { a as l, c as u, i as d, n as f, o as p, r as m, s as h, t as g } from "./Switch-6eNmT34-.js";
4
+ import { n as _ } from "./RadioGroup.context-v_CCYB7_.js";
5
+ import { i as v, n as y, r as b, t as x } from "./RadioGroup-Cvt9MtvM.js";
6
+ import { n as S } from "./Toast-_9W7YGxS.js";
7
+ import { t as C } from "./ThemeProvider-C_PzAJz3.js";
8
+ import { useCallback as ee, useEffect as w, useLayoutEffect as T, useMemo as E, useRef as D, useState as O } from "react";
9
+ import { css as k, keyframes as A } from "@emotion/react";
10
+ import te from "react-dom";
10
11
  //#region src/components/atoms/Skeleton/Skeleton.emotion.ts
11
- var A = O`
12
+ var j = k`
12
13
  &.--SKELETON {
13
14
  display: block;
14
15
  background: linear-gradient(
@@ -18,7 +19,7 @@ var A = O`
18
19
  rgba(255, 255, 255, 0.05) 100%
19
20
  );
20
21
  background-size: 200% 100%;
21
- animation: ${te`
22
+ animation: ${A`
22
23
  0% { background-position: 200% center; }
23
24
  100% { background-position: -200% center; }
24
25
  `} 1.4s ease infinite;
@@ -31,28 +32,28 @@ var A = O`
31
32
  border-radius: 4px;
32
33
  }
33
34
  }
34
- `, j = ({ variant: e = "rectangular", width: n, height: r, className: i }) => /* @__PURE__ */ t("span", {
35
+ `, M = ({ variant: e = "rectangular", width: n, height: r, className: i }) => /* @__PURE__ */ t("span", {
35
36
  className: [
36
37
  "--SKELETON",
37
38
  `--SKELETON--${e}`,
38
39
  i || ""
39
40
  ].filter(Boolean).join(" "),
40
- css: A,
41
+ css: j,
41
42
  style: {
42
43
  width: n,
43
44
  height: r
44
45
  },
45
46
  "aria-hidden": "true"
46
- }), ne = (e) => O`
47
+ }), ne = (e) => k`
47
48
  &.--DATAGRID {
48
49
  width: 100%;
49
50
  box-sizing: border-box;
50
51
 
51
- ${a(e, "background-color", "--DATAGRID-ROOT-BACKGROUND-COLOR")};
52
- ${a(e, "border-color", "--DATAGRID-ROOT-BORDER-COLOR")};
53
- ${a(e, "border-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
54
- ${a(e, "border-radius", "--DATAGRID-ROOT-BORDER-RADIUS")};
55
- ${a(e, "border-style", "--DATAGRID-ROOT-BORDER-STYLE")};
52
+ ${c(e, "background-color", "--DATAGRID-ROOT-BACKGROUND-COLOR")};
53
+ ${c(e, "border-color", "--DATAGRID-ROOT-BORDER-COLOR")};
54
+ ${c(e, "border-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
55
+ ${c(e, "border-radius", "--DATAGRID-ROOT-BORDER-RADIUS")};
56
+ ${c(e, "border-style", "--DATAGRID-ROOT-BORDER-STYLE")};
56
57
 
57
58
  .--DATAGRID-tableContainer {
58
59
  width: 100%;
@@ -87,15 +88,15 @@ var A = O`
87
88
  height: 48px;
88
89
 
89
90
  .--DATAGRID-th {
90
- ${a(e, "background-color", "--DATAGRID-ROOT-BACKGROUND-COLOR")};
91
+ ${c(e, "background-color", "--DATAGRID-ROOT-BACKGROUND-COLOR")};
91
92
 
92
93
  padding: 8px 16px;
93
94
  text-align: left;
94
95
  white-space: nowrap;
95
96
 
96
- ${a(e, "border-bottom-color", "--DATAGRID-ROOT-BORDER-COLOR")};
97
- ${a(e, "border-bottom-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
98
- ${a(e, "border-bottom-style", "--DATAGRID-ROOT-BORDER-STYLE")};
97
+ ${c(e, "border-bottom-color", "--DATAGRID-ROOT-BORDER-COLOR")};
98
+ ${c(e, "border-bottom-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
99
+ ${c(e, "border-bottom-style", "--DATAGRID-ROOT-BORDER-STYLE")};
99
100
 
100
101
  &.--DATAGRID-thOptions {
101
102
  width: 80px;
@@ -115,11 +116,11 @@ var A = O`
115
116
  }
116
117
 
117
118
  .--DATAGRID-filterActive {
118
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-ICON-COLOR")};
119
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-ICON-COLOR")};
119
120
  }
120
121
 
121
122
  .--DATAGRID-thLabel {
122
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
123
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
123
124
 
124
125
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
125
126
  font-size: 0.875rem;
@@ -135,7 +136,7 @@ var A = O`
135
136
  gap: 4px;
136
137
 
137
138
  .--DATAGRID-filterLabel {
138
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
139
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
139
140
 
140
141
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
141
142
  font-size: 0.75rem;
@@ -153,12 +154,12 @@ var A = O`
153
154
  height: 48px;
154
155
  transition: background-color 150ms;
155
156
 
156
- ${a(e, "border-bottom-color", "--DATAGRID-ROOT-BORDER-COLOR")};
157
- ${a(e, "border-bottom-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
158
- ${a(e, "border-bottom-style", "--DATAGRID-ROOT-BORDER-STYLE")};
157
+ ${c(e, "border-bottom-color", "--DATAGRID-ROOT-BORDER-COLOR")};
158
+ ${c(e, "border-bottom-width", "--DATAGRID-ROOT-BORDER-WIDTH")};
159
+ ${c(e, "border-bottom-style", "--DATAGRID-ROOT-BORDER-STYLE")};
159
160
 
160
161
  &:hover {
161
- ${a(e, "background-color", "--DATAGRID-EVENTS-HOVER-BACKGROUND-COLOR")};
162
+ ${c(e, "background-color", "--DATAGRID-EVENTS-HOVER-BACKGROUND-COLOR")};
162
163
  }
163
164
 
164
165
  &:last-child {
@@ -167,7 +168,7 @@ var A = O`
167
168
  }
168
169
 
169
170
  .--DATAGRID-td {
170
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-PRIMARY")};
171
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-PRIMARY")};
171
172
 
172
173
  padding: 8px 16px;
173
174
  vertical-align: middle;
@@ -183,7 +184,7 @@ var A = O`
183
184
  text-align: center;
184
185
  vertical-align: middle;
185
186
 
186
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
187
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
187
188
 
188
189
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
189
190
  font-size: 0.875rem;
@@ -196,7 +197,7 @@ var A = O`
196
197
  height: 48px;
197
198
  vertical-align: middle;
198
199
 
199
- ${a(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
200
+ ${c(e, "color", "--DATAGRID-EVENTS-ENABLED-COLOR-SECONDARY")};
200
201
 
201
202
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
202
203
  font-size: 0.875rem;
@@ -213,16 +214,16 @@ var A = O`
213
214
  padding: 12px 16px !important;
214
215
  }
215
216
  }
216
- `, M = (e, t) => `
217
+ `, re = (e, t) => `
217
218
  // BACKGROUNDS
218
- ${a(e, "background-color", `--DATAGRIDMENU-${t}-BACKGROUND-COLOR`)}
219
+ ${c(e, "background-color", `--DATAGRIDMENU-${t}-BACKGROUND-COLOR`)}
219
220
 
220
221
  // BORDERS
221
- ${a(e, "border-color", `--DATAGRIDMENU-${t}-BORDER-COLOR`)}
222
- ${a(e, "border-width", `--DATAGRIDMENU-${t}-BORDER-WIDTH`)}
223
- ${a(e, "border-style", `--DATAGRIDMENU-${t}-BORDER-STYLE`)}
224
- ${a(e, "border-radius", `--DATAGRIDMENU-${t}-BORDER-RADIUS`)}
225
- `, N = (e) => O`
222
+ ${c(e, "border-color", `--DATAGRIDMENU-${t}-BORDER-COLOR`)}
223
+ ${c(e, "border-width", `--DATAGRIDMENU-${t}-BORDER-WIDTH`)}
224
+ ${c(e, "border-style", `--DATAGRIDMENU-${t}-BORDER-STYLE`)}
225
+ ${c(e, "border-radius", `--DATAGRIDMENU-${t}-BORDER-RADIUS`)}
226
+ `, N = (e) => k`
226
227
  &.--DATAGRIDMENU {
227
228
  position: fixed;
228
229
  z-index: 200;
@@ -236,7 +237,7 @@ var A = O`
236
237
  rgba(0, 0, 0, 0.14) 0px 8px 10px 1px,
237
238
  rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
238
239
 
239
- ${M(e, "ROOT")}
240
+ ${re(e, "ROOT")}
240
241
 
241
242
  .--DATAGRIDMENU-header {
242
243
  display: flex;
@@ -244,7 +245,7 @@ var A = O`
244
245
  justify-content: space-between;
245
246
 
246
247
  .--DATAGRIDMENU-headerTitle {
247
- ${a(e, "color", "--DATAGRIDMENU-EVENTS-ENABLED-COLOR-PRIMARY")};
248
+ ${c(e, "color", "--DATAGRIDMENU-EVENTS-ENABLED-COLOR-PRIMARY")};
248
249
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
249
250
  font-size: 0.875rem;
250
251
  font-weight: 600;
@@ -300,57 +301,57 @@ var A = O`
300
301
  justify-content: flex-end;
301
302
  }
302
303
  }
303
- `, P = "--DATAGRIDMENU", F = ({ columnKey: e, pendingSearch: n, onSearchChange: r, searchLabel: i = "Search" }) => /* @__PURE__ */ t("div", {
304
+ `, P = "--DATAGRIDMENU", F = ({ columnKey: e, pendingSearch: r, onSearchChange: i, searchLabel: a = "Search" }) => /* @__PURE__ */ t("div", {
304
305
  className: `${P}-searchInput`,
305
- children: /* @__PURE__ */ t(m, {
306
+ children: /* @__PURE__ */ t(p, {
306
307
  name: `search-${e}`,
307
- label: i,
308
- value: n,
309
- onValueChange: r,
308
+ label: a,
309
+ value: r,
310
+ onValueChange: i,
310
311
  showErrorText: !1,
311
312
  width: "full",
312
313
  autoFocus: !0,
313
314
  "data-testid": `${P}-searchInput-${e}`,
314
- startAdornment: /* @__PURE__ */ t(s, {
315
+ startAdornment: /* @__PURE__ */ t(n, {
315
316
  name: "search",
316
317
  style: { color: "white" }
317
318
  })
318
319
  })
319
- }), I = "--DATAGRIDMENU", L = ({ filterType: e, columnKey: i, options: a, pendingMulti: o, onMultiChange: s, multiSearch: l, onMultiSearchChange: u }) => {
320
- let d = e === "multiselect-search", f = a.filter((e) => !l || e.label.toLowerCase().includes(l.toLowerCase()));
321
- return /* @__PURE__ */ n(r, { children: [d && /* @__PURE__ */ t("div", {
320
+ }), I = "--DATAGRIDMENU", L = ({ filterType: n, columnKey: r, options: a, pendingMulti: o, onMultiChange: s, multiSearch: c, onMultiSearchChange: l }) => {
321
+ let u = n === "multiselect-search", d = a.filter((e) => !c || e.label.toLowerCase().includes(c.toLowerCase()));
322
+ return /* @__PURE__ */ e(i, { children: [u && /* @__PURE__ */ t("div", {
322
323
  className: `${I}-searchInput`,
323
- children: /* @__PURE__ */ t(m, {
324
- name: `multiSearch-${i}`,
324
+ children: /* @__PURE__ */ t(p, {
325
+ name: `multiSearch-${r}`,
325
326
  label: "Search options",
326
- value: l,
327
- onValueChange: u,
327
+ value: c,
328
+ onValueChange: l,
328
329
  showErrorText: !1,
329
330
  width: "full",
330
331
  autoFocus: !0,
331
- "data-testid": `${I}-multiSearch-${i}`
332
+ "data-testid": `${I}-multiSearch-${r}`
332
333
  })
333
334
  }), /* @__PURE__ */ t("div", {
334
335
  className: `${I}-optionsList`,
335
- "data-testid": `${I}-optionsList-${i}`,
336
- children: f.map((e) => /* @__PURE__ */ n("div", {
336
+ "data-testid": `${I}-optionsList-${r}`,
337
+ children: d.map((n) => /* @__PURE__ */ e("div", {
337
338
  className: `${I}-optionRow`,
338
- children: [e.color && /* @__PURE__ */ t("span", {
339
+ children: [n.color && /* @__PURE__ */ t("span", {
339
340
  className: `${I}-optionDot`,
340
- style: { backgroundColor: e.color },
341
+ style: { backgroundColor: n.color },
341
342
  "aria-hidden": "true"
342
- }), /* @__PURE__ */ t(c, {
343
- checked: o.includes(e.value),
344
- onChecked: (t) => s(t ? [...o, e.value] : o.filter((t) => t !== e.value)),
345
- label: e.label,
343
+ }), /* @__PURE__ */ t(_, {
344
+ checked: o.includes(n.value),
345
+ onChecked: (e) => s(e ? [...o, n.value] : o.filter((e) => e !== n.value)),
346
+ label: n.label,
346
347
  showErrorText: !1,
347
- "data-testid": `${I}-option-${i}-${e.value}`
348
+ "data-testid": `${I}-option-${r}-${n.value}`
348
349
  })]
349
- }, e.value))
350
+ }, n.value))
350
351
  })] });
351
- }, R = "--DATAGRIDMENU", z = ({ filterType: e, options: r, columnKey: i, filterTitle: a, searchLabel: c, cancelLabel: l = "Cancel", applyLabel: u = "Apply", pendingSearch: f, onSearchChange: p, pendingMulti: m, onMultiChange: h, multiSearch: g, onMultiSearchChange: _, onCancel: v, onApply: y, onClear: b, anchorEl: x, style: S }) => {
352
- let C = E(null);
353
- return ee(() => {
352
+ }, R = "--DATAGRIDMENU", z = ({ filterType: r, options: i, columnKey: a, filterTitle: s, searchLabel: c, cancelLabel: l = "Cancel", applyLabel: d = "Apply", pendingSearch: f, onSearchChange: p, pendingMulti: m, onMultiChange: h, multiSearch: g, onMultiSearchChange: _, onCancel: v, onApply: y, onClear: b, anchorEl: x, style: S }) => {
353
+ let C = D(null);
354
+ return T(() => {
354
355
  if (!x) return;
355
356
  let e = () => {
356
357
  if (!C.current) return;
@@ -360,83 +361,83 @@ var A = O`
360
361
  return e(), window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
361
362
  window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
362
363
  };
363
- }, [x]), k.createPortal(/* @__PURE__ */ n("div", {
364
+ }, [x]), te.createPortal(/* @__PURE__ */ e("div", {
364
365
  ref: C,
365
366
  className: R,
366
367
  css: N(S),
367
- "data-popover-key": i,
368
- "data-testid": `${R}-${i}`,
368
+ "data-popover-key": a,
369
+ "data-testid": `${R}-${a}`,
369
370
  children: [
370
- /* @__PURE__ */ n("div", {
371
+ /* @__PURE__ */ e("div", {
371
372
  className: `${R}-header`,
372
373
  children: [/* @__PURE__ */ t("span", {
373
374
  className: `${R}-headerTitle`,
374
- children: a
375
+ children: s
375
376
  }), /* @__PURE__ */ t(o, {
376
- icon: /* @__PURE__ */ t(s, {
377
+ icon: /* @__PURE__ */ t(n, {
377
378
  name: "delete_outline",
378
379
  size: "sm"
379
380
  }),
380
381
  onClick: b,
381
382
  "aria-label": "Clear filter",
382
- "data-testid": `${R}-clearBtn-${i}`
383
+ "data-testid": `${R}-clearBtn-${a}`
383
384
  })]
384
385
  }),
385
- /* @__PURE__ */ n("div", {
386
+ /* @__PURE__ */ e("div", {
386
387
  className: `${R}-content`,
387
- children: [e === "search" && /* @__PURE__ */ t(F, {
388
- columnKey: i,
388
+ children: [r === "search" && /* @__PURE__ */ t(F, {
389
+ columnKey: a,
389
390
  pendingSearch: f,
390
391
  onSearchChange: p,
391
392
  searchLabel: c
392
- }), (e === "multiselect" || e === "multiselect-search") && /* @__PURE__ */ t(L, {
393
- filterType: e,
394
- columnKey: i,
395
- options: r ?? [],
393
+ }), (r === "multiselect" || r === "multiselect-search") && /* @__PURE__ */ t(L, {
394
+ filterType: r,
395
+ columnKey: a,
396
+ options: i ?? [],
396
397
  pendingMulti: m,
397
398
  onMultiChange: h,
398
399
  multiSearch: g,
399
400
  onMultiSearchChange: _
400
401
  })]
401
402
  }),
402
- /* @__PURE__ */ n("div", {
403
+ /* @__PURE__ */ e("div", {
403
404
  className: `${R}-actions`,
404
- children: [/* @__PURE__ */ t(d, {
405
+ children: [/* @__PURE__ */ t(u, {
405
406
  onClick: v,
406
- "data-testid": `${R}-cancelBtn-${i}`,
407
+ "data-testid": `${R}-cancelBtn-${a}`,
407
408
  variant: "ghost",
408
409
  children: l
409
- }), /* @__PURE__ */ t(d, {
410
+ }), /* @__PURE__ */ t(u, {
410
411
  onClick: y,
411
- "data-testid": `${R}-applyBtn-${i}`,
412
- children: u
412
+ "data-testid": `${R}-applyBtn-${a}`,
413
+ children: d
413
414
  })]
414
415
  })
415
416
  ]
416
417
  }), document.body);
417
- }, re = ({ theme: n, variant: r = "default", ...i }) => {
418
- let { componentStyles: a } = e([l.DATAGRIDMENU], n, r.toUpperCase());
418
+ }, ie = ({ theme: e, variant: n = "default", ...i }) => {
419
+ let { componentStyles: o } = a([r.DATAGRIDMENU], e, n.toUpperCase());
419
420
  return /* @__PURE__ */ t(z, {
420
421
  ...i,
421
- style: a
422
+ style: o
422
423
  });
423
- }, B = "--DATAGRID", ie = ({ columns: e, pageSize: n }) => {
424
- let i = T(() => Array.from({ length: n }, () => e.map((e) => e.type === "options" ? null : `${Math.floor(Math.random() * 51) + 40}%`)), [n, e.length]);
425
- return /* @__PURE__ */ t(r, { children: Array.from({ length: n }).map((n, r) => /* @__PURE__ */ t("tr", {
424
+ }, B = "--DATAGRID", ae = ({ columns: e, pageSize: n }) => {
425
+ let r = E(() => Array.from({ length: n }, () => e.map((e) => e.type === "options" ? null : `${Math.floor(Math.random() * 51) + 40}%`)), [n, e.length]);
426
+ return /* @__PURE__ */ t(i, { children: Array.from({ length: n }).map((n, i) => /* @__PURE__ */ t("tr", {
426
427
  className: `${B}-row`,
427
428
  children: e.map((e, n) => /* @__PURE__ */ t("td", {
428
429
  className: [`${B}-td`, e.type === "options" ? `${B}-tdOptions` : ""].filter(Boolean).join(" "),
429
- children: e.type === "options" ? /* @__PURE__ */ t(j, {
430
+ children: e.type === "options" ? /* @__PURE__ */ t(M, {
430
431
  variant: "circular",
431
432
  width: 24,
432
433
  height: 24
433
- }) : /* @__PURE__ */ t(j, {
434
+ }) : /* @__PURE__ */ t(M, {
434
435
  height: 16,
435
- width: i[r][n] ?? void 0
436
+ width: r[i][n] ?? void 0
436
437
  })
437
438
  }, e.key))
438
- }, r)) });
439
- }, V = (e) => O`
439
+ }, i)) });
440
+ }, V = (e) => k`
440
441
  &.--PAGINATION {
441
442
  display: flex;
442
443
  align-items: center;
@@ -451,7 +452,7 @@ var A = O`
451
452
  gap: 8px;
452
453
 
453
454
  .--PAGINATION-rowsSize {
454
- ${a(e, "color", "--PAGINATION-EVENTS-ENABLED-COLOR-SECONDARY")};
455
+ ${c(e, "color", "--PAGINATION-EVENTS-ENABLED-COLOR-SECONDARY")};
455
456
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
456
457
  font-size: 0.8125rem;
457
458
  user-select: none;
@@ -466,7 +467,7 @@ var A = O`
466
467
  gap: 8px;
467
468
 
468
469
  .--PAGINATION-info {
469
- ${a(e, "color", "--PAGINATION-EVENTS-ENABLED-COLOR-SECONDARY")};
470
+ ${c(e, "color", "--PAGINATION-EVENTS-ENABLED-COLOR-SECONDARY")};
470
471
  font-family: ${e["--FONTFAMILY-PRIMARY"]};
471
472
  font-size: 0.8125rem;
472
473
  user-select: none;
@@ -475,27 +476,27 @@ var A = O`
475
476
  }
476
477
  `, H = (e, t) => `
477
478
  // BACKGROUNDS
478
- ${a(e, "background-color", `--PAGINATIONMENU-EVENTS-${t}-BACKGROUND-COLOR`)}
479
+ ${c(e, "background-color", `--PAGINATIONMENU-EVENTS-${t}-BACKGROUND-COLOR`)}
479
480
 
480
481
  // BORDERS
481
- ${a(e, "border-color", `--PAGINATIONMENU-EVENTS-${t}-BORDER-COLOR`)}
482
- ${a(e, "border-width", `--PAGINATIONMENU-EVENTS-${t}-BORDER-WIDTH`)}
483
- ${a(e, "border-style", `--PAGINATIONMENU-EVENTS-${t}-BORDER-STYLE`)}
484
- ${a(e, "border-radius", `--PAGINATIONMENU-EVENTS-${t}-BORDER-RADIUS`)}
482
+ ${c(e, "border-color", `--PAGINATIONMENU-EVENTS-${t}-BORDER-COLOR`)}
483
+ ${c(e, "border-width", `--PAGINATIONMENU-EVENTS-${t}-BORDER-WIDTH`)}
484
+ ${c(e, "border-style", `--PAGINATIONMENU-EVENTS-${t}-BORDER-STYLE`)}
485
+ ${c(e, "border-radius", `--PAGINATIONMENU-EVENTS-${t}-BORDER-RADIUS`)}
485
486
  `, U = (e, t) => `
486
487
  // TYPOGRAPHY
487
- ${a(e, "color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
488
- ${a(e, "caret-color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
488
+ ${c(e, "color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
489
+ ${c(e, "caret-color", `--PAGINATIONMENU-EVENTS-${t}-COLOR-PRIMARY`)};
489
490
  `, W = (e, t) => `
490
491
  // BACKGROUNDS
491
- ${a(e, "background-color", `--PAGINATIONMENU-${t}-BACKGROUND-COLOR`)}
492
+ ${c(e, "background-color", `--PAGINATIONMENU-${t}-BACKGROUND-COLOR`)}
492
493
 
493
494
  // BORDERS
494
- ${a(e, "border-color", `--PAGINATIONMENU-${t}-BORDER-COLOR`)}
495
- ${a(e, "border-width", `--PAGINATIONMENU-${t}-BORDER-WIDTH`)}
496
- ${a(e, "border-style", `--PAGINATIONMENU-${t}-BORDER-STYLE`)}
497
- ${a(e, "border-radius", `--PAGINATIONMENU-${t}-BORDER-RADIUS`)}
498
- `, G = (e) => O`
495
+ ${c(e, "border-color", `--PAGINATIONMENU-${t}-BORDER-COLOR`)}
496
+ ${c(e, "border-width", `--PAGINATIONMENU-${t}-BORDER-WIDTH`)}
497
+ ${c(e, "border-style", `--PAGINATIONMENU-${t}-BORDER-STYLE`)}
498
+ ${c(e, "border-radius", `--PAGINATIONMENU-${t}-BORDER-RADIUS`)}
499
+ `, G = (e) => k`
499
500
  &.--PAGINATIONMENU {
500
501
  position: absolute;
501
502
  bottom: calc(100% + ${e["--PAGINATIONMENU-ROOT-BOTTOM"] || ""});
@@ -569,14 +570,14 @@ var A = O`
569
570
  children: e
570
571
  }, e);
571
572
  })
572
- }), J = ({ theme: n, variant: r = "default", ...i }) => {
573
- let { componentStyles: a } = e([l.PAGINATIONMENU], n, r.toUpperCase());
573
+ }), J = ({ theme: e, variant: n = "default", ...i }) => {
574
+ let { componentStyles: o } = a([r.PAGINATIONMENU], e, n.toUpperCase());
574
575
  return /* @__PURE__ */ t(q, {
575
576
  ...i,
576
- style: a
577
+ style: o
577
578
  });
578
- }, Y = "--PAGINATION", X = ({ page: e, total: r, pageSize: i, onPageChange: a, pageSizeOptions: c, onPageSizeChange: l, loading: u, className: d, style: f }) => {
579
- let [p, m] = D(!1), [h, g] = D(-1), _ = Math.max(1, Math.ceil(r / i)), v = e * i + 1, y = Math.min((e + 1) * i, r), b = e === 0, x = e >= _ - 1, S = () => {
579
+ }, Y = "--PAGINATION", X = ({ page: r, total: i, pageSize: a, onPageChange: s, pageSizeOptions: c, onPageSizeChange: l, loading: u, className: d, style: f }) => {
580
+ let [p, m] = O(!1), [h, g] = O(-1), _ = Math.max(1, Math.ceil(i / a)), v = r * a + 1, y = Math.min((r + 1) * a, i), b = r === 0, x = r >= _ - 1, S = () => {
580
581
  m(!1), g(-1);
581
582
  };
582
583
  return w(() => {
@@ -585,15 +586,15 @@ var A = O`
585
586
  e.target.closest(`.${Y}-rowsControl`) || (m(!1), g(-1));
586
587
  };
587
588
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
588
- }, [p]), /* @__PURE__ */ n("div", {
589
+ }, [p]), /* @__PURE__ */ e("div", {
589
590
  className: [Y, d || ""].filter(Boolean).join(" "),
590
591
  css: V(f ?? {}),
591
- children: [c && c.length > 0 && /* @__PURE__ */ n("div", {
592
+ children: [c && c.length > 0 && /* @__PURE__ */ e("div", {
592
593
  className: `${Y}-rowsControl`,
593
594
  children: [
594
595
  p && /* @__PURE__ */ t(J, {
595
596
  options: c,
596
- activeOption: i,
597
+ activeOption: a,
597
598
  onSelect: (e) => {
598
599
  l?.(e), S();
599
600
  },
@@ -601,10 +602,10 @@ var A = O`
601
602
  }),
602
603
  /* @__PURE__ */ t("span", {
603
604
  className: `${Y}-rowsSize`,
604
- children: i
605
+ children: a
605
606
  }),
606
607
  /* @__PURE__ */ t(o, {
607
- icon: /* @__PURE__ */ t(s, {
608
+ icon: /* @__PURE__ */ t(n, {
608
609
  name: "arrow_drop_up",
609
610
  size: "sm"
610
611
  }),
@@ -623,55 +624,55 @@ var A = O`
623
624
  "data-testid": `${Y}-rowsBtn`
624
625
  })
625
626
  ]
626
- }), /* @__PURE__ */ n("div", {
627
+ }), /* @__PURE__ */ e("div", {
627
628
  className: `${Y}-controls`,
628
629
  children: [
629
- /* @__PURE__ */ n("span", {
630
+ /* @__PURE__ */ e("span", {
630
631
  className: `${Y}-info`,
631
632
  children: [
632
633
  v,
633
634
  "-",
634
635
  y,
635
636
  " of ",
636
- r
637
+ i
637
638
  ]
638
639
  }),
639
640
  /* @__PURE__ */ t(o, {
640
- icon: /* @__PURE__ */ t(s, {
641
+ icon: /* @__PURE__ */ t(n, {
641
642
  name: "first_page",
642
643
  size: "sm"
643
644
  }),
644
- onClick: () => a(0),
645
+ onClick: () => s(0),
645
646
  disabled: u || b,
646
647
  "aria-label": "First page",
647
648
  "data-testid": `${Y}-first`
648
649
  }),
649
650
  /* @__PURE__ */ t(o, {
650
- icon: /* @__PURE__ */ t(s, {
651
+ icon: /* @__PURE__ */ t(n, {
651
652
  name: "chevron_left",
652
653
  size: "sm"
653
654
  }),
654
- onClick: () => a(e - 1),
655
+ onClick: () => s(r - 1),
655
656
  disabled: u || b,
656
657
  "aria-label": "Previous page",
657
658
  "data-testid": `${Y}-prev`
658
659
  }),
659
660
  /* @__PURE__ */ t(o, {
660
- icon: /* @__PURE__ */ t(s, {
661
+ icon: /* @__PURE__ */ t(n, {
661
662
  name: "chevron_right",
662
663
  size: "sm"
663
664
  }),
664
- onClick: () => a(e + 1),
665
+ onClick: () => s(r + 1),
665
666
  disabled: u || x,
666
667
  "aria-label": "Next page",
667
668
  "data-testid": `${Y}-next`
668
669
  }),
669
670
  /* @__PURE__ */ t(o, {
670
- icon: /* @__PURE__ */ t(s, {
671
+ icon: /* @__PURE__ */ t(n, {
671
672
  name: "last_page",
672
673
  size: "sm"
673
674
  }),
674
- onClick: () => a(_ - 1),
675
+ onClick: () => s(_ - 1),
675
676
  disabled: u || x,
676
677
  "aria-label": "Last page",
677
678
  "data-testid": `${Y}-last`
@@ -679,38 +680,44 @@ var A = O`
679
680
  ]
680
681
  })]
681
682
  });
682
- }, ae = ({ theme: n, variant: r = "default", ...i }) => {
683
- let { componentStyles: a } = e([l.PAGINATION], n, r.toUpperCase());
683
+ }, oe = ({ theme: e, variant: n = "default", ...i }) => {
684
+ let { componentStyles: o } = a([r.PAGINATION], e, n.toUpperCase());
684
685
  return /* @__PURE__ */ t(X, {
685
686
  ...i,
686
- style: a
687
+ style: o
687
688
  });
688
- }, Z = "--DATAGRID", oe = 10, se = ({ columns: e, onFetch: i, paginationType: a = "pagination", pageSize: c = oe, pageSizeOptions: l, emptyContent: u = /* @__PURE__ */ t("span", { children: "No se han encontrado resultados" }), loadingMoreContent: d = /* @__PURE__ */ t("span", { children: "Cargando..." }), className: f, style: p }) => {
689
- let [m, h] = D([]), [g, _] = D(0), [v, y] = D(0), [b, x] = D(c), [S, T] = D(!0), [O, te] = D(null), [k, A] = D({}), [j, M] = D(null), [N, P] = D(null), [F, I] = D(""), [L, R] = D([]), [z, B] = D(""), [V, H] = D([]), [U, W] = D(0), G = E({}), K = E(null), q = E(null);
689
+ }, Z = "--DATAGRID", se = 10, Q = ({ columns: r, onFetch: a, paginationType: s = "pagination", pageSize: c = se, pageSizeOptions: l, emptyContent: u = /* @__PURE__ */ t("span", { children: "No se han encontrado resultados" }), loadingMoreContent: d = /* @__PURE__ */ t("span", { children: "Cargando..." }), className: f, style: p }) => {
690
+ let [m, h] = O([]), [g, _] = O(0), [v, y] = O(0), [b, x] = O(c), [S, C] = O(!0), [E, k] = O(null), [A, te] = O({}), [j, M] = O(null), [re, N] = O(null), [P, F] = O(""), [I, L] = O([]), [R, z] = O(""), [B, V] = O([]), [H, U] = O(0), W = D({}), G = D(null), K = D(null), q = D(null);
690
691
  w(() => {
691
692
  let e = !1;
692
- return i({
693
+ return a({
693
694
  page: v,
694
695
  pageSize: b,
695
- filters: k,
696
- sort: O ?? void 0
696
+ filters: A,
697
+ sort: E ?? void 0
697
698
  }).then((t) => {
698
- e || (h((e) => a === "scroll" && v > 0 ? [...e, ...t.data] : t.data), _(t.total), T(!1));
699
+ e || (h((e) => s === "scroll" && v > 0 ? [...e, ...t.data] : t.data), _(t.total), C(!1));
699
700
  }), () => {
700
701
  e = !0;
701
702
  };
702
703
  }, [
703
704
  v,
704
705
  b,
705
- k,
706
- O,
707
- a,
708
- i
709
- ]), ee(() => {
710
- a !== "scroll" || !K.current || !q.current || (H(Array.from(K.current.querySelectorAll(`th:not(.${Z}-thScrollbarSpacer)`)).map((e) => e.offsetWidth)), W(q.current.offsetWidth - q.current.clientWidth));
706
+ A,
707
+ E,
708
+ s,
709
+ a
710
+ ]), T(() => {
711
+ if (s !== "scroll" || !G.current || !q.current || !K.current) return;
712
+ let e = () => {
713
+ !G.current || !q.current || (V(Array.from(G.current.querySelectorAll(`th:not(.${Z}-thScrollbarSpacer)`)).map((e) => e.getBoundingClientRect().width)), U(q.current.offsetWidth - q.current.clientWidth));
714
+ };
715
+ e();
716
+ let t = new ResizeObserver(e);
717
+ return t.observe(K.current), () => t.disconnect();
711
718
  }, [
712
- a,
713
- e.length,
719
+ s,
720
+ r.length,
714
721
  S
715
722
  ]), w(() => {
716
723
  if (!j) return;
@@ -722,122 +729,123 @@ var A = O`
722
729
  let J = (e) => {
723
730
  if (!e.filter) return;
724
731
  if (j === e.key) {
725
- M(null), P(null);
732
+ M(null), N(null);
726
733
  return;
727
734
  }
728
- let t = k[e.key];
729
- e.filter.type === "search" ? I(typeof t == "string" ? t : "") : (R(Array.isArray(t) ? t : []), B("")), P(G.current[e.key] ?? null), M(e.key);
735
+ let t = A[e.key];
736
+ e.filter.type === "search" ? F(typeof t == "string" ? t : "") : (L(Array.isArray(t) ? t : []), z("")), N(W.current[e.key] ?? null), M(e.key);
730
737
  }, Y = (e) => {
731
738
  if (!e.filter) return;
732
- let t = e.filter.type === "search" ? F : L;
733
- T(!0), A((n) => ({
739
+ let t = e.filter.type === "search" ? P : I;
740
+ C(!0), te((n) => ({
734
741
  ...n,
735
742
  [e.key]: t
736
743
  })), y(0), M(null);
737
744
  }, X = (e) => {
738
- let t = k[e];
745
+ let t = A[e];
739
746
  return t == null ? !1 : Array.isArray(t) ? t.length > 0 : t !== "";
740
- }, se = (e) => {
741
- T(!0), te((t) => t?.key === e ? {
747
+ }, Q = (e) => {
748
+ C(!0), k((t) => t?.key === e ? {
742
749
  key: e,
743
750
  direction: t.direction === "asc" ? "desc" : "asc"
744
751
  } : {
745
752
  key: e,
746
753
  direction: "asc"
747
754
  }), y(0);
748
- }, Q = (e) => {
749
- T(!0), y(e);
750
755
  }, ce = (e) => {
751
- T(!0), x(e), y(0);
752
- }, le = C((e) => {
753
- if (a !== "scroll" || S || m.length >= g) return;
756
+ C(!0), y(e);
757
+ }, le = (e) => {
758
+ C(!0), x(e), y(0);
759
+ }, ue = ee((e) => {
760
+ if (s !== "scroll" || S || m.length >= g) return;
754
761
  let { scrollTop: t, scrollHeight: n, clientHeight: r } = e.currentTarget;
755
- n - t - r < 48 && (T(!0), y((e) => e + 1));
762
+ n - t - r < 48 && (C(!0), y((e) => e + 1));
756
763
  }, [
757
- a,
764
+ s,
758
765
  S,
759
766
  m.length,
760
767
  g
761
- ]), ue = e.length, $ = j ? e.find((e) => e.key === j) : void 0, de = b * 48, fe = !S && m.length === 0, pe = e.map((e) => /* @__PURE__ */ t("th", {
762
- className: [`${Z}-th`, e.type === "options" ? `${Z}-thOptions` : ""].join(" "),
763
- style: e.width ? { width: e.width } : void 0,
764
- children: /* @__PURE__ */ n("div", {
768
+ ]), de = r.length, $ = j ? r.find((e) => e.key === j) : void 0, fe = b * 48, pe = !S && m.length === 0, me = r.map((r) => /* @__PURE__ */ t("th", {
769
+ className: [`${Z}-th`, r.type === "options" ? `${Z}-thOptions` : ""].join(" "),
770
+ style: r.width ? { width: r.width } : void 0,
771
+ children: /* @__PURE__ */ e("div", {
765
772
  className: `${Z}-thInner`,
766
- "data-testid": `${Z}-th-${e.key}`,
767
- children: [typeof e.label == "string" ? /* @__PURE__ */ t("span", {
773
+ "data-testid": `${Z}-th-${r.key}`,
774
+ children: [typeof r.label == "string" ? /* @__PURE__ */ t("span", {
768
775
  className: `${Z}-thLabel`,
769
- children: e.label
770
- }) : e.label, e.type !== "options" && /* @__PURE__ */ n("div", {
776
+ children: r.label
777
+ }) : r.label, r.type !== "options" && /* @__PURE__ */ e("div", {
771
778
  className: `${Z}-thActions`,
772
- children: [e.filter && /* @__PURE__ */ t("div", {
779
+ children: [r.filter && /* @__PURE__ */ t("div", {
773
780
  className: `${Z}-filterContainer`,
774
- "data-popover-key": e.key,
781
+ "data-popover-key": r.key,
775
782
  children: /* @__PURE__ */ t("span", {
776
- ref: (t) => {
777
- G.current[e.key] = t;
783
+ ref: (e) => {
784
+ W.current[r.key] = e;
778
785
  },
779
786
  children: /* @__PURE__ */ t(o, {
780
- icon: /* @__PURE__ */ t(s, {
781
- name: X(e.key) ? "filter_alt" : "filter_list",
787
+ icon: /* @__PURE__ */ t(n, {
788
+ name: X(r.key) ? "filter_alt" : "filter_list",
782
789
  size: "sm",
783
- style: { color: X(e.key) ? "white" : "" }
790
+ style: { color: X(r.key) ? "white" : "" }
784
791
  }),
785
- onClick: () => J(e),
786
- "data-testid": `${Z}-filterBtn-${e.key}`,
787
- "aria-label": `Filter ${e.label}`
792
+ onClick: () => J(r),
793
+ "data-testid": `${Z}-filterBtn-${r.key}`,
794
+ "aria-label": `Filter ${r.label}`
788
795
  })
789
796
  })
790
- }), e.sortable !== !1 && /* @__PURE__ */ t(o, {
791
- icon: /* @__PURE__ */ t(s, {
792
- name: O?.key === e.key ? O.direction === "asc" ? "arrow_upward" : "arrow_downward" : "unfold_more",
797
+ }), r.sortable !== !1 && /* @__PURE__ */ t(o, {
798
+ icon: /* @__PURE__ */ t(n, {
799
+ name: E?.key === r.key ? E.direction === "asc" ? "arrow_upward" : "arrow_downward" : "unfold_more",
793
800
  size: "sm",
794
- style: { color: O?.key === e.key ? "white" : "" }
801
+ style: { color: E?.key === r.key ? "white" : "" }
795
802
  }),
796
- onClick: () => se(e.key),
797
- "data-testid": `${Z}-sortBtn-${e.key}`,
798
- "aria-label": `Sort ${e.label}`
803
+ onClick: () => Q(r.key),
804
+ "data-testid": `${Z}-sortBtn-${r.key}`,
805
+ "aria-label": `Sort ${r.label}`
799
806
  })]
800
807
  })]
801
808
  })
802
- }, e.key)), me = S && (a !== "scroll" || m.length === 0) ? /* @__PURE__ */ t(ie, {
803
- columns: e,
809
+ }, r.key)), he = S && (s !== "scroll" || m.length === 0) ? /* @__PURE__ */ t(ae, {
810
+ columns: r,
804
811
  pageSize: b
805
- }) : fe ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
806
- colSpan: ue,
812
+ }) : pe ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
813
+ colSpan: de,
807
814
  className: `${Z}-emptyCell`,
808
- style: { height: `${de}px` },
815
+ style: { height: `${fe}px` },
809
816
  children: u
810
- }) }) : /* @__PURE__ */ n(r, { children: [m.map((n, r) => /* @__PURE__ */ t("tr", {
817
+ }) }) : /* @__PURE__ */ e(i, { children: [m.map((e, n) => /* @__PURE__ */ t("tr", {
811
818
  className: `${Z}-row`,
812
- "data-testid": `${Z}-row-${r}`,
813
- children: e.map((e) => {
814
- let i = n[e.key];
819
+ "data-testid": `${Z}-row-${n}`,
820
+ children: r.map((r) => {
821
+ let i = e[r.key];
815
822
  return /* @__PURE__ */ t("td", {
816
- className: [`${Z}-td`, e.type === "options" ? `${Z}-tdOptions` : ""].filter(Boolean).join(" "),
817
- "data-testid": `${Z}-cell-${e.key}-${r}`,
818
- children: e.render ? e.render(i, n) : String(i ?? "")
819
- }, e.key);
823
+ className: [`${Z}-td`, r.type === "options" ? `${Z}-tdOptions` : ""].filter(Boolean).join(" "),
824
+ "data-testid": `${Z}-cell-${r.key}-${n}`,
825
+ children: r.render ? r.render(i, e) : String(i ?? "")
826
+ }, r.key);
820
827
  })
821
- }, r)), a === "scroll" && S && /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
822
- colSpan: ue,
828
+ }, n)), s === "scroll" && S && /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
829
+ colSpan: de,
823
830
  className: `${Z}-loadingMore`,
824
831
  children: d
825
832
  }) })] });
826
- return /* @__PURE__ */ n("div", {
833
+ return /* @__PURE__ */ e("div", {
827
834
  className: [Z, f || ""].join(" "),
828
835
  css: ne(p),
829
836
  "data-testid": Z,
830
837
  children: [
831
838
  /* @__PURE__ */ t("div", {
832
839
  className: `${Z}-tableContainer`,
833
- children: a === "scroll" ? /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("table", {
840
+ children: s === "scroll" ? /* @__PURE__ */ e(i, { children: [/* @__PURE__ */ e("table", {
841
+ ref: K,
834
842
  className: `${Z}-table`,
835
- children: [/* @__PURE__ */ n("colgroup", { children: [e.map((e) => /* @__PURE__ */ t("col", { style: e.width ? { width: e.width } : void 0 }, e.key)), /* @__PURE__ */ t("col", { style: { width: U || 0 } })] }), /* @__PURE__ */ t("thead", {
836
- ref: K,
843
+ children: [/* @__PURE__ */ e("colgroup", { children: [r.map((e) => /* @__PURE__ */ t("col", { style: e.width ? { width: e.width } : void 0 }, e.key)), /* @__PURE__ */ t("col", { style: { width: H || 0 } })] }), /* @__PURE__ */ t("thead", {
844
+ ref: G,
837
845
  className: `${Z}-thead`,
838
- children: /* @__PURE__ */ n("tr", {
846
+ children: /* @__PURE__ */ e("tr", {
839
847
  className: `${Z}-headerRow`,
840
- children: [pe, /* @__PURE__ */ t("th", {
848
+ children: [me, /* @__PURE__ */ t("th", {
841
849
  "aria-hidden": "true",
842
850
  className: `${Z}-thScrollbarSpacer`,
843
851
  style: { padding: 0 }
@@ -849,44 +857,44 @@ var A = O`
849
857
  className: `${Z}-bodyContainer`,
850
858
  style: {
851
859
  overflowY: "auto",
852
- maxHeight: `${de}px`
860
+ maxHeight: `${fe}px`
853
861
  },
854
- onScroll: le,
855
- children: /* @__PURE__ */ n("table", {
862
+ onScroll: ue,
863
+ children: /* @__PURE__ */ e("table", {
856
864
  className: `${Z}-table`,
857
865
  style: {
858
866
  tableLayout: "fixed",
859
867
  width: "100%"
860
868
  },
861
- children: [/* @__PURE__ */ t("colgroup", { children: e.map((e, n) => /* @__PURE__ */ t("col", { style: { width: V[n] === void 0 ? e.width ?? "auto" : V[n] } }, e.key)) }), /* @__PURE__ */ t("tbody", {
869
+ children: [/* @__PURE__ */ t("colgroup", { children: r.map((e, n) => /* @__PURE__ */ t("col", { style: { width: B[n] === void 0 ? e.width ?? "auto" : B[n] } }, e.key)) }), /* @__PURE__ */ t("tbody", {
862
870
  className: `${Z}-tbody`,
863
- children: me
871
+ children: he
864
872
  })]
865
873
  })
866
- })] }) : /* @__PURE__ */ n("table", {
874
+ })] }) : /* @__PURE__ */ e("table", {
867
875
  className: `${Z}-table`,
868
876
  children: [/* @__PURE__ */ t("thead", {
869
877
  className: `${Z}-thead`,
870
878
  children: /* @__PURE__ */ t("tr", {
871
879
  className: `${Z}-headerRow`,
872
- children: pe
880
+ children: me
873
881
  })
874
882
  }), /* @__PURE__ */ t("tbody", {
875
883
  className: `${Z}-tbody`,
876
- children: me
884
+ children: he
877
885
  })]
878
886
  })
879
887
  }),
880
- a === "pagination" && /* @__PURE__ */ t(ae, {
888
+ s === "pagination" && /* @__PURE__ */ t(oe, {
881
889
  page: v,
882
890
  total: g,
883
891
  pageSize: b,
884
- onPageChange: Q,
892
+ onPageChange: ce,
885
893
  pageSizeOptions: l,
886
- onPageSizeChange: ce,
894
+ onPageSizeChange: le,
887
895
  loading: S
888
896
  }),
889
- $?.filter && /* @__PURE__ */ t(re, {
897
+ $?.filter && /* @__PURE__ */ t(ie, {
890
898
  filterType: $.filter.type,
891
899
  options: $.filter.options,
892
900
  columnKey: $.key,
@@ -894,29 +902,29 @@ var A = O`
894
902
  searchLabel: $.filter.label,
895
903
  cancelLabel: $.filter.cancelLabel,
896
904
  applyLabel: $.filter.applyLabel,
897
- pendingSearch: F,
898
- onSearchChange: I,
899
- pendingMulti: L,
900
- onMultiChange: R,
901
- multiSearch: z,
902
- onMultiSearchChange: B,
905
+ pendingSearch: P,
906
+ onSearchChange: F,
907
+ pendingMulti: I,
908
+ onMultiChange: L,
909
+ multiSearch: R,
910
+ onMultiSearchChange: z,
903
911
  onCancel: () => M(null),
904
912
  onApply: () => Y($),
905
913
  onClear: () => {
906
- $.filter?.type === "search" ? I("") : (R([]), B(""));
914
+ $.filter?.type === "search" ? F("") : (L([]), z(""));
907
915
  },
908
- anchorEl: N
916
+ anchorEl: re
909
917
  })
910
918
  ]
911
919
  });
912
- }, Q = ({ theme: n, variant: r = "default", ...i }) => {
913
- let { componentStyles: a } = e([l.DATAGRID], n, r.toUpperCase());
914
- return /* @__PURE__ */ t(se, {
920
+ }, ce = ({ theme: e, variant: n = "default", ...i }) => {
921
+ let { componentStyles: o } = a([r.DATAGRID], e, n.toUpperCase());
922
+ return /* @__PURE__ */ t(Q, {
915
923
  ...i,
916
- style: a
924
+ style: o
917
925
  });
918
926
  };
919
927
  //#endregion
920
- export { d as Button, c as Checkbox, v as CheckboxGroup, b as CheckboxTree, Q as DataGrid, g as DatePicker, s as Icon, o as IconButton, y as Modal, u as NumberField, ae as Pagination, f as Radio, x as RadioGroup, h as Select, j as Skeleton, p as Slider, _ as Switch, m as TextField, S as ThemeProvider, i as darkTheme };
928
+ export { u as Button, _ as Checkbox, v as CheckboxGroup, b as CheckboxTree, ce as DataGrid, h as DatePicker, n as Icon, o as IconButton, y as Modal, l as NumberField, oe as Pagination, d as Radio, x as RadioGroup, m as Select, M as Skeleton, f as Slider, g as Switch, p as TextField, C as ThemeProvider, S as ToastProvider, s as darkTheme };
921
929
 
922
930
  //# sourceMappingURL=index.mjs.map