eidos-ui 1.0.2 → 1.2.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 (51) hide show
  1. package/dist/Combobox.types-B7ozlnA9.d.cts +35 -0
  2. package/dist/Combobox.types-DkigkEh2.d.ts +35 -0
  3. package/dist/SegmentedControl.types-CK8EiShd.d.ts +35 -0
  4. package/dist/SegmentedControl.types-Dm4SnwCK.d.cts +35 -0
  5. package/dist/Select.types-B4kDpkGB.d.ts +42 -0
  6. package/dist/Select.types-CAkT2ACt.d.cts +42 -0
  7. package/dist/{chunk-NFIK3KMT.js → chunk-2KO5ZCZC.js} +2 -2
  8. package/dist/{chunk-IZBJW37N.js → chunk-6DBCT5MK.js} +9 -6
  9. package/dist/chunk-6DBCT5MK.js.map +1 -0
  10. package/dist/{chunk-CBLWP43O.cjs → chunk-6XB3QTHO.cjs} +212 -86
  11. package/dist/chunk-6XB3QTHO.cjs.map +1 -0
  12. package/dist/{chunk-W3X3V72Q.js → chunk-DW2YDWGN.js} +3 -3
  13. package/dist/chunk-DW2YDWGN.js.map +1 -0
  14. package/dist/{chunk-YRK56AOP.cjs → chunk-HNUTV3HR.cjs} +3 -3
  15. package/dist/chunk-HNUTV3HR.cjs.map +1 -0
  16. package/dist/{chunk-IC2M4N7R.cjs → chunk-NUK4NT5Q.cjs} +11 -11
  17. package/dist/{chunk-IC2M4N7R.cjs.map → chunk-NUK4NT5Q.cjs.map} +1 -1
  18. package/dist/{chunk-S2EICHZK.js → chunk-P2ZHWFK4.js} +202 -76
  19. package/dist/chunk-P2ZHWFK4.js.map +1 -0
  20. package/dist/{chunk-PA4IT2XQ.cjs → chunk-TKLWQWMT.cjs} +9 -6
  21. package/dist/chunk-TKLWQWMT.cjs.map +1 -0
  22. package/dist/combobox/index.cjs +2 -2
  23. package/dist/combobox/index.d.cts +4 -33
  24. package/dist/combobox/index.d.ts +4 -33
  25. package/dist/combobox/index.js +1 -1
  26. package/dist/data-grid/index.cjs +6 -3
  27. package/dist/data-grid/index.cjs.map +1 -1
  28. package/dist/data-grid/index.d.cts +100 -3
  29. package/dist/data-grid/index.d.ts +100 -3
  30. package/dist/data-grid/index.js +5 -2
  31. package/dist/index.cjs +10 -10
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.css +62 -34
  34. package/dist/index.d.cts +7 -4
  35. package/dist/index.d.ts +7 -4
  36. package/dist/index.js +9 -9
  37. package/dist/segmented-control/index.d.cts +5 -34
  38. package/dist/segmented-control/index.d.ts +5 -34
  39. package/dist/select/index.d.cts +5 -41
  40. package/dist/select/index.d.ts +5 -41
  41. package/dist/table/index.cjs +4 -3
  42. package/dist/table/index.cjs.map +1 -1
  43. package/dist/table/index.js +3 -2
  44. package/package.json +4 -7
  45. package/dist/chunk-CBLWP43O.cjs.map +0 -1
  46. package/dist/chunk-IZBJW37N.js.map +0 -1
  47. package/dist/chunk-PA4IT2XQ.cjs.map +0 -1
  48. package/dist/chunk-S2EICHZK.js.map +0 -1
  49. package/dist/chunk-W3X3V72Q.js.map +0 -1
  50. package/dist/chunk-YRK56AOP.cjs.map +0 -1
  51. /package/dist/{chunk-NFIK3KMT.js.map → chunk-2KO5ZCZC.js.map} +0 -0
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkPA4IT2XQcjs = require('./chunk-PA4IT2XQ.cjs');
14
+ var _chunkTKLWQWMTcjs = require('./chunk-TKLWQWMT.cjs');
15
15
 
16
16
 
17
17
  var _chunkTROYIUDHcjs = require('./chunk-TROYIUDH.cjs');
@@ -23,6 +23,9 @@ var _chunkEQEV7GPTcjs = require('./chunk-EQEV7GPT.cjs');
23
23
  var _chunkISABZ2VXcjs = require('./chunk-ISABZ2VX.cjs');
24
24
 
25
25
 
26
+ var _chunkDKZTDYH5cjs = require('./chunk-DKZTDYH5.cjs');
27
+
28
+
26
29
  var _chunkHLNKIAE5cjs = require('./chunk-HLNKIAE5.cjs');
27
30
 
28
31
 
@@ -32,6 +35,9 @@ var _chunkKV3V2CPHcjs = require('./chunk-KV3V2CPH.cjs');
32
35
  var _chunkIJ4DXG7Dcjs = require('./chunk-IJ4DXG7D.cjs');
33
36
 
34
37
 
38
+ var _chunkHNUTV3HRcjs = require('./chunk-HNUTV3HR.cjs');
39
+
40
+
35
41
  var _chunkG5IGADJIcjs = require('./chunk-G5IGADJI.cjs');
36
42
 
37
43
 
@@ -65,13 +71,20 @@ var _reactdom = require('react-dom');
65
71
  var _lucidereact = require('lucide-react');
66
72
  var _jsxruntime = require('react/jsx-runtime');
67
73
  var MIN_COLUMN_WIDTH_PX = 100;
74
+ var QUICK_FILTER_RESET_VALUE = "";
75
+ var hasFilterValue = (value) => {
76
+ if (value === void 0 || value === null || value === "") return false;
77
+ if (Array.isArray(value)) return value.length > 0;
78
+ if (typeof value === "object" && "start" in value) return !!(value.start || value.end);
79
+ return true;
80
+ };
68
81
  function SortableTableRow({
69
82
  id,
70
83
  disabled,
71
84
  className,
72
85
  children
73
86
  }) {
74
- const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunkPA4IT2XQcjs.useSortable.call(void 0, {
87
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunkTKLWQWMTcjs.useSortable.call(void 0, {
75
88
  id,
76
89
  disabled
77
90
  });
@@ -81,7 +94,7 @@ function SortableTableRow({
81
94
  ref: setNodeRef,
82
95
  className: [className, isDragging ? "eidos-datagrid-row--dragging" : ""].filter(Boolean).join(" "),
83
96
  style: {
84
- transform: _chunkPA4IT2XQcjs.CSS.Transform.toString(transform),
97
+ transform: _chunkTKLWQWMTcjs.CSS.Transform.toString(transform),
85
98
  transition: _nullishCoalesce(transition, () => ( void 0)),
86
99
  opacity: isDragging ? 0.4 : 1
87
100
  },
@@ -176,6 +189,8 @@ function DataGridInner({
176
189
  filterConfig = [],
177
190
  filters,
178
191
  onFiltersChange,
192
+ // ── Quick filters ──────────────────────────────────────────────────────────
193
+ quickFilters = [],
179
194
  // ── Pagination ─────────────────────────────────────────────────────────────
180
195
  showPagination = false,
181
196
  pageSize = 10,
@@ -238,7 +253,13 @@ function DataGridInner({
238
253
  );
239
254
  const effectiveDensity = showDensity ? internalDensity : density;
240
255
  const [internalSort, setInternalSort] = _react.useState.call(void 0, null);
241
- const [internalFilters, setInternalFilters] = _react.useState.call(void 0, {});
256
+ const [internalFilters, setInternalFilters] = _react.useState.call(void 0, () => {
257
+ const seeded = {};
258
+ quickFilters.forEach(({ key, defaultValue }) => {
259
+ if (hasFilterValue(defaultValue)) seeded[key] = defaultValue;
260
+ });
261
+ return seeded;
262
+ });
242
263
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
243
264
  const [currentPageSize, setCurrentPageSize] = _react.useState.call(void 0, pageSize);
244
265
  const isControlledSelection = controlledSelectedRows !== void 0;
@@ -319,8 +340,9 @@ function DataGridInner({
319
340
  () => new Set(isControlledExpansion ? _nullishCoalesce(controlledExpandedRows, () => ( [])) : [...internalExpandedKeys]),
320
341
  [isControlledExpansion, controlledExpandedRows, internalExpandedKeys]
321
342
  );
343
+ const quickFilterKeys = _react.useMemo.call(void 0, () => new Set(quickFilters.map((f) => f.key)), [quickFilters]);
322
344
  const filterDropdownColumns = _react.useMemo.call(void 0, () => {
323
- return filterConfig.map(
345
+ return filterConfig.filter((field) => !quickFilterKeys.has(field.key)).map(
324
346
  (field) => ({
325
347
  key: field.key,
326
348
  label: field.label,
@@ -330,7 +352,17 @@ function DataGridInner({
330
352
  dateFilterMode: field.dateFilterMode
331
353
  })
332
354
  );
333
- }, [filterConfig]);
355
+ }, [filterConfig, quickFilterKeys]);
356
+ const dropdownFilterKeys = _react.useMemo.call(void 0,
357
+ () => new Set(filterDropdownColumns.map((col) => String(col.key))),
358
+ [filterDropdownColumns]
359
+ );
360
+ const dropdownFilters = _react.useMemo.call(void 0,
361
+ () => Object.fromEntries(
362
+ Object.entries(activeFilters).filter(([key]) => dropdownFilterKeys.has(key))
363
+ ),
364
+ [activeFilters, dropdownFilterKeys]
365
+ );
334
366
  const filteredData = _react.useMemo.call(void 0, () => {
335
367
  if (onFiltersChange) return localData;
336
368
  const filterEntries = Object.entries(activeFilters).filter(([, val]) => {
@@ -667,7 +699,7 @@ function DataGridInner({
667
699
  },
668
700
  [onSortChange, currentSort]
669
701
  );
670
- const handleFiltersChange = _react.useCallback.call(void 0,
702
+ const commitFilters = _react.useCallback.call(void 0,
671
703
  (newFilters) => {
672
704
  setCurrentPage(1);
673
705
  if (onFiltersChange) {
@@ -678,6 +710,28 @@ function DataGridInner({
678
710
  },
679
711
  [onFiltersChange]
680
712
  );
713
+ const handleFiltersChange = _react.useCallback.call(void 0,
714
+ (newFilters) => {
715
+ const preserved = Object.entries(activeFilters).filter(
716
+ ([key]) => !dropdownFilterKeys.has(key)
717
+ );
718
+ commitFilters({ ...Object.fromEntries(preserved), ...newFilters });
719
+ },
720
+ [activeFilters, dropdownFilterKeys, commitFilters]
721
+ );
722
+ const handleQuickFilterChange = _react.useCallback.call(void 0,
723
+ (key, value) => {
724
+ const next = { ...activeFilters };
725
+ if (hasFilterValue(value)) {
726
+ next[key] = value;
727
+ } else {
728
+ delete next[key];
729
+ }
730
+ commitFilters(next);
731
+ },
732
+ [activeFilters, commitFilters]
733
+ );
734
+ const clearAllFilters = _react.useCallback.call(void 0, () => commitFilters({}), [commitFilters]);
681
735
  const handlePageChange = _react.useCallback.call(void 0,
682
736
  (page) => {
683
737
  setCurrentPage(page);
@@ -693,9 +747,9 @@ function DataGridInner({
693
747
  },
694
748
  [onPageChange]
695
749
  );
696
- const sensors = _chunkPA4IT2XQcjs.useSensors.call(void 0,
697
- _chunkPA4IT2XQcjs.useSensor.call(void 0, _chunkPA4IT2XQcjs.PointerSensor, { activationConstraint: { distance: 5 } }),
698
- _chunkPA4IT2XQcjs.useSensor.call(void 0, _chunkPA4IT2XQcjs.KeyboardSensor)
750
+ const sensors = _chunkTKLWQWMTcjs.useSensors.call(void 0,
751
+ _chunkTKLWQWMTcjs.useSensor.call(void 0, _chunkTKLWQWMTcjs.PointerSensor, { activationConstraint: { distance: 5 } }),
752
+ _chunkTKLWQWMTcjs.useSensor.call(void 0, _chunkTKLWQWMTcjs.KeyboardSensor)
699
753
  );
700
754
  const handleRowDragEnd = _react.useCallback.call(void 0,
701
755
  (event) => {
@@ -709,7 +763,7 @@ function DataGridInner({
709
763
  (row, i) => String(_nullishCoalesce(row[rowKey], () => ( i))) === String(over.id)
710
764
  );
711
765
  if (oldIndex === -1 || newIndex === -1) return;
712
- const newData = _chunkPA4IT2XQcjs.arrayMove.call(void 0, localDataRef.current, oldIndex, newIndex);
766
+ const newData = _chunkTKLWQWMTcjs.arrayMove.call(void 0, localDataRef.current, oldIndex, newIndex);
713
767
  setLocalData(newData);
714
768
  _optionalChain([onChange, 'optionalCall', _26 => _26(newData)]);
715
769
  _optionalChain([onRowReorder, 'optionalCall', _27 => _27(newData)]);
@@ -899,7 +953,82 @@ function DataGridInner({
899
953
  if (stickyHeader && maxHeight) {
900
954
  containerStyle.maxHeight = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
901
955
  }
902
- const showToolbar = !!showFilters || !!showDensity || !!selectable || !!onRowAdd;
956
+ const showToolbar = !!showFilters || quickFilters.length > 0 || !!showDensity || !!selectable || !!onRowAdd;
957
+ const showQuickFilters = quickFilters.length > 0 && !(selectable && hasSelection);
958
+ const renderQuickFilter = (quickFilter) => {
959
+ const { key, label, disabled, width } = quickFilter;
960
+ const value = activeFilters[key];
961
+ const style = width === void 0 ? void 0 : {
962
+ "--eidos-datagrid-quick-filter-width": typeof width === "number" ? `${width}px` : width
963
+ };
964
+ const control = (() => {
965
+ switch (quickFilter.type) {
966
+ case "segmented":
967
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
968
+ _chunkDKZTDYH5cjs.SegmentedControl,
969
+ {
970
+ size: "sm",
971
+ color: quickFilter.color,
972
+ disabled,
973
+ options: [
974
+ { value: QUICK_FILTER_RESET_VALUE, label: _nullishCoalesce(quickFilter.allLabel, () => ( "All")) },
975
+ ...quickFilter.options
976
+ ],
977
+ value: typeof value === "string" ? value : QUICK_FILTER_RESET_VALUE,
978
+ onChange: (next) => handleQuickFilterChange(key, next)
979
+ }
980
+ );
981
+ case "combobox":
982
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
983
+ _chunkHNUTV3HRcjs.Combobox,
984
+ {
985
+ size: "sm",
986
+ fullWidth: true,
987
+ disabled,
988
+ placeholder: _nullishCoalesce(quickFilter.placeholder, () => ( label)),
989
+ clearable: _nullishCoalesce(quickFilter.clearable, () => ( true)),
990
+ emptyText: quickFilter.emptyText,
991
+ loading: quickFilter.loading,
992
+ loadingText: quickFilter.loadingText,
993
+ onSearch: quickFilter.onSearch,
994
+ options: (_nullishCoalesce(quickFilter.options, () => ( []))).map((option) => ({
995
+ ...option,
996
+ id: option.value
997
+ })),
998
+ value: typeof value === "string" ? value : "",
999
+ onChange: (next) => handleQuickFilterChange(key, next)
1000
+ }
1001
+ );
1002
+ case "select":
1003
+ default:
1004
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1005
+ _chunkHLNKIAE5cjs.Select,
1006
+ {
1007
+ fullWidth: true,
1008
+ inputProps: { size: "sm" },
1009
+ disabled,
1010
+ placeholder: _nullishCoalesce(quickFilter.placeholder, () => ( label)),
1011
+ clearable: _nullishCoalesce(quickFilter.clearable, () => ( true)),
1012
+ multiple: quickFilter.multiple,
1013
+ options: quickFilter.options.map((option) => ({ ...option, id: option.value })),
1014
+ value: quickFilter.multiple ? Array.isArray(value) ? value : [] : typeof value === "string" ? value : "",
1015
+ onChange: (next) => handleQuickFilterChange(key, next)
1016
+ }
1017
+ );
1018
+ }
1019
+ })();
1020
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1021
+ "div",
1022
+ {
1023
+ className: `eidos-datagrid-quick-filter eidos-datagrid-quick-filter--${quickFilter.type}`,
1024
+ style,
1025
+ role: "group",
1026
+ "aria-label": label,
1027
+ children: control
1028
+ },
1029
+ key
1030
+ );
1031
+ };
903
1032
  const densityClass = effectiveDensity !== "comfortable" ? `eidos-datagrid--${effectiveDensity}` : "";
904
1033
  const effectivePageSizeOptions = _react.useMemo.call(void 0, () => {
905
1034
  const opts = _nullishCoalesce(pageSizeOptions, () => ( [10, 25, 50, 100]));
@@ -939,72 +1068,75 @@ function DataGridInner({
939
1068
  style: containerStyle,
940
1069
  children: [
941
1070
  showToolbar && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-datagrid-toolbar", children: [
942
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-datagrid-toolbar-left", children: selectable && hasSelection && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
943
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "eidos-datagrid-selection-count", children: [
944
- selectedSet.size,
945
- " selected"
946
- ] }),
947
- bulkActions && bulkActions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-datagrid-bulk-actions", children: bulkActions.map((action) => {
948
- const isDisabled = typeof action.disabled === "function" ? action.disabled(selectedItems) : _nullishCoalesce(action.disabled, () => ( false));
949
- if (action.type === "split-button") {
950
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
951
- _chunkEQEV7GPTcjs.SplitButton,
1071
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-datagrid-toolbar-left", children: [
1072
+ showQuickFilters && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-datagrid-quick-filters", children: quickFilters.map(renderQuickFilter) }),
1073
+ selectable && hasSelection && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1074
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "eidos-datagrid-selection-count", children: [
1075
+ selectedSet.size,
1076
+ " selected"
1077
+ ] }),
1078
+ bulkActions && bulkActions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-datagrid-bulk-actions", children: bulkActions.map((action) => {
1079
+ const isDisabled = typeof action.disabled === "function" ? action.disabled(selectedItems) : _nullishCoalesce(action.disabled, () => ( false));
1080
+ if (action.type === "split-button") {
1081
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1082
+ _chunkEQEV7GPTcjs.SplitButton,
1083
+ {
1084
+ size: "sm",
1085
+ variant: _nullishCoalesce(action.variant, () => ( "outlined")),
1086
+ color: _nullishCoalesce(action.color, () => ( "secondary")),
1087
+ preIcon: action.icon,
1088
+ disabled: isDisabled,
1089
+ label: action.label,
1090
+ onClick: () => action.onClick(selectedItems),
1091
+ options: action.options.map((option) => ({
1092
+ id: option.id,
1093
+ label: option.label,
1094
+ icon: option.icon,
1095
+ disabled: option.disabled,
1096
+ onClick: () => option.onClick(selectedItems)
1097
+ }))
1098
+ },
1099
+ action.id
1100
+ );
1101
+ }
1102
+ return action.label ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1103
+ _chunkA7Z2QAFZcjs.Button,
952
1104
  {
953
1105
  size: "sm",
954
1106
  variant: _nullishCoalesce(action.variant, () => ( "outlined")),
955
1107
  color: _nullishCoalesce(action.color, () => ( "secondary")),
956
1108
  preIcon: action.icon,
1109
+ posIcon: action.posIcon,
957
1110
  disabled: isDisabled,
958
- label: action.label,
959
1111
  onClick: () => action.onClick(selectedItems),
960
- options: action.options.map((option) => ({
961
- id: option.id,
962
- label: option.label,
963
- icon: option.icon,
964
- disabled: option.disabled,
965
- onClick: () => option.onClick(selectedItems)
966
- }))
1112
+ children: action.label
967
1113
  },
968
1114
  action.id
969
- );
970
- }
971
- return action.label ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
972
- _chunkA7Z2QAFZcjs.Button,
973
- {
974
- size: "sm",
975
- variant: _nullishCoalesce(action.variant, () => ( "outlined")),
976
- color: _nullishCoalesce(action.color, () => ( "secondary")),
977
- preIcon: action.icon,
978
- posIcon: action.posIcon,
979
- disabled: isDisabled,
980
- onClick: () => action.onClick(selectedItems),
981
- children: action.label
982
- },
983
- action.id
984
- ) : action.icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
985
- _chunkA7Z2QAFZcjs.Button,
1115
+ ) : action.icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1116
+ _chunkA7Z2QAFZcjs.Button,
1117
+ {
1118
+ size: "sm",
1119
+ variant: _nullishCoalesce(action.variant, () => ( "outlined")),
1120
+ color: _nullishCoalesce(action.color, () => ( "secondary")),
1121
+ icon: action.icon,
1122
+ disabled: isDisabled,
1123
+ onClick: () => action.onClick(selectedItems)
1124
+ },
1125
+ action.id
1126
+ ) : null;
1127
+ }) }),
1128
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1129
+ "button",
986
1130
  {
987
- size: "sm",
988
- variant: _nullishCoalesce(action.variant, () => ( "outlined")),
989
- color: _nullishCoalesce(action.color, () => ( "secondary")),
990
- icon: action.icon,
991
- disabled: isDisabled,
992
- onClick: () => action.onClick(selectedItems)
993
- },
994
- action.id
995
- ) : null;
996
- }) }),
997
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
998
- "button",
999
- {
1000
- type: "button",
1001
- className: "eidos-datagrid-clear-selection",
1002
- onClick: clearSelection,
1003
- "aria-label": "Clear selection",
1004
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { size: 14 })
1005
- }
1006
- )
1007
- ] }) }),
1131
+ type: "button",
1132
+ className: "eidos-datagrid-clear-selection",
1133
+ onClick: clearSelection,
1134
+ "aria-label": "Clear selection",
1135
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { size: 14 })
1136
+ }
1137
+ )
1138
+ ] })
1139
+ ] }),
1008
1140
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-datagrid-toolbar-right", children: [
1009
1141
  showDensity && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1010
1142
  _chunkFRUOA2QUcjs.Dropdown,
@@ -1035,10 +1167,10 @@ function DataGridInner({
1035
1167
  }
1036
1168
  ),
1037
1169
  showFilters && filterDropdownColumns.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1038
- _chunkPA4IT2XQcjs.TableFiltersDropdown,
1170
+ _chunkTKLWQWMTcjs.TableFiltersDropdown,
1039
1171
  {
1040
1172
  columns: filterDropdownColumns,
1041
- filters: activeFilters,
1173
+ filters: dropdownFilters,
1042
1174
  onFiltersChange: handleFiltersChange
1043
1175
  }
1044
1176
  ),
@@ -1129,16 +1261,7 @@ function DataGridInner({
1129
1261
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchX, {}),
1130
1262
  title: "No results found",
1131
1263
  description: "Try adjusting your filters or search terms.",
1132
- action: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1133
- _chunkA7Z2QAFZcjs.Button,
1134
- {
1135
- size: "sm",
1136
- variant: "outlined",
1137
- color: "primary",
1138
- onClick: () => handleFiltersChange({}),
1139
- children: "Clear filters"
1140
- }
1141
- ),
1264
+ action: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkA7Z2QAFZcjs.Button, { size: "sm", variant: "outlined", color: "primary", onClick: clearAllFilters, children: "Clear filters" }),
1142
1265
  size: "sm"
1143
1266
  }
1144
1267
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1153,10 +1276,10 @@ function DataGridInner({
1153
1276
  }
1154
1277
  )
1155
1278
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1156
- _chunkPA4IT2XQcjs.DndContext,
1279
+ _chunkTKLWQWMTcjs.DndContext,
1157
1280
  {
1158
1281
  sensors,
1159
- collisionDetection: _chunkPA4IT2XQcjs.closestCenter,
1282
+ collisionDetection: _chunkTKLWQWMTcjs.closestCenter,
1160
1283
  onDragEnd: handleRowDragEnd,
1161
1284
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-data-grid-scroll", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: ["eidos-data-grid", densityClass].filter(Boolean).join(" "), children: [
1162
1285
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { ref: theadRef, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { children: [
@@ -1223,6 +1346,7 @@ function DataGridInner({
1223
1346
  const isSortable = !!col.sortable;
1224
1347
  const isCurrentlySorted = _optionalChain([activeSort, 'optionalAccess', _34 => _34.key]) === colKey;
1225
1348
  const sortDir = isCurrentlySorted ? activeSort.direction : null;
1349
+ const alignClass = `eidos-datagrid-align-${_nullishCoalesce(col.align, () => ( "left"))}`;
1226
1350
  const { style: pinnedStyle, className: pinnedClass } = getHeaderPinnedProps(colKey);
1227
1351
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1228
1352
  "th",
@@ -1231,6 +1355,7 @@ function DataGridInner({
1231
1355
  "eidos-data-grid-header-cell",
1232
1356
  isSortable && "eidos-datagrid-header-cell--sortable",
1233
1357
  isCurrentlySorted && "eidos-datagrid-header-cell--sorted",
1358
+ alignClass,
1234
1359
  pinnedClass
1235
1360
  ].filter(Boolean).join(" "),
1236
1361
  style: {
@@ -1240,7 +1365,7 @@ function DataGridInner({
1240
1365
  },
1241
1366
  "data-col-key": colKey,
1242
1367
  onClick: isSortable ? () => handleSortClick(colKey) : void 0,
1243
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "eidos-datagrid-header-content", children: [
1368
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `eidos-datagrid-header-content ${alignClass}`, children: [
1244
1369
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "eidos-datagrid-header-label", children: col.header }),
1245
1370
  isSortable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "eidos-datagrid-sort-icon", children: [
1246
1371
  sortDir === "asc" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowUp, { size: 14 }),
@@ -1260,7 +1385,7 @@ function DataGridInner({
1260
1385
  }
1261
1386
  )
1262
1387
  ] }) }),
1263
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPA4IT2XQcjs.SortableContext, { items: rowIds, strategy: _chunkPA4IT2XQcjs.verticalListSortingStrategy, children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1388
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTKLWQWMTcjs.SortableContext, { items: rowIds, strategy: _chunkTKLWQWMTcjs.verticalListSortingStrategy, children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1264
1389
  const localIndex = localData.indexOf(row);
1265
1390
  const rowKeyValue = String(_nullishCoalesce(row[rowKey], () => ( displayIndex)));
1266
1391
  const isRowSelected = selectable && selectedSet.has(rowKeyValue);
@@ -1377,6 +1502,7 @@ function DataGridInner({
1377
1502
  isFlagged && !hasError && "eidos-data-grid-cell--has-error",
1378
1503
  canEdit && !isEditing && "eidos-data-grid-cell--editable",
1379
1504
  col.type === "readonly" && "eidos-data-grid-cell--readonly",
1505
+ `eidos-datagrid-align-${_nullishCoalesce(col.align, () => ( "left"))}`,
1380
1506
  pinnedClass
1381
1507
  ].filter(Boolean).join(" ");
1382
1508
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1431,7 +1557,7 @@ function DataGridInner({
1431
1557
  size: "sm",
1432
1558
  variant: "outlined",
1433
1559
  color: "primary",
1434
- onClick: () => handleFiltersChange({}),
1560
+ onClick: clearAllFilters,
1435
1561
  children: "Clear filters"
1436
1562
  }
1437
1563
  ),
@@ -1483,4 +1609,4 @@ var DataGrid = Object.assign(DataGridInner, { displayName: "DataGrid" });
1483
1609
 
1484
1610
 
1485
1611
  exports.DataGrid = DataGrid;
1486
- //# sourceMappingURL=chunk-CBLWP43O.cjs.map
1612
+ //# sourceMappingURL=chunk-6XB3QTHO.cjs.map