@optimum-intelligence/opti-ui 0.9.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/README.md +5 -1
  3. package/dist/components/app-shell/AppShell.d.ts +30 -1
  4. package/dist/components/app-shell/AppShell.js +387 -236
  5. package/dist/components/app-shell/AppShell.js.map +1 -1
  6. package/dist/components/avatar/Avatar.d.ts +1 -1
  7. package/dist/components/avatar/Avatar.js +64 -52
  8. package/dist/components/avatar/Avatar.js.map +1 -1
  9. package/dist/components/calendar/Calendar.js +6 -4
  10. package/dist/components/calendar/Calendar.js.map +1 -1
  11. package/dist/components/calendar/date-utils.js +1 -1
  12. package/dist/components/calendar/date-utils.js.map +1 -1
  13. package/dist/components/card/Card.d.ts +24 -5
  14. package/dist/components/card/Card.js +36 -23
  15. package/dist/components/card/Card.js.map +1 -1
  16. package/dist/components/collapsible/Collapsible.d.ts +8 -1
  17. package/dist/components/collapsible/Collapsible.js +32 -25
  18. package/dist/components/collapsible/Collapsible.js.map +1 -1
  19. package/dist/components/data-table/DataTable.d.ts +21 -4
  20. package/dist/components/data-table/DataTable.js +310 -100
  21. package/dist/components/data-table/DataTable.js.map +1 -1
  22. package/dist/components/data-table/DataTableContent.d.ts +1 -7
  23. package/dist/components/data-table/DataTableContent.js +209 -243
  24. package/dist/components/data-table/DataTableContent.js.map +1 -1
  25. package/dist/components/data-table/DataTableFilters.js +47 -57
  26. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  27. package/dist/components/data-table/DataTableRow.js +105 -90
  28. package/dist/components/data-table/DataTableRow.js.map +1 -1
  29. package/dist/components/data-table/layout.d.ts +0 -5
  30. package/dist/components/data-table/layout.js +1 -23
  31. package/dist/components/data-table/layout.js.map +1 -1
  32. package/dist/components/data-table/types.d.ts +5 -2
  33. package/dist/components/data-table/useDataTable.js +249 -221
  34. package/dist/components/data-table/useDataTable.js.map +1 -1
  35. package/dist/components/date-picker/DateRangePicker.js +1 -0
  36. package/dist/components/date-picker/DateRangePicker.js.map +1 -1
  37. package/dist/components/date-picker/PickerField.js +98 -101
  38. package/dist/components/date-picker/PickerField.js.map +1 -1
  39. package/dist/components/description-list/DescriptionList.d.ts +3 -1
  40. package/dist/components/description-list/DescriptionList.js +3 -1
  41. package/dist/components/description-list/DescriptionList.js.map +1 -1
  42. package/dist/components/drawer/Drawer.d.ts +1 -1
  43. package/dist/components/drawer/Drawer.js +173 -87
  44. package/dist/components/drawer/Drawer.js.map +1 -1
  45. package/dist/components/file-upload/FileUpload.js +7 -0
  46. package/dist/components/file-upload/FileUpload.js.map +1 -1
  47. package/dist/components/link/Link.d.ts +1 -1
  48. package/dist/components/link/Link.js +57 -74
  49. package/dist/components/link/Link.js.map +1 -1
  50. package/dist/components/map/Map.d.ts +14 -2
  51. package/dist/components/map/Map.js +194 -153
  52. package/dist/components/map/Map.js.map +1 -1
  53. package/dist/components/pagination/Pagination.js +2 -0
  54. package/dist/components/pagination/Pagination.js.map +1 -1
  55. package/dist/components/scroll-area/ScrollArea.d.ts +18 -2
  56. package/dist/components/scroll-area/ScrollArea.js +89 -61
  57. package/dist/components/scroll-area/ScrollArea.js.map +1 -1
  58. package/dist/components/spinner/Spinner.js +34 -26
  59. package/dist/components/spinner/Spinner.js.map +1 -1
  60. package/dist/components/stat-card/StatCard.js +36 -22
  61. package/dist/components/stat-card/StatCard.js.map +1 -1
  62. package/dist/components/table/Table.d.ts +9 -2
  63. package/dist/components/table/Table.js +87 -63
  64. package/dist/components/table/Table.js.map +1 -1
  65. package/dist/components/tag/Tag.js +79 -103
  66. package/dist/components/tag/Tag.js.map +1 -1
  67. package/dist/components/toolbar/Toolbar.d.ts +2 -1
  68. package/dist/components/toolbar/Toolbar.js +23 -15
  69. package/dist/components/toolbar/Toolbar.js.map +1 -1
  70. package/dist/components/typography/Typography.d.ts +7 -1
  71. package/dist/components/typography/Typography.js +21 -18
  72. package/dist/components/typography/Typography.js.map +1 -1
  73. package/dist/components.json +134 -26
  74. package/dist/fonts/Montserrat-OFL.txt +93 -0
  75. package/dist/fonts/Poppins-OFL.txt +93 -0
  76. package/dist/fonts/montserrat-latin-ext.woff2 +0 -0
  77. package/dist/fonts/montserrat-latin.woff2 +0 -0
  78. package/dist/fonts/poppins-latin-400.woff2 +0 -0
  79. package/dist/fonts/poppins-latin-500.woff2 +0 -0
  80. package/dist/fonts/poppins-latin-600.woff2 +0 -0
  81. package/dist/fonts/poppins-latin-700.woff2 +0 -0
  82. package/dist/fonts/poppins-latin-ext-400.woff2 +0 -0
  83. package/dist/fonts/poppins-latin-ext-500.woff2 +0 -0
  84. package/dist/fonts/poppins-latin-ext-600.woff2 +0 -0
  85. package/dist/fonts/poppins-latin-ext-700.woff2 +0 -0
  86. package/dist/fonts.css +104 -4
  87. package/dist/index.js +2 -2
  88. package/dist/labels/Labels.d.ts +12 -0
  89. package/dist/labels/Labels.js +6 -0
  90. package/dist/labels/Labels.js.map +1 -1
  91. package/dist/labels/hu.js +9 -3
  92. package/dist/labels/hu.js.map +1 -1
  93. package/dist/llms-full.txt +103 -20
  94. package/dist/llms.txt +15 -10
  95. package/dist/opti-ui.css +566 -197
  96. package/dist/reset.css +33 -0
  97. package/dist/utils/focus.d.ts +8 -0
  98. package/dist/utils/focus.js +39 -0
  99. package/dist/utils/focus.js.map +1 -0
  100. package/package.json +2 -1
@@ -1,16 +1,14 @@
1
1
  "use client";
2
2
  import { cx } from "../../utils/cx.js";
3
- import { XIcon } from "../../icons/index.js";
4
3
  import { Skeleton } from "../skeleton/Skeleton.js";
5
- import { Button, IconButton } from "../button/Button.js";
4
+ import { Button } from "../button/Button.js";
6
5
  import { Checkbox } from "../choice/Choice.js";
7
6
  import { useMediaQuery } from "../../utils/media.js";
8
- import { Tooltip } from "../tooltip/Tooltip.js";
9
7
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/Table.js";
10
8
  import { useDataTableContext } from "./context.js";
11
9
  import { EmptyState } from "../empty-state/EmptyState.js";
12
10
  import { DataTableRow, SizerRow, isTextEditor } from "./DataTableRow.js";
13
- import { pickSizerRows, useColumnLock, useHeaderHeight, usePageHeight, useVirtualRows } from "./layout.js";
11
+ import { pickSizerRows, useColumnLock, usePageHeight, useVirtualRows } from "./layout.js";
14
12
  import { c } from "react/compiler-runtime";
15
13
  import * as React from "react";
16
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -22,8 +20,8 @@ var ROW_ESTIMATE = {
22
20
  };
23
21
  /** The table itself, with its loading, empty and error states. */
24
22
  function DataTableContent(t0) {
25
- const $ = c(96);
26
- const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, stickyFirstColumn: t4, empty, tableProps, selectionActions } = t0;
23
+ const $ = c(95);
24
+ const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, stickyFirstColumn: t4, empty, tableProps } = t0;
27
25
  const density = t1 === void 0 ? "normal" : t1;
28
26
  const layout = t2 === void 0 ? "stable" : t2;
29
27
  const virtualized = t3 === void 0 ? false : t3;
@@ -58,216 +56,207 @@ function DataTableContent(t0) {
58
56
  } else t7 = $[4];
59
57
  const shown = t7;
60
58
  const span = columns.length + Number(table.selectable) + Number(hasActions);
61
- let t8;
62
- if ($[5] !== table.selectable || $[6] !== table.selection) {
63
- t8 = table.selectable ? new Set(table.selection).size : 0;
64
- $[5] = table.selectable;
65
- $[6] = table.selection;
66
- $[7] = t8;
67
- } else t8 = $[7];
68
- const selected = t8;
69
59
  const columnKey = [
70
60
  density,
71
61
  table.selectable,
72
62
  hasActions,
73
63
  ...columns.map(_temp2)
74
64
  ].join("|");
75
- const { lock, measuring } = useColumnLock(anchor, stable, columnKey, shown.length > 0 && !selected);
76
- const headerHeight = useHeaderHeight(anchor, !selected);
77
- const t9 = ROW_ESTIMATE[density];
78
- const t10 = typeof maxHeight === "number" ? maxHeight : 512;
79
- let t11;
80
- if ($[8] !== density || $[9] !== overscan || $[10] !== rowHeight || $[11] !== shown.length || $[12] !== t10 || $[13] !== t9 || $[14] !== virtual) {
81
- t11 = {
65
+ const { lock, measuring } = useColumnLock(anchor, stable, columnKey, shown.length > 0);
66
+ const t8 = ROW_ESTIMATE[density];
67
+ const t9 = typeof maxHeight === "number" ? maxHeight : 512;
68
+ let t10;
69
+ if ($[5] !== density || $[6] !== overscan || $[7] !== rowHeight || $[8] !== shown.length || $[9] !== t8 || $[10] !== t9 || $[11] !== virtual) {
70
+ t10 = {
82
71
  enabled: virtual,
83
72
  count: shown.length,
84
73
  rowHeight,
85
74
  overscan,
86
- estimate: t9,
87
- viewport: t10,
75
+ estimate: t8,
76
+ viewport: t9,
88
77
  key: density
89
78
  };
90
- $[8] = density;
91
- $[9] = overscan;
92
- $[10] = rowHeight;
93
- $[11] = shown.length;
79
+ $[5] = density;
80
+ $[6] = overscan;
81
+ $[7] = rowHeight;
82
+ $[8] = shown.length;
83
+ $[9] = t8;
84
+ $[10] = t9;
85
+ $[11] = virtual;
94
86
  $[12] = t10;
95
- $[13] = t9;
96
- $[14] = virtual;
97
- $[15] = t11;
98
- } else t11 = $[15];
99
- const rows = useVirtualRows(anchor, t11);
100
- let t12;
101
- if ($[16] !== rows.end || $[17] !== rows.start || $[18] !== shown || $[19] !== virtual) {
102
- t12 = virtual ? shown.slice(rows.start, rows.end) : shown;
103
- $[16] = rows.end;
104
- $[17] = rows.start;
105
- $[18] = shown;
106
- $[19] = virtual;
107
- $[20] = t12;
108
- } else t12 = $[20];
109
- const rendered = t12;
87
+ } else t10 = $[12];
88
+ const rows = useVirtualRows(anchor, t10);
89
+ let t11;
90
+ if ($[13] !== rows.end || $[14] !== rows.start || $[15] !== shown || $[16] !== virtual) {
91
+ t11 = virtual ? shown.slice(rows.start, rows.end) : shown;
92
+ $[13] = rows.end;
93
+ $[14] = rows.start;
94
+ $[15] = shown;
95
+ $[16] = virtual;
96
+ $[17] = t11;
97
+ } else t11 = $[17];
98
+ const rendered = t11;
110
99
  const sizers = measuring && table.allRows.length > rendered.length ? pickSizerRows(table.allRows, columns) : [];
111
100
  const holdsPage = stable && table.paginated && !scrolls;
112
101
  const pageHeight = usePageHeight(anchor, holdsPage, shown.length === table.pageSize, `${density}|${table.pageSize}`);
113
102
  const shortPage = table.page > 1 && shown.length > 0 && shown.length < table.pageSize;
114
- let t13;
115
- if ($[21] !== density || $[22] !== loading || $[23] !== onEndReached || $[24] !== scrolls || $[25] !== shown.length) {
116
- t13 = (wrapper) => {
103
+ let t12;
104
+ if ($[18] !== density || $[19] !== loading || $[20] !== onEndReached || $[21] !== scrolls || $[22] !== shown.length) {
105
+ t12 = (wrapper) => {
117
106
  if (!onEndReached || !scrolls || loading || !shown.length || reported.current === shown.length) return;
118
107
  if (wrapper.scrollHeight - wrapper.scrollTop - wrapper.clientHeight > 4 * ROW_ESTIMATE[density]) return;
119
108
  reported.current = shown.length;
120
109
  onEndReached();
121
110
  };
122
- $[21] = density;
123
- $[22] = loading;
124
- $[23] = onEndReached;
125
- $[24] = scrolls;
126
- $[25] = shown.length;
127
- $[26] = t13;
128
- } else t13 = $[26];
129
- const reportEnd = t13;
130
- const t14 = table.page;
131
- const t15 = table.search;
132
- const t16 = table.sort?.id;
133
- const t17 = table.sort?.direction;
111
+ $[18] = density;
112
+ $[19] = loading;
113
+ $[20] = onEndReached;
114
+ $[21] = scrolls;
115
+ $[22] = shown.length;
116
+ $[23] = t12;
117
+ } else t12 = $[23];
118
+ const reportEnd = t12;
119
+ const t13 = table.page;
120
+ const t14 = table.search;
121
+ const t15 = table.sort?.id;
122
+ const t16 = table.sort?.direction;
123
+ let t17;
124
+ if ($[24] !== table.filterValues) {
125
+ t17 = JSON.stringify(table.filterValues);
126
+ $[24] = table.filterValues;
127
+ $[25] = t17;
128
+ } else t17 = $[25];
134
129
  let t18;
135
- if ($[27] !== table.filterValues) {
136
- t18 = JSON.stringify(table.filterValues);
137
- $[27] = table.filterValues;
138
- $[28] = t18;
139
- } else t18 = $[28];
140
- let t19;
141
- if ($[29] !== t16 || $[30] !== t17 || $[31] !== t18 || $[32] !== table.page || $[33] !== table.search) {
142
- t19 = [
130
+ if ($[26] !== t15 || $[27] !== t16 || $[28] !== t17 || $[29] !== table.page || $[30] !== table.search) {
131
+ t18 = [
132
+ t13,
143
133
  t14,
144
134
  t15,
145
135
  t16,
146
- t17,
147
- t18
136
+ t17
148
137
  ];
149
- $[29] = t16;
150
- $[30] = t17;
138
+ $[26] = t15;
139
+ $[27] = t16;
140
+ $[28] = t17;
141
+ $[29] = table.page;
142
+ $[30] = table.search;
151
143
  $[31] = t18;
152
- $[32] = table.page;
153
- $[33] = table.search;
144
+ } else t18 = $[31];
145
+ const view = t18.join("|");
146
+ let t19;
147
+ if ($[32] !== anchor || $[33] !== scrolls) {
148
+ t19 = () => {
149
+ if (scrolls) anchor?.closest("table")?.parentElement?.scrollTo({ top: 0 });
150
+ };
151
+ $[32] = anchor;
152
+ $[33] = scrolls;
154
153
  $[34] = t19;
155
154
  } else t19 = $[34];
156
- const view = t19.join("|");
157
155
  let t20;
158
- if ($[35] !== anchor || $[36] !== scrolls) {
159
- t20 = () => {
160
- if (scrolls) anchor?.closest("table")?.parentElement?.scrollTo({ top: 0 });
161
- };
162
- $[35] = anchor;
163
- $[36] = scrolls;
164
- $[37] = t20;
165
- } else t20 = $[37];
166
- let t21;
167
- if ($[38] !== anchor || $[39] !== scrolls || $[40] !== view) {
168
- t21 = [
156
+ if ($[35] !== anchor || $[36] !== scrolls || $[37] !== view) {
157
+ t20 = [
169
158
  anchor,
170
159
  scrolls,
171
160
  view
172
161
  ];
173
- $[38] = anchor;
174
- $[39] = scrolls;
175
- $[40] = view;
176
- $[41] = t21;
177
- } else t21 = $[41];
178
- React.useEffect(t20, t21);
179
- let t22;
180
- if ($[42] !== anchor || $[43] !== reportEnd) {
181
- t22 = () => {
162
+ $[35] = anchor;
163
+ $[36] = scrolls;
164
+ $[37] = view;
165
+ $[38] = t20;
166
+ } else t20 = $[38];
167
+ React.useEffect(t19, t20);
168
+ let t21;
169
+ if ($[39] !== anchor || $[40] !== reportEnd) {
170
+ t21 = () => {
182
171
  const wrapper_0 = anchor?.closest("table")?.parentElement;
183
172
  if (wrapper_0) reportEnd(wrapper_0);
184
173
  };
185
- $[42] = anchor;
186
- $[43] = reportEnd;
187
- $[44] = t22;
188
- } else t22 = $[44];
189
- React.useEffect(t22);
190
- let t23;
191
- if ($[45] !== lock || $[46] !== table.selectable || $[47] !== tableProps?.style) {
192
- t23 = lock ? {
174
+ $[39] = anchor;
175
+ $[40] = reportEnd;
176
+ $[41] = t21;
177
+ } else t21 = $[41];
178
+ React.useEffect(t21);
179
+ let t22;
180
+ if ($[42] !== lock || $[43] !== table.selectable || $[44] !== tableProps?.style) {
181
+ t22 = lock ? {
193
182
  width: lock.table,
194
183
  minWidth: "100%",
195
184
  ...table.selectable && { "--_check-width": `${lock.widths[0]}px` },
196
185
  ...tableProps?.style
197
186
  } : tableProps?.style;
198
- $[45] = lock;
199
- $[46] = table.selectable;
200
- $[47] = tableProps?.style;
201
- $[48] = t23;
202
- } else t23 = $[48];
203
- const t24 = tableProps?.wrapperProps;
204
- const t25 = scrolls && "oui-data-table__scroll";
205
- const t26 = tableProps?.wrapperProps?.className;
206
- let t27;
207
- if ($[49] !== t25 || $[50] !== t26) {
208
- t27 = cx(t25, t26);
209
- $[49] = t25;
210
- $[50] = t26;
211
- $[51] = t27;
212
- } else t27 = $[51];
213
- const t28 = holdsPage && shortPage ? pageHeight : void 0;
214
- const t29 = tableProps?.wrapperProps?.style;
215
- let t30;
216
- if ($[52] !== height || $[53] !== t28 || $[54] !== t29) {
217
- t30 = {
187
+ $[42] = lock;
188
+ $[43] = table.selectable;
189
+ $[44] = tableProps?.style;
190
+ $[45] = t22;
191
+ } else t22 = $[45];
192
+ const t23 = tableProps?.wrapperProps;
193
+ const t24 = scrolls && "oui-data-table__scroll";
194
+ const t25 = tableProps?.wrapperProps?.className;
195
+ let t26;
196
+ if ($[46] !== t24 || $[47] !== t25) {
197
+ t26 = cx(t24, t25);
198
+ $[46] = t24;
199
+ $[47] = t25;
200
+ $[48] = t26;
201
+ } else t26 = $[48];
202
+ const t27 = holdsPage && shortPage ? pageHeight : void 0;
203
+ const t28 = tableProps?.wrapperProps?.style;
204
+ let t29;
205
+ if ($[49] !== height || $[50] !== t27 || $[51] !== t28) {
206
+ t29 = {
218
207
  maxHeight: height,
219
- minHeight: t28,
220
- ...t29
208
+ minHeight: t27,
209
+ ...t28
221
210
  };
222
- $[52] = height;
223
- $[53] = t28;
224
- $[54] = t29;
225
- $[55] = t30;
226
- } else t30 = $[55];
227
- let t31;
228
- if ($[56] !== reportEnd || $[57] !== rows || $[58] !== tableProps?.wrapperProps) {
229
- t31 = (event) => {
211
+ $[49] = height;
212
+ $[50] = t27;
213
+ $[51] = t28;
214
+ $[52] = t29;
215
+ } else t29 = $[52];
216
+ let t30;
217
+ if ($[53] !== reportEnd || $[54] !== rows || $[55] !== tableProps?.wrapperProps) {
218
+ t30 = (event) => {
230
219
  tableProps?.wrapperProps?.onScroll?.(event);
231
220
  rows.onScroll(event);
232
221
  reportEnd(event.currentTarget);
233
222
  };
234
- $[56] = reportEnd;
235
- $[57] = rows;
236
- $[58] = tableProps?.wrapperProps;
237
- $[59] = t31;
238
- } else t31 = $[59];
239
- let t32;
240
- if ($[60] !== t24 || $[61] !== t27 || $[62] !== t30 || $[63] !== t31) {
241
- t32 = {
242
- ...t24,
243
- className: t27,
244
- style: t30,
245
- onScroll: t31
223
+ $[53] = reportEnd;
224
+ $[54] = rows;
225
+ $[55] = tableProps?.wrapperProps;
226
+ $[56] = t30;
227
+ } else t30 = $[56];
228
+ let t31;
229
+ if ($[57] !== t23 || $[58] !== t26 || $[59] !== t29 || $[60] !== t30) {
230
+ t31 = {
231
+ ...t23,
232
+ className: t26,
233
+ style: t29,
234
+ onScroll: t30
246
235
  };
247
- $[60] = t24;
248
- $[61] = t27;
249
- $[62] = t30;
250
- $[63] = t31;
251
- $[64] = t32;
252
- } else t32 = $[64];
236
+ $[57] = t23;
237
+ $[58] = t26;
238
+ $[59] = t29;
239
+ $[60] = t30;
240
+ $[61] = t31;
241
+ } else t31 = $[61];
242
+ let t32;
243
+ if ($[62] !== lock?.widths) {
244
+ t32 = lock?.widths.map(_temp3);
245
+ $[62] = lock?.widths;
246
+ $[63] = t32;
247
+ } else t32 = $[63];
253
248
  let t33;
254
- if ($[65] !== lock?.widths) {
255
- t33 = lock?.widths.map(_temp3);
256
- $[65] = lock?.widths;
257
- $[66] = t33;
258
- } else t33 = $[66];
259
- let t34;
260
- if ($[67] !== t33) {
261
- t34 = /* @__PURE__ */ jsx("colgroup", {
249
+ if ($[64] !== t32) {
250
+ t33 = /* @__PURE__ */ jsx("colgroup", {
262
251
  ref: setAnchor,
263
- children: t33
252
+ children: t32
264
253
  });
265
- $[67] = t33;
266
- $[68] = t34;
267
- } else t34 = $[68];
268
- let t35;
269
- if ($[69] !== table || $[70] !== text) {
270
- t35 = table.selectable && /* @__PURE__ */ jsx(TableHead, {
254
+ $[64] = t32;
255
+ $[65] = t33;
256
+ } else t33 = $[65];
257
+ let t34;
258
+ if ($[66] !== table || $[67] !== text) {
259
+ t34 = table.selectable && /* @__PURE__ */ jsx(TableHead, {
271
260
  className: "oui-data-table__check",
272
261
  children: /* @__PURE__ */ jsx(Checkbox, {
273
262
  size: "sm",
@@ -278,13 +267,30 @@ function DataTableContent(t0) {
278
267
  onCheckedChange: (checked) => table.toggleAll(checked)
279
268
  })
280
269
  });
281
- $[69] = table;
282
- $[70] = text;
270
+ $[66] = table;
271
+ $[67] = text;
272
+ $[68] = t34;
273
+ } else t34 = $[68];
274
+ let t35;
275
+ if ($[69] !== lock || $[70] !== table) {
276
+ t35 = (column_0) => /* @__PURE__ */ jsx(TableHead, {
277
+ align: column_0.align ?? (column_0.numeric ? "end" : "start"),
278
+ style: !lock && (column_0.width !== void 0 || column_0.minWidth !== void 0) ? {
279
+ width: column_0.width,
280
+ minWidth: column_0.minWidth
281
+ } : void 0,
282
+ "data-nowrap": column_0.nowrap || void 0,
283
+ sort: table.isSortable(column_0) ? table.sort?.id === column_0.id ? table.sort.direction : false : void 0,
284
+ onSort: () => table.toggleSort(column_0.id),
285
+ children: column_0.header
286
+ }, column_0.id);
287
+ $[69] = lock;
288
+ $[70] = table;
283
289
  $[71] = t35;
284
290
  } else t35 = $[71];
285
291
  let t36;
286
- if ($[72] !== hasActions || $[73] !== selected || $[74] !== text) {
287
- t36 = !selected && hasActions && /* @__PURE__ */ jsx(TableHead, {
292
+ if ($[72] !== hasActions || $[73] !== text) {
293
+ t36 = hasActions && /* @__PURE__ */ jsx(TableHead, {
288
294
  className: "oui-data-table__row-actions",
289
295
  children: /* @__PURE__ */ jsx("span", {
290
296
  className: "oui-visually-hidden",
@@ -292,12 +298,11 @@ function DataTableContent(t0) {
292
298
  })
293
299
  });
294
300
  $[72] = hasActions;
295
- $[73] = selected;
296
- $[74] = text;
297
- $[75] = t36;
298
- } else t36 = $[75];
301
+ $[73] = text;
302
+ $[74] = t36;
303
+ } else t36 = $[74];
299
304
  let t37;
300
- if ($[76] !== rows.before || $[77] !== span) {
305
+ if ($[75] !== rows.before || $[76] !== span) {
301
306
  t37 = rows.before > 0 && /* @__PURE__ */ jsx("tbody", {
302
307
  className: "oui-data-table__spacer",
303
308
  "aria-hidden": true,
@@ -306,10 +311,10 @@ function DataTableContent(t0) {
306
311
  children: /* @__PURE__ */ jsx("td", { colSpan: span })
307
312
  })
308
313
  });
309
- $[76] = rows.before;
310
- $[77] = span;
311
- $[78] = t37;
312
- } else t37 = $[78];
314
+ $[75] = rows.before;
315
+ $[76] = span;
316
+ $[77] = t37;
317
+ } else t37 = $[77];
313
318
  const t38 = Array.from({ length: placeholders }, (_, index_0) => /* @__PURE__ */ jsxs(TableRow, {
314
319
  "aria-hidden": true,
315
320
  children: [
@@ -335,14 +340,14 @@ function DataTableContent(t0) {
335
340
  height: rows.rowHeight
336
341
  }, entry.id));
337
342
  let t40;
338
- if ($[79] !== t38 || $[80] !== t39) {
343
+ if ($[78] !== t38 || $[79] !== t39) {
339
344
  t40 = /* @__PURE__ */ jsxs(TableBody, { children: [t38, t39] });
340
- $[79] = t38;
341
- $[80] = t39;
342
- $[81] = t40;
343
- } else t40 = $[81];
345
+ $[78] = t38;
346
+ $[79] = t39;
347
+ $[80] = t40;
348
+ } else t40 = $[80];
344
349
  let t41;
345
- if ($[82] !== rows.after || $[83] !== span) {
350
+ if ($[81] !== rows.after || $[82] !== span) {
346
351
  t41 = rows.after > 0 && /* @__PURE__ */ jsx("tbody", {
347
352
  className: "oui-data-table__spacer",
348
353
  "aria-hidden": true,
@@ -351,12 +356,12 @@ function DataTableContent(t0) {
351
356
  children: /* @__PURE__ */ jsx("td", { colSpan: span })
352
357
  })
353
358
  });
354
- $[82] = rows.after;
355
- $[83] = span;
356
- $[84] = t41;
357
- } else t41 = $[84];
359
+ $[81] = rows.after;
360
+ $[82] = span;
361
+ $[83] = t41;
362
+ } else t41 = $[83];
358
363
  let t42;
359
- if ($[85] !== empty || $[86] !== error || $[87] !== loading || $[88] !== noMatch || $[89] !== table.activeFilterCount || $[90] !== table.filtered || $[91] !== table.onRetry || $[92] !== table.reset || $[93] !== table.rows || $[94] !== text) {
364
+ if ($[84] !== empty || $[85] !== error || $[86] !== loading || $[87] !== noMatch || $[88] !== table.activeFilterCount || $[89] !== table.filtered || $[90] !== table.onRetry || $[91] !== table.reset || $[92] !== table.rows || $[93] !== text) {
360
365
  t42 = error ? /* @__PURE__ */ jsx(EmptyState, {
361
366
  role: "alert",
362
367
  title: text.errorTitle,
@@ -377,18 +382,18 @@ function DataTableContent(t0) {
377
382
  children: table.activeFilterCount ? text.clearFilters : text.clearSearch
378
383
  }) : void 0
379
384
  }));
380
- $[85] = empty;
381
- $[86] = error;
382
- $[87] = loading;
383
- $[88] = noMatch;
384
- $[89] = table.activeFilterCount;
385
- $[90] = table.filtered;
386
- $[91] = table.onRetry;
387
- $[92] = table.reset;
388
- $[93] = table.rows;
389
- $[94] = text;
390
- $[95] = t42;
391
- } else t42 = $[95];
385
+ $[84] = empty;
386
+ $[85] = error;
387
+ $[86] = loading;
388
+ $[87] = noMatch;
389
+ $[88] = table.activeFilterCount;
390
+ $[89] = table.filtered;
391
+ $[90] = table.onRetry;
392
+ $[91] = table.reset;
393
+ $[92] = table.rows;
394
+ $[93] = text;
395
+ $[94] = t42;
396
+ } else t42 = $[94];
392
397
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Table, {
393
398
  density,
394
399
  striped,
@@ -400,54 +405,15 @@ function DataTableContent(t0) {
400
405
  "data-locked": lock ? "" : void 0,
401
406
  "data-virtualized": virtual ? "" : void 0,
402
407
  "data-sticky-column": stickyFirstColumn || void 0,
403
- style: t23,
404
- wrapperProps: t32,
408
+ style: t22,
409
+ wrapperProps: t31,
405
410
  children: [
406
- t34,
411
+ t33,
407
412
  /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, {
408
413
  "aria-rowindex": virtual ? 1 : void 0,
409
- "data-selecting": selected > 0 || void 0,
410
414
  children: [
411
- t35,
412
- selected > 0 ? /* @__PURE__ */ jsx(TableHead, {
413
- colSpan: columns.length + Number(hasActions),
414
- scope: "colgroup",
415
- className: "oui-data-table__selection-head",
416
- style: { height: headerHeight },
417
- children: /* @__PURE__ */ jsxs("div", {
418
- className: "oui-data-table__selection-bar",
419
- children: [
420
- /* @__PURE__ */ jsx("span", {
421
- className: "oui-data-table__selection-count",
422
- "aria-live": "polite",
423
- children: text.selected(selected)
424
- }),
425
- /* @__PURE__ */ jsx(Tooltip, {
426
- content: text.clearSelection,
427
- children: /* @__PURE__ */ jsx(IconButton, {
428
- size: "sm",
429
- "aria-label": text.clearSelection,
430
- onClick: table.clearSelection,
431
- children: /* @__PURE__ */ jsx(XIcon, {})
432
- })
433
- }),
434
- selectionActions && /* @__PURE__ */ jsx("div", {
435
- className: "oui-data-table__selection-actions",
436
- children: selectionActions
437
- })
438
- ]
439
- })
440
- }) : columns.map((column_0) => /* @__PURE__ */ jsx(TableHead, {
441
- align: column_0.align ?? (column_0.numeric ? "end" : "start"),
442
- style: !lock && (column_0.width !== void 0 || column_0.minWidth !== void 0) ? {
443
- width: column_0.width,
444
- minWidth: column_0.minWidth
445
- } : void 0,
446
- "data-nowrap": column_0.nowrap || void 0,
447
- sort: table.isSortable(column_0) ? table.sort?.id === column_0.id ? table.sort.direction : false : void 0,
448
- onSort: () => table.toggleSort(column_0.id),
449
- children: column_0.header
450
- }, column_0.id)),
415
+ t34,
416
+ columns.map(t35),
451
417
  t36
452
418
  ]
453
419
  }) }),