@cerberus-design/data-grid 1.1.3 → 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 (50) hide show
  1. package/dist/components/data-grid.client.cjs +13 -4
  2. package/dist/components/data-grid.client.js +13 -4
  3. package/dist/components/features.client.cjs +32 -9
  4. package/dist/components/features.client.js +33 -10
  5. package/dist/components/filter-item.client.cjs +38 -0
  6. package/dist/components/filter-item.client.d.cts +6 -0
  7. package/dist/components/filter-item.client.d.ts +6 -0
  8. package/dist/components/filter-item.client.js +38 -0
  9. package/dist/components/grid.client.cjs +101 -104
  10. package/dist/components/grid.client.d.cts +7 -2
  11. package/dist/components/grid.client.d.ts +7 -2
  12. package/dist/components/grid.client.js +105 -109
  13. package/dist/components/no-content.client.cjs +23 -0
  14. package/dist/components/no-content.client.d.cts +1 -0
  15. package/dist/components/no-content.client.d.ts +1 -0
  16. package/dist/components/no-content.client.js +23 -0
  17. package/dist/components/overlays.cjs +69 -0
  18. package/dist/components/overlays.d.cts +14 -0
  19. package/dist/components/overlays.d.ts +14 -0
  20. package/dist/components/overlays.js +68 -0
  21. package/dist/components/pinned-items.client.cjs +5 -4
  22. package/dist/components/pinned-items.client.js +5 -4
  23. package/dist/components/popover.client.cjs +186 -0
  24. package/dist/components/popover.client.d.cts +9 -0
  25. package/dist/components/popover.client.d.ts +9 -0
  26. package/dist/components/popover.client.js +184 -0
  27. package/dist/components/sort-items.client.cjs +4 -3
  28. package/dist/components/sort-items.client.js +4 -3
  29. package/dist/components/viewport.client.cjs +115 -0
  30. package/dist/components/viewport.client.d.cts +8 -0
  31. package/dist/components/viewport.client.d.ts +8 -0
  32. package/dist/components/viewport.client.js +115 -0
  33. package/dist/const.cjs +26 -0
  34. package/dist/const.d.cts +16 -1
  35. package/dist/const.d.ts +16 -1
  36. package/dist/const.js +25 -1
  37. package/dist/index.cjs +2 -0
  38. package/dist/index.d.cts +1 -0
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.js +2 -1
  41. package/dist/panda.buildinfo.json +55 -30
  42. package/dist/store.cjs +63 -20
  43. package/dist/store.js +65 -22
  44. package/dist/types.d.cts +52 -6
  45. package/dist/types.d.ts +52 -6
  46. package/dist/utils.cjs +23 -0
  47. package/dist/utils.d.cts +2 -1
  48. package/dist/utils.d.ts +2 -1
  49. package/dist/utils.js +24 -2
  50. package/package.json +6 -6
@@ -1,107 +1,61 @@
1
1
  "use client";
2
2
  "use client";
3
- import { PARTS, SCOPE } from "../const.js";
3
+ import { OPERATORS, PARTS, SCOPE } from "../const.js";
4
4
  import { useDataGridContext } from "../context.client.js";
5
5
  import { useColumnStyles, usePinnedAttribute, usePinnedState } from "../hooks.client.js";
6
- import { useVirtualizer } from "../virtualizer.client.js";
7
6
  import { HeaderCellOptions } from "./features.client.js";
8
7
  import { For, IconButton, Show, Tooltip, useCerberusContext } from "@cerberus-design/react";
9
- import { useRead } from "@cerberus-design/signals";
10
- import { memo, useMemo, useRef } from "react";
11
- import { Box, HStack, Scrollable, Stack } from "styled-system/jsx";
12
- import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { batch, createComputed, useRead } from "@cerberus-design/signals";
9
+ import { memo } from "react";
10
+ import { Box, Center, HStack } from "styled-system/jsx";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
12
  //#region src/components/grid.client.tsx
14
- function GridViewport() {
15
- const viewportRef = useRef(null);
16
- const store = useDataGridContext();
17
- const { virtualRows, totalHeight } = useVirtualizer(store, viewportRef);
18
- const columns = useRead(store.columns);
19
- const isServerPaginated = useRead(store.isServerPaginated);
20
- const staticRows = useRead(store.rows);
21
- const currentPageRange = useRead(store.currentPageRange);
22
- return /* @__PURE__ */ jsxs(Scrollable, {
23
- hideScrollbar: true,
24
- "data-scope": SCOPE,
25
- "data-part": PARTS.VIEWPORT,
26
- h: "full",
27
- minH: "0",
28
- minW: "full",
29
- pos: "relative",
30
- w: "full",
31
- ref: viewportRef,
32
- children: [/* @__PURE__ */ jsx(Box, {
33
- role: "grid",
34
- "aria-rowcount": staticRows.length + 1,
35
- "aria-colcount": columns.length,
36
- h: "var(--row-height)",
37
- pos: "sticky",
38
- top: "0",
39
- w: "var(--total-grid-width)",
40
- zIndex: "sticky",
41
- children: /* @__PURE__ */ jsx(HStack, {
42
- "aria-rowindex": 1,
43
- role: "rowgroup",
44
- gap: "0",
45
- h: "full",
46
- pos: "relative",
47
- w: "full",
48
- children: /* @__PURE__ */ jsx(For, {
49
- each: columns,
50
- children: (col) => /* @__PURE__ */ jsx(Show, {
51
- when: col.isVisible(),
52
- children: () => /* @__PURE__ */ jsx(GridHeaderCell, { column: col })
53
- }, col.id)
54
- })
55
- })
56
- }), /* @__PURE__ */ jsx(Show, {
57
- when: isServerPaginated,
58
- fallback: /* @__PURE__ */ jsx(Box, {
59
- pos: "relative",
60
- w: "var(--total-grid-width)",
61
- style: { height: `${totalHeight}px` },
62
- children: /* @__PURE__ */ jsx(For, {
63
- each: virtualRows,
64
- children: (vRow) => /* @__PURE__ */ jsx(GridRow, {
65
- row: vRow.data,
66
- index: vRow.index,
67
- offsetY: vRow.offsetY
68
- }, vRow.index)
69
- })
70
- }),
71
- children: () => /* @__PURE__ */ jsx(Stack, {
72
- direction: "column",
73
- gap: "0",
74
- w: "var(--total-grid-width)",
75
- children: /* @__PURE__ */ jsx(For, {
76
- each: staticRows.slice(currentPageRange.start, currentPageRange.end),
77
- children: (row, index) => /* @__PURE__ */ jsx(GridRow, {
78
- row,
79
- index
80
- }, index)
81
- })
82
- })
83
- })]
84
- });
85
- }
86
13
  var GridHeaderCell = memo(function GridHeaderCell(props) {
87
14
  const { column } = props;
88
15
  const store = useDataGridContext();
89
16
  const { icons } = useCerberusContext();
90
17
  const pinnedVal = useRead(column.pinned);
91
18
  const sortingVal = useRead(store.sorting);
19
+ const colFilters = useRead(store.colFilters);
92
20
  const pinnedState = usePinnedState(pinnedVal);
93
21
  const pinnedAttr = usePinnedAttribute(pinnedVal);
94
22
  const style = useColumnStyles(column, pinnedVal);
95
- const isSortedDesc = useMemo(() => {
23
+ const isSortedDesc = createComputed(() => {
96
24
  const result = sortingVal.find((item) => item.id === column.id);
97
25
  if (result) return result.desc;
98
26
  return false;
99
- }, [sortingVal, column.id]);
27
+ });
28
+ const hasFilters = createComputed(() => {
29
+ return colFilters.active.some((filterId) => filterId === column.id);
30
+ });
100
31
  const SortAscIcon = icons.sortAsc;
101
32
  const SortDescIcon = icons.sortDesc;
33
+ const EditFilterIcon = icons.filterEdit;
102
34
  function handleToggleSorting(e) {
103
35
  store.toggleSort(column.id, e.shiftKey);
104
36
  }
37
+ function handleEditFilters() {
38
+ const fallbackFilter = {
39
+ id: column.id,
40
+ operator: OPERATORS.contains,
41
+ value: ""
42
+ };
43
+ batch(() => {
44
+ store.setColFilter((prev) => ({
45
+ ...prev,
46
+ active: [...prev.active, column.id],
47
+ filters: {
48
+ ...prev.filters,
49
+ [column.id]: {
50
+ ...fallbackFilter,
51
+ ...prev.filters[column.id]
52
+ }
53
+ },
54
+ editing: column.id
55
+ }));
56
+ store.setShowColFilter(true);
57
+ });
58
+ }
105
59
  return /* @__PURE__ */ jsxs(HStack, {
106
60
  role: "columnheader",
107
61
  "data-scope": SCOPE,
@@ -142,32 +96,59 @@ var GridHeaderCell = memo(function GridHeaderCell(props) {
142
96
  /* @__PURE__ */ jsxs(HStack, {
143
97
  gap: "sm",
144
98
  _groupHover: { "& :is(button)": { opacity: "1" } },
145
- children: [typeof column.original.header === "function" ? column.original.header({ colId: column.id }) : column.original.header, /* @__PURE__ */ jsx(Show, {
146
- when: column.sortable,
147
- children: /* @__PURE__ */ jsx(Tooltip, {
148
- content: isSortedDesc ? "Sort Ascending" : "Sort Decending",
149
- openDelay: 800,
150
- asChild: true,
151
- children: /* @__PURE__ */ jsx(IconButton, {
152
- ariaLabel: "Toggle sorting",
153
- size: "sm",
154
- opacity: {
155
- base: 1,
156
- md: 0
157
- },
158
- transitionProperty: "opacity",
159
- transitionDuration: "fast",
160
- onClick: handleToggleSorting,
161
- children: /* @__PURE__ */ jsx(Show, {
162
- when: isSortedDesc,
163
- fallback: /* @__PURE__ */ jsx(SortAscIcon, {}),
164
- children: /* @__PURE__ */ jsx(SortDescIcon, {})
99
+ children: [
100
+ typeof column.original.header === "function" ? column.original.header({ colId: column.id }) : column.original.header,
101
+ /* @__PURE__ */ jsx(Show, {
102
+ when: hasFilters(),
103
+ children: /* @__PURE__ */ jsx(Tooltip, {
104
+ content: "Edit filters",
105
+ openDelay: 800,
106
+ asChild: true,
107
+ children: /* @__PURE__ */ jsx(IconButton, {
108
+ ariaLabel: "Edit filters",
109
+ size: "sm",
110
+ onClick: handleEditFilters,
111
+ children: /* @__PURE__ */ jsx(EditFilterIcon, {})
112
+ })
113
+ })
114
+ }),
115
+ /* @__PURE__ */ jsx(Show, {
116
+ when: column.sortable,
117
+ children: /* @__PURE__ */ jsx(Tooltip, {
118
+ content: isSortedDesc() ? "Sort Ascending" : "Sort Decending",
119
+ openDelay: 800,
120
+ asChild: true,
121
+ children: /* @__PURE__ */ jsx(IconButton, {
122
+ ariaLabel: "Toggle sorting",
123
+ size: "sm",
124
+ opacity: {
125
+ base: 1,
126
+ md: 0
127
+ },
128
+ transitionProperty: "opacity",
129
+ transitionDuration: "fast",
130
+ onClick: handleToggleSorting,
131
+ children: /* @__PURE__ */ jsx(Show, {
132
+ when: isSortedDesc(),
133
+ fallback: /* @__PURE__ */ jsx(SortAscIcon, {}),
134
+ children: /* @__PURE__ */ jsx(SortDescIcon, {})
135
+ })
165
136
  })
166
137
  })
167
138
  })
168
- })]
139
+ ]
140
+ }),
141
+ /* @__PURE__ */ jsx(Center, {
142
+ bgColor: "var(--head-cell-bg-color)",
143
+ bottom: "0",
144
+ pos: "absolute",
145
+ px: "sm",
146
+ right: "0",
147
+ top: "0",
148
+ w: "fit-content",
149
+ zIndex: "11",
150
+ children: /* @__PURE__ */ jsx(HeaderCellOptions, { ...column })
169
151
  }),
170
- /* @__PURE__ */ jsx(HeaderCellOptions, { ...column }),
171
152
  /* @__PURE__ */ jsx(Show, {
172
153
  when: pinnedState === "pinned",
173
154
  children: () => /* @__PURE__ */ jsx(ShadowFiller, {
@@ -212,10 +193,20 @@ var GridCell = memo(function GridCell(props) {
212
193
  borderLeft: "1px solid"
213
194
  },
214
195
  style,
215
- children: [column.original.cell ? column.original.cell({
216
- row,
217
- value
218
- }) : value, /* @__PURE__ */ jsx(Show, {
196
+ children: [/* @__PURE__ */ jsx(Show, {
197
+ when: props.pending && props.hasSkeleton,
198
+ fallback: /* @__PURE__ */ jsx(Fragment, { children: column.original.cell ? column.original.cell({
199
+ row,
200
+ value
201
+ }) : value }),
202
+ children: /* @__PURE__ */ jsx(Box, {
203
+ "aria-busy": "true",
204
+ my: "xs",
205
+ rounded: "md",
206
+ w: "full",
207
+ style: { height: "calc(var(--row-height) / 3)" }
208
+ })
209
+ }), /* @__PURE__ */ jsx(Show, {
219
210
  when: pinnedState === "pinned",
220
211
  children: () => /* @__PURE__ */ jsx(ShadowFiller, {
221
212
  style,
@@ -225,7 +216,10 @@ var GridCell = memo(function GridCell(props) {
225
216
  });
226
217
  });
227
218
  var GridRow = memo(function GridRow(props) {
228
- const columns = useRead(useDataGridContext().columns);
219
+ const store = useDataGridContext();
220
+ const columns = useRead(store.columns);
221
+ const pending = useRead(store.pending);
222
+ const hasSkeleton = useRead(store.hasSkeleton);
229
223
  return /* @__PURE__ */ jsx(GridRowContainer, {
230
224
  offsetY: props.offsetY,
231
225
  children: /* @__PURE__ */ jsx(For, {
@@ -234,7 +228,9 @@ var GridRow = memo(function GridRow(props) {
234
228
  when: col.isVisible(),
235
229
  children: () => /* @__PURE__ */ jsx(GridCell, {
236
230
  row: props.row,
237
- column: col
231
+ column: col,
232
+ hasSkeleton,
233
+ pending
238
234
  })
239
235
  }, col.id)
240
236
  })
@@ -287,4 +283,4 @@ function ShadowFiller(props) {
287
283
  });
288
284
  }
289
285
  //#endregion
290
- export { GridViewport };
286
+ export { GridHeaderCell, GridRow };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ "use client";
3
+ let _cerberus_design_react = require("@cerberus-design/react");
4
+ let styled_system_jsx = require("styled-system/jsx");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ //#region src/components/no-content.client.tsx
7
+ function NoContent() {
8
+ const { icons } = (0, _cerberus_design_react.useCerberusContext)();
9
+ const Icon = icons.table;
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.VStack, {
11
+ gap: "md",
12
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Avatar, {
13
+ fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {}),
14
+ gradient: "charon-light",
15
+ size: "sm"
16
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Text, {
17
+ textStyle: "label-sm",
18
+ children: "No rows found"
19
+ })]
20
+ });
21
+ }
22
+ //#endregion
23
+ exports.NoContent = NoContent;
@@ -0,0 +1 @@
1
+ export declare function NoContent(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function NoContent(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ "use client";
3
+ import { Avatar, Text, useCerberusContext } from "@cerberus-design/react";
4
+ import { VStack } from "styled-system/jsx";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region src/components/no-content.client.tsx
7
+ function NoContent() {
8
+ const { icons } = useCerberusContext();
9
+ const Icon = icons.table;
10
+ return /* @__PURE__ */ jsxs(VStack, {
11
+ gap: "md",
12
+ children: [/* @__PURE__ */ jsx(Avatar, {
13
+ fallback: /* @__PURE__ */ jsx(Icon, {}),
14
+ gradient: "charon-light",
15
+ size: "sm"
16
+ }), /* @__PURE__ */ jsx(Text, {
17
+ textStyle: "label-sm",
18
+ children: "No rows found"
19
+ })]
20
+ });
21
+ }
22
+ //#endregion
23
+ export { NoContent };
@@ -0,0 +1,69 @@
1
+ "use client";
2
+ const require_no_content_client = require("./no-content.client.cjs");
3
+ let _cerberus_design_react = require("@cerberus-design/react");
4
+ let styled_system_jsx = require("styled-system/jsx");
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ //#region src/components/overlays.tsx
7
+ var overlayStyle = {
8
+ backgroundColor: "color-mix(in srgb, var(--cerberus-colors-page-surface-initial) 70%, transparent)",
9
+ height: "calc(100% - var(--row-height))"
10
+ };
11
+ function NoContentOverlay(props) {
12
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Center, {
13
+ w: "full",
14
+ userSelect: "none",
15
+ style: overlayStyle,
16
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Show, {
17
+ when: props.custom,
18
+ fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_no_content_client.NoContent, {}),
19
+ children: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.custom })
20
+ })
21
+ });
22
+ }
23
+ function PendingOverlay(props) {
24
+ if (props.variant === "skeleton") return null;
25
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Box, {
26
+ bottom: "0",
27
+ left: "0",
28
+ overflow: "hidden",
29
+ pos: "absolute",
30
+ right: "0",
31
+ top: "var(--row-height)",
32
+ userSelect: "none",
33
+ w: "full",
34
+ zIndex: "decorator",
35
+ style: overlayStyle,
36
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchPendingOverlay, { ...props })
37
+ });
38
+ }
39
+ function MatchPendingOverlay(props) {
40
+ if (typeof props.variant !== "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.variant });
41
+ switch (props.variant) {
42
+ case "skeleton": return null;
43
+ case "linear": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinearOverlay, {});
44
+ case "circular": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CircularOverlay, {});
45
+ default: throw new Error("An unknown variant option was provided to the Data Grid overlays.pending property. The only avaiable options are: skeleton, linear, circular, or ReactNode.");
46
+ }
47
+ }
48
+ function LinearOverlay() {
49
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.ProgressBar, {
50
+ id: "dg-loading",
51
+ indeterminate: true,
52
+ label: "Data grid loading",
53
+ size: "xs",
54
+ usage: "block"
55
+ });
56
+ }
57
+ function CircularOverlay() {
58
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Center, {
59
+ h: "full",
60
+ w: "full",
61
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(styled_system_jsx.Square, {
62
+ size: "12",
63
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.Spinner, {})
64
+ })
65
+ });
66
+ }
67
+ //#endregion
68
+ exports.NoContentOverlay = NoContentOverlay;
69
+ exports.PendingOverlay = PendingOverlay;
@@ -0,0 +1,14 @@
1
+ import { OverlaySlots } from '../types';
2
+ export declare const overlayStyle: {
3
+ backgroundColor: string;
4
+ height: string;
5
+ };
6
+ interface NoContentOverlayProps {
7
+ custom?: OverlaySlots['noContent'];
8
+ }
9
+ export declare function NoContentOverlay(props: NoContentOverlayProps): import("react/jsx-runtime").JSX.Element;
10
+ interface PendingOverlayProps {
11
+ variant?: OverlaySlots['pending'];
12
+ }
13
+ export declare function PendingOverlay(props: PendingOverlayProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import { OverlaySlots } from '../types';
2
+ export declare const overlayStyle: {
3
+ backgroundColor: string;
4
+ height: string;
5
+ };
6
+ interface NoContentOverlayProps {
7
+ custom?: OverlaySlots['noContent'];
8
+ }
9
+ export declare function NoContentOverlay(props: NoContentOverlayProps): import("react/jsx-runtime").JSX.Element;
10
+ interface PendingOverlayProps {
11
+ variant?: OverlaySlots['pending'];
12
+ }
13
+ export declare function PendingOverlay(props: PendingOverlayProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export {};
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { NoContent } from "./no-content.client.js";
3
+ import { ProgressBar, Show, Spinner } from "@cerberus-design/react";
4
+ import { Box, Center, Square } from "styled-system/jsx";
5
+ import { Fragment, jsx } from "react/jsx-runtime";
6
+ //#region src/components/overlays.tsx
7
+ var overlayStyle = {
8
+ backgroundColor: "color-mix(in srgb, var(--cerberus-colors-page-surface-initial) 70%, transparent)",
9
+ height: "calc(100% - var(--row-height))"
10
+ };
11
+ function NoContentOverlay(props) {
12
+ return /* @__PURE__ */ jsx(Center, {
13
+ w: "full",
14
+ userSelect: "none",
15
+ style: overlayStyle,
16
+ children: /* @__PURE__ */ jsx(Show, {
17
+ when: props.custom,
18
+ fallback: /* @__PURE__ */ jsx(NoContent, {}),
19
+ children: () => /* @__PURE__ */ jsx(Fragment, { children: props.custom })
20
+ })
21
+ });
22
+ }
23
+ function PendingOverlay(props) {
24
+ if (props.variant === "skeleton") return null;
25
+ return /* @__PURE__ */ jsx(Box, {
26
+ bottom: "0",
27
+ left: "0",
28
+ overflow: "hidden",
29
+ pos: "absolute",
30
+ right: "0",
31
+ top: "var(--row-height)",
32
+ userSelect: "none",
33
+ w: "full",
34
+ zIndex: "decorator",
35
+ style: overlayStyle,
36
+ children: /* @__PURE__ */ jsx(MatchPendingOverlay, { ...props })
37
+ });
38
+ }
39
+ function MatchPendingOverlay(props) {
40
+ if (typeof props.variant !== "string") return /* @__PURE__ */ jsx(Fragment, { children: props.variant });
41
+ switch (props.variant) {
42
+ case "skeleton": return null;
43
+ case "linear": return /* @__PURE__ */ jsx(LinearOverlay, {});
44
+ case "circular": return /* @__PURE__ */ jsx(CircularOverlay, {});
45
+ default: throw new Error("An unknown variant option was provided to the Data Grid overlays.pending property. The only avaiable options are: skeleton, linear, circular, or ReactNode.");
46
+ }
47
+ }
48
+ function LinearOverlay() {
49
+ return /* @__PURE__ */ jsx(ProgressBar, {
50
+ id: "dg-loading",
51
+ indeterminate: true,
52
+ label: "Data grid loading",
53
+ size: "xs",
54
+ usage: "block"
55
+ });
56
+ }
57
+ function CircularOverlay() {
58
+ return /* @__PURE__ */ jsx(Center, {
59
+ h: "full",
60
+ w: "full",
61
+ children: /* @__PURE__ */ jsx(Square, {
62
+ size: "12",
63
+ children: /* @__PURE__ */ jsx(Spinner, {})
64
+ })
65
+ });
66
+ }
67
+ //#endregion
68
+ export { NoContentOverlay, PendingOverlay };
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
+ const require_const = require("../const.cjs");
3
4
  let _cerberus_design_react = require("@cerberus-design/react");
4
5
  let _cerberus_design_signals = require("@cerberus-design/signals");
5
6
  let styled_system_jsx = require("styled-system/jsx");
@@ -23,7 +24,7 @@ function UnpinRightItem() {
23
24
  const { icons } = (0, _cerberus_design_react.useCerberusContext)();
24
25
  const Icon = icons.pinRightFilled;
25
26
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.MenuItem, {
26
- value: "unpin_right",
27
+ value: require_const.FEATURE_VALUES.unpinRight,
27
28
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
28
29
  gap: "sm",
29
30
  w: "full",
@@ -35,7 +36,7 @@ function UnpinLeftItem() {
35
36
  const { icons } = (0, _cerberus_design_react.useCerberusContext)();
36
37
  const Icon = icons.pinLeftFilled;
37
38
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.MenuItem, {
38
- value: "unpin_left",
39
+ value: require_const.FEATURE_VALUES.unpinLeft,
39
40
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
40
41
  gap: "sm",
41
42
  w: "full",
@@ -47,7 +48,7 @@ function PinRightItem() {
47
48
  const { icons } = (0, _cerberus_design_react.useCerberusContext)();
48
49
  const Icon = icons.pinRight;
49
50
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.MenuItem, {
50
- value: "pin_right",
51
+ value: require_const.FEATURE_VALUES.pinRight,
51
52
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
52
53
  gap: "sm",
53
54
  w: "full",
@@ -59,7 +60,7 @@ function PinLeftItem() {
59
60
  const { icons } = (0, _cerberus_design_react.useCerberusContext)();
60
61
  const Icon = icons.pinLeft;
61
62
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_cerberus_design_react.MenuItem, {
62
- value: "pin_left",
63
+ value: require_const.FEATURE_VALUES.pinLeft,
63
64
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(styled_system_jsx.HStack, {
64
65
  gap: "sm",
65
66
  w: "full",
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
+ import { FEATURE_VALUES } from "../const.js";
3
4
  import { MenuItem, useCerberusContext } from "@cerberus-design/react";
4
5
  import { useRead } from "@cerberus-design/signals";
5
6
  import { HStack } from "styled-system/jsx";
@@ -23,7 +24,7 @@ function UnpinRightItem() {
23
24
  const { icons } = useCerberusContext();
24
25
  const Icon = icons.pinRightFilled;
25
26
  return /* @__PURE__ */ jsx(MenuItem, {
26
- value: "unpin_right",
27
+ value: FEATURE_VALUES.unpinRight,
27
28
  children: /* @__PURE__ */ jsxs(HStack, {
28
29
  gap: "sm",
29
30
  w: "full",
@@ -35,7 +36,7 @@ function UnpinLeftItem() {
35
36
  const { icons } = useCerberusContext();
36
37
  const Icon = icons.pinLeftFilled;
37
38
  return /* @__PURE__ */ jsx(MenuItem, {
38
- value: "unpin_left",
39
+ value: FEATURE_VALUES.unpinLeft,
39
40
  children: /* @__PURE__ */ jsxs(HStack, {
40
41
  gap: "sm",
41
42
  w: "full",
@@ -47,7 +48,7 @@ function PinRightItem() {
47
48
  const { icons } = useCerberusContext();
48
49
  const Icon = icons.pinRight;
49
50
  return /* @__PURE__ */ jsx(MenuItem, {
50
- value: "pin_right",
51
+ value: FEATURE_VALUES.pinRight,
51
52
  children: /* @__PURE__ */ jsxs(HStack, {
52
53
  gap: "sm",
53
54
  w: "full",
@@ -59,7 +60,7 @@ function PinLeftItem() {
59
60
  const { icons } = useCerberusContext();
60
61
  const Icon = icons.pinLeft;
61
62
  return /* @__PURE__ */ jsx(MenuItem, {
62
- value: "pin_left",
63
+ value: FEATURE_VALUES.pinLeft,
63
64
  children: /* @__PURE__ */ jsxs(HStack, {
64
65
  gap: "sm",
65
66
  w: "full",