@yimingliao/cms 0.0.129 → 0.0.131
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/export/client/index.js +2 -1
- package/dist/export/server/index.js +0 -6
- package/dist/export/server/r2/index.js +0 -19
- package/dist/export/server/sftp/index.js +0 -18
- package/dist/src/client/infrastructure/contexts/admin.js +5 -4
- package/dist/src/client/infrastructure/contexts/theme.js +5 -5
- package/dist/src/client/infrastructure/toast/error-display.js +15 -3
- package/dist/src/client/interfaces/components/shadcn/avatar.js +5 -4
- package/dist/src/client/interfaces/components/shadcn/button.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/card.js +9 -8
- package/dist/src/client/interfaces/components/shadcn/collapsible.js +4 -3
- package/dist/src/client/interfaces/components/shadcn/dropdown-menu.js +36 -29
- package/dist/src/client/interfaces/components/shadcn/input-group.js +8 -7
- package/dist/src/client/interfaces/components/shadcn/input.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/label.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/pagination.js +21 -18
- package/dist/src/client/interfaces/components/shadcn/select.js +47 -40
- package/dist/src/client/interfaces/components/shadcn/separator.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/sheet.js +36 -27
- package/dist/src/client/interfaces/components/shadcn/sidebar.js +120 -105
- package/dist/src/client/interfaces/components/shadcn/skeleton.js +2 -1
- package/dist/src/client/interfaces/components/shadcn/spinner.js +2 -1
- package/dist/src/client/interfaces/components/shadcn/textarea.js +3 -2
- package/dist/src/client/interfaces/components/shadcn/tooltip.js +13 -10
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js +35 -23
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js +20 -14
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/pagination.js +35 -26
- package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header-title.js +10 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/page-header.js +21 -15
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch-create.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/batch.js +19 -14
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/create.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/edit.js +2 -1
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/index.js +34 -29
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/show.js +43 -37
- package/dist/src/client/interfaces/components/ui/blocks/page-header/presets/trash.js +24 -18
- package/dist/src/client/interfaces/components/ui/buttons/button.js +8 -4
- package/dist/src/client/interfaces/components/ui/buttons/return-button.js +5 -4
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expand-bar.js +9 -6
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list-content.js +14 -8
- package/dist/src/client/interfaces/components/ui/features/expandable-list/expandable-list.js +22 -17
- package/dist/src/client/interfaces/components/ui/form/containers/fields-container.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/containers/main-fields.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/containers/side-fields.js +5 -4
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-display.js +80 -57
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-input.js +114 -91
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields.js +4 -3
- package/dist/src/client/interfaces/components/ui/form/field-body.js +31 -28
- package/dist/src/client/interfaces/components/ui/form/field.js +12 -1
- package/dist/src/client/interfaces/components/ui/form/form.js +2 -1
- package/dist/src/client/interfaces/components/ui/form/index-field.js +49 -42
- package/dist/src/client/interfaces/components/ui/form/slug-field.js +45 -38
- package/dist/src/client/interfaces/components/ui/inputs/array-input.js +63 -52
- package/dist/src/client/interfaces/components/ui/inputs/checkbox.js +41 -38
- package/dist/src/client/interfaces/components/ui/inputs/input.js +20 -17
- package/dist/src/client/interfaces/components/ui/inputs/password-input.js +6 -5
- package/dist/src/client/interfaces/components/ui/inputs/search-input.js +6 -5
- package/dist/src/client/interfaces/components/ui/inputs/select.js +19 -13
- package/dist/src/client/interfaces/components/ui/inputs/textarea.js +3 -2
- package/dist/src/client/interfaces/components/ui/layouts/content-container.js +5 -4
- package/dist/src/client/interfaces/components/ui/layouts/layout-skeleton.js +20 -7
- package/dist/src/client/interfaces/components/ui/layouts/navbar/i18n-selector.js +8 -1
- package/dist/src/client/interfaces/components/ui/layouts/navbar/nav-user.js +60 -34
- package/dist/src/client/interfaces/components/ui/layouts/navbar/navbar.js +39 -26
- package/dist/src/client/interfaces/components/ui/layouts/navbar/sign-out-button.js +6 -2
- package/dist/src/client/interfaces/components/ui/layouts/navbar/theme-selector.js +22 -1
- package/dist/src/client/interfaces/components/ui/layouts/sidebar/nav-main.js +43 -27
- package/dist/src/client/interfaces/pages/auth/change-password.js +81 -70
- package/dist/src/client/interfaces/pages/auth/email-unverified.js +39 -21
- package/dist/src/client/interfaces/pages/auth/forgot-password.js +41 -26
- package/dist/src/client/interfaces/pages/auth/reset-password.js +60 -51
- package/dist/src/client/interfaces/pages/auth/sign-in.js +46 -37
- package/dist/src/client/interfaces/pages/auth/verify-email.js +2 -1
- package/dist/types/export/server/r2/index.d.ts +1 -1
- package/dist/types/export/server/r2/index.d.ts.map +1 -1
- package/dist/types/export/server/sftp/index.d.ts +1 -1
- package/dist/types/export/server/sftp/index.d.ts.map +1 -1
- package/dist/types/src/server/index.d.ts +1 -1
- package/dist/types/src/server/index.d.ts.map +1 -1
- package/dist/types/src/server/infrastructure/index.d.ts +1 -1
- package/dist/types/src/server/infrastructure/index.d.ts.map +1 -1
- package/dist/types/src/server/infrastructure/storage/index.d.ts +0 -2
- package/dist/types/src/server/infrastructure/storage/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
4
|
import { cva } from 'class-variance-authority';
|
|
4
5
|
import { PanelLeftIcon } from 'lucide-react';
|
|
@@ -79,7 +80,7 @@ function SidebarProvider({
|
|
|
79
80
|
}),
|
|
80
81
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
81
82
|
);
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
|
|
83
84
|
"div",
|
|
84
85
|
{
|
|
85
86
|
"data-slot": "sidebar-wrapper",
|
|
@@ -92,10 +93,10 @@ function SidebarProvider({
|
|
|
92
93
|
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
93
94
|
className
|
|
94
95
|
),
|
|
95
|
-
...props
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
)));
|
|
96
|
+
...props,
|
|
97
|
+
children
|
|
98
|
+
}
|
|
99
|
+
) }) });
|
|
99
100
|
}
|
|
100
101
|
function Sidebar({
|
|
101
102
|
side = "left",
|
|
@@ -107,7 +108,7 @@ function Sidebar({
|
|
|
107
108
|
}) {
|
|
108
109
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
109
110
|
if (collapsible === "none") {
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
111
112
|
"div",
|
|
112
113
|
{
|
|
113
114
|
"data-slot": "sidebar",
|
|
@@ -115,13 +116,13 @@ function Sidebar({
|
|
|
115
116
|
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
116
117
|
className
|
|
117
118
|
),
|
|
118
|
-
...props
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
...props,
|
|
120
|
+
children
|
|
121
|
+
}
|
|
121
122
|
);
|
|
122
123
|
}
|
|
123
124
|
if (isMobile) {
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
|
|
125
126
|
SheetContent,
|
|
126
127
|
{
|
|
127
128
|
"data-sidebar": "sidebar",
|
|
@@ -131,13 +132,18 @@ function Sidebar({
|
|
|
131
132
|
style: {
|
|
132
133
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
133
134
|
},
|
|
134
|
-
side
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
side,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
|
|
138
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
|
|
139
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
140
|
+
] }),
|
|
141
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
) });
|
|
139
145
|
}
|
|
140
|
-
return /* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ jsxs(
|
|
141
147
|
"div",
|
|
142
148
|
{
|
|
143
149
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -145,43 +151,45 @@ function Sidebar({
|
|
|
145
151
|
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
146
152
|
"data-variant": variant,
|
|
147
153
|
"data-side": side,
|
|
148
|
-
"data-slot": "sidebar"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
),
|
|
162
|
-
/* @__PURE__ */ React.createElement(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
"data-slot": "sidebar-container",
|
|
166
|
-
className: cn(
|
|
167
|
-
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
168
|
-
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
169
|
-
// Adjust the padding for floating and inset variants.
|
|
170
|
-
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
171
|
-
className
|
|
154
|
+
"data-slot": "sidebar",
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ jsx(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
"data-slot": "sidebar-gap",
|
|
160
|
+
className: cn(
|
|
161
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
162
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
163
|
+
"group-data-[side=right]:rotate-180",
|
|
164
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
165
|
+
)
|
|
166
|
+
}
|
|
172
167
|
),
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
168
|
+
/* @__PURE__ */ jsx(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "sidebar-container",
|
|
172
|
+
className: cn(
|
|
173
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
174
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
175
|
+
// Adjust the padding for floating and inset variants.
|
|
176
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
177
|
+
className
|
|
178
|
+
),
|
|
179
|
+
...props,
|
|
180
|
+
children: /* @__PURE__ */ jsx(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
"data-sidebar": "sidebar",
|
|
184
|
+
"data-slot": "sidebar-inner",
|
|
185
|
+
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
186
|
+
children
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
]
|
|
192
|
+
}
|
|
185
193
|
);
|
|
186
194
|
}
|
|
187
195
|
function SidebarTrigger({
|
|
@@ -190,7 +198,7 @@ function SidebarTrigger({
|
|
|
190
198
|
...props
|
|
191
199
|
}) {
|
|
192
200
|
const { toggleSidebar } = useSidebar();
|
|
193
|
-
return /* @__PURE__ */
|
|
201
|
+
return /* @__PURE__ */ jsxs(
|
|
194
202
|
Button,
|
|
195
203
|
{
|
|
196
204
|
"data-sidebar": "trigger",
|
|
@@ -202,15 +210,17 @@ function SidebarTrigger({
|
|
|
202
210
|
onClick?.(event);
|
|
203
211
|
toggleSidebar();
|
|
204
212
|
},
|
|
205
|
-
...props
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
...props,
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ jsx(PanelLeftIcon, {}),
|
|
216
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
209
219
|
);
|
|
210
220
|
}
|
|
211
221
|
function SidebarRail({ className, ...props }) {
|
|
212
222
|
const { toggleSidebar } = useSidebar();
|
|
213
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ jsx(
|
|
214
224
|
"button",
|
|
215
225
|
{
|
|
216
226
|
"data-sidebar": "rail",
|
|
@@ -233,7 +243,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
233
243
|
);
|
|
234
244
|
}
|
|
235
245
|
function SidebarInset({ className, ...props }) {
|
|
236
|
-
return /* @__PURE__ */
|
|
246
|
+
return /* @__PURE__ */ jsx(
|
|
237
247
|
"main",
|
|
238
248
|
{
|
|
239
249
|
"data-slot": "sidebar-inset",
|
|
@@ -251,7 +261,7 @@ function SidebarInput({
|
|
|
251
261
|
className,
|
|
252
262
|
...props
|
|
253
263
|
}) {
|
|
254
|
-
return /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ jsx(
|
|
255
265
|
Input,
|
|
256
266
|
{
|
|
257
267
|
"data-slot": "sidebar-input",
|
|
@@ -262,7 +272,7 @@ function SidebarInput({
|
|
|
262
272
|
);
|
|
263
273
|
}
|
|
264
274
|
function SidebarHeader({ className, ...props }) {
|
|
265
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ jsx(
|
|
266
276
|
"div",
|
|
267
277
|
{
|
|
268
278
|
"data-slot": "sidebar-header",
|
|
@@ -273,7 +283,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
273
283
|
);
|
|
274
284
|
}
|
|
275
285
|
function SidebarFooter({ className, ...props }) {
|
|
276
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ jsx(
|
|
277
287
|
"div",
|
|
278
288
|
{
|
|
279
289
|
"data-slot": "sidebar-footer",
|
|
@@ -287,7 +297,7 @@ function SidebarSeparator({
|
|
|
287
297
|
className,
|
|
288
298
|
...props
|
|
289
299
|
}) {
|
|
290
|
-
return /* @__PURE__ */
|
|
300
|
+
return /* @__PURE__ */ jsx(
|
|
291
301
|
Separator,
|
|
292
302
|
{
|
|
293
303
|
"data-slot": "sidebar-separator",
|
|
@@ -298,7 +308,7 @@ function SidebarSeparator({
|
|
|
298
308
|
);
|
|
299
309
|
}
|
|
300
310
|
function SidebarContent({ className, ...props }) {
|
|
301
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ jsx(
|
|
302
312
|
"div",
|
|
303
313
|
{
|
|
304
314
|
"data-slot": "sidebar-content",
|
|
@@ -312,7 +322,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
312
322
|
);
|
|
313
323
|
}
|
|
314
324
|
function SidebarGroup({ className, ...props }) {
|
|
315
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsx(
|
|
316
326
|
"div",
|
|
317
327
|
{
|
|
318
328
|
"data-slot": "sidebar-group",
|
|
@@ -328,7 +338,7 @@ function SidebarGroupLabel({
|
|
|
328
338
|
...props
|
|
329
339
|
}) {
|
|
330
340
|
const Comp = asChild ? Slot : "div";
|
|
331
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ jsx(
|
|
332
342
|
Comp,
|
|
333
343
|
{
|
|
334
344
|
"data-slot": "sidebar-group-label",
|
|
@@ -348,7 +358,7 @@ function SidebarGroupAction({
|
|
|
348
358
|
...props
|
|
349
359
|
}) {
|
|
350
360
|
const Comp = asChild ? Slot : "button";
|
|
351
|
-
return /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ jsx(
|
|
352
362
|
Comp,
|
|
353
363
|
{
|
|
354
364
|
"data-slot": "sidebar-group-action",
|
|
@@ -368,7 +378,7 @@ function SidebarGroupContent({
|
|
|
368
378
|
className,
|
|
369
379
|
...props
|
|
370
380
|
}) {
|
|
371
|
-
return /* @__PURE__ */
|
|
381
|
+
return /* @__PURE__ */ jsx(
|
|
372
382
|
"div",
|
|
373
383
|
{
|
|
374
384
|
"data-slot": "sidebar-group-content",
|
|
@@ -379,7 +389,7 @@ function SidebarGroupContent({
|
|
|
379
389
|
);
|
|
380
390
|
}
|
|
381
391
|
function SidebarMenu({ className, ...props }) {
|
|
382
|
-
return /* @__PURE__ */
|
|
392
|
+
return /* @__PURE__ */ jsx(
|
|
383
393
|
"ul",
|
|
384
394
|
{
|
|
385
395
|
"data-slot": "sidebar-menu",
|
|
@@ -390,7 +400,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
390
400
|
);
|
|
391
401
|
}
|
|
392
402
|
function SidebarMenuItem({ className, ...props }) {
|
|
393
|
-
return /* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ jsx(
|
|
394
404
|
"li",
|
|
395
405
|
{
|
|
396
406
|
"data-slot": "sidebar-menu-item",
|
|
@@ -432,7 +442,7 @@ function SidebarMenuButton({
|
|
|
432
442
|
}) {
|
|
433
443
|
const Comp = asChild ? Slot : "button";
|
|
434
444
|
const { isMobile, state } = useSidebar();
|
|
435
|
-
const button = /* @__PURE__ */
|
|
445
|
+
const button = /* @__PURE__ */ jsx(
|
|
436
446
|
Comp,
|
|
437
447
|
{
|
|
438
448
|
"data-slot": "sidebar-menu-button",
|
|
@@ -455,15 +465,18 @@ function SidebarMenuButton({
|
|
|
455
465
|
children: tooltip
|
|
456
466
|
};
|
|
457
467
|
}
|
|
458
|
-
return /* @__PURE__ */
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
468
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
469
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
470
|
+
/* @__PURE__ */ jsx(
|
|
471
|
+
TooltipContent,
|
|
472
|
+
{
|
|
473
|
+
side: "right",
|
|
474
|
+
align: "center",
|
|
475
|
+
hidden: state !== "collapsed" || isMobile,
|
|
476
|
+
...tooltip
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
] });
|
|
467
480
|
}
|
|
468
481
|
function SidebarMenuAction({
|
|
469
482
|
className,
|
|
@@ -472,7 +485,7 @@ function SidebarMenuAction({
|
|
|
472
485
|
...props
|
|
473
486
|
}) {
|
|
474
487
|
const Comp = asChild ? Slot : "button";
|
|
475
|
-
return /* @__PURE__ */
|
|
488
|
+
return /* @__PURE__ */ jsx(
|
|
476
489
|
Comp,
|
|
477
490
|
{
|
|
478
491
|
"data-slot": "sidebar-menu-action",
|
|
@@ -496,7 +509,7 @@ function SidebarMenuBadge({
|
|
|
496
509
|
className,
|
|
497
510
|
...props
|
|
498
511
|
}) {
|
|
499
|
-
return /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ jsx(
|
|
500
513
|
"div",
|
|
501
514
|
{
|
|
502
515
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -523,35 +536,37 @@ function SidebarMenuSkeleton({
|
|
|
523
536
|
React.useEffect(() => {
|
|
524
537
|
setWidth(`${Math.floor(Math.random() * 40) + 50}%`);
|
|
525
538
|
}, []);
|
|
526
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ jsxs(
|
|
527
540
|
"div",
|
|
528
541
|
{
|
|
529
542
|
"data-slot": "sidebar-menu-skeleton",
|
|
530
543
|
"data-sidebar": "menu-skeleton",
|
|
531
544
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
532
|
-
...props
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
545
|
+
...props,
|
|
546
|
+
children: [
|
|
547
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
548
|
+
Skeleton,
|
|
549
|
+
{
|
|
550
|
+
className: "size-4 rounded-md",
|
|
551
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
/* @__PURE__ */ jsx(
|
|
555
|
+
Skeleton,
|
|
556
|
+
{
|
|
557
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
558
|
+
"data-sidebar": "menu-skeleton-text",
|
|
559
|
+
style: {
|
|
560
|
+
"--skeleton-width": width
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
]
|
|
565
|
+
}
|
|
551
566
|
);
|
|
552
567
|
}
|
|
553
568
|
function SidebarMenuSub({ className, ...props }) {
|
|
554
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ jsx(
|
|
555
570
|
"ul",
|
|
556
571
|
{
|
|
557
572
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -569,7 +584,7 @@ function SidebarMenuSubItem({
|
|
|
569
584
|
className,
|
|
570
585
|
...props
|
|
571
586
|
}) {
|
|
572
|
-
return /* @__PURE__ */
|
|
587
|
+
return /* @__PURE__ */ jsx(
|
|
573
588
|
"li",
|
|
574
589
|
{
|
|
575
590
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -587,7 +602,7 @@ function SidebarMenuSubButton({
|
|
|
587
602
|
...props
|
|
588
603
|
}) {
|
|
589
604
|
const Comp = asChild ? Slot : "a";
|
|
590
|
-
return /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ jsx(
|
|
591
606
|
Comp,
|
|
592
607
|
{
|
|
593
608
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'ua-parser-js';
|
|
3
4
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
4
5
|
import 'next/navigation';
|
|
5
6
|
|
|
6
7
|
function Skeleton({ className, ...props }) {
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
8
9
|
"div",
|
|
9
10
|
{
|
|
10
11
|
"data-slot": "skeleton",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Loader2Icon } from 'lucide-react';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'ua-parser-js';
|
|
@@ -5,7 +6,7 @@ import { cn } from '../../../applications/shadcn/utils.js';
|
|
|
5
6
|
import 'next/navigation';
|
|
6
7
|
|
|
7
8
|
function Spinner({ className, ...props }) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
9
10
|
Loader2Icon,
|
|
10
11
|
{
|
|
11
12
|
role: "status",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import 'react';
|
|
2
3
|
import 'ua-parser-js';
|
|
3
4
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
4
5
|
import 'next/navigation';
|
|
5
6
|
|
|
6
7
|
function Textarea({ className, ...props }) {
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
8
9
|
"textarea",
|
|
9
10
|
{
|
|
10
11
|
"data-slot": "textarea",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
-
import
|
|
4
|
+
import 'react';
|
|
4
5
|
import 'ua-parser-js';
|
|
5
6
|
import { cn } from '../../../applications/shadcn/utils.js';
|
|
6
7
|
import 'next/navigation';
|
|
@@ -9,7 +10,7 @@ function TooltipProvider({
|
|
|
9
10
|
delayDuration = 0,
|
|
10
11
|
...props
|
|
11
12
|
}) {
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
13
14
|
TooltipPrimitive.Provider,
|
|
14
15
|
{
|
|
15
16
|
"data-slot": "tooltip-provider",
|
|
@@ -21,12 +22,12 @@ function TooltipProvider({
|
|
|
21
22
|
function Tooltip({
|
|
22
23
|
...props
|
|
23
24
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
25
26
|
}
|
|
26
27
|
function TooltipTrigger({
|
|
27
28
|
...props
|
|
28
29
|
}) {
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
30
31
|
}
|
|
31
32
|
function TooltipContent({
|
|
32
33
|
className,
|
|
@@ -34,7 +35,7 @@ function TooltipContent({
|
|
|
34
35
|
children,
|
|
35
36
|
...props
|
|
36
37
|
}) {
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
38
39
|
TooltipPrimitive.Content,
|
|
39
40
|
{
|
|
40
41
|
"data-slot": "tooltip-content",
|
|
@@ -43,11 +44,13 @@ function TooltipContent({
|
|
|
43
44
|
"bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
44
45
|
className
|
|
45
46
|
),
|
|
46
|
-
...props
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
...props,
|
|
48
|
+
children: [
|
|
49
|
+
children,
|
|
50
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
) });
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import { useTranslator } from 'intor/react';
|
|
3
4
|
import { useEffect } from 'react';
|
|
4
5
|
import '@radix-ui/react-avatar';
|
|
@@ -43,29 +44,40 @@ function ListCardsContainer({
|
|
|
43
44
|
useEffect(() => {
|
|
44
45
|
setPage(1);
|
|
45
46
|
}, [searchString, setPage]);
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col gap-6", children: [
|
|
48
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
49
|
+
headerChildren,
|
|
50
|
+
/* @__PURE__ */ jsx("div", { className: "ml-auto w-64", children: /* @__PURE__ */ jsx(
|
|
51
|
+
SearchInput,
|
|
52
|
+
{
|
|
53
|
+
searchString,
|
|
54
|
+
setSearchString,
|
|
55
|
+
isLoading: isFetching
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-[88%] flex-1 overflow-y-auto", children: isFetching ? /* @__PURE__ */ jsx(Spinner, {}) : isNotFound ? /* @__PURE__ */ jsx("p", { className: "text-sm opacity-50", children: t("ui.no-data.text") }) : /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-4", children }) }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("div", { className: "w-52" }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Pagination,
|
|
64
|
+
{
|
|
65
|
+
page,
|
|
66
|
+
setPage,
|
|
67
|
+
pageSize,
|
|
68
|
+
total
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
PageSizeSelector,
|
|
73
|
+
{
|
|
74
|
+
pageSize,
|
|
75
|
+
setPageSize,
|
|
76
|
+
setPage
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
69
81
|
}
|
|
70
82
|
|
|
71
83
|
export { ListCardsContainer };
|
package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { useTranslator } from 'intor/react';
|
|
2
3
|
import 'lucide-react';
|
|
3
4
|
import 'react';
|
|
@@ -24,20 +25,25 @@ function PageSizeSelector({
|
|
|
24
25
|
setPage
|
|
25
26
|
}) {
|
|
26
27
|
const { t } = useTranslator();
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-52 items-center gap-4", children: [
|
|
29
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm whitespace-nowrap", children: t("ui.layout.item-list-container.items-per-page.text") }),
|
|
30
|
+
/* @__PURE__ */ jsxs(
|
|
31
|
+
Select,
|
|
32
|
+
{
|
|
33
|
+
value: String(pageSize),
|
|
34
|
+
onValueChange: (value) => {
|
|
35
|
+
setPageSize(Number(value ?? 20));
|
|
36
|
+
setPage(1);
|
|
37
|
+
},
|
|
38
|
+
className: "w-full",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(Option, { value: String(20), children: "20" }),
|
|
41
|
+
/* @__PURE__ */ jsx(Option, { value: String(40), children: "40" }),
|
|
42
|
+
/* @__PURE__ */ jsx(Option, { value: String(80), children: "80" })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] });
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
export { PageSizeSelector };
|