@bfrs/agentic-components 0.9.0 → 0.9.1

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 (74) hide show
  1. package/BFRS_AGENTIC_COMPONENTS.md +4 -4
  2. package/README.md +26 -3
  3. package/dist/components/data-display/DataTable/DataTable.js +340 -321
  4. package/dist/components/data-display/DataTable/DataTable.js.map +1 -1
  5. package/dist/components/data-display/DataTable/TableColumnVisibility.js +7 -2
  6. package/dist/components/data-display/DataTable/TableColumnVisibility.js.map +1 -1
  7. package/dist/components/data-display/DataTable/TablePagination.js +35 -34
  8. package/dist/components/data-display/DataTable/TablePagination.js.map +1 -1
  9. package/dist/components/data-display/DataTable/TableSaveView.js +7 -5
  10. package/dist/components/data-display/DataTable/TableSaveView.js.map +1 -1
  11. package/dist/components/data-display/DataTable/TableViewSelector.js +80 -71
  12. package/dist/components/data-display/DataTable/TableViewSelector.js.map +1 -1
  13. package/dist/components/data-display/Table/Table.js +23 -16
  14. package/dist/components/data-display/Table/Table.js.map +1 -1
  15. package/dist/components/filters/DateRangePicker/DateRangePicker.js +254 -243
  16. package/dist/components/filters/DateRangePicker/DateRangePicker.js.map +1 -1
  17. package/dist/components/filters/FilterBar/FilterBar.js +18 -17
  18. package/dist/components/filters/FilterBar/FilterBar.js.map +1 -1
  19. package/dist/components/layout/ListPageLayout/ListPageLayout.js +28 -26
  20. package/dist/components/layout/ListPageLayout/ListPageLayout.js.map +1 -1
  21. package/dist/components/layout/PageHeader/PageHeader.js +6 -4
  22. package/dist/components/layout/PageHeader/PageHeader.js.map +1 -1
  23. package/dist/components/navigation/ActionMenu/ActionMenu.js +13 -6
  24. package/dist/components/navigation/ActionMenu/ActionMenu.js.map +1 -1
  25. package/dist/components/navigation/Tabs/Tabs.js +20 -19
  26. package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
  27. package/dist/components/primitives/Button/Button.js +70 -57
  28. package/dist/components/primitives/Button/Button.js.map +1 -1
  29. package/dist/components/primitives/Chip/Chip.js +3 -1
  30. package/dist/components/primitives/Chip/Chip.js.map +1 -1
  31. package/dist/components/ui/feedback/warningVisual.d.ts +4 -4
  32. package/dist/components/ui/feedback/warningVisual.js +20 -20
  33. package/dist/components/ui/feedback/warningVisual.js.map +1 -1
  34. package/dist/components/ui/forms/Checkbox/Checkbox.js +9 -6
  35. package/dist/components/ui/forms/Checkbox/Checkbox.js.map +1 -1
  36. package/dist/components/ui/forms/MultiSelect/MultiSelect.js +15 -4
  37. package/dist/components/ui/forms/MultiSelect/MultiSelect.js.map +1 -1
  38. package/dist/components/ui/forms/SearchableSelect/SearchableSelect.js +38 -28
  39. package/dist/components/ui/forms/SearchableSelect/SearchableSelect.js.map +1 -1
  40. package/dist/components/ui/forms/Select/Select.js +89 -80
  41. package/dist/components/ui/forms/Select/Select.js.map +1 -1
  42. package/dist/components/ui/forms/SuggestInput/SuggestInput.js +22 -10
  43. package/dist/components/ui/forms/SuggestInput/SuggestInput.js.map +1 -1
  44. package/dist/components/ui/forms/TagInput/TagInput.js +15 -10
  45. package/dist/components/ui/forms/TagInput/TagInput.js.map +1 -1
  46. package/dist/components/ui/index.d.ts +1 -1
  47. package/dist/components/ui/overlays/Dropdown/Dropdown.js +31 -19
  48. package/dist/components/ui/overlays/Dropdown/Dropdown.js.map +1 -1
  49. package/dist/components/ui/overlays/Tooltip/Tooltip.js +21 -21
  50. package/dist/components/ui/overlays/Tooltip/Tooltip.js.map +1 -1
  51. package/dist/components/ui/patterns/ChatComposer/ChatComposer.js +14 -12
  52. package/dist/components/ui/patterns/ChatComposer/ChatComposer.js.map +1 -1
  53. package/dist/components/ui/patterns/CommandMenu/CommandMenu.js +28 -18
  54. package/dist/components/ui/patterns/CommandMenu/CommandMenu.js.map +1 -1
  55. package/dist/components/ui/providers/BfrsProvider/BfrsProvider.d.ts +10 -0
  56. package/dist/components/ui/providers/BfrsProvider/BfrsProvider.js +63 -42
  57. package/dist/components/ui/providers/BfrsProvider/BfrsProvider.js.map +1 -1
  58. package/dist/custom-elements.d.ts +1 -0
  59. package/dist/custom-elements.js +7537 -7250
  60. package/dist/custom-elements.js.map +1 -1
  61. package/dist/index.js +283 -281
  62. package/dist/style.css +1 -1
  63. package/dist/styles/globals.css2.js +1 -1
  64. package/dist/theme/overrides.d.ts +202 -4
  65. package/dist/theme/overrides.js +213 -97
  66. package/dist/theme/overrides.js.map +1 -1
  67. package/dist/theme.js +21 -20
  68. package/dist/tokens/colors.d.ts +13 -0
  69. package/dist/tokens/colors.js +13 -0
  70. package/dist/tokens/colors.js.map +1 -1
  71. package/dist/tokens/shadows.d.ts +1 -0
  72. package/dist/tokens/shadows.js +4 -3
  73. package/dist/tokens/shadows.js.map +1 -1
  74. package/package.json +1 -1
@@ -1,63 +1,79 @@
1
1
  import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
- import { ArrowsDownUp as Le } from "../../../node_modules/@phosphor-icons/react/dist/csr/ArrowsDownUp.es.js";
2
+ import { ArrowsDownUp as He } from "../../../node_modules/@phosphor-icons/react/dist/csr/ArrowsDownUp.es.js";
3
3
  import { CaretDown as Ne } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretDown.es.js";
4
- import { CaretUp as He } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretUp.es.js";
5
- import { useRef as Ee, useState as D, useMemo as M, useEffect as It, useCallback as Ue, useLayoutEffect as Ve } from "react";
6
- import l from "@emotion/styled";
7
- import { clsx as je } from "../../../node_modules/clsx/dist/clsx.js";
8
- import { twRing as te } from "../../../lib/emotionTw.js";
9
- import { TableEmptyStateContent as $e } from "./TableEmptyState.js";
10
- import { TableErrorState as Ke } from "./TableErrorState.js";
11
- import { TablePagination as Ye } from "./TablePagination.js";
12
- import { TableSkeleton as qe } from "./TableSkeleton.js";
13
- const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146, Je = 3, Qe = {
4
+ import { CaretUp as Ee } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretUp.es.js";
5
+ import { useRef as Ue, useState as D, useMemo as M, useEffect as Mt, useCallback as $e, useLayoutEffect as je } from "react";
6
+ import c from "@emotion/styled";
7
+ import { clsx as Ve } from "../../../node_modules/clsx/dist/clsx.js";
8
+ import { twRing as ee } from "../../../lib/emotionTw.js";
9
+ import { TableEmptyStateContent as Ke } from "./TableEmptyState.js";
10
+ import { TableErrorState as Ye } from "./TableErrorState.js";
11
+ import { TablePagination as qe } from "./TablePagination.js";
12
+ import { TableSkeleton as Ge } from "./TableSkeleton.js";
13
+ const Qt = typeof window > "u" ? Mt : je, Rt = 144, Wt = 220, B = 44, Je = 146, Qe = 3, Re = {
14
14
  height: "38px",
15
15
  paddingLeft: "1.25rem",
16
16
  paddingRight: "1.25rem",
17
17
  paddingTop: "7px",
18
18
  paddingBottom: "7px"
19
- }, Re = {
19
+ }, Xe = {
20
20
  height: "4rem",
21
21
  paddingLeft: "1.25rem",
22
22
  paddingRight: "1.25rem",
23
23
  paddingTop: "1rem",
24
24
  paddingBottom: "1rem"
25
- }, Wt = {
25
+ }, At = {
26
26
  fontSize: "12px",
27
27
  fontWeight: 700,
28
28
  letterSpacing: ".24px",
29
29
  "--tw-text-opacity": "1",
30
30
  // `states.tableHeaderText` when set, otherwise the original text-primary.
31
31
  color: "hsl(var(--bfrs-color-table-header-text, var(--bfrs-color-text-primary)) / var(--tw-text-opacity, 1))"
32
- }, ee = {
32
+ }, re = {
33
33
  "--tw-shadow": "3px 0 8px rgba(0,0,0,.05)",
34
34
  "--tw-shadow-colored": "3px 0 8px var(--tw-shadow-color)",
35
35
  boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)"
36
- }, Xe = {
36
+ }, Ze = {
37
37
  "--tw-shadow": "0px 2px 6px rgba(0,0,0,.08)",
38
38
  "--tw-shadow-colored": "0px 2px 6px var(--tw-shadow-color)",
39
39
  boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)"
40
- }, Ze = {
40
+ }, _e = {
41
41
  "--tw-shadow": "-3px 0 4px rgba(0,0,0,.04)",
42
42
  "--tw-shadow-colored": "-3px 0 4px var(--tw-shadow-color)",
43
43
  boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)"
44
- }, re = {
44
+ }, oe = {
45
45
  "--tw-bg-opacity": "1",
46
46
  backgroundColor: "hsl(var(--bfrs-color-table-header) / var(--tw-bg-opacity, 1))"
47
- }, Rt = {
47
+ }, Xt = {
48
48
  "--tw-bg-opacity": "1",
49
49
  backgroundColor: "hsl(var(--bfrs-color-row-hover) / var(--tw-bg-opacity, 1))"
50
- }, C = {
50
+ }, tt = {
51
51
  "--tw-bg-opacity": "1",
52
52
  backgroundColor: "hsl(var(--bfrs-color-row-selected) / var(--tw-bg-opacity, 1))"
53
- }, _e = /* @__PURE__ */ l("div", {
53
+ }, Oe = {
54
+ position: "var(--bfrs-row-hover-position, static)",
55
+ zIndex: 15,
56
+ boxShadow: "var(--bfrs-shadow-row-hover, 0 0 #0000)"
57
+ }, Z = "hsl(var(--bfrs-color-row-selected-border, 0 0% 0% / 0))", Ce = "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)", tr = (t) => ({
58
+ "--bfrs-row-border-left": "0 0 #0000",
59
+ "--bfrs-row-border-right": "0 0 #0000",
60
+ "&:first-of-type": { "--bfrs-row-border-left": `inset 1px 0 0 ${Z}` },
61
+ "&:last-of-type": { "--bfrs-row-border-right": `inset -1px 0 0 ${Z}` },
62
+ boxShadow: [
63
+ `inset 0 1px 0 ${Z}`,
64
+ `inset 0 -1px 0 ${Z}`,
65
+ "var(--bfrs-row-border-left)",
66
+ "var(--bfrs-row-border-right)",
67
+ t
68
+ ].filter(Boolean).join(",")
69
+ }), er = /* @__PURE__ */ c("div", {
54
70
  label: "AgenticDataTable-root",
55
- shouldForwardProp: (e) => e !== "ownerState"
56
- })(({ ownerState: e }) => ({
71
+ shouldForwardProp: (t) => t !== "ownerState"
72
+ })(({ ownerState: t }) => ({
57
73
  display: "flex",
58
74
  minWidth: "0px",
59
75
  minHeight: "0px",
60
- flex: e.fill ? "1 1 auto" : "var(--bfrs-data-table-flex, 0 1 auto)",
76
+ flex: t.fill ? "1 1 auto" : "var(--bfrs-data-table-flex, 0 1 auto)",
61
77
  flexDirection: "column",
62
78
  overflow: "hidden",
63
79
  borderRadius: "var(--bfrs-radius-md)",
@@ -66,13 +82,13 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
66
82
  borderColor: "hsl(var(--bfrs-color-border-strong) / var(--tw-border-opacity, 1))",
67
83
  "--tw-bg-opacity": "1",
68
84
  backgroundColor: "hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))"
69
- })), Oe = /* @__PURE__ */ l("div", {
85
+ })), rr = /* @__PURE__ */ c("div", {
70
86
  label: "AgenticDataTable-scroller"
71
87
  })({
72
88
  minHeight: "0px",
73
89
  flex: "1 1 auto",
74
90
  overflow: "auto"
75
- }), Ce = /* @__PURE__ */ l("div", {
91
+ }), or = /* @__PURE__ */ c("div", {
76
92
  label: "AgenticDataTable-stateViewport"
77
93
  })({
78
94
  position: "sticky",
@@ -80,7 +96,7 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
80
96
  width: "100%",
81
97
  minWidth: "0px",
82
98
  boxSizing: "border-box"
83
- }), tr = /* @__PURE__ */ l("table", {
99
+ }), ar = /* @__PURE__ */ c("table", {
84
100
  label: "AgenticDataTable-table"
85
101
  })({
86
102
  width: "100%",
@@ -89,83 +105,83 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
89
105
  "--tw-border-spacing-y": "0px",
90
106
  borderSpacing: "var(--tw-border-spacing-x) var(--tw-border-spacing-y)",
91
107
  textAlign: "left"
92
- }), er = /* @__PURE__ */ l("thead", {
108
+ }), ir = /* @__PURE__ */ c("thead", {
93
109
  label: "AgenticDataTable-head",
94
- shouldForwardProp: (e) => e !== "ownerState"
95
- })(({ ownerState: e }) => [
96
- e.sticky && {
110
+ shouldForwardProp: (t) => t !== "ownerState"
111
+ })(({ ownerState: t }) => [
112
+ t.sticky && {
97
113
  position: "sticky",
98
114
  top: 0,
99
115
  zIndex: 30
100
116
  }
101
- ]), rr = /* @__PURE__ */ l("tr", {
117
+ ]), sr = /* @__PURE__ */ c("tr", {
102
118
  label: "AgenticDataTable-headerRow"
103
- })(re), or = {
119
+ })(oe), nr = {
104
120
  // Positioning context so the pin button can float without reserving header width.
105
121
  position: "relative",
106
122
  borderBottomWidth: "1px",
107
123
  "--tw-border-opacity": "1",
108
124
  borderColor: "hsl(var(--bfrs-color-border-strong) / var(--tw-border-opacity, 1))",
109
- ...re
110
- }, Z = /* @__PURE__ */ l("th", {
125
+ ...oe
126
+ }, _ = /* @__PURE__ */ c("th", {
111
127
  label: "AgenticDataTable-headerCell",
112
- shouldForwardProp: (e) => e !== "ownerState"
113
- })(({ ownerState: e }) => [
114
- or,
115
- e.kind === "selection" && {
128
+ shouldForwardProp: (t) => t !== "ownerState"
129
+ })(({ ownerState: t }) => [
130
+ nr,
131
+ t.kind === "selection" && {
116
132
  textAlign: "center",
117
133
  "--tw-text-opacity": "1",
118
134
  color: "hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))"
119
135
  },
120
- e.kind === "leading" && {
136
+ t.kind === "leading" && {
121
137
  verticalAlign: "middle",
122
- ...Wt,
138
+ ...At,
123
139
  "&:hover button[title]": { opacity: 1 }
124
140
  },
125
- e.kind === "data" && {
141
+ t.kind === "data" && {
126
142
  borderLeftWidth: "2px",
127
143
  borderLeftColor: "transparent",
128
- ...Wt,
144
+ ...At,
129
145
  "&:hover button[title]": { opacity: 1 }
130
146
  },
131
- e.kind === "actions" && Wt,
132
- Qe,
133
- e.sortable && {
147
+ t.kind === "actions" && At,
148
+ Re,
149
+ t.sortable && {
134
150
  "&:hover": {
135
151
  "--tw-text-opacity": "1",
136
152
  color: "hsl(var(--bfrs-color-primary) / var(--tw-text-opacity, 1))"
137
153
  }
138
154
  },
139
- e.sorted && {
155
+ t.sorted && {
140
156
  "--tw-text-opacity": "1",
141
157
  color: "hsl(var(--bfrs-color-primary) / var(--tw-text-opacity, 1))"
142
158
  },
143
- e.reorderable && {
159
+ t.reorderable && {
144
160
  cursor: "grab",
145
161
  WebkitUserSelect: "none",
146
162
  MozUserSelect: "none",
147
163
  userSelect: "none",
148
164
  "&:active": { cursor: "grabbing" }
149
165
  },
150
- e.dropTarget && {
166
+ t.dropTarget && {
151
167
  "--tw-border-opacity": "1",
152
168
  borderLeftColor: "hsl(var(--bfrs-color-primary) / var(--tw-border-opacity, 1))"
153
169
  },
154
- e.edgeShadow && ee,
155
- e.actionsShadow && Xe
156
- ]), Xt = /* @__PURE__ */ l("span", {
170
+ t.edgeShadow && re,
171
+ t.actionsShadow && Ze
172
+ ]), Zt = /* @__PURE__ */ c("span", {
157
173
  label: "AgenticDataTable-headerContent",
158
- shouldForwardProp: (e) => e !== "ownerState"
159
- })(({ ownerState: e }) => [
174
+ shouldForwardProp: (t) => t !== "ownerState"
175
+ })(({ ownerState: t }) => [
160
176
  {
161
177
  display: "inline-flex",
162
178
  maxWidth: "100%",
163
179
  alignItems: "center",
164
- gap: e.wide ? ".5rem" : ".375rem"
180
+ gap: t.wide ? ".5rem" : ".375rem"
165
181
  },
166
- e.align === "right" && { justifyContent: "flex-end" },
167
- e.align === "center" && { justifyContent: "center" }
168
- ]), ar = /* @__PURE__ */ l("button", {
182
+ t.align === "right" && { justifyContent: "flex-end" },
183
+ t.align === "center" && { justifyContent: "center" }
184
+ ]), lr = /* @__PURE__ */ c("button", {
169
185
  label: "AgenticDataTable-sortButton"
170
186
  })({
171
187
  display: "inline-flex",
@@ -176,26 +192,26 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
176
192
  outline: "2px solid transparent",
177
193
  outlineOffset: "2px",
178
194
  "&:focus-visible": {
179
- ...te("2px", "hsl(var(--bfrs-color-border-focus) / var(--tw-ring-opacity, 1))"),
195
+ ...ee("2px", "hsl(var(--bfrs-color-border-focus) / var(--tw-ring-opacity, 1))"),
180
196
  "--tw-ring-opacity": "1"
181
197
  }
182
- }), At = /* @__PURE__ */ l("span", {
198
+ }), Bt = /* @__PURE__ */ c("span", {
183
199
  label: "AgenticDataTable-truncate",
184
- shouldForwardProp: (e) => e !== "ownerState"
185
- })(({ ownerState: e }) => ({
200
+ shouldForwardProp: (t) => t !== "ownerState"
201
+ })(({ ownerState: t }) => ({
186
202
  minWidth: "0px",
187
- overflow: e.overflow === "visible" ? "visible" : "hidden",
188
- textOverflow: e.overflow === "visible" ? "clip" : "ellipsis",
203
+ overflow: t.overflow === "visible" ? "visible" : "hidden",
204
+ textOverflow: t.overflow === "visible" ? "clip" : "ellipsis",
189
205
  whiteSpace: "nowrap"
190
- })), ir = /* @__PURE__ */ l(Le, {
206
+ })), cr = /* @__PURE__ */ c(He, {
191
207
  label: "AgenticDataTable-sortIdleIcon"
192
208
  })({
193
209
  "--tw-text-opacity": "1",
194
210
  color: "hsl(var(--bfrs-color-text-disabled) / var(--tw-text-opacity, 1))"
195
- }), Zt = /* @__PURE__ */ l("button", {
211
+ }), _t = /* @__PURE__ */ c("button", {
196
212
  label: "AgenticDataTable-pinButton",
197
- shouldForwardProp: (e) => e !== "ownerState"
198
- })(({ ownerState: e }) => [
213
+ shouldForwardProp: (t) => t !== "ownerState"
214
+ })(({ ownerState: t }) => [
199
215
  {
200
216
  // Floated (not a flex item) so the header label keeps its full width; the pin
201
217
  // overlays the cell edge on hover instead of shortening the text box and
@@ -225,13 +241,13 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
225
241
  opacity: 1,
226
242
  outline: "2px solid transparent",
227
243
  outlineOffset: "2px",
228
- ...te("2px", "hsl(var(--bfrs-color-border-focus) / var(--tw-ring-opacity, 1))"),
244
+ ...ee("2px", "hsl(var(--bfrs-color-border-focus) / var(--tw-ring-opacity, 1))"),
229
245
  "--tw-ring-opacity": "1"
230
246
  }
231
247
  },
232
248
  // Anchor to the far edge of the header cell (opposite the text flush side).
233
- e.side === "right" ? { right: "1.25rem" } : { left: "1.25rem" },
234
- e.pinned ? {
249
+ t.side === "right" ? { right: "1.25rem" } : { left: "1.25rem" },
250
+ t.pinned ? {
235
251
  "--tw-bg-opacity": "1",
236
252
  backgroundColor: "hsl(var(--bfrs-color-success-soft) / var(--tw-bg-opacity, 1))",
237
253
  "--tw-text-opacity": "1",
@@ -246,27 +262,28 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
246
262
  color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
247
263
  }
248
264
  }
249
- ]), nr = /* @__PURE__ */ l("tr", {
265
+ ]), dr = /* @__PURE__ */ c("tr", {
250
266
  label: "AgenticDataTable-row",
251
- shouldForwardProp: (e) => e !== "ownerState"
252
- })(({ ownerState: e }) => [
267
+ shouldForwardProp: (t) => t !== "ownerState"
268
+ })(({ ownerState: t }) => [
253
269
  {
254
270
  "--tw-bg-opacity": "1",
255
271
  backgroundColor: "hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))",
256
272
  transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
257
273
  transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
258
274
  transitionDuration: ".15s",
259
- "&:hover": Rt,
260
- "&:hover > td": Rt
275
+ "&:hover": { ...Xt, ...Oe },
276
+ "&:hover > td": Xt
261
277
  },
262
278
  // Selection wins over hover (as in Select), so a distinct rowSelectedBg
263
- // stays visible while the pointer is over a selected row.
264
- e.selected && { ...C, "&:hover": C, "&:hover > td": C },
265
- e.clickable && { cursor: "pointer" }
266
- ]), _ = /* @__PURE__ */ l("td", {
279
+ // stays visible while the pointer is over a selected row. Only the
280
+ // background is overridden, so a selected row keeps the hover shadow.
281
+ t.selected && { ...tt, "&:hover": tt, "&:hover > td": tt },
282
+ t.clickable && { cursor: "pointer" }
283
+ ]), O = /* @__PURE__ */ c("td", {
267
284
  label: "AgenticDataTable-cell",
268
- shouldForwardProp: (e) => e !== "ownerState"
269
- })(({ ownerState: e }) => [
285
+ shouldForwardProp: (t) => t !== "ownerState"
286
+ })(({ ownerState: t }) => [
270
287
  {
271
288
  borderBottomWidth: "1px",
272
289
  "--tw-border-opacity": "1",
@@ -277,7 +294,7 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
277
294
  // data cells top-align — see the `data` branch below.
278
295
  verticalAlign: "middle"
279
296
  },
280
- e.kind === "data" && {
297
+ t.kind === "data" && {
281
298
  // Content starts at the first line rather than floating in the middle, so a
282
299
  // row made tall by one wrapping cell keeps every other cell readable across
283
300
  // the row instead of scattering values at different heights.
@@ -285,18 +302,20 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
285
302
  "--tw-text-opacity": "1",
286
303
  color: "hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))"
287
304
  },
288
- Re,
289
- e.selected && C,
290
- e.kind === "data" && { fontSize: "12px" },
291
- e.cellTextSize === "compact" && {
305
+ Xe,
306
+ t.selected && tt,
307
+ t.kind === "data" && { fontSize: "12px" },
308
+ t.cellTextSize === "compact" && {
292
309
  fontSize: "12px",
293
310
  "& *": {
294
311
  fontSize: "inherit"
295
312
  }
296
313
  },
297
- e.edgeShadow && ee,
298
- e.actionsShadow && Ze
299
- ]), O = /* @__PURE__ */ l("input", {
314
+ t.edgeShadow && re,
315
+ t.actionsShadow && _e,
316
+ // Last, so its box-shadow wins; it re-adds the edge shadow set just above.
317
+ t.selected && tr(t.edgeShadow || t.actionsShadow ? Ce : void 0)
318
+ ]), C = /* @__PURE__ */ c("input", {
300
319
  label: "AgenticDataTable-checkbox"
301
320
  })({
302
321
  width: ".75rem",
@@ -304,61 +323,61 @@ const Jt = typeof window > "u" ? It : Ve, Qt = 144, Tt = 220, B = 44, Ge = 146,
304
323
  flexShrink: 0,
305
324
  cursor: "pointer",
306
325
  accentColor: "hsl(var(--bfrs-color-primary) / 1)"
307
- }), _t = /* @__PURE__ */ l("div", {
326
+ }), Ot = /* @__PURE__ */ c("div", {
308
327
  label: "AgenticDataTable-checkboxCenter"
309
328
  })({
310
329
  display: "flex",
311
330
  alignItems: "center",
312
331
  justifyContent: "center"
313
- }), sr = /* @__PURE__ */ l("div", {
332
+ }), pr = /* @__PURE__ */ c("div", {
314
333
  label: "AgenticDataTable-leadingLayout"
315
334
  })({
316
335
  display: "flex",
317
336
  alignItems: "center",
318
337
  gap: ".75rem"
319
- }), cr = /* @__PURE__ */ l("div", {
338
+ }), hr = /* @__PURE__ */ c("div", {
320
339
  label: "AgenticDataTable-leadingContent"
321
340
  })({
322
341
  minWidth: "0px",
323
342
  flex: "1 1 0%"
324
343
  });
325
- function oe(e, o) {
326
- if (o.accessorFn) return o.accessorFn(e);
327
- if (o.accessorKey) return e[o.accessorKey];
344
+ function ae(t, o) {
345
+ if (o.accessorFn) return o.accessorFn(t);
346
+ if (o.accessorKey) return t[o.accessorKey];
328
347
  }
329
- function Ot(e, o) {
330
- return o.sortValue ? o.sortValue(e) : oe(e, o);
348
+ function Ct(t, o) {
349
+ return o.sortValue ? o.sortValue(t) : ae(t, o);
331
350
  }
332
- function lr(e, o) {
333
- return typeof e == "number" && typeof o == "number" ? e - o : String(e ?? "").localeCompare(String(o ?? ""), void 0, { numeric: !0, sensitivity: "base" });
351
+ function br(t, o) {
352
+ return typeof t == "number" && typeof o == "number" ? t - o : String(t ?? "").localeCompare(String(o ?? ""), void 0, { numeric: !0, sensitivity: "base" });
334
353
  }
335
- function Ct(e, o) {
336
- if (typeof e == "number") return e;
337
- if (typeof e == "string" && e.endsWith("px")) {
338
- const p = Number.parseFloat(e);
354
+ function te(t, o) {
355
+ if (typeof t == "number") return t;
356
+ if (typeof t == "string" && t.endsWith("px")) {
357
+ const p = Number.parseFloat(t);
339
358
  return Number.isFinite(p) ? p : o;
340
359
  }
341
360
  return o;
342
361
  }
343
- function Bt(e, o) {
344
- const p = e.filter((w) => o.includes(w)), h = o.filter((w) => !p.includes(w));
362
+ function It(t, o) {
363
+ const p = t.filter((w) => o.includes(w)), h = o.filter((w) => !p.includes(w));
345
364
  return [...p, ...h];
346
365
  }
347
- function dr(e, o, p) {
348
- const h = [...e], w = h.indexOf(o), z = h.indexOf(p);
349
- return w === -1 || z === -1 || w === z ? e : (h.splice(w, 1), h.splice(z, 0, o), h);
366
+ function fr(t, o, p) {
367
+ const h = [...t], w = h.indexOf(o), z = h.indexOf(p);
368
+ return w === -1 || z === -1 || w === z ? t : (h.splice(w, 1), h.splice(z, 0, o), h);
350
369
  }
351
- function pr(e) {
352
- return Math.round(e * 100) / 100;
370
+ function wr(t) {
371
+ return Math.round(t * 100) / 100;
353
372
  }
354
- function Pt(e, o) {
355
- return e && e > 0 ? e : o;
373
+ function Pt(t, o) {
374
+ return t && t > 0 ? t : o;
356
375
  }
357
- function hr(e, o) {
358
- return !e || e.columns.length !== o.columns.length || Math.abs(e.selection - o.selection) > 0.5 || Math.abs(e.leading - o.leading) > 0.5 || Math.abs(e.rowActions - o.rowActions) > 0.5 ? !1 : e.columns.every((p, h) => Math.abs(p - o.columns[h]) <= 0.5);
376
+ function vr(t, o) {
377
+ return !t || t.columns.length !== o.columns.length || Math.abs(t.selection - o.selection) > 0.5 || Math.abs(t.leading - o.leading) > 0.5 || Math.abs(t.rowActions - o.rowActions) > 0.5 ? !1 : t.columns.every((p, h) => Math.abs(p - o.columns[h]) <= 0.5);
359
378
  }
360
- function Wr({
361
- data: e,
379
+ function Pr({
380
+ data: t,
362
381
  columns: o,
363
382
  getRowId: p,
364
383
  loading: h,
@@ -366,198 +385,198 @@ function Wr({
366
385
  emptyState: z,
367
386
  // Default no-data view is a two-line message (title + description). Consumers
368
387
  // can override either line, or replace the whole thing via `emptyState`.
369
- emptyTitle: ae = "No records found",
370
- emptyDescription: ie = "There's nothing to show here yet.",
371
- pagination: Mt,
372
- enableSorting: tt = !0,
388
+ emptyTitle: ie = "No records found",
389
+ emptyDescription: se = "There's nothing to show here yet.",
390
+ pagination: zt,
391
+ enableSorting: et = !0,
373
392
  sorting: F,
374
- defaultSorting: et = null,
375
- onSortingChange: rt,
376
- visibleColumnIds: ot,
393
+ defaultSorting: rt = null,
394
+ onSortingChange: ot,
395
+ visibleColumnIds: at,
377
396
  columnOrder: k,
378
- defaultColumnOrder: at,
379
- onColumnOrderChange: it,
397
+ defaultColumnOrder: it,
398
+ onColumnOrderChange: st,
380
399
  enableColumnPinning: K = !0,
381
400
  pinnedColumnCount: L,
382
401
  defaultPinnedColumnCount: nt = 0,
383
- onPinnedColumnCountChange: st,
384
- pinLeadingColumn: N,
402
+ onPinnedColumnCountChange: lt,
403
+ pinLeadingColumn: H,
385
404
  defaultPinLeadingColumn: ct = !1,
386
- onPinLeadingColumnChange: lt,
387
- enableColumnReordering: H = !0,
388
- resetKey: zt,
389
- showSortIcon: Ft = "always",
390
- leadingColumn: n,
405
+ onPinLeadingColumnChange: dt,
406
+ enableColumnReordering: N = !0,
407
+ resetKey: Ft,
408
+ showSortIcon: Lt = "always",
409
+ leadingColumn: s,
391
410
  rowActions: T,
392
411
  rowActionsHeader: ne = "Actions",
393
- rowActionsWidth: Y = Ge,
412
+ rowActionsWidth: Y = Je,
394
413
  stickyRowActions: q = !!T,
395
414
  selection: G,
396
415
  selectedRowIds: E = [],
397
416
  onSelectedRowIdsChange: J,
398
- stickyHeader: dt = !0,
399
- fill: se = !1,
400
- headerTextOverflow: pt = "truncate",
417
+ stickyHeader: pt = !0,
418
+ fill: le = !1,
419
+ headerTextOverflow: ht = "truncate",
401
420
  cellTextSize: Q = "default",
402
421
  minWidth: ce = "100%",
403
- maxHeight: Lt,
404
- className: le,
405
- scrollerClassName: de,
406
- tableClassName: pe,
407
- headerClassName: he,
408
- rowClassName: ht,
409
- cellClassName: bt,
422
+ maxHeight: Ht,
423
+ className: de,
424
+ scrollerClassName: pe,
425
+ tableClassName: he,
426
+ headerClassName: be,
427
+ rowClassName: bt,
428
+ cellClassName: ft,
410
429
  onRowClick: R,
411
- "aria-label": be = "Data table"
430
+ "aria-label": fe = "Data table"
412
431
  }) {
413
- const ft = Ee(null), [fe, Nt] = D(et), [wt, vt] = D(() => at ?? o.map((t) => t.id)), [we, Ht] = D(nt), [ve, Et] = D(ct), [X, U] = D(null), [ye, V] = D(null), [ge, Ut] = D(null), [v, ue] = D(null), b = tt ? F === void 0 ? fe : F : null, W = M(() => o.map((t) => t.id), [o]), Vt = M(() => new Map(o.map((t) => [t.id, t])), [o]);
414
- It(() => {
415
- k === void 0 && vt((t) => Bt(t, W));
416
- }, [W, k]), It(() => {
417
- zt !== void 0 && (F === void 0 && Nt(et), k === void 0 && vt(Bt(at ?? W, W)), L === void 0 && Ht(nt), N === void 0 && Et(ct), U(null), V(null));
432
+ const wt = Ue(null), [we, Nt] = D(rt), [vt, yt] = D(() => it ?? o.map((e) => e.id)), [ve, Et] = D(nt), [ye, Ut] = D(ct), [X, U] = D(null), [ge, $] = D(null), [ue, $t] = D(null), [v, xe] = D(null), b = et ? F === void 0 ? we : F : null, W = M(() => o.map((e) => e.id), [o]), jt = M(() => new Map(o.map((e) => [e.id, e])), [o]);
433
+ Mt(() => {
434
+ k === void 0 && yt((e) => It(e, W));
435
+ }, [W, k]), Mt(() => {
436
+ Ft !== void 0 && (F === void 0 && Nt(rt), k === void 0 && yt(It(it ?? W, W)), L === void 0 && Et(nt), H === void 0 && Ut(ct), U(null), $(null));
418
437
  }, [
419
438
  W,
420
439
  k,
421
- at,
440
+ it,
422
441
  nt,
423
442
  ct,
424
- et,
425
- N,
443
+ rt,
444
+ H,
426
445
  L,
427
- zt,
446
+ Ft,
428
447
  F
429
448
  ]);
430
- const yt = M(() => Bt(k ?? wt, W).map((r) => Vt.get(r)).filter((r) => !!r), [Vt, W, k, wt]), f = M(() => {
431
- if (!ot) return yt;
432
- const t = new Set(ot);
433
- return yt.filter((r) => t.has(r.id));
434
- }, [yt, ot]), xe = M(
435
- () => f.map((t) => Ct(t.width ?? t.minWidth, Qt)),
449
+ const gt = M(() => It(k ?? vt, W).map((r) => jt.get(r)).filter((r) => !!r), [jt, W, k, vt]), f = M(() => {
450
+ if (!at) return gt;
451
+ const e = new Set(at);
452
+ return gt.filter((r) => e.has(r.id));
453
+ }, [gt, at]), Se = M(
454
+ () => f.map((e) => te(e.width ?? e.minWidth, Rt)),
436
455
  [f]
437
456
  ), u = K ? Math.min(
438
457
  f.length,
439
- Math.max(0, L === void 0 ? we : L)
440
- ) : 0, x = !!n && ((K && n ? N === void 0 ? ve : N : !1) || u > 0), jt = x && u === 0, P = !!(G && !n), A = P && u > 0, Se = Ct((n == null ? void 0 : n.width) ?? (n == null ? void 0 : n.minWidth), Tt), gt = (v == null ? void 0 : v.columns.length) === f.length ? v.columns : void 0, me = Pt(v == null ? void 0 : v.selection, B), ke = Pt(v == null ? void 0 : v.leading, Se), De = (A ? me : 0) + (x ? ke : 0), $t = f.length + (P ? 1 : 0) + (n ? 1 : 0) + (T ? 1 : 0), ut = (t, r) => (p == null ? void 0 : p(t, r)) ?? String(t.id ?? r), xt = Ue(() => {
458
+ Math.max(0, L === void 0 ? ve : L)
459
+ ) : 0, x = !!s && ((K && s ? H === void 0 ? ye : H : !1) || u > 0), Vt = x && u === 0, I = !!(G && !s), A = I && u > 0, me = te((s == null ? void 0 : s.width) ?? (s == null ? void 0 : s.minWidth), Wt), ut = (v == null ? void 0 : v.columns.length) === f.length ? v.columns : void 0, ke = Pt(v == null ? void 0 : v.selection, B), De = Pt(v == null ? void 0 : v.leading, me), Te = (A ? ke : 0) + (x ? De : 0), Kt = f.length + (I ? 1 : 0) + (s ? 1 : 0) + (T ? 1 : 0), xt = (e, r) => (p == null ? void 0 : p(e, r)) ?? String(e.id ?? r), St = $e(() => {
441
460
  var S, y;
442
- const t = (y = (S = ft.current) == null ? void 0 : S.tHead) == null ? void 0 : y.rows[0];
443
- if (!t) return;
444
- const r = Array.from(t.cells);
445
- let s = 0;
461
+ const e = (y = (S = wt.current) == null ? void 0 : S.tHead) == null ? void 0 : y.rows[0];
462
+ if (!e) return;
463
+ const r = Array.from(e.cells);
464
+ let n = 0;
446
465
  const a = () => {
447
- var c;
448
- return pr(((c = r[s++]) == null ? void 0 : c.getBoundingClientRect().width) ?? 0);
466
+ var l;
467
+ return wr(((l = r[n++]) == null ? void 0 : l.getBoundingClientRect().width) ?? 0);
449
468
  }, d = {
450
- selection: P ? a() : 0,
451
- leading: n ? a() : 0,
469
+ selection: I ? a() : 0,
470
+ leading: s ? a() : 0,
452
471
  columns: f.map(() => a()),
453
472
  rowActions: T ? a() : 0
454
473
  };
455
- ue((c) => hr(c, d) ? c : d);
456
- }, [f, P, n, T]);
457
- Jt(() => {
458
- xt();
459
- }), Jt(() => {
460
- var s, a;
461
- const t = ft.current;
462
- if (!t || typeof window > "u" || typeof window.ResizeObserver > "u") return;
463
- const r = new window.ResizeObserver(xt);
464
- return r.observe(t), Array.from(((a = (s = t.tHead) == null ? void 0 : s.rows[0]) == null ? void 0 : a.cells) ?? []).forEach((d) => r.observe(d)), () => r.disconnect();
465
- }, [xt]);
466
- const I = M(() => {
467
- if (!b) return e;
468
- const t = o.find((r) => r.id === b.columnId);
469
- return t ? [...e].sort((r, s) => {
470
- const a = lr(Ot(r, t), Ot(s, t));
474
+ xe((l) => vr(l, d) ? l : d);
475
+ }, [f, I, s, T]);
476
+ Qt(() => {
477
+ St();
478
+ }), Qt(() => {
479
+ var n, a;
480
+ const e = wt.current;
481
+ if (!e || typeof window > "u" || typeof window.ResizeObserver > "u") return;
482
+ const r = new window.ResizeObserver(St);
483
+ return r.observe(e), Array.from(((a = (n = e.tHead) == null ? void 0 : n.rows[0]) == null ? void 0 : a.cells) ?? []).forEach((d) => r.observe(d)), () => r.disconnect();
484
+ }, [St]);
485
+ const P = M(() => {
486
+ if (!b) return t;
487
+ const e = o.find((r) => r.id === b.columnId);
488
+ return e ? [...t].sort((r, n) => {
489
+ const a = br(Ct(r, e), Ct(n, e));
471
490
  return b.direction === "asc" ? a : -a;
472
- }) : e;
473
- }, [b, o, e]), St = I.length > 0 && I.every((t, r) => E.includes(ut(t, r))), Te = (t) => {
474
- if (!tt || !t.sortable) return;
475
- const r = (b == null ? void 0 : b.columnId) === t.id ? { columnId: t.id, direction: b.direction === "asc" ? "desc" : "asc" } : { columnId: t.id, direction: "asc" };
476
- F === void 0 && Nt(r), rt == null || rt(r);
477
- }, We = (t) => {
478
- k === void 0 && vt(t), it == null || it(t);
479
- }, mt = (t) => {
480
- const r = Math.min(f.length, Math.max(0, t));
481
- L === void 0 && Ht(r), st == null || st(r);
482
- }, Kt = (t) => {
483
- N === void 0 && Et(t), lt == null || lt(t);
484
- }, Yt = () => {
485
- J && J(St ? [] : I.map((t, r) => ut(t, r)));
486
- }, qt = (t) => {
487
- J && J(E.includes(t) ? E.filter((r) => r !== t) : [...E, t]);
488
- }, Gt = (t) => {
489
- let r = De;
490
- for (let s = 0; s < t; s += 1)
491
- r += Pt(gt == null ? void 0 : gt[s], xe[s] ?? Qt);
491
+ }) : t;
492
+ }, [b, o, t]), mt = P.length > 0 && P.every((e, r) => E.includes(xt(e, r))), We = (e) => {
493
+ if (!et || !e.sortable) return;
494
+ const r = (b == null ? void 0 : b.columnId) === e.id ? { columnId: e.id, direction: b.direction === "asc" ? "desc" : "asc" } : { columnId: e.id, direction: "asc" };
495
+ F === void 0 && Nt(r), ot == null || ot(r);
496
+ }, Ae = (e) => {
497
+ k === void 0 && yt(e), st == null || st(e);
498
+ }, kt = (e) => {
499
+ const r = Math.min(f.length, Math.max(0, e));
500
+ L === void 0 && Et(r), lt == null || lt(r);
501
+ }, Yt = (e) => {
502
+ H === void 0 && Ut(e), dt == null || dt(e);
503
+ }, qt = () => {
504
+ J && J(mt ? [] : P.map((e, r) => xt(e, r)));
505
+ }, Gt = (e) => {
506
+ J && J(E.includes(e) ? E.filter((r) => r !== e) : [...E, e]);
507
+ }, Jt = (e) => {
508
+ let r = Te;
509
+ for (let n = 0; n < e; n += 1)
510
+ r += Pt(ut == null ? void 0 : ut[n], Se[n] ?? Rt);
492
511
  return r;
493
- }, Ae = (t, r) => {
494
- H && (U(r), t.dataTransfer.effectAllowed = "move");
495
- }, Be = (t, r) => {
496
- H && (t.preventDefault(), V(r));
497
- }, Pe = (t, r) => {
512
+ }, Be = (e, r) => {
513
+ N && (U(r), e.dataTransfer.effectAllowed = "move");
514
+ }, Ie = (e, r) => {
515
+ N && (e.preventDefault(), $(r));
516
+ }, Pe = (e, r) => {
498
517
  var d, S;
499
- if (!H) return;
500
- if (t.preventDefault(), X === null || X === r) {
501
- U(null), V(null);
518
+ if (!N) return;
519
+ if (e.preventDefault(), X === null || X === r) {
520
+ U(null), $(null);
502
521
  return;
503
522
  }
504
- const s = (d = f[X]) == null ? void 0 : d.id, a = (S = f[r]) == null ? void 0 : S.id;
505
- s && a && (We(dr(k ?? wt, s, a)), X < u && mt(Math.min(u, r + 1))), U(null), V(null);
506
- }, kt = (t, r = 20) => ({
523
+ const n = (d = f[X]) == null ? void 0 : d.id, a = (S = f[r]) == null ? void 0 : S.id;
524
+ n && a && (Ae(fr(k ?? vt, n, a)), X < u && kt(Math.min(u, r + 1))), U(null), $(null);
525
+ }, Dt = (e, r = 20) => ({
507
526
  position: "sticky",
508
- left: t,
509
- ...dt ? { top: 0 } : {},
527
+ left: e,
528
+ ...pt ? { top: 0 } : {},
510
529
  zIndex: r
511
- }), Dt = (t, r = 10) => ({
530
+ }), Tt = (e, r = 10) => ({
512
531
  position: "sticky",
513
- left: t,
532
+ left: e,
514
533
  zIndex: r
515
- }), Ie = q ? {
534
+ }), Me = q ? {
516
535
  position: "sticky",
517
536
  right: 0,
518
537
  zIndex: 12
519
- } : {}, Me = q ? {
538
+ } : {}, ze = q ? {
520
539
  position: "sticky",
521
540
  right: 0,
522
- ...dt ? { top: 0 } : {},
541
+ ...pt ? { top: 0 } : {},
523
542
  zIndex: 24
524
543
  } : {};
525
- return /* @__PURE__ */ m(_e, { className: le, ownerState: { fill: se }, children: [
526
- /* @__PURE__ */ m(Oe, { className: de, style: Lt !== void 0 ? { maxHeight: Lt } : void 0, children: [
527
- /* @__PURE__ */ m(tr, { ref: ft, "aria-label": be, "aria-busy": h || void 0, className: pe, style: { minWidth: ce, tableLayout: "fixed" }, children: [
528
- /* @__PURE__ */ i(er, { ownerState: { sticky: !!dt }, className: he, children: /* @__PURE__ */ m(rr, { children: [
529
- P && /* @__PURE__ */ i(
530
- Z,
544
+ return /* @__PURE__ */ m(er, { className: de, ownerState: { fill: le }, children: [
545
+ /* @__PURE__ */ m(rr, { className: pe, style: Ht !== void 0 ? { maxHeight: Ht } : void 0, children: [
546
+ /* @__PURE__ */ m(ar, { ref: wt, "aria-label": fe, "aria-busy": h || void 0, className: he, style: { minWidth: ce, tableLayout: "fixed" }, children: [
547
+ /* @__PURE__ */ i(ir, { ownerState: { sticky: !!pt }, className: be, children: /* @__PURE__ */ m(sr, { children: [
548
+ I && /* @__PURE__ */ i(
549
+ _,
531
550
  {
532
551
  ownerState: { kind: "selection", edgeShadow: A },
533
- style: { width: B, minWidth: B, ...A ? kt(0, 24) : {} },
534
- children: /* @__PURE__ */ i(_t, { children: /* @__PURE__ */ i(O, { type: "checkbox", checked: St, onChange: Yt, "aria-label": "Select all rows" }) })
552
+ style: { width: B, minWidth: B, ...A ? Dt(0, 24) : {} },
553
+ children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(C, { type: "checkbox", checked: mt, onChange: qt, "aria-label": "Select all rows" }) })
535
554
  }
536
555
  ),
537
- n && /* @__PURE__ */ i(
538
- Z,
556
+ s && /* @__PURE__ */ i(
557
+ _,
539
558
  {
540
559
  scope: "col",
541
- ownerState: { kind: "leading", edgeShadow: jt },
542
- className: n.headerClassName,
560
+ ownerState: { kind: "leading", edgeShadow: Vt },
561
+ className: s.headerClassName,
543
562
  style: {
544
- width: n.width,
545
- minWidth: n.minWidth ?? n.width ?? Tt,
546
- ...x ? kt(A ? B : 0, 23) : {},
547
- ...n.headerStyle
563
+ width: s.width,
564
+ minWidth: s.minWidth ?? s.width ?? Wt,
565
+ ...x ? Dt(A ? B : 0, 23) : {},
566
+ ...s.headerStyle
548
567
  },
549
- children: /* @__PURE__ */ m(Xt, { ownerState: { wide: !0 }, children: [
550
- G && /* @__PURE__ */ i(O, { type: "checkbox", checked: St, onChange: Yt, "aria-label": "Select all rows" }),
551
- /* @__PURE__ */ i(At, { ownerState: { overflow: pt }, children: n.header }),
568
+ children: /* @__PURE__ */ m(Zt, { ownerState: { wide: !0 }, children: [
569
+ G && /* @__PURE__ */ i(C, { type: "checkbox", checked: mt, onChange: qt, "aria-label": "Select all rows" }),
570
+ /* @__PURE__ */ i(Bt, { ownerState: { overflow: ht }, children: s.header }),
552
571
  K && /* @__PURE__ */ i(
553
- Zt,
572
+ _t,
554
573
  {
555
574
  type: "button",
556
575
  ownerState: { pinned: x, side: "right" },
557
576
  title: x ? "Unpin leading column" : "Pin leading column",
558
577
  "aria-label": x ? "Unpin leading column" : "Pin leading column",
559
- onClick: (t) => {
560
- t.stopPropagation(), x ? (Kt(!1), mt(0)) : Kt(!0);
578
+ onClick: (e) => {
579
+ e.stopPropagation(), x ? (Yt(!1), kt(0)) : Yt(!0);
561
580
  },
562
581
  children: x ? "Unpin" : "Pin"
563
582
  }
@@ -565,148 +584,148 @@ function Wr({
565
584
  ] })
566
585
  }
567
586
  ),
568
- f.map((t, r) => {
569
- const s = (b == null ? void 0 : b.columnId) === t.id, a = r < u, d = r === u - 1, S = {
570
- width: t.width,
571
- minWidth: t.minWidth ?? t.width,
572
- textAlign: t.align,
573
- ...a ? kt(Gt(r), 22) : {},
574
- ...t.headerStyle
575
- }, y = tt && t.sortable, c = y && Ft === "always" && !s, j = y && s && Ft !== "never", $ = K && r < Je && /* @__PURE__ */ i(
576
- Zt,
587
+ f.map((e, r) => {
588
+ const n = (b == null ? void 0 : b.columnId) === e.id, a = r < u, d = r === u - 1, S = {
589
+ width: e.width,
590
+ minWidth: e.minWidth ?? e.width,
591
+ textAlign: e.align,
592
+ ...a ? Dt(Jt(r), 22) : {},
593
+ ...e.headerStyle
594
+ }, y = et && e.sortable, l = y && Lt === "always" && !n, j = y && n && Lt !== "never", V = K && r < Qe && /* @__PURE__ */ i(
595
+ _t,
577
596
  {
578
597
  type: "button",
579
- ownerState: { pinned: a, side: t.align === "right" ? "left" : "right" },
598
+ ownerState: { pinned: a, side: e.align === "right" ? "left" : "right" },
580
599
  title: a && d ? "Unpin columns" : "Pin up to this column",
581
- "aria-label": a && d ? "Unpin columns" : `Pin up to ${String(t.header)}`,
600
+ "aria-label": a && d ? "Unpin columns" : `Pin up to ${String(e.header)}`,
582
601
  onClick: (g) => {
583
- g.stopPropagation(), mt(a && d ? 0 : r + 1);
602
+ g.stopPropagation(), kt(a && d ? 0 : r + 1);
584
603
  },
585
604
  children: a ? "Unpin" : "Pin"
586
605
  }
587
606
  );
588
607
  return /* @__PURE__ */ i(
589
- Z,
608
+ _,
590
609
  {
591
610
  scope: "col",
592
- "aria-sort": y ? s ? b.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
593
- draggable: H,
594
- onDragStart: (g) => Ae(g, r),
595
- onDragOver: (g) => Be(g, r),
611
+ "aria-sort": y ? n ? b.direction === "asc" ? "ascending" : "descending" : "none" : void 0,
612
+ draggable: N,
613
+ onDragStart: (g) => Be(g, r),
614
+ onDragOver: (g) => Ie(g, r),
596
615
  onDrop: (g) => Pe(g, r),
597
616
  onDragEnd: () => {
598
- U(null), V(null);
617
+ U(null), $(null);
599
618
  },
600
619
  ownerState: {
601
620
  kind: "data",
602
621
  sortable: !!y,
603
- sorted: !!s,
604
- reorderable: H,
605
- dropTarget: ye === r,
622
+ sorted: !!n,
623
+ reorderable: N,
624
+ dropTarget: ge === r,
606
625
  edgeShadow: a && d
607
626
  },
608
- className: t.headerClassName,
627
+ className: e.headerClassName,
609
628
  style: S,
610
- children: /* @__PURE__ */ m(Xt, { ownerState: { align: t.align }, children: [
611
- t.align === "right" && $,
612
- y ? /* @__PURE__ */ m(ar, { type: "button", onClick: () => Te(t), children: [
613
- /* @__PURE__ */ i(At, { ownerState: { overflow: pt }, children: t.header }),
614
- j && (b.direction === "asc" ? /* @__PURE__ */ i(He, { size: 12, weight: "bold" }) : /* @__PURE__ */ i(Ne, { size: 12, weight: "bold" })),
615
- c && /* @__PURE__ */ i(ir, { size: 12 })
616
- ] }) : /* @__PURE__ */ i(At, { ownerState: { overflow: pt }, children: t.header }),
617
- t.align !== "right" && $
629
+ children: /* @__PURE__ */ m(Zt, { ownerState: { align: e.align }, children: [
630
+ e.align === "right" && V,
631
+ y ? /* @__PURE__ */ m(lr, { type: "button", onClick: () => We(e), children: [
632
+ /* @__PURE__ */ i(Bt, { ownerState: { overflow: ht }, children: e.header }),
633
+ j && (b.direction === "asc" ? /* @__PURE__ */ i(Ee, { size: 12, weight: "bold" }) : /* @__PURE__ */ i(Ne, { size: 12, weight: "bold" })),
634
+ l && /* @__PURE__ */ i(cr, { size: 12 })
635
+ ] }) : /* @__PURE__ */ i(Bt, { ownerState: { overflow: ht }, children: e.header }),
636
+ e.align !== "right" && V
618
637
  ] })
619
638
  },
620
- t.id
639
+ e.id
621
640
  );
622
641
  }),
623
642
  T && /* @__PURE__ */ i(
624
- Z,
643
+ _,
625
644
  {
626
645
  ownerState: { kind: "actions", actionsShadow: q },
627
- style: { width: Y, minWidth: Y, ...Me },
646
+ style: { width: Y, minWidth: Y, ...ze },
628
647
  children: ne
629
648
  }
630
649
  )
631
650
  ] }) }),
632
- /* @__PURE__ */ i("tbody", { children: h ? /* @__PURE__ */ i(qe, { rows: 5, columns: $t }) : w ? /* @__PURE__ */ i(Ke, { description: w, colSpan: $t }) : I.length === 0 ? null : I.map((t, r) => {
633
- const s = ut(t, r), a = E.includes(s), d = ge === s, S = typeof ht == "function" ? ht(t, r) : ht, y = { rowIndex: r, selected: a, hovered: d };
651
+ /* @__PURE__ */ i("tbody", { children: h ? /* @__PURE__ */ i(Ge, { rows: 5, columns: Kt }) : w ? /* @__PURE__ */ i(Ye, { description: w, colSpan: Kt }) : P.length === 0 ? null : P.map((e, r) => {
652
+ const n = xt(e, r), a = E.includes(n), d = ue === n, S = typeof bt == "function" ? bt(e, r) : bt, y = { rowIndex: r, selected: a, hovered: d };
634
653
  return /* @__PURE__ */ m(
635
- nr,
654
+ dr,
636
655
  {
637
656
  ownerState: { selected: a, clickable: !!R },
638
657
  className: S,
639
- onMouseEnter: () => Ut(s),
640
- onMouseLeave: () => Ut(null),
641
- onClick: () => R == null ? void 0 : R(t),
658
+ onMouseEnter: () => $t(n),
659
+ onMouseLeave: () => $t(null),
660
+ onClick: () => R == null ? void 0 : R(e),
642
661
  children: [
643
- P && /* @__PURE__ */ i(
644
- _,
662
+ I && /* @__PURE__ */ i(
663
+ O,
645
664
  {
646
665
  ownerState: { kind: "selection", selected: a, cellTextSize: Q, edgeShadow: A },
647
- style: { width: B, minWidth: B, ...A ? Dt(0, 14) : {} },
648
- onClick: (c) => c.stopPropagation(),
649
- children: /* @__PURE__ */ i(_t, { children: /* @__PURE__ */ i(O, { type: "checkbox", checked: a, onChange: () => qt(s), "aria-label": `Select row ${r + 1}` }) })
666
+ style: { width: B, minWidth: B, ...A ? Tt(0, 14) : {} },
667
+ onClick: (l) => l.stopPropagation(),
668
+ children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(C, { type: "checkbox", checked: a, onChange: () => Gt(n), "aria-label": `Select row ${r + 1}` }) })
650
669
  }
651
670
  ),
652
- n && /* @__PURE__ */ i(
653
- _,
671
+ s && /* @__PURE__ */ i(
672
+ O,
654
673
  {
655
- ownerState: { kind: "leading", selected: a, cellTextSize: Q, edgeShadow: jt },
656
- className: n.className,
674
+ ownerState: { kind: "leading", selected: a, cellTextSize: Q, edgeShadow: Vt },
675
+ className: s.className,
657
676
  style: {
658
- width: n.width,
659
- minWidth: n.minWidth ?? n.width ?? Tt,
660
- ...x ? Dt(A ? B : 0, 13) : {},
661
- ...n.style
677
+ width: s.width,
678
+ minWidth: s.minWidth ?? s.width ?? Wt,
679
+ ...x ? Tt(A ? B : 0, 13) : {},
680
+ ...s.style
662
681
  },
663
- onClick: G ? (c) => c.stopPropagation() : void 0,
664
- children: /* @__PURE__ */ m(sr, { children: [
665
- G && /* @__PURE__ */ i(O, { type: "checkbox", checked: a, onChange: () => qt(s), "aria-label": `Select row ${r + 1}` }),
666
- /* @__PURE__ */ i(cr, { children: n.cell(t, y) })
682
+ onClick: G ? (l) => l.stopPropagation() : void 0,
683
+ children: /* @__PURE__ */ m(pr, { children: [
684
+ G && /* @__PURE__ */ i(C, { type: "checkbox", checked: a, onChange: () => Gt(n), "aria-label": `Select row ${r + 1}` }),
685
+ /* @__PURE__ */ i(hr, { children: s.cell(e, y) })
667
686
  ] })
668
687
  }
669
688
  ),
670
- f.map((c, j) => {
671
- const $ = oe(t, c), g = j < u, ze = j === u - 1, Fe = typeof bt == "function" ? bt(t, r, c) : bt;
689
+ f.map((l, j) => {
690
+ const V = ae(e, l), g = j < u, Fe = j === u - 1, Le = typeof ft == "function" ? ft(e, r, l) : ft;
672
691
  return /* @__PURE__ */ i(
673
- _,
692
+ O,
674
693
  {
675
- ownerState: { kind: "data", selected: a, cellTextSize: Q, edgeShadow: g && ze },
676
- className: je(Fe, c.className),
694
+ ownerState: { kind: "data", selected: a, cellTextSize: Q, edgeShadow: g && Fe },
695
+ className: Ve(Le, l.className),
677
696
  style: {
678
- width: c.width,
679
- minWidth: c.minWidth ?? c.width,
680
- textAlign: c.align,
681
- ...g ? Dt(Gt(j), 12) : {},
682
- ...c.style
697
+ width: l.width,
698
+ minWidth: l.minWidth ?? l.width,
699
+ textAlign: l.align,
700
+ ...g ? Tt(Jt(j), 12) : {},
701
+ ...l.style
683
702
  },
684
- children: c.cell ? c.cell(t, { value: $, rowIndex: r, selected: a, hovered: d }) : String($ ?? "")
703
+ children: l.cell ? l.cell(e, { value: V, rowIndex: r, selected: a, hovered: d }) : String(V ?? "")
685
704
  },
686
- c.id
705
+ l.id
687
706
  );
688
707
  }),
689
708
  T && /* @__PURE__ */ i(
690
- _,
709
+ O,
691
710
  {
692
711
  ownerState: { kind: "actions", selected: a, cellTextSize: Q, actionsShadow: q },
693
- style: { width: Y, minWidth: Y, ...Ie },
694
- onClick: (c) => c.stopPropagation(),
695
- children: T(t)
712
+ style: { width: Y, minWidth: Y, ...Me },
713
+ onClick: (l) => l.stopPropagation(),
714
+ children: T(e)
696
715
  }
697
716
  )
698
717
  ]
699
718
  },
700
- s
719
+ n
701
720
  );
702
721
  }) })
703
722
  ] }),
704
- !h && !w && I.length === 0 && /* @__PURE__ */ i(Ce, { children: z ?? /* @__PURE__ */ i($e, { title: ae, description: ie }) })
723
+ !h && !w && P.length === 0 && /* @__PURE__ */ i(or, { children: z ?? /* @__PURE__ */ i(Ke, { title: ie, description: se }) })
705
724
  ] }),
706
- Mt && /* @__PURE__ */ i(Ye, { ...Mt })
725
+ zt && /* @__PURE__ */ i(qe, { ...zt })
707
726
  ] });
708
727
  }
709
728
  export {
710
- Wr as DataTable
729
+ Pr as DataTable
711
730
  };
712
731
  //# sourceMappingURL=DataTable.js.map