@spacesync/client 0.1.0 → 0.1.1
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/README.md +9 -14
- package/dist/analog-clock-picker.d.ts +2 -2
- package/dist/analog-clock-picker.js +12 -406
- package/dist/analog-clock-picker.js.map +1 -1
- package/dist/api.js +7 -87
- package/dist/api.js.map +1 -1
- package/dist/app-modal.d.ts +7 -8
- package/dist/app-modal.js +3 -74
- package/dist/app-modal.js.map +1 -1
- package/dist/app-shell-mobile-nav.d.ts +1 -2
- package/dist/app-shell-mobile-nav.js +2 -66
- package/dist/app-shell-mobile-nav.js.map +1 -1
- package/dist/app-web-shell.d.ts +2 -2
- package/dist/app-web-shell.js +1 -4
- package/dist/app-web-shell.js.map +1 -1
- package/dist/booking-schedule-calendars.d.ts +12 -12
- package/dist/booking-schedule-calendars.js +13 -402
- package/dist/booking-schedule-calendars.js.map +1 -1
- package/dist/chat-stick-to-bottom.d.ts +1 -2
- package/dist/chat-stick-to-bottom.js +12 -48
- package/dist/chat-stick-to-bottom.js.map +1 -1
- package/dist/chunk-4A6RCBB5.js +4925 -0
- package/dist/chunk-4A6RCBB5.js.map +1 -0
- package/dist/chunk-4NNK5IXY.js +79 -0
- package/dist/chunk-4NNK5IXY.js.map +1 -0
- package/dist/chunk-4Y5DBM6Z.js +6 -0
- package/dist/chunk-4Y5DBM6Z.js.map +1 -0
- package/dist/chunk-7YCAAP43.js +107 -0
- package/dist/chunk-7YCAAP43.js.map +1 -0
- package/dist/chunk-DMPSQ22Q.js +11 -0
- package/dist/chunk-DMPSQ22Q.js.map +1 -0
- package/dist/chunk-FCY5FYJB.js +104 -0
- package/dist/chunk-FCY5FYJB.js.map +1 -0
- package/dist/chunk-H7EX6B6N.js +580 -0
- package/dist/chunk-H7EX6B6N.js.map +1 -0
- package/dist/chunk-HCHASUB6.js +13 -0
- package/dist/chunk-HCHASUB6.js.map +1 -0
- package/dist/chunk-L65F4EMK.js +34 -0
- package/dist/chunk-L65F4EMK.js.map +1 -0
- package/dist/chunk-LUB7QWGU.js +301 -0
- package/dist/chunk-LUB7QWGU.js.map +1 -0
- package/dist/chunk-OMSJWTSZ.js +120 -0
- package/dist/chunk-OMSJWTSZ.js.map +1 -0
- package/dist/chunk-OWNUMPUC.js +9 -0
- package/dist/chunk-OWNUMPUC.js.map +1 -0
- package/dist/chunk-P65TMY3D.js +87 -0
- package/dist/chunk-P65TMY3D.js.map +1 -0
- package/dist/chunk-PBNBLCC2.js +84 -0
- package/dist/chunk-PBNBLCC2.js.map +1 -0
- package/dist/chunk-RV5PMZYZ.js +63 -0
- package/dist/chunk-RV5PMZYZ.js.map +1 -0
- package/dist/chunk-VHINHHZQ.js +48 -0
- package/dist/chunk-VHINHHZQ.js.map +1 -0
- package/dist/chunk-VVXGQKN7.js +107 -0
- package/dist/chunk-VVXGQKN7.js.map +1 -0
- package/dist/chunk-XU3EFSQX.js +22 -0
- package/dist/chunk-XU3EFSQX.js.map +1 -0
- package/dist/chunk-YAVEMXXV.js +381 -0
- package/dist/chunk-YAVEMXXV.js.map +1 -0
- package/dist/chunk-ZIJQ7BXU.js +27 -0
- package/dist/chunk-ZIJQ7BXU.js.map +1 -0
- package/dist/detail-page-header.d.ts +3 -3
- package/dist/detail-page-header.js +5 -149
- package/dist/detail-page-header.js.map +1 -1
- package/dist/{dialog-CIdvylPK.d.ts → dialog-CPkbi5N3.d.ts} +10 -11
- package/dist/file-picker-field.d.ts +2 -2
- package/dist/file-picker-field.js +3 -163
- package/dist/file-picker-field.js.map +1 -1
- package/dist/file-viewer-dialog.d.ts +2 -2
- package/dist/file-viewer-dialog.js +12 -223
- package/dist/file-viewer-dialog.js.map +1 -1
- package/dist/floor-switcher.d.ts +2 -2
- package/dist/floor-switcher.js +13 -323
- package/dist/floor-switcher.js.map +1 -1
- package/dist/forms.js +1 -23
- package/dist/forms.js.map +1 -1
- package/dist/image-picker-field.d.ts +2 -2
- package/dist/image-picker-field.js +3 -48
- package/dist/image-picker-field.js.map +1 -1
- package/dist/layout-canvas-view.d.ts +2 -2
- package/dist/layout-canvas-view.js +17 -220
- package/dist/layout-canvas-view.js.map +1 -1
- package/dist/lib/dateDisplay.js +1 -82
- package/dist/lib/dateDisplay.js.map +1 -1
- package/dist/live-resource-meta.js +1 -25
- package/dist/live-resource-meta.js.map +1 -1
- package/dist/live-space-pulse-dot.d.ts +2 -2
- package/dist/live-space-pulse-dot.js +2 -16
- package/dist/live-space-pulse-dot.js.map +1 -1
- package/dist/notification-sidebar-preview.d.ts +3 -3
- package/dist/notification-sidebar-preview.js +3 -61
- package/dist/notification-sidebar-preview.js.map +1 -1
- package/dist/page-list-chrome.d.ts +25 -25
- package/dist/page-list-chrome.js +6 -968
- package/dist/page-list-chrome.js.map +1 -1
- package/dist/platform-support-message-composer.d.ts +4 -4
- package/dist/platform-support-message-composer.js +15 -218
- package/dist/platform-support-message-composer.js.map +1 -1
- package/dist/shell-sidebar-nav.js +8 -13
- package/dist/shell-sidebar-nav.js.map +1 -1
- package/dist/shell-theme.js +1 -7
- package/dist/shell-theme.js.map +1 -1
- package/dist/shell-top-bar-chrome.js +3 -103
- package/dist/shell-top-bar-chrome.js.map +1 -1
- package/dist/shell-top-bar.d.ts +3 -3
- package/dist/shell-top-bar.js +1 -69
- package/dist/shell-top-bar.js.map +1 -1
- package/dist/support-presence-status.d.ts +2 -2
- package/dist/support-presence-status.js +3 -41
- package/dist/support-presence-status.js.map +1 -1
- package/dist/theme-appearance-control.d.ts +2 -2
- package/dist/theme-appearance-control.js +4 -63
- package/dist/theme-appearance-control.js.map +1 -1
- package/dist/theme-boot-script.js +1 -2
- package/dist/theme-boot-script.js.map +1 -1
- package/dist/theme-provider.d.ts +2 -2
- package/dist/theme-provider.js +2 -23
- package/dist/theme-provider.js.map +1 -1
- package/dist/ui.d.ts +261 -262
- package/dist/ui.js +11 -5635
- package/dist/ui.js.map +1 -1
- package/package.json +11 -2
package/dist/page-list-chrome.js
CHANGED
|
@@ -1,970 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
10
|
-
|
|
11
|
-
// src/shell/page-list-chrome.tsx
|
|
12
|
-
function cn(...inputs) {
|
|
13
|
-
return twMerge(clsx(inputs));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// src/shell/page-list-sticky-columns.ts
|
|
17
|
-
var leftEdgeShadow = cn(
|
|
18
|
-
"after:pointer-events-none after:absolute after:inset-y-0 after:right-0 after:w-3 after:translate-x-full",
|
|
19
|
-
"after:bg-gradient-to-r after:from-black/[0.06] after:to-transparent dark:after:from-black/20",
|
|
20
|
-
"after:opacity-0 after:transition-opacity",
|
|
21
|
-
"group-data-[scrolled-x=true]/table-scroll:after:opacity-100"
|
|
22
|
-
);
|
|
23
|
-
var rightEdgeShadow = cn(
|
|
24
|
-
"before:pointer-events-none before:absolute before:inset-y-0 before:left-0 before:w-3 before:-translate-x-full",
|
|
25
|
-
"before:bg-gradient-to-l before:from-black/[0.06] before:to-transparent dark:before:from-black/20",
|
|
26
|
-
"before:opacity-0 before:transition-opacity",
|
|
27
|
-
"group-data-[scrolled-x-end=false]/table-scroll:before:opacity-100"
|
|
28
|
-
);
|
|
29
|
-
function pageListStickyColumnClass({
|
|
30
|
-
side,
|
|
31
|
-
layer,
|
|
32
|
-
sortActive = false
|
|
33
|
-
}) {
|
|
34
|
-
const isHead = layer === "head";
|
|
35
|
-
const pin = side === "left" ? "left-0" : "right-0";
|
|
36
|
-
const edgeShadow = side === "left" ? leftEdgeShadow : rightEdgeShadow;
|
|
37
|
-
return cn(
|
|
38
|
-
"relative sticky",
|
|
39
|
-
pin,
|
|
40
|
-
isHead ? "top-0 z-[3]" : "z-[1]",
|
|
41
|
-
sortActive ? "bg-blue-50/80 dark:bg-blue-950/40" : isHead ? "bg-card" : "bg-card group-hover:bg-accent",
|
|
42
|
-
edgeShadow
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
var pageListTableWithFixedColumnsClass = "border-separate border-spacing-0";
|
|
46
|
-
|
|
47
|
-
// src/shell/shell-top-bar-chrome.ts
|
|
48
|
-
var shellTopBarActionSize = cn(
|
|
49
|
-
"inline-flex !h-7 min-h-0 items-center justify-center gap-1 px-2.5 text-xs font-medium",
|
|
50
|
-
"[&_svg:not([class*='size-'])]:size-3.5"
|
|
51
|
-
);
|
|
52
|
-
var shellTopBarRadius = "rounded-md";
|
|
53
|
-
var shellTopBarNeutralRest = "border border-sidebar-border bg-sidebar-accent text-sidebar-foreground shadow-none transition-colors";
|
|
54
|
-
var shellTopBarNeutralHover = "hover:!border-sidebar-foreground/14 hover:!bg-sidebar-foreground/6 hover:!text-sidebar-foreground";
|
|
55
|
-
var shellTopBarNeutralActive = "active:!border-sidebar-foreground/10 active:!bg-sidebar-foreground/4 active:!text-sidebar-foreground";
|
|
56
|
-
var shellTopBarNeutralActionDataAttr = {
|
|
57
|
-
"data-shell-top-bar-action": ""
|
|
58
|
-
};
|
|
59
|
-
cn(
|
|
60
|
-
"inline-flex !h-6 !w-6 shrink-0 items-center justify-center text-sidebar-foreground/70",
|
|
61
|
-
shellTopBarRadius,
|
|
62
|
-
shellTopBarNeutralRest,
|
|
63
|
-
shellTopBarNeutralHover,
|
|
64
|
-
shellTopBarNeutralActive
|
|
65
|
-
);
|
|
66
|
-
cn(
|
|
67
|
-
"inline-flex !h-7 !w-7 shrink-0 items-center justify-center text-sidebar-foreground/70",
|
|
68
|
-
shellTopBarRadius,
|
|
69
|
-
shellTopBarNeutralRest,
|
|
70
|
-
shellTopBarNeutralHover,
|
|
71
|
-
shellTopBarNeutralActive,
|
|
72
|
-
"[&_svg:not([class*='size-'])]:size-3.5"
|
|
73
|
-
);
|
|
74
|
-
var shellTopBarSecondaryButtonClass = cn(
|
|
75
|
-
shellTopBarActionSize,
|
|
76
|
-
shellTopBarRadius,
|
|
77
|
-
"!border-sidebar-border !bg-sidebar-accent !text-sidebar-foreground shadow-none transition-colors",
|
|
78
|
-
"!py-0",
|
|
79
|
-
shellTopBarNeutralHover,
|
|
80
|
-
shellTopBarNeutralActive,
|
|
81
|
-
"disabled:pointer-events-none disabled:!border-sidebar-border/60 disabled:!bg-sidebar-accent/60 disabled:!text-sidebar-foreground/40"
|
|
82
|
-
);
|
|
83
|
-
var shellTopBarPrimaryButtonClass = cn(
|
|
84
|
-
shellTopBarActionSize,
|
|
85
|
-
shellTopBarRadius,
|
|
86
|
-
"bg-blue-500 text-white transition-colors hover:bg-blue-600",
|
|
87
|
-
"disabled:pointer-events-none disabled:opacity-50"
|
|
88
|
-
);
|
|
89
|
-
cn(
|
|
90
|
-
shellTopBarActionSize,
|
|
91
|
-
shellTopBarRadius,
|
|
92
|
-
"bg-emerald-600 text-white transition-colors hover:bg-emerald-700"
|
|
93
|
-
);
|
|
94
|
-
cn(
|
|
95
|
-
shellTopBarActionSize,
|
|
96
|
-
shellTopBarRadius,
|
|
97
|
-
"border border-emerald-200 bg-emerald-50 text-emerald-700 transition-colors hover:border-emerald-300 hover:bg-emerald-100"
|
|
98
|
-
);
|
|
99
|
-
cn(
|
|
100
|
-
shellTopBarActionSize,
|
|
101
|
-
shellTopBarRadius,
|
|
102
|
-
"border border-blue-200 bg-blue-50 text-blue-700 transition-colors hover:border-blue-300 hover:bg-blue-100"
|
|
103
|
-
);
|
|
104
|
-
var shellTopBarOutlineButtonClass = shellTopBarSecondaryButtonClass;
|
|
105
|
-
cn(
|
|
106
|
-
"flex items-center gap-0.5 border border-sidebar-border bg-sidebar-accent p-0.5",
|
|
107
|
-
shellTopBarRadius
|
|
108
|
-
);
|
|
109
|
-
cn(
|
|
110
|
-
"flex h-7 items-center gap-1.5 border border-sidebar-border bg-sidebar-accent pl-2.5 pr-1 text-sidebar-foreground",
|
|
111
|
-
shellTopBarRadius
|
|
112
|
-
);
|
|
113
|
-
cn(
|
|
114
|
-
"inline-flex !h-6 !w-6 items-center justify-center text-sidebar-foreground/70",
|
|
115
|
-
shellTopBarRadius,
|
|
116
|
-
shellTopBarNeutralRest,
|
|
117
|
-
shellTopBarNeutralHover,
|
|
118
|
-
shellTopBarNeutralActive,
|
|
119
|
-
"[&_svg:not([class*='size-'])]:size-3.5"
|
|
120
|
-
);
|
|
121
|
-
cn(
|
|
122
|
-
shellTopBarActionSize,
|
|
123
|
-
"min-w-[72px]",
|
|
124
|
-
shellTopBarNeutralRest,
|
|
125
|
-
shellTopBarNeutralHover,
|
|
126
|
-
shellTopBarNeutralActive
|
|
127
|
-
);
|
|
128
|
-
var buttonVariants = cva(
|
|
129
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
130
|
-
{
|
|
131
|
-
variants: {
|
|
132
|
-
variant: {
|
|
133
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 active:scale-[0.98]",
|
|
134
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 active:bg-destructive/80 active:scale-[0.98] focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 dark:active:bg-destructive/70",
|
|
135
|
-
outline: "border bg-background text-foreground hover:bg-accent hover:text-accent-foreground active:bg-accent/80 active:scale-[0.98] dark:bg-input/30 dark:border-input dark:hover:bg-input/50 dark:active:bg-input/60",
|
|
136
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 active:bg-secondary/70 active:scale-[0.98]",
|
|
137
|
-
ghost: "hover:bg-accent hover:text-accent-foreground active:bg-accent/90 active:scale-[0.98] dark:hover:bg-accent/50 dark:active:bg-accent/40",
|
|
138
|
-
link: "text-primary underline-offset-4 hover:underline active:text-primary/80"
|
|
139
|
-
},
|
|
140
|
-
size: {
|
|
141
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
142
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
143
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
144
|
-
icon: "size-9 rounded-md"
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
defaultVariants: {
|
|
148
|
-
variant: "default",
|
|
149
|
-
size: "default"
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
var Button = React.forwardRef(function Button2({ className, variant, size, asChild = false, ...props }, ref) {
|
|
154
|
-
const Comp = asChild ? Slot : "button";
|
|
155
|
-
return /* @__PURE__ */ jsx(
|
|
156
|
-
Comp,
|
|
157
|
-
{
|
|
158
|
-
ref,
|
|
159
|
-
"data-slot": "button",
|
|
160
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
161
|
-
...props
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
});
|
|
165
|
-
Button.displayName = "Button";
|
|
166
|
-
var inputVariants = cva(
|
|
167
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-border bg-card text-foreground flex w-full min-w-0 rounded-md border px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:border-blue-400 focus-visible:ring-[3px] focus-visible:ring-blue-500/25 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-red-400 aria-invalid:ring-red-500/20 md:text-sm",
|
|
168
|
-
{
|
|
169
|
-
variants: {
|
|
170
|
-
size: {
|
|
171
|
-
sm: "h-8 text-sm",
|
|
172
|
-
default: "h-9",
|
|
173
|
-
lg: "h-10",
|
|
174
|
-
xl: "h-11"
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
defaultVariants: {
|
|
178
|
-
size: "default"
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
var Input = React.forwardRef(function Input2({ className, type, size, ...props }, ref) {
|
|
183
|
-
return /* @__PURE__ */ jsx(
|
|
184
|
-
"input",
|
|
185
|
-
{
|
|
186
|
-
ref,
|
|
187
|
-
type,
|
|
188
|
-
"data-slot": "input",
|
|
189
|
-
className: cn(inputVariants({ size }), className),
|
|
190
|
-
...props
|
|
191
|
-
}
|
|
192
|
-
);
|
|
193
|
-
});
|
|
194
|
-
function SearchField({
|
|
195
|
-
value,
|
|
196
|
-
onChange,
|
|
197
|
-
placeholder,
|
|
198
|
-
className,
|
|
199
|
-
size = "default",
|
|
200
|
-
"aria-label": ariaLabel
|
|
201
|
-
}) {
|
|
202
|
-
const heightClass = size === "lg" ? "h-11" : "h-10";
|
|
203
|
-
const iconSize = size === "lg" ? 16 : 16;
|
|
204
|
-
return /* @__PURE__ */ jsxs(
|
|
205
|
-
"div",
|
|
206
|
-
{
|
|
207
|
-
className: cn(
|
|
208
|
-
"flex items-center gap-2 rounded-md border border-border bg-card px-3 w-full focus-within:border-blue-400 focus-within:ring-[3px] focus-within:ring-blue-500/25 transition-all",
|
|
209
|
-
heightClass,
|
|
210
|
-
className
|
|
211
|
-
),
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ jsx(Search, { size: iconSize, className: "text-muted-foreground shrink-0", strokeWidth: 2.25 }),
|
|
214
|
-
/* @__PURE__ */ jsx(
|
|
215
|
-
Input,
|
|
216
|
-
{
|
|
217
|
-
type: "search",
|
|
218
|
-
value,
|
|
219
|
-
onChange: (e) => onChange(e.target.value),
|
|
220
|
-
placeholder,
|
|
221
|
-
"aria-label": ariaLabel,
|
|
222
|
-
className: "flex-1 border-0 bg-transparent shadow-none focus-visible:ring-0 px-0 min-w-0 h-auto"
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
function Pagination({ className, ...props }) {
|
|
230
|
-
return /* @__PURE__ */ jsx(
|
|
231
|
-
"nav",
|
|
232
|
-
{
|
|
233
|
-
role: "navigation",
|
|
234
|
-
"aria-label": "pagination",
|
|
235
|
-
"data-slot": "pagination",
|
|
236
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
237
|
-
...props
|
|
238
|
-
}
|
|
239
|
-
);
|
|
240
|
-
}
|
|
241
|
-
function PaginationContent({ className, ...props }) {
|
|
242
|
-
return /* @__PURE__ */ jsx(
|
|
243
|
-
"ul",
|
|
244
|
-
{
|
|
245
|
-
"data-slot": "pagination-content",
|
|
246
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
247
|
-
...props
|
|
248
|
-
}
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
function PaginationItem({ ...props }) {
|
|
252
|
-
return /* @__PURE__ */ jsx("li", { "data-slot": "pagination-item", ...props });
|
|
253
|
-
}
|
|
254
|
-
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
255
|
-
return /* @__PURE__ */ jsx(
|
|
256
|
-
"a",
|
|
257
|
-
{
|
|
258
|
-
"aria-current": isActive ? "page" : void 0,
|
|
259
|
-
"data-slot": "pagination-link",
|
|
260
|
-
"data-active": isActive,
|
|
261
|
-
className: cn(
|
|
262
|
-
buttonVariants({
|
|
263
|
-
variant: isActive ? "outline" : "ghost",
|
|
264
|
-
size
|
|
265
|
-
}),
|
|
266
|
-
className
|
|
267
|
-
),
|
|
268
|
-
...props
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
function PaginationPrevious({ className, ...props }) {
|
|
273
|
-
return /* @__PURE__ */ jsxs(
|
|
274
|
-
PaginationLink,
|
|
275
|
-
{
|
|
276
|
-
"aria-label": "Go to previous page",
|
|
277
|
-
size: "default",
|
|
278
|
-
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
279
|
-
...props,
|
|
280
|
-
children: [
|
|
281
|
-
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
282
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Previous" })
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
);
|
|
286
|
-
}
|
|
287
|
-
function PaginationNext({ className, ...props }) {
|
|
288
|
-
return /* @__PURE__ */ jsxs(
|
|
289
|
-
PaginationLink,
|
|
290
|
-
{
|
|
291
|
-
"aria-label": "Go to next page",
|
|
292
|
-
size: "default",
|
|
293
|
-
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
294
|
-
...props,
|
|
295
|
-
children: [
|
|
296
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:block", children: "Next" }),
|
|
297
|
-
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
function PaginationEllipsis({ className, ...props }) {
|
|
303
|
-
return /* @__PURE__ */ jsxs(
|
|
304
|
-
"span",
|
|
305
|
-
{
|
|
306
|
-
"aria-hidden": true,
|
|
307
|
-
"data-slot": "pagination-ellipsis",
|
|
308
|
-
className: cn("flex size-9 items-center justify-center", className),
|
|
309
|
-
...props,
|
|
310
|
-
children: [
|
|
311
|
-
/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }),
|
|
312
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
function Select({ ...props }) {
|
|
318
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
319
|
-
}
|
|
320
|
-
function SelectValue({ ...props }) {
|
|
321
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
322
|
-
}
|
|
323
|
-
function SelectTrigger({
|
|
324
|
-
className,
|
|
325
|
-
size = "default",
|
|
326
|
-
children,
|
|
327
|
-
...props
|
|
328
|
-
}) {
|
|
329
|
-
return /* @__PURE__ */ jsxs(
|
|
330
|
-
SelectPrimitive.Trigger,
|
|
331
|
-
{
|
|
332
|
-
"data-slot": "select-trigger",
|
|
333
|
-
"data-size": size,
|
|
334
|
-
className: cn(
|
|
335
|
-
"border border-border bg-card data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground hover:border-border focus-visible:border-blue-400 focus-visible:ring-blue-500/25 aria-invalid:border-red-400 aria-invalid:ring-red-500/20 dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow,border-color] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
336
|
-
className
|
|
337
|
-
),
|
|
338
|
-
...props,
|
|
339
|
-
children: [
|
|
340
|
-
children,
|
|
341
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
function SelectContent({
|
|
347
|
-
className,
|
|
348
|
-
children,
|
|
349
|
-
position = "popper",
|
|
350
|
-
...props
|
|
351
|
-
}) {
|
|
352
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
353
|
-
SelectPrimitive.Content,
|
|
354
|
-
{
|
|
355
|
-
"data-slot": "select-content",
|
|
356
|
-
className: cn(
|
|
357
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-white/10 shadow-md",
|
|
358
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
359
|
-
className
|
|
360
|
-
),
|
|
361
|
-
position,
|
|
362
|
-
...props,
|
|
363
|
-
children: [
|
|
364
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
365
|
-
/* @__PURE__ */ jsx(
|
|
366
|
-
SelectPrimitive.Viewport,
|
|
367
|
-
{
|
|
368
|
-
className: cn(
|
|
369
|
-
"p-1",
|
|
370
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
371
|
-
),
|
|
372
|
-
children
|
|
373
|
-
}
|
|
374
|
-
),
|
|
375
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
376
|
-
]
|
|
377
|
-
}
|
|
378
|
-
) });
|
|
379
|
-
}
|
|
380
|
-
function SelectItem({
|
|
381
|
-
className,
|
|
382
|
-
children,
|
|
383
|
-
...props
|
|
384
|
-
}) {
|
|
385
|
-
return /* @__PURE__ */ jsxs(
|
|
386
|
-
SelectPrimitive.Item,
|
|
387
|
-
{
|
|
388
|
-
"data-slot": "select-item",
|
|
389
|
-
className: cn(
|
|
390
|
-
"focus:bg-card/10 focus:text-popover-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
391
|
-
className
|
|
392
|
-
),
|
|
393
|
-
...props,
|
|
394
|
-
children: [
|
|
395
|
-
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
396
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
397
|
-
]
|
|
398
|
-
}
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
function SelectScrollUpButton({
|
|
402
|
-
className,
|
|
403
|
-
...props
|
|
404
|
-
}) {
|
|
405
|
-
return /* @__PURE__ */ jsx(
|
|
406
|
-
SelectPrimitive.ScrollUpButton,
|
|
407
|
-
{
|
|
408
|
-
"data-slot": "select-scroll-up-button",
|
|
409
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
410
|
-
...props,
|
|
411
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
function SelectScrollDownButton({
|
|
416
|
-
className,
|
|
417
|
-
...props
|
|
418
|
-
}) {
|
|
419
|
-
return /* @__PURE__ */ jsx(
|
|
420
|
-
SelectPrimitive.ScrollDownButton,
|
|
421
|
-
{
|
|
422
|
-
"data-slot": "select-scroll-down-button",
|
|
423
|
-
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
424
|
-
...props,
|
|
425
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
426
|
-
}
|
|
427
|
-
);
|
|
428
|
-
}
|
|
429
|
-
function PageListRoot({ className, ...props }) {
|
|
430
|
-
return /* @__PURE__ */ jsx("div", { className: cn("h-full flex flex-col min-h-0 bg-card", className), ...props });
|
|
431
|
-
}
|
|
432
|
-
function PageListHeader({ className, ...props }) {
|
|
433
|
-
return /* @__PURE__ */ jsx(
|
|
434
|
-
"div",
|
|
435
|
-
{
|
|
436
|
-
className: cn("shrink-0 bg-card border-b border-border px-5 pt-4 pb-4", className),
|
|
437
|
-
...props
|
|
438
|
-
}
|
|
439
|
-
);
|
|
440
|
-
}
|
|
441
|
-
function PageListTitleRow({
|
|
442
|
-
title,
|
|
443
|
-
subtitle,
|
|
444
|
-
actions,
|
|
445
|
-
titleAddon
|
|
446
|
-
}) {
|
|
447
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between", children: [
|
|
448
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
449
|
-
titleAddon ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-1", children: [
|
|
450
|
-
titleAddon,
|
|
451
|
-
/* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-foreground", children: title })
|
|
452
|
-
] }) : /* @__PURE__ */ jsx("h1", { className: "text-base font-semibold text-foreground", children: title }),
|
|
453
|
-
subtitle ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subtitle }) : null
|
|
454
|
-
] }),
|
|
455
|
-
actions ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: actions }) : null
|
|
456
|
-
] });
|
|
457
|
-
}
|
|
458
|
-
function PageListPrimaryActionButton({
|
|
459
|
-
className,
|
|
460
|
-
...props
|
|
461
|
-
}) {
|
|
462
|
-
return /* @__PURE__ */ jsx(
|
|
463
|
-
Button,
|
|
464
|
-
{
|
|
465
|
-
type: "button",
|
|
466
|
-
className: cn(
|
|
467
|
-
"h-9 gap-1.5 rounded-xl bg-blue-500 px-4 text-sm font-medium text-white hover:bg-blue-600",
|
|
468
|
-
className
|
|
469
|
-
),
|
|
470
|
-
...props
|
|
471
|
-
}
|
|
472
|
-
);
|
|
473
|
-
}
|
|
474
|
-
function PageListSecondaryActionButton({
|
|
475
|
-
className,
|
|
476
|
-
...props
|
|
477
|
-
}) {
|
|
478
|
-
return /* @__PURE__ */ jsx(
|
|
479
|
-
Button,
|
|
480
|
-
{
|
|
481
|
-
type: "button",
|
|
482
|
-
variant: "outline",
|
|
483
|
-
className: cn(
|
|
484
|
-
"h-9 gap-1.5 rounded-xl border-border bg-card px-4 text-sm font-medium text-foreground hover:bg-accent",
|
|
485
|
-
className
|
|
486
|
-
),
|
|
487
|
-
...props
|
|
488
|
-
}
|
|
489
|
-
);
|
|
490
|
-
}
|
|
491
|
-
function ShellTopBarPrimaryActionButton({
|
|
492
|
-
className,
|
|
493
|
-
...props
|
|
494
|
-
}) {
|
|
495
|
-
return /* @__PURE__ */ jsx(Button, { type: "button", size: "sm", className: cn(shellTopBarPrimaryButtonClass, className), ...props });
|
|
496
|
-
}
|
|
497
|
-
function ShellTopBarSecondaryActionButton({
|
|
498
|
-
className,
|
|
499
|
-
...props
|
|
500
|
-
}) {
|
|
501
|
-
return /* @__PURE__ */ jsx(
|
|
502
|
-
Button,
|
|
503
|
-
{
|
|
504
|
-
type: "button",
|
|
505
|
-
variant: "outline",
|
|
506
|
-
size: "sm",
|
|
507
|
-
className: cn(shellTopBarOutlineButtonClass, className),
|
|
508
|
-
...props
|
|
509
|
-
}
|
|
510
|
-
);
|
|
511
|
-
}
|
|
512
|
-
function PageListToolbar({ className, ...props }) {
|
|
513
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mt-4 flex flex-col gap-3 items-start", className), ...props });
|
|
514
|
-
}
|
|
515
|
-
function PageListStatGrid({ className, ...props }) {
|
|
516
|
-
return /* @__PURE__ */ jsx(
|
|
517
|
-
"div",
|
|
518
|
-
{
|
|
519
|
-
className: cn("mt-4 grid grid-cols-2 gap-2 sm:grid-cols-4", className),
|
|
520
|
-
...props
|
|
521
|
-
}
|
|
522
|
-
);
|
|
523
|
-
}
|
|
524
|
-
function PageListStatCard({
|
|
525
|
-
label,
|
|
526
|
-
value,
|
|
527
|
-
tone = "default"
|
|
528
|
-
}) {
|
|
529
|
-
const shell = tone === "danger" ? "border-red-100 bg-red-50/80" : tone === "success" ? "border-emerald-100 bg-emerald-50/80" : "border-border bg-muted";
|
|
530
|
-
const labelClass = tone === "danger" ? "text-red-600/80" : tone === "success" ? "text-emerald-700/80" : "text-muted-foreground";
|
|
531
|
-
const valueClass = tone === "danger" ? "text-red-700" : tone === "success" ? "text-emerald-800" : "text-foreground";
|
|
532
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("rounded-lg border px-3 py-2", shell), children: [
|
|
533
|
-
/* @__PURE__ */ jsx("p", { className: cn("text-[11px] mb-0.5", labelClass), children: label }),
|
|
534
|
-
/* @__PURE__ */ jsx("p", { className: cn("text-sm font-semibold tabular-nums", valueClass), children: value })
|
|
535
|
-
] });
|
|
536
|
-
}
|
|
537
|
-
function PageListTableArea({ className, ...props }) {
|
|
538
|
-
const ref = useRef(null);
|
|
539
|
-
useEffect(() => {
|
|
540
|
-
const el = ref.current;
|
|
541
|
-
if (!el) return;
|
|
542
|
-
const syncScrollState = () => {
|
|
543
|
-
if (el.scrollLeft > 0) {
|
|
544
|
-
el.dataset.scrolledX = "true";
|
|
545
|
-
} else {
|
|
546
|
-
delete el.dataset.scrolledX;
|
|
547
|
-
}
|
|
548
|
-
const atRightEnd = el.scrollLeft + el.clientWidth >= el.scrollWidth - 1;
|
|
549
|
-
if (!atRightEnd && el.scrollWidth > el.clientWidth) {
|
|
550
|
-
el.dataset.scrolledXEnd = "false";
|
|
551
|
-
} else {
|
|
552
|
-
delete el.dataset.scrolledXEnd;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
syncScrollState();
|
|
556
|
-
el.addEventListener("scroll", syncScrollState, { passive: true });
|
|
557
|
-
const resizeObserver = new ResizeObserver(syncScrollState);
|
|
558
|
-
resizeObserver.observe(el);
|
|
559
|
-
if (el.firstElementChild) {
|
|
560
|
-
resizeObserver.observe(el.firstElementChild);
|
|
561
|
-
}
|
|
562
|
-
return () => {
|
|
563
|
-
el.removeEventListener("scroll", syncScrollState);
|
|
564
|
-
resizeObserver.disconnect();
|
|
565
|
-
};
|
|
566
|
-
}, []);
|
|
567
|
-
return /* @__PURE__ */ jsx(
|
|
568
|
-
"div",
|
|
569
|
-
{
|
|
570
|
-
ref,
|
|
571
|
-
className: cn(
|
|
572
|
-
"group/table-scroll flex-1 min-h-0 overflow-auto bg-card border-t border-border",
|
|
573
|
-
className
|
|
574
|
-
),
|
|
575
|
-
...props
|
|
576
|
-
}
|
|
577
|
-
);
|
|
578
|
-
}
|
|
579
|
-
function PageListSearchField({
|
|
580
|
-
value,
|
|
581
|
-
onChange,
|
|
582
|
-
placeholder,
|
|
583
|
-
className
|
|
584
|
-
}) {
|
|
585
|
-
return /* @__PURE__ */ jsx(
|
|
586
|
-
SearchField,
|
|
587
|
-
{
|
|
588
|
-
value,
|
|
589
|
-
onChange,
|
|
590
|
-
placeholder,
|
|
591
|
-
className
|
|
592
|
-
}
|
|
593
|
-
);
|
|
594
|
-
}
|
|
595
|
-
function PageListStickyThead({ children }) {
|
|
596
|
-
return /* @__PURE__ */ jsx("thead", { className: "sticky top-0 z-[2] bg-card shadow-[0_1px_0_0_var(--border)]", children });
|
|
597
|
-
}
|
|
598
|
-
function PageListThead({ className, ...props }) {
|
|
599
|
-
return /* @__PURE__ */ jsx("thead", { className: cn("border-b border-border", className), ...props });
|
|
600
|
-
}
|
|
601
|
-
function PageListTable({
|
|
602
|
-
minWidth,
|
|
603
|
-
fixedColumns = false,
|
|
604
|
-
compact = false,
|
|
605
|
-
className,
|
|
606
|
-
style,
|
|
607
|
-
...props
|
|
608
|
-
}) {
|
|
609
|
-
return /* @__PURE__ */ jsx(
|
|
610
|
-
"table",
|
|
611
|
-
{
|
|
612
|
-
className: cn(
|
|
613
|
-
"w-full text-left text-sm",
|
|
614
|
-
fixedColumns ? pageListTableWithFixedColumnsClass : "border-collapse",
|
|
615
|
-
compact && "border-collapse",
|
|
616
|
-
className
|
|
617
|
-
),
|
|
618
|
-
style: minWidth != null ? { ...style, minWidth: `${minWidth}px` } : style,
|
|
619
|
-
...props
|
|
620
|
-
}
|
|
621
|
-
);
|
|
622
|
-
}
|
|
623
|
-
function PageListHeaderRow({ className, ...props }) {
|
|
624
|
-
return /* @__PURE__ */ jsx(
|
|
625
|
-
"tr",
|
|
626
|
-
{
|
|
627
|
-
className: cn("text-[10px] uppercase tracking-wide text-muted-foreground", className),
|
|
628
|
-
...props
|
|
629
|
-
}
|
|
630
|
-
);
|
|
631
|
-
}
|
|
632
|
-
var pageListTdToneClass = {
|
|
633
|
-
default: "text-xs text-foreground",
|
|
634
|
-
primary: "text-xs font-medium text-foreground",
|
|
635
|
-
muted: "text-xs text-muted-foreground",
|
|
636
|
-
mono: "text-xs font-mono text-muted-foreground"
|
|
637
|
-
};
|
|
638
|
-
var pageListTdSizeClass = {
|
|
639
|
-
default: "px-2 py-2.5 first:pl-5 last:pr-5",
|
|
640
|
-
comfortable: "px-5 py-3.5 first:pl-5 last:pr-5"
|
|
641
|
-
};
|
|
642
|
-
function PageListTr({
|
|
643
|
-
onClick,
|
|
644
|
-
selected = false,
|
|
645
|
-
className,
|
|
646
|
-
onKeyDown,
|
|
647
|
-
...props
|
|
648
|
-
}) {
|
|
649
|
-
const clickable = Boolean(onClick);
|
|
650
|
-
return /* @__PURE__ */ jsx(
|
|
651
|
-
"tr",
|
|
652
|
-
{
|
|
653
|
-
role: clickable ? "link" : void 0,
|
|
654
|
-
tabIndex: clickable ? 0 : void 0,
|
|
655
|
-
onClick,
|
|
656
|
-
onKeyDown: clickable && onClick ? (e) => {
|
|
657
|
-
onKeyDown?.(e);
|
|
658
|
-
if (e.defaultPrevented) return;
|
|
659
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
660
|
-
e.preventDefault();
|
|
661
|
-
onClick();
|
|
662
|
-
}
|
|
663
|
-
} : onKeyDown,
|
|
664
|
-
className: cn(
|
|
665
|
-
"border-b border-border last:border-0 transition-colors",
|
|
666
|
-
clickable && "group cursor-pointer hover:bg-accent outline-none focus-visible:ring-2 focus-visible:ring-blue-400 focus-visible:ring-inset",
|
|
667
|
-
selected && "bg-accent/60",
|
|
668
|
-
className
|
|
669
|
-
),
|
|
670
|
-
...props
|
|
671
|
-
}
|
|
672
|
-
);
|
|
673
|
-
}
|
|
674
|
-
var pageListThClass = "font-medium py-2.5 px-2 text-left text-[10px] uppercase tracking-wide text-muted-foreground first:pl-5 last:pr-5";
|
|
675
|
-
var pageListTdClass = pageListTdSizeClass.default;
|
|
676
|
-
function PageListTh({
|
|
677
|
-
children,
|
|
678
|
-
columnFixed,
|
|
679
|
-
align = "left",
|
|
680
|
-
className,
|
|
681
|
-
...props
|
|
682
|
-
}) {
|
|
683
|
-
return /* @__PURE__ */ jsx(
|
|
684
|
-
"th",
|
|
685
|
-
{
|
|
686
|
-
className: cn(
|
|
687
|
-
pageListThClass,
|
|
688
|
-
align === "right" && "text-right",
|
|
689
|
-
columnFixed && pageListStickyColumnClass({ side: columnFixed, layer: "head" }),
|
|
690
|
-
className
|
|
691
|
-
),
|
|
692
|
-
...props,
|
|
693
|
-
children
|
|
694
|
-
}
|
|
695
|
-
);
|
|
696
|
-
}
|
|
697
|
-
function PageListTd({
|
|
698
|
-
children,
|
|
699
|
-
columnFixed,
|
|
700
|
-
align = "left",
|
|
701
|
-
tone = "default",
|
|
702
|
-
size = "default",
|
|
703
|
-
className,
|
|
704
|
-
...props
|
|
705
|
-
}) {
|
|
706
|
-
return /* @__PURE__ */ jsx(
|
|
707
|
-
"td",
|
|
708
|
-
{
|
|
709
|
-
className: cn(
|
|
710
|
-
pageListTdSizeClass[size],
|
|
711
|
-
pageListTdToneClass[tone],
|
|
712
|
-
tone === "mono" && align === "right" && "font-medium text-foreground",
|
|
713
|
-
align === "right" && "text-right",
|
|
714
|
-
columnFixed && pageListStickyColumnClass({ side: columnFixed, layer: "body" }),
|
|
715
|
-
className
|
|
716
|
-
),
|
|
717
|
-
...props,
|
|
718
|
-
children
|
|
719
|
-
}
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
function PageListSortableTh({
|
|
723
|
-
label,
|
|
724
|
-
columnKey,
|
|
725
|
-
sortKey,
|
|
726
|
-
direction,
|
|
727
|
-
onSort,
|
|
728
|
-
align = "left",
|
|
729
|
-
columnFixed,
|
|
730
|
-
className
|
|
731
|
-
}) {
|
|
732
|
-
const active = sortKey === columnKey;
|
|
733
|
-
const ariaSort = active ? direction === "asc" ? "ascending" : "descending" : void 0;
|
|
734
|
-
const DirectionIcon = direction === "asc" ? ChevronUp : ChevronDown;
|
|
735
|
-
return /* @__PURE__ */ jsx(
|
|
736
|
-
"th",
|
|
737
|
-
{
|
|
738
|
-
className: cn(
|
|
739
|
-
pageListThClass,
|
|
740
|
-
align === "right" && "text-right",
|
|
741
|
-
active && "text-blue-700 shadow-[inset_0_-2px_0_0_rgb(59,130,246)] dark:text-blue-300",
|
|
742
|
-
columnFixed && pageListStickyColumnClass({
|
|
743
|
-
side: columnFixed,
|
|
744
|
-
layer: "head",
|
|
745
|
-
sortActive: active
|
|
746
|
-
}),
|
|
747
|
-
!columnFixed && active && "bg-blue-50/80 dark:bg-blue-950/40",
|
|
748
|
-
className
|
|
749
|
-
),
|
|
750
|
-
"aria-sort": ariaSort,
|
|
751
|
-
children: /* @__PURE__ */ jsxs(
|
|
752
|
-
Button,
|
|
753
|
-
{
|
|
754
|
-
type: "button",
|
|
755
|
-
variant: "ghost",
|
|
756
|
-
onClick: () => onSort(columnKey),
|
|
757
|
-
className: cn(
|
|
758
|
-
"group inline-flex h-auto w-full gap-1 rounded-none border-0 p-0 shadow-none",
|
|
759
|
-
"text-[10px] font-medium uppercase tracking-wide",
|
|
760
|
-
"hover:bg-transparent",
|
|
761
|
-
active ? "text-blue-700 dark:text-blue-300" : "text-muted-foreground hover:text-foreground",
|
|
762
|
-
align === "right" ? "justify-end" : "justify-start"
|
|
763
|
-
),
|
|
764
|
-
children: [
|
|
765
|
-
/* @__PURE__ */ jsx("span", { children: label }),
|
|
766
|
-
active ? /* @__PURE__ */ jsx(
|
|
767
|
-
DirectionIcon,
|
|
768
|
-
{
|
|
769
|
-
size: 12,
|
|
770
|
-
strokeWidth: 2,
|
|
771
|
-
className: "shrink-0 text-blue-600 dark:text-blue-400",
|
|
772
|
-
"aria-hidden": true
|
|
773
|
-
}
|
|
774
|
-
) : /* @__PURE__ */ jsx(
|
|
775
|
-
ChevronsUpDown,
|
|
776
|
-
{
|
|
777
|
-
size: 12,
|
|
778
|
-
strokeWidth: 2,
|
|
779
|
-
className: "shrink-0 opacity-40 transition-opacity group-hover:opacity-70",
|
|
780
|
-
"aria-hidden": true
|
|
781
|
-
}
|
|
782
|
-
)
|
|
783
|
-
]
|
|
784
|
-
}
|
|
785
|
-
)
|
|
786
|
-
}
|
|
787
|
-
);
|
|
788
|
-
}
|
|
789
|
-
function getVisiblePages(page, totalPages) {
|
|
790
|
-
if (totalPages <= 5) {
|
|
791
|
-
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
792
|
-
}
|
|
793
|
-
const pages = /* @__PURE__ */ new Set([1, totalPages, page - 1, page, page + 1]);
|
|
794
|
-
const sorted = [...pages].filter((p) => p >= 1 && p <= totalPages).sort((a, b) => a - b);
|
|
795
|
-
const result = [];
|
|
796
|
-
for (let i = 0; i < sorted.length; i += 1) {
|
|
797
|
-
const current = sorted[i];
|
|
798
|
-
const prev = sorted[i - 1];
|
|
799
|
-
if (prev !== void 0 && current - prev > 1) {
|
|
800
|
-
result.push("ellipsis");
|
|
801
|
-
}
|
|
802
|
-
result.push(current);
|
|
803
|
-
}
|
|
804
|
-
return result;
|
|
805
|
-
}
|
|
806
|
-
function paginationLinkClick(page, setPage) {
|
|
807
|
-
return (event) => {
|
|
808
|
-
event.preventDefault();
|
|
809
|
-
setPage(page);
|
|
810
|
-
};
|
|
811
|
-
}
|
|
812
|
-
function PageListPagination({
|
|
813
|
-
page,
|
|
814
|
-
setPage,
|
|
815
|
-
pageSize,
|
|
816
|
-
setPageSize,
|
|
817
|
-
pageSizeOptions,
|
|
818
|
-
totalItems,
|
|
819
|
-
totalPages,
|
|
820
|
-
rangeStart,
|
|
821
|
-
rangeEnd,
|
|
822
|
-
canPrev,
|
|
823
|
-
canNext
|
|
824
|
-
}) {
|
|
825
|
-
if (totalItems === 0) return null;
|
|
826
|
-
const visiblePages = getVisiblePages(page, totalPages);
|
|
827
|
-
const showPageControls = totalPages > 1;
|
|
828
|
-
return /* @__PURE__ */ jsxs(
|
|
829
|
-
"div",
|
|
830
|
-
{
|
|
831
|
-
className: "shrink-0 flex flex-col gap-3 border-t border-border bg-card px-5 py-3 sm:flex-row sm:items-center sm:justify-between",
|
|
832
|
-
children: [
|
|
833
|
-
/* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground tabular-nums", children: [
|
|
834
|
-
"Showing ",
|
|
835
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: rangeStart }),
|
|
836
|
-
"\u2013",
|
|
837
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: rangeEnd }),
|
|
838
|
-
" of",
|
|
839
|
-
" ",
|
|
840
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: totalItems })
|
|
841
|
-
] }),
|
|
842
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4", children: [
|
|
843
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
844
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Rows per page" }),
|
|
845
|
-
/* @__PURE__ */ jsxs(
|
|
846
|
-
Select,
|
|
847
|
-
{
|
|
848
|
-
value: String(pageSize),
|
|
849
|
-
onValueChange: (value) => setPageSize(Number(value)),
|
|
850
|
-
children: [
|
|
851
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-[72px] rounded-lg border-border bg-card text-sm", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
852
|
-
/* @__PURE__ */ jsx(SelectContent, { children: pageSizeOptions.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: String(option), children: option }, option)) })
|
|
853
|
-
]
|
|
854
|
-
}
|
|
855
|
-
)
|
|
856
|
-
] }),
|
|
857
|
-
showPageControls ? /* @__PURE__ */ jsx(Pagination, { className: "mx-0 w-auto justify-end", children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
|
|
858
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
859
|
-
PaginationPrevious,
|
|
860
|
-
{
|
|
861
|
-
href: "#",
|
|
862
|
-
"aria-disabled": !canPrev,
|
|
863
|
-
className: cn(!canPrev && "pointer-events-none opacity-50"),
|
|
864
|
-
onClick: canPrev ? paginationLinkClick(page - 1, setPage) : (event) => event.preventDefault()
|
|
865
|
-
}
|
|
866
|
-
) }),
|
|
867
|
-
visiblePages.map(
|
|
868
|
-
(pageNum, index) => pageNum === "ellipsis" ? /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(PaginationEllipsis, {}) }, `ellipsis-${index}`) : /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
869
|
-
PaginationLink,
|
|
870
|
-
{
|
|
871
|
-
href: "#",
|
|
872
|
-
isActive: pageNum === page,
|
|
873
|
-
onClick: paginationLinkClick(pageNum, setPage),
|
|
874
|
-
children: pageNum
|
|
875
|
-
}
|
|
876
|
-
) }, pageNum)
|
|
877
|
-
),
|
|
878
|
-
/* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
|
|
879
|
-
PaginationNext,
|
|
880
|
-
{
|
|
881
|
-
href: "#",
|
|
882
|
-
"aria-disabled": !canNext,
|
|
883
|
-
className: cn(!canNext && "pointer-events-none opacity-50"),
|
|
884
|
-
onClick: canNext ? paginationLinkClick(page + 1, setPage) : (event) => event.preventDefault()
|
|
885
|
-
}
|
|
886
|
-
) })
|
|
887
|
-
] }) }) : null
|
|
888
|
-
] })
|
|
889
|
-
]
|
|
890
|
-
}
|
|
891
|
-
);
|
|
892
|
-
}
|
|
893
|
-
function PageListEmptyState({
|
|
894
|
-
title,
|
|
895
|
-
description,
|
|
896
|
-
icon,
|
|
897
|
-
action,
|
|
898
|
-
variant = "minimal",
|
|
899
|
-
className
|
|
900
|
-
}) {
|
|
901
|
-
if (variant === "minimal") {
|
|
902
|
-
return /* @__PURE__ */ jsxs(
|
|
903
|
-
"div",
|
|
904
|
-
{
|
|
905
|
-
className: cn(
|
|
906
|
-
"flex flex-col items-center justify-center py-24 gap-2",
|
|
907
|
-
className
|
|
908
|
-
),
|
|
909
|
-
children: [
|
|
910
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: title }),
|
|
911
|
-
description ? /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: description }) : null,
|
|
912
|
-
action
|
|
913
|
-
]
|
|
914
|
-
}
|
|
915
|
-
);
|
|
916
|
-
}
|
|
917
|
-
return /* @__PURE__ */ jsxs(
|
|
918
|
-
"div",
|
|
919
|
-
{
|
|
920
|
-
className: cn(
|
|
921
|
-
"flex flex-col items-center justify-center py-20 gap-3 border-2 border-dashed border-border rounded-2xl bg-muted/50",
|
|
922
|
-
className
|
|
923
|
-
),
|
|
924
|
-
children: [
|
|
925
|
-
icon ? /* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-2xl bg-muted flex items-center justify-center", children: icon }) : null,
|
|
926
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1 text-center px-4", children: [
|
|
927
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-medium", children: title }),
|
|
928
|
-
description ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground max-w-sm", children: description }) : null
|
|
929
|
-
] }),
|
|
930
|
-
action
|
|
931
|
-
]
|
|
932
|
-
}
|
|
933
|
-
);
|
|
934
|
-
}
|
|
935
|
-
function DetailTableFrame({
|
|
936
|
-
className,
|
|
937
|
-
children,
|
|
938
|
-
...props
|
|
939
|
-
}) {
|
|
940
|
-
return /* @__PURE__ */ jsx(
|
|
941
|
-
"div",
|
|
942
|
-
{
|
|
943
|
-
className: cn("overflow-x-auto rounded-xl border border-border", className),
|
|
944
|
-
...props,
|
|
945
|
-
children
|
|
946
|
-
}
|
|
947
|
-
);
|
|
948
|
-
}
|
|
949
|
-
function DetailSection({
|
|
950
|
-
title,
|
|
951
|
-
description,
|
|
952
|
-
headerMeta,
|
|
953
|
-
headerAction,
|
|
954
|
-
children
|
|
955
|
-
}) {
|
|
956
|
-
return /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-6 py-6 last:border-0", children: [
|
|
957
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
|
|
958
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
959
|
-
/* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
960
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: description })
|
|
961
|
-
] }),
|
|
962
|
-
headerAction ? headerAction : headerMeta ? /* @__PURE__ */ jsx("div", { className: "shrink-0 text-xs text-muted-foreground", children: headerMeta }) : null
|
|
963
|
-
] }),
|
|
964
|
-
children
|
|
965
|
-
] });
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
export { DetailSection, DetailTableFrame, PageListEmptyState, PageListHeader, PageListHeaderRow, PageListPagination, PageListPrimaryActionButton, PageListRoot, PageListSearchField, PageListSecondaryActionButton, PageListSortableTh, PageListStatCard, PageListStatGrid, PageListStickyThead, PageListTable, PageListTableArea, PageListTd, PageListTh, PageListThead, PageListTitleRow, PageListToolbar, PageListTr, ShellTopBarPrimaryActionButton, ShellTopBarSecondaryActionButton, pageListStickyColumnClass, pageListTableWithFixedColumnsClass, pageListTdClass, pageListThClass, shellTopBarNeutralActionDataAttr };
|
|
1
|
+
export { DetailSection, DetailTableFrame, PageListEmptyState, PageListHeader, PageListHeaderRow, PageListPagination, PageListPrimaryActionButton, PageListRoot, PageListSearchField, PageListSecondaryActionButton, PageListSortableTh, PageListStatCard, PageListStatGrid, PageListStickyThead, PageListTable, PageListTableArea, PageListTd, PageListTh, PageListThead, PageListTitleRow, PageListToolbar, PageListTr, ShellTopBarPrimaryActionButton, ShellTopBarSecondaryActionButton, pageListStickyColumnClass, pageListTableWithFixedColumnsClass, pageListTdClass, pageListThClass } from './chunk-H7EX6B6N.js';
|
|
2
|
+
import './chunk-LUB7QWGU.js';
|
|
3
|
+
import './chunk-VHINHHZQ.js';
|
|
4
|
+
export { shellTopBarNeutralActionDataAttr } from './chunk-FCY5FYJB.js';
|
|
5
|
+
import './chunk-OWNUMPUC.js';
|
|
6
|
+
import './chunk-DMPSQ22Q.js';
|
|
969
7
|
//# sourceMappingURL=page-list-chrome.js.map
|
|
970
8
|
//# sourceMappingURL=page-list-chrome.js.map
|