@orfium/ictinus 5.43.4 → 5.43.6

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 (68) hide show
  1. package/.turbo/turbo-build.log +18 -18
  2. package/CHANGELOG.md +12 -0
  3. package/dist/package.json.d.ts +1 -1
  4. package/dist/package.json.js +1 -1
  5. package/dist/sprinkles/properties.css.js +1 -1
  6. package/dist/sprinkles/properties.css.ts.vanilla.css +1 -1
  7. package/dist/src/actions/ActionsContent.d.ts +65 -64
  8. package/dist/src/actions/ActionsRoot.d.ts +65 -64
  9. package/dist/src/data-table/DataTable.d.ts +77 -64
  10. package/dist/src/data-table/DataTableBody.d.ts +67 -64
  11. package/dist/src/data-table/DataTableCounter.d.ts +2 -1
  12. package/dist/src/data-table/DataTableHeader.d.ts +65 -64
  13. package/dist/src/data-table/DataTableRow.d.ts +135 -133
  14. package/dist/src/data-table/DataTableRowContext.d.ts +28 -5
  15. package/dist/src/skeleton/Skeleton.css.d.ts +5 -0
  16. package/dist/src/skeleton/Skeleton.d.ts +427 -0
  17. package/dist/src/skeleton/index.d.ts +1 -0
  18. package/dist/src/sprinkles/properties.css.d.ts +280 -0
  19. package/dist/src/sprinkles/sprinkles.d.ts +597 -56
  20. package/dist/src/vanilla/Box/Box.d.ts +65 -64
  21. package/dist/src/vanilla/Box/extractBoxProps.d.ts +2 -2
  22. package/dist/src/vanilla/Table/Table.d.ts +65 -64
  23. package/dist/src/vanilla/Table/TableBody.d.ts +65 -64
  24. package/dist/src/vanilla/Table/TableCell.d.ts +65 -64
  25. package/dist/src/vanilla/Table/TableFooter.d.ts +65 -64
  26. package/dist/src/vanilla/Table/TableHeader.d.ts +65 -64
  27. package/dist/src/vanilla/Table/TableHeaderCell.d.ts +65 -64
  28. package/dist/src/vanilla/Table/TableRow.d.ts +65 -64
  29. package/dist/src/vanilla/Text/Text.d.ts +65 -64
  30. package/dist/src/vanilla/index.d.ts +2 -0
  31. package/dist/vanilla/Dropdown/Dropdown-css.js +2 -2
  32. package/dist/vanilla/Menu/Menu-css.js +3 -3
  33. package/dist/vanilla/Popover/Popover-css.js +2 -2
  34. package/dist/vanilla/Table/Table-css.js +3 -3
  35. package/dist/vanilla/Table/TableCell-css.js +3 -3
  36. package/dist/vanilla/Table/TableHeaderCell-css.js +3 -3
  37. package/dist/vanilla/Table/TableRow-css.js +2 -2
  38. package/dist/vanilla/Tooltip/Tooltip-css.js +2 -2
  39. package/dist/vanilla/assets/src/skeleton/Skeleton.css.ts.vanilla-CNzX69JK.css +6 -0
  40. package/dist/vanilla/assets/src/sprinkles/{properties.css.ts.vanilla-C8hqLKur.css → properties.css.ts.vanilla-CRlOneec.css} +3613 -3233
  41. package/dist/vanilla/index.d.ts +1308 -852
  42. package/dist/vanilla/index.js +2 -0
  43. package/dist/vanilla/package.json.js +1 -1
  44. package/dist/vanilla/src/actions/ActionsContent-css.js +2 -2
  45. package/dist/vanilla/src/data-table/DataTableBody-css.js +3 -3
  46. package/dist/vanilla/src/data-table/DataTableBody.js +123 -89
  47. package/dist/vanilla/src/data-table/DataTableCounter.js +5 -3
  48. package/dist/vanilla/src/data-table/DataTableHeaderCell-css.js +3 -3
  49. package/dist/vanilla/src/data-table/DataTableRowContext.js +29 -2
  50. package/dist/vanilla/src/skeleton/Skeleton-css.js +9 -0
  51. package/dist/vanilla/src/skeleton/Skeleton.js +26 -0
  52. package/dist/vanilla/src/sprinkles/properties-css.js +4 -4
  53. package/package.json +1 -1
  54. package/src/components/Controls/CheckBox/__snapshots__/CheckBox.test.tsx.snap +1 -1
  55. package/src/components/DatePicker/OverlayComponent/__snapshots__/OverlayComponent.test.tsx.snap +4 -4
  56. package/src/components/DatePicker/OverlayComponent/components/MonthWrapper/__snapshots__/MonthWrapper.test.tsx.snap +2 -2
  57. package/src/components/TopAppBar/__snapshots__/TopAppBar.test.tsx.snap +2 -2
  58. package/src/data-table/DataTable.tsx +16 -0
  59. package/src/data-table/DataTableBody.tsx +153 -109
  60. package/src/data-table/DataTableCounter.tsx +13 -4
  61. package/src/data-table/DataTableRow.tsx +4 -5
  62. package/src/data-table/DataTableRowContext.tsx +33 -4
  63. package/src/skeleton/Skeleton.css.ts +19 -0
  64. package/src/skeleton/Skeleton.tsx +34 -0
  65. package/src/skeleton/index.ts +1 -0
  66. package/src/sprinkles/properties.css.ts +87 -6
  67. package/src/vanilla/index.ts +2 -0
  68. package/src/data-table/react-table.d.ts +0 -12
@@ -150,6 +150,8 @@ export { WarningIcon } from './src/icons/WarningIcon.js';
150
150
  export { WorkIcon } from './src/icons/WorkIcon.js';
151
151
  export { WriterIcon } from './src/icons/WriterIcon.js';
152
152
  export { YouTubeIcon } from './src/icons/YouTubeIcon.js';
153
+ export { Skeleton } from './src/skeleton/Skeleton.js';
154
+ export { cn } from './src/utils/cn.js';
153
155
  export { Box } from './Box/Box.js';
154
156
  export { extractBoxProps } from './Box/extractBoxProps.js';
155
157
  export { Dialog, DialogBody, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './Dialog/Dialog.js';
@@ -1,3 +1,3 @@
1
- var version = "5.43.4";
1
+ var version = "5.43.6";
2
2
 
3
3
  export { version };
@@ -1,10 +1,10 @@
1
1
  import './../../assets/src/layers/layers.css.ts.vanilla-CBkaYCBT.css';
2
2
  import './../../assets/src/vanilla-extract/global.css.ts.vanilla-BHTgxO8_.css';
3
- import './../../assets/src/sprinkles/properties.css.ts.vanilla-C8hqLKur.css';
3
+ import './../../assets/src/sprinkles/properties.css.ts.vanilla-CRlOneec.css';
4
4
  import './../../assets/src/actions/ActionsRoot.css.ts.vanilla-B5JvX1-v.css';
5
5
  import './../../assets/src/actions/ActionsContent.css.ts.vanilla-BVxWvGVF.css';
6
6
  import { createRuntimeFn } from '@vanilla-extract/recipes/createRuntimeFn';
7
7
 
8
- var content = createRuntimeFn({defaultClassName:'_146hxcf4 _146hxcf2g _146hxcf1k gfg8xi0',variantClassNames:{visible:{always:'gfg8xi1','if-needed':'gfg8xi2'}},defaultVariants:{},compoundVariants:[]});
8
+ var content = createRuntimeFn({defaultClassName:'_146hxcf6 _146hxcf2i _146hxcf1m gfg8xi0',variantClassNames:{visible:{always:'gfg8xi1','if-needed':'gfg8xi2'}},defaultVariants:{},compoundVariants:[]});
9
9
 
10
10
  export { content };
@@ -1,16 +1,16 @@
1
1
  import './../../assets/src/layers/layers.css.ts.vanilla-CBkaYCBT.css';
2
2
  import './../../assets/src/vanilla-extract/global.css.ts.vanilla-BHTgxO8_.css';
3
- import './../../assets/src/sprinkles/properties.css.ts.vanilla-C8hqLKur.css';
3
+ import './../../assets/src/sprinkles/properties.css.ts.vanilla-CRlOneec.css';
4
4
  import './../../assets/src/vanilla/Table/TableRow.css.ts.vanilla-B1NNK8v8.css';
5
5
  import './../../assets/src/data-table/DataTableBody.css.ts.vanilla-B8JRxzQ8.css';
6
6
  import { createRuntimeFn } from '@vanilla-extract/recipes/createRuntimeFn';
7
7
 
8
- var cell = createRuntimeFn({defaultClassName:'_146hxcf1mi _146hxcf0 _146hxcf2g nl338i8',variantClassNames:{pinned:{left:'nl338i9',right:'nl338ia'},resizable:{false:'nl338ib',true:'nl338ic'}},defaultVariants:{},compoundVariants:[]});
8
+ var cell = createRuntimeFn({defaultClassName:'_146hxcf1py _146hxcf2 _146hxcf2i nl338i8',variantClassNames:{pinned:{left:'nl338i9',right:'nl338ia'},resizable:{false:'nl338ib',true:'nl338ic'}},defaultVariants:{},compoundVariants:[]});
9
9
  var cellOffsetVar = 'var(--nl338i1)';
10
10
  var cellSizeVar = 'var(--nl338i0)';
11
11
  var leftTotalSizeVar = 'var(--nl338i2)';
12
12
  var rightTotalSizeVar = 'var(--nl338i3)';
13
- var root = createRuntimeFn({defaultClassName:'_146hxcf1jr _146hxcf1ju _146hxcf1ie _146hxcfhg _146hxcf2g _146hxcfkg nl338i6',variantClassNames:{},defaultVariants:{},compoundVariants:[]});
13
+ var root = createRuntimeFn({defaultClassName:'_146hxcf1n5 _146hxcf1n8 _146hxcf1ls _146hxcfjq _146hxcf2i _146hxcfnu nl338i6',variantClassNames:{},defaultVariants:{},compoundVariants:[]});
14
14
  var totalSizeVar = 'var(--nl338i4)';
15
15
 
16
16
  export { cell, cellOffsetVar, cellSizeVar, leftTotalSizeVar, rightTotalSizeVar, root, totalSizeVar };
@@ -2,7 +2,7 @@ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
2
2
  import { flexRender } from '@tanstack/react-table';
3
3
  import { useVirtualizer } from '@tanstack/react-virtual';
4
4
  import { assignInlineVars } from '@vanilla-extract/dynamic';
5
- import { forwardRef, useRef, useEffect } from 'react';
5
+ import { forwardRef, useMemo, useRef, useEffect } from 'react';
6
6
  import { useDOMRef } from '../components/utils/useDOMRef.js';
7
7
  import { cn } from '../utils/cn.js';
8
8
  import { Box } from '../../Box/Box.js';
@@ -17,22 +17,41 @@ import { TableRow } from '../../Table/TableRow.js';
17
17
  import { useDataTableContext } from './DataTableContext.js';
18
18
  import { DataTableHeaderCell } from './DataTableHeaderCell.js';
19
19
  import { DataTableRow } from './DataTableRow.js';
20
+ import { fakeRow } from './DataTableRowContext.js';
20
21
  import { cell, cellSizeVar, cellOffsetVar, root, totalSizeVar, rightTotalSizeVar, leftTotalSizeVar } from './DataTableBody-css.js';
21
22
 
22
- const COL_VIRTUALIZATION_THRESHOLD = 20;
23
- const ROW_VIRTUALIZATION_THRESHOLD = 20;
23
+ function isTableRow(row) {
24
+ return "original" in row;
25
+ }
26
+ const COL_VIRTUALIZATION_THRESHOLD = 25;
27
+ const ROW_VIRTUALIZATION_THRESHOLD = 25;
24
28
  const DataTableBody = forwardRef(
25
29
  ({
26
30
  className,
27
31
  estimatedRowHeight = 44,
28
32
  bordered = false,
29
33
  size = "sm",
34
+ loading,
30
35
  style,
31
36
  ...props
32
37
  }, ref) => {
33
38
  const domRef = useDOMRef(ref);
34
39
  const { table } = useDataTableContext();
35
- const rows = table.getRowModel().rows;
40
+ const { rows: rawRows } = table.getRowModel();
41
+ const rows = useMemo(() => {
42
+ let index = 0;
43
+ return rawRows.reduce(
44
+ (result, row) => {
45
+ result.push(row);
46
+ index++;
47
+ if (loading && typeof loading === "object" && loading[row.id] === "sub-rows") {
48
+ result.push(fakeRow(table, index++), fakeRow(table, index++));
49
+ }
50
+ return result;
51
+ },
52
+ []
53
+ );
54
+ }, [loading, rawRows, table]);
36
55
  const previousRowsRef = useRef(rows);
37
56
  useEffect(() => {
38
57
  previousRowsRef.current = rows;
@@ -128,99 +147,114 @@ const DataTableBody = forwardRef(
128
147
  {
129
148
  display: "grid",
130
149
  style: rowVirtualizer.options.enabled ? { height: `${rowVirtualizer.getTotalSize()}px` } : void 0,
131
- children: (rowVirtualizer.options.enabled ? virtualRows.length === 0 && rows.length > 0 ? previousRowsRef.current.map((row) => ({
150
+ children: (loading === true ? Array.from({ length: 10 }, (__, rowIndex) => ({
151
+ row: fakeRow(table, rowIndex),
152
+ virtualRow: void 0
153
+ })) : rowVirtualizer.options.enabled ? virtualRows.length === 0 && rows.length > 0 ? previousRowsRef.current.map((row) => ({
132
154
  row,
133
155
  virtualRow: void 0
134
156
  })) : virtualRows.map((virtualRow) => ({
135
157
  row: rows[virtualRow.index],
136
158
  virtualRow
137
- })) : rows.map((row) => ({ row, virtualRow: void 0 }))).map(({ row, virtualRow }, index) => /* @__PURE__ */ jsxs(
138
- DataTableRow,
139
- {
140
- "data-index": virtualRow?.index,
141
- display: "flex",
142
- index: virtualRow?.index ?? index,
143
- row,
144
- ref: virtualRow ? rowVirtualizer.measureElement : void 0,
145
- style: virtualRow ? {
146
- position: "absolute",
147
- transform: `translateY(${virtualRow.start}px)`
148
- } : void 0,
149
- children: [
150
- row.getLeftVisibleCells().map((cell$1) => /* @__PURE__ */ jsx(
151
- TableCell,
152
- {
153
- bordered,
154
- size,
155
- justifyContent: cell$1.column.columnDef.meta?.align,
156
- pinned: true,
157
- style: {
158
- ...assignInlineVars({
159
- [cellOffsetVar]: `${cell$1.column.getStart("left")}px`,
160
- [cellSizeVar]: `${cell$1.column.getSize()}`
161
- })
159
+ })) : rows.map((row) => ({ row, virtualRow: void 0 }))).map(({ row, virtualRow }, index) => {
160
+ const cellProps = isTableRow(row) ? table.options.meta?.getCellProps?.(row) : void 0;
161
+ return /* @__PURE__ */ jsxs(
162
+ DataTableRow,
163
+ {
164
+ "data-index": virtualRow?.index,
165
+ display: "flex",
166
+ index: virtualRow?.index ?? index,
167
+ row,
168
+ ref: virtualRow ? rowVirtualizer.measureElement : void 0,
169
+ style: virtualRow ? {
170
+ position: "absolute",
171
+ transform: `translateY(${virtualRow.start}px)`
172
+ } : void 0,
173
+ children: [
174
+ row.getLeftVisibleCells().map((cell$1) => /* @__PURE__ */ jsx(
175
+ TableCell,
176
+ {
177
+ bordered,
178
+ size,
179
+ justifyContent: cell$1.column.columnDef.meta?.align,
180
+ pinned: true,
181
+ ...cellProps,
182
+ style: {
183
+ ...assignInlineVars({
184
+ [cellOffsetVar]: `${cell$1.column.getStart("left")}px`,
185
+ [cellSizeVar]: `${cell$1.column.getSize()}`
186
+ }),
187
+ ...cellProps?.style
188
+ },
189
+ className: cn(
190
+ cell({
191
+ pinned: "left",
192
+ resizable: cell$1.column.getCanResize()
193
+ }),
194
+ cellProps?.className
195
+ ),
196
+ children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
162
197
  },
163
- className: cn(
164
- cell({
165
- pinned: "left",
166
- resizable: cell$1.column.getCanResize()
167
- })
168
- ),
169
- children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
170
- },
171
- cell$1.id
172
- )),
173
- columnVirtualizer.options.enabled && virtualColumnsOffset > 0 && /* @__PURE__ */ jsx(TableCell, { style: { width: virtualColumnsOffset } }),
174
- (columnVirtualizer.options.enabled ? virtualColumns.map((virtualCell) => {
175
- const cells = row.getCenterVisibleCells();
176
- return cells[virtualCell.index];
177
- }) : row.getCenterVisibleCells()).map((cell$1) => /* @__PURE__ */ jsx(
178
- TableCell,
179
- {
180
- size,
181
- bordered,
182
- justifyContent: cell$1.column.columnDef.meta?.align,
183
- style: {
184
- ...assignInlineVars({
185
- [cellSizeVar]: `${cell$1.column.getSize()}`
186
- })
198
+ cell$1.id
199
+ )),
200
+ columnVirtualizer.options.enabled && virtualColumnsOffset > 0 && /* @__PURE__ */ jsx(TableCell, { style: { width: virtualColumnsOffset } }),
201
+ (columnVirtualizer.options.enabled ? virtualColumns.map((virtualCell) => {
202
+ const cells = row.getCenterVisibleCells();
203
+ return cells[virtualCell.index];
204
+ }) : row.getCenterVisibleCells()).map((cell$1) => /* @__PURE__ */ jsx(
205
+ TableCell,
206
+ {
207
+ size,
208
+ bordered,
209
+ justifyContent: cell$1.column.columnDef.meta?.align,
210
+ ...cellProps,
211
+ style: {
212
+ ...assignInlineVars({
213
+ [cellSizeVar]: `${cell$1.column.getSize()}`
214
+ }),
215
+ ...cellProps?.style
216
+ },
217
+ className: cn(
218
+ cell({
219
+ resizable: cell$1.column.getCanResize()
220
+ }),
221
+ cellProps?.className
222
+ ),
223
+ children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
187
224
  },
188
- className: cn(
189
- cell({
190
- resizable: cell$1.column.getCanResize()
191
- })
192
- ),
193
- children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
194
- },
195
- cell$1.id
196
- )),
197
- row.getRightVisibleCells().map((cell$1) => /* @__PURE__ */ jsx(
198
- TableCell,
199
- {
200
- size,
201
- bordered,
202
- justifyContent: cell$1.column.columnDef.meta?.align,
203
- pinned: true,
204
- style: {
205
- ...assignInlineVars({
206
- [cellOffsetVar]: `${cell$1.column.getStart("right")}px`,
207
- [cellSizeVar]: `${cell$1.column.getSize()}`
208
- })
225
+ cell$1.id
226
+ )),
227
+ row.getRightVisibleCells().map((cell$1) => /* @__PURE__ */ jsx(
228
+ TableCell,
229
+ {
230
+ size,
231
+ bordered,
232
+ justifyContent: cell$1.column.columnDef.meta?.align,
233
+ pinned: true,
234
+ ...cellProps,
235
+ style: {
236
+ ...assignInlineVars({
237
+ [cellOffsetVar]: `${cell$1.column.getStart("right")}px`,
238
+ [cellSizeVar]: `${cell$1.column.getSize()}`
239
+ }),
240
+ ...cellProps?.style
241
+ },
242
+ className: cn(
243
+ cell({
244
+ pinned: "right",
245
+ resizable: cell$1.column.getCanResize()
246
+ }),
247
+ cellProps?.className
248
+ ),
249
+ children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
209
250
  },
210
- className: cn(
211
- cell({
212
- pinned: "right",
213
- resizable: cell$1.column.getCanResize()
214
- })
215
- ),
216
- children: flexRender(cell$1.column.columnDef.cell, cell$1.getContext())
217
- },
218
- cell$1.id
219
- ))
220
- ]
221
- },
222
- row.id
223
- ))
251
+ cell$1.id
252
+ ))
253
+ ]
254
+ },
255
+ row.id
256
+ );
257
+ })
224
258
  }
225
259
  )
226
260
  ]
@@ -1,4 +1,5 @@
1
- import { jsxs, jsx } from '@emotion/react/jsx-runtime';
1
+ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
2
+ import { Skeleton } from '../skeleton/Skeleton.js';
2
3
  import { Box } from '../../Box/Box.js';
3
4
  import '../sprinkles/sprinkles.js';
4
5
  import { Text } from '../../Text/Text.js';
@@ -6,6 +7,7 @@ import { useDataTableContext } from './DataTableContext.js';
6
7
 
7
8
  function DataTableCounter({
8
9
  count: countProp,
10
+ loading = false,
9
11
  singular = "item",
10
12
  plural = "items",
11
13
  ...props
@@ -16,10 +18,10 @@ function DataTableCounter({
16
18
  const hasSelection = selectedCount > 0;
17
19
  const count = hasSelection ? selectedCount : totalCount;
18
20
  const label = count === 1 ? singular : plural;
19
- return /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", gap: "sm", ...props, children: [
21
+ return /* @__PURE__ */ jsx(Box, { display: "flex", alignItems: "center", gap: "sm", ...props, children: loading ? /* @__PURE__ */ jsx(Skeleton, { w: "20" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20
22
  /* @__PURE__ */ jsx(Text, { typography: "label02", color: "active", children: count.toLocaleString() }),
21
23
  /* @__PURE__ */ jsx(Text, { typography: "label02", children: hasSelection ? `${label} selected` : label })
22
- ] });
24
+ ] }) });
23
25
  }
24
26
 
25
27
  export { DataTableCounter };
@@ -1,14 +1,14 @@
1
1
  import './../../assets/src/layers/layers.css.ts.vanilla-CBkaYCBT.css';
2
2
  import './../../assets/src/vanilla-extract/global.css.ts.vanilla-BHTgxO8_.css';
3
- import './../../assets/src/sprinkles/properties.css.ts.vanilla-C8hqLKur.css';
3
+ import './../../assets/src/sprinkles/properties.css.ts.vanilla-CRlOneec.css';
4
4
  import './../../assets/src/vanilla/Table/TableHeader.css.ts.vanilla-2yw_MsU1.css';
5
5
  import './../../assets/src/vanilla/Table/TableRow.css.ts.vanilla-B1NNK8v8.css';
6
6
  import './../../assets/src/vanilla/Table/TableHeaderCell.css.ts.vanilla-CZtubUTB.css';
7
7
  import './../../assets/src/data-table/DataTableHeaderCell.css.ts.vanilla-B2HJ86a7.css';
8
8
  import { createRuntimeFn } from '@vanilla-extract/recipes/createRuntimeFn';
9
9
 
10
- var handle = createRuntimeFn({defaultClassName:'_146hxcf94 _146hxcf1w2 _16lgdksa',variantClassNames:{resizing:{false:'_16lgdksc',true:'_146hxcf1we'}},defaultVariants:{},compoundVariants:[]});
11
- createRuntimeFn({defaultClassName:'_146hxcf7w _146hxcfw0 _146hxcfyk _16lgdks4',variantClassNames:{active:{false:'_16lgdks5',true:'_16lgdks6'}},defaultVariants:{},compoundVariants:[]});
10
+ var handle = createRuntimeFn({defaultClassName:'_146hxcf9q _146hxcf1zi _16lgdksa',variantClassNames:{resizing:{false:'_16lgdksc',true:'_146hxcf1zu'}},defaultVariants:{},compoundVariants:[]});
11
+ createRuntimeFn({defaultClassName:'_146hxcf8i _146hxcfze _146hxcf11y _16lgdks4',variantClassNames:{active:{false:'_16lgdks5',true:'_16lgdks6'}},defaultVariants:{},compoundVariants:[]});
12
12
  var label = createRuntimeFn({defaultClassName:'_16lgdks0',variantClassNames:{sortDir:{false:'_16lgdks2',true:'_16lgdks3'}},defaultVariants:{},compoundVariants:[]});
13
13
 
14
14
  export { handle, label };
@@ -1,4 +1,5 @@
1
- import { createContext, useContext } from 'react';
1
+ import { createContext, createElement, useContext } from 'react';
2
+ import { Skeleton } from '../skeleton/Skeleton.js';
2
3
 
3
4
  const DataTableRowContext = createContext({
4
5
  actions: [],
@@ -18,5 +19,31 @@ function useDataTableRowContext() {
18
19
  }
19
20
  return context;
20
21
  }
22
+ const fakeCellsFactory = (columns, rowIndex) => () => columns.map((column, columnIndex) => ({
23
+ column: {
24
+ ...column,
25
+ columnDef: {
26
+ ...column.columnDef,
27
+ cell: () => createElement(Skeleton, {
28
+ w: ["1/2", "full", "3/4"][(rowIndex + columnIndex) % 3]
29
+ })
30
+ }
31
+ },
32
+ getContext: () => ({}),
33
+ id: column.id
34
+ }));
35
+ const fakeRow = (table, rowIndex) => ({
36
+ getCanMultiSelect: () => false,
37
+ getCanSelect: () => false,
38
+ getCenterVisibleCells: fakeCellsFactory(table.getCenterVisibleLeafColumns(), rowIndex),
39
+ getIsSelected: () => false,
40
+ getLeftVisibleCells: fakeCellsFactory(table.getLeftVisibleLeafColumns(), rowIndex),
41
+ getRightVisibleCells: fakeCellsFactory(table.getRightVisibleLeafColumns(), rowIndex),
42
+ getToggleSelectedHandler: () => (__event) => {
43
+ },
44
+ id: "loading" + rowIndex,
45
+ toggleSelected: (__value) => {
46
+ }
47
+ });
21
48
 
22
- export { DataTableRowProvider, useDataTableRowContext };
49
+ export { DataTableRowProvider, fakeRow, useDataTableRowContext };
@@ -0,0 +1,9 @@
1
+ import './../../assets/src/layers/layers.css.ts.vanilla-CBkaYCBT.css';
2
+ import './../../assets/src/vanilla-extract/global.css.ts.vanilla-BHTgxO8_.css';
3
+ import './../../assets/src/sprinkles/properties.css.ts.vanilla-CRlOneec.css';
4
+ import './../../assets/src/skeleton/Skeleton.css.ts.vanilla-CNzX69JK.css';
5
+ import { createRuntimeFn } from '@vanilla-extract/recipes/createRuntimeFn';
6
+
7
+ var skeleton = createRuntimeFn({defaultClassName:'_146hxcf1q2 _146hxcf1p9 _146hxcf26m _146hxcf2e _1dxg85w0',variantClassNames:{},defaultVariants:{},compoundVariants:[]});
8
+
9
+ export { skeleton };
@@ -0,0 +1,26 @@
1
+ import { jsx } from '@emotion/react/jsx-runtime';
2
+ import { createSlot } from '@radix-ui/react-slot';
3
+ import { forwardRef } from 'react';
4
+ import { cn } from '../utils/cn.js';
5
+ import { Box } from '../../Box/Box.js';
6
+ import '../sprinkles/sprinkles.js';
7
+ import { skeleton } from './Skeleton-css.js';
8
+
9
+ const Slot = createSlot("@orfium/ictinus/Skeleton");
10
+ const Skeleton = forwardRef(
11
+ ({ asChild = true, children, circle, className, rounded = "2", ...props }, ref) => {
12
+ return /* @__PURE__ */ jsx(
13
+ Box,
14
+ {
15
+ asChild,
16
+ rounded: circle || rounded === "7" ? "7" : rounded,
17
+ className: cn(skeleton({}), className),
18
+ ...props,
19
+ children: /* @__PURE__ */ jsx(Slot, { ref, children: children ?? /* @__PURE__ */ jsx("span", {}) })
20
+ }
21
+ );
22
+ }
23
+ );
24
+ Skeleton.displayName = "Skeleton";
25
+
26
+ export { Skeleton };