@undevy-org/tablewright 0.5.1 → 0.6.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/es/components/data-table/ColumnFilterPopover.js +7 -7
- package/dist/es/components/data-table/ColumnHeaderMenu.js +1 -1
- package/dist/es/components/data-table/CompoundFilterPopover.js +5 -5
- package/dist/es/components/data-table/DrawerShell.js +1 -2
- package/dist/es/components/data-table/FilterChipPopoverTrigger.js +50 -0
- package/dist/es/components/data-table/RowActionsMenu.js +3 -2
- package/dist/es/components/data-table/SortableHeader.js +2 -2
- package/dist/es/components/data-table/TableFooter.js +37 -18
- package/dist/es/components/data-table/TableLayout.js +1 -2
- package/dist/es/components/layout/Sidebar.js +2 -7
- package/dist/es/components/layout/SidebarAccountMenu.js +2 -3
- package/dist/es/components/layout/SidebarUser.js +1 -2
- package/dist/es/components/ui/combobox.js +2 -2
- package/dist/es/components/ui/popover.js +38 -3
- package/dist/styles.css +10 -0
- package/dist/tablewright.cjs +142 -56
- package/dist/tablewright.css +10 -0
- package/dist/types/components/data-table/FilterChipPopoverTrigger.d.ts +5 -0
- package/dist/types/components/data-table/RowActionsMenu.d.ts +3 -1
- package/dist/types/components/ui/popover.d.ts +2 -2
- package/dist/types/components/ui/select.d.ts +5 -0
- package/package.json +1 -1
- package/dist/es/lib/collapsed-nav-link-a11y.js +0 -6
- package/dist/es/lib/decorative-avatar-alt.js +0 -6
- package/dist/es/lib/scroll-region-tab-index.js +0 -4
- package/dist/types/lib/collapsed-nav-link-a11y.d.ts +0 -2
- package/dist/types/lib/decorative-avatar-alt.d.ts +0 -2
- package/dist/types/lib/scroll-region-tab-index.d.ts +0 -2
|
@@ -3,7 +3,7 @@ import { useState, useRef, useEffect } from "react";
|
|
|
3
3
|
import { Input } from "../ui/input.js";
|
|
4
4
|
import { Checkbox } from "../ui/checkbox.js";
|
|
5
5
|
import { Popover, PopoverTrigger, PopoverContent } from "../ui/popover.js";
|
|
6
|
-
import {
|
|
6
|
+
import { FilterChipPopoverTrigger } from "./FilterChipPopoverTrigger.js";
|
|
7
7
|
import { FilterPopoverFooter } from "./FilterPopoverFooter.js";
|
|
8
8
|
import { getStringArray, getNumberRange, getDateRange, isFilterValueEmpty } from "./filter-values.js";
|
|
9
9
|
const DEFAULT_LABELS = {
|
|
@@ -221,7 +221,7 @@ function ColumnFilterPopover({
|
|
|
221
221
|
const allText = allStats?.type === "text" ? allStats : null;
|
|
222
222
|
const filtText = filteredStats?.type === "text" ? filteredStats : null;
|
|
223
223
|
return /* @__PURE__ */ jsxs("div", { className: "p-3 w-64 space-y-3", children: [
|
|
224
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-[var(--text-
|
|
224
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: [
|
|
225
225
|
labels.contains,
|
|
226
226
|
draftTags.length >= 2 && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[10px] font-semibold text-[var(--tag-blue-text)] bg-[var(--tag-blue-bg)] rounded px-1 py-0.5 uppercase", children: labels.orBadge })
|
|
227
227
|
] }),
|
|
@@ -351,7 +351,7 @@ function ColumnFilterPopover({
|
|
|
351
351
|
const filtDate = filteredStats?.type === "date" ? filteredStats : null;
|
|
352
352
|
return /* @__PURE__ */ jsxs("div", { className: "p-3 w-64 space-y-4", children: [
|
|
353
353
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
354
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
354
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipFrom }),
|
|
355
355
|
/* @__PURE__ */ jsx(
|
|
356
356
|
Input,
|
|
357
357
|
{
|
|
@@ -362,7 +362,7 @@ function ColumnFilterPopover({
|
|
|
362
362
|
)
|
|
363
363
|
] }),
|
|
364
364
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
365
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
365
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipTo }),
|
|
366
366
|
/* @__PURE__ */ jsx(
|
|
367
367
|
Input,
|
|
368
368
|
{
|
|
@@ -439,7 +439,7 @@ function ColumnFilterPopover({
|
|
|
439
439
|
const filtNum = filteredStats?.type === "number-range" ? filteredStats : null;
|
|
440
440
|
return /* @__PURE__ */ jsxs("div", { className: "p-3 w-64 space-y-4", children: [
|
|
441
441
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
442
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
442
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipMin }),
|
|
443
443
|
/* @__PURE__ */ jsx(
|
|
444
444
|
Input,
|
|
445
445
|
{
|
|
@@ -458,7 +458,7 @@ function ColumnFilterPopover({
|
|
|
458
458
|
)
|
|
459
459
|
] }),
|
|
460
460
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
461
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
461
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipMax }),
|
|
462
462
|
/* @__PURE__ */ jsx(
|
|
463
463
|
Input,
|
|
464
464
|
{
|
|
@@ -520,7 +520,7 @@ function ColumnFilterPopover({
|
|
|
520
520
|
};
|
|
521
521
|
return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
522
522
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
523
|
-
|
|
523
|
+
FilterChipPopoverTrigger,
|
|
524
524
|
{
|
|
525
525
|
label: config.label,
|
|
526
526
|
value: getDisplayValue(),
|
|
@@ -75,7 +75,7 @@ function ColumnHeaderMenu({
|
|
|
75
75
|
primarySorted === "asc" && /* @__PURE__ */ jsx(ArrowUp, { className: "h-3 w-3 shrink-0" }),
|
|
76
76
|
primarySorted === "desc" && /* @__PURE__ */ jsx(ArrowDown, { className: "h-3 w-3 shrink-0" })
|
|
77
77
|
] }),
|
|
78
|
-
/* @__PURE__ */ jsxs("span", { className: "mt-1 inline-flex items-center gap-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
78
|
+
/* @__PURE__ */ jsxs("span", { className: "mt-1 inline-flex items-center gap-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: [
|
|
79
79
|
secondaryLabel,
|
|
80
80
|
secondarySorted === "asc" && /* @__PURE__ */ jsx(ArrowUp, { className: "h-2.5 w-2.5 shrink-0" }),
|
|
81
81
|
secondarySorted === "desc" && /* @__PURE__ */ jsx(ArrowDown, { className: "h-2.5 w-2.5 shrink-0" })
|
|
@@ -3,7 +3,7 @@ import { useState, useRef, useEffect } from "react";
|
|
|
3
3
|
import { Input } from "../ui/input.js";
|
|
4
4
|
import { Checkbox } from "../ui/checkbox.js";
|
|
5
5
|
import { Popover, PopoverTrigger, PopoverContent } from "../ui/popover.js";
|
|
6
|
-
import {
|
|
6
|
+
import { FilterChipPopoverTrigger } from "./FilterChipPopoverTrigger.js";
|
|
7
7
|
import { FilterPopoverFooter } from "./FilterPopoverFooter.js";
|
|
8
8
|
import { getCompoundValue, isFilterValueEmpty, getNumberRange, getStringArray } from "./filter-values.js";
|
|
9
9
|
const DEFAULT_LABELS = {
|
|
@@ -220,7 +220,7 @@ function CompoundFilterPopover({
|
|
|
220
220
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
221
221
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
222
222
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
223
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
223
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block", children: labels.chipMin }),
|
|
224
224
|
/* @__PURE__ */ jsx(
|
|
225
225
|
Input,
|
|
226
226
|
{
|
|
@@ -242,7 +242,7 @@ function CompoundFilterPopover({
|
|
|
242
242
|
)
|
|
243
243
|
] }),
|
|
244
244
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
245
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
245
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block", children: labels.chipMax }),
|
|
246
246
|
/* @__PURE__ */ jsx(
|
|
247
247
|
Input,
|
|
248
248
|
{
|
|
@@ -361,7 +361,7 @@ function CompoundFilterPopover({
|
|
|
361
361
|
] });
|
|
362
362
|
};
|
|
363
363
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
364
|
-
/* @__PURE__ */ jsxs("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
364
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block mb-2", children: [
|
|
365
365
|
labels.contains,
|
|
366
366
|
draft.tags.length >= 2 && /* @__PURE__ */ jsx("span", { className: "ml-1 text-[10px] font-semibold text-[var(--tag-blue-text)] bg-[var(--tag-blue-bg)] rounded px-1 py-0.5 uppercase", children: labels.orBadge })
|
|
367
367
|
] }),
|
|
@@ -452,7 +452,7 @@ function CompoundFilterPopover({
|
|
|
452
452
|
};
|
|
453
453
|
return /* @__PURE__ */ jsxs(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
454
454
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
455
|
-
|
|
455
|
+
FilterChipPopoverTrigger,
|
|
456
456
|
{
|
|
457
457
|
label: config.label,
|
|
458
458
|
value: getDisplayValue(),
|
|
@@ -3,7 +3,6 @@ import { useState, useRef, useEffect } from "react";
|
|
|
3
3
|
import { Minimize2, Maximize2, X } from "lucide-react";
|
|
4
4
|
import { Button } from "../ui/button.js";
|
|
5
5
|
import { cn } from "../../lib/utils.js";
|
|
6
|
-
import { SCROLL_REGION_TAB_INDEX } from "../../lib/scroll-region-tab-index.js";
|
|
7
6
|
import { useScrollActivity } from "../../hooks/use-scroll-activity.js";
|
|
8
7
|
import { DrawerExpandContext } from "../../context/drawer-expand-context.js";
|
|
9
8
|
function DrawerShell({
|
|
@@ -87,7 +86,7 @@ function DrawerShell({
|
|
|
87
86
|
"div",
|
|
88
87
|
{
|
|
89
88
|
ref: bodyScrollRef,
|
|
90
|
-
tabIndex:
|
|
89
|
+
tabIndex: 0,
|
|
91
90
|
className: "scrollbar-auto-hide min-h-0 flex-1 overflow-y-auto px-6 py-6",
|
|
92
91
|
children
|
|
93
92
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { X } from "lucide-react";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
const FilterChipPopoverTrigger = React.forwardRef(({ label, value, onRemove, active, children, className, ...triggerRest }, ref) => /* @__PURE__ */ jsxs(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"flex h-[var(--size-control-md)] items-center rounded-md border border-[var(--border-subtle)] text-[13px] transition-colors",
|
|
10
|
+
active ? "bg-[var(--bg-secondary)]" : "bg-[var(--bg-surface)]",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
type: "button",
|
|
19
|
+
...triggerRest,
|
|
20
|
+
className: "flex h-full flex-1 cursor-pointer items-center border-0 bg-transparent p-0 pl-2.5 pr-1.5 text-left text-[13px] font-normal text-inherit",
|
|
21
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
22
|
+
/* @__PURE__ */ jsx("span", { className: "text-[var(--text-primary)]", children: label }),
|
|
23
|
+
value && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "text-[var(--text-tertiary)]", children: ":" }),
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "text-[var(--text-primary)] font-medium", children: value })
|
|
26
|
+
] }),
|
|
27
|
+
children
|
|
28
|
+
] })
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full items-center pr-1.5", children: /* @__PURE__ */ jsx(
|
|
32
|
+
"button",
|
|
33
|
+
{
|
|
34
|
+
type: "button",
|
|
35
|
+
onClick: (e) => {
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
onRemove();
|
|
38
|
+
},
|
|
39
|
+
className: "flex h-5 w-5 items-center justify-center rounded-sm text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus:outline-none focus:ring-1 focus:ring-[var(--border-focus)]",
|
|
40
|
+
"aria-label": `Remove ${label} filter`,
|
|
41
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
));
|
|
47
|
+
FilterChipPopoverTrigger.displayName = "FilterChipPopoverTrigger";
|
|
48
|
+
export {
|
|
49
|
+
FilterChipPopoverTrigger
|
|
50
|
+
};
|
|
@@ -8,7 +8,8 @@ function RowActionsMenu({
|
|
|
8
8
|
sections,
|
|
9
9
|
align = "end",
|
|
10
10
|
triggerClassName,
|
|
11
|
-
contentClassName
|
|
11
|
+
contentClassName,
|
|
12
|
+
triggerAriaLabel = "Row actions"
|
|
12
13
|
}) {
|
|
13
14
|
const resolvedSections = sections && sections.length > 0 ? sections : actions.length > 0 ? [{ label: "", actions }] : [];
|
|
14
15
|
const isGrouped = resolvedSections.some((section) => section.label);
|
|
@@ -18,7 +19,7 @@ function RowActionsMenu({
|
|
|
18
19
|
{
|
|
19
20
|
variant: "ghost",
|
|
20
21
|
size: "icon",
|
|
21
|
-
"aria-label":
|
|
22
|
+
"aria-label": triggerAriaLabel,
|
|
22
23
|
className: cn(
|
|
23
24
|
"h-7 w-7 rounded-sm p-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",
|
|
24
25
|
triggerClassName
|
|
@@ -65,7 +65,7 @@ function SortableHeader({
|
|
|
65
65
|
className: "group/secondary inline-flex cursor-pointer select-none items-center gap-1 text-left",
|
|
66
66
|
onClick: onSecondaryClick,
|
|
67
67
|
children: [
|
|
68
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: secondaryLabel }),
|
|
69
69
|
/* @__PURE__ */ jsx(
|
|
70
70
|
SortIcon,
|
|
71
71
|
{
|
|
@@ -90,7 +90,7 @@ function SortableHeader({
|
|
|
90
90
|
children: [
|
|
91
91
|
isStacked ? /* @__PURE__ */ jsxs("span", { className: "flex flex-col leading-none", children: [
|
|
92
92
|
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-primary)]", children: resolvedPrimaryLabel }),
|
|
93
|
-
/* @__PURE__ */ jsx("span", { className: "mt-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
93
|
+
/* @__PURE__ */ jsx("span", { className: "mt-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: secondaryLabel })
|
|
94
94
|
] }) : /* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-primary)]", children: resolvedPrimaryLabel }),
|
|
95
95
|
/* @__PURE__ */ jsx(SortIcon, { sorted, hoverClass: "group-hover/header:opacity-100" })
|
|
96
96
|
]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
3
4
|
import { Button } from "../ui/button.js";
|
|
4
5
|
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "../ui/select.js";
|
|
@@ -62,26 +63,44 @@ function TableFooter(props) {
|
|
|
62
63
|
renderPagination(props)
|
|
63
64
|
] });
|
|
64
65
|
}
|
|
66
|
+
function RowsPerPagePagination(props) {
|
|
67
|
+
const rowsPerPageLabelId = useId();
|
|
68
|
+
const rowsPerPageOptions = props.rowsPerPageOptions ?? defaultRowsPerPageOptions;
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 lg:justify-end", children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
"span",
|
|
73
|
+
{
|
|
74
|
+
id: rowsPerPageLabelId,
|
|
75
|
+
className: "text-[12px] text-[var(--text-secondary)]",
|
|
76
|
+
children: "Rows per page"
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsxs(
|
|
80
|
+
Select,
|
|
81
|
+
{
|
|
82
|
+
value: String(props.rowsPerPage),
|
|
83
|
+
onValueChange: (value) => props.onRowsPerPageChange(Number(value)),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
SelectTrigger,
|
|
87
|
+
{
|
|
88
|
+
"aria-labelledby": rowsPerPageLabelId,
|
|
89
|
+
className: "h-[var(--size-control-sm)] w-[var(--size-select-compact)]",
|
|
90
|
+
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(SelectContent, { children: rowsPerPageOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: String(option), children: option }, option)) })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] }),
|
|
98
|
+
renderNumericPager(props)
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
65
101
|
function renderPagination(props) {
|
|
66
102
|
if (props.paginationVariant === "perPage") {
|
|
67
|
-
|
|
68
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-3 lg:justify-end", children: [
|
|
69
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
70
|
-
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[var(--text-secondary)]", children: "Rows per page" }),
|
|
71
|
-
/* @__PURE__ */ jsxs(
|
|
72
|
-
Select,
|
|
73
|
-
{
|
|
74
|
-
value: String(props.rowsPerPage),
|
|
75
|
-
onValueChange: (value) => props.onRowsPerPageChange(Number(value)),
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-[var(--size-control-sm)] w-[var(--size-select-compact)]", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
78
|
-
/* @__PURE__ */ jsx(SelectContent, { children: rowsPerPageOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: String(option), children: option }, option)) })
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
] }),
|
|
83
|
-
renderNumericPager(props)
|
|
84
|
-
] });
|
|
103
|
+
return /* @__PURE__ */ jsx(RowsPerPagePagination, { ...props });
|
|
85
104
|
}
|
|
86
105
|
if (props.paginationVariant !== "pages") {
|
|
87
106
|
return null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../lib/utils.js";
|
|
3
|
-
import { SCROLL_REGION_TAB_INDEX } from "../../lib/scroll-region-tab-index.js";
|
|
4
3
|
import { useScrollActivity } from "../../hooks/use-scroll-activity.js";
|
|
5
4
|
function TableLayout({ children, className }) {
|
|
6
5
|
return /* @__PURE__ */ jsx("div", { className: cn("relative flex flex-1 flex-col overflow-hidden", className), children });
|
|
@@ -11,7 +10,7 @@ function ScrollArea({ children, className }) {
|
|
|
11
10
|
"div",
|
|
12
11
|
{
|
|
13
12
|
ref: scrollRef,
|
|
14
|
-
tabIndex:
|
|
13
|
+
tabIndex: 0,
|
|
15
14
|
className: cn("scrollbar-auto-hide flex-1 overflow-auto", className),
|
|
16
15
|
children
|
|
17
16
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { ChevronRight, ChevronLeft } from "lucide-react";
|
|
4
|
-
import { collapsedNavLinkAriaLabel } from "../../lib/collapsed-nav-link-a11y.js";
|
|
5
4
|
import { cn } from "../../lib/utils.js";
|
|
6
5
|
import { useAppShell } from "./app-shell-context.js";
|
|
7
6
|
function isItemActive(href, activeKey) {
|
|
@@ -76,15 +75,11 @@ const Sidebar = React.forwardRef(
|
|
|
76
75
|
),
|
|
77
76
|
showExpanded && /* @__PURE__ */ jsx("span", { className: "truncate text-[13px]", children: item.label })
|
|
78
77
|
] });
|
|
79
|
-
const collapsedLinkLabel = collapsedNavLinkAriaLabel(
|
|
80
|
-
showExpanded,
|
|
81
|
-
item.label
|
|
82
|
-
);
|
|
83
78
|
if (renderLink) {
|
|
84
79
|
return /* @__PURE__ */ jsx(React.Fragment, { children: renderLink(item.href, {
|
|
85
80
|
className: itemClassName,
|
|
86
81
|
children,
|
|
87
|
-
...
|
|
82
|
+
...showExpanded ? {} : { "aria-label": item.label }
|
|
88
83
|
}) }, item.key);
|
|
89
84
|
}
|
|
90
85
|
return /* @__PURE__ */ jsx(
|
|
@@ -92,7 +87,7 @@ const Sidebar = React.forwardRef(
|
|
|
92
87
|
{
|
|
93
88
|
href: item.href,
|
|
94
89
|
className: itemClassName,
|
|
95
|
-
"aria-label":
|
|
90
|
+
"aria-label": showExpanded ? void 0 : item.label,
|
|
96
91
|
children
|
|
97
92
|
},
|
|
98
93
|
item.key
|
|
@@ -2,7 +2,6 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { ChevronDown, SunMoon, LogOut } from "lucide-react";
|
|
3
3
|
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "../ui/dropdown-menu.js";
|
|
4
4
|
import { ThemeSwitch } from "../ui/theme-switch.js";
|
|
5
|
-
import { decorativeAvatarAlt } from "../../lib/decorative-avatar-alt.js";
|
|
6
5
|
import { cn } from "../../lib/utils.js";
|
|
7
6
|
import { useAppShell } from "./app-shell-context.js";
|
|
8
7
|
function getInitials(name) {
|
|
@@ -27,7 +26,7 @@ function SidebarAccountMenu({
|
|
|
27
26
|
"img",
|
|
28
27
|
{
|
|
29
28
|
src: avatarUrl,
|
|
30
|
-
alt:
|
|
29
|
+
alt: effectiveCollapsed ? name : "",
|
|
31
30
|
className: "h-7 w-7 shrink-0 rounded-full object-cover"
|
|
32
31
|
}
|
|
33
32
|
) : /* @__PURE__ */ jsx("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials(name) });
|
|
@@ -63,7 +62,7 @@ function SidebarAccountMenu({
|
|
|
63
62
|
"img",
|
|
64
63
|
{
|
|
65
64
|
src: avatarUrl,
|
|
66
|
-
alt:
|
|
65
|
+
alt: "",
|
|
67
66
|
className: "h-8 w-8 shrink-0 rounded-full object-cover"
|
|
68
67
|
}
|
|
69
68
|
) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials(name) }),
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { decorativeAvatarAlt } from "../../lib/decorative-avatar-alt.js";
|
|
4
3
|
import { cn } from "../../lib/utils.js";
|
|
5
4
|
import { useAppShell } from "./app-shell-context.js";
|
|
6
5
|
function getInitials(name) {
|
|
@@ -24,7 +23,7 @@ const SidebarUser = React.forwardRef(
|
|
|
24
23
|
"img",
|
|
25
24
|
{
|
|
26
25
|
src: avatarUrl,
|
|
27
|
-
alt:
|
|
26
|
+
alt: effectiveCollapsed ? name : "",
|
|
28
27
|
className: "h-8 w-8 shrink-0 rounded-full object-cover"
|
|
29
28
|
}
|
|
30
29
|
) : /* @__PURE__ */ jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials(name) }),
|
|
@@ -111,7 +111,7 @@ function Combobox({
|
|
|
111
111
|
triggerClassName
|
|
112
112
|
),
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */ jsx("span", { className: cn("truncate", !selected && "text-[var(--text-
|
|
114
|
+
/* @__PURE__ */ jsx("span", { className: cn("truncate", !selected && "text-[var(--text-secondary)]"), children: selected ? renderSelected ? renderSelected(selected) : selected.label : placeholder }),
|
|
115
115
|
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "h-3.5 w-3.5 shrink-0 text-[var(--text-tertiary)]" })
|
|
116
116
|
]
|
|
117
117
|
}
|
|
@@ -153,7 +153,7 @@ function Combobox({
|
|
|
153
153
|
),
|
|
154
154
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
155
155
|
/* @__PURE__ */ jsx("span", { className: "truncate", children: option.label }),
|
|
156
|
-
option.description && /* @__PURE__ */ jsx("span", { className: "truncate text-[11px] text-[var(--text-
|
|
156
|
+
option.description && /* @__PURE__ */ jsx("span", { className: "truncate text-[11px] text-[var(--text-secondary)]", children: option.description })
|
|
157
157
|
] })
|
|
158
158
|
]
|
|
159
159
|
},
|
|
@@ -4,23 +4,58 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { STYLE_SCOPE } from "../../lib/style-scope.js";
|
|
6
6
|
import { usePortalContainer } from "../../context/portal-container-context.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const PopoverContext = React.createContext(null);
|
|
8
|
+
function usePopoverContext() {
|
|
9
|
+
const context = React.useContext(PopoverContext);
|
|
10
|
+
if (!context) {
|
|
11
|
+
throw new Error("Popover components must be used within Popover");
|
|
12
|
+
}
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
function Popover(props) {
|
|
16
|
+
const triggerId = React.useId();
|
|
17
|
+
const [triggerMounted, setTriggerMounted] = React.useState(false);
|
|
18
|
+
const setTriggerMountedStable = React.useCallback((mounted) => {
|
|
19
|
+
setTriggerMounted(mounted);
|
|
20
|
+
}, []);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
PopoverContext.Provider,
|
|
23
|
+
{
|
|
24
|
+
value: { triggerId, triggerMounted, setTriggerMounted: setTriggerMountedStable },
|
|
25
|
+
children: /* @__PURE__ */ jsx(PopoverPrimitive.Root, { ...props })
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
const PopoverTrigger = React.forwardRef(({ id, ...props }, ref) => {
|
|
30
|
+
const { triggerId, setTriggerMounted } = usePopoverContext();
|
|
31
|
+
const resolvedId = id ?? triggerId;
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
setTriggerMounted(true);
|
|
34
|
+
return () => setTriggerMounted(false);
|
|
35
|
+
}, [setTriggerMounted]);
|
|
36
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { ref, id: resolvedId, ...props });
|
|
37
|
+
});
|
|
38
|
+
PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;
|
|
9
39
|
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
10
40
|
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
|
|
11
41
|
const container = usePortalContainer();
|
|
42
|
+
const { triggerId, triggerMounted } = usePopoverContext();
|
|
43
|
+
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest } = props;
|
|
44
|
+
const resolvedAriaLabelledBy = ariaLabel !== void 0 && ariaLabelledBy === void 0 ? void 0 : ariaLabelledBy ?? (triggerMounted ? triggerId : void 0);
|
|
12
45
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container, children: /* @__PURE__ */ jsx(
|
|
13
46
|
PopoverPrimitive.Content,
|
|
14
47
|
{
|
|
15
48
|
ref,
|
|
16
49
|
align,
|
|
17
50
|
sideOffset,
|
|
51
|
+
"aria-label": ariaLabel,
|
|
52
|
+
"aria-labelledby": resolvedAriaLabelledBy,
|
|
18
53
|
className: cn(
|
|
19
54
|
STYLE_SCOPE,
|
|
20
55
|
"z-50 w-72 rounded-lg border border-[var(--border-subtle)] bg-[var(--bg-surface)] p-4 text-[var(--text-primary)] outline-none [box-shadow:var(--shadow-menu)]",
|
|
21
56
|
className
|
|
22
57
|
),
|
|
23
|
-
...
|
|
58
|
+
...rest
|
|
24
59
|
}
|
|
25
60
|
) });
|
|
26
61
|
});
|
package/dist/styles.css
CHANGED
|
@@ -942,6 +942,9 @@
|
|
|
942
942
|
.border {
|
|
943
943
|
border-width: 1px
|
|
944
944
|
}
|
|
945
|
+
.border-0 {
|
|
946
|
+
border-width: 0px
|
|
947
|
+
}
|
|
945
948
|
.border-b {
|
|
946
949
|
border-bottom-width: 1px
|
|
947
950
|
}
|
|
@@ -1050,6 +1053,10 @@
|
|
|
1050
1053
|
.bg-\[var\(--tag-sky-bg\)\] {
|
|
1051
1054
|
background-color: var(--tag-sky-bg)
|
|
1052
1055
|
}
|
|
1056
|
+
.bg-black {
|
|
1057
|
+
--tw-bg-opacity: 1;
|
|
1058
|
+
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1))
|
|
1059
|
+
}
|
|
1053
1060
|
.bg-black\/50 {
|
|
1054
1061
|
background-color: rgb(0 0 0 / 0.5)
|
|
1055
1062
|
}
|
|
@@ -1342,6 +1349,9 @@
|
|
|
1342
1349
|
.text-\[var\(--text-utility\)\] {
|
|
1343
1350
|
color: var(--text-utility)
|
|
1344
1351
|
}
|
|
1352
|
+
.text-inherit {
|
|
1353
|
+
color: inherit
|
|
1354
|
+
}
|
|
1345
1355
|
.text-red-600 {
|
|
1346
1356
|
--tw-text-opacity: 1;
|
|
1347
1357
|
color: rgb(220 38 38 / var(--tw-text-opacity, 1))
|
package/dist/tablewright.cjs
CHANGED
|
@@ -253,23 +253,58 @@ const Input = React__namespace.forwardRef(
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
Input.displayName = "Input";
|
|
256
|
-
const
|
|
257
|
-
|
|
256
|
+
const PopoverContext = React__namespace.createContext(null);
|
|
257
|
+
function usePopoverContext() {
|
|
258
|
+
const context = React__namespace.useContext(PopoverContext);
|
|
259
|
+
if (!context) {
|
|
260
|
+
throw new Error("Popover components must be used within Popover");
|
|
261
|
+
}
|
|
262
|
+
return context;
|
|
263
|
+
}
|
|
264
|
+
function Popover(props) {
|
|
265
|
+
const triggerId = React__namespace.useId();
|
|
266
|
+
const [triggerMounted, setTriggerMounted] = React__namespace.useState(false);
|
|
267
|
+
const setTriggerMountedStable = React__namespace.useCallback((mounted) => {
|
|
268
|
+
setTriggerMounted(mounted);
|
|
269
|
+
}, []);
|
|
270
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
271
|
+
PopoverContext.Provider,
|
|
272
|
+
{
|
|
273
|
+
value: { triggerId, triggerMounted, setTriggerMounted: setTriggerMountedStable },
|
|
274
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { ...props })
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
const PopoverTrigger = React__namespace.forwardRef(({ id, ...props }, ref) => {
|
|
279
|
+
const { triggerId, setTriggerMounted } = usePopoverContext();
|
|
280
|
+
const resolvedId = id ?? triggerId;
|
|
281
|
+
React__namespace.useEffect(() => {
|
|
282
|
+
setTriggerMounted(true);
|
|
283
|
+
return () => setTriggerMounted(false);
|
|
284
|
+
}, [setTriggerMounted]);
|
|
285
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { ref, id: resolvedId, ...props });
|
|
286
|
+
});
|
|
287
|
+
PopoverTrigger.displayName = PopoverPrimitive__namespace.Trigger.displayName;
|
|
258
288
|
const PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
259
289
|
const PopoverContent = React__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
|
|
260
290
|
const container = usePortalContainer();
|
|
291
|
+
const { triggerId, triggerMounted } = usePopoverContext();
|
|
292
|
+
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest } = props;
|
|
293
|
+
const resolvedAriaLabelledBy = ariaLabel !== void 0 && ariaLabelledBy === void 0 ? void 0 : ariaLabelledBy ?? (triggerMounted ? triggerId : void 0);
|
|
261
294
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
262
295
|
PopoverPrimitive__namespace.Content,
|
|
263
296
|
{
|
|
264
297
|
ref,
|
|
265
298
|
align,
|
|
266
299
|
sideOffset,
|
|
300
|
+
"aria-label": ariaLabel,
|
|
301
|
+
"aria-labelledby": resolvedAriaLabelledBy,
|
|
267
302
|
className: cn(
|
|
268
303
|
STYLE_SCOPE,
|
|
269
304
|
"z-50 w-72 rounded-lg border border-[var(--border-subtle)] bg-[var(--bg-surface)] p-4 text-[var(--text-primary)] outline-none [box-shadow:var(--shadow-menu)]",
|
|
270
305
|
className
|
|
271
306
|
),
|
|
272
|
-
...
|
|
307
|
+
...rest
|
|
273
308
|
}
|
|
274
309
|
) });
|
|
275
310
|
});
|
|
@@ -464,7 +499,7 @@ function Combobox({
|
|
|
464
499
|
triggerClassName
|
|
465
500
|
),
|
|
466
501
|
children: [
|
|
467
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate", !selected && "text-[var(--text-
|
|
502
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("truncate", !selected && "text-[var(--text-secondary)]"), children: selected ? renderSelected ? renderSelected(selected) : selected.label : placeholder }),
|
|
468
503
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "h-3.5 w-3.5 shrink-0 text-[var(--text-tertiary)]" })
|
|
469
504
|
]
|
|
470
505
|
}
|
|
@@ -506,7 +541,7 @@ function Combobox({
|
|
|
506
541
|
),
|
|
507
542
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
508
543
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: option.label }),
|
|
509
|
-
option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[11px] text-[var(--text-
|
|
544
|
+
option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[11px] text-[var(--text-secondary)]", children: option.description })
|
|
510
545
|
] })
|
|
511
546
|
]
|
|
512
547
|
},
|
|
@@ -682,7 +717,6 @@ function CopyableText({
|
|
|
682
717
|
)
|
|
683
718
|
] });
|
|
684
719
|
}
|
|
685
|
-
const SCROLL_REGION_TAB_INDEX = 0;
|
|
686
720
|
function useScrollActivity(idleMs = 700) {
|
|
687
721
|
const nodeRef = React.useRef(null);
|
|
688
722
|
const [nodeVersion, setNodeVersion] = React.useState(0);
|
|
@@ -798,7 +832,7 @@ function DrawerShell({
|
|
|
798
832
|
"div",
|
|
799
833
|
{
|
|
800
834
|
ref: bodyScrollRef,
|
|
801
|
-
tabIndex:
|
|
835
|
+
tabIndex: 0,
|
|
802
836
|
className: "scrollbar-auto-hide min-h-0 flex-1 overflow-y-auto px-6 py-6",
|
|
803
837
|
children
|
|
804
838
|
}
|
|
@@ -868,7 +902,7 @@ function ScrollArea({ children, className }) {
|
|
|
868
902
|
"div",
|
|
869
903
|
{
|
|
870
904
|
ref: scrollRef,
|
|
871
|
-
tabIndex:
|
|
905
|
+
tabIndex: 0,
|
|
872
906
|
className: cn("scrollbar-auto-hide flex-1 overflow-auto", className),
|
|
873
907
|
children
|
|
874
908
|
}
|
|
@@ -1361,7 +1395,8 @@ function RowActionsMenu({
|
|
|
1361
1395
|
sections,
|
|
1362
1396
|
align = "end",
|
|
1363
1397
|
triggerClassName,
|
|
1364
|
-
contentClassName
|
|
1398
|
+
contentClassName,
|
|
1399
|
+
triggerAriaLabel = "Row actions"
|
|
1365
1400
|
}) {
|
|
1366
1401
|
const resolvedSections = sections && sections.length > 0 ? sections : actions.length > 0 ? [{ label: "", actions }] : [];
|
|
1367
1402
|
const isGrouped = resolvedSections.some((section) => section.label);
|
|
@@ -1371,7 +1406,7 @@ function RowActionsMenu({
|
|
|
1371
1406
|
{
|
|
1372
1407
|
variant: "ghost",
|
|
1373
1408
|
size: "icon",
|
|
1374
|
-
"aria-label":
|
|
1409
|
+
"aria-label": triggerAriaLabel,
|
|
1375
1410
|
className: cn(
|
|
1376
1411
|
"h-7 w-7 rounded-sm p-0 opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100",
|
|
1377
1412
|
triggerClassName
|
|
@@ -1582,7 +1617,7 @@ function SortableHeader({
|
|
|
1582
1617
|
className: "group/secondary inline-flex cursor-pointer select-none items-center gap-1 text-left",
|
|
1583
1618
|
onClick: onSecondaryClick,
|
|
1584
1619
|
children: [
|
|
1585
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
1620
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: secondaryLabel }),
|
|
1586
1621
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1587
1622
|
SortIcon,
|
|
1588
1623
|
{
|
|
@@ -1607,7 +1642,7 @@ function SortableHeader({
|
|
|
1607
1642
|
children: [
|
|
1608
1643
|
isStacked ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col leading-none", children: [
|
|
1609
1644
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-primary)]", children: resolvedPrimaryLabel }),
|
|
1610
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
1645
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: secondaryLabel })
|
|
1611
1646
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[var(--text-primary)]", children: resolvedPrimaryLabel }),
|
|
1612
1647
|
/* @__PURE__ */ jsxRuntime.jsx(SortIcon, { sorted, hoverClass: "group-hover/header:opacity-100" })
|
|
1613
1648
|
]
|
|
@@ -1674,26 +1709,44 @@ function TableFooter(props) {
|
|
|
1674
1709
|
renderPagination(props)
|
|
1675
1710
|
] });
|
|
1676
1711
|
}
|
|
1712
|
+
function RowsPerPagePagination(props) {
|
|
1713
|
+
const rowsPerPageLabelId = React.useId();
|
|
1714
|
+
const rowsPerPageOptions = props.rowsPerPageOptions ?? defaultRowsPerPageOptions;
|
|
1715
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3 lg:justify-end", children: [
|
|
1716
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1717
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1718
|
+
"span",
|
|
1719
|
+
{
|
|
1720
|
+
id: rowsPerPageLabelId,
|
|
1721
|
+
className: "text-[12px] text-[var(--text-secondary)]",
|
|
1722
|
+
children: "Rows per page"
|
|
1723
|
+
}
|
|
1724
|
+
),
|
|
1725
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1726
|
+
Select,
|
|
1727
|
+
{
|
|
1728
|
+
value: String(props.rowsPerPage),
|
|
1729
|
+
onValueChange: (value) => props.onRowsPerPageChange(Number(value)),
|
|
1730
|
+
children: [
|
|
1731
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1732
|
+
SelectTrigger,
|
|
1733
|
+
{
|
|
1734
|
+
"aria-labelledby": rowsPerPageLabelId,
|
|
1735
|
+
className: "h-[var(--size-control-sm)] w-[var(--size-select-compact)]",
|
|
1736
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {})
|
|
1737
|
+
}
|
|
1738
|
+
),
|
|
1739
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: rowsPerPageOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(option), children: option }, option)) })
|
|
1740
|
+
]
|
|
1741
|
+
}
|
|
1742
|
+
)
|
|
1743
|
+
] }),
|
|
1744
|
+
renderNumericPager(props)
|
|
1745
|
+
] });
|
|
1746
|
+
}
|
|
1677
1747
|
function renderPagination(props) {
|
|
1678
1748
|
if (props.paginationVariant === "perPage") {
|
|
1679
|
-
|
|
1680
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3 lg:justify-end", children: [
|
|
1681
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1682
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] text-[var(--text-secondary)]", children: "Rows per page" }),
|
|
1683
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1684
|
-
Select,
|
|
1685
|
-
{
|
|
1686
|
-
value: String(props.rowsPerPage),
|
|
1687
|
-
onValueChange: (value) => props.onRowsPerPageChange(Number(value)),
|
|
1688
|
-
children: [
|
|
1689
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "h-[var(--size-control-sm)] w-[var(--size-select-compact)]", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, {}) }),
|
|
1690
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: rowsPerPageOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: String(option), children: option }, option)) })
|
|
1691
|
-
]
|
|
1692
|
-
}
|
|
1693
|
-
)
|
|
1694
|
-
] }),
|
|
1695
|
-
renderNumericPager(props)
|
|
1696
|
-
] });
|
|
1749
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RowsPerPagePagination, { ...props });
|
|
1697
1750
|
}
|
|
1698
1751
|
if (props.paginationVariant !== "pages") {
|
|
1699
1752
|
return null;
|
|
@@ -1855,9 +1908,6 @@ const AppShellContext = React.createContext(null);
|
|
|
1855
1908
|
function useAppShell() {
|
|
1856
1909
|
return React.useContext(AppShellContext);
|
|
1857
1910
|
}
|
|
1858
|
-
function collapsedNavLinkAriaLabel(showExpanded, label) {
|
|
1859
|
-
return showExpanded ? void 0 : label;
|
|
1860
|
-
}
|
|
1861
1911
|
function isItemActive(href, activeKey) {
|
|
1862
1912
|
if (href === "" || href === "/") return activeKey === "" || activeKey === "/";
|
|
1863
1913
|
return activeKey === href || activeKey.startsWith(href + "/");
|
|
@@ -1930,15 +1980,11 @@ const Sidebar = React__namespace.forwardRef(
|
|
|
1930
1980
|
),
|
|
1931
1981
|
showExpanded && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[13px]", children: item.label })
|
|
1932
1982
|
] });
|
|
1933
|
-
const collapsedLinkLabel = collapsedNavLinkAriaLabel(
|
|
1934
|
-
showExpanded,
|
|
1935
|
-
item.label
|
|
1936
|
-
);
|
|
1937
1983
|
if (renderLink) {
|
|
1938
1984
|
return /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Fragment, { children: renderLink(item.href, {
|
|
1939
1985
|
className: itemClassName,
|
|
1940
1986
|
children,
|
|
1941
|
-
...
|
|
1987
|
+
...showExpanded ? {} : { "aria-label": item.label }
|
|
1942
1988
|
}) }, item.key);
|
|
1943
1989
|
}
|
|
1944
1990
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1946,7 +1992,7 @@ const Sidebar = React__namespace.forwardRef(
|
|
|
1946
1992
|
{
|
|
1947
1993
|
href: item.href,
|
|
1948
1994
|
className: itemClassName,
|
|
1949
|
-
"aria-label":
|
|
1995
|
+
"aria-label": showExpanded ? void 0 : item.label,
|
|
1950
1996
|
children
|
|
1951
1997
|
},
|
|
1952
1998
|
item.key
|
|
@@ -2107,9 +2153,6 @@ const AppShell = Object.assign(AppShellRoot, {
|
|
|
2107
2153
|
Header: AppShellHeader,
|
|
2108
2154
|
Content: AppShellContent
|
|
2109
2155
|
});
|
|
2110
|
-
function decorativeAvatarAlt(adjacentNameVisible, name) {
|
|
2111
|
-
return adjacentNameVisible ? "" : name;
|
|
2112
|
-
}
|
|
2113
2156
|
function getInitials$1(name) {
|
|
2114
2157
|
return name.split(" ").map((w) => w[0]).slice(0, 2).join("").toUpperCase();
|
|
2115
2158
|
}
|
|
@@ -2131,7 +2174,7 @@ const SidebarUser = React__namespace.forwardRef(
|
|
|
2131
2174
|
"img",
|
|
2132
2175
|
{
|
|
2133
2176
|
src: avatarUrl,
|
|
2134
|
-
alt:
|
|
2177
|
+
alt: effectiveCollapsed ? name : "",
|
|
2135
2178
|
className: "h-8 w-8 shrink-0 rounded-full object-cover"
|
|
2136
2179
|
}
|
|
2137
2180
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials$1(name) }),
|
|
@@ -2163,7 +2206,7 @@ function SidebarAccountMenu({
|
|
|
2163
2206
|
"img",
|
|
2164
2207
|
{
|
|
2165
2208
|
src: avatarUrl,
|
|
2166
|
-
alt:
|
|
2209
|
+
alt: effectiveCollapsed ? name : "",
|
|
2167
2210
|
className: "h-7 w-7 shrink-0 rounded-full object-cover"
|
|
2168
2211
|
}
|
|
2169
2212
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials(name) });
|
|
@@ -2199,7 +2242,7 @@ function SidebarAccountMenu({
|
|
|
2199
2242
|
"img",
|
|
2200
2243
|
{
|
|
2201
2244
|
src: avatarUrl,
|
|
2202
|
-
alt:
|
|
2245
|
+
alt: "",
|
|
2203
2246
|
className: "h-8 w-8 shrink-0 rounded-full object-cover"
|
|
2204
2247
|
}
|
|
2205
2248
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--bg-tertiary)] text-[11px] font-semibold text-[var(--text-secondary)]", children: getInitials(name) }),
|
|
@@ -2469,7 +2512,7 @@ function ColumnHeaderMenu({
|
|
|
2469
2512
|
primarySorted === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "h-3 w-3 shrink-0" }),
|
|
2470
2513
|
primarySorted === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "h-3 w-3 shrink-0" })
|
|
2471
2514
|
] }),
|
|
2472
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-1 inline-flex items-center gap-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-
|
|
2515
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-1 inline-flex items-center gap-1 text-[10px] font-medium uppercase tracking-[0.06em] text-[var(--text-secondary)]", children: [
|
|
2473
2516
|
secondaryLabel,
|
|
2474
2517
|
secondarySorted === "asc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "h-2.5 w-2.5 shrink-0" }),
|
|
2475
2518
|
secondarySorted === "desc" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "h-2.5 w-2.5 shrink-0" })
|
|
@@ -2733,6 +2776,49 @@ function GroupedColumnToggle({
|
|
|
2733
2776
|
}
|
|
2734
2777
|
);
|
|
2735
2778
|
}
|
|
2779
|
+
const FilterChipPopoverTrigger = React__namespace.forwardRef(({ label, value, onRemove, active, children, className, ...triggerRest }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2780
|
+
"div",
|
|
2781
|
+
{
|
|
2782
|
+
className: cn(
|
|
2783
|
+
"flex h-[var(--size-control-md)] items-center rounded-md border border-[var(--border-subtle)] text-[13px] transition-colors",
|
|
2784
|
+
active ? "bg-[var(--bg-secondary)]" : "bg-[var(--bg-surface)]",
|
|
2785
|
+
className
|
|
2786
|
+
),
|
|
2787
|
+
children: [
|
|
2788
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2789
|
+
"button",
|
|
2790
|
+
{
|
|
2791
|
+
ref,
|
|
2792
|
+
type: "button",
|
|
2793
|
+
...triggerRest,
|
|
2794
|
+
className: "flex h-full flex-1 cursor-pointer items-center border-0 bg-transparent p-0 pl-2.5 pr-1.5 text-left text-[13px] font-normal text-inherit",
|
|
2795
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2796
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--text-primary)]", children: label }),
|
|
2797
|
+
value && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2798
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--text-tertiary)]", children: ":" }),
|
|
2799
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--text-primary)] font-medium", children: value })
|
|
2800
|
+
] }),
|
|
2801
|
+
children
|
|
2802
|
+
] })
|
|
2803
|
+
}
|
|
2804
|
+
),
|
|
2805
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center pr-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2806
|
+
"button",
|
|
2807
|
+
{
|
|
2808
|
+
type: "button",
|
|
2809
|
+
onClick: (e) => {
|
|
2810
|
+
e.stopPropagation();
|
|
2811
|
+
onRemove();
|
|
2812
|
+
},
|
|
2813
|
+
className: "flex h-5 w-5 items-center justify-center rounded-sm text-[var(--text-tertiary)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)] focus:outline-none focus:ring-1 focus:ring-[var(--border-focus)]",
|
|
2814
|
+
"aria-label": `Remove ${label} filter`,
|
|
2815
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5" })
|
|
2816
|
+
}
|
|
2817
|
+
) })
|
|
2818
|
+
]
|
|
2819
|
+
}
|
|
2820
|
+
));
|
|
2821
|
+
FilterChipPopoverTrigger.displayName = "FilterChipPopoverTrigger";
|
|
2736
2822
|
function isObjectValue(value) {
|
|
2737
2823
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2738
2824
|
}
|
|
@@ -2977,7 +3063,7 @@ function ColumnFilterPopover({
|
|
|
2977
3063
|
const allText = allStats?.type === "text" ? allStats : null;
|
|
2978
3064
|
const filtText = filteredStats?.type === "text" ? filteredStats : null;
|
|
2979
3065
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 w-64 space-y-3", children: [
|
|
2980
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-[var(--text-
|
|
3066
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: [
|
|
2981
3067
|
labels.contains,
|
|
2982
3068
|
draftTags.length >= 2 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-[10px] font-semibold text-[var(--tag-blue-text)] bg-[var(--tag-blue-bg)] rounded px-1 py-0.5 uppercase", children: labels.orBadge })
|
|
2983
3069
|
] }),
|
|
@@ -3107,7 +3193,7 @@ function ColumnFilterPopover({
|
|
|
3107
3193
|
const filtDate = filteredStats?.type === "date" ? filteredStats : null;
|
|
3108
3194
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 w-64 space-y-4", children: [
|
|
3109
3195
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3110
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
3196
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipFrom }),
|
|
3111
3197
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3112
3198
|
Input,
|
|
3113
3199
|
{
|
|
@@ -3118,7 +3204,7 @@ function ColumnFilterPopover({
|
|
|
3118
3204
|
)
|
|
3119
3205
|
] }),
|
|
3120
3206
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3121
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
3207
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipTo }),
|
|
3122
3208
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3123
3209
|
Input,
|
|
3124
3210
|
{
|
|
@@ -3195,7 +3281,7 @@ function ColumnFilterPopover({
|
|
|
3195
3281
|
const filtNum = filteredStats?.type === "number-range" ? filteredStats : null;
|
|
3196
3282
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 w-64 space-y-4", children: [
|
|
3197
3283
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3198
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
3284
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipMin }),
|
|
3199
3285
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3200
3286
|
Input,
|
|
3201
3287
|
{
|
|
@@ -3214,7 +3300,7 @@ function ColumnFilterPopover({
|
|
|
3214
3300
|
)
|
|
3215
3301
|
] }),
|
|
3216
3302
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
3217
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-
|
|
3303
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--text-secondary)] uppercase tracking-wider block", children: labels.chipMax }),
|
|
3218
3304
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3219
3305
|
Input,
|
|
3220
3306
|
{
|
|
@@ -3276,7 +3362,7 @@ function ColumnFilterPopover({
|
|
|
3276
3362
|
};
|
|
3277
3363
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
3278
3364
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3279
|
-
|
|
3365
|
+
FilterChipPopoverTrigger,
|
|
3280
3366
|
{
|
|
3281
3367
|
label: config.label,
|
|
3282
3368
|
value: getDisplayValue(),
|
|
@@ -3520,7 +3606,7 @@ function CompoundFilterPopover({
|
|
|
3520
3606
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3521
3607
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
3522
3608
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
3523
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
3609
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block", children: labels.chipMin }),
|
|
3524
3610
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3525
3611
|
Input,
|
|
3526
3612
|
{
|
|
@@ -3542,7 +3628,7 @@ function CompoundFilterPopover({
|
|
|
3542
3628
|
)
|
|
3543
3629
|
] }),
|
|
3544
3630
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
3545
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
3631
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block", children: labels.chipMax }),
|
|
3546
3632
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3547
3633
|
Input,
|
|
3548
3634
|
{
|
|
@@ -3661,7 +3747,7 @@ function CompoundFilterPopover({
|
|
|
3661
3747
|
] });
|
|
3662
3748
|
};
|
|
3663
3749
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3664
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-
|
|
3750
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] font-semibold uppercase tracking-[0.1em] text-[var(--text-secondary)] block mb-2", children: [
|
|
3665
3751
|
labels.contains,
|
|
3666
3752
|
draft.tags.length >= 2 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-[10px] font-semibold text-[var(--tag-blue-text)] bg-[var(--tag-blue-bg)] rounded px-1 py-0.5 uppercase", children: labels.orBadge })
|
|
3667
3753
|
] }),
|
|
@@ -3752,7 +3838,7 @@ function CompoundFilterPopover({
|
|
|
3752
3838
|
};
|
|
3753
3839
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: isOpen, onOpenChange: handleOpenChange, children: [
|
|
3754
3840
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3755
|
-
|
|
3841
|
+
FilterChipPopoverTrigger,
|
|
3756
3842
|
{
|
|
3757
3843
|
label: config.label,
|
|
3758
3844
|
value: getDisplayValue(),
|
package/dist/tablewright.css
CHANGED
|
@@ -790,6 +790,9 @@
|
|
|
790
790
|
.border {
|
|
791
791
|
border-width: 1px
|
|
792
792
|
}
|
|
793
|
+
.border-0 {
|
|
794
|
+
border-width: 0px
|
|
795
|
+
}
|
|
793
796
|
.border-b {
|
|
794
797
|
border-bottom-width: 1px
|
|
795
798
|
}
|
|
@@ -898,6 +901,10 @@
|
|
|
898
901
|
.bg-\[var\(--tag-sky-bg\)\] {
|
|
899
902
|
background-color: var(--tag-sky-bg)
|
|
900
903
|
}
|
|
904
|
+
.bg-black {
|
|
905
|
+
--tw-bg-opacity: 1;
|
|
906
|
+
background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1))
|
|
907
|
+
}
|
|
901
908
|
.bg-black\/50 {
|
|
902
909
|
background-color: rgb(0 0 0 / 0.5)
|
|
903
910
|
}
|
|
@@ -1190,6 +1197,9 @@
|
|
|
1190
1197
|
.text-\[var\(--text-utility\)\] {
|
|
1191
1198
|
color: var(--text-utility)
|
|
1192
1199
|
}
|
|
1200
|
+
.text-inherit {
|
|
1201
|
+
color: inherit
|
|
1202
|
+
}
|
|
1193
1203
|
.text-red-600 {
|
|
1194
1204
|
--tw-text-opacity: 1;
|
|
1195
1205
|
color: rgb(220 38 38 / var(--tw-text-opacity, 1))
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { FilterChipProps } from "./FilterChip.js";
|
|
3
|
+
export type FilterChipPopoverTriggerProps = Omit<FilterChipProps, keyof React.HTMLAttributes<HTMLDivElement>> & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
4
|
+
/** Filter chip shell whose label area is a real button for PopoverTrigger asChild. */
|
|
5
|
+
export declare const FilterChipPopoverTrigger: React.ForwardRefExoticComponent<Omit<FilterChipProps, keyof React.HTMLAttributes<HTMLDivElement>> & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -5,6 +5,8 @@ interface RowActionsMenuProps {
|
|
|
5
5
|
align?: "start" | "center" | "end";
|
|
6
6
|
triggerClassName?: string;
|
|
7
7
|
contentClassName?: string;
|
|
8
|
+
/** Accessible name for the icon trigger (e.g. "Actions for TX-123"). */
|
|
9
|
+
triggerAriaLabel?: string;
|
|
8
10
|
}
|
|
9
|
-
export declare function RowActionsMenu({ actions, sections, align, triggerClassName, contentClassName, }: RowActionsMenuProps): import("react").JSX.Element;
|
|
11
|
+
export declare function RowActionsMenu({ actions, sections, align, triggerClassName, contentClassName, triggerAriaLabel, }: RowActionsMenuProps): import("react").JSX.Element;
|
|
10
12
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
-
declare
|
|
4
|
-
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
declare function Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
|
+
/**
|
|
5
|
+
* Select field control. Give the trigger an accessible name with `aria-label`, `aria-labelledby`,
|
|
6
|
+
* or a `<label htmlFor>` that points at the trigger's `id` — the trigger shows the selected value,
|
|
7
|
+
* not the field name.
|
|
8
|
+
*/
|
|
4
9
|
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
10
|
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
11
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@undevy-org/tablewright",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "React data-table and application-shell components: filters, drawers, row controls, sortable and resizable columns, built on Radix UI and TanStack Table.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|