eidos-ui 1.1.0 → 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.
@@ -12,6 +12,9 @@ var _chunkG5IGADJIcjs = require('./chunk-G5IGADJI.cjs');
12
12
  var _chunkFRUOA2QUcjs = require('./chunk-FRUOA2QU.cjs');
13
13
 
14
14
 
15
+ var _chunk3ETWFS2Ncjs = require('./chunk-3ETWFS2N.cjs');
16
+
17
+
15
18
  var _chunkA7Z2QAFZcjs = require('./chunk-A7Z2QAFZ.cjs');
16
19
 
17
20
  // src/components/Table/TableFiltersDropdown.component.tsx
@@ -71,9 +74,8 @@ var TableFiltersDropdown = ({
71
74
  });
72
75
  return JSON.stringify(filters) !== JSON.stringify(cleanedPendingFilters);
73
76
  }, [filters, pendingFilters]);
74
- const hasActiveFilters = _react.useMemo.call(void 0, () => {
75
- return Object.keys(filters).length > 0;
76
- }, [filters]);
77
+ const activeFilterCount = _react.useMemo.call(void 0, () => Object.keys(filters).length, [filters]);
78
+ const hasActiveFilters = activeFilterCount > 0;
77
79
  const getAllColumnsWithDisabledState = (currentRowId) => {
78
80
  const currentRow = filterRows.find((row) => row.id === currentRowId);
79
81
  const usedColumns = filterRows.filter((row) => row.id !== currentRowId && !row.columnKey.startsWith("__temp_")).map((row) => row.columnKey);
@@ -256,15 +258,16 @@ var TableFiltersDropdown = ({
256
258
  }
257
259
  };
258
260
  const canAddMore = filterRows.length < filterableColumns.length;
259
- const triggerButton = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
261
+ const triggerButton = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3ETWFS2Ncjs.Badge, { content: activeFilterCount, max: 9, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
260
262
  _chunkA7Z2QAFZcjs.Button,
261
263
  {
262
264
  variant: "text",
263
265
  size: "sm",
264
266
  icon: _lucidereact.Funnel,
267
+ "aria-label": hasActiveFilters ? `Filters (${activeFilterCount} active)` : "Filters",
265
268
  className: hasActiveFilters ? "eidos-table-active-filter-button" : ""
266
269
  }
267
- );
270
+ ) });
268
271
  const dropdownContent = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `eidos-table-filters-dropdown ${className}`, children: [
269
272
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-table-filters-header", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "eidos-table-filters-title", children: "Filters" }) }),
270
273
  filterRows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-table-filter-rows", children: filterRows.map((row) => {
@@ -4415,4 +4418,4 @@ function isAfter(a, b) {
4415
4418
 
4416
4419
 
4417
4420
  exports.CSS = CSS; exports.useSensor = useSensor; exports.useSensors = useSensors; exports.closestCenter = closestCenter; exports.KeyboardSensor = KeyboardSensor; exports.PointerSensor = PointerSensor; exports.DndContext = DndContext; exports.arrayMove = arrayMove; exports.horizontalListSortingStrategy = horizontalListSortingStrategy; exports.verticalListSortingStrategy = verticalListSortingStrategy; exports.SortableContext = SortableContext; exports.useSortable = useSortable; exports.sortableKeyboardCoordinates = sortableKeyboardCoordinates; exports.TableFiltersDropdown = TableFiltersDropdown;
4418
- //# sourceMappingURL=chunk-PA4IT2XQ.cjs.map
4421
+ //# sourceMappingURL=chunk-TKLWQWMT.cjs.map