@ah-automation.nl/component-lib 0.0.24 → 0.0.26
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../../src/components/ui/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,KAAK,IAAI,aAAa,EAM5B,MAAM,uBAAuB,CAAC;AAe/B,KAAK,cAAc,CAAC,KAAK,IAAI;IAC3B,IAAI,EAAE,KAAK,EAAE,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACzD,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;IAChD,UAAU,CAAC,EAAE,CACX,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,EACf,KAAK,EAAE,UAAU,CAAC,mBAAmB,CAAC,KACnC,IAAI,CAAC;IACV,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC;IAClE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB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;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,KAAK,EAAE,EAC/B,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,uBAAqC,EACrC,YAA4B,EAC5B,cAAmB,EACnB,kBAAyB,EACzB,sBAA2B,EAC3B,wBAA6B,EAC7B,SAAS,GACV,EAAE,cAAc,CAAC,KAAK,CAAC,2CAuLvB"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
type TableProps = React.ComponentProps<"table"> & {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function Table({ className, containerClassName, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAgBrE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQ1E;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAW1E;AAED,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWpE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWrE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,2CAWrE;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,2CAQjC;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10232,18 +10232,21 @@ function mf(e) {
|
|
|
10232
10232
|
}
|
|
10233
10233
|
})), t.current;
|
|
10234
10234
|
}
|
|
10235
|
-
function pf({ className: e,
|
|
10235
|
+
function pf({ className: e, containerClassName: n, ...t }) {
|
|
10236
10236
|
return /* @__PURE__ */ g(
|
|
10237
10237
|
"div",
|
|
10238
10238
|
{
|
|
10239
10239
|
"data-slot": "table-container",
|
|
10240
|
-
className:
|
|
10240
|
+
className: M(
|
|
10241
|
+
"relative w-full overflow-x-auto overflow-y-visible",
|
|
10242
|
+
n
|
|
10243
|
+
),
|
|
10241
10244
|
children: /* @__PURE__ */ g(
|
|
10242
10245
|
"table",
|
|
10243
10246
|
{
|
|
10244
10247
|
"data-slot": "table",
|
|
10245
10248
|
className: M("w-full caption-bottom text-sm", e),
|
|
10246
|
-
...
|
|
10249
|
+
...t
|
|
10247
10250
|
}
|
|
10248
10251
|
)
|
|
10249
10252
|
}
|
|
@@ -10346,115 +10349,124 @@ function Ff({
|
|
|
10346
10349
|
estimateSize: () => p,
|
|
10347
10350
|
overscan: c
|
|
10348
10351
|
}), E = N.getVirtualItems(), C = E[0]?.start ?? 0, _ = E.length > 0 ? N.getTotalSize() - (E.at(-1)?.end ?? 0) : 0, I = u || i;
|
|
10349
|
-
return /* @__PURE__ */ A(
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
"
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
] }),
|
|
10362
|
-
/* @__PURE__ */ g(
|
|
10363
|
-
"div",
|
|
10364
|
-
{
|
|
10365
|
-
ref: w,
|
|
10366
|
-
className: "max-h-[min(68vh,42rem)] min-h-[16rem] overflow-y-auto rounded-md border border-border",
|
|
10367
|
-
children: /* @__PURE__ */ A(pf, { children: [
|
|
10368
|
-
/* @__PURE__ */ g(hf, { children: b.getHeaderGroups().map((T) => /* @__PURE__ */ g(ht, { className: "hover:bg-transparent", children: T.headers.map((B) => {
|
|
10369
|
-
const z = B.column.columnDef.meta;
|
|
10370
|
-
return /* @__PURE__ */ g(
|
|
10371
|
-
bf,
|
|
10372
|
-
{
|
|
10373
|
-
className: M(
|
|
10374
|
-
"sticky top-0 z-20 bg-card",
|
|
10375
|
-
z?.headerClassName
|
|
10376
|
-
),
|
|
10377
|
-
children: B.isPlaceholder ? null : B.column.getCanSort() ? /* @__PURE__ */ A(
|
|
10378
|
-
je,
|
|
10379
|
-
{
|
|
10380
|
-
type: "button",
|
|
10381
|
-
variant: "ghost",
|
|
10382
|
-
size: "sm",
|
|
10383
|
-
className: "-ml-2 h-8 cursor-pointer px-2 hover:bg-muted/60",
|
|
10384
|
-
onClick: () => B.column.toggleSorting(
|
|
10385
|
-
B.column.getIsSorted() === "asc"
|
|
10386
|
-
),
|
|
10387
|
-
children: [
|
|
10388
|
-
Vn(
|
|
10389
|
-
B.column.columnDef.header,
|
|
10390
|
-
B.getContext()
|
|
10391
|
-
),
|
|
10392
|
-
B.column.getIsSorted() === "asc" ? /* @__PURE__ */ g(Ro, { className: "size-4" }) : B.column.getIsSorted() === "desc" ? /* @__PURE__ */ g(xt, { className: "size-4" }) : /* @__PURE__ */ g(ms, { className: "size-4 opacity-60" })
|
|
10393
|
-
]
|
|
10394
|
-
}
|
|
10395
|
-
) : Vn(
|
|
10396
|
-
B.column.columnDef.header,
|
|
10397
|
-
B.getContext()
|
|
10398
|
-
)
|
|
10399
|
-
},
|
|
10400
|
-
B.id
|
|
10401
|
-
);
|
|
10402
|
-
}) }, T.id)) }),
|
|
10403
|
-
/* @__PURE__ */ g(vf, { children: R.length === 0 ? /* @__PURE__ */ g(ht, { children: /* @__PURE__ */ g(
|
|
10404
|
-
Ht,
|
|
10352
|
+
return /* @__PURE__ */ A(
|
|
10353
|
+
"div",
|
|
10354
|
+
{
|
|
10355
|
+
className: M(
|
|
10356
|
+
"min-h-0 w-full min-w-0 max-w-full space-y-3 overflow-x-hidden [contain:inline-size]",
|
|
10357
|
+
d
|
|
10358
|
+
),
|
|
10359
|
+
children: [
|
|
10360
|
+
I && /* @__PURE__ */ A("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
10361
|
+
i?.(b),
|
|
10362
|
+
u && /* @__PURE__ */ g(
|
|
10363
|
+
"input",
|
|
10405
10364
|
{
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10365
|
+
value: h,
|
|
10366
|
+
onChange: (T) => x(T.target.value),
|
|
10367
|
+
placeholder: a,
|
|
10368
|
+
className: "ml-auto h-8 w-full rounded-md border border-input bg-background px-2 text-sm outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 sm:w-72"
|
|
10409
10369
|
}
|
|
10410
|
-
)
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10370
|
+
)
|
|
10371
|
+
] }),
|
|
10372
|
+
/* @__PURE__ */ g(
|
|
10373
|
+
"div",
|
|
10374
|
+
{
|
|
10375
|
+
ref: w,
|
|
10376
|
+
className: "max-h-[min(68vh,42rem)] min-h-[16rem] w-full min-w-0 max-w-full overflow-auto rounded-md border border-border",
|
|
10377
|
+
children: /* @__PURE__ */ g("div", { className: "min-w-full w-max", children: /* @__PURE__ */ A(pf, { containerClassName: "overflow-visible", className: "w-full", children: [
|
|
10378
|
+
/* @__PURE__ */ g(hf, { children: b.getHeaderGroups().map((T) => /* @__PURE__ */ g(ht, { className: "hover:bg-transparent", children: T.headers.map((B) => {
|
|
10379
|
+
const z = B.column.columnDef.meta;
|
|
10380
|
+
return /* @__PURE__ */ g(
|
|
10381
|
+
bf,
|
|
10418
10382
|
{
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10383
|
+
className: M(
|
|
10384
|
+
"sticky top-0 z-20 bg-card",
|
|
10385
|
+
z?.headerClassName
|
|
10386
|
+
),
|
|
10387
|
+
children: B.isPlaceholder ? null : B.column.getCanSort() ? /* @__PURE__ */ A(
|
|
10388
|
+
je,
|
|
10389
|
+
{
|
|
10390
|
+
type: "button",
|
|
10391
|
+
variant: "ghost",
|
|
10392
|
+
size: "sm",
|
|
10393
|
+
className: "-ml-2 h-8 cursor-pointer px-2 hover:bg-muted/60",
|
|
10394
|
+
onClick: () => B.column.toggleSorting(
|
|
10395
|
+
B.column.getIsSorted() === "asc"
|
|
10396
|
+
),
|
|
10397
|
+
children: [
|
|
10398
|
+
Vn(
|
|
10399
|
+
B.column.columnDef.header,
|
|
10400
|
+
B.getContext()
|
|
10401
|
+
),
|
|
10402
|
+
B.column.getIsSorted() === "asc" ? /* @__PURE__ */ g(Ro, { className: "size-4" }) : B.column.getIsSorted() === "desc" ? /* @__PURE__ */ g(xt, { className: "size-4" }) : /* @__PURE__ */ g(ms, { className: "size-4 opacity-60" })
|
|
10403
|
+
]
|
|
10404
|
+
}
|
|
10405
|
+
) : Vn(
|
|
10406
|
+
B.column.columnDef.header,
|
|
10407
|
+
B.getContext()
|
|
10408
|
+
)
|
|
10409
|
+
},
|
|
10410
|
+
B.id
|
|
10411
|
+
);
|
|
10412
|
+
}) }, T.id)) }),
|
|
10413
|
+
/* @__PURE__ */ g(vf, { children: R.length === 0 ? /* @__PURE__ */ g(ht, { children: /* @__PURE__ */ g(
|
|
10414
|
+
Ht,
|
|
10430
10415
|
{
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
}
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
_ > 0 && /* @__PURE__ */ g(
|
|
10439
|
-
ht,
|
|
10440
|
-
{
|
|
10441
|
-
"aria-hidden": "true",
|
|
10442
|
-
className: "pointer-events-none border-0 hover:bg-transparent",
|
|
10443
|
-
children: /* @__PURE__ */ g(
|
|
10444
|
-
Ht,
|
|
10416
|
+
colSpan: n.length,
|
|
10417
|
+
className: "h-20 text-center text-muted-foreground",
|
|
10418
|
+
children: s
|
|
10419
|
+
}
|
|
10420
|
+
) }) : /* @__PURE__ */ A(Bt, { children: [
|
|
10421
|
+
C > 0 && /* @__PURE__ */ g(
|
|
10422
|
+
ht,
|
|
10445
10423
|
{
|
|
10446
|
-
|
|
10447
|
-
className: "
|
|
10448
|
-
|
|
10424
|
+
"aria-hidden": "true",
|
|
10425
|
+
className: "pointer-events-none border-0 hover:bg-transparent",
|
|
10426
|
+
children: /* @__PURE__ */ g(
|
|
10427
|
+
Ht,
|
|
10428
|
+
{
|
|
10429
|
+
colSpan: n.length,
|
|
10430
|
+
className: "h-0 p-0",
|
|
10431
|
+
style: { height: `${C}px` }
|
|
10432
|
+
}
|
|
10433
|
+
)
|
|
10434
|
+
}
|
|
10435
|
+
),
|
|
10436
|
+
E.map((T) => {
|
|
10437
|
+
const B = R[T.index];
|
|
10438
|
+
return B ? /* @__PURE__ */ g(
|
|
10439
|
+
wf,
|
|
10440
|
+
{
|
|
10441
|
+
row: B,
|
|
10442
|
+
getRowIsSelected: r,
|
|
10443
|
+
onRowClick: o
|
|
10444
|
+
},
|
|
10445
|
+
B.id
|
|
10446
|
+
) : null;
|
|
10447
|
+
}),
|
|
10448
|
+
_ > 0 && /* @__PURE__ */ g(
|
|
10449
|
+
ht,
|
|
10450
|
+
{
|
|
10451
|
+
"aria-hidden": "true",
|
|
10452
|
+
className: "pointer-events-none border-0 hover:bg-transparent",
|
|
10453
|
+
children: /* @__PURE__ */ g(
|
|
10454
|
+
Ht,
|
|
10455
|
+
{
|
|
10456
|
+
colSpan: n.length,
|
|
10457
|
+
className: "h-0 p-0",
|
|
10458
|
+
style: { height: `${_}px` }
|
|
10459
|
+
}
|
|
10460
|
+
)
|
|
10449
10461
|
}
|
|
10450
10462
|
)
|
|
10451
|
-
}
|
|
10452
|
-
)
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10463
|
+
] }) })
|
|
10464
|
+
] }) })
|
|
10465
|
+
}
|
|
10466
|
+
)
|
|
10467
|
+
]
|
|
10468
|
+
}
|
|
10469
|
+
);
|
|
10458
10470
|
}
|
|
10459
10471
|
function wf({
|
|
10460
10472
|
row: e,
|