@gears-frontx/ui-kit 0.4.3 → 0.4.5

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 (205) hide show
  1. package/README.md +4 -1
  2. package/dist/chunks/data-grid.DYrZEU-F.css +1 -0
  3. package/dist/chunks/debounce.js +17 -0
  4. package/dist/chunks/debounce.js.map +1 -0
  5. package/dist/chunks/dialog.CIR9bQoU.css +1 -0
  6. package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
  7. package/dist/chunks/empty.Cfg5lE0n.css +1 -0
  8. package/dist/chunks/filters.DcFdZpNG.css +1 -0
  9. package/dist/chunks/hooked.js +52 -0
  10. package/dist/chunks/hooked.js.map +1 -0
  11. package/dist/chunks/messages.js +18 -3
  12. package/dist/chunks/messages.js.map +1 -1
  13. package/dist/chunks/pagination.DPVITj_D.css +1 -0
  14. package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
  15. package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
  16. package/dist/chunks/tabs.BqhiMRUP.css +1 -0
  17. package/dist/components/data-grid/components/filter-chip.d.ts +21 -0
  18. package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -0
  19. package/dist/components/data-grid/components/filter-control-area.d.ts +9 -0
  20. package/dist/components/data-grid/components/filter-control-area.d.ts.map +1 -0
  21. package/dist/components/data-grid/components/filter-options-search-input.d.ts +11 -0
  22. package/dist/components/data-grid/components/filter-options-search-input.d.ts.map +1 -0
  23. package/dist/components/data-grid/components/filter-popover-content.d.ts +8 -0
  24. package/dist/components/data-grid/components/filter-popover-content.d.ts.map +1 -0
  25. package/dist/components/data-grid/components/filter-reset-button.d.ts +8 -0
  26. package/dist/components/data-grid/components/filter-reset-button.d.ts.map +1 -0
  27. package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts +8 -0
  28. package/dist/components/data-grid/components/filter-scrollable-wrapper.d.ts.map +1 -0
  29. package/dist/components/data-grid/messages.d.ts +15 -0
  30. package/dist/components/data-grid/messages.d.ts.map +1 -1
  31. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts +20 -0
  32. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -0
  33. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts +3 -0
  34. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -0
  35. package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts +7 -0
  36. package/dist/components/data-grid/plugins/filters/components/all-filters-dialog.d.ts.map +1 -0
  37. package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts +9 -0
  38. package/dist/components/data-grid/plugins/filters/components/dialog-filter-item.d.ts.map +1 -0
  39. package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts +7 -0
  40. package/dist/components/data-grid/plugins/filters/components/filter-label.d.ts.map +1 -0
  41. package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts +9 -0
  42. package/dist/components/data-grid/plugins/filters/components/filter-popover.d.ts.map +1 -0
  43. package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts +7 -0
  44. package/dist/components/data-grid/plugins/filters/components/filter-single.d.ts.map +1 -0
  45. package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts +3 -0
  46. package/dist/components/data-grid/plugins/filters/components/filters-bar.d.ts.map +1 -0
  47. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts +7 -0
  48. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-dialog-filter.d.ts.map +1 -0
  49. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts +12 -0
  50. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-list.d.ts.map +1 -0
  51. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts +7 -0
  52. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/checkbox-group-quick-filter.d.ts.map +1 -0
  53. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts +20 -0
  54. package/dist/components/data-grid/plugins/filters/entities/checkbox-group/filter-checkbox-group.d.ts.map +1 -0
  55. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts +17 -0
  56. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-calendar.d.ts.map +1 -0
  57. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts +7 -0
  58. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-dialog-filter.d.ts.map +1 -0
  59. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts +7 -0
  60. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-quick-filter.d.ts.map +1 -0
  61. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts +16 -0
  62. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-selection.d.ts.map +1 -0
  63. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts +19 -0
  64. package/dist/components/data-grid/plugins/filters/entities/date-range/date-range-value.d.ts.map +1 -0
  65. package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts +16 -0
  66. package/dist/components/data-grid/plugins/filters/entities/date-range/filter-date-range.d.ts.map +1 -0
  67. package/dist/components/data-grid/plugins/filters/entities/entities.d.ts +7 -0
  68. package/dist/components/data-grid/plugins/filters/entities/entities.d.ts.map +1 -0
  69. package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts +10 -0
  70. package/dist/components/data-grid/plugins/filters/entities/search/filter-search.d.ts.map +1 -0
  71. package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts +7 -0
  72. package/dist/components/data-grid/plugins/filters/entities/search/search-quick-filter.d.ts.map +1 -0
  73. package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts +14 -0
  74. package/dist/components/data-grid/plugins/filters/entities/tag-group/filter-tag-group.d.ts.map +1 -0
  75. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts +7 -0
  76. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-dialog-filter.d.ts.map +1 -0
  77. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts +11 -0
  78. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-list.d.ts.map +1 -0
  79. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts +7 -0
  80. package/dist/components/data-grid/plugins/filters/entities/tag-group/tag-group-quick-filter.d.ts.map +1 -0
  81. package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts +10 -0
  82. package/dist/components/data-grid/plugins/filters/entities/toggle/filter-toggle.d.ts.map +1 -0
  83. package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts +7 -0
  84. package/dist/components/data-grid/plugins/filters/entities/toggle/toggle-quick-filter.d.ts.map +1 -0
  85. package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts +20 -0
  86. package/dist/components/data-grid/plugins/filters/entities/tree/filter-tree.d.ts.map +1 -0
  87. package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts +8 -0
  88. package/dist/components/data-grid/plugins/filters/entities/tree/resolve-filter-tree-value.d.ts.map +1 -0
  89. package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts +7 -0
  90. package/dist/components/data-grid/plugins/filters/entities/tree/tree-dialog-filter.d.ts.map +1 -0
  91. package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts +12 -0
  92. package/dist/components/data-grid/plugins/filters/entities/tree/tree-list.d.ts.map +1 -0
  93. package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts +7 -0
  94. package/dist/components/data-grid/plugins/filters/entities/tree/tree-quick-filter.d.ts.map +1 -0
  95. package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts +13 -0
  96. package/dist/components/data-grid/plugins/filters/entities/tree/tree-radio-select-plugin.d.ts.map +1 -0
  97. package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts +8 -0
  98. package/dist/components/data-grid/plugins/filters/entities/tree/use-tree-search.d.ts.map +1 -0
  99. package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts +3 -0
  100. package/dist/components/data-grid/plugins/filters/filters-plugin.d.ts.map +1 -0
  101. package/dist/components/data-grid/plugins/filters/filters-types.d.ts +141 -0
  102. package/dist/components/data-grid/plugins/filters/filters-types.d.ts.map +1 -0
  103. package/dist/components/data-grid/plugins/filters/public.d.ts +11 -0
  104. package/dist/components/data-grid/plugins/filters/public.d.ts.map +1 -0
  105. package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts +7 -0
  106. package/dist/components/data-grid/plugins/filters/services/read-option-values.d.ts.map +1 -0
  107. package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts +20 -0
  108. package/dist/components/data-grid/plugins/filters/services/use-async-filter-search.d.ts.map +1 -0
  109. package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts +12 -0
  110. package/dist/components/data-grid/plugins/filters/services/use-filter-search.d.ts.map +1 -0
  111. package/dist/components/data-grid/tree/components/tree-actions.d.ts +7 -0
  112. package/dist/components/data-grid/tree/components/tree-actions.d.ts.map +1 -0
  113. package/dist/components/data-grid/tree/components/tree-content.d.ts +3 -0
  114. package/dist/components/data-grid/tree/components/tree-content.d.ts.map +1 -0
  115. package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts +9 -0
  116. package/dist/components/data-grid/tree/components/tree-layout-slot.d.ts.map +1 -0
  117. package/dist/components/data-grid/tree/components/tree-left-slot.d.ts +7 -0
  118. package/dist/components/data-grid/tree/components/tree-left-slot.d.ts.map +1 -0
  119. package/dist/components/data-grid/tree/components/tree-list-item.d.ts +10 -0
  120. package/dist/components/data-grid/tree/components/tree-list-item.d.ts.map +1 -0
  121. package/dist/components/data-grid/tree/components/tree-main.d.ts +3 -0
  122. package/dist/components/data-grid/tree/components/tree-main.d.ts.map +1 -0
  123. package/dist/components/data-grid/tree/components/tree-node-content.d.ts +7 -0
  124. package/dist/components/data-grid/tree/components/tree-node-content.d.ts.map +1 -0
  125. package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts +7 -0
  126. package/dist/components/data-grid/tree/components/tree-node-directory-item.d.ts.map +1 -0
  127. package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts +7 -0
  128. package/dist/components/data-grid/tree/components/tree-node-leaf.d.ts.map +1 -0
  129. package/dist/components/data-grid/tree/components/tree-nodes.d.ts +7 -0
  130. package/dist/components/data-grid/tree/components/tree-nodes.d.ts.map +1 -0
  131. package/dist/components/data-grid/tree/components/tree-placeholder.d.ts +6 -0
  132. package/dist/components/data-grid/tree/components/tree-placeholder.d.ts.map +1 -0
  133. package/dist/components/data-grid/tree/create-tree.d.ts +5 -0
  134. package/dist/components/data-grid/tree/create-tree.d.ts.map +1 -0
  135. package/dist/components/data-grid/tree/services/core/tree-context.d.ts +21 -0
  136. package/dist/components/data-grid/tree/services/core/tree-context.d.ts.map +1 -0
  137. package/dist/components/data-grid/tree/services/focus/focus-service.d.ts +5 -0
  138. package/dist/components/data-grid/tree/services/focus/focus-service.d.ts.map +1 -0
  139. package/dist/components/data-grid/tree/services/focus/focus-types.d.ts +25 -0
  140. package/dist/components/data-grid/tree/services/focus/focus-types.d.ts.map +1 -0
  141. package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts +27 -0
  142. package/dist/components/data-grid/tree/services/focus/navigation-helpers.d.ts.map +1 -0
  143. package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts +8 -0
  144. package/dist/components/data-grid/tree/services/hooked/hooked-types.d.ts.map +1 -0
  145. package/dist/components/data-grid/tree/services/hooked/hooked.d.ts +3 -0
  146. package/dist/components/data-grid/tree/services/hooked/hooked.d.ts.map +1 -0
  147. package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts +2 -0
  148. package/dist/components/data-grid/tree/services/internal/internal-helpers.d.ts.map +1 -0
  149. package/dist/components/data-grid/tree/services/layout/layout-service.d.ts +5 -0
  150. package/dist/components/data-grid/tree/services/layout/layout-service.d.ts.map +1 -0
  151. package/dist/components/data-grid/tree/services/layout/layout-types.d.ts +124 -0
  152. package/dist/components/data-grid/tree/services/layout/layout-types.d.ts.map +1 -0
  153. package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts +50 -0
  154. package/dist/components/data-grid/tree/services/plugins/plugins-helpers.d.ts.map +1 -0
  155. package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts +5 -0
  156. package/dist/components/data-grid/tree/services/plugins/plugins-service.d.ts.map +1 -0
  157. package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts +43 -0
  158. package/dist/components/data-grid/tree/services/plugins/plugins-types.d.ts.map +1 -0
  159. package/dist/components/data-grid/tree/services/settings/settings-service.d.ts +5 -0
  160. package/dist/components/data-grid/tree/services/settings/settings-service.d.ts.map +1 -0
  161. package/dist/components/data-grid/tree/services/settings/settings-types.d.ts +73 -0
  162. package/dist/components/data-grid/tree/services/settings/settings-types.d.ts.map +1 -0
  163. package/dist/components/data-grid/tree/tree-types.d.ts +44 -0
  164. package/dist/components/data-grid/tree/tree-types.d.ts.map +1 -0
  165. package/dist/components/data-grid/tree/tree.d.ts +4 -0
  166. package/dist/components/data-grid/tree/tree.d.ts.map +1 -0
  167. package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts +89 -0
  168. package/dist/components/data-grid/tree-structure/tree-structure-types.d.ts.map +1 -0
  169. package/dist/components/data-grid/tree-structure/tree-structure.d.ts +19 -0
  170. package/dist/components/data-grid/tree-structure/tree-structure.d.ts.map +1 -0
  171. package/dist/components/data-grid/utils/components-stack.d.ts +12 -0
  172. package/dist/components/data-grid/utils/components-stack.d.ts.map +1 -0
  173. package/dist/components/data-grid/utils/use-is-tablet-up.d.ts +3 -0
  174. package/dist/components/data-grid/utils/use-is-tablet-up.d.ts.map +1 -0
  175. package/dist/data-grid/filters.d.ts +1 -0
  176. package/dist/data-grid/filters.js +1633 -0
  177. package/dist/data-grid/filters.js.map +1 -0
  178. package/dist/data-grid/pagination.js +39 -38
  179. package/dist/data-grid/pagination.js.map +1 -1
  180. package/dist/data-grid/text-search.js +55 -67
  181. package/dist/data-grid/text-search.js.map +1 -1
  182. package/dist/data-grid.js +578 -618
  183. package/dist/data-grid.js.map +1 -1
  184. package/dist/dialog.js +38 -38
  185. package/dist/docs/data-grid.md +172 -4
  186. package/dist/docs/drawer.md +1 -1
  187. package/dist/docs/questionnaire.md +1 -1
  188. package/dist/dropdown-menu.js +56 -56
  189. package/dist/empty.js +34 -34
  190. package/dist/index.d.ts +1 -0
  191. package/dist/index.d.ts.map +1 -1
  192. package/dist/index.js +392 -382
  193. package/dist/index.js.map +1 -1
  194. package/dist/select.js +45 -45
  195. package/dist/sidebar.js +112 -112
  196. package/dist/tabs.js +14 -14
  197. package/llms.txt +2 -2
  198. package/package.json +1 -4
  199. package/dist/chunks/data-grid.DIkpRRaf.css +0 -1
  200. package/dist/chunks/dialog.Cpo8vChK.css +0 -1
  201. package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
  202. package/dist/chunks/empty.DWqLrSfF.css +0 -1
  203. package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
  204. package/dist/chunks/sidebar.CIuN--7U.css +0 -1
  205. package/dist/chunks/tabs.DFa0OYMo.css +0 -1
package/dist/dialog.js CHANGED
@@ -1,69 +1,69 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import { Dialog as r } from "@base-ui/react/dialog";
3
- import { cx as s } from "class-variance-authority";
4
- import { XIcon as d } from "lucide-react";
3
+ import { cx as n } from "class-variance-authority";
4
+ import { XIcon as _ } from "lucide-react";
5
5
  import { Button as g } from "./button.js";
6
- import './chunks/dialog.Cpo8vChK.css';const m = "_backdrop_135ow_6", f = "_popup_135ow_22", D = "_closeButton_135ow_164", w = "_header_135ow_152", N = "_footer_135ow_152", h = "_title_135ow_274", v = "_description_135ow_282", B = "_svgIcon_135ow_289", n = {
6
+ import './chunks/dialog.CIR9bQoU.css';const m = "_backdrop_audd_6", f = "_popup_audd_22", D = "_closeButton_audd_164", N = "_header_audd_152", h = "_footer_audd_152", v = "_title_audd_273", B = "_description_audd_281", b = "_svgIcon_audd_288", a = {
7
7
  backdrop: m,
8
8
  popup: f,
9
9
  closeButton: D,
10
- header: w,
11
- footer: N,
12
- title: h,
13
- description: v,
14
- svgIcon: B
15
- }, T = r.Root;
16
- function j({ className: o, ...t }) {
10
+ header: N,
11
+ footer: h,
12
+ title: v,
13
+ description: B,
14
+ svgIcon: b
15
+ }, j = r.Root;
16
+ function P({ className: o, ...t }) {
17
17
  return /* @__PURE__ */ e(r.Trigger, { className: o, ...t });
18
18
  }
19
- function P({ className: o, ...t }) {
19
+ function y({ className: o, ...t }) {
20
20
  return /* @__PURE__ */ e(r.Close, { className: o, ...t });
21
21
  }
22
- function y({
22
+ function z({
23
23
  className: o,
24
24
  children: t,
25
- container: c,
26
- showCloseButton: a = !0,
25
+ container: i,
26
+ showCloseButton: c = !0,
27
27
  showBackdrop: l = !0,
28
- closeLabel: p = "Close",
28
+ closeLabel: d = "Close",
29
29
  size: u = "default",
30
- ..._
30
+ ...p
31
31
  }) {
32
- return /* @__PURE__ */ i(r.Portal, { container: c, children: [
33
- l && /* @__PURE__ */ e(r.Backdrop, { className: n.backdrop }),
34
- /* @__PURE__ */ i(r.Popup, { "data-size": u, className: s(n.popup, o), ..._, children: [
32
+ return /* @__PURE__ */ s(r.Portal, { container: i, children: [
33
+ l && /* @__PURE__ */ e(r.Backdrop, { className: a.backdrop }),
34
+ /* @__PURE__ */ s(r.Popup, { "data-size": u, className: n(a.popup, o), ...p, children: [
35
35
  t,
36
- a && /* @__PURE__ */ e(
36
+ c && /* @__PURE__ */ e(
37
37
  r.Close,
38
38
  {
39
- "aria-label": p,
40
- className: n.closeButton,
41
- render: /* @__PURE__ */ e(g, { variant: "ghost", icon: /* @__PURE__ */ e(d, { className: n.svgIcon }) })
39
+ "aria-label": d,
40
+ className: a.closeButton,
41
+ render: /* @__PURE__ */ e(g, { variant: "ghost", icon: /* @__PURE__ */ e(_, { className: a.svgIcon }) })
42
42
  }
43
43
  )
44
44
  ] })
45
45
  ] });
46
46
  }
47
- function z({ className: o, ...t }) {
48
- return /* @__PURE__ */ e("div", { className: s(n.header, o), ...t });
49
- }
50
47
  function F({ className: o, ...t }) {
51
- return /* @__PURE__ */ e("div", { className: s(n.footer, o), ...t });
48
+ return /* @__PURE__ */ e("div", { className: n(a.header, o), ...t });
52
49
  }
53
50
  function H({ className: o, ...t }) {
54
- return /* @__PURE__ */ e(r.Title, { className: s(n.title, o), ...t });
51
+ return /* @__PURE__ */ e("div", { className: n(a.footer, o), ...t });
55
52
  }
56
53
  function R({ className: o, ...t }) {
57
- return /* @__PURE__ */ e(r.Description, { className: s(n.description, o), ...t });
54
+ return /* @__PURE__ */ e(r.Title, { className: n(a.title, o), ...t });
55
+ }
56
+ function X({ className: o, ...t }) {
57
+ return /* @__PURE__ */ e(r.Description, { className: n(a.description, o), ...t });
58
58
  }
59
59
  export {
60
- T as Dialog,
61
- P as DialogClose,
62
- y as DialogContent,
63
- R as DialogDescription,
64
- F as DialogFooter,
65
- z as DialogHeader,
66
- H as DialogTitle,
67
- j as DialogTrigger
60
+ j as Dialog,
61
+ y as DialogClose,
62
+ z as DialogContent,
63
+ X as DialogDescription,
64
+ H as DialogFooter,
65
+ F as DialogHeader,
66
+ R as DialogTitle,
67
+ P as DialogTrigger
68
68
  };
69
69
  //# sourceMappingURL=dialog.js.map
@@ -2,13 +2,13 @@
2
2
 
3
3
  A server-driven data grid: a `DataGrid` that renders rows through the kit's
4
4
  `Table`, a `load(ctx)` callback that fetches them, a slot-based layout around
5
- the table, and plugins that add behavior (paging, search, sorting, a custom
6
- empty state) by registering into those slots and hooking the load. Each concern
5
+ the table, and plugins that add behavior (paging, search, sorting, filters, a
6
+ custom empty state) by registering into those slots and hooking the load. Each concern
7
7
  (load, layout, table, storage, persistence) is a service with its own store, and
8
8
  a plugin reaches all of them through one context object.
9
9
 
10
- Built-in plugins: pagination, text search, order and empty state, each its own
11
- entry (see below).
10
+ Built-in plugins: pagination, text search, order, filters and empty state, each
11
+ its own entry (see below).
12
12
 
13
13
  ## When to use
14
14
 
@@ -35,6 +35,7 @@ code or CSS:
35
35
  | `@gears-frontx/ui-kit/data-grid/pagination` | `DataGridPaginationPlugin` |
36
36
  | `@gears-frontx/ui-kit/data-grid/text-search` | `DataGridTextSearchPlugin` |
37
37
  | `@gears-frontx/ui-kit/data-grid/order` | `DataGridOrderPlugin`, `createDataGridOrderOption` |
38
+ | `@gears-frontx/ui-kit/data-grid/filters` | `DataGridFiltersPlugin`, the entity factories `filterSearch`, `filterToggle`, `filterCheckboxGroup`, `filterTagGroup`, `filterTree` and `filterDateRange`, `createDataGridTreeStructure` and `useDataGridTreeStructure` (the tree `filterTree` takes), and the types |
38
39
  | `@gears-frontx/ui-kit/data-grid/empty-state` | `DataGridEmptyStatePlugin` |
39
40
 
40
41
  The package root re-exports all of them, so
@@ -295,6 +296,11 @@ them with `registerSlot(name, { id, component, order? })`:
295
296
  | `bottom` | The footer (pagination); hidden while the grid has no records |
296
297
  | `empty` | Replaces the built-in empty state |
297
298
 
299
+ The toolbar fits itself to the grid's width. What `top-start` holds flows onto
300
+ further lines when it is too wide for one, and `top-end` goes on to a line of its
301
+ own, at its end, when it would not fit beside `top-start` on a single line. A
302
+ toolbar that fits on one line has everything centred on it.
303
+
298
304
  With two or more `main` views (for example the table and a cards view) the grid
299
305
  adds a view switch to `top-end` by itself. Read or set the active view with
300
306
  `useDataGridActiveView()` and `DATA_GRID_VIEW`:
@@ -351,6 +357,8 @@ Draws a pager in the `bottom` slot and fills `DataGridLoadContext.pagination`.
351
357
  A page change updates the page, stores it and reloads. A limit change goes back to
352
358
  page 1, stores the limit and reloads. A refresh resets the page to 1. The page
353
359
  count comes from `total`. The loading treatment is the grid's, not the pager's.
360
+ In a container too narrow for one row, the page buttons wrap to a centred line
361
+ under the page-size selector and the page text.
354
362
 
355
363
  ### `DataGridTextSearchPlugin`
356
364
 
@@ -392,6 +400,143 @@ again.
392
400
  The plugin compares `options` and `excludedColumns` by content, so an inline
393
401
  array does not count as a change.
394
402
 
403
+ ### `DataGridFiltersPlugin`
404
+
405
+ A bar of quick filters in `top-start`, and an "All filters" panel that edits the
406
+ same filters in one go. Each active filter reaches your `load` as
407
+ `filters[filterKey] = { value }`.
408
+
409
+ ```tsx
410
+ import {
411
+ DataGridFiltersPlugin,
412
+ filterCheckboxGroup,
413
+ filterDateRange,
414
+ filterToggle,
415
+ } from '@gears-frontx/ui-kit/data-grid/filters';
416
+
417
+ const ENTITIES = [
418
+ filterToggle({ id: 'only_active', label: 'Only active' }),
419
+ filterCheckboxGroup({
420
+ id: 'role',
421
+ label: 'Role',
422
+ options: [
423
+ { label: 'Admin', value: 'admin' },
424
+ { label: 'Member', value: 'member' },
425
+ ],
426
+ }),
427
+ filterDateRange({ id: 'created_at', label: 'Created' }),
428
+ ];
429
+
430
+ async function loadUsers({ filters }: DataGridLoadContext) {
431
+ const roles = filters?.role?.value; // ['admin'], when the Role filter holds a choice
432
+ const range = filters?.created_at?.value; // { from?: '2026-03-01', to?: '2026-03-31' }
433
+ // ...
434
+ }
435
+
436
+ <DataGrid name="users" load={loadUsers} columns={columns}>
437
+ <DataGridFiltersPlugin entities={ENTITIES} />
438
+ </DataGrid>;
439
+ ```
440
+
441
+ | Prop | Type | Default |
442
+ |------|------|---------|
443
+ | `entities` | `DataGridFilterEntity[]` | required; keep the array referentially stable (module scope, or `useMemo`) |
444
+ | `isAllFiltersOptionVisible` | `boolean` | `true`; the "All filters" chip is drawn when this is on and at least one entity has a panel section |
445
+
446
+ **Entities.** Each factory returns one filter. They share `id`, `filterKey`
447
+ (defaults to `id`: the key your `load` reads) and `label`. With no `label`, the
448
+ chip is named after the column whose id equals `id`; an entity with neither a
449
+ label nor a matching column throws when it renders. `popover` (`{ minInlineSize,
450
+ maxInlineSize? }`, in px) sizes the popover of a filter that has one.
451
+
452
+ | Factory | Value in `load` | Quick filter | Panel section |
453
+ |---------|-----------------|--------------|---------------|
454
+ | `filterSearch({ id })` | `{ value: string }` | A text box in a popover, applied 1 s after typing stops | no |
455
+ | `filterToggle({ id })` | `{ value: true }` | A chip that switches the filter on and off | no |
456
+ | `filterCheckboxGroup({ id, options, search?, searchDebounce? })` | `{ value: (string \| number)[] }` | A popover of checkboxes | yes |
457
+ | `filterTagGroup({ id, options, mode?, search? })` | `{ value: (string \| number)[] }` | A popover of selectable tags; `mode: 'radio'` allows one | yes |
458
+ | `filterTree({ id, tree, treeLabel, filterValue?, search? })` | `{ value: string \| number }` | A popover with a tree of radios | yes |
459
+ | `filterDateRange({ id, modelDateFormat? })` | `{ value: { from?: string, to?: string } }` | A popover with a range calendar | yes |
460
+
461
+ An option is `{ label, value, component? }`; `component` draws the option in
462
+ place of its label. The search box of a checkbox group and a tree shows above 5
463
+ options (5 nodes), and of a tag group above 10; `search` forces it on or off.
464
+ `filterCheckboxGroup` takes a function for `options` when the list is too long
465
+ to load up front: it is called with the trimmed search term, once when the list
466
+ opens (with an empty string) and again `searchDebounce` ms (default 300) after
467
+ each change of the term, and only the latest answer is shown. A failure shows "No
468
+ options found".
469
+
470
+ **Quick filters** apply at once: each change updates the value, stores it and
471
+ reloads from page 1. A chip shows a count when its value is a list, a dot when it
472
+ holds any other value, and its popover has a Reset button.
473
+
474
+ **The "All filters" panel** opens a sheet (from the side from 720 px wide, from the
475
+ bottom edge below it) with a section for each entity that has one. Its choices
476
+ are a draft: nothing loads until **Apply**, which commits all of them at once.
477
+ Leaving the panel without Apply (its close button, Escape, a click outside)
478
+ discards the draft, and the next opening starts from what is applied. The count tag in a section's
479
+ header clears that section of the draft. The chip's count is the number of active
480
+ filters that have a section.
481
+
482
+ The same width decides how a quick filter opens: as a popover beside its chip,
483
+ or as a panel from the bottom edge.
484
+
485
+ **Active values.** A filter is active unless its value is `undefined`, `null`,
486
+ `''` or an empty array, so `false` and `0` are values like any other. Inactive
487
+ filters are left out of the load context. (The grid's own `hasActiveFilters`,
488
+ which the empty state reads, agrees except for one value: it treats `0` as
489
+ inactive.)
490
+
491
+ **Persistence.** All filters are stored under one key, `dataGrid:${name}:filters`,
492
+ as `{ [filterKey]: { value } }`. A refresh that resets filters clears them. The
493
+ stored value can be edited by the user, so what the controls show is guarded: a
494
+ checkbox group or a tag group reads a stored value that is not a list as no
495
+ selection, and a date range reads a bound that is not a date in `modelDateFormat`
496
+ as unset. The guards change only what the controls show. Every stored value,
497
+ whatever its shape, still reaches `load` as long as it is stored (a list filter's
498
+ wrongly shaped value, a date range's, a value for a filter that is no longer in
499
+ `entities`), so read `filters` defensively there (check `Array.isArray` before
500
+ using a list).
501
+
502
+ **`filterDateRange`.** The bounds are strings in `modelDateFormat`, which takes
503
+ [date-fns format tokens](https://date-fns.org/docs/format) and defaults to
504
+ `'yyyy-MM-dd'`: `'dd.MM.yyyy'`, not `'DD.MM.YYYY'`. Either bound may be missing
505
+ (`{ from }` means "from then on"). The first click on a day starts a range, the
506
+ second ends it (in either order), and a click after that starts a new one.
507
+
508
+ **`filterTree`.** `tree` is a tree structure, made in the same entry:
509
+
510
+ ```tsx
511
+ import { filterTree, useDataGridTreeStructure } from '@gears-frontx/ui-kit/data-grid/filters';
512
+
513
+ const tree = useDataGridTreeStructure({
514
+ items: departments,
515
+ itemKey: 'id', // the default; a function is allowed
516
+ parentKey: 'parent_id', // the default; or `childrenKey` for nested items
517
+ isLeaf: (department) => !department.has_children, // without it every node can be expanded
518
+ });
519
+
520
+ filterTree({ id: 'department', tree, treeLabel: 'name', filterValue: 'code' });
521
+ ```
522
+
523
+ `createDataGridTreeStructure` makes the same thing outside a component; either
524
+ returns a structure you can fill later with `tree.setItems(items)` or reshape with
525
+ `tree.move(...)` (which throws for a move under the node itself or one of its
526
+ descendants), and an open filter follows. `treeLabel` is a property name or a
527
+ function returning the node's text; search matches on it, keeps the matching
528
+ nodes, the path down to each one and the nodes under it, and starts 300 ms after
529
+ typing stops. By default `load` receives the id of the chosen node; `filterValue`
530
+ (a property name or a function of the item) sends something else, such as a
531
+ code, while the id is what is stored. A tree keeps its items' `id` property as
532
+ their key: use the default `itemKey`.
533
+
534
+ The plugin's API (`getPlugin<DataGridFiltersPluginApi>('filters')`) offers
535
+ `useState(filterKey)`, `setState`, `removeState`, `useDraftState`,
536
+ `setDraftState`, `applyDraftState`, `resetDraftState`, `useActiveCount(filterKeys)`,
537
+ `isFilterValueActive` and `useFilterEntities`, for a custom filter or a control
538
+ of your own.
539
+
395
540
  ### `DataGridEmptyStatePlugin`
396
541
 
397
542
  Renders your component in place of the built-in empty state, whenever the grid has
@@ -542,6 +687,17 @@ columns' minimum content widths.
542
687
  - `aria-busy` is set on the content region while a loader is on screen.
543
688
  - The order popover's items are menu items without a menu popup, so they take
544
689
  focus and Enter and Space, but arrow keys do not move between them.
690
+ - A filter chip is a native `button`; the toggle chip does not say whether it is on
691
+ (no `aria-pressed`), only by its look. The text box of a `filterSearch` filter has
692
+ no placeholder and no accessible name, and the search box inside a list filter
693
+ has a placeholder ("Search...") and no accessible name. A tag is a label over a
694
+ native checkbox or radio, so the input carries the state.
695
+ - In a tree filter each row holds a radio and the tree moves its own focus: Arrow
696
+ keys move between rows, Right and Left open and close a directory, Home and End
697
+ go to the ends, and Enter toggles a directory. A node is chosen with the mouse,
698
+ or by Tab to its radio and Space.
699
+ - The "All filters" panel is a dialog; it is left with its close button (named
700
+ "Close dialog"), Escape or a click outside.
545
701
  - Strings are English and live in one module; the kit has no i18n layer yet.
546
702
 
547
703
  ## Known limitations
@@ -573,6 +729,18 @@ columns' minimum content widths.
573
729
  it also drops `history.state` and the `#hash` when it writes the URL, and it does
574
730
  not work during server rendering.
575
731
  - A new `columns` array identity resets user pins and visibility.
732
+ - A filter's quick popover is not kept in step with what resets it from outside:
733
+ a tree filter's radio stays checked after its Reset button until the popover is
734
+ opened again, although the filter is cleared.
735
+ - `filterTree` reads each item's `id` property for its search and its radios. With
736
+ an `itemKey` other than `id` every radio shows as checked, a click selects
737
+ nothing, and a search hides every node.
738
+ - In a tree filter with a search, the arrow keys also step onto the rows the search
739
+ hides. Once the focus is on a hidden row, no row shown is a tab stop, so the
740
+ arrow keys are lost until that row is shown again or another row is clicked;
741
+ each row's radio can still be reached with Tab.
742
+ - A key in `filters` that no entity owns any more, and any stored value of the
743
+ wrong shape (see Persistence), still reach `load`.
576
744
  - There is no plugin unregister.
577
745
 
578
746
  ## Anti-patterns
@@ -92,7 +92,7 @@ exemption list, which is what keeps them out of that file's
92
92
  The enter/exit slide itself is a plain CSS transition between the
93
93
  `[data-starting-style]`/`[data-ending-style]` transform (`--closed-transform`,
94
94
  the panel parked one full panel-length past its own edge) and the resting
95
- transform on `.popup`. Measured on the demo at a 900x513 viewport, a bottom
95
+ transform on `.popup`. Measured in a browser at a 900x513 viewport, a bottom
96
96
  drawer travels `y: 515 → 308` on open and `308 → 515` on close, a right one
97
97
  `x: 902 → 516` and back — monotonic, with the backdrop's opacity crossing
98
98
  `0 → 1` on the same curve. Nominal duration is upstream's own
@@ -99,7 +99,7 @@ Shortcuts and arrow navigation pause while typing in a text field.
99
99
  `QuestionnaireProgress`: renders `Question {current} of {total}` as text in
100
100
  a `role="progressbar"` — it is **not** a bar by default. Pass `children` to
101
101
  replace the copy, or `render={(props, state) => ...}` to draw a real bar
102
- from `state.current`/`state.total` (see the demo's segmented example).
102
+ from `state.current`/`state.total`, for example one segment per question.
103
103
 
104
104
  `QuestionnaireItem`: `name` (matches an `items` entry), `required`,
105
105
  `multiple` (renders every child `QuestionnaireChoice` as a checkbox
@@ -1,56 +1,56 @@
1
1
  "use client";
2
2
  import { jsxs as p, jsx as n } from "react/jsx-runtime";
3
3
  import { Menu as r } from "@base-ui/react/menu";
4
- import { cx as i, cva as f } from "class-variance-authority";
5
- import { CheckIcon as _, ChevronRightIcon as h } from "lucide-react";
6
- import { useContext as D, createContext as j } from "react";
7
- import './chunks/dropdown-menu.TU3FHXbJ.css';const M = "_positioner_1w0pj_14", S = "_popup_1w0pj_6", N = "_subPopup_1w0pj_33", x = "_label_1w0pj_124", C = "_item_1w0pj_121", T = "_variantDefault_1w0pj_166", k = "_variantDestructive_1w0pj_193", P = "_checkboxItem_1w0pj_121", R = "_radioItem_1w0pj_121", G = "_itemIndicator_1w0pj_235", L = "_indicatorSideStart_1w0pj_254", V = "_separator_1w0pj_272", y = "_shortcut_1w0pj_279", q = "_subTrigger_1w0pj_122", z = "_subTriggerIcon_1w0pj_337", A = "_svgIcon_1w0pj_344", e = {
8
- positioner: M,
9
- popup: S,
10
- subPopup: N,
11
- label: x,
12
- item: C,
13
- variantDefault: T,
14
- variantDestructive: k,
15
- checkboxItem: P,
16
- radioItem: R,
17
- itemIndicator: G,
4
+ import { cx as a, cva as h } from "class-variance-authority";
5
+ import { CheckIcon as g, ChevronRightIcon as D } from "lucide-react";
6
+ import { useContext as M, createContext as S } from "react";
7
+ import './chunks/dropdown-menu.DT1_JLqL.css';const N = "_positioner_s67g2_14", w = "_popup_s67g2_6", x = "_subPopup_s67g2_32", C = "_label_s67g2_123", T = "_item_s67g2_120", k = "_variantDefault_s67g2_165", P = "_variantDestructive_s67g2_192", R = "_checkboxItem_s67g2_120", G = "_radioItem_s67g2_120", j = "_itemIndicator_s67g2_234", L = "_indicatorSideStart_s67g2_253", V = "_separator_s67g2_271", y = "_shortcut_s67g2_278", q = "_subTrigger_s67g2_121", z = "_subTriggerIcon_s67g2_336", A = "_svgIcon_s67g2_343", e = {
8
+ positioner: N,
9
+ popup: w,
10
+ subPopup: x,
11
+ label: C,
12
+ item: T,
13
+ variantDefault: k,
14
+ variantDestructive: P,
15
+ checkboxItem: R,
16
+ radioItem: G,
17
+ itemIndicator: j,
18
18
  indicatorSideStart: L,
19
19
  separator: V,
20
20
  shortcut: y,
21
21
  subTrigger: q,
22
22
  subTriggerIcon: z,
23
23
  svgIcon: A
24
- }, m = j(void 0), Q = r.Root;
24
+ }, m = S(void 0), Q = r.Root;
25
25
  function U({ className: t, ...o }) {
26
26
  return /* @__PURE__ */ n(r.Trigger, { className: t, ...o });
27
27
  }
28
28
  function B({
29
29
  className: t,
30
30
  children: o,
31
- container: a,
32
- side: c = "bottom",
33
- sideOffset: s = 4,
31
+ container: s,
32
+ side: i = "bottom",
33
+ sideOffset: c = 4,
34
34
  align: u = "start",
35
- alignOffset: l = 0,
36
- positionMethod: I,
37
- collisionBoundary: g,
35
+ alignOffset: _ = 0,
36
+ positionMethod: l,
37
+ collisionBoundary: I,
38
38
  collisionPadding: b,
39
- ...w
39
+ ...v
40
40
  }) {
41
- const v = D(m), d = a ?? v;
41
+ const f = M(m), d = s ?? f;
42
42
  return /* @__PURE__ */ n(m.Provider, { value: d, children: /* @__PURE__ */ n(r.Portal, { container: d, children: /* @__PURE__ */ n(
43
43
  r.Positioner,
44
44
  {
45
- side: c,
46
- sideOffset: s,
45
+ side: i,
46
+ sideOffset: c,
47
47
  align: u,
48
- alignOffset: l,
49
- positionMethod: I,
50
- collisionBoundary: g,
48
+ alignOffset: _,
49
+ positionMethod: l,
50
+ collisionBoundary: I,
51
51
  collisionPadding: b,
52
52
  className: e.positioner,
53
- children: /* @__PURE__ */ n(r.Popup, { className: i(e.popup, t), ...w, children: o })
53
+ children: /* @__PURE__ */ n(r.Popup, { className: a(e.popup, t), ...v, children: o })
54
54
  }
55
55
  ) }) });
56
56
  }
@@ -58,9 +58,9 @@ function W({ className: t, ...o }) {
58
58
  return /* @__PURE__ */ n(r.Group, { className: t, ...o });
59
59
  }
60
60
  function X({ className: t, ...o }) {
61
- return /* @__PURE__ */ n(r.GroupLabel, { className: i(e.label, t), ...o });
61
+ return /* @__PURE__ */ n(r.GroupLabel, { className: a(e.label, t), ...o });
62
62
  }
63
- const E = f(e.item, {
63
+ const E = h(e.item, {
64
64
  variants: {
65
65
  variant: {
66
66
  default: e.variantDefault,
@@ -71,17 +71,17 @@ const E = f(e.item, {
71
71
  variant: "default"
72
72
  }
73
73
  });
74
- function Y({ className: t, variant: o, ...a }) {
75
- return /* @__PURE__ */ n(r.Item, { className: E({ variant: o, className: t }), ...a });
74
+ function Y({ className: t, variant: o, ...s }) {
75
+ return /* @__PURE__ */ n(r.Item, { className: E({ variant: o, className: t }), ...s });
76
76
  }
77
77
  function Z({
78
78
  className: t,
79
79
  children: o,
80
- ...a
80
+ ...s
81
81
  }) {
82
- return /* @__PURE__ */ p(r.CheckboxItem, { className: i(e.checkboxItem, t), ...a, children: [
82
+ return /* @__PURE__ */ p(r.CheckboxItem, { className: a(e.checkboxItem, t), ...s, children: [
83
83
  o,
84
- /* @__PURE__ */ n(r.CheckboxItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(_, { className: e.svgIcon }) })
84
+ /* @__PURE__ */ n(r.CheckboxItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(g, { className: e.svgIcon }) })
85
85
  ] });
86
86
  }
87
87
  function $({ className: t, ...o }) {
@@ -90,58 +90,58 @@ function $({ className: t, ...o }) {
90
90
  function tt({
91
91
  className: t,
92
92
  children: o,
93
- indicatorSide: a = "end",
94
- ...c
93
+ indicatorSide: s = "end",
94
+ ...i
95
95
  }) {
96
96
  return /* @__PURE__ */ p(
97
97
  r.RadioItem,
98
98
  {
99
- className: i(
99
+ className: a(
100
100
  e.radioItem,
101
- a === "start" && e.indicatorSideStart,
101
+ s === "start" && e.indicatorSideStart,
102
102
  t
103
103
  ),
104
- ...c,
104
+ ...i,
105
105
  children: [
106
106
  o,
107
- /* @__PURE__ */ n(r.RadioItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(_, { className: e.svgIcon }) })
107
+ /* @__PURE__ */ n(r.RadioItemIndicator, { className: e.itemIndicator, children: /* @__PURE__ */ n(g, { className: e.svgIcon }) })
108
108
  ]
109
109
  }
110
110
  );
111
111
  }
112
112
  function ot({ className: t, ...o }) {
113
- return /* @__PURE__ */ n(r.Separator, { className: i(e.separator, t), ...o });
113
+ return /* @__PURE__ */ n(r.Separator, { className: a(e.separator, t), ...o });
114
114
  }
115
115
  function et({ className: t, ...o }) {
116
- return /* @__PURE__ */ n("span", { className: i(e.shortcut, t), ...o });
116
+ return /* @__PURE__ */ n("span", { className: a(e.shortcut, t), ...o });
117
117
  }
118
118
  const nt = r.SubmenuRoot;
119
119
  function rt({
120
120
  className: t,
121
121
  children: o,
122
- ...a
122
+ ...s
123
123
  }) {
124
- return /* @__PURE__ */ p(r.SubmenuTrigger, { className: i(e.subTrigger, t), ...a, children: [
124
+ return /* @__PURE__ */ p(r.SubmenuTrigger, { className: a(e.subTrigger, t), ...s, children: [
125
125
  o,
126
- /* @__PURE__ */ n(h, { className: i(e.svgIcon, e.subTriggerIcon) })
126
+ /* @__PURE__ */ n(D, { className: a(e.svgIcon, e.subTriggerIcon) })
127
127
  ] });
128
128
  }
129
- function at({
129
+ function st({
130
130
  className: t,
131
131
  side: o = "right",
132
- align: a = "start",
133
- sideOffset: c = 0,
134
- alignOffset: s = -3,
132
+ align: s = "start",
133
+ sideOffset: i = 0,
134
+ alignOffset: c = -3,
135
135
  ...u
136
136
  }) {
137
137
  return /* @__PURE__ */ n(
138
138
  B,
139
139
  {
140
- className: i(e.subPopup, t),
140
+ className: a(e.subPopup, t),
141
141
  side: o,
142
- align: a,
143
- sideOffset: c,
144
- alignOffset: s,
142
+ align: s,
143
+ sideOffset: i,
144
+ alignOffset: c,
145
145
  ...u
146
146
  }
147
147
  );
@@ -158,7 +158,7 @@ export {
158
158
  ot as DropdownMenuSeparator,
159
159
  et as DropdownMenuShortcut,
160
160
  nt as DropdownMenuSub,
161
- at as DropdownMenuSubContent,
161
+ st as DropdownMenuSubContent,
162
162
  rt as DropdownMenuSubTrigger,
163
163
  U as DropdownMenuTrigger
164
164
  };