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.
@@ -11,7 +11,7 @@ import {
11
11
  useSensor,
12
12
  useSensors,
13
13
  useSortable
14
- } from "./chunk-IZBJW37N.js";
14
+ } from "./chunk-6DBCT5MK.js";
15
15
  import {
16
16
  Spinner
17
17
  } from "./chunk-6ZAT5CGB.js";
@@ -741,4 +741,4 @@ var Table = ({
741
741
  export {
742
742
  Table
743
743
  };
744
- //# sourceMappingURL=chunk-NFIK3KMT.js.map
744
+ //# sourceMappingURL=chunk-2KO5ZCZC.js.map
@@ -10,6 +10,9 @@ import {
10
10
  import {
11
11
  Dropdown
12
12
  } from "./chunk-4BKTBV2I.js";
13
+ import {
14
+ Badge
15
+ } from "./chunk-3SKI6FXB.js";
13
16
  import {
14
17
  Button
15
18
  } from "./chunk-WIE7HDIM.js";
@@ -71,9 +74,8 @@ var TableFiltersDropdown = ({
71
74
  });
72
75
  return JSON.stringify(filters) !== JSON.stringify(cleanedPendingFilters);
73
76
  }, [filters, pendingFilters]);
74
- const hasActiveFilters = useMemo(() => {
75
- return Object.keys(filters).length > 0;
76
- }, [filters]);
77
+ const activeFilterCount = useMemo(() => 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__ */ jsx(
261
+ const triggerButton = /* @__PURE__ */ jsx(Badge, { content: activeFilterCount, max: 9, children: /* @__PURE__ */ jsx(
260
262
  Button,
261
263
  {
262
264
  variant: "text",
263
265
  size: "sm",
264
266
  icon: 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__ */ jsxs("div", { className: `eidos-table-filters-dropdown ${className}`, children: [
269
272
  /* @__PURE__ */ jsx("div", { className: "eidos-table-filters-header", children: /* @__PURE__ */ jsx("h4", { className: "eidos-table-filters-title", children: "Filters" }) }),
270
273
  filterRows.length > 0 && /* @__PURE__ */ jsx("div", { className: "eidos-table-filter-rows", children: filterRows.map((row) => {
@@ -4415,4 +4418,4 @@ export {
4415
4418
  sortableKeyboardCoordinates,
4416
4419
  TableFiltersDropdown
4417
4420
  };
4418
- //# sourceMappingURL=chunk-IZBJW37N.js.map
4421
+ //# sourceMappingURL=chunk-6DBCT5MK.js.map