asterui 0.12.49 → 0.12.50

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 (200) hide show
  1. package/dist/components/Alert.js +18 -18
  2. package/dist/components/Alert.js.map +1 -1
  3. package/dist/components/Anchor.js +53 -53
  4. package/dist/components/Anchor.js.map +1 -1
  5. package/dist/components/Autocomplete.js +115 -114
  6. package/dist/components/Autocomplete.js.map +1 -1
  7. package/dist/components/Avatar.js +33 -32
  8. package/dist/components/Avatar.js.map +1 -1
  9. package/dist/components/Badge.js +99 -99
  10. package/dist/components/Badge.js.map +1 -1
  11. package/dist/components/Breadcrumb.js +12 -11
  12. package/dist/components/Breadcrumb.js.map +1 -1
  13. package/dist/components/Browser.js +10 -10
  14. package/dist/components/Browser.js.map +1 -1
  15. package/dist/components/Button.js +80 -79
  16. package/dist/components/Button.js.map +1 -1
  17. package/dist/components/Card.d.ts +2 -0
  18. package/dist/components/Card.js +111 -110
  19. package/dist/components/Card.js.map +1 -1
  20. package/dist/components/Carousel.js +59 -59
  21. package/dist/components/Carousel.js.map +1 -1
  22. package/dist/components/Cascader.js +175 -174
  23. package/dist/components/Cascader.js.map +1 -1
  24. package/dist/components/Chat.js +27 -27
  25. package/dist/components/Chat.js.map +1 -1
  26. package/dist/components/Checkbox.js +98 -97
  27. package/dist/components/Checkbox.js.map +1 -1
  28. package/dist/components/Code.js +11 -11
  29. package/dist/components/Code.js.map +1 -1
  30. package/dist/components/Collapse.js +46 -46
  31. package/dist/components/Collapse.js.map +1 -1
  32. package/dist/components/ColorPicker.d.ts +1 -1
  33. package/dist/components/ColorPicker.js +93 -91
  34. package/dist/components/ColorPicker.js.map +1 -1
  35. package/dist/components/Command.js +120 -120
  36. package/dist/components/Command.js.map +1 -1
  37. package/dist/components/ConfigProvider.d.ts +1 -1
  38. package/dist/components/ConfigProvider.js +9 -9
  39. package/dist/components/ConfigProvider.js.map +1 -1
  40. package/dist/components/ContextMenu.js +33 -33
  41. package/dist/components/ContextMenu.js.map +1 -1
  42. package/dist/components/CopyButton.js +74 -73
  43. package/dist/components/CopyButton.js.map +1 -1
  44. package/dist/components/Countdown.js +60 -59
  45. package/dist/components/Countdown.js.map +1 -1
  46. package/dist/components/DatePicker.d.ts +1 -1
  47. package/dist/components/DatePicker.js +54 -53
  48. package/dist/components/DatePicker.js.map +1 -1
  49. package/dist/components/Diff.js +10 -10
  50. package/dist/components/Diff.js.map +1 -1
  51. package/dist/components/Divider.js +21 -20
  52. package/dist/components/Divider.js.map +1 -1
  53. package/dist/components/Dock.js +28 -27
  54. package/dist/components/Dock.js.map +1 -1
  55. package/dist/components/Drawer.js +43 -43
  56. package/dist/components/Drawer.js.map +1 -1
  57. package/dist/components/Dropdown.js +127 -127
  58. package/dist/components/Dropdown.js.map +1 -1
  59. package/dist/components/Empty.js +16 -15
  60. package/dist/components/Empty.js.map +1 -1
  61. package/dist/components/Fieldset.js +11 -10
  62. package/dist/components/Fieldset.js.map +1 -1
  63. package/dist/components/FileInput.js +30 -29
  64. package/dist/components/FileInput.js.map +1 -1
  65. package/dist/components/Filter.d.ts +1 -1
  66. package/dist/components/Filter.js +32 -30
  67. package/dist/components/Filter.js.map +1 -1
  68. package/dist/components/FloatButton.js +83 -83
  69. package/dist/components/FloatButton.js.map +1 -1
  70. package/dist/components/Footer.js +14 -13
  71. package/dist/components/Footer.js.map +1 -1
  72. package/dist/components/Form.js +133 -132
  73. package/dist/components/Form.js.map +1 -1
  74. package/dist/components/Hero.js +12 -11
  75. package/dist/components/Hero.js.map +1 -1
  76. package/dist/components/HoverGallery.js +7 -7
  77. package/dist/components/HoverGallery.js.map +1 -1
  78. package/dist/components/Image.js +40 -40
  79. package/dist/components/Image.js.map +1 -1
  80. package/dist/components/Input.js +171 -169
  81. package/dist/components/Input.js.map +1 -1
  82. package/dist/components/InputNumber.js +84 -83
  83. package/dist/components/InputNumber.js.map +1 -1
  84. package/dist/components/Join.js +11 -10
  85. package/dist/components/Join.js.map +1 -1
  86. package/dist/components/Kbd.js +15 -15
  87. package/dist/components/Kbd.js.map +1 -1
  88. package/dist/components/Layout.js +66 -66
  89. package/dist/components/Layout.js.map +1 -1
  90. package/dist/components/List.d.ts +1 -1
  91. package/dist/components/List.js +75 -72
  92. package/dist/components/List.js.map +1 -1
  93. package/dist/components/Loading.d.ts +1 -1
  94. package/dist/components/Loading.js +31 -29
  95. package/dist/components/Loading.js.map +1 -1
  96. package/dist/components/Mask.js +31 -31
  97. package/dist/components/Mask.js.map +1 -1
  98. package/dist/components/Mention.js +61 -61
  99. package/dist/components/Mention.js.map +1 -1
  100. package/dist/components/Menu.js +84 -84
  101. package/dist/components/Menu.js.map +1 -1
  102. package/dist/components/Message.js +30 -29
  103. package/dist/components/Message.js.map +1 -1
  104. package/dist/components/Modal.js +117 -116
  105. package/dist/components/Modal.js.map +1 -1
  106. package/dist/components/MonthCalendar.d.ts +31 -0
  107. package/dist/components/MonthCalendar.js +205 -0
  108. package/dist/components/MonthCalendar.js.map +1 -0
  109. package/dist/components/Navbar.js +25 -25
  110. package/dist/components/Navbar.js.map +1 -1
  111. package/dist/components/Notification.js +56 -55
  112. package/dist/components/Notification.js.map +1 -1
  113. package/dist/components/OTPInput.js +69 -68
  114. package/dist/components/OTPInput.js.map +1 -1
  115. package/dist/components/Pagination.d.ts +1 -1
  116. package/dist/components/Pagination.js +60 -58
  117. package/dist/components/Pagination.js.map +1 -1
  118. package/dist/components/Phone.js +10 -10
  119. package/dist/components/Phone.js.map +1 -1
  120. package/dist/components/Popconfirm.js +60 -60
  121. package/dist/components/Popconfirm.js.map +1 -1
  122. package/dist/components/Progress.js +17 -17
  123. package/dist/components/Progress.js.map +1 -1
  124. package/dist/components/QRCode.js +23 -23
  125. package/dist/components/QRCode.js.map +1 -1
  126. package/dist/components/RadialProgress.js +17 -17
  127. package/dist/components/RadialProgress.js.map +1 -1
  128. package/dist/components/Radio.js +41 -40
  129. package/dist/components/Radio.js.map +1 -1
  130. package/dist/components/Range.d.ts +1 -1
  131. package/dist/components/Range.js +39 -37
  132. package/dist/components/Range.js.map +1 -1
  133. package/dist/components/Rating.js +79 -78
  134. package/dist/components/Rating.js.map +1 -1
  135. package/dist/components/ResponsiveDrawer.js +27 -27
  136. package/dist/components/ResponsiveDrawer.js.map +1 -1
  137. package/dist/components/RichTextEditor.d.ts +32 -0
  138. package/dist/components/RichTextEditor.js +335 -0
  139. package/dist/components/RichTextEditor.js.map +1 -0
  140. package/dist/components/Segmented.d.ts +1 -1
  141. package/dist/components/Segmented.js +48 -46
  142. package/dist/components/Segmented.js.map +1 -1
  143. package/dist/components/Select.js +55 -54
  144. package/dist/components/Select.js.map +1 -1
  145. package/dist/components/Skeleton.js +9 -9
  146. package/dist/components/Skeleton.js.map +1 -1
  147. package/dist/components/Splitter.js +93 -93
  148. package/dist/components/Splitter.js.map +1 -1
  149. package/dist/components/Stat.js +17 -16
  150. package/dist/components/Stat.js.map +1 -1
  151. package/dist/components/Status.js +29 -29
  152. package/dist/components/Status.js.map +1 -1
  153. package/dist/components/Steps.js +61 -61
  154. package/dist/components/Steps.js.map +1 -1
  155. package/dist/components/Table.js +256 -256
  156. package/dist/components/Table.js.map +1 -1
  157. package/dist/components/Tabs.js +65 -65
  158. package/dist/components/Tabs.js.map +1 -1
  159. package/dist/components/Tag.js +147 -147
  160. package/dist/components/Tag.js.map +1 -1
  161. package/dist/components/TextRotate.js +6 -6
  162. package/dist/components/TextRotate.js.map +1 -1
  163. package/dist/components/Textarea.js +35 -34
  164. package/dist/components/Textarea.js.map +1 -1
  165. package/dist/components/ThemeController.d.ts +1 -1
  166. package/dist/components/ThemeController.js +71 -68
  167. package/dist/components/ThemeController.js.map +1 -1
  168. package/dist/components/TimePicker.d.ts +1 -1
  169. package/dist/components/TimePicker.js +133 -129
  170. package/dist/components/TimePicker.js.map +1 -1
  171. package/dist/components/Timeline.js +79 -79
  172. package/dist/components/Timeline.js.map +1 -1
  173. package/dist/components/Toggle.js +33 -32
  174. package/dist/components/Toggle.js.map +1 -1
  175. package/dist/components/Tooltip.js +25 -25
  176. package/dist/components/Tooltip.js.map +1 -1
  177. package/dist/components/Tour.js +126 -126
  178. package/dist/components/Tour.js.map +1 -1
  179. package/dist/components/Transfer.js +93 -92
  180. package/dist/components/Transfer.js.map +1 -1
  181. package/dist/components/Tree.js +200 -200
  182. package/dist/components/Tree.js.map +1 -1
  183. package/dist/components/TreeSelect.js +255 -254
  184. package/dist/components/TreeSelect.js.map +1 -1
  185. package/dist/components/Typography.js +71 -70
  186. package/dist/components/Typography.js.map +1 -1
  187. package/dist/components/Upload.js +81 -81
  188. package/dist/components/Upload.js.map +1 -1
  189. package/dist/components/WeekCalendar.d.ts +35 -0
  190. package/dist/components/WeekCalendar.js +204 -0
  191. package/dist/components/WeekCalendar.js.map +1 -0
  192. package/dist/components/Window.js +7 -7
  193. package/dist/components/Window.js.map +1 -1
  194. package/dist/editor.d.ts +1 -0
  195. package/dist/editor.js +5 -0
  196. package/dist/editor.js.map +1 -0
  197. package/dist/index.d.ts +4 -0
  198. package/dist/index.js +211 -207
  199. package/dist/index.js.map +1 -1
  200. package/package.json +30 -1
@@ -1,65 +1,65 @@
1
1
  import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
- import Je, { forwardRef as Qe, useState as I, useMemo as W, useCallback as S, useId as qe } from "react";
3
- const Xe = {
4
- xs: "table-xs",
5
- sm: "table-sm",
2
+ import He, { forwardRef as Ue, useState as j, useMemo as W, useCallback as N, useId as et } from "react";
3
+ const tt = "table", st = "table-xs", at = "table-sm", nt = "table-lg", rt = "table-xl", ot = "table-zebra", lt = "table-pin-rows", dt = "table-pin-cols", it = "dropdown", ct = "dropdown-end", ft = "dropdown-content", O = "btn", ie = "btn-ghost", ce = "btn-xs", le = "btn-sm", ht = "btn-square", ut = "btn-active", pt = "menu", fe = "checkbox", bt = "checkbox-xs", he = "checkbox-primary", yt = "radio", gt = "radio-sm", xt = "radio-primary", mt = "divider", $t = "loading", vt = "loading-spinner", kt = "loading-lg", wt = "join", de = "join-item", Ct = "select", St = "select-sm", Nt = "select-bordered", Et = "input", zt = "input-sm", Kt = "input-bordered", Rt = {
4
+ xs: st,
5
+ sm: at,
6
6
  md: "",
7
- lg: "table-lg",
8
- xl: "table-xl"
7
+ lg: nt,
8
+ xl: rt
9
9
  };
10
- function Ye({
11
- filters: d,
12
- selectedValues: k,
13
- onChange: K,
10
+ function Pt({
11
+ filters: i,
12
+ selectedValues: v,
13
+ onChange: E,
14
14
  locale: H,
15
15
  testId: F
16
16
  }) {
17
- const [V, B] = I(!1), A = qe(), G = (l) => {
18
- const y = k.includes(l) ? k.filter((w) => w !== l) : [...k, l];
19
- K(y);
17
+ const [T, V] = j(!1), X = et(), J = (l) => {
18
+ const y = v.includes(l) ? v.filter((k) => k !== l) : [...v, l];
19
+ E(y);
20
20
  }, U = () => {
21
- K([]), B(!1);
21
+ E([]), V(!1);
22
+ }, d = (l) => {
23
+ l.key === "Escape" && V(!1);
22
24
  };
23
- return /* @__PURE__ */ m("div", { className: "dropdown dropdown-end", onKeyDown: (l) => {
24
- l.key === "Escape" && B(!1);
25
- }, children: [
25
+ return /* @__PURE__ */ m("div", { className: `${it} ${ct}`, onKeyDown: d, children: [
26
26
  /* @__PURE__ */ a(
27
27
  "button",
28
28
  {
29
29
  type: "button",
30
- className: `btn btn-ghost btn-xs ${k.length > 0 ? "text-primary" : ""}`,
31
- onClick: () => B(!V),
30
+ className: `${O} ${ie} ${ce} ${v.length > 0 ? "text-primary" : ""}`,
31
+ onClick: () => V(!T),
32
32
  "aria-label": "Filter column",
33
- "aria-expanded": V,
33
+ "aria-expanded": T,
34
34
  "aria-haspopup": "listbox",
35
- "aria-controls": A,
35
+ "aria-controls": X,
36
36
  "data-testid": `${F}-filter-button`,
37
37
  children: /* @__PURE__ */ a("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z" }) })
38
38
  }
39
39
  ),
40
- V && /* @__PURE__ */ m(
40
+ T && /* @__PURE__ */ m(
41
41
  "div",
42
42
  {
43
- id: A,
43
+ id: X,
44
44
  role: "listbox",
45
45
  "aria-multiselectable": "true",
46
- className: "dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52 border border-base-content/10",
46
+ className: `${ft} z-[1] ${pt} p-2 shadow bg-base-100 rounded-box w-52 border border-base-content/10`,
47
47
  "data-testid": `${F}-filter-dropdown`,
48
48
  children: [
49
- /* @__PURE__ */ a("div", { className: "space-y-2", children: d.map((l) => /* @__PURE__ */ m(
49
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: i.map((l) => /* @__PURE__ */ m(
50
50
  "label",
51
51
  {
52
52
  className: "flex items-center gap-2 cursor-pointer p-2 hover:bg-base-200 rounded",
53
53
  role: "option",
54
- "aria-selected": k.includes(l.value),
54
+ "aria-selected": v.includes(l.value),
55
55
  children: [
56
56
  /* @__PURE__ */ a(
57
57
  "input",
58
58
  {
59
59
  type: "checkbox",
60
- className: "checkbox checkbox-xs checkbox-primary",
61
- checked: k.includes(l.value),
62
- onChange: () => G(l.value),
60
+ className: `${fe} ${bt} ${he}`,
61
+ checked: v.includes(l.value),
62
+ onChange: () => J(l.value),
63
63
  "data-testid": `${F}-filter-${String(l.value)}`
64
64
  }
65
65
  ),
@@ -68,12 +68,12 @@ function Ye({
68
68
  },
69
69
  String(l.value)
70
70
  )) }),
71
- /* @__PURE__ */ a("div", { className: "divider my-1" }),
71
+ /* @__PURE__ */ a("div", { className: `${mt} my-1` }),
72
72
  /* @__PURE__ */ a(
73
73
  "button",
74
74
  {
75
75
  type: "button",
76
- className: "btn btn-ghost btn-xs w-full",
76
+ className: `${O} ${ie} ${ce} w-full`,
77
77
  onClick: U,
78
78
  "data-testid": `${F}-filter-reset`,
79
79
  children: H?.filterReset ?? "Clear"
@@ -84,21 +84,21 @@ function Ye({
84
84
  )
85
85
  ] });
86
86
  }
87
- function _e({ expanded: d, onExpand: k }) {
87
+ function It({ expanded: i, onExpand: v }) {
88
88
  return /* @__PURE__ */ a(
89
89
  "button",
90
90
  {
91
91
  type: "button",
92
- className: "btn btn-ghost btn-xs btn-square",
93
- onClick: (K) => {
94
- K.stopPropagation(), k();
92
+ className: `${O} ${ie} ${ce} ${ht}`,
93
+ onClick: (E) => {
94
+ E.stopPropagation(), v();
95
95
  },
96
- "aria-label": d ? "Collapse row" : "Expand row",
97
- "aria-expanded": d,
96
+ "aria-label": i ? "Collapse row" : "Expand row",
97
+ "aria-expanded": i,
98
98
  children: /* @__PURE__ */ a(
99
99
  "svg",
100
100
  {
101
- className: `w-4 h-4 transition-transform ${d ? "rotate-90" : ""}`,
101
+ className: `w-4 h-4 transition-transform ${i ? "rotate-90" : ""}`,
102
102
  fill: "none",
103
103
  stroke: "currentColor",
104
104
  viewBox: "0 0 24 24",
@@ -109,180 +109,180 @@ function _e({ expanded: d, onExpand: k }) {
109
109
  }
110
110
  );
111
111
  }
112
- function He({
113
- columns: d,
114
- dataSource: k,
115
- rowKey: K = "id",
112
+ function jt({
113
+ columns: i,
114
+ dataSource: v,
115
+ rowKey: E = "id",
116
116
  loading: H = !1,
117
117
  size: F = "md",
118
- bordered: V = !1,
119
- hoverable: B = !0,
120
- striped: A = !1,
121
- pinRows: G = !1,
118
+ bordered: T = !1,
119
+ hoverable: V = !0,
120
+ striped: X = !1,
121
+ pinRows: J = !1,
122
122
  pinCols: U = !1,
123
- pagination: o,
123
+ pagination: d,
124
124
  rowSelection: l,
125
125
  expandable: y,
126
- scroll: w,
127
- className: ge = "",
128
- onRow: me,
126
+ scroll: k,
127
+ className: Se = "",
128
+ onRow: Ne,
129
129
  onChange: z,
130
- onSortChange: ie,
131
- onFilterChange: le,
132
- locale: Z,
133
- "data-testid": ve,
134
- "aria-label": ke,
135
- ...we
136
- }, Ce) {
137
- const p = ve ?? "table", Ne = 10, [N, J] = I(
138
- o !== !1 && o?.current ? o.current : 1
139
- ), [$e, Se] = I(
140
- o !== !1 && o?.pageSize ? o.pageSize : Ne
141
- ), C = o !== !1 && o?.pageSize !== void 0 ? o.pageSize : $e, [oe, Ke] = I(() => {
142
- const e = d.find((s) => s.sortOrder !== void 0);
130
+ onSortChange: ue,
131
+ onFilterChange: pe,
132
+ locale: ee,
133
+ "data-testid": Ee,
134
+ "aria-label": ze,
135
+ ...Ke
136
+ }, Re) {
137
+ const p = Ee ?? "table", Pe = 10, [C, G] = j(
138
+ d !== !1 && d?.current ? d.current : 1
139
+ ), [Ie, je] = j(
140
+ d !== !1 && d?.pageSize ? d.pageSize : Pe
141
+ ), w = d !== !1 && d?.pageSize !== void 0 ? d.pageSize : Ie, [be, Fe] = j(() => {
142
+ const e = i.find((s) => s.sortOrder !== void 0);
143
143
  if (e)
144
144
  return {
145
145
  columnKey: e.key,
146
146
  order: e.sortOrder ?? null
147
147
  };
148
- const t = d.find((s) => s.defaultSortOrder);
148
+ const t = i.find((s) => s.defaultSortOrder);
149
149
  return {
150
150
  columnKey: t?.key || null,
151
151
  order: t?.defaultSortOrder || null
152
152
  };
153
- }), [de, ze] = I(() => {
153
+ }), [ye, Be] = j(() => {
154
154
  const e = {};
155
- return d.forEach((t) => {
155
+ return i.forEach((t) => {
156
156
  t.filteredValue !== void 0 ? e[t.key] = t.filteredValue : t.defaultFilteredValue && (e[t.key] = t.defaultFilteredValue);
157
157
  }), e;
158
- }), [Ee, ee] = I(
158
+ }), [De, te] = j(
159
159
  l?.selectedRowKeys || []
160
- ), [Re, je] = I(
160
+ ), [Le, Oe] = j(
161
161
  y?.expandedRowKeys ?? y?.defaultExpandedRowKeys ?? []
162
- ), Q = d.some((e) => e.sortOrder !== void 0), q = d.some((e) => e.filteredValue !== void 0), te = y?.expandedRowKeys !== void 0, O = l?.selectedRowKeys !== void 0, h = W(() => {
163
- if (Q) {
164
- const e = d.find((t) => t.sortOrder !== void 0 && t.sortOrder !== null);
162
+ ), q = i.some((e) => e.sortOrder !== void 0), Q = i.some((e) => e.filteredValue !== void 0), se = y?.expandedRowKeys !== void 0, B = l?.selectedRowKeys !== void 0, h = W(() => {
163
+ if (q) {
164
+ const e = i.find((t) => t.sortOrder !== void 0 && t.sortOrder !== null);
165
165
  return {
166
166
  columnKey: e?.key ?? null,
167
167
  order: e?.sortOrder ?? null
168
168
  };
169
169
  }
170
- return oe;
171
- }, [Q, d, oe]), E = W(() => {
172
- if (q) {
170
+ return be;
171
+ }, [q, i, be]), K = W(() => {
172
+ if (Q) {
173
173
  const e = {};
174
- return d.forEach((t) => {
174
+ return i.forEach((t) => {
175
175
  t.filteredValue !== void 0 && (e[t.key] = t.filteredValue);
176
176
  }), e;
177
177
  }
178
- return de;
179
- }, [q, d, de]), D = O ? l.selectedRowKeys : Ee, M = te ? y.expandedRowKeys : Re, X = o !== !1, b = W(() => d.filter((e) => !e.hidden), [d]), $ = S((e, t) => {
180
- if (typeof K == "function")
181
- return K(e);
182
- const s = e[K];
178
+ return ye;
179
+ }, [Q, i, ye]), D = B ? l.selectedRowKeys : De, M = se ? y.expandedRowKeys : Le, Y = d !== !1, b = W(() => i.filter((e) => !e.hidden), [i]), S = N((e, t) => {
180
+ if (typeof E == "function")
181
+ return E(e);
182
+ const s = e[E];
183
183
  return String(s !== void 0 ? s : t);
184
- }, [K]), Y = W(() => {
185
- let e = [...k];
186
- return Object.entries(E).forEach(([t, s]) => {
184
+ }, [E]), Z = W(() => {
185
+ let e = [...v];
186
+ return Object.entries(K).forEach(([t, s]) => {
187
187
  if (s && s.length > 0) {
188
- const n = d.find((r) => r.key === t);
189
- n?.onFilter && (e = e.filter(
190
- (r) => s.some((i) => n.onFilter(i, r))
188
+ const r = i.find((n) => n.key === t);
189
+ r?.onFilter && (e = e.filter(
190
+ (n) => s.some((o) => r.onFilter(o, n))
191
191
  ));
192
192
  }
193
193
  }), e;
194
- }, [k, E, d]), v = W(() => {
194
+ }, [v, K, i]), $ = W(() => {
195
195
  if (!h.columnKey || !h.order)
196
- return Y;
197
- const e = d.find((s) => s.key === h.columnKey);
196
+ return Z;
197
+ const e = i.find((s) => s.key === h.columnKey);
198
198
  if (!e?.sorter)
199
- return Y;
200
- const t = [...Y];
201
- return t.sort((s, n) => {
202
- let r = 0;
199
+ return Z;
200
+ const t = [...Z];
201
+ return t.sort((s, r) => {
202
+ let n = 0;
203
203
  if (typeof e.sorter == "function")
204
- r = e.sorter(s, n);
204
+ n = e.sorter(s, r);
205
205
  else if (e.dataIndex) {
206
- const i = s[e.dataIndex], g = n[e.dataIndex];
207
- if (i == null) return 1;
208
- if (g == null) return -1;
209
- i < g && (r = -1), i > g && (r = 1);
206
+ const o = s[e.dataIndex], x = r[e.dataIndex];
207
+ if (o == null) return 1;
208
+ if (x == null) return -1;
209
+ o < x && (n = -1), o > x && (n = 1);
210
210
  }
211
- return h.order === "ascend" ? r : -r;
211
+ return h.order === "ascend" ? n : -n;
212
212
  }), t;
213
- }, [Y, h, d]), R = o !== !1 && o?.total !== void 0 ? o.total : v.length, j = Math.ceil(R / C), se = (N - 1) * C, ce = se + C, P = X ? v.slice(se, ce) : v, _ = S((e) => {
214
- if (J(e), o !== !1 && o?.onChange && o.onChange(e, C), z) {
213
+ }, [Z, h, i]), R = d !== !1 && d?.total !== void 0 ? d.total : $.length, P = Math.ceil(R / w), ae = (C - 1) * w, ge = ae + w, I = Y ? $.slice(ae, ge) : $, _ = N((e) => {
214
+ if (G(e), d !== !1 && d?.onChange && d.onChange(e, w), z) {
215
215
  const t = {
216
- column: d.find((s) => s.key === h.columnKey),
216
+ column: i.find((s) => s.key === h.columnKey),
217
217
  order: h.order,
218
218
  field: h.columnKey ?? void 0
219
219
  };
220
220
  z(
221
- { current: e, pageSize: C, total: R },
222
- E,
221
+ { current: e, pageSize: w, total: R },
222
+ K,
223
223
  t,
224
- { currentDataSource: v, action: "paginate" }
224
+ { currentDataSource: $, action: "paginate" }
225
225
  );
226
226
  }
227
- }, [o, C, z, d, h, E, v, R]), Pe = S((e) => {
228
- Se(e), J(1), o !== !1 && o?.onShowSizeChange && o.onShowSizeChange(1, e), o !== !1 && o?.onChange && o.onChange(1, e);
229
- }, [o]), fe = S((e) => {
230
- const t = d.find((r) => r.key === e);
227
+ }, [d, w, z, i, h, K, $, R]), Te = N((e) => {
228
+ je(e), G(1), d !== !1 && d?.onShowSizeChange && d.onShowSizeChange(1, e), d !== !1 && d?.onChange && d.onChange(1, e);
229
+ }, [d]), xe = N((e) => {
230
+ const t = i.find((n) => n.key === e);
231
231
  let s = "ascend";
232
- h.columnKey === e && (h.order === "ascend" ? s = "descend" : h.order === "descend" && (s = null)), Q || Ke({ columnKey: s ? e : null, order: s }), J(1);
233
- const n = {
232
+ h.columnKey === e && (h.order === "ascend" ? s = "descend" : h.order === "descend" && (s = null)), q || Fe({ columnKey: s ? e : null, order: s }), G(1);
233
+ const r = {
234
234
  column: t,
235
235
  order: s,
236
236
  field: e
237
237
  };
238
- ie?.(n), z && z(
239
- { current: 1, pageSize: C, total: R },
240
- E,
241
- n,
242
- { currentDataSource: v, action: "sort" }
238
+ ue?.(r), z && z(
239
+ { current: 1, pageSize: w, total: R },
240
+ K,
241
+ r,
242
+ { currentDataSource: $, action: "sort" }
243
243
  );
244
- }, [d, h, Q, C, R, E, v, ie, z]), Ie = S((e, t) => {
244
+ }, [i, h, q, w, R, K, $, ue, z]), Ve = N((e, t) => {
245
245
  const s = {
246
- ...E,
246
+ ...K,
247
247
  [e]: t
248
248
  };
249
- if (q || ze(s), J(1), le?.(s), z) {
250
- const n = {
251
- column: d.find((r) => r.key === h.columnKey),
249
+ if (Q || Be(s), G(1), pe?.(s), z) {
250
+ const r = {
251
+ column: i.find((n) => n.key === h.columnKey),
252
252
  order: h.order,
253
253
  field: h.columnKey ?? void 0
254
254
  };
255
255
  z(
256
- { current: 1, pageSize: C, total: R },
256
+ { current: 1, pageSize: w, total: R },
257
257
  s,
258
- n,
259
- { currentDataSource: v, action: "filter" }
258
+ r,
259
+ { currentDataSource: $, action: "filter" }
260
260
  );
261
261
  }
262
- }, [E, q, d, h, C, R, v, le, z]), Fe = S((e) => {
263
- const t = e ? P.map((s, n) => $(s, n)) : [];
264
- if (O || ee(t), l?.onChange) {
265
- const s = e ? P : [];
262
+ }, [K, Q, i, h, w, R, $, pe, z]), Me = N((e) => {
263
+ const t = e ? I.map((s, r) => S(s, r)) : [];
264
+ if (B || te(t), l?.onChange) {
265
+ const s = e ? I : [];
266
266
  l.onChange(t, s);
267
267
  }
268
- }, [P, $, O, l]), Oe = S((e, t, s) => {
269
- const n = $(e, t);
268
+ }, [I, S, B, l]), Ae = N((e, t, s) => {
269
+ const r = S(e, t);
270
270
  if (l?.type === "radio") {
271
- const i = s ? [n] : [];
272
- O || ee(i), l?.onChange && l.onChange(i, s ? [e] : []);
271
+ const o = s ? [r] : [];
272
+ B || te(o), l?.onChange && l.onChange(o, s ? [e] : []);
273
273
  return;
274
274
  }
275
- const r = s ? [...D, n] : D.filter((i) => i !== n);
276
- if (O || ee(r), l?.onChange) {
277
- const i = v.filter(
278
- (g, c) => r.includes($(g, c))
275
+ const n = s ? [...D, r] : D.filter((o) => o !== r);
276
+ if (B || te(n), l?.onChange) {
277
+ const o = $.filter(
278
+ (x, c) => n.includes(S(x, c))
279
279
  );
280
- l.onChange(r, i);
280
+ l.onChange(n, o);
281
281
  }
282
- }, [$, l, O, D, v]), ae = S((e, t) => {
283
- const s = $(e, t), n = M.includes(s), r = n ? M.filter((i) => i !== s) : [...M, s];
284
- te || je(r), y?.onExpand?.(!n, e), y?.onExpandedRowsChange?.(r);
285
- }, [$, M, te, y]), De = S((e, t, s) => {
282
+ }, [S, l, B, D, $]), ne = N((e, t) => {
283
+ const s = S(e, t), r = M.includes(s), n = r ? M.filter((o) => o !== s) : [...M, s];
284
+ se || Oe(n), y?.onExpand?.(!r, e), y?.onExpandedRowsChange?.(n);
285
+ }, [S, M, se, y]), We = N((e, t, s) => {
286
286
  if (e.render)
287
287
  return e.render(
288
288
  e.dataIndex ? t[e.dataIndex] : void 0,
@@ -290,103 +290,103 @@ function He({
290
290
  s
291
291
  );
292
292
  if (e.dataIndex) {
293
- const n = t[e.dataIndex];
294
- return n != null ? String(n) : "";
293
+ const r = t[e.dataIndex];
294
+ return r != null ? String(r) : "";
295
295
  }
296
296
  return "";
297
- }, []), he = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", ue = S((e, t = !1) => {
297
+ }, []), me = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", $e = N((e, t = !1) => {
298
298
  const s = b[e];
299
299
  if (!s?.fixed) return { className: "" };
300
- const n = ["sticky", "bg-base-100"];
301
- let r = 0;
302
- const i = {
300
+ const r = ["sticky", "bg-base-100"];
301
+ let n = 0;
302
+ const o = {
303
303
  boxSizing: "border-box"
304
304
  };
305
305
  if (s.fixed === "left") {
306
306
  for (let c = 0; c < e; c++)
307
307
  if (b[c].fixed === "left" && b[c].width) {
308
- const u = b[c].width, x = typeof u == "number" ? u : parseInt(String(u));
309
- isNaN(x) || (r += x);
308
+ const u = b[c].width, g = typeof u == "number" ? u : parseInt(String(u));
309
+ isNaN(g) || (n += g);
310
310
  }
311
- r === 0 ? n.push("left-0") : i.left = `${r}px`, n.push(t ? "z-30" : "z-20");
312
- let g = -1;
311
+ n === 0 ? r.push("left-0") : o.left = `${n}px`, r.push(t ? "z-30" : "z-20");
312
+ let x = -1;
313
313
  for (let c = b.length - 1; c >= 0; c--)
314
314
  if (b[c].fixed === "left") {
315
- g = c;
315
+ x = c;
316
316
  break;
317
317
  }
318
- e === g && (i.boxShadow = "2px 0 4px rgba(0, 0, 0, 0.1)");
318
+ e === x && (o.boxShadow = "2px 0 4px rgba(0, 0, 0, 0.1)");
319
319
  }
320
320
  if (s.fixed === "right") {
321
321
  for (let c = e + 1; c < b.length; c++)
322
322
  if (b[c].fixed === "right" && b[c].width) {
323
- const u = b[c].width, x = typeof u == "number" ? u : parseInt(String(u));
324
- isNaN(x) || (r += x);
323
+ const u = b[c].width, g = typeof u == "number" ? u : parseInt(String(u));
324
+ isNaN(g) || (n += g);
325
325
  }
326
- r === 0 ? n.push("right-0") : i.right = `${r}px`, n.push(t ? "z-30" : "z-20"), e === b.findIndex((c) => c.fixed === "right") && (i.boxShadow = "-2px 0 4px rgba(0, 0, 0, 0.1)");
326
+ n === 0 ? r.push("right-0") : o.right = `${n}px`, r.push(t ? "z-30" : "z-20"), e === b.findIndex((c) => c.fixed === "right") && (o.boxShadow = "-2px 0 4px rgba(0, 0, 0, 0.1)");
327
327
  }
328
328
  return {
329
- className: n.filter(Boolean).join(" "),
330
- style: Object.keys(i).length > 0 ? i : void 0
329
+ className: r.filter(Boolean).join(" "),
330
+ style: Object.keys(o).length > 0 ? o : void 0
331
331
  };
332
- }, [b]), Le = [
333
- "table",
332
+ }, [b]), Xe = [
333
+ tt,
334
334
  "bg-base-100",
335
- Xe[F],
336
- A && "table-zebra",
337
- G && "table-pin-rows",
338
- U && "table-pin-cols",
339
- ge
340
- ].filter(Boolean).join(" "), Ve = b.some((e) => e.fixed), L = y !== void 0, T = {};
341
- w?.x && (T.overflowX = "auto", T.maxWidth = typeof w.x == "number" ? `${w.x}px` : w.x), w?.y && (T.overflowY = "auto", T.maxHeight = typeof w.y == "number" ? `${w.y}px` : w.y);
342
- const Be = [
343
- (!G || Ve || w?.x) && "overflow-x-auto",
344
- V && "rounded-box border border-base-content/5 bg-base-100"
335
+ Rt[F],
336
+ X && ot,
337
+ J && lt,
338
+ U && dt,
339
+ Se
340
+ ].filter(Boolean).join(" "), Je = b.some((e) => e.fixed), L = y !== void 0, A = {};
341
+ k?.x && (A.overflowX = "auto", A.maxWidth = typeof k.x == "number" ? `${k.x}px` : k.x), k?.y && (A.overflowY = "auto", A.maxHeight = typeof k.y == "number" ? `${k.y}px` : k.y);
342
+ const Ge = [
343
+ (!J || Je || k?.x) && "overflow-x-auto",
344
+ T && "rounded-box border border-base-content/5 bg-base-100"
345
345
  ].filter(Boolean).join(" ");
346
346
  if (H)
347
- return /* @__PURE__ */ a("div", { className: "flex justify-center items-center p-8", "data-testid": `${p}-loading`, children: /* @__PURE__ */ a("span", { className: "loading loading-spinner loading-lg", "aria-label": "Loading" }) });
348
- const pe = P.length > 0 && P.every((e, t) => D.includes($(e, t))), Me = P.some((e, t) => D.includes($(e, t))), Te = Z?.emptyText ?? "No data", be = (l ? 1 : 0) + (L ? 1 : 0), ye = () => {
349
- if (!X || j <= 1 || typeof o == "boolean") return null;
350
- const e = o ?? {}, t = e.position ?? "bottomRight", s = e.showSizeChanger, n = e.showQuickJumper, r = e.showTotal, i = e.pageSizeOptions ?? [10, 20, 50, 100], g = t.includes("Left") ? "justify-start" : t.includes("Center") ? "justify-center" : "justify-end";
351
- return /* @__PURE__ */ m("div", { className: `flex items-center gap-4 ${g}`, "data-testid": `${p}-pagination`, children: [
352
- r && /* @__PURE__ */ a("span", { className: "text-sm text-base-content/70", children: r(R, [se + 1, Math.min(ce, R)]) }),
347
+ return /* @__PURE__ */ a("div", { className: "flex justify-center items-center p-8", "data-testid": `${p}-loading`, children: /* @__PURE__ */ a("span", { className: `${$t} ${vt} ${kt}`, "aria-label": "Loading" }) });
348
+ const ve = I.length > 0 && I.every((e, t) => D.includes(S(e, t))), qe = I.some((e, t) => D.includes(S(e, t))), Qe = ee?.emptyText ?? "No data", ke = (l ? 1 : 0) + (L ? 1 : 0), we = () => {
349
+ if (!Y || P <= 1 || typeof d == "boolean") return null;
350
+ const e = d ?? {}, t = e.position ?? "bottomRight", s = e.showSizeChanger, r = e.showQuickJumper, n = e.showTotal, o = e.pageSizeOptions ?? [10, 20, 50, 100], x = t.includes("Left") ? "justify-start" : t.includes("Center") ? "justify-center" : "justify-end";
351
+ return /* @__PURE__ */ m("div", { className: `flex items-center gap-4 ${x}`, "data-testid": `${p}-pagination`, children: [
352
+ n && /* @__PURE__ */ a("span", { className: "text-sm text-base-content/70", children: n(R, [ae + 1, Math.min(ge, R)]) }),
353
353
  s && /* @__PURE__ */ a(
354
354
  "select",
355
355
  {
356
- className: "select select-sm select-bordered",
357
- value: C,
358
- onChange: (u) => Pe(Number(u.target.value)),
356
+ className: `${Ct} ${St} ${Nt}`,
357
+ value: w,
358
+ onChange: (u) => Te(Number(u.target.value)),
359
359
  "aria-label": "Page size",
360
360
  "data-testid": `${p}-page-size`,
361
- children: i.map((u) => /* @__PURE__ */ m("option", { value: u, children: [
361
+ children: o.map((u) => /* @__PURE__ */ m("option", { value: u, children: [
362
362
  u,
363
363
  " / page"
364
364
  ] }, u))
365
365
  }
366
366
  ),
367
- /* @__PURE__ */ m("div", { className: "join", children: [
367
+ /* @__PURE__ */ m("div", { className: wt, children: [
368
368
  /* @__PURE__ */ a(
369
369
  "button",
370
370
  {
371
371
  type: "button",
372
- className: "join-item btn btn-sm",
373
- onClick: () => _(N - 1),
374
- disabled: N === 1,
372
+ className: `${de} ${O} ${le}`,
373
+ onClick: () => _(C - 1),
374
+ disabled: C === 1,
375
375
  "aria-label": "Previous page",
376
376
  "data-testid": `${p}-prev`,
377
377
  children: "«"
378
378
  }
379
379
  ),
380
- Array.from({ length: Math.min(j, 7) }, (u, x) => {
380
+ Array.from({ length: Math.min(P, 7) }, (u, g) => {
381
381
  let f;
382
- return j <= 7 || N <= 4 ? f = x + 1 : N >= j - 3 ? f = j - 6 + x : f = N - 3 + x, /* @__PURE__ */ a(
382
+ return P <= 7 || C <= 4 ? f = g + 1 : C >= P - 3 ? f = P - 6 + g : f = C - 3 + g, /* @__PURE__ */ a(
383
383
  "button",
384
384
  {
385
385
  type: "button",
386
- className: `join-item btn btn-sm ${N === f ? "btn-active" : ""}`,
386
+ className: `${de} ${O} ${le} ${C === f ? ut : ""}`,
387
387
  onClick: () => _(f),
388
388
  "aria-label": `Page ${f}`,
389
- "aria-current": N === f ? "page" : void 0,
389
+ "aria-current": C === f ? "page" : void 0,
390
390
  "data-testid": `${p}-page-${f}`,
391
391
  children: f
392
392
  },
@@ -397,28 +397,28 @@ function He({
397
397
  "button",
398
398
  {
399
399
  type: "button",
400
- className: "join-item btn btn-sm",
401
- onClick: () => _(N + 1),
402
- disabled: N === j,
400
+ className: `${de} ${O} ${le}`,
401
+ onClick: () => _(C + 1),
402
+ disabled: C === P,
403
403
  "aria-label": "Next page",
404
404
  "data-testid": `${p}-next`,
405
405
  children: "»"
406
406
  }
407
407
  )
408
408
  ] }),
409
- n && /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
409
+ r && /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
410
410
  /* @__PURE__ */ a("span", { className: "text-sm", children: "Go to" }),
411
411
  /* @__PURE__ */ a(
412
412
  "input",
413
413
  {
414
414
  type: "number",
415
- className: "input input-sm input-bordered w-16",
415
+ className: `${Et} ${zt} ${Kt} w-16`,
416
416
  min: 1,
417
- max: j,
417
+ max: P,
418
418
  onKeyDown: (u) => {
419
419
  if (u.key === "Enter") {
420
- const x = parseInt(u.target.value);
421
- x >= 1 && x <= j && _(x);
420
+ const g = parseInt(u.target.value);
421
+ g >= 1 && g <= P && _(g);
422
422
  }
423
423
  },
424
424
  "aria-label": "Go to page",
@@ -427,18 +427,18 @@ function He({
427
427
  )
428
428
  ] })
429
429
  ] });
430
- }, re = o && typeof o != "boolean" ? o.position : void 0, We = X && re?.startsWith("top") ? ye() : null, Ae = X && (!re || re.startsWith("bottom")) ? ye() : null;
431
- return /* @__PURE__ */ m("div", { className: "space-y-4", "data-testid": p, ...we, children: [
432
- We,
433
- /* @__PURE__ */ a("div", { className: Be, style: T, children: /* @__PURE__ */ m(
430
+ }, re = d && typeof d != "boolean" ? d.position : void 0, Ye = Y && re?.startsWith("top") ? we() : null, Ze = Y && (!re || re.startsWith("bottom")) ? we() : null;
431
+ return /* @__PURE__ */ m("div", { className: "space-y-4", "data-testid": p, ...Ke, children: [
432
+ Ye,
433
+ /* @__PURE__ */ a("div", { className: Ge, style: A, children: /* @__PURE__ */ m(
434
434
  "table",
435
435
  {
436
- ref: Ce,
437
- className: Le,
436
+ ref: Re,
437
+ className: Xe,
438
438
  style: { borderCollapse: "separate", borderSpacing: 0, tableLayout: "fixed" },
439
439
  role: "grid",
440
- "aria-label": ke,
441
- "aria-rowcount": v.length,
440
+ "aria-label": ze,
441
+ "aria-rowcount": $.length,
442
442
  "data-testid": `${p}-table`,
443
443
  children: [
444
444
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ m("tr", { role: "row", children: [
@@ -453,39 +453,39 @@ function He({
453
453
  "input",
454
454
  {
455
455
  type: "checkbox",
456
- className: "checkbox checkbox-sm checkbox-primary",
457
- checked: pe,
456
+ className: `${fe} checkbox-sm ${he}`,
457
+ checked: ve,
458
458
  ref: (e) => {
459
- e && (e.indeterminate = Me && !pe);
459
+ e && (e.indeterminate = qe && !ve);
460
460
  },
461
- onChange: (e) => Fe(e.target.checked),
462
- "aria-label": Z?.selectAll ?? "Select all rows",
461
+ onChange: (e) => Me(e.target.checked),
462
+ "aria-label": ee?.selectAll ?? "Select all rows",
463
463
  "data-testid": `${p}-select-all`
464
464
  }
465
465
  )
466
466
  }
467
467
  ),
468
468
  b.map((e, t) => {
469
- const s = ue(t, !0), r = h.columnKey === e.key ? h.order : null;
469
+ const s = $e(t, !0), n = h.columnKey === e.key ? h.order : null;
470
470
  return /* @__PURE__ */ a(
471
471
  "th",
472
472
  {
473
- className: `${he(e.align)} ${s.className}`,
473
+ className: `${me(e.align)} ${s.className}`,
474
474
  style: {
475
475
  ...e.width ? { width: e.width } : {},
476
476
  ...s.style
477
477
  },
478
478
  role: "columnheader",
479
- "aria-sort": r === "ascend" ? "ascending" : r === "descend" ? "descending" : void 0,
479
+ "aria-sort": n === "ascend" ? "ascending" : n === "descend" ? "descending" : void 0,
480
480
  "data-testid": `${p}-header-${e.key}`,
481
481
  children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
482
482
  /* @__PURE__ */ a(
483
483
  "span",
484
484
  {
485
485
  className: e.sorter ? "cursor-pointer select-none hover:text-primary" : "",
486
- onClick: () => e.sorter && fe(e.key),
487
- onKeyDown: (i) => {
488
- e.sorter && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), fe(e.key));
486
+ onClick: () => e.sorter && xe(e.key),
487
+ onKeyDown: (o) => {
488
+ e.sorter && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), xe(e.key));
489
489
  },
490
490
  tabIndex: e.sorter ? 0 : void 0,
491
491
  role: e.sorter ? "button" : void 0,
@@ -497,7 +497,7 @@ function He({
497
497
  /* @__PURE__ */ a(
498
498
  "svg",
499
499
  {
500
- className: `w-3 h-3 ${r === "ascend" ? "text-primary" : "text-base-content/30"}`,
500
+ className: `w-3 h-3 ${n === "ascend" ? "text-primary" : "text-base-content/30"}`,
501
501
  fill: "currentColor",
502
502
  viewBox: "0 0 20 20",
503
503
  children: /* @__PURE__ */ a("path", { d: "M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z" })
@@ -506,7 +506,7 @@ function He({
506
506
  /* @__PURE__ */ a(
507
507
  "svg",
508
508
  {
509
- className: `w-3 h-3 -mt-1 ${r === "descend" ? "text-primary" : "text-base-content/30"}`,
509
+ className: `w-3 h-3 -mt-1 ${n === "descend" ? "text-primary" : "text-base-content/30"}`,
510
510
  fill: "currentColor",
511
511
  viewBox: "0 0 20 20",
512
512
  children: /* @__PURE__ */ a("path", { d: "M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z" })
@@ -514,12 +514,12 @@ function He({
514
514
  )
515
515
  ] }),
516
516
  e.filters && /* @__PURE__ */ a(
517
- Ye,
517
+ Pt,
518
518
  {
519
519
  filters: e.filters,
520
- selectedValues: E[e.key] || [],
521
- onChange: (i) => Ie(e.key, i),
522
- locale: Z,
520
+ selectedValues: K[e.key] || [],
521
+ onChange: (o) => Ve(e.key, o),
522
+ locale: ee,
523
523
  testId: `${p}-${e.key}`
524
524
  }
525
525
  )
@@ -529,43 +529,43 @@ function He({
529
529
  );
530
530
  })
531
531
  ] }) }),
532
- /* @__PURE__ */ a("tbody", { children: P.length === 0 ? /* @__PURE__ */ a("tr", { role: "row", children: /* @__PURE__ */ a(
532
+ /* @__PURE__ */ a("tbody", { children: I.length === 0 ? /* @__PURE__ */ a("tr", { role: "row", children: /* @__PURE__ */ a(
533
533
  "td",
534
534
  {
535
- colSpan: b.length + be,
535
+ colSpan: b.length + ke,
536
536
  className: "text-center py-8 text-base-content/50",
537
537
  role: "gridcell",
538
538
  "data-testid": `${p}-empty`,
539
- children: Te
539
+ children: Qe
540
540
  }
541
- ) }) : P.map((e, t) => {
542
- const s = me?.(e, t) || {}, n = $(e, t), r = D.includes(n), i = M.includes(n), g = y?.rowExpandable ? y.rowExpandable(e) : !0, c = [
543
- B && "hover:bg-base-200",
544
- r && "bg-primary/10"
545
- ].filter(Boolean).join(" "), u = l?.getCheckboxProps?.(e) || {}, x = (f) => {
546
- s.onClick?.(f), y?.expandRowByClick && g && ae(e, t);
541
+ ) }) : I.map((e, t) => {
542
+ const s = Ne?.(e, t) || {}, r = S(e, t), n = D.includes(r), o = M.includes(r), x = y?.rowExpandable ? y.rowExpandable(e) : !0, c = [
543
+ V && "hover:bg-base-200",
544
+ n && "bg-primary/10"
545
+ ].filter(Boolean).join(" "), u = l?.getCheckboxProps?.(e) || {}, g = (f) => {
546
+ s.onClick?.(f), y?.expandRowByClick && x && ne(e, t);
547
547
  };
548
- return /* @__PURE__ */ m(Je.Fragment, { children: [
548
+ return /* @__PURE__ */ m(He.Fragment, { children: [
549
549
  /* @__PURE__ */ m(
550
550
  "tr",
551
551
  {
552
552
  className: c,
553
553
  role: "row",
554
- "aria-selected": r,
554
+ "aria-selected": n,
555
555
  "data-testid": `${p}-row-${t}`,
556
- "data-state": r ? "selected" : void 0,
556
+ "data-state": n ? "selected" : void 0,
557
557
  ...s,
558
- onClick: x,
558
+ onClick: g,
559
559
  children: [
560
- L && /* @__PURE__ */ a("td", { className: "sticky left-0 z-10 bg-base-100", role: "gridcell", children: g && (y.expandIcon ? y.expandIcon({
561
- expanded: i,
562
- onExpand: () => ae(e, t),
560
+ L && /* @__PURE__ */ a("td", { className: "sticky left-0 z-10 bg-base-100", role: "gridcell", children: x && (y.expandIcon ? y.expandIcon({
561
+ expanded: o,
562
+ onExpand: () => ne(e, t),
563
563
  record: e
564
564
  }) : /* @__PURE__ */ a(
565
- _e,
565
+ It,
566
566
  {
567
- expanded: i,
568
- onExpand: () => ae(e, t)
567
+ expanded: o,
568
+ onExpand: () => ne(e, t)
569
569
  }
570
570
  )) }),
571
571
  l && /* @__PURE__ */ a(
@@ -577,9 +577,9 @@ function He({
577
577
  "input",
578
578
  {
579
579
  type: l.type === "radio" ? "radio" : "checkbox",
580
- className: l.type === "radio" ? "radio radio-sm radio-primary" : "checkbox checkbox-sm checkbox-primary",
581
- checked: r,
582
- onChange: (f) => Oe(e, t, f.target.checked),
580
+ className: l.type === "radio" ? `${yt} ${gt} ${xt}` : `${fe} checkbox-sm ${he}`,
581
+ checked: n,
582
+ onChange: (f) => Ae(e, t, f.target.checked),
583
583
  "aria-label": `Select row ${t + 1}`,
584
584
  "data-testid": `${p}-row-${t}-select`,
585
585
  ...u
@@ -587,17 +587,17 @@ function He({
587
587
  )
588
588
  }
589
589
  ),
590
- b.map((f, Ge) => {
591
- const xe = ue(Ge, !1), ne = De(f, e, t);
590
+ b.map((f, _e) => {
591
+ const Ce = $e(_e, !1), oe = We(f, e, t);
592
592
  return /* @__PURE__ */ a(
593
593
  "td",
594
594
  {
595
- className: `${he(f.align)} ${xe.className} ${f.ellipsis ? "truncate max-w-0" : ""}`,
596
- style: xe.style,
595
+ className: `${me(f.align)} ${Ce.className} ${f.ellipsis ? "truncate max-w-0" : ""}`,
596
+ style: Ce.style,
597
597
  role: "gridcell",
598
- title: f.ellipsis && typeof ne == "string" ? ne : void 0,
598
+ title: f.ellipsis && typeof oe == "string" ? oe : void 0,
599
599
  "data-testid": `${p}-row-${t}-${f.key}`,
600
- children: ne
600
+ children: oe
601
601
  },
602
602
  f.key
603
603
  );
@@ -605,7 +605,7 @@ function He({
605
605
  ]
606
606
  }
607
607
  ),
608
- L && i && /* @__PURE__ */ a(
608
+ L && o && /* @__PURE__ */ a(
609
609
  "tr",
610
610
  {
611
611
  className: "bg-base-200/50",
@@ -614,24 +614,24 @@ function He({
614
614
  children: /* @__PURE__ */ a(
615
615
  "td",
616
616
  {
617
- colSpan: b.length + be,
617
+ colSpan: b.length + ke,
618
618
  className: "p-4",
619
619
  role: "gridcell",
620
- children: y.expandedRowRender(e, t, i)
620
+ children: y.expandedRowRender(e, t, o)
621
621
  }
622
622
  )
623
623
  }
624
624
  )
625
- ] }, n);
625
+ ] }, r);
626
626
  }) })
627
627
  ]
628
628
  }
629
629
  ) }),
630
- Ae
630
+ Ze
631
631
  ] });
632
632
  }
633
- const et = Qe(He);
633
+ const Dt = Ue(jt);
634
634
  export {
635
- et as Table
635
+ Dt as Table
636
636
  };
637
637
  //# sourceMappingURL=Table.js.map