@goplusvn/core 0.1.1 → 0.1.3
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/package.json +31 -175
- package/dist/audit/index.d.mts +0 -115
- package/dist/audit/index.d.ts +0 -115
- package/dist/audit/index.js +0 -204
- package/dist/audit/index.js.map +0 -1
- package/dist/audit/index.mjs +0 -200
- package/dist/audit/index.mjs.map +0 -1
- package/dist/auth/index.d.mts +0 -86
- package/dist/auth/index.d.ts +0 -86
- package/dist/auth/index.js +0 -210
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/index.mjs +0 -198
- package/dist/auth/index.mjs.map +0 -1
- package/dist/button-1dWvP9Ib.d.mts +0 -30
- package/dist/button-1dWvP9Ib.d.ts +0 -30
- package/dist/calendar-2QzdEo1z.d.mts +0 -20
- package/dist/calendar-2QzdEo1z.d.ts +0 -20
- package/dist/code-generation/index.d.mts +0 -30
- package/dist/code-generation/index.d.ts +0 -30
- package/dist/code-generation/index.js +0 -31
- package/dist/code-generation/index.js.map +0 -1
- package/dist/code-generation/index.mjs +0 -28
- package/dist/code-generation/index.mjs.map +0 -1
- package/dist/configs/index.d.mts +0 -175
- package/dist/configs/index.d.ts +0 -175
- package/dist/configs/index.js +0 -254
- package/dist/configs/index.js.map +0 -1
- package/dist/configs/index.mjs +0 -233
- package/dist/configs/index.mjs.map +0 -1
- package/dist/crud/index.d.mts +0 -646
- package/dist/crud/index.d.ts +0 -646
- package/dist/crud/index.js +0 -11772
- package/dist/crud/index.js.map +0 -1
- package/dist/crud/index.mjs +0 -11665
- package/dist/crud/index.mjs.map +0 -1
- package/dist/crud/server.d.mts +0 -20
- package/dist/crud/server.d.ts +0 -20
- package/dist/crud/server.js +0 -123
- package/dist/crud/server.js.map +0 -1
- package/dist/crud/server.mjs +0 -120
- package/dist/crud/server.mjs.map +0 -1
- package/dist/data-table-skeleton-12NA8Mjx.d.mts +0 -39
- package/dist/data-table-skeleton-12NA8Mjx.d.ts +0 -39
- package/dist/dialog-bKfjZMTd.d.mts +0 -22
- package/dist/dialog-bKfjZMTd.d.ts +0 -22
- package/dist/dynamic-icon-DrGIiu2N.d.mts +0 -10
- package/dist/dynamic-icon-DrGIiu2N.d.ts +0 -10
- package/dist/home/index.d.mts +0 -269
- package/dist/home/index.d.ts +0 -269
- package/dist/home/index.js +0 -1678
- package/dist/home/index.js.map +0 -1
- package/dist/home/index.mjs +0 -1635
- package/dist/home/index.mjs.map +0 -1
- package/dist/hooks/index.d.mts +0 -7
- package/dist/hooks/index.d.ts +0 -7
- package/dist/hooks/index.js +0 -8316
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -8255
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/index-50hpiPrV.d.ts +0 -116
- package/dist/index-B9zQVEVi.d.mts +0 -116
- package/dist/index.d.mts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -123
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -118
- package/dist/index.mjs.map +0 -1
- package/dist/infrastructure/index.d.mts +0 -423
- package/dist/infrastructure/index.d.ts +0 -423
- package/dist/infrastructure/index.js +0 -633
- package/dist/infrastructure/index.js.map +0 -1
- package/dist/infrastructure/index.mjs +0 -619
- package/dist/infrastructure/index.mjs.map +0 -1
- package/dist/label-DWTEkNPo.d.ts +0 -226
- package/dist/label-LPpdcoBx.d.mts +0 -226
- package/dist/layout/index.d.mts +0 -48
- package/dist/layout/index.d.ts +0 -48
- package/dist/layout/index.js +0 -117
- package/dist/layout/index.js.map +0 -1
- package/dist/layout/index.mjs +0 -90
- package/dist/layout/index.mjs.map +0 -1
- package/dist/navigation/index.d.mts +0 -16
- package/dist/navigation/index.d.ts +0 -16
- package/dist/navigation/index.js +0 -53
- package/dist/navigation/index.js.map +0 -1
- package/dist/navigation/index.mjs +0 -50
- package/dist/navigation/index.mjs.map +0 -1
- package/dist/notification/index.d.mts +0 -105
- package/dist/notification/index.d.ts +0 -105
- package/dist/notification/index.js +0 -278
- package/dist/notification/index.js.map +0 -1
- package/dist/notification/index.mjs +0 -274
- package/dist/notification/index.mjs.map +0 -1
- package/dist/organization/index.d.mts +0 -99
- package/dist/organization/index.d.ts +0 -99
- package/dist/organization/index.js +0 -360
- package/dist/organization/index.js.map +0 -1
- package/dist/organization/index.mjs +0 -352
- package/dist/organization/index.mjs.map +0 -1
- package/dist/plugin/index.d.mts +0 -83
- package/dist/plugin/index.d.ts +0 -83
- package/dist/plugin/index.js +0 -86
- package/dist/plugin/index.js.map +0 -1
- package/dist/plugin/index.mjs +0 -84
- package/dist/plugin/index.mjs.map +0 -1
- package/dist/providers/index.d.mts +0 -25
- package/dist/providers/index.d.ts +0 -25
- package/dist/providers/index.js +0 -84
- package/dist/providers/index.js.map +0 -1
- package/dist/providers/index.mjs +0 -77
- package/dist/providers/index.mjs.map +0 -1
- package/dist/rbac/index.d.mts +0 -226
- package/dist/rbac/index.d.ts +0 -226
- package/dist/rbac/index.js +0 -4784
- package/dist/rbac/index.js.map +0 -1
- package/dist/rbac/index.mjs +0 -4722
- package/dist/rbac/index.mjs.map +0 -1
- package/dist/rbac/permissions.d.mts +0 -26
- package/dist/rbac/permissions.d.ts +0 -26
- package/dist/rbac/permissions.js +0 -94
- package/dist/rbac/permissions.js.map +0 -1
- package/dist/rbac/permissions.mjs +0 -90
- package/dist/rbac/permissions.mjs.map +0 -1
- package/dist/rbac/server.d.mts +0 -1
- package/dist/rbac/server.d.ts +0 -1
- package/dist/rbac/server.js +0 -128
- package/dist/rbac/server.js.map +0 -1
- package/dist/rbac/server.mjs +0 -124
- package/dist/rbac/server.mjs.map +0 -1
- package/dist/schemas/index.d.mts +0 -1257
- package/dist/schemas/index.d.ts +0 -1257
- package/dist/schemas/index.js +0 -572
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/index.mjs +0 -523
- package/dist/schemas/index.mjs.map +0 -1
- package/dist/server-QuYCTa89.d.mts +0 -83
- package/dist/server-QuYCTa89.d.ts +0 -83
- package/dist/sonner-C74GlRDQ.d.mts +0 -71
- package/dist/sonner-C74GlRDQ.d.ts +0 -71
- package/dist/status-BOXZgIqX.d.mts +0 -12
- package/dist/status-BOXZgIqX.d.ts +0 -12
- package/dist/system/index.d.mts +0 -77
- package/dist/system/index.d.ts +0 -77
- package/dist/system/index.js +0 -102
- package/dist/system/index.js.map +0 -1
- package/dist/system/index.mjs +0 -100
- package/dist/system/index.mjs.map +0 -1
- package/dist/tabs-C6FfBwPY.d.mts +0 -18
- package/dist/tabs-C6FfBwPY.d.ts +0 -18
- package/dist/tenant-provider-B8eC_Wpb.d.mts +0 -27
- package/dist/tenant-provider-B8eC_Wpb.d.ts +0 -27
- package/dist/types/index.d.mts +0 -469
- package/dist/types/index.d.ts +0 -469
- package/dist/types/index.js +0 -25
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -21
- package/dist/types/index.mjs.map +0 -1
- package/dist/ui/auth.d.mts +0 -39
- package/dist/ui/auth.d.ts +0 -39
- package/dist/ui/auth.js +0 -4941
- package/dist/ui/auth.js.map +0 -1
- package/dist/ui/auth.mjs +0 -4896
- package/dist/ui/auth.mjs.map +0 -1
- package/dist/ui/crud.d.mts +0 -2
- package/dist/ui/crud.d.ts +0 -2
- package/dist/ui/crud.js +0 -4
- package/dist/ui/crud.js.map +0 -1
- package/dist/ui/crud.mjs +0 -3
- package/dist/ui/crud.mjs.map +0 -1
- package/dist/ui/data-display.d.mts +0 -596
- package/dist/ui/data-display.d.ts +0 -596
- package/dist/ui/data-display.js +0 -5307
- package/dist/ui/data-display.js.map +0 -1
- package/dist/ui/data-display.mjs +0 -5212
- package/dist/ui/data-display.mjs.map +0 -1
- package/dist/ui/feedback.d.mts +0 -55
- package/dist/ui/feedback.d.ts +0 -55
- package/dist/ui/feedback.js +0 -2608
- package/dist/ui/feedback.js.map +0 -1
- package/dist/ui/feedback.mjs +0 -2526
- package/dist/ui/feedback.mjs.map +0 -1
- package/dist/ui/forms.d.mts +0 -309
- package/dist/ui/forms.d.ts +0 -309
- package/dist/ui/forms.js +0 -4656
- package/dist/ui/forms.js.map +0 -1
- package/dist/ui/forms.mjs +0 -4571
- package/dist/ui/forms.mjs.map +0 -1
- package/dist/ui/index.d.mts +0 -331
- package/dist/ui/index.d.ts +0 -331
- package/dist/ui/index.js +0 -16953
- package/dist/ui/index.js.map +0 -1
- package/dist/ui/index.mjs +0 -16598
- package/dist/ui/index.mjs.map +0 -1
- package/dist/ui/primitives/client.d.mts +0 -61
- package/dist/ui/primitives/client.d.ts +0 -61
- package/dist/ui/primitives/client.js +0 -3408
- package/dist/ui/primitives/client.js.map +0 -1
- package/dist/ui/primitives/client.mjs +0 -3256
- package/dist/ui/primitives/client.mjs.map +0 -1
- package/dist/ui/primitives.d.mts +0 -113
- package/dist/ui/primitives.d.ts +0 -113
- package/dist/ui/primitives.js +0 -3356
- package/dist/ui/primitives.js.map +0 -1
- package/dist/ui/primitives.mjs +0 -3227
- package/dist/ui/primitives.mjs.map +0 -1
- package/dist/user/index.d.mts +0 -228
- package/dist/user/index.d.ts +0 -228
- package/dist/user/index.js +0 -4306
- package/dist/user/index.js.map +0 -1
- package/dist/user/index.mjs +0 -4260
- package/dist/user/index.mjs.map +0 -1
- package/dist/utils/index.d.mts +0 -205
- package/dist/utils/index.d.ts +0 -205
- package/dist/utils/index.js +0 -574
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -514
- package/dist/utils/index.mjs.map +0 -1
- package/dist/workflow/index.d.mts +0 -40
- package/dist/workflow/index.d.ts +0 -40
- package/dist/workflow/index.js +0 -3710
- package/dist/workflow/index.js.map +0 -1
- package/dist/workflow/index.mjs +0 -3677
- package/dist/workflow/index.mjs.map +0 -1
|
@@ -1,3408 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var clsx = require('clsx');
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var React6 = require('react');
|
|
6
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
7
|
-
var reactSlot = require('@radix-ui/react-slot');
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
-
var lucideReact = require('lucide-react');
|
|
10
|
-
var reactDayPicker = require('react-day-picker');
|
|
11
|
-
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
12
|
-
var SelectPrimitive = require('@radix-ui/react-select');
|
|
13
|
-
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
14
|
-
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
15
|
-
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
16
|
-
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
17
|
-
var LabelPrimitive = require('@radix-ui/react-label');
|
|
18
|
-
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
19
|
-
require('react-use');
|
|
20
|
-
require('@radix-ui/react-direction');
|
|
21
|
-
var ResizablePrimitive = require('react-resizable-panels');
|
|
22
|
-
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
23
|
-
var MenubarPrimitive = require('@radix-ui/react-menubar');
|
|
24
|
-
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
25
|
-
var TogglePrimitive = require('@radix-ui/react-toggle');
|
|
26
|
-
var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
|
|
27
|
-
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
28
|
-
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
29
|
-
var ContextMenuPrimitive = require('@radix-ui/react-context-menu');
|
|
30
|
-
var vaul = require('vaul');
|
|
31
|
-
var sonner = require('sonner');
|
|
32
|
-
require('@radix-ui/react-alert-dialog');
|
|
33
|
-
var navigation = require('next/navigation');
|
|
34
|
-
var Link2 = require('next/link');
|
|
35
|
-
|
|
36
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
37
|
-
|
|
38
|
-
function _interopNamespace(e) {
|
|
39
|
-
if (e && e.__esModule) return e;
|
|
40
|
-
var n = Object.create(null);
|
|
41
|
-
if (e) {
|
|
42
|
-
Object.keys(e).forEach(function (k) {
|
|
43
|
-
if (k !== 'default') {
|
|
44
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
45
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
46
|
-
enumerable: true,
|
|
47
|
-
get: function () { return e[k]; }
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
n.default = e;
|
|
53
|
-
return Object.freeze(n);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
57
|
-
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
58
|
-
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
59
|
-
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
60
|
-
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
61
|
-
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
62
|
-
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
63
|
-
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
64
|
-
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
65
|
-
var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
|
|
66
|
-
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
67
|
-
var MenubarPrimitive__namespace = /*#__PURE__*/_interopNamespace(MenubarPrimitive);
|
|
68
|
-
var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
|
|
69
|
-
var TogglePrimitive__namespace = /*#__PURE__*/_interopNamespace(TogglePrimitive);
|
|
70
|
-
var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
|
|
71
|
-
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
72
|
-
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
73
|
-
var ContextMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(ContextMenuPrimitive);
|
|
74
|
-
var Link2__default = /*#__PURE__*/_interopDefault(Link2);
|
|
75
|
-
|
|
76
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
77
|
-
var __esm = (fn, res) => function __init() {
|
|
78
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
79
|
-
};
|
|
80
|
-
function cn(...inputs) {
|
|
81
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
82
|
-
}
|
|
83
|
-
var Logger;
|
|
84
|
-
var init_utils = __esm({
|
|
85
|
-
"src/utils/index.ts"() {
|
|
86
|
-
Logger = class {
|
|
87
|
-
log(level, message, context, error) {
|
|
88
|
-
const entry = {
|
|
89
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
90
|
-
level,
|
|
91
|
-
message,
|
|
92
|
-
context
|
|
93
|
-
};
|
|
94
|
-
if (error instanceof Error) {
|
|
95
|
-
entry.error = {
|
|
96
|
-
name: error.name,
|
|
97
|
-
message: error.message,
|
|
98
|
-
stack: error.stack
|
|
99
|
-
};
|
|
100
|
-
} else if (error) {
|
|
101
|
-
entry.error = error;
|
|
102
|
-
}
|
|
103
|
-
const logString = JSON.stringify(entry);
|
|
104
|
-
switch (level) {
|
|
105
|
-
case "error":
|
|
106
|
-
console.error(logString);
|
|
107
|
-
break;
|
|
108
|
-
case "warn":
|
|
109
|
-
console.warn(logString);
|
|
110
|
-
break;
|
|
111
|
-
case "debug":
|
|
112
|
-
if (process.env.NODE_ENV === "development") console.debug(logString);
|
|
113
|
-
break;
|
|
114
|
-
default:
|
|
115
|
-
console.log(logString);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
info(message, context) {
|
|
119
|
-
this.log("info", message, context);
|
|
120
|
-
}
|
|
121
|
-
warn(message, context) {
|
|
122
|
-
this.log("warn", message, context);
|
|
123
|
-
}
|
|
124
|
-
error(message, error, context) {
|
|
125
|
-
this.log("error", message, context, error);
|
|
126
|
-
}
|
|
127
|
-
debug(message, context) {
|
|
128
|
-
this.log("debug", message, context);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
new Logger();
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
var buttonVariants, Button;
|
|
135
|
-
var init_button = __esm({
|
|
136
|
-
"src/ui/primitives/button.tsx"() {
|
|
137
|
-
init_utils();
|
|
138
|
-
buttonVariants = classVarianceAuthority.cva(
|
|
139
|
-
"inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
140
|
-
{
|
|
141
|
-
variants: {
|
|
142
|
-
variant: {
|
|
143
|
-
// Existing variants (backwards-compatible)
|
|
144
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
145
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
146
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
147
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
148
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
149
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
150
|
-
// New Plane-inspired variants using semantic tokens
|
|
151
|
-
accent: "bg-accent-primary text-text-on-color hover:bg-accent-primary-hover active:bg-accent-primary-active disabled:bg-layer-disabled disabled:text-text-disabled",
|
|
152
|
-
danger: "bg-danger text-text-on-color hover:bg-danger-hover active:bg-danger-hover disabled:bg-layer-disabled disabled:text-text-disabled",
|
|
153
|
-
"danger-outline": "border border-danger bg-layer-2 text-danger-text hover:bg-danger-subtle active:bg-danger-subtle disabled:border-border-subtle disabled:bg-layer-2 disabled:text-text-disabled",
|
|
154
|
-
success: "bg-success-semantic text-text-on-color hover:bg-success-semantic/90 active:bg-success-semantic/80 disabled:bg-layer-disabled disabled:text-text-disabled",
|
|
155
|
-
tertiary: "bg-layer-3 text-text-secondary hover:bg-layer-3-hover active:bg-layer-3-hover disabled:bg-transparent disabled:text-text-disabled"
|
|
156
|
-
},
|
|
157
|
-
size: {
|
|
158
|
-
// Existing sizes (backwards-compatible)
|
|
159
|
-
default: "h-10 px-4 py-2",
|
|
160
|
-
sm: "h-9 rounded-md px-3",
|
|
161
|
-
lg: "h-11 rounded-md px-8",
|
|
162
|
-
icon: "h-10 w-10",
|
|
163
|
-
// New ERP-specific compact sizes
|
|
164
|
-
xs: "h-7 rounded-sm px-2 text-xs",
|
|
165
|
-
compact: "h-8 rounded-md px-3 text-xs",
|
|
166
|
-
"icon-sm": "h-8 w-8",
|
|
167
|
-
"icon-xs": "h-7 w-7"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
defaultVariants: {
|
|
171
|
-
variant: "default",
|
|
172
|
-
size: "default"
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
Button = React6__namespace.forwardRef(
|
|
177
|
-
({ className, variant, size, asChild = false, loading = false, prependIcon, appendIcon, children, disabled, ...props }, ref) => {
|
|
178
|
-
if (asChild) {
|
|
179
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
180
|
-
reactSlot.Slot,
|
|
181
|
-
{
|
|
182
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
183
|
-
ref,
|
|
184
|
-
...{ disabled: disabled || loading },
|
|
185
|
-
...props,
|
|
186
|
-
children: React6__namespace.isValidElement(children) && (prependIcon || appendIcon) ? React6__namespace.cloneElement(children, {}, /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
187
|
-
prependIcon && React6__namespace.cloneElement(prependIcon, {
|
|
188
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
189
|
-
}),
|
|
190
|
-
children.props.children,
|
|
191
|
-
appendIcon && React6__namespace.cloneElement(appendIcon, {
|
|
192
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
193
|
-
})
|
|
194
|
-
] })) : children
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
199
|
-
"button",
|
|
200
|
-
{
|
|
201
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
202
|
-
ref,
|
|
203
|
-
disabled: disabled || loading,
|
|
204
|
-
...props,
|
|
205
|
-
children: [
|
|
206
|
-
prependIcon && React6__namespace.cloneElement(prependIcon, {
|
|
207
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
208
|
-
}),
|
|
209
|
-
children,
|
|
210
|
-
appendIcon && React6__namespace.cloneElement(appendIcon, {
|
|
211
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
212
|
-
})
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
);
|
|
218
|
-
Button.displayName = "Button";
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
function Calendar({
|
|
222
|
-
className,
|
|
223
|
-
classNames,
|
|
224
|
-
showOutsideDays = true,
|
|
225
|
-
...props
|
|
226
|
-
}) {
|
|
227
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
228
|
-
reactDayPicker.DayPicker,
|
|
229
|
-
{
|
|
230
|
-
showOutsideDays,
|
|
231
|
-
className: cn("p-3", className),
|
|
232
|
-
classNames: {
|
|
233
|
-
month: "space-y-4",
|
|
234
|
-
month_caption: "flex justify-center pt-1 items-center",
|
|
235
|
-
caption_label: "text-sm font-medium",
|
|
236
|
-
nav: "relative gap-x-1 flex items-center",
|
|
237
|
-
button_previous: cn(
|
|
238
|
-
buttonVariants({ variant: "outline" }),
|
|
239
|
-
"absolute top-0 start-0 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
240
|
-
),
|
|
241
|
-
button_next: cn(
|
|
242
|
-
buttonVariants({ variant: "outline" }),
|
|
243
|
-
"absolute top-0 end-0 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
244
|
-
),
|
|
245
|
-
month_grid: "w-full border-collapse space-y-1",
|
|
246
|
-
weekdays: "flex",
|
|
247
|
-
weekday: "text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",
|
|
248
|
-
week: "flex w-full mt-2",
|
|
249
|
-
day: cn(
|
|
250
|
-
buttonVariants({ variant: "ghost" }),
|
|
251
|
-
"relative h-8 w-8 p-0 font-normal text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-e-md"
|
|
252
|
-
),
|
|
253
|
-
day_button: "cursor-pointer h-full w-full aria-selected:opacity-100",
|
|
254
|
-
range_start: "rounded-md!",
|
|
255
|
-
range_end: "rounded-md!",
|
|
256
|
-
selected: cn(
|
|
257
|
-
"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
258
|
-
props.mode === "range" && "rounded-none"
|
|
259
|
-
),
|
|
260
|
-
today: "bg-accent text-accent-foreground",
|
|
261
|
-
outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
262
|
-
disabled: "text-muted-foreground opacity-50",
|
|
263
|
-
range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
264
|
-
hidden: "invisible",
|
|
265
|
-
...classNames
|
|
266
|
-
},
|
|
267
|
-
components: {
|
|
268
|
-
Chevron: (props2) => {
|
|
269
|
-
if (props2.orientation === "left") {
|
|
270
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" });
|
|
271
|
-
}
|
|
272
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" });
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
...props
|
|
276
|
-
}
|
|
277
|
-
);
|
|
278
|
-
}
|
|
279
|
-
var init_calendar = __esm({
|
|
280
|
-
"src/ui/primitives/calendar.tsx"() {
|
|
281
|
-
"use client";
|
|
282
|
-
init_utils();
|
|
283
|
-
init_button();
|
|
284
|
-
Calendar.displayName = "Calendar";
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
var Input;
|
|
288
|
-
var init_input = __esm({
|
|
289
|
-
"src/ui/primitives/input.tsx"() {
|
|
290
|
-
init_utils();
|
|
291
|
-
Input = React6__namespace.forwardRef(
|
|
292
|
-
({ className, type, ...props }, ref) => {
|
|
293
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
294
|
-
"input",
|
|
295
|
-
{
|
|
296
|
-
type,
|
|
297
|
-
className: cn(
|
|
298
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
299
|
-
className
|
|
300
|
-
),
|
|
301
|
-
ref,
|
|
302
|
-
...props
|
|
303
|
-
}
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
);
|
|
307
|
-
Input.displayName = "Input";
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
function ScrollArea({
|
|
311
|
-
orientation,
|
|
312
|
-
className,
|
|
313
|
-
children,
|
|
314
|
-
...props
|
|
315
|
-
}) {
|
|
316
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
317
|
-
ScrollAreaPrimitive__namespace.Root,
|
|
318
|
-
{
|
|
319
|
-
"data-slot": "scroll-area",
|
|
320
|
-
className: cn("relative overflow-hidden", className),
|
|
321
|
-
...props,
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
324
|
-
ScrollAreaPrimitive__namespace.Viewport,
|
|
325
|
-
{
|
|
326
|
-
"data-slot": "scroll-area-viewport",
|
|
327
|
-
className: "h-full w-full rounded-[inherit]",
|
|
328
|
-
children
|
|
329
|
-
}
|
|
330
|
-
),
|
|
331
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation }),
|
|
332
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
333
|
-
]
|
|
334
|
-
}
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
function ScrollBar({
|
|
338
|
-
className,
|
|
339
|
-
orientation = "vertical",
|
|
340
|
-
...props
|
|
341
|
-
}) {
|
|
342
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
343
|
-
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
344
|
-
{
|
|
345
|
-
"data-slot": "scroll-area-scrollbar",
|
|
346
|
-
orientation,
|
|
347
|
-
className: cn(
|
|
348
|
-
"flex touch-none select-none transition-colors",
|
|
349
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
350
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
351
|
-
className
|
|
352
|
-
),
|
|
353
|
-
...props,
|
|
354
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
355
|
-
}
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
var init_scroll_area = __esm({
|
|
359
|
-
"src/ui/primitives/scroll-area.tsx"() {
|
|
360
|
-
"use client";
|
|
361
|
-
init_utils();
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
function Combobox({
|
|
365
|
-
options,
|
|
366
|
-
value,
|
|
367
|
-
onValueChange,
|
|
368
|
-
placeholder = "Select option...",
|
|
369
|
-
searchPlaceholder = "Search...",
|
|
370
|
-
emptyText = "No option found.",
|
|
371
|
-
disabled = false,
|
|
372
|
-
className,
|
|
373
|
-
id
|
|
374
|
-
}) {
|
|
375
|
-
const [open, setOpen] = React6.useState(false);
|
|
376
|
-
const [searchValue, setSearchValue] = React6.useState("");
|
|
377
|
-
const containerRef = React6.useRef(null);
|
|
378
|
-
const searchInputRef = React6.useRef(null);
|
|
379
|
-
const dropdownRef = React6.useRef(null);
|
|
380
|
-
const selectedOption = options.find(
|
|
381
|
-
(option) => String(option.value) === String(value)
|
|
382
|
-
);
|
|
383
|
-
const filteredOptions = React6.useMemo(() => {
|
|
384
|
-
if (!searchValue.trim()) {
|
|
385
|
-
return options;
|
|
386
|
-
}
|
|
387
|
-
const searchLower = searchValue.toLowerCase();
|
|
388
|
-
return options.filter(
|
|
389
|
-
(option) => option.label.toLowerCase().includes(searchLower) || String(option.value).toLowerCase().includes(searchLower)
|
|
390
|
-
);
|
|
391
|
-
}, [options, searchValue]);
|
|
392
|
-
React6.useEffect(() => {
|
|
393
|
-
if (!open) {
|
|
394
|
-
setSearchValue("");
|
|
395
|
-
}
|
|
396
|
-
}, [open]);
|
|
397
|
-
React6.useEffect(() => {
|
|
398
|
-
if (open && searchInputRef.current) {
|
|
399
|
-
setTimeout(() => {
|
|
400
|
-
searchInputRef.current?.focus();
|
|
401
|
-
}, 50);
|
|
402
|
-
}
|
|
403
|
-
}, [open]);
|
|
404
|
-
React6.useEffect(() => {
|
|
405
|
-
if (!open) return;
|
|
406
|
-
const handleClickOutside = (event) => {
|
|
407
|
-
const target = event.target;
|
|
408
|
-
if (containerRef.current && !containerRef.current.contains(target) && dropdownRef.current && !dropdownRef.current.contains(target)) {
|
|
409
|
-
if (target.closest('[data-slot="dialog-content"]')) {
|
|
410
|
-
return;
|
|
411
|
-
}
|
|
412
|
-
setOpen(false);
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
const handleEscape = (event) => {
|
|
416
|
-
if (event.key === "Escape" && open) {
|
|
417
|
-
event.stopPropagation();
|
|
418
|
-
setOpen(false);
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
document.addEventListener("mousedown", handleClickOutside, true);
|
|
422
|
-
document.addEventListener("keydown", handleEscape, true);
|
|
423
|
-
return () => {
|
|
424
|
-
document.removeEventListener("mousedown", handleClickOutside, true);
|
|
425
|
-
document.removeEventListener("keydown", handleEscape, true);
|
|
426
|
-
};
|
|
427
|
-
}, [open]);
|
|
428
|
-
const handleSelect = React6.useCallback(
|
|
429
|
-
(optionValue) => {
|
|
430
|
-
if (onValueChange) {
|
|
431
|
-
onValueChange(optionValue);
|
|
432
|
-
setOpen(false);
|
|
433
|
-
}
|
|
434
|
-
},
|
|
435
|
-
[onValueChange]
|
|
436
|
-
);
|
|
437
|
-
const handleClear = React6.useCallback(
|
|
438
|
-
(e) => {
|
|
439
|
-
e.preventDefault();
|
|
440
|
-
e.stopPropagation();
|
|
441
|
-
if (onValueChange) {
|
|
442
|
-
onValueChange(void 0);
|
|
443
|
-
}
|
|
444
|
-
},
|
|
445
|
-
[onValueChange]
|
|
446
|
-
);
|
|
447
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative w-full", children: [
|
|
448
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
449
|
-
Button,
|
|
450
|
-
{
|
|
451
|
-
type: "button",
|
|
452
|
-
variant: "outline",
|
|
453
|
-
role: "combobox",
|
|
454
|
-
"aria-expanded": open,
|
|
455
|
-
disabled,
|
|
456
|
-
className: cn("w-full justify-between", className),
|
|
457
|
-
id,
|
|
458
|
-
onClick: (e) => {
|
|
459
|
-
e.stopPropagation();
|
|
460
|
-
setOpen(!open);
|
|
461
|
-
},
|
|
462
|
-
children: [
|
|
463
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: selectedOption ? selectedOption.label : placeholder }),
|
|
464
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex items-center gap-1 shrink-0", children: [
|
|
465
|
-
selectedOption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
466
|
-
"div",
|
|
467
|
-
{
|
|
468
|
-
role: "button",
|
|
469
|
-
tabIndex: 0,
|
|
470
|
-
className: "h-4 w-4 p-0 hover:bg-transparent cursor-pointer flex items-center justify-center",
|
|
471
|
-
onClick: handleClear,
|
|
472
|
-
onKeyDown: (e) => {
|
|
473
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
474
|
-
e.preventDefault();
|
|
475
|
-
e.stopPropagation();
|
|
476
|
-
handleClear(e);
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3.5 w-3.5 text-red-500 hover:text-red-600" })
|
|
480
|
-
}
|
|
481
|
-
),
|
|
482
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "h-4 w-4 opacity-50" })
|
|
483
|
-
] })
|
|
484
|
-
]
|
|
485
|
-
}
|
|
486
|
-
),
|
|
487
|
-
open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
488
|
-
"div",
|
|
489
|
-
{
|
|
490
|
-
ref: dropdownRef,
|
|
491
|
-
className: "absolute z-[100] mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
492
|
-
style: {
|
|
493
|
-
top: "100%",
|
|
494
|
-
left: 0
|
|
495
|
-
},
|
|
496
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
497
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3 py-2", children: [
|
|
498
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
499
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
500
|
-
Input,
|
|
501
|
-
{
|
|
502
|
-
ref: searchInputRef,
|
|
503
|
-
placeholder: searchPlaceholder,
|
|
504
|
-
value: searchValue,
|
|
505
|
-
onChange: (e) => {
|
|
506
|
-
e.stopPropagation();
|
|
507
|
-
setSearchValue(e.target.value);
|
|
508
|
-
},
|
|
509
|
-
onKeyDown: (e) => {
|
|
510
|
-
e.stopPropagation();
|
|
511
|
-
if (e.key === "Escape") {
|
|
512
|
-
e.preventDefault();
|
|
513
|
-
setOpen(false);
|
|
514
|
-
}
|
|
515
|
-
if (e.key === "Enter") {
|
|
516
|
-
e.preventDefault();
|
|
517
|
-
if (filteredOptions.length > 0) {
|
|
518
|
-
handleSelect(filteredOptions[0].value);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
onClick: (e) => {
|
|
523
|
-
e.stopPropagation();
|
|
524
|
-
},
|
|
525
|
-
onFocus: (e) => {
|
|
526
|
-
e.stopPropagation();
|
|
527
|
-
},
|
|
528
|
-
className: "border-0 focus-visible:ring-0 focus-visible:ring-offset-0 h-9 bg-transparent px-0"
|
|
529
|
-
}
|
|
530
|
-
),
|
|
531
|
-
searchValue && /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
-
Button,
|
|
533
|
-
{
|
|
534
|
-
type: "button",
|
|
535
|
-
variant: "ghost",
|
|
536
|
-
size: "sm",
|
|
537
|
-
className: "h-6 w-6 p-0",
|
|
538
|
-
onClick: (e) => {
|
|
539
|
-
e.stopPropagation();
|
|
540
|
-
setSearchValue("");
|
|
541
|
-
searchInputRef.current?.focus();
|
|
542
|
-
},
|
|
543
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
544
|
-
}
|
|
545
|
-
)
|
|
546
|
-
] }),
|
|
547
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "max-h-[300px]", children: filteredOptions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: emptyText }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-1", children: filteredOptions.map((option) => {
|
|
548
|
-
const isSelected = String(value) === String(option.value);
|
|
549
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
550
|
-
"div",
|
|
551
|
-
{
|
|
552
|
-
role: "option",
|
|
553
|
-
"aria-selected": isSelected,
|
|
554
|
-
className: cn(
|
|
555
|
-
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
|
|
556
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
557
|
-
isSelected && "bg-accent text-accent-foreground"
|
|
558
|
-
),
|
|
559
|
-
onMouseDown: (e) => {
|
|
560
|
-
e.preventDefault();
|
|
561
|
-
e.stopPropagation();
|
|
562
|
-
handleSelect(option.value);
|
|
563
|
-
},
|
|
564
|
-
onClick: (e) => {
|
|
565
|
-
e.preventDefault();
|
|
566
|
-
e.stopPropagation();
|
|
567
|
-
handleSelect(option.value);
|
|
568
|
-
},
|
|
569
|
-
children: [
|
|
570
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
571
|
-
lucideReact.Check,
|
|
572
|
-
{
|
|
573
|
-
className: cn(
|
|
574
|
-
"mr-2 h-4 w-4 shrink-0",
|
|
575
|
-
isSelected ? "opacity-100" : "opacity-0"
|
|
576
|
-
)
|
|
577
|
-
}
|
|
578
|
-
),
|
|
579
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: option.label })
|
|
580
|
-
]
|
|
581
|
-
},
|
|
582
|
-
String(option.value)
|
|
583
|
-
);
|
|
584
|
-
}) }) })
|
|
585
|
-
] })
|
|
586
|
-
}
|
|
587
|
-
)
|
|
588
|
-
] });
|
|
589
|
-
}
|
|
590
|
-
var init_combobox = __esm({
|
|
591
|
-
"src/ui/primitives/combobox.tsx"() {
|
|
592
|
-
"use client";
|
|
593
|
-
init_utils();
|
|
594
|
-
init_button();
|
|
595
|
-
init_input();
|
|
596
|
-
init_scroll_area();
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
function Select({
|
|
600
|
-
...props
|
|
601
|
-
}) {
|
|
602
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Root, { "data-slot": "select", ...props });
|
|
603
|
-
}
|
|
604
|
-
function SelectGroup({
|
|
605
|
-
...props
|
|
606
|
-
}) {
|
|
607
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Group, { "data-slot": "select-group", ...props });
|
|
608
|
-
}
|
|
609
|
-
function SelectValue({
|
|
610
|
-
...props
|
|
611
|
-
}) {
|
|
612
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { "data-slot": "select-value", ...props });
|
|
613
|
-
}
|
|
614
|
-
function SelectTrigger({
|
|
615
|
-
className,
|
|
616
|
-
children,
|
|
617
|
-
...props
|
|
618
|
-
}) {
|
|
619
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
620
|
-
SelectPrimitive__namespace.Trigger,
|
|
621
|
-
{
|
|
622
|
-
"data-slot": "select-trigger",
|
|
623
|
-
className: cn(
|
|
624
|
-
"cursor-pointer flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
625
|
-
className
|
|
626
|
-
),
|
|
627
|
-
...props,
|
|
628
|
-
children: [
|
|
629
|
-
children,
|
|
630
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
631
|
-
]
|
|
632
|
-
}
|
|
633
|
-
);
|
|
634
|
-
}
|
|
635
|
-
function SelectScrollUpButton({
|
|
636
|
-
className,
|
|
637
|
-
...props
|
|
638
|
-
}) {
|
|
639
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
640
|
-
SelectPrimitive__namespace.ScrollUpButton,
|
|
641
|
-
{
|
|
642
|
-
"data-slot": "select-scroll-up-button",
|
|
643
|
-
className: cn(
|
|
644
|
-
"flex cursor-pointer items-center justify-center py-1",
|
|
645
|
-
className
|
|
646
|
-
),
|
|
647
|
-
...props,
|
|
648
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
649
|
-
}
|
|
650
|
-
);
|
|
651
|
-
}
|
|
652
|
-
function SelectScrollDownButton({
|
|
653
|
-
className,
|
|
654
|
-
...props
|
|
655
|
-
}) {
|
|
656
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
657
|
-
SelectPrimitive__namespace.ScrollDownButton,
|
|
658
|
-
{
|
|
659
|
-
"data-slot": "select-scroll-down-button",
|
|
660
|
-
className: cn(
|
|
661
|
-
"flex cursor-pointer items-center justify-center py-1",
|
|
662
|
-
className
|
|
663
|
-
),
|
|
664
|
-
...props,
|
|
665
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
666
|
-
}
|
|
667
|
-
);
|
|
668
|
-
}
|
|
669
|
-
function SelectContent({
|
|
670
|
-
className,
|
|
671
|
-
children,
|
|
672
|
-
position = "popper",
|
|
673
|
-
...props
|
|
674
|
-
}) {
|
|
675
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
676
|
-
SelectPrimitive__namespace.Content,
|
|
677
|
-
{
|
|
678
|
-
"data-slot": "select-content",
|
|
679
|
-
className: cn(
|
|
680
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
681
|
-
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",
|
|
682
|
-
className
|
|
683
|
-
),
|
|
684
|
-
position,
|
|
685
|
-
...props,
|
|
686
|
-
children: [
|
|
687
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
688
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
689
|
-
SelectPrimitive__namespace.Viewport,
|
|
690
|
-
{
|
|
691
|
-
className: cn(
|
|
692
|
-
"p-1",
|
|
693
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
694
|
-
),
|
|
695
|
-
children
|
|
696
|
-
}
|
|
697
|
-
),
|
|
698
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
699
|
-
]
|
|
700
|
-
}
|
|
701
|
-
) });
|
|
702
|
-
}
|
|
703
|
-
function SelectLabel({
|
|
704
|
-
className,
|
|
705
|
-
...props
|
|
706
|
-
}) {
|
|
707
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
708
|
-
SelectPrimitive__namespace.Label,
|
|
709
|
-
{
|
|
710
|
-
"data-slot": "select-label",
|
|
711
|
-
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
712
|
-
...props
|
|
713
|
-
}
|
|
714
|
-
);
|
|
715
|
-
}
|
|
716
|
-
function SelectItem({
|
|
717
|
-
className,
|
|
718
|
-
children,
|
|
719
|
-
...props
|
|
720
|
-
}) {
|
|
721
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
722
|
-
SelectPrimitive__namespace.Item,
|
|
723
|
-
{
|
|
724
|
-
"data-slot": "select-item",
|
|
725
|
-
className: cn(
|
|
726
|
-
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
727
|
-
className
|
|
728
|
-
),
|
|
729
|
-
...props,
|
|
730
|
-
children: [
|
|
731
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
732
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
733
|
-
]
|
|
734
|
-
}
|
|
735
|
-
);
|
|
736
|
-
}
|
|
737
|
-
function SelectSeparator({
|
|
738
|
-
className,
|
|
739
|
-
...props
|
|
740
|
-
}) {
|
|
741
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
742
|
-
SelectPrimitive__namespace.Separator,
|
|
743
|
-
{
|
|
744
|
-
"data-slot": "select-separator",
|
|
745
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
746
|
-
...props
|
|
747
|
-
}
|
|
748
|
-
);
|
|
749
|
-
}
|
|
750
|
-
var init_select = __esm({
|
|
751
|
-
"src/ui/primitives/select.tsx"() {
|
|
752
|
-
"use client";
|
|
753
|
-
init_utils();
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
function Popover({
|
|
757
|
-
...props
|
|
758
|
-
}) {
|
|
759
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
760
|
-
}
|
|
761
|
-
function PopoverTrigger({
|
|
762
|
-
className,
|
|
763
|
-
...props
|
|
764
|
-
}) {
|
|
765
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
766
|
-
PopoverPrimitive__namespace.Trigger,
|
|
767
|
-
{
|
|
768
|
-
"data-slot": "popover-trigger",
|
|
769
|
-
className: cn("cursor-pointer", className),
|
|
770
|
-
...props
|
|
771
|
-
}
|
|
772
|
-
);
|
|
773
|
-
}
|
|
774
|
-
function PopoverAnchor({
|
|
775
|
-
...props
|
|
776
|
-
}) {
|
|
777
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
778
|
-
}
|
|
779
|
-
function PopoverContent({
|
|
780
|
-
className,
|
|
781
|
-
align = "center",
|
|
782
|
-
sideOffset = 4,
|
|
783
|
-
container,
|
|
784
|
-
...props
|
|
785
|
-
}) {
|
|
786
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { container, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
787
|
-
PopoverPrimitive__namespace.Content,
|
|
788
|
-
{
|
|
789
|
-
"data-slot": "popover-content",
|
|
790
|
-
align,
|
|
791
|
-
sideOffset,
|
|
792
|
-
className: cn(
|
|
793
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
|
|
794
|
-
className
|
|
795
|
-
),
|
|
796
|
-
...props
|
|
797
|
-
}
|
|
798
|
-
) });
|
|
799
|
-
}
|
|
800
|
-
var init_popover = __esm({
|
|
801
|
-
"src/ui/primitives/popover.tsx"() {
|
|
802
|
-
"use client";
|
|
803
|
-
init_utils();
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
function DropdownMenu({
|
|
807
|
-
...props
|
|
808
|
-
}) {
|
|
809
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
|
|
810
|
-
}
|
|
811
|
-
function DropdownMenuPortal({
|
|
812
|
-
...props
|
|
813
|
-
}) {
|
|
814
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
815
|
-
}
|
|
816
|
-
function DropdownMenuTrigger({
|
|
817
|
-
className,
|
|
818
|
-
...props
|
|
819
|
-
}) {
|
|
820
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
|
-
DropdownMenuPrimitive__namespace.Trigger,
|
|
822
|
-
{
|
|
823
|
-
"data-slot": "dropdown-menu-trigger",
|
|
824
|
-
className: cn("cursor-pointer", className),
|
|
825
|
-
...props
|
|
826
|
-
}
|
|
827
|
-
);
|
|
828
|
-
}
|
|
829
|
-
function DropdownMenuGroup({
|
|
830
|
-
...props
|
|
831
|
-
}) {
|
|
832
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
833
|
-
}
|
|
834
|
-
function DropdownMenuRadioGroup({
|
|
835
|
-
...props
|
|
836
|
-
}) {
|
|
837
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
838
|
-
DropdownMenuPrimitive__namespace.RadioGroup,
|
|
839
|
-
{
|
|
840
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
841
|
-
...props
|
|
842
|
-
}
|
|
843
|
-
);
|
|
844
|
-
}
|
|
845
|
-
function DropdownMenuSub({
|
|
846
|
-
...props
|
|
847
|
-
}) {
|
|
848
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
849
|
-
}
|
|
850
|
-
function DropdownMenuSubTrigger({
|
|
851
|
-
className,
|
|
852
|
-
inset,
|
|
853
|
-
children,
|
|
854
|
-
...props
|
|
855
|
-
}) {
|
|
856
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
857
|
-
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
858
|
-
{
|
|
859
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
860
|
-
"data-inset": inset,
|
|
861
|
-
className: cn(
|
|
862
|
-
"cursor-pointer flex items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:ps-8 focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
863
|
-
className
|
|
864
|
-
),
|
|
865
|
-
...props,
|
|
866
|
-
children: [
|
|
867
|
-
children,
|
|
868
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ms-auto h-4 w-4 rtl:-scale-100" })
|
|
869
|
-
]
|
|
870
|
-
}
|
|
871
|
-
);
|
|
872
|
-
}
|
|
873
|
-
function DropdownMenuSubContent({
|
|
874
|
-
className,
|
|
875
|
-
...props
|
|
876
|
-
}) {
|
|
877
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
878
|
-
DropdownMenuPrimitive__namespace.SubContent,
|
|
879
|
-
{
|
|
880
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
881
|
-
className: cn(
|
|
882
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
883
|
-
className
|
|
884
|
-
),
|
|
885
|
-
...props
|
|
886
|
-
}
|
|
887
|
-
);
|
|
888
|
-
}
|
|
889
|
-
function DropdownMenuContent({
|
|
890
|
-
className,
|
|
891
|
-
sideOffset = 4,
|
|
892
|
-
...props
|
|
893
|
-
}) {
|
|
894
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
895
|
-
DropdownMenuPrimitive__namespace.Content,
|
|
896
|
-
{
|
|
897
|
-
"data-slot": "dropdown-menu-content",
|
|
898
|
-
sideOffset,
|
|
899
|
-
className: cn(
|
|
900
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
|
|
901
|
-
className
|
|
902
|
-
),
|
|
903
|
-
...props
|
|
904
|
-
}
|
|
905
|
-
) });
|
|
906
|
-
}
|
|
907
|
-
function DropdownMenuItem({
|
|
908
|
-
className,
|
|
909
|
-
inset,
|
|
910
|
-
...props
|
|
911
|
-
}) {
|
|
912
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
913
|
-
DropdownMenuPrimitive__namespace.Item,
|
|
914
|
-
{
|
|
915
|
-
"data-slot": "dropdown-menu-item",
|
|
916
|
-
"data-inset": inset,
|
|
917
|
-
className: cn(
|
|
918
|
-
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:ps-8",
|
|
919
|
-
className
|
|
920
|
-
),
|
|
921
|
-
...props
|
|
922
|
-
}
|
|
923
|
-
);
|
|
924
|
-
}
|
|
925
|
-
function DropdownMenuCheckboxItem({
|
|
926
|
-
className,
|
|
927
|
-
children,
|
|
928
|
-
checked,
|
|
929
|
-
...props
|
|
930
|
-
}) {
|
|
931
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
932
|
-
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
933
|
-
{
|
|
934
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
935
|
-
className: cn(
|
|
936
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
937
|
-
className
|
|
938
|
-
),
|
|
939
|
-
checked,
|
|
940
|
-
...props,
|
|
941
|
-
children: [
|
|
942
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
943
|
-
children
|
|
944
|
-
]
|
|
945
|
-
}
|
|
946
|
-
);
|
|
947
|
-
}
|
|
948
|
-
function DropdownMenuRadioItem({
|
|
949
|
-
className,
|
|
950
|
-
children,
|
|
951
|
-
...props
|
|
952
|
-
}) {
|
|
953
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
954
|
-
DropdownMenuPrimitive__namespace.RadioItem,
|
|
955
|
-
{
|
|
956
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
957
|
-
className: cn(
|
|
958
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
959
|
-
className
|
|
960
|
-
),
|
|
961
|
-
...props,
|
|
962
|
-
children: [
|
|
963
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Dot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
964
|
-
children
|
|
965
|
-
]
|
|
966
|
-
}
|
|
967
|
-
);
|
|
968
|
-
}
|
|
969
|
-
function DropdownMenuLabel({
|
|
970
|
-
className,
|
|
971
|
-
inset,
|
|
972
|
-
...props
|
|
973
|
-
}) {
|
|
974
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
975
|
-
DropdownMenuPrimitive__namespace.Label,
|
|
976
|
-
{
|
|
977
|
-
"data-slot": "dropdown-menu-label",
|
|
978
|
-
"data-inset": inset,
|
|
979
|
-
className: cn(
|
|
980
|
-
"px-2 py-1.5 text-sm font-semibold data-[inset]:ps-8",
|
|
981
|
-
className
|
|
982
|
-
),
|
|
983
|
-
...props
|
|
984
|
-
}
|
|
985
|
-
);
|
|
986
|
-
}
|
|
987
|
-
function DropdownMenuSeparator({
|
|
988
|
-
className,
|
|
989
|
-
...props
|
|
990
|
-
}) {
|
|
991
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
992
|
-
DropdownMenuPrimitive__namespace.Separator,
|
|
993
|
-
{
|
|
994
|
-
"data-slot": "dropdown-menu-separator",
|
|
995
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
996
|
-
...props
|
|
997
|
-
}
|
|
998
|
-
);
|
|
999
|
-
}
|
|
1000
|
-
function DropdownMenuShortcut({
|
|
1001
|
-
className,
|
|
1002
|
-
...props
|
|
1003
|
-
}) {
|
|
1004
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1005
|
-
"span",
|
|
1006
|
-
{
|
|
1007
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
1008
|
-
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
1009
|
-
...props
|
|
1010
|
-
}
|
|
1011
|
-
);
|
|
1012
|
-
}
|
|
1013
|
-
var init_dropdown_menu = __esm({
|
|
1014
|
-
"src/ui/primitives/dropdown-menu.tsx"() {
|
|
1015
|
-
"use client";
|
|
1016
|
-
init_utils();
|
|
1017
|
-
}
|
|
1018
|
-
});
|
|
1019
|
-
function Switch({ className, ...props }) {
|
|
1020
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1021
|
-
SwitchPrimitives__namespace.Root,
|
|
1022
|
-
{
|
|
1023
|
-
"data-slot": "switch",
|
|
1024
|
-
className: cn(
|
|
1025
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
1026
|
-
className
|
|
1027
|
-
),
|
|
1028
|
-
...props,
|
|
1029
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1030
|
-
SwitchPrimitives__namespace.Thumb,
|
|
1031
|
-
{
|
|
1032
|
-
"data-slot": "switch-thumb",
|
|
1033
|
-
className: cn(
|
|
1034
|
-
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 rtl:data-[state=checked]:-translate-x-4"
|
|
1035
|
-
)
|
|
1036
|
-
}
|
|
1037
|
-
)
|
|
1038
|
-
}
|
|
1039
|
-
);
|
|
1040
|
-
}
|
|
1041
|
-
var init_switch = __esm({
|
|
1042
|
-
"src/ui/primitives/switch.tsx"() {
|
|
1043
|
-
"use client";
|
|
1044
|
-
init_utils();
|
|
1045
|
-
}
|
|
1046
|
-
});
|
|
1047
|
-
exports.Checkbox = void 0;
|
|
1048
|
-
var init_checkbox = __esm({
|
|
1049
|
-
"src/ui/primitives/checkbox.tsx"() {
|
|
1050
|
-
"use client";
|
|
1051
|
-
init_utils();
|
|
1052
|
-
exports.Checkbox = React6__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1053
|
-
CheckboxPrimitive__namespace.Root,
|
|
1054
|
-
{
|
|
1055
|
-
ref,
|
|
1056
|
-
className: cn(
|
|
1057
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
1058
|
-
className
|
|
1059
|
-
),
|
|
1060
|
-
...props,
|
|
1061
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1062
|
-
CheckboxPrimitive__namespace.Indicator,
|
|
1063
|
-
{
|
|
1064
|
-
className: cn("flex items-center justify-center text-current"),
|
|
1065
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
|
|
1066
|
-
}
|
|
1067
|
-
)
|
|
1068
|
-
}
|
|
1069
|
-
));
|
|
1070
|
-
exports.Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1071
|
-
}
|
|
1072
|
-
});
|
|
1073
|
-
exports.Label = void 0;
|
|
1074
|
-
var init_label = __esm({
|
|
1075
|
-
"src/ui/primitives/label.tsx"() {
|
|
1076
|
-
"use client";
|
|
1077
|
-
init_utils();
|
|
1078
|
-
exports.Label = React6__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1079
|
-
LabelPrimitive__namespace.Root,
|
|
1080
|
-
{
|
|
1081
|
-
ref,
|
|
1082
|
-
className: cn(
|
|
1083
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1084
|
-
className
|
|
1085
|
-
),
|
|
1086
|
-
...props
|
|
1087
|
-
}
|
|
1088
|
-
));
|
|
1089
|
-
exports.Label.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
1090
|
-
}
|
|
1091
|
-
});
|
|
1092
|
-
function TooltipProvider({
|
|
1093
|
-
delayDuration = 0,
|
|
1094
|
-
...props
|
|
1095
|
-
}) {
|
|
1096
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1097
|
-
TooltipPrimitive__namespace.Provider,
|
|
1098
|
-
{
|
|
1099
|
-
"data-slot": "tooltip-provider",
|
|
1100
|
-
delayDuration,
|
|
1101
|
-
...props
|
|
1102
|
-
}
|
|
1103
|
-
);
|
|
1104
|
-
}
|
|
1105
|
-
function Tooltip({
|
|
1106
|
-
...props
|
|
1107
|
-
}) {
|
|
1108
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
|
|
1109
|
-
}
|
|
1110
|
-
function TooltipTrigger({
|
|
1111
|
-
className,
|
|
1112
|
-
...props
|
|
1113
|
-
}) {
|
|
1114
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1115
|
-
TooltipPrimitive__namespace.Trigger,
|
|
1116
|
-
{
|
|
1117
|
-
"data-slot": "tooltip-trigger",
|
|
1118
|
-
className: cn("cursor-pointer", className),
|
|
1119
|
-
...props
|
|
1120
|
-
}
|
|
1121
|
-
);
|
|
1122
|
-
}
|
|
1123
|
-
function TooltipContent({
|
|
1124
|
-
className,
|
|
1125
|
-
sideOffset = 0,
|
|
1126
|
-
...props
|
|
1127
|
-
}) {
|
|
1128
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1129
|
-
TooltipPrimitive__namespace.Content,
|
|
1130
|
-
{
|
|
1131
|
-
"data-slot": "tooltip-content",
|
|
1132
|
-
sideOffset,
|
|
1133
|
-
className: cn(
|
|
1134
|
-
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground 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",
|
|
1135
|
-
className
|
|
1136
|
-
),
|
|
1137
|
-
...props
|
|
1138
|
-
}
|
|
1139
|
-
);
|
|
1140
|
-
}
|
|
1141
|
-
var init_tooltip = __esm({
|
|
1142
|
-
"src/ui/primitives/tooltip.tsx"() {
|
|
1143
|
-
"use client";
|
|
1144
|
-
init_utils();
|
|
1145
|
-
}
|
|
1146
|
-
});
|
|
1147
|
-
var init_tenant_provider = __esm({
|
|
1148
|
-
"src/providers/tenant-provider.tsx"() {
|
|
1149
|
-
React6.createContext(void 0);
|
|
1150
|
-
}
|
|
1151
|
-
});
|
|
1152
|
-
var defaultSettings, SettingsContext;
|
|
1153
|
-
var init_providers = __esm({
|
|
1154
|
-
"src/providers/index.tsx"() {
|
|
1155
|
-
"use client";
|
|
1156
|
-
init_tenant_provider();
|
|
1157
|
-
defaultSettings = {
|
|
1158
|
-
theme: "blue",
|
|
1159
|
-
mode: "system",
|
|
1160
|
-
radius: 0.5,
|
|
1161
|
-
layout: "vertical",
|
|
1162
|
-
locale: "vi",
|
|
1163
|
-
sidebarVariant: "sidebar",
|
|
1164
|
-
sidebarCollapsible: "icon",
|
|
1165
|
-
density: "comfortable"
|
|
1166
|
-
};
|
|
1167
|
-
SettingsContext = React6.createContext(void 0);
|
|
1168
|
-
}
|
|
1169
|
-
});
|
|
1170
|
-
function ResizablePanelGroup({
|
|
1171
|
-
className,
|
|
1172
|
-
...props
|
|
1173
|
-
}) {
|
|
1174
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1175
|
-
ResizablePrimitive__namespace.PanelGroup,
|
|
1176
|
-
{
|
|
1177
|
-
"data-slot": "resizable-panel-group",
|
|
1178
|
-
className: cn(
|
|
1179
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
1180
|
-
className
|
|
1181
|
-
),
|
|
1182
|
-
...props
|
|
1183
|
-
}
|
|
1184
|
-
);
|
|
1185
|
-
}
|
|
1186
|
-
function ResizablePanel({
|
|
1187
|
-
...props
|
|
1188
|
-
}) {
|
|
1189
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ResizablePrimitive__namespace.Panel, { "data-slot": "resizable-panel", ...props });
|
|
1190
|
-
}
|
|
1191
|
-
function ResizableHandle({
|
|
1192
|
-
withHandle,
|
|
1193
|
-
className,
|
|
1194
|
-
...props
|
|
1195
|
-
}) {
|
|
1196
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1197
|
-
ResizablePrimitive__namespace.PanelResizeHandle,
|
|
1198
|
-
{
|
|
1199
|
-
"data-slot": "resizable-handle",
|
|
1200
|
-
className: cn(
|
|
1201
|
-
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
1202
|
-
className
|
|
1203
|
-
),
|
|
1204
|
-
...props,
|
|
1205
|
-
children: withHandle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GripVertical, { className: "h-2.5 w-2.5" }) })
|
|
1206
|
-
}
|
|
1207
|
-
);
|
|
1208
|
-
}
|
|
1209
|
-
var init_resizable = __esm({
|
|
1210
|
-
"src/ui/primitives/resizable.tsx"() {
|
|
1211
|
-
"use client";
|
|
1212
|
-
init_utils();
|
|
1213
|
-
}
|
|
1214
|
-
});
|
|
1215
|
-
function Slider({
|
|
1216
|
-
className,
|
|
1217
|
-
...props
|
|
1218
|
-
}) {
|
|
1219
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1220
|
-
SliderPrimitive__namespace.Root,
|
|
1221
|
-
{
|
|
1222
|
-
className: cn(
|
|
1223
|
-
"relative flex w-full touch-none select-none items-center",
|
|
1224
|
-
className
|
|
1225
|
-
),
|
|
1226
|
-
...props,
|
|
1227
|
-
children: [
|
|
1228
|
-
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: "absolute h-full bg-primary" }) }),
|
|
1229
|
-
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "cursor-pointer block h-4 w-4 rounded-full border border-primary/50 bg-background shadow-sm transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
|
1230
|
-
]
|
|
1231
|
-
}
|
|
1232
|
-
);
|
|
1233
|
-
}
|
|
1234
|
-
var init_slider = __esm({
|
|
1235
|
-
"src/ui/primitives/slider.tsx"() {
|
|
1236
|
-
"use client";
|
|
1237
|
-
init_utils();
|
|
1238
|
-
}
|
|
1239
|
-
});
|
|
1240
|
-
function MenubarMenu({
|
|
1241
|
-
...props
|
|
1242
|
-
}) {
|
|
1243
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Menu, { "data-slot": "menubar-menu", ...props });
|
|
1244
|
-
}
|
|
1245
|
-
function MenubarGroup({
|
|
1246
|
-
...props
|
|
1247
|
-
}) {
|
|
1248
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Group, { "data-slot": "menubar-group", ...props });
|
|
1249
|
-
}
|
|
1250
|
-
function MenubarPortal({
|
|
1251
|
-
...props
|
|
1252
|
-
}) {
|
|
1253
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { "data-slot": "menubar-portal", ...props });
|
|
1254
|
-
}
|
|
1255
|
-
function MenubarRadioGroup({
|
|
1256
|
-
...props
|
|
1257
|
-
}) {
|
|
1258
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
1259
|
-
}
|
|
1260
|
-
function Menubar({
|
|
1261
|
-
className,
|
|
1262
|
-
...props
|
|
1263
|
-
}) {
|
|
1264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1265
|
-
MenubarPrimitive__namespace.Root,
|
|
1266
|
-
{
|
|
1267
|
-
"data-slot": "menubar",
|
|
1268
|
-
className: cn(
|
|
1269
|
-
"flex h-9 items-center gap-x-1 rounded-md border bg-background p-1",
|
|
1270
|
-
className
|
|
1271
|
-
),
|
|
1272
|
-
...props
|
|
1273
|
-
}
|
|
1274
|
-
);
|
|
1275
|
-
}
|
|
1276
|
-
function MenubarTrigger({
|
|
1277
|
-
className,
|
|
1278
|
-
...props
|
|
1279
|
-
}) {
|
|
1280
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1281
|
-
MenubarPrimitive__namespace.Trigger,
|
|
1282
|
-
{
|
|
1283
|
-
"data-slot": "menubar-trigger",
|
|
1284
|
-
className: cn(
|
|
1285
|
-
"flex cursor-pointer select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1286
|
-
className
|
|
1287
|
-
),
|
|
1288
|
-
...props
|
|
1289
|
-
}
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
function MenubarSubTrigger({
|
|
1293
|
-
className,
|
|
1294
|
-
inset,
|
|
1295
|
-
children,
|
|
1296
|
-
...props
|
|
1297
|
-
}) {
|
|
1298
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1299
|
-
MenubarPrimitive__namespace.SubTrigger,
|
|
1300
|
-
{
|
|
1301
|
-
"data-slot": "menubar-sub-trigger",
|
|
1302
|
-
"data-inset": inset,
|
|
1303
|
-
className: cn(
|
|
1304
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground cursor-pointer flex items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:ps-8",
|
|
1305
|
-
className
|
|
1306
|
-
),
|
|
1307
|
-
...props,
|
|
1308
|
-
children: [
|
|
1309
|
-
children,
|
|
1310
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ms-auto h-4 w-4 rtl:-scale-x-100" })
|
|
1311
|
-
]
|
|
1312
|
-
}
|
|
1313
|
-
);
|
|
1314
|
-
}
|
|
1315
|
-
function MenubarSub({
|
|
1316
|
-
...props
|
|
1317
|
-
}) {
|
|
1318
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Sub, { "data-slot": "menubar-sub", ...props });
|
|
1319
|
-
}
|
|
1320
|
-
function MenubarSubContent({
|
|
1321
|
-
className,
|
|
1322
|
-
...props
|
|
1323
|
-
}) {
|
|
1324
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1325
|
-
MenubarPrimitive__namespace.SubContent,
|
|
1326
|
-
{
|
|
1327
|
-
"data-slot": "menubar-sub-content",
|
|
1328
|
-
className: cn(
|
|
1329
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
1330
|
-
className
|
|
1331
|
-
),
|
|
1332
|
-
...props
|
|
1333
|
-
}
|
|
1334
|
-
);
|
|
1335
|
-
}
|
|
1336
|
-
function MenubarContent({
|
|
1337
|
-
className,
|
|
1338
|
-
align = "start",
|
|
1339
|
-
alignOffset = -4,
|
|
1340
|
-
sideOffset = 8,
|
|
1341
|
-
...props
|
|
1342
|
-
}) {
|
|
1343
|
-
return /* @__PURE__ */ jsxRuntime.jsx(MenubarPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1344
|
-
MenubarPrimitive__namespace.Content,
|
|
1345
|
-
{
|
|
1346
|
-
"data-slot": "menubar-content",
|
|
1347
|
-
align,
|
|
1348
|
-
alignOffset,
|
|
1349
|
-
sideOffset,
|
|
1350
|
-
className: cn(
|
|
1351
|
-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
|
|
1352
|
-
className
|
|
1353
|
-
),
|
|
1354
|
-
...props
|
|
1355
|
-
}
|
|
1356
|
-
) });
|
|
1357
|
-
}
|
|
1358
|
-
function MenubarItem({
|
|
1359
|
-
className,
|
|
1360
|
-
inset,
|
|
1361
|
-
variant = "default",
|
|
1362
|
-
...props
|
|
1363
|
-
}) {
|
|
1364
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1365
|
-
MenubarPrimitive__namespace.Item,
|
|
1366
|
-
{
|
|
1367
|
-
"data-slot": "menubar-item",
|
|
1368
|
-
"data-inset": inset,
|
|
1369
|
-
"data-variant": variant,
|
|
1370
|
-
className: cn(
|
|
1371
|
-
"relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
1372
|
-
className
|
|
1373
|
-
),
|
|
1374
|
-
...props
|
|
1375
|
-
}
|
|
1376
|
-
);
|
|
1377
|
-
}
|
|
1378
|
-
function MenubarCheckboxItem({
|
|
1379
|
-
className,
|
|
1380
|
-
children,
|
|
1381
|
-
checked,
|
|
1382
|
-
...props
|
|
1383
|
-
}) {
|
|
1384
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1385
|
-
MenubarPrimitive__namespace.CheckboxItem,
|
|
1386
|
-
{
|
|
1387
|
-
"data-slot": "menubar-checkbox-item",
|
|
1388
|
-
className: cn(
|
|
1389
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1390
|
-
className
|
|
1391
|
-
),
|
|
1392
|
-
checked,
|
|
1393
|
-
...props,
|
|
1394
|
-
children: [
|
|
1395
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
1396
|
-
children
|
|
1397
|
-
]
|
|
1398
|
-
}
|
|
1399
|
-
);
|
|
1400
|
-
}
|
|
1401
|
-
function MenubarRadioItem({
|
|
1402
|
-
className,
|
|
1403
|
-
children,
|
|
1404
|
-
...props
|
|
1405
|
-
}) {
|
|
1406
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1407
|
-
MenubarPrimitive__namespace.RadioItem,
|
|
1408
|
-
{
|
|
1409
|
-
"data-slot": "menubar-radio-item",
|
|
1410
|
-
className: cn(
|
|
1411
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1412
|
-
className
|
|
1413
|
-
),
|
|
1414
|
-
...props,
|
|
1415
|
-
children: [
|
|
1416
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Dot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1417
|
-
children
|
|
1418
|
-
]
|
|
1419
|
-
}
|
|
1420
|
-
);
|
|
1421
|
-
}
|
|
1422
|
-
function MenubarLabel({
|
|
1423
|
-
className,
|
|
1424
|
-
inset,
|
|
1425
|
-
...props
|
|
1426
|
-
}) {
|
|
1427
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1428
|
-
MenubarPrimitive__namespace.Label,
|
|
1429
|
-
{
|
|
1430
|
-
"data-slot": "menubar-label",
|
|
1431
|
-
className: cn(
|
|
1432
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
1433
|
-
inset && "ps-8",
|
|
1434
|
-
className
|
|
1435
|
-
),
|
|
1436
|
-
...props
|
|
1437
|
-
}
|
|
1438
|
-
);
|
|
1439
|
-
}
|
|
1440
|
-
function MenubarSeparator({
|
|
1441
|
-
className,
|
|
1442
|
-
...props
|
|
1443
|
-
}) {
|
|
1444
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1445
|
-
MenubarPrimitive__namespace.Separator,
|
|
1446
|
-
{
|
|
1447
|
-
"data-slot": "menubar-separator",
|
|
1448
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1449
|
-
...props
|
|
1450
|
-
}
|
|
1451
|
-
);
|
|
1452
|
-
}
|
|
1453
|
-
function MenubarShortcut({
|
|
1454
|
-
className,
|
|
1455
|
-
...props
|
|
1456
|
-
}) {
|
|
1457
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1458
|
-
"span",
|
|
1459
|
-
{
|
|
1460
|
-
"data-slot": "menubar-shortcut",
|
|
1461
|
-
className: cn(
|
|
1462
|
-
"ms-auto text-xs tracking-widest text-muted-foreground",
|
|
1463
|
-
className
|
|
1464
|
-
),
|
|
1465
|
-
...props
|
|
1466
|
-
}
|
|
1467
|
-
);
|
|
1468
|
-
}
|
|
1469
|
-
var init_menubar = __esm({
|
|
1470
|
-
"src/ui/primitives/menubar.tsx"() {
|
|
1471
|
-
"use client";
|
|
1472
|
-
init_utils();
|
|
1473
|
-
}
|
|
1474
|
-
});
|
|
1475
|
-
function NavigationMenu({
|
|
1476
|
-
className,
|
|
1477
|
-
children,
|
|
1478
|
-
viewport = true,
|
|
1479
|
-
...props
|
|
1480
|
-
}) {
|
|
1481
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1482
|
-
NavigationMenuPrimitive__namespace.Root,
|
|
1483
|
-
{
|
|
1484
|
-
"data-slot": "navigation-menu",
|
|
1485
|
-
"data-viewport": viewport,
|
|
1486
|
-
className: cn(
|
|
1487
|
-
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
1488
|
-
className
|
|
1489
|
-
),
|
|
1490
|
-
...props,
|
|
1491
|
-
children: [
|
|
1492
|
-
children,
|
|
1493
|
-
viewport && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
|
|
1494
|
-
]
|
|
1495
|
-
}
|
|
1496
|
-
);
|
|
1497
|
-
}
|
|
1498
|
-
function NavigationMenuList({
|
|
1499
|
-
className,
|
|
1500
|
-
...props
|
|
1501
|
-
}) {
|
|
1502
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1503
|
-
NavigationMenuPrimitive__namespace.List,
|
|
1504
|
-
{
|
|
1505
|
-
"data-slot": "navigation-menu-list",
|
|
1506
|
-
className: cn(
|
|
1507
|
-
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
1508
|
-
className
|
|
1509
|
-
),
|
|
1510
|
-
...props
|
|
1511
|
-
}
|
|
1512
|
-
);
|
|
1513
|
-
}
|
|
1514
|
-
function NavigationMenuItem({
|
|
1515
|
-
className,
|
|
1516
|
-
...props
|
|
1517
|
-
}) {
|
|
1518
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1519
|
-
NavigationMenuPrimitive__namespace.Item,
|
|
1520
|
-
{
|
|
1521
|
-
"data-slot": "navigation-menu-item",
|
|
1522
|
-
className: cn("relative", className),
|
|
1523
|
-
...props
|
|
1524
|
-
}
|
|
1525
|
-
);
|
|
1526
|
-
}
|
|
1527
|
-
function NavigationMenuTrigger({
|
|
1528
|
-
className,
|
|
1529
|
-
children,
|
|
1530
|
-
...props
|
|
1531
|
-
}) {
|
|
1532
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1533
|
-
NavigationMenuPrimitive__namespace.Trigger,
|
|
1534
|
-
{
|
|
1535
|
-
"data-slot": "navigation-menu-trigger",
|
|
1536
|
-
className: cn(exports.navigationMenuTriggerStyle(), "group", className),
|
|
1537
|
-
...props,
|
|
1538
|
-
children: [
|
|
1539
|
-
children,
|
|
1540
|
-
" ",
|
|
1541
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1542
|
-
lucideReact.ChevronDown,
|
|
1543
|
-
{
|
|
1544
|
-
className: "relative top-[1px] ms-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
1545
|
-
"aria-hidden": "true"
|
|
1546
|
-
}
|
|
1547
|
-
)
|
|
1548
|
-
]
|
|
1549
|
-
}
|
|
1550
|
-
);
|
|
1551
|
-
}
|
|
1552
|
-
function NavigationMenuContent({
|
|
1553
|
-
className,
|
|
1554
|
-
...props
|
|
1555
|
-
}) {
|
|
1556
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1557
|
-
NavigationMenuPrimitive__namespace.Content,
|
|
1558
|
-
{
|
|
1559
|
-
"data-slot": "navigation-menu-content",
|
|
1560
|
-
className: cn(
|
|
1561
|
-
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
1562
|
-
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
1563
|
-
className
|
|
1564
|
-
),
|
|
1565
|
-
...props
|
|
1566
|
-
}
|
|
1567
|
-
);
|
|
1568
|
-
}
|
|
1569
|
-
function NavigationMenuLink({
|
|
1570
|
-
className,
|
|
1571
|
-
...props
|
|
1572
|
-
}) {
|
|
1573
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1574
|
-
NavigationMenuPrimitive__namespace.Link,
|
|
1575
|
-
{
|
|
1576
|
-
"data-slot": "navigation-menu-link",
|
|
1577
|
-
className: cn(
|
|
1578
|
-
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
1579
|
-
className
|
|
1580
|
-
),
|
|
1581
|
-
...props
|
|
1582
|
-
}
|
|
1583
|
-
);
|
|
1584
|
-
}
|
|
1585
|
-
function NavigationMenuViewport({
|
|
1586
|
-
className,
|
|
1587
|
-
...props
|
|
1588
|
-
}) {
|
|
1589
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute start-0 top-full flex justify-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1590
|
-
NavigationMenuPrimitive__namespace.Viewport,
|
|
1591
|
-
{
|
|
1592
|
-
"data-slot": "navigation-menu-viewport",
|
|
1593
|
-
className: cn(
|
|
1594
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
1595
|
-
className
|
|
1596
|
-
),
|
|
1597
|
-
...props
|
|
1598
|
-
}
|
|
1599
|
-
) });
|
|
1600
|
-
}
|
|
1601
|
-
function NavigationMenuIndicator({
|
|
1602
|
-
className,
|
|
1603
|
-
...props
|
|
1604
|
-
}) {
|
|
1605
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1606
|
-
NavigationMenuPrimitive__namespace.Indicator,
|
|
1607
|
-
{
|
|
1608
|
-
"data-slot": "navigation-menu-indicator",
|
|
1609
|
-
className: cn(
|
|
1610
|
-
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
1611
|
-
className
|
|
1612
|
-
),
|
|
1613
|
-
...props,
|
|
1614
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-te-sm bg-border shadow-md" })
|
|
1615
|
-
}
|
|
1616
|
-
);
|
|
1617
|
-
}
|
|
1618
|
-
exports.navigationMenuTriggerStyle = void 0;
|
|
1619
|
-
var init_navigation_menu = __esm({
|
|
1620
|
-
"src/ui/primitives/navigation-menu.tsx"() {
|
|
1621
|
-
init_utils();
|
|
1622
|
-
exports.navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
1623
|
-
"group cursor-pointer inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
1624
|
-
);
|
|
1625
|
-
}
|
|
1626
|
-
});
|
|
1627
|
-
function Toggle({
|
|
1628
|
-
className,
|
|
1629
|
-
variant,
|
|
1630
|
-
size,
|
|
1631
|
-
...props
|
|
1632
|
-
}) {
|
|
1633
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1634
|
-
TogglePrimitive__namespace.Root,
|
|
1635
|
-
{
|
|
1636
|
-
"data-slot": "toggle",
|
|
1637
|
-
className: cn(exports.toggleVariants({ variant, size, className })),
|
|
1638
|
-
...props
|
|
1639
|
-
}
|
|
1640
|
-
);
|
|
1641
|
-
}
|
|
1642
|
-
exports.toggleVariants = void 0;
|
|
1643
|
-
var init_toggle = __esm({
|
|
1644
|
-
"src/ui/primitives/toggle.tsx"() {
|
|
1645
|
-
"use client";
|
|
1646
|
-
init_utils();
|
|
1647
|
-
exports.toggleVariants = classVarianceAuthority.cva(
|
|
1648
|
-
"cursor-pointer inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1649
|
-
{
|
|
1650
|
-
variants: {
|
|
1651
|
-
variant: {
|
|
1652
|
-
default: "bg-transparent",
|
|
1653
|
-
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
1654
|
-
},
|
|
1655
|
-
size: {
|
|
1656
|
-
default: "h-9 px-3",
|
|
1657
|
-
sm: "h-8 px-2",
|
|
1658
|
-
lg: "h-10 px-3"
|
|
1659
|
-
}
|
|
1660
|
-
},
|
|
1661
|
-
defaultVariants: {
|
|
1662
|
-
variant: "default",
|
|
1663
|
-
size: "default"
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
);
|
|
1667
|
-
}
|
|
1668
|
-
});
|
|
1669
|
-
function ToggleGroup({
|
|
1670
|
-
className,
|
|
1671
|
-
variant,
|
|
1672
|
-
size,
|
|
1673
|
-
children,
|
|
1674
|
-
...props
|
|
1675
|
-
}) {
|
|
1676
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1677
|
-
ToggleGroupPrimitive__namespace.Root,
|
|
1678
|
-
{
|
|
1679
|
-
"data-slot": "toggle-group",
|
|
1680
|
-
className: cn("flex items-center justify-center gap-1", className),
|
|
1681
|
-
...props,
|
|
1682
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
1683
|
-
}
|
|
1684
|
-
);
|
|
1685
|
-
}
|
|
1686
|
-
function ToggleGroupItem({
|
|
1687
|
-
className,
|
|
1688
|
-
children,
|
|
1689
|
-
variant,
|
|
1690
|
-
size,
|
|
1691
|
-
...props
|
|
1692
|
-
}) {
|
|
1693
|
-
const context = React6.useContext(ToggleGroupContext);
|
|
1694
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1695
|
-
ToggleGroupPrimitive__namespace.Item,
|
|
1696
|
-
{
|
|
1697
|
-
"data-slot": "toggle-group-item",
|
|
1698
|
-
className: cn(
|
|
1699
|
-
exports.toggleVariants({
|
|
1700
|
-
variant: context.variant || variant,
|
|
1701
|
-
size: context.size || size
|
|
1702
|
-
}),
|
|
1703
|
-
className
|
|
1704
|
-
),
|
|
1705
|
-
...props,
|
|
1706
|
-
children
|
|
1707
|
-
}
|
|
1708
|
-
);
|
|
1709
|
-
}
|
|
1710
|
-
var ToggleGroupContext;
|
|
1711
|
-
var init_toggle_group = __esm({
|
|
1712
|
-
"src/ui/primitives/toggle-group.tsx"() {
|
|
1713
|
-
"use client";
|
|
1714
|
-
init_utils();
|
|
1715
|
-
init_toggle();
|
|
1716
|
-
ToggleGroupContext = React6.createContext({
|
|
1717
|
-
size: "default",
|
|
1718
|
-
variant: "default"
|
|
1719
|
-
});
|
|
1720
|
-
}
|
|
1721
|
-
});
|
|
1722
|
-
function DynamicIcon({ name, ...props }) {
|
|
1723
|
-
if (!name) return null;
|
|
1724
|
-
const LucideIcon = lucideReact.icons[name];
|
|
1725
|
-
if (!LucideIcon) return null;
|
|
1726
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LucideIcon, { ...props });
|
|
1727
|
-
}
|
|
1728
|
-
var init_dynamic_icon = __esm({
|
|
1729
|
-
"src/ui/primitives/dynamic-icon.tsx"() {
|
|
1730
|
-
"use client";
|
|
1731
|
-
}
|
|
1732
|
-
});
|
|
1733
|
-
function Progress({
|
|
1734
|
-
className,
|
|
1735
|
-
value,
|
|
1736
|
-
max,
|
|
1737
|
-
...props
|
|
1738
|
-
}) {
|
|
1739
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1740
|
-
ProgressPrimitive__namespace.Root,
|
|
1741
|
-
{
|
|
1742
|
-
"data-slot": "progress",
|
|
1743
|
-
className: cn(
|
|
1744
|
-
"relative h-2 w-full overflow-hidden rounded-lg bg-primary/20",
|
|
1745
|
-
className
|
|
1746
|
-
),
|
|
1747
|
-
max,
|
|
1748
|
-
...props,
|
|
1749
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1750
|
-
ProgressPrimitive__namespace.Indicator,
|
|
1751
|
-
{
|
|
1752
|
-
"data-slot": "progress-indicator",
|
|
1753
|
-
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
1754
|
-
style: {
|
|
1755
|
-
transform: `translateX(-${100 - (value || 0) / (max || 100) * 100}%)`
|
|
1756
|
-
}
|
|
1757
|
-
}
|
|
1758
|
-
)
|
|
1759
|
-
}
|
|
1760
|
-
);
|
|
1761
|
-
}
|
|
1762
|
-
var init_progress = __esm({
|
|
1763
|
-
"src/ui/feedback/progress.tsx"() {
|
|
1764
|
-
"use client";
|
|
1765
|
-
init_utils();
|
|
1766
|
-
}
|
|
1767
|
-
});
|
|
1768
|
-
function Sheet({
|
|
1769
|
-
...props
|
|
1770
|
-
}) {
|
|
1771
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
|
|
1772
|
-
}
|
|
1773
|
-
function SheetTrigger({
|
|
1774
|
-
className,
|
|
1775
|
-
...props
|
|
1776
|
-
}) {
|
|
1777
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1778
|
-
SheetPrimitive__namespace.Trigger,
|
|
1779
|
-
{
|
|
1780
|
-
"data-slot": "sheet-trigger",
|
|
1781
|
-
className: cn("cursor-pointer", className),
|
|
1782
|
-
...props
|
|
1783
|
-
}
|
|
1784
|
-
);
|
|
1785
|
-
}
|
|
1786
|
-
function SheetClose({
|
|
1787
|
-
...props
|
|
1788
|
-
}) {
|
|
1789
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { "data-slot": "sheet-close", ...props });
|
|
1790
|
-
}
|
|
1791
|
-
function SheetPortal({
|
|
1792
|
-
...props
|
|
1793
|
-
}) {
|
|
1794
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1795
|
-
}
|
|
1796
|
-
function SheetOverlay({
|
|
1797
|
-
className,
|
|
1798
|
-
...props
|
|
1799
|
-
}) {
|
|
1800
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1801
|
-
SheetPrimitive__namespace.Overlay,
|
|
1802
|
-
{
|
|
1803
|
-
"data-slot": "sheet-overlay",
|
|
1804
|
-
className: cn(
|
|
1805
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1806
|
-
className
|
|
1807
|
-
),
|
|
1808
|
-
...props
|
|
1809
|
-
}
|
|
1810
|
-
);
|
|
1811
|
-
}
|
|
1812
|
-
function SheetContent({
|
|
1813
|
-
className,
|
|
1814
|
-
children,
|
|
1815
|
-
side = "right",
|
|
1816
|
-
...props
|
|
1817
|
-
}) {
|
|
1818
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1819
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1820
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1821
|
-
SheetPrimitive__namespace.Content,
|
|
1822
|
-
{
|
|
1823
|
-
"data-slot": "sheet-content",
|
|
1824
|
-
className: cn(exports.sheetVariants({ side }), className),
|
|
1825
|
-
...props,
|
|
1826
|
-
children
|
|
1827
|
-
}
|
|
1828
|
-
)
|
|
1829
|
-
] });
|
|
1830
|
-
}
|
|
1831
|
-
function SheetHeader({ className, ...props }) {
|
|
1832
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1833
|
-
"div",
|
|
1834
|
-
{
|
|
1835
|
-
"data-slot": "sheet-header",
|
|
1836
|
-
className: cn("flex flex-col space-y-1", className),
|
|
1837
|
-
...props
|
|
1838
|
-
}
|
|
1839
|
-
);
|
|
1840
|
-
}
|
|
1841
|
-
function SheetFooter({ className, ...props }) {
|
|
1842
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1843
|
-
"div",
|
|
1844
|
-
{
|
|
1845
|
-
"data-slot": "sheet-footer",
|
|
1846
|
-
className: cn(
|
|
1847
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",
|
|
1848
|
-
className
|
|
1849
|
-
),
|
|
1850
|
-
...props
|
|
1851
|
-
}
|
|
1852
|
-
);
|
|
1853
|
-
}
|
|
1854
|
-
function SheetTitle({
|
|
1855
|
-
className,
|
|
1856
|
-
...props
|
|
1857
|
-
}) {
|
|
1858
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
|
-
SheetPrimitive__namespace.Title,
|
|
1860
|
-
{
|
|
1861
|
-
"data-slot": "sheet-title",
|
|
1862
|
-
className: cn("text-lg font-semibold text-foreground", className),
|
|
1863
|
-
...props
|
|
1864
|
-
}
|
|
1865
|
-
);
|
|
1866
|
-
}
|
|
1867
|
-
function SheetDescription({
|
|
1868
|
-
className,
|
|
1869
|
-
...props
|
|
1870
|
-
}) {
|
|
1871
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1872
|
-
SheetPrimitive__namespace.Description,
|
|
1873
|
-
{
|
|
1874
|
-
"data-slot": "sheet-description",
|
|
1875
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
1876
|
-
...props
|
|
1877
|
-
}
|
|
1878
|
-
);
|
|
1879
|
-
}
|
|
1880
|
-
exports.sheetVariants = void 0;
|
|
1881
|
-
var init_sheet = __esm({
|
|
1882
|
-
"src/ui/feedback/sheet.tsx"() {
|
|
1883
|
-
"use client";
|
|
1884
|
-
init_utils();
|
|
1885
|
-
exports.sheetVariants = classVarianceAuthority.cva(
|
|
1886
|
-
"fixed z-50 gap-4 bg-background p-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1887
|
-
{
|
|
1888
|
-
variants: {
|
|
1889
|
-
side: {
|
|
1890
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1891
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1892
|
-
left: "inset-y-0 left-0 h-full w-72 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
1893
|
-
right: "inset-y-0 right-0 h-full w-72 border-s data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
1894
|
-
start: "inset-y-0 start-0 h-full w-72 border-e data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left data-[state=closed]:rtl:slide-out-to-right data-[state=open]:rtl:slide-in-from-right sm:max-w-sm",
|
|
1895
|
-
end: "inset-y-0 end-0 h-full w-72 border-s data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right data-[state=closed]:rtl:slide-out-to-left data-[state=open]:rtl:slide-in-from-left sm:max-w-sm"
|
|
1896
|
-
}
|
|
1897
|
-
},
|
|
1898
|
-
defaultVariants: {
|
|
1899
|
-
side: "right"
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
);
|
|
1903
|
-
}
|
|
1904
|
-
});
|
|
1905
|
-
var init_alert = __esm({
|
|
1906
|
-
"src/ui/feedback/alert.tsx"() {
|
|
1907
|
-
classVarianceAuthority.cva(
|
|
1908
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
1909
|
-
{
|
|
1910
|
-
variants: {
|
|
1911
|
-
variant: {
|
|
1912
|
-
default: "bg-background text-foreground",
|
|
1913
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1914
|
-
}
|
|
1915
|
-
},
|
|
1916
|
-
defaultVariants: {
|
|
1917
|
-
variant: "default"
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
);
|
|
1921
|
-
}
|
|
1922
|
-
});
|
|
1923
|
-
function ContextMenu({
|
|
1924
|
-
...props
|
|
1925
|
-
}) {
|
|
1926
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { "data-slot": "context-menu", ...props });
|
|
1927
|
-
}
|
|
1928
|
-
function ContextMenuTrigger({
|
|
1929
|
-
...props
|
|
1930
|
-
}) {
|
|
1931
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
1932
|
-
}
|
|
1933
|
-
function ContextMenuGroup({
|
|
1934
|
-
...props
|
|
1935
|
-
}) {
|
|
1936
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Group, { "data-slot": "context-menu-group", ...props });
|
|
1937
|
-
}
|
|
1938
|
-
function ContextMenuPortal({
|
|
1939
|
-
...props
|
|
1940
|
-
}) {
|
|
1941
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
1942
|
-
}
|
|
1943
|
-
function ContextMenuSub({
|
|
1944
|
-
...props
|
|
1945
|
-
}) {
|
|
1946
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
1947
|
-
}
|
|
1948
|
-
function ContextMenuRadioGroup({
|
|
1949
|
-
...props
|
|
1950
|
-
}) {
|
|
1951
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1952
|
-
ContextMenuPrimitive__namespace.RadioGroup,
|
|
1953
|
-
{
|
|
1954
|
-
"data-slot": "context-menu-radio-group",
|
|
1955
|
-
...props
|
|
1956
|
-
}
|
|
1957
|
-
);
|
|
1958
|
-
}
|
|
1959
|
-
function ContextMenuSubTrigger({
|
|
1960
|
-
className,
|
|
1961
|
-
inset,
|
|
1962
|
-
children,
|
|
1963
|
-
...props
|
|
1964
|
-
}) {
|
|
1965
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1966
|
-
ContextMenuPrimitive__namespace.SubTrigger,
|
|
1967
|
-
{
|
|
1968
|
-
"data-slot": "context-menu-sub-trigger",
|
|
1969
|
-
className: cn(
|
|
1970
|
-
"flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1971
|
-
inset && "ps-8",
|
|
1972
|
-
className
|
|
1973
|
-
),
|
|
1974
|
-
...props,
|
|
1975
|
-
children: [
|
|
1976
|
-
children,
|
|
1977
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
1978
|
-
]
|
|
1979
|
-
}
|
|
1980
|
-
);
|
|
1981
|
-
}
|
|
1982
|
-
function ContextMenuSubContent({
|
|
1983
|
-
className,
|
|
1984
|
-
...props
|
|
1985
|
-
}) {
|
|
1986
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1987
|
-
ContextMenuPrimitive__namespace.SubContent,
|
|
1988
|
-
{
|
|
1989
|
-
"data-slot": "context-menu-sub-content",
|
|
1990
|
-
className: cn(
|
|
1991
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
|
|
1992
|
-
className
|
|
1993
|
-
),
|
|
1994
|
-
...props
|
|
1995
|
-
}
|
|
1996
|
-
);
|
|
1997
|
-
}
|
|
1998
|
-
function ContextMenuContent({
|
|
1999
|
-
className,
|
|
2000
|
-
...props
|
|
2001
|
-
}) {
|
|
2002
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2003
|
-
ContextMenuPrimitive__namespace.Content,
|
|
2004
|
-
{
|
|
2005
|
-
"data-slot": "context-menu-content",
|
|
2006
|
-
className: cn(
|
|
2007
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
|
|
2008
|
-
className
|
|
2009
|
-
),
|
|
2010
|
-
...props
|
|
2011
|
-
}
|
|
2012
|
-
) });
|
|
2013
|
-
}
|
|
2014
|
-
function ContextMenuItem({
|
|
2015
|
-
className,
|
|
2016
|
-
inset,
|
|
2017
|
-
variant = "default",
|
|
2018
|
-
...props
|
|
2019
|
-
}) {
|
|
2020
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2021
|
-
ContextMenuPrimitive__namespace.Item,
|
|
2022
|
-
{
|
|
2023
|
-
"data-slot": "context-menu-item",
|
|
2024
|
-
"data-inset": inset,
|
|
2025
|
-
"data-variant": variant,
|
|
2026
|
-
className: cn(
|
|
2027
|
-
"relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
2028
|
-
className
|
|
2029
|
-
),
|
|
2030
|
-
...props
|
|
2031
|
-
}
|
|
2032
|
-
);
|
|
2033
|
-
}
|
|
2034
|
-
function ContextMenuCheckboxItem({
|
|
2035
|
-
className,
|
|
2036
|
-
children,
|
|
2037
|
-
checked,
|
|
2038
|
-
...props
|
|
2039
|
-
}) {
|
|
2040
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2041
|
-
ContextMenuPrimitive__namespace.CheckboxItem,
|
|
2042
|
-
{
|
|
2043
|
-
"data-slot": "context-menu-checkbox-item",
|
|
2044
|
-
className: cn(
|
|
2045
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2046
|
-
className
|
|
2047
|
-
),
|
|
2048
|
-
checked,
|
|
2049
|
-
...props,
|
|
2050
|
-
children: [
|
|
2051
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
2052
|
-
children
|
|
2053
|
-
]
|
|
2054
|
-
}
|
|
2055
|
-
);
|
|
2056
|
-
}
|
|
2057
|
-
function ContextMenuRadioItem({
|
|
2058
|
-
className,
|
|
2059
|
-
children,
|
|
2060
|
-
...props
|
|
2061
|
-
}) {
|
|
2062
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2063
|
-
ContextMenuPrimitive__namespace.RadioItem,
|
|
2064
|
-
{
|
|
2065
|
-
"data-slot": "context-menu-radio-item",
|
|
2066
|
-
className: cn(
|
|
2067
|
-
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 ps-8 pe-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2068
|
-
className
|
|
2069
|
-
),
|
|
2070
|
-
...props,
|
|
2071
|
-
children: [
|
|
2072
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Dot, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2073
|
-
children
|
|
2074
|
-
]
|
|
2075
|
-
}
|
|
2076
|
-
);
|
|
2077
|
-
}
|
|
2078
|
-
function ContextMenuLabel({
|
|
2079
|
-
className,
|
|
2080
|
-
inset,
|
|
2081
|
-
...props
|
|
2082
|
-
}) {
|
|
2083
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2084
|
-
ContextMenuPrimitive__namespace.Label,
|
|
2085
|
-
{
|
|
2086
|
-
"data-slot": "context-menu-label",
|
|
2087
|
-
className: cn(
|
|
2088
|
-
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
2089
|
-
inset && "ps-8",
|
|
2090
|
-
className
|
|
2091
|
-
),
|
|
2092
|
-
...props
|
|
2093
|
-
}
|
|
2094
|
-
);
|
|
2095
|
-
}
|
|
2096
|
-
function ContextMenuSeparator({
|
|
2097
|
-
className,
|
|
2098
|
-
...props
|
|
2099
|
-
}) {
|
|
2100
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2101
|
-
ContextMenuPrimitive__namespace.Separator,
|
|
2102
|
-
{
|
|
2103
|
-
"data-slot": "context-menu-separator",
|
|
2104
|
-
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
2105
|
-
...props
|
|
2106
|
-
}
|
|
2107
|
-
);
|
|
2108
|
-
}
|
|
2109
|
-
function ContextMenuShortcut({
|
|
2110
|
-
className,
|
|
2111
|
-
...props
|
|
2112
|
-
}) {
|
|
2113
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2114
|
-
"span",
|
|
2115
|
-
{
|
|
2116
|
-
"data-slot": "context-menu-shortcut",
|
|
2117
|
-
className: cn(
|
|
2118
|
-
"ms-auto text-sm tracking-widest text-muted-foreground",
|
|
2119
|
-
className
|
|
2120
|
-
),
|
|
2121
|
-
...props
|
|
2122
|
-
}
|
|
2123
|
-
);
|
|
2124
|
-
}
|
|
2125
|
-
var init_context_menu = __esm({
|
|
2126
|
-
"src/ui/feedback/context-menu.tsx"() {
|
|
2127
|
-
"use client";
|
|
2128
|
-
init_utils();
|
|
2129
|
-
}
|
|
2130
|
-
});
|
|
2131
|
-
function Drawer({
|
|
2132
|
-
shouldScaleBackground = true,
|
|
2133
|
-
...props
|
|
2134
|
-
}) {
|
|
2135
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2136
|
-
vaul.Drawer.Root,
|
|
2137
|
-
{
|
|
2138
|
-
"data-slot": "drawer",
|
|
2139
|
-
shouldScaleBackground,
|
|
2140
|
-
...props
|
|
2141
|
-
}
|
|
2142
|
-
);
|
|
2143
|
-
}
|
|
2144
|
-
function DrawerTrigger({
|
|
2145
|
-
className,
|
|
2146
|
-
...props
|
|
2147
|
-
}) {
|
|
2148
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2149
|
-
vaul.Drawer.Trigger,
|
|
2150
|
-
{
|
|
2151
|
-
"data-slot": "drawer-trigger",
|
|
2152
|
-
className: cn("cursor-pointer", className),
|
|
2153
|
-
...props
|
|
2154
|
-
}
|
|
2155
|
-
);
|
|
2156
|
-
}
|
|
2157
|
-
function DrawerPortal({
|
|
2158
|
-
children,
|
|
2159
|
-
...props
|
|
2160
|
-
}) {
|
|
2161
|
-
const Portal8 = vaul.Drawer.Portal;
|
|
2162
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Portal8, { "data-slot": "drawer-portal", ...props, children });
|
|
2163
|
-
}
|
|
2164
|
-
function DrawerClose({
|
|
2165
|
-
...props
|
|
2166
|
-
}) {
|
|
2167
|
-
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { "data-slot": "drawer-close", ...props });
|
|
2168
|
-
}
|
|
2169
|
-
function DrawerOverlay({
|
|
2170
|
-
className,
|
|
2171
|
-
...props
|
|
2172
|
-
}) {
|
|
2173
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2174
|
-
vaul.Drawer.Overlay,
|
|
2175
|
-
{
|
|
2176
|
-
"data-slot": "drawer-overlay",
|
|
2177
|
-
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
2178
|
-
...props
|
|
2179
|
-
}
|
|
2180
|
-
);
|
|
2181
|
-
}
|
|
2182
|
-
function DrawerContent({
|
|
2183
|
-
className,
|
|
2184
|
-
children,
|
|
2185
|
-
...props
|
|
2186
|
-
}) {
|
|
2187
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
2188
|
-
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
2189
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2190
|
-
vaul.Drawer.Content,
|
|
2191
|
-
{
|
|
2192
|
-
"data-slot": "drawer-content",
|
|
2193
|
-
className: cn(
|
|
2194
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2195
|
-
className
|
|
2196
|
-
),
|
|
2197
|
-
...props,
|
|
2198
|
-
children: [
|
|
2199
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2200
|
-
children
|
|
2201
|
-
]
|
|
2202
|
-
}
|
|
2203
|
-
)
|
|
2204
|
-
] });
|
|
2205
|
-
}
|
|
2206
|
-
function DrawerHeader({ className, ...props }) {
|
|
2207
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2208
|
-
"div",
|
|
2209
|
-
{
|
|
2210
|
-
"data-slot": "drawer-header",
|
|
2211
|
-
className: cn("grid gap-1.5 p-4 text-center sm:text-start", className),
|
|
2212
|
-
...props
|
|
2213
|
-
}
|
|
2214
|
-
);
|
|
2215
|
-
}
|
|
2216
|
-
function DrawerFooter({ className, ...props }) {
|
|
2217
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2218
|
-
"div",
|
|
2219
|
-
{
|
|
2220
|
-
"data-slot": "drawer-footer",
|
|
2221
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
2222
|
-
...props
|
|
2223
|
-
}
|
|
2224
|
-
);
|
|
2225
|
-
}
|
|
2226
|
-
function DrawerTitle({
|
|
2227
|
-
className,
|
|
2228
|
-
...props
|
|
2229
|
-
}) {
|
|
2230
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2231
|
-
vaul.Drawer.Title,
|
|
2232
|
-
{
|
|
2233
|
-
"data-slot": "drawer-title",
|
|
2234
|
-
className: cn(
|
|
2235
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
2236
|
-
className
|
|
2237
|
-
),
|
|
2238
|
-
...props
|
|
2239
|
-
}
|
|
2240
|
-
);
|
|
2241
|
-
}
|
|
2242
|
-
function DrawerDescription({
|
|
2243
|
-
className,
|
|
2244
|
-
...props
|
|
2245
|
-
}) {
|
|
2246
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2247
|
-
vaul.Drawer.Description,
|
|
2248
|
-
{
|
|
2249
|
-
"data-slot": "drawer-description",
|
|
2250
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
2251
|
-
...props
|
|
2252
|
-
}
|
|
2253
|
-
);
|
|
2254
|
-
}
|
|
2255
|
-
var init_drawer = __esm({
|
|
2256
|
-
"src/ui/feedback/drawer.tsx"() {
|
|
2257
|
-
"use client";
|
|
2258
|
-
init_utils();
|
|
2259
|
-
}
|
|
2260
|
-
});
|
|
2261
|
-
function Toaster({ ...props }) {
|
|
2262
|
-
const { settings } = useSettings();
|
|
2263
|
-
const mode = settings.mode;
|
|
2264
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
|
-
sonner.Toaster,
|
|
2266
|
-
{
|
|
2267
|
-
theme: mode,
|
|
2268
|
-
className: "toaster group",
|
|
2269
|
-
toastOptions: {
|
|
2270
|
-
classNames: {
|
|
2271
|
-
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
2272
|
-
description: "group-[.toast]:text-muted-foreground",
|
|
2273
|
-
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
2274
|
-
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
2275
|
-
}
|
|
2276
|
-
},
|
|
2277
|
-
richColors: true,
|
|
2278
|
-
closeButton: true,
|
|
2279
|
-
...props
|
|
2280
|
-
}
|
|
2281
|
-
);
|
|
2282
|
-
}
|
|
2283
|
-
var init_sonner = __esm({
|
|
2284
|
-
"src/ui/feedback/sonner.tsx"() {
|
|
2285
|
-
"use client";
|
|
2286
|
-
init_hooks();
|
|
2287
|
-
}
|
|
2288
|
-
});
|
|
2289
|
-
var GlobalErrorEmitter;
|
|
2290
|
-
var init_error_dialog = __esm({
|
|
2291
|
-
"src/ui/feedback/error-dialog.tsx"() {
|
|
2292
|
-
"use client";
|
|
2293
|
-
GlobalErrorEmitter = class {
|
|
2294
|
-
constructor() {
|
|
2295
|
-
this.listeners = [];
|
|
2296
|
-
}
|
|
2297
|
-
subscribe(listener) {
|
|
2298
|
-
this.listeners.push(listener);
|
|
2299
|
-
return () => {
|
|
2300
|
-
this.listeners = this.listeners.filter((l) => l !== listener);
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
emit(data) {
|
|
2304
|
-
this.listeners.forEach((listener) => listener(data));
|
|
2305
|
-
}
|
|
2306
|
-
};
|
|
2307
|
-
new GlobalErrorEmitter();
|
|
2308
|
-
React6.createContext(null);
|
|
2309
|
-
}
|
|
2310
|
-
});
|
|
2311
|
-
var init_feedback = __esm({
|
|
2312
|
-
"src/ui/feedback/index.tsx"() {
|
|
2313
|
-
init_progress();
|
|
2314
|
-
init_sheet();
|
|
2315
|
-
init_alert();
|
|
2316
|
-
init_context_menu();
|
|
2317
|
-
init_drawer();
|
|
2318
|
-
init_sonner();
|
|
2319
|
-
init_error_dialog();
|
|
2320
|
-
}
|
|
2321
|
-
});
|
|
2322
|
-
|
|
2323
|
-
// src/hooks/use-tenant.ts
|
|
2324
|
-
var init_use_tenant = __esm({
|
|
2325
|
-
"src/hooks/use-tenant.ts"() {
|
|
2326
|
-
}
|
|
2327
|
-
});
|
|
2328
|
-
function useMediaQuery(query) {
|
|
2329
|
-
const [matches, setMatches] = React6.useState(false);
|
|
2330
|
-
React6.useEffect(() => {
|
|
2331
|
-
if (typeof window !== "undefined") {
|
|
2332
|
-
const media = window.matchMedia(query);
|
|
2333
|
-
setMatches(media.matches);
|
|
2334
|
-
const listener = (event) => setMatches(event.matches);
|
|
2335
|
-
media.addEventListener("change", listener);
|
|
2336
|
-
return () => media.removeEventListener("change", listener);
|
|
2337
|
-
}
|
|
2338
|
-
}, [query]);
|
|
2339
|
-
return matches;
|
|
2340
|
-
}
|
|
2341
|
-
function useMobile() {
|
|
2342
|
-
return useMediaQuery("(max-width: 768px)");
|
|
2343
|
-
}
|
|
2344
|
-
function useSettings() {
|
|
2345
|
-
const context = React6.useContext(SettingsContext);
|
|
2346
|
-
if (!context) {
|
|
2347
|
-
return defaultSettingsValue;
|
|
2348
|
-
}
|
|
2349
|
-
return context;
|
|
2350
|
-
}
|
|
2351
|
-
function usePrefetch() {
|
|
2352
|
-
const router = navigation.useRouter();
|
|
2353
|
-
const prefetchedRoutes = React6.useRef(/* @__PURE__ */ new Set());
|
|
2354
|
-
const prefetchedAPIs = React6.useRef(/* @__PURE__ */ new Set());
|
|
2355
|
-
const prefetchRoute = React6.useCallback(
|
|
2356
|
-
(route) => {
|
|
2357
|
-
if (prefetchedRoutes.current.has(route)) {
|
|
2358
|
-
return;
|
|
2359
|
-
}
|
|
2360
|
-
try {
|
|
2361
|
-
router.prefetch(route);
|
|
2362
|
-
prefetchedRoutes.current.add(route);
|
|
2363
|
-
} catch (error) {
|
|
2364
|
-
console.debug("Prefetch failed for route:", route, error);
|
|
2365
|
-
}
|
|
2366
|
-
},
|
|
2367
|
-
[router]
|
|
2368
|
-
);
|
|
2369
|
-
const prefetchAPI = React6.useCallback((endpoint, options) => {
|
|
2370
|
-
const url = endpoint;
|
|
2371
|
-
const cacheKey = `${url}-${JSON.stringify(options || {})}`;
|
|
2372
|
-
if (prefetchedAPIs.current.has(cacheKey)) {
|
|
2373
|
-
return;
|
|
2374
|
-
}
|
|
2375
|
-
try {
|
|
2376
|
-
fetch(url, {
|
|
2377
|
-
method: "HEAD",
|
|
2378
|
-
...options,
|
|
2379
|
-
headers: {
|
|
2380
|
-
...options?.headers,
|
|
2381
|
-
"Cache-Control": "max-age=60"
|
|
2382
|
-
}
|
|
2383
|
-
}).then(() => {
|
|
2384
|
-
prefetchedAPIs.current.add(cacheKey);
|
|
2385
|
-
}).catch(() => {
|
|
2386
|
-
});
|
|
2387
|
-
} catch (error) {
|
|
2388
|
-
console.debug("API prefetch failed:", url, error);
|
|
2389
|
-
}
|
|
2390
|
-
}, []);
|
|
2391
|
-
const prefetchCrudPage = React6.useCallback(
|
|
2392
|
-
(entity, apiEndpoint) => {
|
|
2393
|
-
const route = `/crud/${entity}`;
|
|
2394
|
-
prefetchRoute(route);
|
|
2395
|
-
const apiUrl = `${apiEndpoint}?page=1&pageSize=10`;
|
|
2396
|
-
prefetchAPI(apiUrl);
|
|
2397
|
-
},
|
|
2398
|
-
[prefetchRoute, prefetchAPI]
|
|
2399
|
-
);
|
|
2400
|
-
const prefetchNextPage = React6.useCallback(
|
|
2401
|
-
(apiEndpoint, currentPage, pageSize, queryParams) => {
|
|
2402
|
-
const nextPage = currentPage + 1;
|
|
2403
|
-
const params = new URLSearchParams({
|
|
2404
|
-
page: String(nextPage),
|
|
2405
|
-
pageSize: String(pageSize)
|
|
2406
|
-
});
|
|
2407
|
-
if (queryParams) {
|
|
2408
|
-
Object.entries(queryParams).forEach(([k, v]) => {
|
|
2409
|
-
if (v === void 0 || v === null || v === "") {
|
|
2410
|
-
return;
|
|
2411
|
-
}
|
|
2412
|
-
if (typeof v === "object" && !Array.isArray(v)) {
|
|
2413
|
-
params.append(k, JSON.stringify(v));
|
|
2414
|
-
} else if (Array.isArray(v)) {
|
|
2415
|
-
params.append(k, JSON.stringify(v));
|
|
2416
|
-
} else {
|
|
2417
|
-
params.append(k, String(v));
|
|
2418
|
-
}
|
|
2419
|
-
});
|
|
2420
|
-
}
|
|
2421
|
-
const apiUrl = `${apiEndpoint}?${params.toString()}`;
|
|
2422
|
-
prefetchAPI(apiUrl);
|
|
2423
|
-
},
|
|
2424
|
-
[prefetchAPI]
|
|
2425
|
-
);
|
|
2426
|
-
return {
|
|
2427
|
-
prefetchRoute,
|
|
2428
|
-
prefetchAPI,
|
|
2429
|
-
prefetchCrudPage,
|
|
2430
|
-
prefetchNextPage
|
|
2431
|
-
};
|
|
2432
|
-
}
|
|
2433
|
-
var defaultSettingsValue;
|
|
2434
|
-
var init_hooks = __esm({
|
|
2435
|
-
"src/hooks/index.tsx"() {
|
|
2436
|
-
"use client";
|
|
2437
|
-
init_providers();
|
|
2438
|
-
init_use_tenant();
|
|
2439
|
-
defaultSettingsValue = {
|
|
2440
|
-
settings: defaultSettings,
|
|
2441
|
-
updateSettings: () => {
|
|
2442
|
-
},
|
|
2443
|
-
resetSettings: () => {
|
|
2444
|
-
}
|
|
2445
|
-
};
|
|
2446
|
-
React6.createContext(null);
|
|
2447
|
-
}
|
|
2448
|
-
});
|
|
2449
|
-
function useSidebar() {
|
|
2450
|
-
const context = React6__namespace.useContext(SidebarContext);
|
|
2451
|
-
if (!context) {
|
|
2452
|
-
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2453
|
-
}
|
|
2454
|
-
return context;
|
|
2455
|
-
}
|
|
2456
|
-
var SIDEBAR_WIDTH, SIDEBAR_WIDTH_MOBILE, SIDEBAR_WIDTH_ICON, SIDEBAR_KEYBOARD_SHORTCUT, SidebarContext; exports.SidebarProvider = void 0; exports.Sidebar = void 0; exports.SidebarTrigger = void 0; exports.SidebarRail = void 0; exports.SidebarInset = void 0; exports.SidebarInput = void 0; exports.SidebarHeader = void 0; exports.SidebarFooter = void 0; exports.SidebarSeparator = void 0; exports.SidebarContent = void 0; exports.SidebarGroup = void 0; exports.SidebarGroupLabel = void 0; exports.SidebarGroupAction = void 0; exports.SidebarGroupContent = void 0; exports.SidebarMenu = void 0; exports.SidebarMenuItem = void 0; var sidebarMenuButtonVariants; exports.SidebarMenuButton = void 0; exports.SidebarMenuAction = void 0; exports.SidebarMenuBadge = void 0; exports.SidebarMenuSkeleton = void 0; exports.SidebarMenuSub = void 0; exports.SidebarMenuSubItem = void 0; exports.SidebarMenuSubButton = void 0;
|
|
2457
|
-
var init_sidebar = __esm({
|
|
2458
|
-
"src/ui/primitives/sidebar.tsx"() {
|
|
2459
|
-
"use client";
|
|
2460
|
-
init_hooks();
|
|
2461
|
-
init_utils();
|
|
2462
|
-
init_button();
|
|
2463
|
-
init_feedback();
|
|
2464
|
-
init_tooltip();
|
|
2465
|
-
SIDEBAR_WIDTH = "16rem";
|
|
2466
|
-
SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
2467
|
-
SIDEBAR_WIDTH_ICON = "3rem";
|
|
2468
|
-
SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
2469
|
-
SidebarContext = React6__namespace.createContext(null);
|
|
2470
|
-
exports.SidebarProvider = React6__namespace.forwardRef(
|
|
2471
|
-
({
|
|
2472
|
-
defaultOpen = false,
|
|
2473
|
-
open: openProp,
|
|
2474
|
-
onOpenChange: setOpenProp,
|
|
2475
|
-
className,
|
|
2476
|
-
style,
|
|
2477
|
-
children,
|
|
2478
|
-
...props
|
|
2479
|
-
}, ref) => {
|
|
2480
|
-
const isMobile = useMobile();
|
|
2481
|
-
const [openMobile, setOpenMobile] = React6__namespace.useState(false);
|
|
2482
|
-
const [hoverOpen, setHoverOpen] = React6__namespace.useState(false);
|
|
2483
|
-
const [_open, _setOpen] = React6__namespace.useState(defaultOpen);
|
|
2484
|
-
const open = openProp ?? _open;
|
|
2485
|
-
const setOpen = React6__namespace.useCallback(
|
|
2486
|
-
(value) => {
|
|
2487
|
-
if (setOpenProp) {
|
|
2488
|
-
return setOpenProp(typeof value === "function" ? value(open) : value);
|
|
2489
|
-
}
|
|
2490
|
-
_setOpen(value);
|
|
2491
|
-
},
|
|
2492
|
-
[setOpenProp, open]
|
|
2493
|
-
);
|
|
2494
|
-
const toggleSidebar = React6__namespace.useCallback(() => {
|
|
2495
|
-
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
2496
|
-
}, [isMobile, setOpen, setOpenMobile]);
|
|
2497
|
-
React6__namespace.useEffect(() => {
|
|
2498
|
-
const handleKeyDown = (event) => {
|
|
2499
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
2500
|
-
event.preventDefault();
|
|
2501
|
-
toggleSidebar();
|
|
2502
|
-
}
|
|
2503
|
-
};
|
|
2504
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
2505
|
-
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2506
|
-
}, [toggleSidebar]);
|
|
2507
|
-
const state = open ? "expanded" : "collapsed";
|
|
2508
|
-
const isHoverExpanded = !open && hoverOpen;
|
|
2509
|
-
const contextValue = React6__namespace.useMemo(
|
|
2510
|
-
() => ({
|
|
2511
|
-
state,
|
|
2512
|
-
open,
|
|
2513
|
-
setOpen,
|
|
2514
|
-
isMobile,
|
|
2515
|
-
openMobile,
|
|
2516
|
-
setOpenMobile,
|
|
2517
|
-
toggleSidebar,
|
|
2518
|
-
hoverOpen,
|
|
2519
|
-
setHoverOpen,
|
|
2520
|
-
isHoverExpanded
|
|
2521
|
-
}),
|
|
2522
|
-
[
|
|
2523
|
-
state,
|
|
2524
|
-
open,
|
|
2525
|
-
setOpen,
|
|
2526
|
-
isMobile,
|
|
2527
|
-
openMobile,
|
|
2528
|
-
setOpenMobile,
|
|
2529
|
-
toggleSidebar,
|
|
2530
|
-
hoverOpen,
|
|
2531
|
-
setHoverOpen,
|
|
2532
|
-
isHoverExpanded
|
|
2533
|
-
]
|
|
2534
|
-
);
|
|
2535
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2536
|
-
"div",
|
|
2537
|
-
{
|
|
2538
|
-
style: {
|
|
2539
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
2540
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
2541
|
-
...style
|
|
2542
|
-
},
|
|
2543
|
-
className: cn(
|
|
2544
|
-
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
2545
|
-
className
|
|
2546
|
-
),
|
|
2547
|
-
ref,
|
|
2548
|
-
...props,
|
|
2549
|
-
children
|
|
2550
|
-
}
|
|
2551
|
-
) }) });
|
|
2552
|
-
}
|
|
2553
|
-
);
|
|
2554
|
-
exports.SidebarProvider.displayName = "SidebarProvider";
|
|
2555
|
-
exports.Sidebar = React6__namespace.forwardRef(
|
|
2556
|
-
({
|
|
2557
|
-
side = "left",
|
|
2558
|
-
variant = "sidebar",
|
|
2559
|
-
collapsible = "offcanvas",
|
|
2560
|
-
hoverExpandEnabled = true,
|
|
2561
|
-
className,
|
|
2562
|
-
children,
|
|
2563
|
-
...props
|
|
2564
|
-
}, ref) => {
|
|
2565
|
-
const {
|
|
2566
|
-
isMobile,
|
|
2567
|
-
state,
|
|
2568
|
-
openMobile,
|
|
2569
|
-
setOpenMobile,
|
|
2570
|
-
setHoverOpen,
|
|
2571
|
-
isHoverExpanded
|
|
2572
|
-
} = useSidebar();
|
|
2573
|
-
const handleMouseEnter = React6__namespace.useCallback(() => {
|
|
2574
|
-
if (hoverExpandEnabled && state === "collapsed" && collapsible === "icon") {
|
|
2575
|
-
setHoverOpen(true);
|
|
2576
|
-
}
|
|
2577
|
-
}, [hoverExpandEnabled, state, collapsible, setHoverOpen]);
|
|
2578
|
-
const handleMouseLeave = React6__namespace.useCallback(() => {
|
|
2579
|
-
if (hoverExpandEnabled) {
|
|
2580
|
-
setHoverOpen(false);
|
|
2581
|
-
}
|
|
2582
|
-
}, [hoverExpandEnabled, setHoverOpen]);
|
|
2583
|
-
if (collapsible === "none") {
|
|
2584
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2585
|
-
"div",
|
|
2586
|
-
{
|
|
2587
|
-
className: cn(
|
|
2588
|
-
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
2589
|
-
className
|
|
2590
|
-
),
|
|
2591
|
-
ref,
|
|
2592
|
-
...props,
|
|
2593
|
-
children
|
|
2594
|
-
}
|
|
2595
|
-
);
|
|
2596
|
-
}
|
|
2597
|
-
if (isMobile) {
|
|
2598
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2599
|
-
SheetContent,
|
|
2600
|
-
{
|
|
2601
|
-
"data-sidebar": "sidebar",
|
|
2602
|
-
"data-mobile": "true",
|
|
2603
|
-
className: "w-(--sidebar-width) bg-background p-0 text-foreground [&>button]:hidden",
|
|
2604
|
-
style: {
|
|
2605
|
-
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
2606
|
-
},
|
|
2607
|
-
side,
|
|
2608
|
-
children: [
|
|
2609
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Mobile Menu" }),
|
|
2610
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
2611
|
-
]
|
|
2612
|
-
}
|
|
2613
|
-
) });
|
|
2614
|
-
}
|
|
2615
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2616
|
-
"div",
|
|
2617
|
-
{
|
|
2618
|
-
ref,
|
|
2619
|
-
className: cn(
|
|
2620
|
-
"group peer hidden md:block transition-colors duration-200",
|
|
2621
|
-
// Blue bg + white text when collapsed, white bg + dark text when expanded/hover
|
|
2622
|
-
state === "collapsed" && !isHoverExpanded ? "text-sidebar-foreground" : "text-foreground"
|
|
2623
|
-
),
|
|
2624
|
-
"data-state": state,
|
|
2625
|
-
"data-hover-expanded": isHoverExpanded,
|
|
2626
|
-
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
2627
|
-
"data-variant": variant,
|
|
2628
|
-
"data-side": side,
|
|
2629
|
-
onMouseEnter: handleMouseEnter,
|
|
2630
|
-
onMouseLeave: handleMouseLeave,
|
|
2631
|
-
children: [
|
|
2632
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2633
|
-
"div",
|
|
2634
|
-
{
|
|
2635
|
-
className: cn(
|
|
2636
|
-
"duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear",
|
|
2637
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
2638
|
-
"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
|
|
2639
|
-
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
2640
|
-
)
|
|
2641
|
-
}
|
|
2642
|
-
),
|
|
2643
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2644
|
-
"div",
|
|
2645
|
-
{
|
|
2646
|
-
className: cn(
|
|
2647
|
-
"duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",
|
|
2648
|
-
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)]",
|
|
2649
|
-
// Adjustments for collapsible=icon
|
|
2650
|
-
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_8px)] group-data-[collapsible=icon]:px-2.5" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[collapsible=icon]:border-r group-data-[collapsible=icon]:px-0",
|
|
2651
|
-
// Hover expand - override icon width to full width on hover
|
|
2652
|
-
"group-data-[hover-expanded=true]:!w-(--sidebar-width) group-data-[hover-expanded=true]:shadow-xl group-data-[hover-expanded=true]:z-[100]",
|
|
2653
|
-
className
|
|
2654
|
-
),
|
|
2655
|
-
...props,
|
|
2656
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
|
-
"div",
|
|
2658
|
-
{
|
|
2659
|
-
"data-sidebar": "sidebar",
|
|
2660
|
-
className: cn(
|
|
2661
|
-
"flex h-full w-full flex-col border-r transition-colors duration-200",
|
|
2662
|
-
// Blue background when collapsed, white when expanded/hover
|
|
2663
|
-
"group-data-[state=collapsed]:bg-sidebar group-data-[state=collapsed]:border-sidebar-border",
|
|
2664
|
-
"group-data-[state=expanded]:bg-background group-data-[state=expanded]:border-border",
|
|
2665
|
-
"group-data-[hover-expanded=true]:!bg-background group-data-[hover-expanded=true]:!border-border",
|
|
2666
|
-
"group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow"
|
|
2667
|
-
),
|
|
2668
|
-
children
|
|
2669
|
-
}
|
|
2670
|
-
)
|
|
2671
|
-
}
|
|
2672
|
-
)
|
|
2673
|
-
]
|
|
2674
|
-
}
|
|
2675
|
-
);
|
|
2676
|
-
}
|
|
2677
|
-
);
|
|
2678
|
-
exports.Sidebar.displayName = "Sidebar";
|
|
2679
|
-
exports.SidebarTrigger = React6__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
2680
|
-
const { toggleSidebar } = useSidebar();
|
|
2681
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2682
|
-
Button,
|
|
2683
|
-
{
|
|
2684
|
-
ref,
|
|
2685
|
-
"data-sidebar": "trigger",
|
|
2686
|
-
variant: "ghost",
|
|
2687
|
-
size: "icon",
|
|
2688
|
-
className: cn("h-7 w-7", className),
|
|
2689
|
-
onClick: (event) => {
|
|
2690
|
-
onClick?.(event);
|
|
2691
|
-
toggleSidebar();
|
|
2692
|
-
},
|
|
2693
|
-
...props,
|
|
2694
|
-
children: [
|
|
2695
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, {}),
|
|
2696
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
2697
|
-
]
|
|
2698
|
-
}
|
|
2699
|
-
);
|
|
2700
|
-
});
|
|
2701
|
-
exports.SidebarTrigger.displayName = "SidebarTrigger";
|
|
2702
|
-
exports.SidebarRail = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2703
|
-
const { toggleSidebar } = useSidebar();
|
|
2704
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2705
|
-
"button",
|
|
2706
|
-
{
|
|
2707
|
-
ref,
|
|
2708
|
-
"data-sidebar": "rail",
|
|
2709
|
-
"aria-label": "Toggle Sidebar",
|
|
2710
|
-
tabIndex: -1,
|
|
2711
|
-
onClick: toggleSidebar,
|
|
2712
|
-
title: "Toggle Sidebar",
|
|
2713
|
-
className: cn(
|
|
2714
|
-
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
2715
|
-
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
2716
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
2717
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
2718
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
2719
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
2720
|
-
className
|
|
2721
|
-
),
|
|
2722
|
-
...props
|
|
2723
|
-
}
|
|
2724
|
-
);
|
|
2725
|
-
});
|
|
2726
|
-
exports.SidebarRail.displayName = "SidebarRail";
|
|
2727
|
-
exports.SidebarInset = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2728
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2729
|
-
"main",
|
|
2730
|
-
{
|
|
2731
|
-
ref,
|
|
2732
|
-
className: cn(
|
|
2733
|
-
"relative flex min-h-svh flex-1 flex-col bg-muted/40 transition-[margin] duration-200 ease-linear",
|
|
2734
|
-
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
2735
|
-
className
|
|
2736
|
-
),
|
|
2737
|
-
...props
|
|
2738
|
-
}
|
|
2739
|
-
);
|
|
2740
|
-
});
|
|
2741
|
-
exports.SidebarInset.displayName = "SidebarInset";
|
|
2742
|
-
exports.SidebarInput = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2743
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2744
|
-
"input",
|
|
2745
|
-
{
|
|
2746
|
-
ref,
|
|
2747
|
-
"data-sidebar": "input",
|
|
2748
|
-
className: cn(
|
|
2749
|
-
"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
2750
|
-
className
|
|
2751
|
-
),
|
|
2752
|
-
...props
|
|
2753
|
-
}
|
|
2754
|
-
);
|
|
2755
|
-
});
|
|
2756
|
-
exports.SidebarInput.displayName = "SidebarInput";
|
|
2757
|
-
exports.SidebarHeader = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2758
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2759
|
-
"div",
|
|
2760
|
-
{
|
|
2761
|
-
ref,
|
|
2762
|
-
"data-sidebar": "header",
|
|
2763
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
2764
|
-
...props
|
|
2765
|
-
}
|
|
2766
|
-
);
|
|
2767
|
-
});
|
|
2768
|
-
exports.SidebarHeader.displayName = "SidebarHeader";
|
|
2769
|
-
exports.SidebarFooter = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2770
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2771
|
-
"div",
|
|
2772
|
-
{
|
|
2773
|
-
ref,
|
|
2774
|
-
"data-sidebar": "footer",
|
|
2775
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
2776
|
-
...props
|
|
2777
|
-
}
|
|
2778
|
-
);
|
|
2779
|
-
});
|
|
2780
|
-
exports.SidebarFooter.displayName = "SidebarFooter";
|
|
2781
|
-
exports.SidebarSeparator = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2782
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2783
|
-
"div",
|
|
2784
|
-
{
|
|
2785
|
-
ref,
|
|
2786
|
-
"data-sidebar": "separator",
|
|
2787
|
-
className: cn("mx-2 h-[1px] w-auto bg-sidebar-border", className),
|
|
2788
|
-
...props
|
|
2789
|
-
}
|
|
2790
|
-
);
|
|
2791
|
-
});
|
|
2792
|
-
exports.SidebarSeparator.displayName = "SidebarSeparator";
|
|
2793
|
-
exports.SidebarContent = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2794
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2795
|
-
"div",
|
|
2796
|
-
{
|
|
2797
|
-
ref,
|
|
2798
|
-
"data-sidebar": "content",
|
|
2799
|
-
className: cn(
|
|
2800
|
-
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto",
|
|
2801
|
-
// Hide overflow when collapsed, but show when hover-expanded
|
|
2802
|
-
"group-data-[collapsible=icon]:overflow-hidden group-data-[hover-expanded=true]:!overflow-auto",
|
|
2803
|
-
className
|
|
2804
|
-
),
|
|
2805
|
-
...props
|
|
2806
|
-
}
|
|
2807
|
-
);
|
|
2808
|
-
});
|
|
2809
|
-
exports.SidebarContent.displayName = "SidebarContent";
|
|
2810
|
-
exports.SidebarGroup = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2811
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2812
|
-
"div",
|
|
2813
|
-
{
|
|
2814
|
-
ref,
|
|
2815
|
-
"data-sidebar": "group",
|
|
2816
|
-
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
2817
|
-
...props
|
|
2818
|
-
}
|
|
2819
|
-
);
|
|
2820
|
-
});
|
|
2821
|
-
exports.SidebarGroup.displayName = "SidebarGroup";
|
|
2822
|
-
exports.SidebarGroupLabel = React6__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2823
|
-
const Comp = asChild ? reactSlot.Slot : "div";
|
|
2824
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2825
|
-
Comp,
|
|
2826
|
-
{
|
|
2827
|
-
ref,
|
|
2828
|
-
"data-sidebar": "group-label",
|
|
2829
|
-
className: cn(
|
|
2830
|
-
"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-bold text-primary uppercase tracking-wider outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2831
|
-
// Hide when collapsed, show when hover-expanded
|
|
2832
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
2833
|
-
"group-data-[hover-expanded=true]:!mt-0 group-data-[hover-expanded=true]:!opacity-100",
|
|
2834
|
-
className
|
|
2835
|
-
),
|
|
2836
|
-
...props
|
|
2837
|
-
}
|
|
2838
|
-
);
|
|
2839
|
-
});
|
|
2840
|
-
exports.SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
2841
|
-
exports.SidebarGroupAction = React6__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2842
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2843
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2844
|
-
Comp,
|
|
2845
|
-
{
|
|
2846
|
-
ref,
|
|
2847
|
-
"data-sidebar": "group-action",
|
|
2848
|
-
className: cn(
|
|
2849
|
-
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2850
|
-
// Increases the hit area of the button on mobile.
|
|
2851
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
2852
|
-
"group-data-[collapsible=icon]:hidden",
|
|
2853
|
-
className
|
|
2854
|
-
),
|
|
2855
|
-
...props
|
|
2856
|
-
}
|
|
2857
|
-
);
|
|
2858
|
-
});
|
|
2859
|
-
exports.SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
2860
|
-
exports.SidebarGroupContent = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2861
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2862
|
-
"div",
|
|
2863
|
-
{
|
|
2864
|
-
ref,
|
|
2865
|
-
"data-sidebar": "group-content",
|
|
2866
|
-
className: cn("w-full text-sm", className),
|
|
2867
|
-
...props
|
|
2868
|
-
}
|
|
2869
|
-
);
|
|
2870
|
-
});
|
|
2871
|
-
exports.SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2872
|
-
exports.SidebarMenu = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2873
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2874
|
-
"ul",
|
|
2875
|
-
{
|
|
2876
|
-
ref,
|
|
2877
|
-
"data-sidebar": "menu",
|
|
2878
|
-
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
2879
|
-
...props
|
|
2880
|
-
}
|
|
2881
|
-
);
|
|
2882
|
-
});
|
|
2883
|
-
exports.SidebarMenu.displayName = "SidebarMenu";
|
|
2884
|
-
exports.SidebarMenuItem = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2885
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2886
|
-
"li",
|
|
2887
|
-
{
|
|
2888
|
-
ref,
|
|
2889
|
-
"data-sidebar": "menu-item",
|
|
2890
|
-
className: cn("group/menu-item relative", className),
|
|
2891
|
-
...props
|
|
2892
|
-
}
|
|
2893
|
-
);
|
|
2894
|
-
});
|
|
2895
|
-
exports.SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
2896
|
-
sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
2897
|
-
// Base styles + hover-expand overrides
|
|
2898
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 group-data-[hover-expanded=true]:!size-auto group-data-[hover-expanded=true]:!w-full group-data-[hover-expanded=true]:!p-2",
|
|
2899
|
-
{
|
|
2900
|
-
variants: {
|
|
2901
|
-
variant: {
|
|
2902
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
2903
|
-
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
2904
|
-
},
|
|
2905
|
-
size: {
|
|
2906
|
-
default: "h-8 text-sm",
|
|
2907
|
-
sm: "h-7 text-xs",
|
|
2908
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
2909
|
-
},
|
|
2910
|
-
isActive: {
|
|
2911
|
-
true: "bg-primary/10 text-primary font-bold"
|
|
2912
|
-
}
|
|
2913
|
-
},
|
|
2914
|
-
defaultVariants: {
|
|
2915
|
-
variant: "default",
|
|
2916
|
-
size: "default"
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
);
|
|
2920
|
-
exports.SidebarMenuButton = React6__namespace.forwardRef(
|
|
2921
|
-
({
|
|
2922
|
-
asChild = false,
|
|
2923
|
-
isActive = false,
|
|
2924
|
-
variant = "default",
|
|
2925
|
-
size = "default",
|
|
2926
|
-
tooltip,
|
|
2927
|
-
className,
|
|
2928
|
-
...props
|
|
2929
|
-
}, ref) => {
|
|
2930
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2931
|
-
const { isMobile, state } = useSidebar();
|
|
2932
|
-
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
2933
|
-
Comp,
|
|
2934
|
-
{
|
|
2935
|
-
ref,
|
|
2936
|
-
"data-sidebar": "menu-button",
|
|
2937
|
-
"data-size": size,
|
|
2938
|
-
"data-active": isActive,
|
|
2939
|
-
className: cn(
|
|
2940
|
-
sidebarMenuButtonVariants({ variant, size, isActive }),
|
|
2941
|
-
className
|
|
2942
|
-
),
|
|
2943
|
-
...props
|
|
2944
|
-
}
|
|
2945
|
-
);
|
|
2946
|
-
if (!tooltip) {
|
|
2947
|
-
return button;
|
|
2948
|
-
}
|
|
2949
|
-
if (typeof tooltip === "string") {
|
|
2950
|
-
tooltip = {
|
|
2951
|
-
children: tooltip
|
|
2952
|
-
};
|
|
2953
|
-
}
|
|
2954
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
2955
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
2956
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2957
|
-
TooltipContent,
|
|
2958
|
-
{
|
|
2959
|
-
side: "right",
|
|
2960
|
-
align: "center",
|
|
2961
|
-
hidden: state !== "collapsed" || isMobile,
|
|
2962
|
-
...tooltip
|
|
2963
|
-
}
|
|
2964
|
-
)
|
|
2965
|
-
] });
|
|
2966
|
-
}
|
|
2967
|
-
);
|
|
2968
|
-
exports.SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2969
|
-
exports.SidebarMenuAction = React6__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2970
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2971
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2972
|
-
Comp,
|
|
2973
|
-
{
|
|
2974
|
-
ref,
|
|
2975
|
-
"data-sidebar": "menu-action",
|
|
2976
|
-
className: cn(
|
|
2977
|
-
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
2978
|
-
// Increases the hit area of the button on mobile.
|
|
2979
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
2980
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
2981
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2982
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2983
|
-
"group-data-[collapsible=icon]:hidden",
|
|
2984
|
-
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
2985
|
-
className
|
|
2986
|
-
),
|
|
2987
|
-
...props
|
|
2988
|
-
}
|
|
2989
|
-
);
|
|
2990
|
-
});
|
|
2991
|
-
exports.SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2992
|
-
exports.SidebarMenuBadge = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2993
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2994
|
-
"div",
|
|
2995
|
-
{
|
|
2996
|
-
ref,
|
|
2997
|
-
"data-sidebar": "menu-badge",
|
|
2998
|
-
className: cn(
|
|
2999
|
-
"pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none",
|
|
3000
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
3001
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
3002
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3003
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3004
|
-
"group-data-[collapsible=icon]:hidden",
|
|
3005
|
-
className
|
|
3006
|
-
),
|
|
3007
|
-
...props
|
|
3008
|
-
}
|
|
3009
|
-
);
|
|
3010
|
-
});
|
|
3011
|
-
exports.SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
3012
|
-
exports.SidebarMenuSkeleton = React6__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
3013
|
-
const width = React6__namespace.useMemo(() => {
|
|
3014
|
-
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3015
|
-
}, []);
|
|
3016
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3017
|
-
"div",
|
|
3018
|
-
{
|
|
3019
|
-
ref,
|
|
3020
|
-
"data-sidebar": "menu-skeleton",
|
|
3021
|
-
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
3022
|
-
...props,
|
|
3023
|
-
children: [
|
|
3024
|
-
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3025
|
-
"div",
|
|
3026
|
-
{
|
|
3027
|
-
className: "size-4 rounded-md animate-pulse bg-muted",
|
|
3028
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
3029
|
-
}
|
|
3030
|
-
),
|
|
3031
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3032
|
-
"div",
|
|
3033
|
-
{
|
|
3034
|
-
className: "h-4 flex-1 max-w-[--skeleton-width] animate-pulse bg-muted rounded-full",
|
|
3035
|
-
"data-sidebar": "menu-skeleton-text",
|
|
3036
|
-
style: {
|
|
3037
|
-
"--skeleton-width": width
|
|
3038
|
-
}
|
|
3039
|
-
}
|
|
3040
|
-
)
|
|
3041
|
-
]
|
|
3042
|
-
}
|
|
3043
|
-
);
|
|
3044
|
-
});
|
|
3045
|
-
exports.SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
3046
|
-
exports.SidebarMenuSub = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
3047
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3048
|
-
"ul",
|
|
3049
|
-
{
|
|
3050
|
-
ref,
|
|
3051
|
-
"data-sidebar": "menu-sub",
|
|
3052
|
-
className: cn(
|
|
3053
|
-
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
3054
|
-
// Hide when collapsed, show when hover-expanded
|
|
3055
|
-
"group-data-[collapsible=icon]:hidden group-data-[hover-expanded=true]:!flex",
|
|
3056
|
-
className
|
|
3057
|
-
),
|
|
3058
|
-
...props
|
|
3059
|
-
}
|
|
3060
|
-
);
|
|
3061
|
-
});
|
|
3062
|
-
exports.SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
3063
|
-
exports.SidebarMenuSubItem = React6__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
3064
|
-
exports.SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
3065
|
-
exports.SidebarMenuSubButton = React6__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
3066
|
-
const Comp = asChild ? reactSlot.Slot : "a";
|
|
3067
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3068
|
-
Comp,
|
|
3069
|
-
{
|
|
3070
|
-
ref,
|
|
3071
|
-
"data-sidebar": "menu-sub-button",
|
|
3072
|
-
"data-size": size,
|
|
3073
|
-
"data-active": isActive,
|
|
3074
|
-
className: cn(
|
|
3075
|
-
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 text-xs",
|
|
3076
|
-
"data-[active=true]:bg-primary/15 data-[active=true]:!text-primary data-[active=true]:font-bold",
|
|
3077
|
-
size === "sm" && "text-xs",
|
|
3078
|
-
size === "md" && "text-sm",
|
|
3079
|
-
className
|
|
3080
|
-
),
|
|
3081
|
-
...props
|
|
3082
|
-
}
|
|
3083
|
-
);
|
|
3084
|
-
});
|
|
3085
|
-
exports.SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
3086
|
-
}
|
|
3087
|
-
});
|
|
3088
|
-
function StickyLayout({ className, asChild, ...props }) {
|
|
3089
|
-
const Comp = asChild ? reactSlot.Slot : "div";
|
|
3090
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3091
|
-
Comp,
|
|
3092
|
-
{
|
|
3093
|
-
"data-slot": "sticky-layout",
|
|
3094
|
-
className: cn("grid items-start gap-4 lg:grid-cols-2", className),
|
|
3095
|
-
...props
|
|
3096
|
-
}
|
|
3097
|
-
);
|
|
3098
|
-
}
|
|
3099
|
-
function StickyLayoutPane({
|
|
3100
|
-
className,
|
|
3101
|
-
...props
|
|
3102
|
-
}) {
|
|
3103
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3104
|
-
"div",
|
|
3105
|
-
{
|
|
3106
|
-
"data-slot": "sticky-layout-pane",
|
|
3107
|
-
className: cn(
|
|
3108
|
-
"top-20 flex flex-col items-center text-center space-y-1.5 lg:sticky lg:block lg:text-start",
|
|
3109
|
-
className
|
|
3110
|
-
),
|
|
3111
|
-
...props
|
|
3112
|
-
}
|
|
3113
|
-
);
|
|
3114
|
-
}
|
|
3115
|
-
function StickyLayoutContent({
|
|
3116
|
-
className,
|
|
3117
|
-
...props
|
|
3118
|
-
}) {
|
|
3119
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3120
|
-
"div",
|
|
3121
|
-
{
|
|
3122
|
-
"data-slot": "sticky-layout-content",
|
|
3123
|
-
className: cn("space-y-4", className),
|
|
3124
|
-
...props
|
|
3125
|
-
}
|
|
3126
|
-
);
|
|
3127
|
-
}
|
|
3128
|
-
var init_sticky_layout = __esm({
|
|
3129
|
-
"src/ui/primitives/sticky-layout.tsx"() {
|
|
3130
|
-
init_utils();
|
|
3131
|
-
}
|
|
3132
|
-
});
|
|
3133
|
-
function PrefetchLink({
|
|
3134
|
-
children,
|
|
3135
|
-
crudEntity,
|
|
3136
|
-
href,
|
|
3137
|
-
className,
|
|
3138
|
-
...props
|
|
3139
|
-
}) {
|
|
3140
|
-
const { prefetchRoute, prefetchCrudPage } = usePrefetch();
|
|
3141
|
-
const handleMouseEnter = React6.useCallback(() => {
|
|
3142
|
-
if (typeof href === "string") {
|
|
3143
|
-
prefetchRoute(href);
|
|
3144
|
-
if (crudEntity) {
|
|
3145
|
-
prefetchCrudPage(crudEntity, `/api/${crudEntity}`);
|
|
3146
|
-
} else {
|
|
3147
|
-
const crudMatch = href.match(/\/(?:[a-z]{2}\/)?crud\/([^/]+)/);
|
|
3148
|
-
if (crudMatch) {
|
|
3149
|
-
const entity = crudMatch[1];
|
|
3150
|
-
prefetchCrudPage(entity, `/api/${entity}`);
|
|
3151
|
-
}
|
|
3152
|
-
}
|
|
3153
|
-
}
|
|
3154
|
-
}, [href, crudEntity, prefetchRoute, prefetchCrudPage]);
|
|
3155
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3156
|
-
Link2__default.default,
|
|
3157
|
-
{
|
|
3158
|
-
href,
|
|
3159
|
-
className,
|
|
3160
|
-
onMouseEnter: handleMouseEnter,
|
|
3161
|
-
...props,
|
|
3162
|
-
children
|
|
3163
|
-
}
|
|
3164
|
-
);
|
|
3165
|
-
}
|
|
3166
|
-
var init_prefetch_link = __esm({
|
|
3167
|
-
"src/ui/primitives/prefetch-link.tsx"() {
|
|
3168
|
-
"use client";
|
|
3169
|
-
init_hooks();
|
|
3170
|
-
}
|
|
3171
|
-
});
|
|
3172
|
-
exports.InputNumber = void 0;
|
|
3173
|
-
var init_input_number = __esm({
|
|
3174
|
-
"src/ui/primitives/input-number.tsx"() {
|
|
3175
|
-
"use client";
|
|
3176
|
-
init_utils();
|
|
3177
|
-
init_input();
|
|
3178
|
-
exports.InputNumber = React6__namespace.forwardRef(
|
|
3179
|
-
({ value, onChange, className, decimalScale = 0, suffix, ...props }, ref) => {
|
|
3180
|
-
const [displayValue, setDisplayValue] = React6__namespace.useState("");
|
|
3181
|
-
const parseDisplayValue = (val) => {
|
|
3182
|
-
const clean = val.replace(/\./g, "").replace(",", ".");
|
|
3183
|
-
return Number(clean);
|
|
3184
|
-
};
|
|
3185
|
-
const formatNumber = React6__namespace.useCallback(
|
|
3186
|
-
(num) => {
|
|
3187
|
-
return new Intl.NumberFormat("vi-VN", {
|
|
3188
|
-
maximumFractionDigits: decimalScale,
|
|
3189
|
-
minimumFractionDigits: 0
|
|
3190
|
-
}).format(num);
|
|
3191
|
-
},
|
|
3192
|
-
[decimalScale]
|
|
3193
|
-
);
|
|
3194
|
-
React6__namespace.useEffect(() => {
|
|
3195
|
-
if (value === null || value === void 0 || value === "") {
|
|
3196
|
-
setDisplayValue("");
|
|
3197
|
-
return;
|
|
3198
|
-
}
|
|
3199
|
-
const numValue = Number(value);
|
|
3200
|
-
if (isNaN(numValue)) return;
|
|
3201
|
-
const currentNum = parseDisplayValue(displayValue);
|
|
3202
|
-
if (currentNum !== numValue) {
|
|
3203
|
-
setDisplayValue(formatNumber(numValue));
|
|
3204
|
-
}
|
|
3205
|
-
}, [value, decimalScale, displayValue, formatNumber]);
|
|
3206
|
-
const handleChange = (e) => {
|
|
3207
|
-
const rawValue = e.target.value;
|
|
3208
|
-
let cleanVal = rawValue.replace(/[^0-9,]/g, "");
|
|
3209
|
-
const parts = cleanVal.split(",");
|
|
3210
|
-
if (parts.length > 2) {
|
|
3211
|
-
cleanVal = parts[0] + "," + parts.slice(1).join("");
|
|
3212
|
-
}
|
|
3213
|
-
if (cleanVal === "") {
|
|
3214
|
-
setDisplayValue("");
|
|
3215
|
-
onChange?.(null);
|
|
3216
|
-
return;
|
|
3217
|
-
}
|
|
3218
|
-
const [integerPart, decimalPart] = cleanVal.split(",");
|
|
3219
|
-
let formattedInteger = integerPart;
|
|
3220
|
-
if (integerPart) {
|
|
3221
|
-
formattedInteger = new Intl.NumberFormat("vi-VN").format(
|
|
3222
|
-
Number(integerPart)
|
|
3223
|
-
);
|
|
3224
|
-
}
|
|
3225
|
-
let newDisplayValue = formattedInteger;
|
|
3226
|
-
let finalDecimalPart = decimalPart;
|
|
3227
|
-
if (decimalPart !== void 0) {
|
|
3228
|
-
if (decimalScale !== void 0 && decimalPart.length > decimalScale) {
|
|
3229
|
-
finalDecimalPart = decimalPart.substring(0, decimalScale);
|
|
3230
|
-
}
|
|
3231
|
-
newDisplayValue += "," + finalDecimalPart;
|
|
3232
|
-
}
|
|
3233
|
-
setDisplayValue(newDisplayValue);
|
|
3234
|
-
let numStr = integerPart;
|
|
3235
|
-
if (finalDecimalPart !== void 0) {
|
|
3236
|
-
numStr += "." + finalDecimalPart;
|
|
3237
|
-
}
|
|
3238
|
-
const numValue = Number(numStr.replace(/\./g, ""));
|
|
3239
|
-
onChange?.(numValue);
|
|
3240
|
-
};
|
|
3241
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3242
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3243
|
-
Input,
|
|
3244
|
-
{
|
|
3245
|
-
...props,
|
|
3246
|
-
ref,
|
|
3247
|
-
type: "text",
|
|
3248
|
-
inputMode: "numeric",
|
|
3249
|
-
value: displayValue,
|
|
3250
|
-
onChange: handleChange,
|
|
3251
|
-
className: cn("pr-8", className)
|
|
3252
|
-
}
|
|
3253
|
-
),
|
|
3254
|
-
suffix && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-muted-foreground text-sm", children: suffix })
|
|
3255
|
-
] });
|
|
3256
|
-
}
|
|
3257
|
-
);
|
|
3258
|
-
exports.InputNumber.displayName = "InputNumber";
|
|
3259
|
-
}
|
|
3260
|
-
});
|
|
3261
|
-
|
|
3262
|
-
// src/ui/primitives/client.ts
|
|
3263
|
-
var init_client = __esm({
|
|
3264
|
-
"src/ui/primitives/client.ts"() {
|
|
3265
|
-
init_calendar();
|
|
3266
|
-
init_combobox();
|
|
3267
|
-
init_scroll_area();
|
|
3268
|
-
init_select();
|
|
3269
|
-
init_popover();
|
|
3270
|
-
init_dropdown_menu();
|
|
3271
|
-
init_switch();
|
|
3272
|
-
init_checkbox();
|
|
3273
|
-
init_label();
|
|
3274
|
-
init_tooltip();
|
|
3275
|
-
init_sidebar();
|
|
3276
|
-
init_resizable();
|
|
3277
|
-
init_slider();
|
|
3278
|
-
init_toggle();
|
|
3279
|
-
init_toggle_group();
|
|
3280
|
-
init_menubar();
|
|
3281
|
-
init_navigation_menu();
|
|
3282
|
-
init_sticky_layout();
|
|
3283
|
-
init_prefetch_link();
|
|
3284
|
-
init_dynamic_icon();
|
|
3285
|
-
init_input_number();
|
|
3286
|
-
init_sheet();
|
|
3287
|
-
init_context_menu();
|
|
3288
|
-
init_drawer();
|
|
3289
|
-
init_progress();
|
|
3290
|
-
init_sonner();
|
|
3291
|
-
}
|
|
3292
|
-
});
|
|
3293
|
-
init_client();
|
|
3294
|
-
|
|
3295
|
-
exports.Calendar = Calendar;
|
|
3296
|
-
exports.Combobox = Combobox;
|
|
3297
|
-
exports.ContextMenu = ContextMenu;
|
|
3298
|
-
exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem;
|
|
3299
|
-
exports.ContextMenuContent = ContextMenuContent;
|
|
3300
|
-
exports.ContextMenuGroup = ContextMenuGroup;
|
|
3301
|
-
exports.ContextMenuItem = ContextMenuItem;
|
|
3302
|
-
exports.ContextMenuLabel = ContextMenuLabel;
|
|
3303
|
-
exports.ContextMenuPortal = ContextMenuPortal;
|
|
3304
|
-
exports.ContextMenuRadioGroup = ContextMenuRadioGroup;
|
|
3305
|
-
exports.ContextMenuRadioItem = ContextMenuRadioItem;
|
|
3306
|
-
exports.ContextMenuSeparator = ContextMenuSeparator;
|
|
3307
|
-
exports.ContextMenuShortcut = ContextMenuShortcut;
|
|
3308
|
-
exports.ContextMenuSub = ContextMenuSub;
|
|
3309
|
-
exports.ContextMenuSubContent = ContextMenuSubContent;
|
|
3310
|
-
exports.ContextMenuSubTrigger = ContextMenuSubTrigger;
|
|
3311
|
-
exports.ContextMenuTrigger = ContextMenuTrigger;
|
|
3312
|
-
exports.Drawer = Drawer;
|
|
3313
|
-
exports.DrawerClose = DrawerClose;
|
|
3314
|
-
exports.DrawerContent = DrawerContent;
|
|
3315
|
-
exports.DrawerDescription = DrawerDescription;
|
|
3316
|
-
exports.DrawerFooter = DrawerFooter;
|
|
3317
|
-
exports.DrawerHeader = DrawerHeader;
|
|
3318
|
-
exports.DrawerOverlay = DrawerOverlay;
|
|
3319
|
-
exports.DrawerPortal = DrawerPortal;
|
|
3320
|
-
exports.DrawerTitle = DrawerTitle;
|
|
3321
|
-
exports.DrawerTrigger = DrawerTrigger;
|
|
3322
|
-
exports.DropdownMenu = DropdownMenu;
|
|
3323
|
-
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
3324
|
-
exports.DropdownMenuContent = DropdownMenuContent;
|
|
3325
|
-
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
3326
|
-
exports.DropdownMenuItem = DropdownMenuItem;
|
|
3327
|
-
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
3328
|
-
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
3329
|
-
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
3330
|
-
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
3331
|
-
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
3332
|
-
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
3333
|
-
exports.DropdownMenuSub = DropdownMenuSub;
|
|
3334
|
-
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
3335
|
-
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
3336
|
-
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
3337
|
-
exports.DynamicIcon = DynamicIcon;
|
|
3338
|
-
exports.Menubar = Menubar;
|
|
3339
|
-
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
3340
|
-
exports.MenubarContent = MenubarContent;
|
|
3341
|
-
exports.MenubarGroup = MenubarGroup;
|
|
3342
|
-
exports.MenubarItem = MenubarItem;
|
|
3343
|
-
exports.MenubarLabel = MenubarLabel;
|
|
3344
|
-
exports.MenubarMenu = MenubarMenu;
|
|
3345
|
-
exports.MenubarPortal = MenubarPortal;
|
|
3346
|
-
exports.MenubarRadioGroup = MenubarRadioGroup;
|
|
3347
|
-
exports.MenubarRadioItem = MenubarRadioItem;
|
|
3348
|
-
exports.MenubarSeparator = MenubarSeparator;
|
|
3349
|
-
exports.MenubarShortcut = MenubarShortcut;
|
|
3350
|
-
exports.MenubarSub = MenubarSub;
|
|
3351
|
-
exports.MenubarSubContent = MenubarSubContent;
|
|
3352
|
-
exports.MenubarSubTrigger = MenubarSubTrigger;
|
|
3353
|
-
exports.MenubarTrigger = MenubarTrigger;
|
|
3354
|
-
exports.NavigationMenu = NavigationMenu;
|
|
3355
|
-
exports.NavigationMenuContent = NavigationMenuContent;
|
|
3356
|
-
exports.NavigationMenuIndicator = NavigationMenuIndicator;
|
|
3357
|
-
exports.NavigationMenuItem = NavigationMenuItem;
|
|
3358
|
-
exports.NavigationMenuLink = NavigationMenuLink;
|
|
3359
|
-
exports.NavigationMenuList = NavigationMenuList;
|
|
3360
|
-
exports.NavigationMenuTrigger = NavigationMenuTrigger;
|
|
3361
|
-
exports.NavigationMenuViewport = NavigationMenuViewport;
|
|
3362
|
-
exports.Popover = Popover;
|
|
3363
|
-
exports.PopoverAnchor = PopoverAnchor;
|
|
3364
|
-
exports.PopoverContent = PopoverContent;
|
|
3365
|
-
exports.PopoverTrigger = PopoverTrigger;
|
|
3366
|
-
exports.PrefetchLink = PrefetchLink;
|
|
3367
|
-
exports.Progress = Progress;
|
|
3368
|
-
exports.ResizableHandle = ResizableHandle;
|
|
3369
|
-
exports.ResizablePanel = ResizablePanel;
|
|
3370
|
-
exports.ResizablePanelGroup = ResizablePanelGroup;
|
|
3371
|
-
exports.ScrollArea = ScrollArea;
|
|
3372
|
-
exports.ScrollBar = ScrollBar;
|
|
3373
|
-
exports.Select = Select;
|
|
3374
|
-
exports.SelectContent = SelectContent;
|
|
3375
|
-
exports.SelectGroup = SelectGroup;
|
|
3376
|
-
exports.SelectItem = SelectItem;
|
|
3377
|
-
exports.SelectLabel = SelectLabel;
|
|
3378
|
-
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
3379
|
-
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
3380
|
-
exports.SelectSeparator = SelectSeparator;
|
|
3381
|
-
exports.SelectTrigger = SelectTrigger;
|
|
3382
|
-
exports.SelectValue = SelectValue;
|
|
3383
|
-
exports.Sheet = Sheet;
|
|
3384
|
-
exports.SheetClose = SheetClose;
|
|
3385
|
-
exports.SheetContent = SheetContent;
|
|
3386
|
-
exports.SheetDescription = SheetDescription;
|
|
3387
|
-
exports.SheetFooter = SheetFooter;
|
|
3388
|
-
exports.SheetHeader = SheetHeader;
|
|
3389
|
-
exports.SheetOverlay = SheetOverlay;
|
|
3390
|
-
exports.SheetPortal = SheetPortal;
|
|
3391
|
-
exports.SheetTitle = SheetTitle;
|
|
3392
|
-
exports.SheetTrigger = SheetTrigger;
|
|
3393
|
-
exports.Slider = Slider;
|
|
3394
|
-
exports.StickyLayout = StickyLayout;
|
|
3395
|
-
exports.StickyLayoutContent = StickyLayoutContent;
|
|
3396
|
-
exports.StickyLayoutPane = StickyLayoutPane;
|
|
3397
|
-
exports.Switch = Switch;
|
|
3398
|
-
exports.Toaster = Toaster;
|
|
3399
|
-
exports.Toggle = Toggle;
|
|
3400
|
-
exports.ToggleGroup = ToggleGroup;
|
|
3401
|
-
exports.ToggleGroupItem = ToggleGroupItem;
|
|
3402
|
-
exports.Tooltip = Tooltip;
|
|
3403
|
-
exports.TooltipContent = TooltipContent;
|
|
3404
|
-
exports.TooltipProvider = TooltipProvider;
|
|
3405
|
-
exports.TooltipTrigger = TooltipTrigger;
|
|
3406
|
-
exports.useSidebar = useSidebar;
|
|
3407
|
-
//# sourceMappingURL=client.js.map
|
|
3408
|
-
//# sourceMappingURL=client.js.map
|