@duro-app/ui 5.2.0 → 5.4.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.
- package/dist/{Table-C70zdSkM.js → Table-Cm5cCnZD.js} +730 -625
- package/dist/Table-Cm5cCnZD.js.map +1 -0
- package/dist/components/ActionBar/styles.css.d.ts +1 -1
- package/dist/components/ActionBar/styles.css.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.stories.d.ts +3 -0
- package/dist/components/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/Badge/styles.css.d.ts +4 -0
- package/dist/components/Badge/styles.css.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +9 -2
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.meta.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +19 -0
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroupContext.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroupContext.d.ts.map +1 -0
- package/dist/components/ButtonGroup/attached.css.d.ts +34 -0
- package/dist/components/ButtonGroup/attached.css.d.ts.map +1 -0
- package/dist/components/ButtonGroup/styles.css.d.ts +7 -0
- package/dist/components/ButtonGroup/styles.css.d.ts.map +1 -1
- package/dist/components/ButtonGroup/useGroupedControl.d.ts +25 -0
- package/dist/components/ButtonGroup/useGroupedControl.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/styles.css.d.ts +2 -2
- package/dist/components/Dialog/styles.css.d.ts.map +1 -1
- package/dist/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/components/DragDrop/styles.css.d.ts +1 -1
- package/dist/components/DragDrop/styles.css.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css.d.ts +2 -2
- package/dist/components/Drawer/styles.css.d.ts.map +1 -1
- package/dist/components/Listbox/styles.css.d.ts +1 -1
- package/dist/components/Listbox/styles.css.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/styles.css.d.ts +1 -1
- package/dist/components/Menu/styles.css.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +7 -2
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/styles.css.d.ts +4 -1
- package/dist/components/Popover/styles.css.d.ts.map +1 -1
- package/dist/components/ScrollArea/styles.css.d.ts +1 -1
- package/dist/components/ScrollArea/styles.css.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.stories.d.ts +2 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/styles.css.d.ts +2 -2
- package/dist/components/Select/styles.css.d.ts.map +1 -1
- package/dist/components/Select/useSelectRoot.d.ts.map +1 -1
- package/dist/components/ThemeProvider/Layers.stories.d.ts +24 -0
- package/dist/components/ThemeProvider/Layers.stories.d.ts.map +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/Toast/styles.css.d.ts +1 -0
- package/dist/components/Toast/styles.css.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/styles.css.d.ts +3 -0
- package/dist/components/Toggle/styles.css.d.ts.map +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup/styles.css.d.ts +5 -0
- package/dist/components/ToggleGroup/styles.css.d.ts.map +1 -1
- package/dist/components/Toolbar/ControlContextBoundary.d.ts +10 -0
- package/dist/components/Toolbar/ControlContextBoundary.d.ts.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +22 -0
- package/dist/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/components/Toolbar/Toolbar.meta.d.ts +3 -0
- package/dist/components/Toolbar/Toolbar.meta.d.ts.map +1 -0
- package/dist/components/Toolbar/Toolbar.stories.d.ts +28 -0
- package/dist/components/Toolbar/Toolbar.stories.d.ts.map +1 -0
- package/dist/components/Toolbar/ToolbarContext.d.ts +10 -0
- package/dist/components/Toolbar/ToolbarContext.d.ts.map +1 -0
- package/dist/components/Toolbar/styles.css.d.ts +16 -0
- package/dist/components/Toolbar/styles.css.d.ts.map +1 -0
- package/dist/components/Tooltip/styles.css.d.ts +1 -1
- package/dist/components/Tooltip/styles.css.d.ts.map +1 -1
- package/dist/components/VirtualTable/styles.css.d.ts +1 -1
- package/dist/components/VirtualTable/styles.css.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3164 -2917
- package/dist/index.js.map +1 -1
- package/dist/shared/ModalContext.d.ts +14 -0
- package/dist/shared/ModalContext.d.ts.map +1 -0
- package/dist/shared/mergeRefs.d.ts +4 -0
- package/dist/shared/mergeRefs.d.ts.map +1 -0
- package/dist/shared/useOrderedRegistry.d.ts +26 -0
- package/dist/shared/useOrderedRegistry.d.ts.map +1 -0
- package/dist/table.js +45 -45
- package/dist/table.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ActionBar/styles.css.ts +2 -1
- package/src/components/Badge/Badge.stories.tsx +62 -1
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Badge/styles.css.ts +5 -0
- package/src/components/Button/Button.tsx +7 -1
- package/src/components/ButtonGroup/ButtonGroup.meta.ts +14 -1
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +271 -1
- package/src/components/ButtonGroup/ButtonGroup.tsx +46 -14
- package/src/components/ButtonGroup/ButtonGroupContext.ts +19 -0
- package/src/components/ButtonGroup/attached.css.ts +44 -0
- package/src/components/ButtonGroup/styles.css.ts +8 -0
- package/src/components/ButtonGroup/useGroupedControl.ts +75 -0
- package/src/components/Dialog/Dialog.tsx +5 -1
- package/src/components/Dialog/styles.css.ts +3 -2
- package/src/components/DragDrop/DragDrop.tsx +15 -8
- package/src/components/DragDrop/styles.css.ts +4 -1
- package/src/components/Drawer/Drawer.tsx +5 -1
- package/src/components/Drawer/styles.css.ts +3 -2
- package/src/components/Listbox/styles.css.ts +2 -1
- package/src/components/Menu/Menu.tsx +10 -3
- package/src/components/Menu/styles.css.ts +2 -1
- package/src/components/Popover/Popover.tsx +26 -5
- package/src/components/Popover/styles.css.ts +9 -1
- package/src/components/ScrollArea/styles.css.ts +2 -1
- package/src/components/Select/Select.stories.tsx +20 -1
- package/src/components/Select/Select.tsx +9 -3
- package/src/components/Select/styles.css.ts +3 -2
- package/src/components/Select/useSelectRoot.ts +17 -0
- package/src/components/ThemeProvider/Layers.stories.tsx +379 -0
- package/src/components/ThemeProvider/ThemeProvider.tsx +4 -2
- package/src/components/Toast/styles.css.ts +3 -0
- package/src/components/Toggle/Toggle.tsx +20 -4
- package/src/components/Toggle/styles.css.ts +6 -0
- package/src/components/ToggleGroup/ToggleGroup.tsx +16 -4
- package/src/components/ToggleGroup/styles.css.ts +7 -0
- package/src/components/Toolbar/ControlContextBoundary.tsx +16 -0
- package/src/components/Toolbar/Toolbar.meta.ts +48 -0
- package/src/components/Toolbar/Toolbar.stories.tsx +468 -0
- package/src/components/Toolbar/Toolbar.tsx +113 -0
- package/src/components/Toolbar/ToolbarContext.ts +15 -0
- package/src/components/Toolbar/styles.css.ts +17 -0
- package/src/components/Tooltip/styles.css.ts +2 -1
- package/src/components/VirtualTable/styles.css.ts +2 -1
- package/src/index.ts +2 -1
- package/src/shared/ModalContext.ts +18 -0
- package/src/shared/mergeRefs.ts +11 -0
- package/src/shared/useOrderedRegistry.ts +57 -0
- package/dist/Table-C70zdSkM.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True inside a Dialog or Drawer. A Popover reads it to pick its layer: inside
|
|
3
|
+
* a modal it must clear that modal (`layers.popover`); outside one it stays at
|
|
4
|
+
* `layers.floating`, so a modal opened later, even from inside the Popover,
|
|
5
|
+
* covers it.
|
|
6
|
+
*
|
|
7
|
+
* holds-until: a Dialog opened from a Popover that itself sits inside a Dialog
|
|
8
|
+
* still renders under that Popover (1000/1001 < 1040). It is fixed when a
|
|
9
|
+
* nested Dialog lifts its layer above its opener, or when the parent Popover
|
|
10
|
+
* closes on a nested modal opening; no consumer needs it yet.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ModalContext: import('react').Context<boolean>;
|
|
13
|
+
export declare function useInModal(): boolean;
|
|
14
|
+
//# sourceMappingURL=ModalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalContext.d.ts","sourceRoot":"","sources":["../../src/shared/ModalContext.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,kCAAuB,CAAA;AAEhD,wBAAgB,UAAU,YAEzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/shared/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,GAAG,EAAE,WAAW,EAAC,MAAM,OAAO,CAAA;AAE3C,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAO/E"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** A registered control: its id, in DOM order, and whether it is disabled. */
|
|
2
|
+
export interface RegisteredControl {
|
|
3
|
+
id: string;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Controls register their element here and come back in DOM order (the way
|
|
8
|
+
* useRovingFocus orders a wrapping ToggleGroup). A control's place is read
|
|
9
|
+
* from where it sits in the document, not from its parent: a Select or Menu
|
|
10
|
+
* trigger sits inside its own Root, so `:first-child` cannot tell.
|
|
11
|
+
*
|
|
12
|
+
* Registration happens in a layout effect, so server-rendered HTML (and the
|
|
13
|
+
* first client render) sees an empty registry.
|
|
14
|
+
*
|
|
15
|
+
* Keyed children can move without remounting, so the order is also re-read
|
|
16
|
+
* after every commit of the owner; state changes only when the order did.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useOrderedRegistry(): {
|
|
19
|
+
elements: import('react').RefObject<Map<string, {
|
|
20
|
+
el: HTMLElement;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
}>>;
|
|
23
|
+
order: RegisteredControl[];
|
|
24
|
+
register: (id: string, el: HTMLElement, disabled: boolean) => () => void;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=useOrderedRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrderedRegistry.d.ts","sourceRoot":"","sources":["../../src/shared/useOrderedRegistry.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,OAAO,CAAA;CAClB;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB;;YACa,WAAW;kBAAY,OAAO;;;mBAapE,MAAM,MAAM,WAAW,YAAY,OAAO;EAgBlD"}
|
package/dist/table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as F,
|
|
1
|
+
import { M as F, l as xt, R as rt, H as kt, m as pt, n as bt, o as ft, p as mt, j as ht, q as yt, r as St, t as Tt } from "./Table-Cm5cCnZD.js";
|
|
2
2
|
import { jsx as u, jsxs as q } from "react/jsx-runtime";
|
|
3
3
|
import { c as H, m as p, d as b } from "./compiler-runtime-B2IcI8_O.js";
|
|
4
4
|
import { flexRender as E, useReactTable as it, getPaginationRowModel as Ct, getFilteredRowModel as vt, getSortedRowModel as at, getCoreRowModel as st } from "@tanstack/react-table";
|
|
@@ -230,9 +230,9 @@ function ct(o) {
|
|
|
230
230
|
let $;
|
|
231
231
|
if (t[10] !== c || t[11] !== x || t[12] !== k || t[13] !== e) {
|
|
232
232
|
let j;
|
|
233
|
-
t[15] !== c || t[16] !== x || t[17] !== k ? (j = (
|
|
234
|
-
const O = k?.(
|
|
235
|
-
return /* @__PURE__ */ u(rt, { onClick: c ? () => c(
|
|
233
|
+
t[15] !== c || t[16] !== x || t[17] !== k ? (j = (D) => {
|
|
234
|
+
const O = k?.(D) ?? D.id;
|
|
235
|
+
return /* @__PURE__ */ u(rt, { onClick: c ? () => c(D) : void 0, "aria-label": x?.(D), children: D.getVisibleCells().map(It) }, O);
|
|
236
236
|
}, t[15] = c, t[16] = x, t[17] = k, t[18] = j) : j = t[18], $ = e.getRowModel().rows.map(j), t[10] = c, t[11] = x, t[12] = k, t[13] = e, t[14] = $;
|
|
237
237
|
} else
|
|
238
238
|
$ = t[14];
|
|
@@ -313,30 +313,30 @@ function Yt(o, t, e = {}) {
|
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const Dt = {
|
|
317
317
|
"overflowY-kORKVm": "overflowY-x1odjw0f",
|
|
318
318
|
"overscrollBehavior-kZeWKH": "overscrollBehavior-xish69e",
|
|
319
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
320
|
-
},
|
|
319
|
+
$$css: "VirtualTable/styles.css.ts:23"
|
|
320
|
+
}, Bt = {
|
|
321
321
|
"position-kVAEAm": "position-x1n2onr6",
|
|
322
322
|
"width-kzqmXN": "width-xh8yej3",
|
|
323
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
323
|
+
$$css: "VirtualTable/styles.css.ts:66"
|
|
324
324
|
}, Pt = {
|
|
325
325
|
"position-kVAEAm": "position-x10l6tqk",
|
|
326
326
|
"top-k87sOh": "top-x13vifvy",
|
|
327
327
|
"left-kbCHJM": "left-xu96u03",
|
|
328
328
|
"transform-k3aq6I": "transform-xsqj5wx",
|
|
329
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
329
|
+
$$css: "VirtualTable/styles.css.ts:85"
|
|
330
330
|
}, At = {
|
|
331
331
|
"flexShrink-kmuXW": "flexShrink-xs83m0k",
|
|
332
332
|
"flexBasis-kCS8Yb": "flexBasis-x1r8uery",
|
|
333
333
|
"minWidth-k7Eaqz": "minWidth-xeuugli",
|
|
334
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
334
|
+
$$css: "VirtualTable/styles.css.ts:104"
|
|
335
335
|
}, g = {
|
|
336
336
|
wrap: {
|
|
337
337
|
"position-kVAEAm": "position-x1n2onr6",
|
|
338
338
|
"width-kzqmXN": "width-xh8yej3",
|
|
339
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
339
|
+
$$css: "VirtualTable/styles.css.ts:9"
|
|
340
340
|
},
|
|
341
341
|
scroll: {
|
|
342
342
|
"position-kVAEAm": "position-x1n2onr6",
|
|
@@ -346,20 +346,20 @@ const Bt = {
|
|
|
346
346
|
"borderColor-kVAM5u": "borderColor-x15ykms2",
|
|
347
347
|
"borderRadius-kaIpWk": "borderRadius-xwbokb3",
|
|
348
348
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
349
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
349
|
+
$$css: "VirtualTable/styles.css.ts:13"
|
|
350
350
|
},
|
|
351
|
-
scrollMax: (o) => [
|
|
351
|
+
scrollMax: (o) => [Dt, {
|
|
352
352
|
"maxHeight-kskxy": o != null ? "maxHeight-x1jols5v" : o,
|
|
353
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
353
|
+
$$css: "VirtualTable/styles.css.ts:23"
|
|
354
354
|
}, {
|
|
355
355
|
"--x-maxHeight": ((t) => typeof t == "number" ? t + "px" : t ?? void 0)(o)
|
|
356
356
|
}],
|
|
357
357
|
head: {
|
|
358
358
|
"position-kVAEAm": "position-x7wzq59",
|
|
359
359
|
"top-k87sOh": "top-x13vifvy",
|
|
360
|
-
"zIndex-kY2c9j": "zIndex-
|
|
360
|
+
"zIndex-kY2c9j": "zIndex-xqft9t",
|
|
361
361
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
362
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
362
|
+
$$css: "VirtualTable/styles.css.ts:28"
|
|
363
363
|
},
|
|
364
364
|
headRow: {
|
|
365
365
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -367,7 +367,7 @@ const Bt = {
|
|
|
367
367
|
"borderBottomWidth-kt9PQ7": "borderBottomWidth-x12yxxv5",
|
|
368
368
|
"borderBottomStyle-kfdmCh": "borderBottomStyle-x1q0q8m5",
|
|
369
369
|
"borderBottomColor-kL6WhQ": "borderBottomColor-x19cyuh1",
|
|
370
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
370
|
+
$$css: "VirtualTable/styles.css.ts:34"
|
|
371
371
|
},
|
|
372
372
|
headCell: {
|
|
373
373
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -384,22 +384,22 @@ const Bt = {
|
|
|
384
384
|
"textTransform-kP9fke": "textTransform-xtvhhri",
|
|
385
385
|
"letterSpacing-kb6lSQ": "letterSpacing-x3gc2hl",
|
|
386
386
|
"color-kMwMTN": "color-x4opovt",
|
|
387
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
387
|
+
$$css: "VirtualTable/styles.css.ts:41"
|
|
388
388
|
},
|
|
389
389
|
headCellSortable: {
|
|
390
390
|
"cursor-kkrTdU": "cursor-x1ypdohk",
|
|
391
391
|
"userSelect-kfSwDN": "userSelect-x87ps6o",
|
|
392
392
|
"color-kMwMTN": "color-x4opovt color-xtolcfe",
|
|
393
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
393
|
+
$$css: "VirtualTable/styles.css.ts:57"
|
|
394
394
|
},
|
|
395
395
|
sortMark: {
|
|
396
396
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
397
397
|
"color-kMwMTN": "color-xf715ks",
|
|
398
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
398
|
+
$$css: "VirtualTable/styles.css.ts:62"
|
|
399
399
|
},
|
|
400
|
-
bodyTotal: (o) => [
|
|
400
|
+
bodyTotal: (o) => [Bt, {
|
|
401
401
|
"height-kZKoxP": o != null ? "height-x16ye13r" : o,
|
|
402
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
402
|
+
$$css: "VirtualTable/styles.css.ts:66"
|
|
403
403
|
}, {
|
|
404
404
|
"--x-height": ((t) => typeof t == "number" ? t + "px" : t ?? void 0)(o)
|
|
405
405
|
}],
|
|
@@ -411,12 +411,12 @@ const Bt = {
|
|
|
411
411
|
"borderBottomWidth-kt9PQ7": "borderBottomWidth-x12yxxv5",
|
|
412
412
|
"borderBottomStyle-kfdmCh": "borderBottomStyle-x1q0q8m5",
|
|
413
413
|
"borderBottomColor-kL6WhQ": "borderBottomColor-x19cyuh1",
|
|
414
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
414
|
+
$$css: "VirtualTable/styles.css.ts:71"
|
|
415
415
|
},
|
|
416
416
|
rowClickable: {
|
|
417
417
|
"cursor-kkrTdU": "cursor-x1ypdohk",
|
|
418
418
|
"backgroundColor-kWkggS": "backgroundColor-xjbqb8w backgroundColor-x14zl4n5",
|
|
419
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
419
|
+
$$css: "VirtualTable/styles.css.ts:80"
|
|
420
420
|
},
|
|
421
421
|
rowAbsolute: (o) => [Pt, {
|
|
422
422
|
"--x-transform": `translateY(${o}px)` != null ? `translateY(${o}px)` : void 0
|
|
@@ -432,11 +432,11 @@ const Bt = {
|
|
|
432
432
|
"overflow-kVQacm": "overflow-xb3r6kr",
|
|
433
433
|
"textOverflow-kg5iWk": "textOverflow-xlyipyv",
|
|
434
434
|
"whiteSpace-khDVqt": "whiteSpace-xuxw1ft",
|
|
435
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
435
|
+
$$css: "VirtualTable/styles.css.ts:91"
|
|
436
436
|
},
|
|
437
437
|
cellFlex: (o) => [At, {
|
|
438
438
|
"flexGrow-kzQI83": o != null ? "flexGrow-xw36f2b" : o,
|
|
439
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
439
|
+
$$css: "VirtualTable/styles.css.ts:104"
|
|
440
440
|
}, {
|
|
441
441
|
"--x-flexGrow": o ?? void 0
|
|
442
442
|
}],
|
|
@@ -444,13 +444,13 @@ const Bt = {
|
|
|
444
444
|
"position-kVAEAm": "position-x1n2onr6",
|
|
445
445
|
"width-kzqmXN": "width-xh8yej3",
|
|
446
446
|
"backgroundColor-kWkggS": "backgroundColor-xjbqb8w",
|
|
447
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
447
|
+
$$css: "VirtualTable/styles.css.ts:113"
|
|
448
448
|
},
|
|
449
449
|
stackBody: {
|
|
450
450
|
"display-k1xSpc": "display-x78zum5",
|
|
451
451
|
"flexDirection-kXwgrk": "flexDirection-xdt5ytf",
|
|
452
452
|
"gap-kOIVth": "gap-x175yhtj",
|
|
453
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
453
|
+
$$css: "VirtualTable/styles.css.ts:118"
|
|
454
454
|
},
|
|
455
455
|
stackRow: {
|
|
456
456
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -463,7 +463,7 @@ const Bt = {
|
|
|
463
463
|
"borderColor-kVAM5u": "borderColor-x15ykms2",
|
|
464
464
|
"borderRadius-kaIpWk": "borderRadius-x17rit4p",
|
|
465
465
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
466
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
466
|
+
$$css: "VirtualTable/styles.css.ts:123"
|
|
467
467
|
},
|
|
468
468
|
stackCell: {
|
|
469
469
|
"display-k1xSpc": "display-xrvj5dj",
|
|
@@ -473,18 +473,18 @@ const Bt = {
|
|
|
473
473
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
474
474
|
"fontSize-kGuDYH": "fontSize-x1tzajr0",
|
|
475
475
|
"color-kMwMTN": "color-x95150z",
|
|
476
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
476
|
+
$$css: "VirtualTable/styles.css.ts:135"
|
|
477
477
|
},
|
|
478
478
|
stackCellLabel: {
|
|
479
479
|
"color-kMwMTN": "color-x4opovt",
|
|
480
480
|
"fontWeight-k63SB2": "fontWeight-x120ksxs",
|
|
481
481
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
482
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
482
|
+
$$css: "VirtualTable/styles.css.ts:144"
|
|
483
483
|
},
|
|
484
484
|
stackCellValue: {
|
|
485
485
|
"minWidth-k7Eaqz": "minWidth-xeuugli",
|
|
486
486
|
"overflowWrap-kHjlTd": "overflowWrap-x1mzt3pk",
|
|
487
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
487
|
+
$$css: "VirtualTable/styles.css.ts:149"
|
|
488
488
|
},
|
|
489
489
|
empty: {
|
|
490
490
|
"paddingTop-kLKAdn": "paddingTop-x1v4wg84",
|
|
@@ -493,7 +493,7 @@ const Bt = {
|
|
|
493
493
|
"color-kMwMTN": "color-x4opovt",
|
|
494
494
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
495
495
|
"fontSize-kGuDYH": "fontSize-x1tzajr0",
|
|
496
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
496
|
+
$$css: "VirtualTable/styles.css.ts:153"
|
|
497
497
|
},
|
|
498
498
|
pos: {
|
|
499
499
|
"position-kVAEAm": "position-x10l6tqk",
|
|
@@ -512,7 +512,7 @@ const Bt = {
|
|
|
512
512
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
513
513
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
514
514
|
"pointerEvents-kfzvcC": "pointerEvents-x47corl",
|
|
515
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
515
|
+
$$css: "VirtualTable/styles.css.ts:162"
|
|
516
516
|
}
|
|
517
517
|
}, Gt = typeof window < "u" ? Vt : Z;
|
|
518
518
|
function Xt({
|
|
@@ -544,16 +544,16 @@ function Xt({
|
|
|
544
544
|
getRowId: l,
|
|
545
545
|
getCoreRowModel: st(),
|
|
546
546
|
getSortedRowModel: at()
|
|
547
|
-
}), a = $.getRowModel().rows, R = K(null), [j,
|
|
547
|
+
}), a = $.getRowModel().rows, R = K(null), [j, D] = G(!1), O = typeof f == "number" ? f : ht[f];
|
|
548
548
|
Gt(() => {
|
|
549
549
|
if (!m) {
|
|
550
|
-
|
|
550
|
+
D(!1);
|
|
551
551
|
return;
|
|
552
552
|
}
|
|
553
553
|
const d = R.current;
|
|
554
554
|
if (!d || typeof ResizeObserver > "u") return;
|
|
555
555
|
const w = (I) => {
|
|
556
|
-
I > 0 &&
|
|
556
|
+
I > 0 && D(I < O);
|
|
557
557
|
};
|
|
558
558
|
w(d.getBoundingClientRect().width);
|
|
559
559
|
const W = new ResizeObserver((I) => {
|
|
@@ -564,14 +564,14 @@ function Xt({
|
|
|
564
564
|
});
|
|
565
565
|
return W.observe(d), () => W.disconnect();
|
|
566
566
|
}, [m, O]);
|
|
567
|
-
const
|
|
567
|
+
const B = a.length > T && !j, et = K(null), Y = $t({
|
|
568
568
|
count: a.length,
|
|
569
569
|
getScrollElement: () => et.current,
|
|
570
570
|
estimateSize: () => x,
|
|
571
571
|
overscan: 12
|
|
572
572
|
}), Q = K(!0);
|
|
573
573
|
Z(() => {
|
|
574
|
-
if (!
|
|
574
|
+
if (!B) {
|
|
575
575
|
Q.current = !1;
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
@@ -582,7 +582,7 @@ function Xt({
|
|
|
582
582
|
Q.current = !1;
|
|
583
583
|
}, 300);
|
|
584
584
|
return () => clearTimeout(d);
|
|
585
|
-
}, [
|
|
585
|
+
}, [B]);
|
|
586
586
|
const N = Y.getVirtualItems(), U = N[0]?.index ?? 0, ot = N.length ? N[N.length - 1].index : 0, lt = Math.max(1, Math.ceil(a.length / c)), P = Math.floor(Math.max(0, U) / c) + 1, X = {
|
|
587
587
|
from: a.length ? U + 1 : 0,
|
|
588
588
|
to: a.length ? ot + 1 : 0,
|
|
@@ -591,7 +591,7 @@ function Xt({
|
|
|
591
591
|
pages: lt
|
|
592
592
|
}, J = K(null);
|
|
593
593
|
Z(() => {
|
|
594
|
-
if (!(!
|
|
594
|
+
if (!(!B || !C)) {
|
|
595
595
|
if (Q.current) {
|
|
596
596
|
J.current = P;
|
|
597
597
|
return;
|
|
@@ -604,7 +604,7 @@ function Xt({
|
|
|
604
604
|
pages: lt
|
|
605
605
|
}));
|
|
606
606
|
}
|
|
607
|
-
}, [P,
|
|
607
|
+
}, [P, B]);
|
|
608
608
|
const ut = (d) => {
|
|
609
609
|
const w = d.meta;
|
|
610
610
|
return typeof w?.stackLabel == "string" ? w.stackLabel : typeof w?.label == "string" ? w.label : typeof d.header == "string" ? d.header : "";
|
|
@@ -616,7 +616,7 @@ function Xt({
|
|
|
616
616
|
] }, z.id);
|
|
617
617
|
}) }, d.id) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:262", ref: I, "data-index": w, role: "row", "aria-label": i?.(d.original), onClick: r ? () => r(d.original) : void 0, ...p(b.div, g.row, !!r && g.rowClickable, W), children: d.getVisibleCells().map((z) => /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:272", role: "cell", ...p(b.div, g.cell, g.cellFlex(z.column.getSize())), children: E(z.column.columnDef.cell, z.getContext()) }, z.id)) }, d.id), gt = k?.(X) ?? (a.length ? `${X.from}–${X.to} / ${X.total}` : "");
|
|
618
618
|
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:287", ref: R, ...p(b.div, g.wrap), children: [
|
|
619
|
-
/* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:288", ref: et, role: "table", ...p(b.div, j ? g.stackScroll : g.scroll,
|
|
619
|
+
/* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:288", ref: et, role: "table", ...p(b.div, j ? g.stackScroll : g.scroll, B && g.scrollMax(St(y))), children: [
|
|
620
620
|
j ? null : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:297", role: "rowgroup", ...p(b.div, g.head), children: $.getHeaderGroups().map((d) => /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:299", role: "row", ...p(b.div, g.headRow), children: d.headers.map((w) => {
|
|
621
621
|
const W = w.column, I = W.getIsSorted();
|
|
622
622
|
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:304", role: "columnheader", "aria-sort": I === "asc" ? "ascending" : I === "desc" ? "descending" : void 0, onClick: W.getCanSort() ? W.getToggleSortingHandler() : void 0, ...p(b.div, g.headCell, W.getCanSort() && g.headCellSortable, g.cellFlex(w.getSize())), children: [
|
|
@@ -624,9 +624,9 @@ function Xt({
|
|
|
624
624
|
I ? /* @__PURE__ */ u("span", { "data-element-src": "VirtualTable/VirtualTable.tsx:325", ...p(b.span, g.sortMark), children: I === "asc" ? "↑" : "↓" }) : null
|
|
625
625
|
] }, w.id);
|
|
626
626
|
}) }, d.id)) }),
|
|
627
|
-
a.length === 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:338", ...p(b.div, g.empty), children: S }) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:340", role: "rowgroup", ...p(b.div, j ? g.stackBody :
|
|
627
|
+
a.length === 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:338", ...p(b.div, g.empty), children: S }) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:340", role: "rowgroup", ...p(b.div, j ? g.stackBody : B ? g.bodyTotal(Y.getTotalSize()) : void 0), children: B ? N.map((d) => nt(a[d.index], d.index, g.rowAbsolute(d.start), Y.measureElement)) : a.map((d, w) => nt(d, w)) })
|
|
628
628
|
] }),
|
|
629
|
-
|
|
629
|
+
B && a.length > 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:365", "aria-live": "polite", ...p(b.div, g.pos), children: gt }) : null
|
|
630
630
|
] });
|
|
631
631
|
}
|
|
632
632
|
const Kt = {
|