@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
package/dist/workflow/index.js
DELETED
|
@@ -1,3710 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var clsx = require('clsx');
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
5
|
-
var React12 = 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 CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
10
|
-
var lucideReact = require('lucide-react');
|
|
11
|
-
require('@radix-ui/react-dropdown-menu');
|
|
12
|
-
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
13
|
-
var TabsPrimitive = require('@radix-ui/react-tabs');
|
|
14
|
-
var Link7 = require('next/link');
|
|
15
|
-
require('next/navigation');
|
|
16
|
-
require('next/image');
|
|
17
|
-
require('react-day-picker');
|
|
18
|
-
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
19
|
-
require('@radix-ui/react-select');
|
|
20
|
-
require('@radix-ui/react-popover');
|
|
21
|
-
require('@radix-ui/react-switch');
|
|
22
|
-
var LabelPrimitive = require('@radix-ui/react-label');
|
|
23
|
-
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
24
|
-
require('react-resizable-panels');
|
|
25
|
-
require('@radix-ui/react-slider');
|
|
26
|
-
require('@radix-ui/react-toggle');
|
|
27
|
-
require('@radix-ui/react-toggle-group');
|
|
28
|
-
require('@radix-ui/react-menubar');
|
|
29
|
-
require('@radix-ui/react-navigation-menu');
|
|
30
|
-
require('@radix-ui/react-context-menu');
|
|
31
|
-
require('vaul');
|
|
32
|
-
require('@radix-ui/react-progress');
|
|
33
|
-
require('sonner');
|
|
34
|
-
require('framer-motion');
|
|
35
|
-
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
36
|
-
require('next-auth/react');
|
|
37
|
-
require('react-use');
|
|
38
|
-
require('@radix-ui/react-direction');
|
|
39
|
-
require('@radix-ui/react-alert-dialog');
|
|
40
|
-
require('@radix-ui/react-radio-group');
|
|
41
|
-
require('cmdk');
|
|
42
|
-
var dateFns = require('date-fns');
|
|
43
|
-
var dynamic = require('next/dynamic');
|
|
44
|
-
require('emoji-picker-react');
|
|
45
|
-
require('react-dropzone');
|
|
46
|
-
require('input-otp');
|
|
47
|
-
require('react-phone-number-input');
|
|
48
|
-
require('@tiptap/extension-color');
|
|
49
|
-
require('@tiptap/extension-image');
|
|
50
|
-
require('@tiptap/extension-link');
|
|
51
|
-
require('@tiptap/extension-placeholder');
|
|
52
|
-
require('@tiptap/extension-text-align');
|
|
53
|
-
require('@tiptap/extension-text-style');
|
|
54
|
-
require('@tiptap/extension-typography');
|
|
55
|
-
require('@tiptap/extension-underline');
|
|
56
|
-
require('@tiptap/react');
|
|
57
|
-
require('@tiptap/starter-kit');
|
|
58
|
-
require('react-hook-form');
|
|
59
|
-
require('recharts');
|
|
60
|
-
require('embla-carousel-react');
|
|
61
|
-
require('@radix-ui/react-accordion');
|
|
62
|
-
require('@dnd-kit/sortable');
|
|
63
|
-
require('@dnd-kit/utilities');
|
|
64
|
-
require('@dnd-kit/core');
|
|
65
|
-
require('react-dom');
|
|
66
|
-
require('@radix-ui/react-aspect-ratio');
|
|
67
|
-
require('hast-util-to-jsx-runtime');
|
|
68
|
-
require('shiki/bundle/web');
|
|
69
|
-
require('@radix-ui/react-collapsible');
|
|
70
|
-
require('@radix-ui/react-hover-card');
|
|
71
|
-
require('@hookform/resolvers/zod');
|
|
72
|
-
var locale = require('date-fns/locale');
|
|
73
|
-
|
|
74
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
75
|
-
|
|
76
|
-
function _interopNamespace(e) {
|
|
77
|
-
if (e && e.__esModule) return e;
|
|
78
|
-
var n = Object.create(null);
|
|
79
|
-
if (e) {
|
|
80
|
-
Object.keys(e).forEach(function (k) {
|
|
81
|
-
if (k !== 'default') {
|
|
82
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
83
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
84
|
-
enumerable: true,
|
|
85
|
-
get: function () { return e[k]; }
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
n.default = e;
|
|
91
|
-
return Object.freeze(n);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var React12__namespace = /*#__PURE__*/_interopNamespace(React12);
|
|
95
|
-
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
96
|
-
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
97
|
-
var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
|
|
98
|
-
var Link7__default = /*#__PURE__*/_interopDefault(Link7);
|
|
99
|
-
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
100
|
-
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
101
|
-
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
102
|
-
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
103
|
-
var dynamic__default = /*#__PURE__*/_interopDefault(dynamic);
|
|
104
|
-
|
|
105
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
106
|
-
var __esm = (fn, res) => function __init() {
|
|
107
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
108
|
-
};
|
|
109
|
-
function cn(...inputs) {
|
|
110
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
111
|
-
}
|
|
112
|
-
function getInitials(fullName) {
|
|
113
|
-
if (fullName.length === 0) return "";
|
|
114
|
-
const names = fullName.split(" ");
|
|
115
|
-
const initials = names.map((name) => name.charAt(0).toUpperCase()).join("");
|
|
116
|
-
return initials;
|
|
117
|
-
}
|
|
118
|
-
var Logger;
|
|
119
|
-
var init_utils = __esm({
|
|
120
|
-
"src/utils/index.ts"() {
|
|
121
|
-
Logger = class {
|
|
122
|
-
log(level, message, context, error) {
|
|
123
|
-
const entry = {
|
|
124
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
125
|
-
level,
|
|
126
|
-
message,
|
|
127
|
-
context
|
|
128
|
-
};
|
|
129
|
-
if (error instanceof Error) {
|
|
130
|
-
entry.error = {
|
|
131
|
-
name: error.name,
|
|
132
|
-
message: error.message,
|
|
133
|
-
stack: error.stack
|
|
134
|
-
};
|
|
135
|
-
} else if (error) {
|
|
136
|
-
entry.error = error;
|
|
137
|
-
}
|
|
138
|
-
const logString = JSON.stringify(entry);
|
|
139
|
-
switch (level) {
|
|
140
|
-
case "error":
|
|
141
|
-
console.error(logString);
|
|
142
|
-
break;
|
|
143
|
-
case "warn":
|
|
144
|
-
console.warn(logString);
|
|
145
|
-
break;
|
|
146
|
-
case "debug":
|
|
147
|
-
if (process.env.NODE_ENV === "development") console.debug(logString);
|
|
148
|
-
break;
|
|
149
|
-
default:
|
|
150
|
-
console.log(logString);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
info(message, context) {
|
|
154
|
-
this.log("info", message, context);
|
|
155
|
-
}
|
|
156
|
-
warn(message, context) {
|
|
157
|
-
this.log("warn", message, context);
|
|
158
|
-
}
|
|
159
|
-
error(message, error, context) {
|
|
160
|
-
this.log("error", message, context, error);
|
|
161
|
-
}
|
|
162
|
-
debug(message, context) {
|
|
163
|
-
this.log("debug", message, context);
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
new Logger();
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
var buttonVariants, Button;
|
|
170
|
-
var init_button = __esm({
|
|
171
|
-
"src/ui/primitives/button.tsx"() {
|
|
172
|
-
init_utils();
|
|
173
|
-
buttonVariants = classVarianceAuthority.cva(
|
|
174
|
-
"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",
|
|
175
|
-
{
|
|
176
|
-
variants: {
|
|
177
|
-
variant: {
|
|
178
|
-
// Existing variants (backwards-compatible)
|
|
179
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
180
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
181
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
182
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
183
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
184
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
185
|
-
// New Plane-inspired variants using semantic tokens
|
|
186
|
-
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",
|
|
187
|
-
danger: "bg-danger text-text-on-color hover:bg-danger-hover active:bg-danger-hover disabled:bg-layer-disabled disabled:text-text-disabled",
|
|
188
|
-
"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",
|
|
189
|
-
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",
|
|
190
|
-
tertiary: "bg-layer-3 text-text-secondary hover:bg-layer-3-hover active:bg-layer-3-hover disabled:bg-transparent disabled:text-text-disabled"
|
|
191
|
-
},
|
|
192
|
-
size: {
|
|
193
|
-
// Existing sizes (backwards-compatible)
|
|
194
|
-
default: "h-10 px-4 py-2",
|
|
195
|
-
sm: "h-9 rounded-md px-3",
|
|
196
|
-
lg: "h-11 rounded-md px-8",
|
|
197
|
-
icon: "h-10 w-10",
|
|
198
|
-
// New ERP-specific compact sizes
|
|
199
|
-
xs: "h-7 rounded-sm px-2 text-xs",
|
|
200
|
-
compact: "h-8 rounded-md px-3 text-xs",
|
|
201
|
-
"icon-sm": "h-8 w-8",
|
|
202
|
-
"icon-xs": "h-7 w-7"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
defaultVariants: {
|
|
206
|
-
variant: "default",
|
|
207
|
-
size: "default"
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
Button = React12__namespace.forwardRef(
|
|
212
|
-
({ className, variant, size, asChild = false, loading = false, prependIcon, appendIcon, children, disabled, ...props }, ref) => {
|
|
213
|
-
if (asChild) {
|
|
214
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
-
reactSlot.Slot,
|
|
216
|
-
{
|
|
217
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
218
|
-
ref,
|
|
219
|
-
...{ disabled: disabled || loading },
|
|
220
|
-
...props,
|
|
221
|
-
children: React12__namespace.isValidElement(children) && (prependIcon || appendIcon) ? React12__namespace.cloneElement(children, {}, /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
222
|
-
prependIcon && React12__namespace.cloneElement(prependIcon, {
|
|
223
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
224
|
-
}),
|
|
225
|
-
children.props.children,
|
|
226
|
-
appendIcon && React12__namespace.cloneElement(appendIcon, {
|
|
227
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
228
|
-
})
|
|
229
|
-
] })) : children
|
|
230
|
-
}
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
234
|
-
"button",
|
|
235
|
-
{
|
|
236
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
237
|
-
ref,
|
|
238
|
-
disabled: disabled || loading,
|
|
239
|
-
...props,
|
|
240
|
-
children: [
|
|
241
|
-
prependIcon && React12__namespace.cloneElement(prependIcon, {
|
|
242
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
243
|
-
}),
|
|
244
|
-
children,
|
|
245
|
-
appendIcon && React12__namespace.cloneElement(appendIcon, {
|
|
246
|
-
className: cn("shrink-0", size === "xs" || size === "compact" ? "size-3.5" : "size-4")
|
|
247
|
-
})
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
);
|
|
253
|
-
Button.displayName = "Button";
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
function Badge({ className, variant, size, ...props }) {
|
|
257
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(badgeVariants({ variant, size }), className), ...props });
|
|
258
|
-
}
|
|
259
|
-
var badgeVariants;
|
|
260
|
-
var init_badge = __esm({
|
|
261
|
-
"src/ui/primitives/badge.tsx"() {
|
|
262
|
-
init_utils();
|
|
263
|
-
badgeVariants = classVarianceAuthority.cva(
|
|
264
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
265
|
-
{
|
|
266
|
-
variants: {
|
|
267
|
-
variant: {
|
|
268
|
-
// Existing variants (backwards-compatible)
|
|
269
|
-
default: "border-transparent bg-primary text-primary-foreground",
|
|
270
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
271
|
-
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
272
|
-
outline: "text-foreground",
|
|
273
|
-
// Enhanced semantic variants (using Design Tokens)
|
|
274
|
-
success: "border-transparent bg-success-subtle text-success-text",
|
|
275
|
-
warning: "border-transparent bg-warning-subtle text-warning-text",
|
|
276
|
-
danger: "border-transparent bg-danger-subtle text-danger-text",
|
|
277
|
-
info: "border-transparent bg-info-subtle text-info-text",
|
|
278
|
-
accent: "border-transparent bg-accent-primary-subtle text-accent-primary"
|
|
279
|
-
},
|
|
280
|
-
size: {
|
|
281
|
-
default: "",
|
|
282
|
-
sm: "px-1.5 py-0 text-[10px]",
|
|
283
|
-
lg: "px-3 py-1 text-sm"
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
defaultVariants: {
|
|
287
|
-
variant: "default",
|
|
288
|
-
size: "default"
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
var Input;
|
|
295
|
-
var init_input = __esm({
|
|
296
|
-
"src/ui/primitives/input.tsx"() {
|
|
297
|
-
init_utils();
|
|
298
|
-
Input = React12__namespace.forwardRef(
|
|
299
|
-
({ className, type, ...props }, ref) => {
|
|
300
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
301
|
-
"input",
|
|
302
|
-
{
|
|
303
|
-
type,
|
|
304
|
-
className: cn(
|
|
305
|
-
"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",
|
|
306
|
-
className
|
|
307
|
-
),
|
|
308
|
-
ref,
|
|
309
|
-
...props
|
|
310
|
-
}
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
);
|
|
314
|
-
Input.displayName = "Input";
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
var Checkbox;
|
|
318
|
-
var init_checkbox = __esm({
|
|
319
|
-
"src/ui/primitives/checkbox.tsx"() {
|
|
320
|
-
"use client";
|
|
321
|
-
init_utils();
|
|
322
|
-
Checkbox = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
323
|
-
CheckboxPrimitive__namespace.Root,
|
|
324
|
-
{
|
|
325
|
-
ref,
|
|
326
|
-
className: cn(
|
|
327
|
-
"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",
|
|
328
|
-
className
|
|
329
|
-
),
|
|
330
|
-
...props,
|
|
331
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
332
|
-
CheckboxPrimitive__namespace.Indicator,
|
|
333
|
-
{
|
|
334
|
-
className: cn("flex items-center justify-center text-current"),
|
|
335
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
|
|
336
|
-
}
|
|
337
|
-
)
|
|
338
|
-
}
|
|
339
|
-
));
|
|
340
|
-
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
var Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter;
|
|
344
|
-
var init_card = __esm({
|
|
345
|
-
"src/ui/primitives/card.tsx"() {
|
|
346
|
-
init_utils();
|
|
347
|
-
Card = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
348
|
-
"div",
|
|
349
|
-
{
|
|
350
|
-
ref,
|
|
351
|
-
className: cn(
|
|
352
|
-
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
353
|
-
className
|
|
354
|
-
),
|
|
355
|
-
...props
|
|
356
|
-
}
|
|
357
|
-
));
|
|
358
|
-
Card.displayName = "Card";
|
|
359
|
-
CardHeader = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
-
"div",
|
|
361
|
-
{
|
|
362
|
-
ref,
|
|
363
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
364
|
-
...props
|
|
365
|
-
}
|
|
366
|
-
));
|
|
367
|
-
CardHeader.displayName = "CardHeader";
|
|
368
|
-
CardTitle = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
369
|
-
"h3",
|
|
370
|
-
{
|
|
371
|
-
ref,
|
|
372
|
-
className: cn(
|
|
373
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
374
|
-
className
|
|
375
|
-
),
|
|
376
|
-
...props
|
|
377
|
-
}
|
|
378
|
-
));
|
|
379
|
-
CardTitle.displayName = "CardTitle";
|
|
380
|
-
CardDescription = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
381
|
-
"p",
|
|
382
|
-
{
|
|
383
|
-
ref,
|
|
384
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
385
|
-
...props
|
|
386
|
-
}
|
|
387
|
-
));
|
|
388
|
-
CardDescription.displayName = "CardDescription";
|
|
389
|
-
CardContent = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
390
|
-
CardContent.displayName = "CardContent";
|
|
391
|
-
CardFooter = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
392
|
-
"div",
|
|
393
|
-
{
|
|
394
|
-
ref,
|
|
395
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
396
|
-
...props
|
|
397
|
-
}
|
|
398
|
-
));
|
|
399
|
-
CardFooter.displayName = "CardFooter";
|
|
400
|
-
}
|
|
401
|
-
});
|
|
402
|
-
var Separator;
|
|
403
|
-
var init_separator = __esm({
|
|
404
|
-
"src/ui/primitives/separator.tsx"() {
|
|
405
|
-
init_utils();
|
|
406
|
-
Separator = React12__namespace.forwardRef(
|
|
407
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
408
|
-
"div",
|
|
409
|
-
{
|
|
410
|
-
ref,
|
|
411
|
-
className: cn(
|
|
412
|
-
"shrink-0 bg-border",
|
|
413
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
414
|
-
className
|
|
415
|
-
),
|
|
416
|
-
...props
|
|
417
|
-
}
|
|
418
|
-
)
|
|
419
|
-
);
|
|
420
|
-
Separator.displayName = "Separator";
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
var Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption;
|
|
424
|
-
var init_table = __esm({
|
|
425
|
-
"src/ui/primitives/table.tsx"() {
|
|
426
|
-
init_utils();
|
|
427
|
-
Table = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
428
|
-
"table",
|
|
429
|
-
{
|
|
430
|
-
ref,
|
|
431
|
-
className: cn("w-max min-w-full caption-bottom text-xs", className),
|
|
432
|
-
...props
|
|
433
|
-
}
|
|
434
|
-
) }));
|
|
435
|
-
Table.displayName = "Table";
|
|
436
|
-
TableHeader = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
437
|
-
TableHeader.displayName = "TableHeader";
|
|
438
|
-
TableBody = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
439
|
-
"tbody",
|
|
440
|
-
{
|
|
441
|
-
ref,
|
|
442
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
443
|
-
...props
|
|
444
|
-
}
|
|
445
|
-
));
|
|
446
|
-
TableBody.displayName = "TableBody";
|
|
447
|
-
TableFooter = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
448
|
-
"tfoot",
|
|
449
|
-
{
|
|
450
|
-
ref,
|
|
451
|
-
className: cn(
|
|
452
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
453
|
-
className
|
|
454
|
-
),
|
|
455
|
-
...props
|
|
456
|
-
}
|
|
457
|
-
));
|
|
458
|
-
TableFooter.displayName = "TableFooter";
|
|
459
|
-
TableRow = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
-
"tr",
|
|
461
|
-
{
|
|
462
|
-
ref,
|
|
463
|
-
className: cn(
|
|
464
|
-
"border-b transition-colors even:bg-muted/30 data-[state=selected]:bg-muted",
|
|
465
|
-
className
|
|
466
|
-
),
|
|
467
|
-
...props
|
|
468
|
-
}
|
|
469
|
-
));
|
|
470
|
-
TableRow.displayName = "TableRow";
|
|
471
|
-
TableHead = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
472
|
-
"th",
|
|
473
|
-
{
|
|
474
|
-
ref,
|
|
475
|
-
className: cn(
|
|
476
|
-
"h-9 px-3 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
477
|
-
className
|
|
478
|
-
),
|
|
479
|
-
...props
|
|
480
|
-
}
|
|
481
|
-
));
|
|
482
|
-
TableHead.displayName = "TableHead";
|
|
483
|
-
TableCell = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
484
|
-
"td",
|
|
485
|
-
{
|
|
486
|
-
ref,
|
|
487
|
-
className: cn("px-3 py-1.5 align-middle [&:has([role=checkbox])]:pr-0 text-xs", className),
|
|
488
|
-
...props
|
|
489
|
-
}
|
|
490
|
-
));
|
|
491
|
-
TableCell.displayName = "TableCell";
|
|
492
|
-
TableCaption = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
493
|
-
"caption",
|
|
494
|
-
{
|
|
495
|
-
ref,
|
|
496
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
497
|
-
...props
|
|
498
|
-
}
|
|
499
|
-
));
|
|
500
|
-
TableCaption.displayName = "TableCaption";
|
|
501
|
-
}
|
|
502
|
-
});
|
|
503
|
-
var init_dropdown_menu = __esm({
|
|
504
|
-
"src/ui/primitives/dropdown-menu.tsx"() {
|
|
505
|
-
"use client";
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
var DialogPortal, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription;
|
|
509
|
-
var init_dialog = __esm({
|
|
510
|
-
"src/ui/primitives/dialog.tsx"() {
|
|
511
|
-
"use client";
|
|
512
|
-
init_utils();
|
|
513
|
-
DialogPortal = DialogPrimitive__namespace.Portal;
|
|
514
|
-
DialogOverlay = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
-
DialogPrimitive__namespace.Overlay,
|
|
516
|
-
{
|
|
517
|
-
ref,
|
|
518
|
-
className: cn(
|
|
519
|
-
"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",
|
|
520
|
-
className
|
|
521
|
-
),
|
|
522
|
-
...props
|
|
523
|
-
}
|
|
524
|
-
));
|
|
525
|
-
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
526
|
-
DialogContent = React12__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
527
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
528
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
529
|
-
DialogPrimitive__namespace.Content,
|
|
530
|
-
{
|
|
531
|
-
ref,
|
|
532
|
-
className: cn(
|
|
533
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
534
|
-
className
|
|
535
|
-
),
|
|
536
|
-
...props,
|
|
537
|
-
children: [
|
|
538
|
-
children,
|
|
539
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
540
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
541
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
542
|
-
] })
|
|
543
|
-
]
|
|
544
|
-
}
|
|
545
|
-
)
|
|
546
|
-
] }));
|
|
547
|
-
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
548
|
-
DialogHeader = ({
|
|
549
|
-
className,
|
|
550
|
-
...props
|
|
551
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
552
|
-
"div",
|
|
553
|
-
{
|
|
554
|
-
className: cn(
|
|
555
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
556
|
-
className
|
|
557
|
-
),
|
|
558
|
-
...props
|
|
559
|
-
}
|
|
560
|
-
);
|
|
561
|
-
DialogHeader.displayName = "DialogHeader";
|
|
562
|
-
DialogFooter = ({
|
|
563
|
-
className,
|
|
564
|
-
...props
|
|
565
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
566
|
-
"div",
|
|
567
|
-
{
|
|
568
|
-
className: cn(
|
|
569
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
570
|
-
className
|
|
571
|
-
),
|
|
572
|
-
...props
|
|
573
|
-
}
|
|
574
|
-
);
|
|
575
|
-
DialogFooter.displayName = "DialogFooter";
|
|
576
|
-
DialogTitle = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
577
|
-
DialogPrimitive__namespace.Title,
|
|
578
|
-
{
|
|
579
|
-
ref,
|
|
580
|
-
className: cn(
|
|
581
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
582
|
-
className
|
|
583
|
-
),
|
|
584
|
-
...props
|
|
585
|
-
}
|
|
586
|
-
));
|
|
587
|
-
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
588
|
-
DialogDescription = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
589
|
-
DialogPrimitive__namespace.Description,
|
|
590
|
-
{
|
|
591
|
-
ref,
|
|
592
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
593
|
-
...props
|
|
594
|
-
}
|
|
595
|
-
));
|
|
596
|
-
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
var TabsList, TabsTrigger, TabsContent;
|
|
600
|
-
var init_tabs = __esm({
|
|
601
|
-
"src/ui/primitives/tabs.tsx"() {
|
|
602
|
-
"use client";
|
|
603
|
-
init_utils();
|
|
604
|
-
TabsList = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
605
|
-
TabsPrimitive__namespace.List,
|
|
606
|
-
{
|
|
607
|
-
ref,
|
|
608
|
-
className: cn(
|
|
609
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
610
|
-
className
|
|
611
|
-
),
|
|
612
|
-
...props
|
|
613
|
-
}
|
|
614
|
-
));
|
|
615
|
-
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
616
|
-
TabsTrigger = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
617
|
-
TabsPrimitive__namespace.Trigger,
|
|
618
|
-
{
|
|
619
|
-
ref,
|
|
620
|
-
className: cn(
|
|
621
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
622
|
-
className
|
|
623
|
-
),
|
|
624
|
-
...props
|
|
625
|
-
}
|
|
626
|
-
));
|
|
627
|
-
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
628
|
-
TabsContent = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
-
TabsPrimitive__namespace.Content,
|
|
630
|
-
{
|
|
631
|
-
ref,
|
|
632
|
-
className: cn(
|
|
633
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
634
|
-
className
|
|
635
|
-
),
|
|
636
|
-
...props
|
|
637
|
-
}
|
|
638
|
-
));
|
|
639
|
-
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
var init_breadcrumb = __esm({
|
|
643
|
-
"src/ui/primitives/breadcrumb.tsx"() {
|
|
644
|
-
}
|
|
645
|
-
});
|
|
646
|
-
var init_keyboard = __esm({
|
|
647
|
-
"src/ui/primitives/keyboard.tsx"() {
|
|
648
|
-
}
|
|
649
|
-
});
|
|
650
|
-
var init_pagination = __esm({
|
|
651
|
-
"src/ui/primitives/pagination.tsx"() {
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
var init_status_badge = __esm({
|
|
655
|
-
"src/ui/primitives/status-badge.tsx"() {
|
|
656
|
-
}
|
|
657
|
-
});
|
|
658
|
-
var init_command_menu = __esm({
|
|
659
|
-
"src/ui/layout/command-menu.tsx"() {
|
|
660
|
-
"use client";
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
var init_logo = __esm({
|
|
664
|
-
"src/ui/layout/logo.tsx"() {
|
|
665
|
-
"use client";
|
|
666
|
-
}
|
|
667
|
-
});
|
|
668
|
-
var init_sidebar_group_icon_menu = __esm({
|
|
669
|
-
"src/ui/layout/sidebar-group-icon-menu.tsx"() {
|
|
670
|
-
"use client";
|
|
671
|
-
}
|
|
672
|
-
});
|
|
673
|
-
var init_sidebar = __esm({
|
|
674
|
-
"src/ui/layout/sidebar.tsx"() {
|
|
675
|
-
"use client";
|
|
676
|
-
}
|
|
677
|
-
});
|
|
678
|
-
var init_calendar = __esm({
|
|
679
|
-
"src/ui/primitives/calendar.tsx"() {
|
|
680
|
-
"use client";
|
|
681
|
-
init_utils();
|
|
682
|
-
init_button();
|
|
683
|
-
}
|
|
684
|
-
});
|
|
685
|
-
function ScrollArea({
|
|
686
|
-
orientation,
|
|
687
|
-
className,
|
|
688
|
-
children,
|
|
689
|
-
...props
|
|
690
|
-
}) {
|
|
691
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
692
|
-
ScrollAreaPrimitive__namespace.Root,
|
|
693
|
-
{
|
|
694
|
-
"data-slot": "scroll-area",
|
|
695
|
-
className: cn("relative overflow-hidden", className),
|
|
696
|
-
...props,
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
699
|
-
ScrollAreaPrimitive__namespace.Viewport,
|
|
700
|
-
{
|
|
701
|
-
"data-slot": "scroll-area-viewport",
|
|
702
|
-
className: "h-full w-full rounded-[inherit]",
|
|
703
|
-
children
|
|
704
|
-
}
|
|
705
|
-
),
|
|
706
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation }),
|
|
707
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
708
|
-
]
|
|
709
|
-
}
|
|
710
|
-
);
|
|
711
|
-
}
|
|
712
|
-
function ScrollBar({
|
|
713
|
-
className,
|
|
714
|
-
orientation = "vertical",
|
|
715
|
-
...props
|
|
716
|
-
}) {
|
|
717
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
718
|
-
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
719
|
-
{
|
|
720
|
-
"data-slot": "scroll-area-scrollbar",
|
|
721
|
-
orientation,
|
|
722
|
-
className: cn(
|
|
723
|
-
"flex touch-none select-none transition-colors",
|
|
724
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
725
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
726
|
-
className
|
|
727
|
-
),
|
|
728
|
-
...props,
|
|
729
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
730
|
-
}
|
|
731
|
-
);
|
|
732
|
-
}
|
|
733
|
-
var init_scroll_area = __esm({
|
|
734
|
-
"src/ui/primitives/scroll-area.tsx"() {
|
|
735
|
-
"use client";
|
|
736
|
-
init_utils();
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
var init_combobox = __esm({
|
|
740
|
-
"src/ui/primitives/combobox.tsx"() {
|
|
741
|
-
"use client";
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
var init_select = __esm({
|
|
745
|
-
"src/ui/primitives/select.tsx"() {
|
|
746
|
-
"use client";
|
|
747
|
-
}
|
|
748
|
-
});
|
|
749
|
-
var init_popover = __esm({
|
|
750
|
-
"src/ui/primitives/popover.tsx"() {
|
|
751
|
-
"use client";
|
|
752
|
-
}
|
|
753
|
-
});
|
|
754
|
-
var init_switch = __esm({
|
|
755
|
-
"src/ui/primitives/switch.tsx"() {
|
|
756
|
-
"use client";
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
var Label3;
|
|
760
|
-
var init_label = __esm({
|
|
761
|
-
"src/ui/primitives/label.tsx"() {
|
|
762
|
-
"use client";
|
|
763
|
-
init_utils();
|
|
764
|
-
Label3 = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
765
|
-
LabelPrimitive__namespace.Root,
|
|
766
|
-
{
|
|
767
|
-
ref,
|
|
768
|
-
className: cn(
|
|
769
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
770
|
-
className
|
|
771
|
-
),
|
|
772
|
-
...props
|
|
773
|
-
}
|
|
774
|
-
));
|
|
775
|
-
Label3.displayName = LabelPrimitive__namespace.Root.displayName;
|
|
776
|
-
}
|
|
777
|
-
});
|
|
778
|
-
function TooltipProvider({
|
|
779
|
-
delayDuration = 0,
|
|
780
|
-
...props
|
|
781
|
-
}) {
|
|
782
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
783
|
-
TooltipPrimitive__namespace.Provider,
|
|
784
|
-
{
|
|
785
|
-
"data-slot": "tooltip-provider",
|
|
786
|
-
delayDuration,
|
|
787
|
-
...props
|
|
788
|
-
}
|
|
789
|
-
);
|
|
790
|
-
}
|
|
791
|
-
function Tooltip({
|
|
792
|
-
...props
|
|
793
|
-
}) {
|
|
794
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
|
|
795
|
-
}
|
|
796
|
-
function TooltipTrigger({
|
|
797
|
-
className,
|
|
798
|
-
...props
|
|
799
|
-
}) {
|
|
800
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
801
|
-
TooltipPrimitive__namespace.Trigger,
|
|
802
|
-
{
|
|
803
|
-
"data-slot": "tooltip-trigger",
|
|
804
|
-
className: cn("cursor-pointer", className),
|
|
805
|
-
...props
|
|
806
|
-
}
|
|
807
|
-
);
|
|
808
|
-
}
|
|
809
|
-
function TooltipContent({
|
|
810
|
-
className,
|
|
811
|
-
sideOffset = 0,
|
|
812
|
-
...props
|
|
813
|
-
}) {
|
|
814
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
815
|
-
TooltipPrimitive__namespace.Content,
|
|
816
|
-
{
|
|
817
|
-
"data-slot": "tooltip-content",
|
|
818
|
-
sideOffset,
|
|
819
|
-
className: cn(
|
|
820
|
-
"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",
|
|
821
|
-
className
|
|
822
|
-
),
|
|
823
|
-
...props
|
|
824
|
-
}
|
|
825
|
-
);
|
|
826
|
-
}
|
|
827
|
-
var init_tooltip = __esm({
|
|
828
|
-
"src/ui/primitives/tooltip.tsx"() {
|
|
829
|
-
"use client";
|
|
830
|
-
init_utils();
|
|
831
|
-
}
|
|
832
|
-
});
|
|
833
|
-
var init_resizable = __esm({
|
|
834
|
-
"src/ui/primitives/resizable.tsx"() {
|
|
835
|
-
"use client";
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
var init_slider = __esm({
|
|
839
|
-
"src/ui/primitives/slider.tsx"() {
|
|
840
|
-
"use client";
|
|
841
|
-
}
|
|
842
|
-
});
|
|
843
|
-
var init_toggle = __esm({
|
|
844
|
-
"src/ui/primitives/toggle.tsx"() {
|
|
845
|
-
"use client";
|
|
846
|
-
classVarianceAuthority.cva(
|
|
847
|
-
"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",
|
|
848
|
-
{
|
|
849
|
-
variants: {
|
|
850
|
-
variant: {
|
|
851
|
-
default: "bg-transparent",
|
|
852
|
-
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
853
|
-
},
|
|
854
|
-
size: {
|
|
855
|
-
default: "h-9 px-3",
|
|
856
|
-
sm: "h-8 px-2",
|
|
857
|
-
lg: "h-10 px-3"
|
|
858
|
-
}
|
|
859
|
-
},
|
|
860
|
-
defaultVariants: {
|
|
861
|
-
variant: "default",
|
|
862
|
-
size: "default"
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
var init_toggle_group = __esm({
|
|
869
|
-
"src/ui/primitives/toggle-group.tsx"() {
|
|
870
|
-
"use client";
|
|
871
|
-
React12.createContext({
|
|
872
|
-
size: "default",
|
|
873
|
-
variant: "default"
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
var init_menubar = __esm({
|
|
878
|
-
"src/ui/primitives/menubar.tsx"() {
|
|
879
|
-
"use client";
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
var init_navigation_menu = __esm({
|
|
883
|
-
"src/ui/primitives/navigation-menu.tsx"() {
|
|
884
|
-
classVarianceAuthority.cva(
|
|
885
|
-
"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"
|
|
886
|
-
);
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
|
-
var init_sticky_layout = __esm({
|
|
890
|
-
"src/ui/primitives/sticky-layout.tsx"() {
|
|
891
|
-
}
|
|
892
|
-
});
|
|
893
|
-
var init_prefetch_link = __esm({
|
|
894
|
-
"src/ui/primitives/prefetch-link.tsx"() {
|
|
895
|
-
"use client";
|
|
896
|
-
}
|
|
897
|
-
});
|
|
898
|
-
function DynamicIcon({ name, ...props }) {
|
|
899
|
-
if (!name) return null;
|
|
900
|
-
const LucideIcon = lucideReact.icons[name];
|
|
901
|
-
if (!LucideIcon) return null;
|
|
902
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LucideIcon, { ...props });
|
|
903
|
-
}
|
|
904
|
-
var init_dynamic_icon = __esm({
|
|
905
|
-
"src/ui/primitives/dynamic-icon.tsx"() {
|
|
906
|
-
"use client";
|
|
907
|
-
}
|
|
908
|
-
});
|
|
909
|
-
var InputNumber;
|
|
910
|
-
var init_input_number = __esm({
|
|
911
|
-
"src/ui/primitives/input-number.tsx"() {
|
|
912
|
-
"use client";
|
|
913
|
-
init_utils();
|
|
914
|
-
init_input();
|
|
915
|
-
InputNumber = React12__namespace.forwardRef(
|
|
916
|
-
({ value, onChange, className, decimalScale = 0, suffix, ...props }, ref) => {
|
|
917
|
-
const [displayValue, setDisplayValue] = React12__namespace.useState("");
|
|
918
|
-
const parseDisplayValue = (val) => {
|
|
919
|
-
const clean = val.replace(/\./g, "").replace(",", ".");
|
|
920
|
-
return Number(clean);
|
|
921
|
-
};
|
|
922
|
-
const formatNumber = React12__namespace.useCallback(
|
|
923
|
-
(num) => {
|
|
924
|
-
return new Intl.NumberFormat("vi-VN", {
|
|
925
|
-
maximumFractionDigits: decimalScale,
|
|
926
|
-
minimumFractionDigits: 0
|
|
927
|
-
}).format(num);
|
|
928
|
-
},
|
|
929
|
-
[decimalScale]
|
|
930
|
-
);
|
|
931
|
-
React12__namespace.useEffect(() => {
|
|
932
|
-
if (value === null || value === void 0 || value === "") {
|
|
933
|
-
setDisplayValue("");
|
|
934
|
-
return;
|
|
935
|
-
}
|
|
936
|
-
const numValue = Number(value);
|
|
937
|
-
if (isNaN(numValue)) return;
|
|
938
|
-
const currentNum = parseDisplayValue(displayValue);
|
|
939
|
-
if (currentNum !== numValue) {
|
|
940
|
-
setDisplayValue(formatNumber(numValue));
|
|
941
|
-
}
|
|
942
|
-
}, [value, decimalScale, displayValue, formatNumber]);
|
|
943
|
-
const handleChange = (e) => {
|
|
944
|
-
const rawValue = e.target.value;
|
|
945
|
-
let cleanVal = rawValue.replace(/[^0-9,]/g, "");
|
|
946
|
-
const parts = cleanVal.split(",");
|
|
947
|
-
if (parts.length > 2) {
|
|
948
|
-
cleanVal = parts[0] + "," + parts.slice(1).join("");
|
|
949
|
-
}
|
|
950
|
-
if (cleanVal === "") {
|
|
951
|
-
setDisplayValue("");
|
|
952
|
-
onChange?.(null);
|
|
953
|
-
return;
|
|
954
|
-
}
|
|
955
|
-
const [integerPart, decimalPart] = cleanVal.split(",");
|
|
956
|
-
let formattedInteger = integerPart;
|
|
957
|
-
if (integerPart) {
|
|
958
|
-
formattedInteger = new Intl.NumberFormat("vi-VN").format(
|
|
959
|
-
Number(integerPart)
|
|
960
|
-
);
|
|
961
|
-
}
|
|
962
|
-
let newDisplayValue = formattedInteger;
|
|
963
|
-
let finalDecimalPart = decimalPart;
|
|
964
|
-
if (decimalPart !== void 0) {
|
|
965
|
-
if (decimalScale !== void 0 && decimalPart.length > decimalScale) {
|
|
966
|
-
finalDecimalPart = decimalPart.substring(0, decimalScale);
|
|
967
|
-
}
|
|
968
|
-
newDisplayValue += "," + finalDecimalPart;
|
|
969
|
-
}
|
|
970
|
-
setDisplayValue(newDisplayValue);
|
|
971
|
-
let numStr = integerPart;
|
|
972
|
-
if (finalDecimalPart !== void 0) {
|
|
973
|
-
numStr += "." + finalDecimalPart;
|
|
974
|
-
}
|
|
975
|
-
const numValue = Number(numStr.replace(/\./g, ""));
|
|
976
|
-
onChange?.(numValue);
|
|
977
|
-
};
|
|
978
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
979
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
980
|
-
Input,
|
|
981
|
-
{
|
|
982
|
-
...props,
|
|
983
|
-
ref,
|
|
984
|
-
type: "text",
|
|
985
|
-
inputMode: "numeric",
|
|
986
|
-
value: displayValue,
|
|
987
|
-
onChange: handleChange,
|
|
988
|
-
className: cn("pr-8", className)
|
|
989
|
-
}
|
|
990
|
-
),
|
|
991
|
-
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 })
|
|
992
|
-
] });
|
|
993
|
-
}
|
|
994
|
-
);
|
|
995
|
-
InputNumber.displayName = "InputNumber";
|
|
996
|
-
}
|
|
997
|
-
});
|
|
998
|
-
function Sheet({
|
|
999
|
-
...props
|
|
1000
|
-
}) {
|
|
1001
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
|
|
1002
|
-
}
|
|
1003
|
-
function SheetPortal({
|
|
1004
|
-
...props
|
|
1005
|
-
}) {
|
|
1006
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
1007
|
-
}
|
|
1008
|
-
function SheetOverlay({
|
|
1009
|
-
className,
|
|
1010
|
-
...props
|
|
1011
|
-
}) {
|
|
1012
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1013
|
-
DialogPrimitive__namespace.Overlay,
|
|
1014
|
-
{
|
|
1015
|
-
"data-slot": "sheet-overlay",
|
|
1016
|
-
className: cn(
|
|
1017
|
-
"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",
|
|
1018
|
-
className
|
|
1019
|
-
),
|
|
1020
|
-
...props
|
|
1021
|
-
}
|
|
1022
|
-
);
|
|
1023
|
-
}
|
|
1024
|
-
function SheetContent({
|
|
1025
|
-
className,
|
|
1026
|
-
children,
|
|
1027
|
-
side = "right",
|
|
1028
|
-
...props
|
|
1029
|
-
}) {
|
|
1030
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
1031
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
1032
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1033
|
-
DialogPrimitive__namespace.Content,
|
|
1034
|
-
{
|
|
1035
|
-
"data-slot": "sheet-content",
|
|
1036
|
-
className: cn(sheetVariants({ side }), className),
|
|
1037
|
-
...props,
|
|
1038
|
-
children
|
|
1039
|
-
}
|
|
1040
|
-
)
|
|
1041
|
-
] });
|
|
1042
|
-
}
|
|
1043
|
-
function SheetTitle({
|
|
1044
|
-
className,
|
|
1045
|
-
...props
|
|
1046
|
-
}) {
|
|
1047
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1048
|
-
DialogPrimitive__namespace.Title,
|
|
1049
|
-
{
|
|
1050
|
-
"data-slot": "sheet-title",
|
|
1051
|
-
className: cn("text-lg font-semibold text-foreground", className),
|
|
1052
|
-
...props
|
|
1053
|
-
}
|
|
1054
|
-
);
|
|
1055
|
-
}
|
|
1056
|
-
var sheetVariants;
|
|
1057
|
-
var init_sheet = __esm({
|
|
1058
|
-
"src/ui/feedback/sheet.tsx"() {
|
|
1059
|
-
"use client";
|
|
1060
|
-
init_utils();
|
|
1061
|
-
sheetVariants = classVarianceAuthority.cva(
|
|
1062
|
-
"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",
|
|
1063
|
-
{
|
|
1064
|
-
variants: {
|
|
1065
|
-
side: {
|
|
1066
|
-
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
1067
|
-
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1068
|
-
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",
|
|
1069
|
-
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",
|
|
1070
|
-
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",
|
|
1071
|
-
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"
|
|
1072
|
-
}
|
|
1073
|
-
},
|
|
1074
|
-
defaultVariants: {
|
|
1075
|
-
side: "right"
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
);
|
|
1079
|
-
}
|
|
1080
|
-
});
|
|
1081
|
-
var init_context_menu = __esm({
|
|
1082
|
-
"src/ui/feedback/context-menu.tsx"() {
|
|
1083
|
-
"use client";
|
|
1084
|
-
}
|
|
1085
|
-
});
|
|
1086
|
-
var init_drawer = __esm({
|
|
1087
|
-
"src/ui/feedback/drawer.tsx"() {
|
|
1088
|
-
"use client";
|
|
1089
|
-
}
|
|
1090
|
-
});
|
|
1091
|
-
var init_progress = __esm({
|
|
1092
|
-
"src/ui/feedback/progress.tsx"() {
|
|
1093
|
-
"use client";
|
|
1094
|
-
}
|
|
1095
|
-
});
|
|
1096
|
-
var init_sonner = __esm({
|
|
1097
|
-
"src/ui/feedback/sonner.tsx"() {
|
|
1098
|
-
"use client";
|
|
1099
|
-
}
|
|
1100
|
-
});
|
|
1101
|
-
|
|
1102
|
-
// src/ui/primitives/client.ts
|
|
1103
|
-
var init_client = __esm({
|
|
1104
|
-
"src/ui/primitives/client.ts"() {
|
|
1105
|
-
"use client";
|
|
1106
|
-
init_calendar();
|
|
1107
|
-
init_combobox();
|
|
1108
|
-
init_scroll_area();
|
|
1109
|
-
init_select();
|
|
1110
|
-
init_popover();
|
|
1111
|
-
init_dropdown_menu();
|
|
1112
|
-
init_switch();
|
|
1113
|
-
init_checkbox();
|
|
1114
|
-
init_label();
|
|
1115
|
-
init_tooltip();
|
|
1116
|
-
init_sidebar2();
|
|
1117
|
-
init_resizable();
|
|
1118
|
-
init_slider();
|
|
1119
|
-
init_toggle();
|
|
1120
|
-
init_toggle_group();
|
|
1121
|
-
init_menubar();
|
|
1122
|
-
init_navigation_menu();
|
|
1123
|
-
init_sticky_layout();
|
|
1124
|
-
init_prefetch_link();
|
|
1125
|
-
init_dynamic_icon();
|
|
1126
|
-
init_input_number();
|
|
1127
|
-
init_sheet();
|
|
1128
|
-
init_context_menu();
|
|
1129
|
-
init_drawer();
|
|
1130
|
-
init_progress();
|
|
1131
|
-
init_sonner();
|
|
1132
|
-
}
|
|
1133
|
-
});
|
|
1134
|
-
var init_language_dropdown = __esm({
|
|
1135
|
-
"src/ui/layout/language-dropdown.tsx"() {
|
|
1136
|
-
"use client";
|
|
1137
|
-
}
|
|
1138
|
-
});
|
|
1139
|
-
var init_footer = __esm({
|
|
1140
|
-
"src/ui/layout/footer.tsx"() {
|
|
1141
|
-
}
|
|
1142
|
-
});
|
|
1143
|
-
var init_header_breadcrumb = __esm({
|
|
1144
|
-
"src/ui/layout/header-breadcrumb.tsx"() {
|
|
1145
|
-
"use client";
|
|
1146
|
-
}
|
|
1147
|
-
});
|
|
1148
|
-
var init_animated_list = __esm({
|
|
1149
|
-
"src/ui/layout/animated-list.tsx"() {
|
|
1150
|
-
}
|
|
1151
|
-
});
|
|
1152
|
-
var init_animated_sidebar = __esm({
|
|
1153
|
-
"src/ui/layout/animated-sidebar.tsx"() {
|
|
1154
|
-
"use client";
|
|
1155
|
-
}
|
|
1156
|
-
});
|
|
1157
|
-
var init_customizer = __esm({
|
|
1158
|
-
"src/ui/layout/customizer.tsx"() {
|
|
1159
|
-
"use client";
|
|
1160
|
-
}
|
|
1161
|
-
});
|
|
1162
|
-
function Avatar({
|
|
1163
|
-
className,
|
|
1164
|
-
...props
|
|
1165
|
-
}) {
|
|
1166
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1167
|
-
AvatarPrimitive__namespace.Root,
|
|
1168
|
-
{
|
|
1169
|
-
"data-slot": "avatar",
|
|
1170
|
-
className: cn("relative flex h-10 w-10 shrink-0", className),
|
|
1171
|
-
...props
|
|
1172
|
-
}
|
|
1173
|
-
);
|
|
1174
|
-
}
|
|
1175
|
-
function AvatarImage({
|
|
1176
|
-
className,
|
|
1177
|
-
...props
|
|
1178
|
-
}) {
|
|
1179
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1180
|
-
AvatarPrimitive__namespace.Image,
|
|
1181
|
-
{
|
|
1182
|
-
"data-slot": "avatar-image",
|
|
1183
|
-
className: cn(
|
|
1184
|
-
"aspect-square h-full w-full bg-muted rounded-lg object-cover",
|
|
1185
|
-
className
|
|
1186
|
-
),
|
|
1187
|
-
...props
|
|
1188
|
-
}
|
|
1189
|
-
);
|
|
1190
|
-
}
|
|
1191
|
-
function AvatarFallback({
|
|
1192
|
-
className,
|
|
1193
|
-
...props
|
|
1194
|
-
}) {
|
|
1195
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
|
-
AvatarPrimitive__namespace.Fallback,
|
|
1197
|
-
{
|
|
1198
|
-
className: cn(
|
|
1199
|
-
"flex h-full w-full items-center justify-center bg-muted rounded-lg",
|
|
1200
|
-
className
|
|
1201
|
-
),
|
|
1202
|
-
...props
|
|
1203
|
-
}
|
|
1204
|
-
);
|
|
1205
|
-
}
|
|
1206
|
-
function AvatarStack({
|
|
1207
|
-
avatars,
|
|
1208
|
-
limit = 4,
|
|
1209
|
-
size,
|
|
1210
|
-
onMoreButtonClick,
|
|
1211
|
-
className,
|
|
1212
|
-
avatarClassName,
|
|
1213
|
-
...props
|
|
1214
|
-
}) {
|
|
1215
|
-
const limitedAvatars = avatars.slice(0, limit);
|
|
1216
|
-
const remainingCount = avatars.length - limitedAvatars.length;
|
|
1217
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex", className), ...props, children: [
|
|
1218
|
-
limitedAvatars.slice(0, limit).map((avatar) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1219
|
-
TooltipProvider,
|
|
1220
|
-
{
|
|
1221
|
-
delayDuration: 200,
|
|
1222
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
1223
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { className: "-ms-1 -me-1", children: avatar.href ? /* @__PURE__ */ jsxRuntime.jsx(Link7__default.default, { href: avatar.href, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1224
|
-
Avatar,
|
|
1225
|
-
{
|
|
1226
|
-
className: cn(
|
|
1227
|
-
avatarStackVariants({ size }),
|
|
1228
|
-
avatarClassName
|
|
1229
|
-
),
|
|
1230
|
-
children: [
|
|
1231
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1232
|
-
AvatarImage,
|
|
1233
|
-
{
|
|
1234
|
-
src: avatar.src,
|
|
1235
|
-
className: "border-2 border-background"
|
|
1236
|
-
}
|
|
1237
|
-
),
|
|
1238
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "border-2 border-background", children: getInitials(avatar.alt) })
|
|
1239
|
-
]
|
|
1240
|
-
}
|
|
1241
|
-
) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1242
|
-
Avatar,
|
|
1243
|
-
{
|
|
1244
|
-
className: cn(avatarStackVariants({ size }), avatarClassName),
|
|
1245
|
-
children: [
|
|
1246
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1247
|
-
AvatarImage,
|
|
1248
|
-
{
|
|
1249
|
-
src: avatar.src,
|
|
1250
|
-
className: "border-2 border-background"
|
|
1251
|
-
}
|
|
1252
|
-
),
|
|
1253
|
-
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { className: "border-2 border-background", children: getInitials(avatar.alt) })
|
|
1254
|
-
]
|
|
1255
|
-
}
|
|
1256
|
-
) }),
|
|
1257
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { className: "capitalize -me-[1.23rem]", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: avatar.alt }) })
|
|
1258
|
-
] })
|
|
1259
|
-
},
|
|
1260
|
-
`${avatar.alt}-${avatar.src}`
|
|
1261
|
-
)),
|
|
1262
|
-
remainingCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1263
|
-
"button",
|
|
1264
|
-
{
|
|
1265
|
-
type: "button",
|
|
1266
|
-
onClick: onMoreButtonClick,
|
|
1267
|
-
className: "-ms-1 -me-1",
|
|
1268
|
-
"aria-label": "Show more",
|
|
1269
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1270
|
-
Avatar,
|
|
1271
|
-
{
|
|
1272
|
-
className: cn(avatarStackVariants({ size }), avatarClassName),
|
|
1273
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(AvatarFallback, { className: "border-2 border-background", children: [
|
|
1274
|
-
"+",
|
|
1275
|
-
remainingCount
|
|
1276
|
-
] })
|
|
1277
|
-
}
|
|
1278
|
-
)
|
|
1279
|
-
}
|
|
1280
|
-
)
|
|
1281
|
-
] });
|
|
1282
|
-
}
|
|
1283
|
-
var avatarStackVariants;
|
|
1284
|
-
var init_avatar = __esm({
|
|
1285
|
-
"src/ui/data-display/avatar.tsx"() {
|
|
1286
|
-
"use client";
|
|
1287
|
-
init_utils();
|
|
1288
|
-
init_tooltip();
|
|
1289
|
-
avatarStackVariants = classVarianceAuthority.cva(
|
|
1290
|
-
"transition duration-300 hover:scale-105 hover:z-10",
|
|
1291
|
-
{
|
|
1292
|
-
variants: {
|
|
1293
|
-
size: {
|
|
1294
|
-
default: "h-10 w-10",
|
|
1295
|
-
sm: "h-9 w-9 text-sm",
|
|
1296
|
-
lg: "h-11 w-11"
|
|
1297
|
-
}
|
|
1298
|
-
},
|
|
1299
|
-
defaultVariants: {
|
|
1300
|
-
size: "default"
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
);
|
|
1304
|
-
}
|
|
1305
|
-
});
|
|
1306
|
-
var init_tab_content_cache = __esm({
|
|
1307
|
-
"src/ui/layout/tab-content-cache.tsx"() {
|
|
1308
|
-
"use client";
|
|
1309
|
-
React12.createContext(void 0);
|
|
1310
|
-
}
|
|
1311
|
-
});
|
|
1312
|
-
var init_tab_navigation_provider = __esm({
|
|
1313
|
-
"src/ui/layout/tab-navigation-provider.tsx"() {
|
|
1314
|
-
"use client";
|
|
1315
|
-
React12.createContext(void 0);
|
|
1316
|
-
}
|
|
1317
|
-
});
|
|
1318
|
-
var init_user_dropdown = __esm({
|
|
1319
|
-
"src/ui/layout/user-dropdown.tsx"() {
|
|
1320
|
-
"use client";
|
|
1321
|
-
}
|
|
1322
|
-
});
|
|
1323
|
-
var init_notification_dropdown = __esm({
|
|
1324
|
-
"src/ui/layout/notification-dropdown.tsx"() {
|
|
1325
|
-
"use client";
|
|
1326
|
-
}
|
|
1327
|
-
});
|
|
1328
|
-
var init_mode_dropdown = __esm({
|
|
1329
|
-
"src/ui/layout/mode-dropdown.tsx"() {
|
|
1330
|
-
"use client";
|
|
1331
|
-
}
|
|
1332
|
-
});
|
|
1333
|
-
var init_full_screen_toggle = __esm({
|
|
1334
|
-
"src/ui/layout/full-screen-toggle.tsx"() {
|
|
1335
|
-
"use client";
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
var init_route_cache = __esm({
|
|
1339
|
-
"src/ui/layout/route-cache.tsx"() {
|
|
1340
|
-
"use client";
|
|
1341
|
-
React12.createContext(
|
|
1342
|
-
void 0
|
|
1343
|
-
);
|
|
1344
|
-
}
|
|
1345
|
-
});
|
|
1346
|
-
var init_page_tabs = __esm({
|
|
1347
|
-
"src/ui/layout/page-tabs.tsx"() {
|
|
1348
|
-
"use client";
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
var init_toggle_mobile_sidebar = __esm({
|
|
1352
|
-
"src/ui/layout/toggle-mobile-sidebar.tsx"() {
|
|
1353
|
-
"use client";
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
var init_top_bar_header_menubar = __esm({
|
|
1357
|
-
"src/ui/layout/top-bar-header-menubar.tsx"() {
|
|
1358
|
-
"use client";
|
|
1359
|
-
}
|
|
1360
|
-
});
|
|
1361
|
-
var init_vertical_layout_header = __esm({
|
|
1362
|
-
"src/ui/layout/vertical-layout-header.tsx"() {
|
|
1363
|
-
"use client";
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
var init_horizontal_layout_header = __esm({
|
|
1367
|
-
"src/ui/layout/horizontal-layout-header.tsx"() {
|
|
1368
|
-
"use client";
|
|
1369
|
-
}
|
|
1370
|
-
});
|
|
1371
|
-
var init_vertical_layout = __esm({
|
|
1372
|
-
"src/ui/layout/vertical-layout.tsx"() {
|
|
1373
|
-
"use client";
|
|
1374
|
-
}
|
|
1375
|
-
});
|
|
1376
|
-
var init_horizontal_layout = __esm({
|
|
1377
|
-
"src/ui/layout/horizontal-layout.tsx"() {
|
|
1378
|
-
"use client";
|
|
1379
|
-
}
|
|
1380
|
-
});
|
|
1381
|
-
var init_main_layout = __esm({
|
|
1382
|
-
"src/ui/layout/main-layout.tsx"() {
|
|
1383
|
-
"use client";
|
|
1384
|
-
}
|
|
1385
|
-
});
|
|
1386
|
-
|
|
1387
|
-
// src/ui/layout/index.tsx
|
|
1388
|
-
var init_layout = __esm({
|
|
1389
|
-
"src/ui/layout/index.tsx"() {
|
|
1390
|
-
init_sidebar();
|
|
1391
|
-
init_language_dropdown();
|
|
1392
|
-
init_footer();
|
|
1393
|
-
init_logo();
|
|
1394
|
-
init_header_breadcrumb();
|
|
1395
|
-
init_animated_list();
|
|
1396
|
-
init_animated_sidebar();
|
|
1397
|
-
init_command_menu();
|
|
1398
|
-
init_sidebar_group_icon_menu();
|
|
1399
|
-
init_customizer();
|
|
1400
|
-
init_user_dropdown();
|
|
1401
|
-
init_notification_dropdown();
|
|
1402
|
-
init_mode_dropdown();
|
|
1403
|
-
init_full_screen_toggle();
|
|
1404
|
-
init_page_tabs();
|
|
1405
|
-
init_tab_navigation_provider();
|
|
1406
|
-
init_route_cache();
|
|
1407
|
-
init_toggle_mobile_sidebar();
|
|
1408
|
-
init_top_bar_header_menubar();
|
|
1409
|
-
init_vertical_layout_header();
|
|
1410
|
-
init_horizontal_layout_header();
|
|
1411
|
-
init_vertical_layout();
|
|
1412
|
-
init_horizontal_layout();
|
|
1413
|
-
init_main_layout();
|
|
1414
|
-
init_tab_content_cache();
|
|
1415
|
-
}
|
|
1416
|
-
});
|
|
1417
|
-
|
|
1418
|
-
// src/hooks/use-tenant.ts
|
|
1419
|
-
var init_use_tenant = __esm({
|
|
1420
|
-
"src/hooks/use-tenant.ts"() {
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1423
|
-
function useMediaQuery(query) {
|
|
1424
|
-
const [matches, setMatches] = React12.useState(false);
|
|
1425
|
-
React12.useEffect(() => {
|
|
1426
|
-
if (typeof window !== "undefined") {
|
|
1427
|
-
const media = window.matchMedia(query);
|
|
1428
|
-
setMatches(media.matches);
|
|
1429
|
-
const listener = (event) => setMatches(event.matches);
|
|
1430
|
-
media.addEventListener("change", listener);
|
|
1431
|
-
return () => media.removeEventListener("change", listener);
|
|
1432
|
-
}
|
|
1433
|
-
}, [query]);
|
|
1434
|
-
return matches;
|
|
1435
|
-
}
|
|
1436
|
-
function useMobile() {
|
|
1437
|
-
return useMediaQuery("(max-width: 768px)");
|
|
1438
|
-
}
|
|
1439
|
-
var init_hooks = __esm({
|
|
1440
|
-
"src/hooks/index.tsx"() {
|
|
1441
|
-
"use client";
|
|
1442
|
-
init_use_tenant();
|
|
1443
|
-
React12.createContext(null);
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
var init_alert = __esm({
|
|
1447
|
-
"src/ui/feedback/alert.tsx"() {
|
|
1448
|
-
classVarianceAuthority.cva(
|
|
1449
|
-
"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",
|
|
1450
|
-
{
|
|
1451
|
-
variants: {
|
|
1452
|
-
variant: {
|
|
1453
|
-
default: "bg-background text-foreground",
|
|
1454
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
1455
|
-
}
|
|
1456
|
-
},
|
|
1457
|
-
defaultVariants: {
|
|
1458
|
-
variant: "default"
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
);
|
|
1462
|
-
}
|
|
1463
|
-
});
|
|
1464
|
-
var GlobalErrorEmitter;
|
|
1465
|
-
var init_error_dialog = __esm({
|
|
1466
|
-
"src/ui/feedback/error-dialog.tsx"() {
|
|
1467
|
-
"use client";
|
|
1468
|
-
GlobalErrorEmitter = class {
|
|
1469
|
-
constructor() {
|
|
1470
|
-
this.listeners = [];
|
|
1471
|
-
}
|
|
1472
|
-
subscribe(listener) {
|
|
1473
|
-
this.listeners.push(listener);
|
|
1474
|
-
return () => {
|
|
1475
|
-
this.listeners = this.listeners.filter((l) => l !== listener);
|
|
1476
|
-
};
|
|
1477
|
-
}
|
|
1478
|
-
emit(data) {
|
|
1479
|
-
this.listeners.forEach((listener) => listener(data));
|
|
1480
|
-
}
|
|
1481
|
-
};
|
|
1482
|
-
new GlobalErrorEmitter();
|
|
1483
|
-
React12.createContext(null);
|
|
1484
|
-
}
|
|
1485
|
-
});
|
|
1486
|
-
var init_feedback = __esm({
|
|
1487
|
-
"src/ui/feedback/index.tsx"() {
|
|
1488
|
-
init_progress();
|
|
1489
|
-
init_sheet();
|
|
1490
|
-
init_alert();
|
|
1491
|
-
init_context_menu();
|
|
1492
|
-
init_drawer();
|
|
1493
|
-
init_sonner();
|
|
1494
|
-
init_error_dialog();
|
|
1495
|
-
}
|
|
1496
|
-
});
|
|
1497
|
-
function useSidebar() {
|
|
1498
|
-
const context = React12__namespace.useContext(SidebarContext);
|
|
1499
|
-
if (!context) {
|
|
1500
|
-
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1501
|
-
}
|
|
1502
|
-
return context;
|
|
1503
|
-
}
|
|
1504
|
-
var SIDEBAR_WIDTH, SIDEBAR_WIDTH_MOBILE, SIDEBAR_WIDTH_ICON, SIDEBAR_KEYBOARD_SHORTCUT, SidebarContext, SidebarProvider, Sidebar, SidebarTrigger, SidebarRail, SidebarInset, SidebarInput, SidebarHeader, SidebarFooter, SidebarSeparator, SidebarContent, SidebarGroup, SidebarGroupLabel, SidebarGroupAction, SidebarGroupContent, SidebarMenu, SidebarMenuItem, sidebarMenuButtonVariants, SidebarMenuButton, SidebarMenuAction, SidebarMenuBadge, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubItem, SidebarMenuSubButton;
|
|
1505
|
-
var init_sidebar2 = __esm({
|
|
1506
|
-
"src/ui/primitives/sidebar.tsx"() {
|
|
1507
|
-
"use client";
|
|
1508
|
-
init_hooks();
|
|
1509
|
-
init_utils();
|
|
1510
|
-
init_button();
|
|
1511
|
-
init_feedback();
|
|
1512
|
-
init_tooltip();
|
|
1513
|
-
SIDEBAR_WIDTH = "16rem";
|
|
1514
|
-
SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1515
|
-
SIDEBAR_WIDTH_ICON = "3rem";
|
|
1516
|
-
SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1517
|
-
SidebarContext = React12__namespace.createContext(null);
|
|
1518
|
-
SidebarProvider = React12__namespace.forwardRef(
|
|
1519
|
-
({
|
|
1520
|
-
defaultOpen = false,
|
|
1521
|
-
open: openProp,
|
|
1522
|
-
onOpenChange: setOpenProp,
|
|
1523
|
-
className,
|
|
1524
|
-
style,
|
|
1525
|
-
children,
|
|
1526
|
-
...props
|
|
1527
|
-
}, ref) => {
|
|
1528
|
-
const isMobile = useMobile();
|
|
1529
|
-
const [openMobile, setOpenMobile] = React12__namespace.useState(false);
|
|
1530
|
-
const [hoverOpen, setHoverOpen] = React12__namespace.useState(false);
|
|
1531
|
-
const [_open, _setOpen] = React12__namespace.useState(defaultOpen);
|
|
1532
|
-
const open = openProp ?? _open;
|
|
1533
|
-
const setOpen = React12__namespace.useCallback(
|
|
1534
|
-
(value) => {
|
|
1535
|
-
if (setOpenProp) {
|
|
1536
|
-
return setOpenProp(typeof value === "function" ? value(open) : value);
|
|
1537
|
-
}
|
|
1538
|
-
_setOpen(value);
|
|
1539
|
-
},
|
|
1540
|
-
[setOpenProp, open]
|
|
1541
|
-
);
|
|
1542
|
-
const toggleSidebar = React12__namespace.useCallback(() => {
|
|
1543
|
-
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1544
|
-
}, [isMobile, setOpen, setOpenMobile]);
|
|
1545
|
-
React12__namespace.useEffect(() => {
|
|
1546
|
-
const handleKeyDown = (event) => {
|
|
1547
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1548
|
-
event.preventDefault();
|
|
1549
|
-
toggleSidebar();
|
|
1550
|
-
}
|
|
1551
|
-
};
|
|
1552
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
1553
|
-
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1554
|
-
}, [toggleSidebar]);
|
|
1555
|
-
const state = open ? "expanded" : "collapsed";
|
|
1556
|
-
const isHoverExpanded = !open && hoverOpen;
|
|
1557
|
-
const contextValue = React12__namespace.useMemo(
|
|
1558
|
-
() => ({
|
|
1559
|
-
state,
|
|
1560
|
-
open,
|
|
1561
|
-
setOpen,
|
|
1562
|
-
isMobile,
|
|
1563
|
-
openMobile,
|
|
1564
|
-
setOpenMobile,
|
|
1565
|
-
toggleSidebar,
|
|
1566
|
-
hoverOpen,
|
|
1567
|
-
setHoverOpen,
|
|
1568
|
-
isHoverExpanded
|
|
1569
|
-
}),
|
|
1570
|
-
[
|
|
1571
|
-
state,
|
|
1572
|
-
open,
|
|
1573
|
-
setOpen,
|
|
1574
|
-
isMobile,
|
|
1575
|
-
openMobile,
|
|
1576
|
-
setOpenMobile,
|
|
1577
|
-
toggleSidebar,
|
|
1578
|
-
hoverOpen,
|
|
1579
|
-
setHoverOpen,
|
|
1580
|
-
isHoverExpanded
|
|
1581
|
-
]
|
|
1582
|
-
);
|
|
1583
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1584
|
-
"div",
|
|
1585
|
-
{
|
|
1586
|
-
style: {
|
|
1587
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
1588
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
1589
|
-
...style
|
|
1590
|
-
},
|
|
1591
|
-
className: cn(
|
|
1592
|
-
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
1593
|
-
className
|
|
1594
|
-
),
|
|
1595
|
-
ref,
|
|
1596
|
-
...props,
|
|
1597
|
-
children
|
|
1598
|
-
}
|
|
1599
|
-
) }) });
|
|
1600
|
-
}
|
|
1601
|
-
);
|
|
1602
|
-
SidebarProvider.displayName = "SidebarProvider";
|
|
1603
|
-
Sidebar = React12__namespace.forwardRef(
|
|
1604
|
-
({
|
|
1605
|
-
side = "left",
|
|
1606
|
-
variant = "sidebar",
|
|
1607
|
-
collapsible = "offcanvas",
|
|
1608
|
-
hoverExpandEnabled = true,
|
|
1609
|
-
className,
|
|
1610
|
-
children,
|
|
1611
|
-
...props
|
|
1612
|
-
}, ref) => {
|
|
1613
|
-
const {
|
|
1614
|
-
isMobile,
|
|
1615
|
-
state,
|
|
1616
|
-
openMobile,
|
|
1617
|
-
setOpenMobile,
|
|
1618
|
-
setHoverOpen,
|
|
1619
|
-
isHoverExpanded
|
|
1620
|
-
} = useSidebar();
|
|
1621
|
-
const handleMouseEnter = React12__namespace.useCallback(() => {
|
|
1622
|
-
if (hoverExpandEnabled && state === "collapsed" && collapsible === "icon") {
|
|
1623
|
-
setHoverOpen(true);
|
|
1624
|
-
}
|
|
1625
|
-
}, [hoverExpandEnabled, state, collapsible, setHoverOpen]);
|
|
1626
|
-
const handleMouseLeave = React12__namespace.useCallback(() => {
|
|
1627
|
-
if (hoverExpandEnabled) {
|
|
1628
|
-
setHoverOpen(false);
|
|
1629
|
-
}
|
|
1630
|
-
}, [hoverExpandEnabled, setHoverOpen]);
|
|
1631
|
-
if (collapsible === "none") {
|
|
1632
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1633
|
-
"div",
|
|
1634
|
-
{
|
|
1635
|
-
className: cn(
|
|
1636
|
-
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
1637
|
-
className
|
|
1638
|
-
),
|
|
1639
|
-
ref,
|
|
1640
|
-
...props,
|
|
1641
|
-
children
|
|
1642
|
-
}
|
|
1643
|
-
);
|
|
1644
|
-
}
|
|
1645
|
-
if (isMobile) {
|
|
1646
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1647
|
-
SheetContent,
|
|
1648
|
-
{
|
|
1649
|
-
"data-sidebar": "sidebar",
|
|
1650
|
-
"data-mobile": "true",
|
|
1651
|
-
className: "w-(--sidebar-width) bg-background p-0 text-foreground [&>button]:hidden",
|
|
1652
|
-
style: {
|
|
1653
|
-
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1654
|
-
},
|
|
1655
|
-
side,
|
|
1656
|
-
children: [
|
|
1657
|
-
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Mobile Menu" }),
|
|
1658
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full flex-col", children })
|
|
1659
|
-
]
|
|
1660
|
-
}
|
|
1661
|
-
) });
|
|
1662
|
-
}
|
|
1663
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1664
|
-
"div",
|
|
1665
|
-
{
|
|
1666
|
-
ref,
|
|
1667
|
-
className: cn(
|
|
1668
|
-
"group peer hidden md:block transition-colors duration-200",
|
|
1669
|
-
// Blue bg + white text when collapsed, white bg + dark text when expanded/hover
|
|
1670
|
-
state === "collapsed" && !isHoverExpanded ? "text-sidebar-foreground" : "text-foreground"
|
|
1671
|
-
),
|
|
1672
|
-
"data-state": state,
|
|
1673
|
-
"data-hover-expanded": isHoverExpanded,
|
|
1674
|
-
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1675
|
-
"data-variant": variant,
|
|
1676
|
-
"data-side": side,
|
|
1677
|
-
onMouseEnter: handleMouseEnter,
|
|
1678
|
-
onMouseLeave: handleMouseLeave,
|
|
1679
|
-
children: [
|
|
1680
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
|
-
"div",
|
|
1682
|
-
{
|
|
1683
|
-
className: cn(
|
|
1684
|
-
"duration-200 relative h-svh w-(--sidebar-width) bg-transparent transition-[width] ease-linear",
|
|
1685
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
1686
|
-
"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",
|
|
1687
|
-
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
1688
|
-
)
|
|
1689
|
-
}
|
|
1690
|
-
),
|
|
1691
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1692
|
-
"div",
|
|
1693
|
-
{
|
|
1694
|
-
className: cn(
|
|
1695
|
-
"duration-200 fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",
|
|
1696
|
-
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)]",
|
|
1697
|
-
// Adjustments for collapsible=icon
|
|
1698
|
-
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",
|
|
1699
|
-
// Hover expand - override icon width to full width on hover
|
|
1700
|
-
"group-data-[hover-expanded=true]:!w-(--sidebar-width) group-data-[hover-expanded=true]:shadow-xl group-data-[hover-expanded=true]:z-[100]",
|
|
1701
|
-
className
|
|
1702
|
-
),
|
|
1703
|
-
...props,
|
|
1704
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1705
|
-
"div",
|
|
1706
|
-
{
|
|
1707
|
-
"data-sidebar": "sidebar",
|
|
1708
|
-
className: cn(
|
|
1709
|
-
"flex h-full w-full flex-col border-r transition-colors duration-200",
|
|
1710
|
-
// Blue background when collapsed, white when expanded/hover
|
|
1711
|
-
"group-data-[state=collapsed]:bg-sidebar group-data-[state=collapsed]:border-sidebar-border",
|
|
1712
|
-
"group-data-[state=expanded]:bg-background group-data-[state=expanded]:border-border",
|
|
1713
|
-
"group-data-[hover-expanded=true]:!bg-background group-data-[hover-expanded=true]:!border-border",
|
|
1714
|
-
"group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow"
|
|
1715
|
-
),
|
|
1716
|
-
children
|
|
1717
|
-
}
|
|
1718
|
-
)
|
|
1719
|
-
}
|
|
1720
|
-
)
|
|
1721
|
-
]
|
|
1722
|
-
}
|
|
1723
|
-
);
|
|
1724
|
-
}
|
|
1725
|
-
);
|
|
1726
|
-
Sidebar.displayName = "Sidebar";
|
|
1727
|
-
SidebarTrigger = React12__namespace.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1728
|
-
const { toggleSidebar } = useSidebar();
|
|
1729
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1730
|
-
Button,
|
|
1731
|
-
{
|
|
1732
|
-
ref,
|
|
1733
|
-
"data-sidebar": "trigger",
|
|
1734
|
-
variant: "ghost",
|
|
1735
|
-
size: "icon",
|
|
1736
|
-
className: cn("h-7 w-7", className),
|
|
1737
|
-
onClick: (event) => {
|
|
1738
|
-
onClick?.(event);
|
|
1739
|
-
toggleSidebar();
|
|
1740
|
-
},
|
|
1741
|
-
...props,
|
|
1742
|
-
children: [
|
|
1743
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, {}),
|
|
1744
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1745
|
-
]
|
|
1746
|
-
}
|
|
1747
|
-
);
|
|
1748
|
-
});
|
|
1749
|
-
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1750
|
-
SidebarRail = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1751
|
-
const { toggleSidebar } = useSidebar();
|
|
1752
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1753
|
-
"button",
|
|
1754
|
-
{
|
|
1755
|
-
ref,
|
|
1756
|
-
"data-sidebar": "rail",
|
|
1757
|
-
"aria-label": "Toggle Sidebar",
|
|
1758
|
-
tabIndex: -1,
|
|
1759
|
-
onClick: toggleSidebar,
|
|
1760
|
-
title: "Toggle Sidebar",
|
|
1761
|
-
className: cn(
|
|
1762
|
-
"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",
|
|
1763
|
-
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
1764
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
1765
|
-
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
1766
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
1767
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
1768
|
-
className
|
|
1769
|
-
),
|
|
1770
|
-
...props
|
|
1771
|
-
}
|
|
1772
|
-
);
|
|
1773
|
-
});
|
|
1774
|
-
SidebarRail.displayName = "SidebarRail";
|
|
1775
|
-
SidebarInset = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1776
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1777
|
-
"main",
|
|
1778
|
-
{
|
|
1779
|
-
ref,
|
|
1780
|
-
className: cn(
|
|
1781
|
-
"relative flex min-h-svh flex-1 flex-col bg-muted/40 transition-[margin] duration-200 ease-linear",
|
|
1782
|
-
"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",
|
|
1783
|
-
className
|
|
1784
|
-
),
|
|
1785
|
-
...props
|
|
1786
|
-
}
|
|
1787
|
-
);
|
|
1788
|
-
});
|
|
1789
|
-
SidebarInset.displayName = "SidebarInset";
|
|
1790
|
-
SidebarInput = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1791
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1792
|
-
"input",
|
|
1793
|
-
{
|
|
1794
|
-
ref,
|
|
1795
|
-
"data-sidebar": "input",
|
|
1796
|
-
className: cn(
|
|
1797
|
-
"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",
|
|
1798
|
-
className
|
|
1799
|
-
),
|
|
1800
|
-
...props
|
|
1801
|
-
}
|
|
1802
|
-
);
|
|
1803
|
-
});
|
|
1804
|
-
SidebarInput.displayName = "SidebarInput";
|
|
1805
|
-
SidebarHeader = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1806
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1807
|
-
"div",
|
|
1808
|
-
{
|
|
1809
|
-
ref,
|
|
1810
|
-
"data-sidebar": "header",
|
|
1811
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
1812
|
-
...props
|
|
1813
|
-
}
|
|
1814
|
-
);
|
|
1815
|
-
});
|
|
1816
|
-
SidebarHeader.displayName = "SidebarHeader";
|
|
1817
|
-
SidebarFooter = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1818
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1819
|
-
"div",
|
|
1820
|
-
{
|
|
1821
|
-
ref,
|
|
1822
|
-
"data-sidebar": "footer",
|
|
1823
|
-
className: cn("flex flex-col gap-2 p-2", className),
|
|
1824
|
-
...props
|
|
1825
|
-
}
|
|
1826
|
-
);
|
|
1827
|
-
});
|
|
1828
|
-
SidebarFooter.displayName = "SidebarFooter";
|
|
1829
|
-
SidebarSeparator = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1830
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1831
|
-
"div",
|
|
1832
|
-
{
|
|
1833
|
-
ref,
|
|
1834
|
-
"data-sidebar": "separator",
|
|
1835
|
-
className: cn("mx-2 h-[1px] w-auto bg-sidebar-border", className),
|
|
1836
|
-
...props
|
|
1837
|
-
}
|
|
1838
|
-
);
|
|
1839
|
-
});
|
|
1840
|
-
SidebarSeparator.displayName = "SidebarSeparator";
|
|
1841
|
-
SidebarContent = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1842
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1843
|
-
"div",
|
|
1844
|
-
{
|
|
1845
|
-
ref,
|
|
1846
|
-
"data-sidebar": "content",
|
|
1847
|
-
className: cn(
|
|
1848
|
-
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto",
|
|
1849
|
-
// Hide overflow when collapsed, but show when hover-expanded
|
|
1850
|
-
"group-data-[collapsible=icon]:overflow-hidden group-data-[hover-expanded=true]:!overflow-auto",
|
|
1851
|
-
className
|
|
1852
|
-
),
|
|
1853
|
-
...props
|
|
1854
|
-
}
|
|
1855
|
-
);
|
|
1856
|
-
});
|
|
1857
|
-
SidebarContent.displayName = "SidebarContent";
|
|
1858
|
-
SidebarGroup = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1859
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1860
|
-
"div",
|
|
1861
|
-
{
|
|
1862
|
-
ref,
|
|
1863
|
-
"data-sidebar": "group",
|
|
1864
|
-
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
1865
|
-
...props
|
|
1866
|
-
}
|
|
1867
|
-
);
|
|
1868
|
-
});
|
|
1869
|
-
SidebarGroup.displayName = "SidebarGroup";
|
|
1870
|
-
SidebarGroupLabel = React12__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1871
|
-
const Comp = asChild ? reactSlot.Slot : "div";
|
|
1872
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1873
|
-
Comp,
|
|
1874
|
-
{
|
|
1875
|
-
ref,
|
|
1876
|
-
"data-sidebar": "group-label",
|
|
1877
|
-
className: cn(
|
|
1878
|
-
"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",
|
|
1879
|
-
// Hide when collapsed, show when hover-expanded
|
|
1880
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
1881
|
-
"group-data-[hover-expanded=true]:!mt-0 group-data-[hover-expanded=true]:!opacity-100",
|
|
1882
|
-
className
|
|
1883
|
-
),
|
|
1884
|
-
...props
|
|
1885
|
-
}
|
|
1886
|
-
);
|
|
1887
|
-
});
|
|
1888
|
-
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
1889
|
-
SidebarGroupAction = React12__namespace.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
1890
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
1891
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1892
|
-
Comp,
|
|
1893
|
-
{
|
|
1894
|
-
ref,
|
|
1895
|
-
"data-sidebar": "group-action",
|
|
1896
|
-
className: cn(
|
|
1897
|
-
"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",
|
|
1898
|
-
// Increases the hit area of the button on mobile.
|
|
1899
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
1900
|
-
"group-data-[collapsible=icon]:hidden",
|
|
1901
|
-
className
|
|
1902
|
-
),
|
|
1903
|
-
...props
|
|
1904
|
-
}
|
|
1905
|
-
);
|
|
1906
|
-
});
|
|
1907
|
-
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
1908
|
-
SidebarGroupContent = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1909
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
|
-
"div",
|
|
1911
|
-
{
|
|
1912
|
-
ref,
|
|
1913
|
-
"data-sidebar": "group-content",
|
|
1914
|
-
className: cn("w-full text-sm", className),
|
|
1915
|
-
...props
|
|
1916
|
-
}
|
|
1917
|
-
);
|
|
1918
|
-
});
|
|
1919
|
-
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
1920
|
-
SidebarMenu = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1921
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1922
|
-
"ul",
|
|
1923
|
-
{
|
|
1924
|
-
ref,
|
|
1925
|
-
"data-sidebar": "menu",
|
|
1926
|
-
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
1927
|
-
...props
|
|
1928
|
-
}
|
|
1929
|
-
);
|
|
1930
|
-
});
|
|
1931
|
-
SidebarMenu.displayName = "SidebarMenu";
|
|
1932
|
-
SidebarMenuItem = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1933
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1934
|
-
"li",
|
|
1935
|
-
{
|
|
1936
|
-
ref,
|
|
1937
|
-
"data-sidebar": "menu-item",
|
|
1938
|
-
className: cn("group/menu-item relative", className),
|
|
1939
|
-
...props
|
|
1940
|
-
}
|
|
1941
|
-
);
|
|
1942
|
-
});
|
|
1943
|
-
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1944
|
-
sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
1945
|
-
// Base styles + hover-expand overrides
|
|
1946
|
-
"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",
|
|
1947
|
-
{
|
|
1948
|
-
variants: {
|
|
1949
|
-
variant: {
|
|
1950
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
1951
|
-
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))]"
|
|
1952
|
-
},
|
|
1953
|
-
size: {
|
|
1954
|
-
default: "h-8 text-sm",
|
|
1955
|
-
sm: "h-7 text-xs",
|
|
1956
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
1957
|
-
},
|
|
1958
|
-
isActive: {
|
|
1959
|
-
true: "bg-primary/10 text-primary font-bold"
|
|
1960
|
-
}
|
|
1961
|
-
},
|
|
1962
|
-
defaultVariants: {
|
|
1963
|
-
variant: "default",
|
|
1964
|
-
size: "default"
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
);
|
|
1968
|
-
SidebarMenuButton = React12__namespace.forwardRef(
|
|
1969
|
-
({
|
|
1970
|
-
asChild = false,
|
|
1971
|
-
isActive = false,
|
|
1972
|
-
variant = "default",
|
|
1973
|
-
size = "default",
|
|
1974
|
-
tooltip,
|
|
1975
|
-
className,
|
|
1976
|
-
...props
|
|
1977
|
-
}, ref) => {
|
|
1978
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
1979
|
-
const { isMobile, state } = useSidebar();
|
|
1980
|
-
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1981
|
-
Comp,
|
|
1982
|
-
{
|
|
1983
|
-
ref,
|
|
1984
|
-
"data-sidebar": "menu-button",
|
|
1985
|
-
"data-size": size,
|
|
1986
|
-
"data-active": isActive,
|
|
1987
|
-
className: cn(
|
|
1988
|
-
sidebarMenuButtonVariants({ variant, size, isActive }),
|
|
1989
|
-
className
|
|
1990
|
-
),
|
|
1991
|
-
...props
|
|
1992
|
-
}
|
|
1993
|
-
);
|
|
1994
|
-
if (!tooltip) {
|
|
1995
|
-
return button;
|
|
1996
|
-
}
|
|
1997
|
-
if (typeof tooltip === "string") {
|
|
1998
|
-
tooltip = {
|
|
1999
|
-
children: tooltip
|
|
2000
|
-
};
|
|
2001
|
-
}
|
|
2002
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
2003
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: button }),
|
|
2004
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2005
|
-
TooltipContent,
|
|
2006
|
-
{
|
|
2007
|
-
side: "right",
|
|
2008
|
-
align: "center",
|
|
2009
|
-
hidden: state !== "collapsed" || isMobile,
|
|
2010
|
-
...tooltip
|
|
2011
|
-
}
|
|
2012
|
-
)
|
|
2013
|
-
] });
|
|
2014
|
-
}
|
|
2015
|
-
);
|
|
2016
|
-
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2017
|
-
SidebarMenuAction = React12__namespace.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2018
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
2019
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2020
|
-
Comp,
|
|
2021
|
-
{
|
|
2022
|
-
ref,
|
|
2023
|
-
"data-sidebar": "menu-action",
|
|
2024
|
-
className: cn(
|
|
2025
|
-
"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",
|
|
2026
|
-
// Increases the hit area of the button on mobile.
|
|
2027
|
-
"after:absolute after:-inset-2 after:md:hidden",
|
|
2028
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
2029
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2030
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2031
|
-
"group-data-[collapsible=icon]:hidden",
|
|
2032
|
-
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
2033
|
-
className
|
|
2034
|
-
),
|
|
2035
|
-
...props
|
|
2036
|
-
}
|
|
2037
|
-
);
|
|
2038
|
-
});
|
|
2039
|
-
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2040
|
-
SidebarMenuBadge = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2041
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2042
|
-
"div",
|
|
2043
|
-
{
|
|
2044
|
-
ref,
|
|
2045
|
-
"data-sidebar": "menu-badge",
|
|
2046
|
-
className: cn(
|
|
2047
|
-
"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",
|
|
2048
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
2049
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
2050
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
2051
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
2052
|
-
"group-data-[collapsible=icon]:hidden",
|
|
2053
|
-
className
|
|
2054
|
-
),
|
|
2055
|
-
...props
|
|
2056
|
-
}
|
|
2057
|
-
);
|
|
2058
|
-
});
|
|
2059
|
-
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
2060
|
-
SidebarMenuSkeleton = React12__namespace.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2061
|
-
const width = React12__namespace.useMemo(() => {
|
|
2062
|
-
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2063
|
-
}, []);
|
|
2064
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2065
|
-
"div",
|
|
2066
|
-
{
|
|
2067
|
-
ref,
|
|
2068
|
-
"data-sidebar": "menu-skeleton",
|
|
2069
|
-
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2070
|
-
...props,
|
|
2071
|
-
children: [
|
|
2072
|
-
showIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2073
|
-
"div",
|
|
2074
|
-
{
|
|
2075
|
-
className: "size-4 rounded-md animate-pulse bg-muted",
|
|
2076
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
2077
|
-
}
|
|
2078
|
-
),
|
|
2079
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2080
|
-
"div",
|
|
2081
|
-
{
|
|
2082
|
-
className: "h-4 flex-1 max-w-[--skeleton-width] animate-pulse bg-muted rounded-full",
|
|
2083
|
-
"data-sidebar": "menu-skeleton-text",
|
|
2084
|
-
style: {
|
|
2085
|
-
"--skeleton-width": width
|
|
2086
|
-
}
|
|
2087
|
-
}
|
|
2088
|
-
)
|
|
2089
|
-
]
|
|
2090
|
-
}
|
|
2091
|
-
);
|
|
2092
|
-
});
|
|
2093
|
-
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
2094
|
-
SidebarMenuSub = React12__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2095
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2096
|
-
"ul",
|
|
2097
|
-
{
|
|
2098
|
-
ref,
|
|
2099
|
-
"data-sidebar": "menu-sub",
|
|
2100
|
-
className: cn(
|
|
2101
|
-
"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",
|
|
2102
|
-
// Hide when collapsed, show when hover-expanded
|
|
2103
|
-
"group-data-[collapsible=icon]:hidden group-data-[hover-expanded=true]:!flex",
|
|
2104
|
-
className
|
|
2105
|
-
),
|
|
2106
|
-
...props
|
|
2107
|
-
}
|
|
2108
|
-
);
|
|
2109
|
-
});
|
|
2110
|
-
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
2111
|
-
SidebarMenuSubItem = React12__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, ...props }));
|
|
2112
|
-
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
2113
|
-
SidebarMenuSubButton = React12__namespace.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2114
|
-
const Comp = asChild ? reactSlot.Slot : "a";
|
|
2115
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2116
|
-
Comp,
|
|
2117
|
-
{
|
|
2118
|
-
ref,
|
|
2119
|
-
"data-sidebar": "menu-sub-button",
|
|
2120
|
-
"data-size": size,
|
|
2121
|
-
"data-active": isActive,
|
|
2122
|
-
className: cn(
|
|
2123
|
-
"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",
|
|
2124
|
-
"data-[active=true]:bg-primary/15 data-[active=true]:!text-primary data-[active=true]:font-bold",
|
|
2125
|
-
size === "sm" && "text-xs",
|
|
2126
|
-
size === "md" && "text-sm",
|
|
2127
|
-
className
|
|
2128
|
-
),
|
|
2129
|
-
...props
|
|
2130
|
-
}
|
|
2131
|
-
);
|
|
2132
|
-
});
|
|
2133
|
-
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
2134
|
-
}
|
|
2135
|
-
});
|
|
2136
|
-
function Spinner({ size = "md", className }) {
|
|
2137
|
-
const sizeClasses = {
|
|
2138
|
-
sm: "h-4 w-4",
|
|
2139
|
-
md: "h-6 w-6",
|
|
2140
|
-
lg: "h-8 w-8"
|
|
2141
|
-
};
|
|
2142
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2143
|
-
"div",
|
|
2144
|
-
{
|
|
2145
|
-
className: cn(
|
|
2146
|
-
"animate-spin rounded-full border-2 border-current border-t-transparent",
|
|
2147
|
-
sizeClasses[size],
|
|
2148
|
-
className
|
|
2149
|
-
)
|
|
2150
|
-
}
|
|
2151
|
-
);
|
|
2152
|
-
}
|
|
2153
|
-
var Textarea, ButtonLoading;
|
|
2154
|
-
var init_primitives = __esm({
|
|
2155
|
-
"src/ui/primitives/index.tsx"() {
|
|
2156
|
-
init_utils();
|
|
2157
|
-
init_button();
|
|
2158
|
-
init_badge();
|
|
2159
|
-
init_button();
|
|
2160
|
-
init_input();
|
|
2161
|
-
init_checkbox();
|
|
2162
|
-
init_card();
|
|
2163
|
-
init_separator();
|
|
2164
|
-
init_card();
|
|
2165
|
-
init_table();
|
|
2166
|
-
init_dropdown_menu();
|
|
2167
|
-
init_dialog();
|
|
2168
|
-
init_tabs();
|
|
2169
|
-
init_breadcrumb();
|
|
2170
|
-
init_keyboard();
|
|
2171
|
-
init_pagination();
|
|
2172
|
-
init_status_badge();
|
|
2173
|
-
init_sidebar2();
|
|
2174
|
-
init_popover();
|
|
2175
|
-
init_scroll_area();
|
|
2176
|
-
init_calendar();
|
|
2177
|
-
init_resizable();
|
|
2178
|
-
init_slider();
|
|
2179
|
-
init_switch();
|
|
2180
|
-
init_tooltip();
|
|
2181
|
-
init_select();
|
|
2182
|
-
init_menubar();
|
|
2183
|
-
init_navigation_menu();
|
|
2184
|
-
init_toggle();
|
|
2185
|
-
init_toggle_group();
|
|
2186
|
-
init_combobox();
|
|
2187
|
-
init_label();
|
|
2188
|
-
Textarea = React12__namespace.forwardRef(
|
|
2189
|
-
({ className, ...props }, ref) => {
|
|
2190
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2191
|
-
"textarea",
|
|
2192
|
-
{
|
|
2193
|
-
className: cn(
|
|
2194
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",
|
|
2195
|
-
className
|
|
2196
|
-
),
|
|
2197
|
-
ref,
|
|
2198
|
-
...props
|
|
2199
|
-
}
|
|
2200
|
-
);
|
|
2201
|
-
}
|
|
2202
|
-
);
|
|
2203
|
-
Textarea.displayName = "Textarea";
|
|
2204
|
-
ButtonLoading = React12__namespace.forwardRef(({ className, isLoading, children, disabled, ...props }, ref) => {
|
|
2205
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2206
|
-
Button,
|
|
2207
|
-
{
|
|
2208
|
-
className: cn("gap-2", className),
|
|
2209
|
-
disabled: isLoading || disabled,
|
|
2210
|
-
ref,
|
|
2211
|
-
...props,
|
|
2212
|
-
children: [
|
|
2213
|
-
isLoading && /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }),
|
|
2214
|
-
children
|
|
2215
|
-
]
|
|
2216
|
-
}
|
|
2217
|
-
);
|
|
2218
|
-
});
|
|
2219
|
-
ButtonLoading.displayName = "ButtonLoading";
|
|
2220
|
-
}
|
|
2221
|
-
});
|
|
2222
|
-
var init_radio_group = __esm({
|
|
2223
|
-
"src/ui/forms/radio-group.tsx"() {
|
|
2224
|
-
"use client";
|
|
2225
|
-
}
|
|
2226
|
-
});
|
|
2227
|
-
var init_rating = __esm({
|
|
2228
|
-
"src/ui/forms/rating.tsx"() {
|
|
2229
|
-
"use client";
|
|
2230
|
-
classVarianceAuthority.cva(
|
|
2231
|
-
"transition-all duration-100 ease-in-out hover:scale-110",
|
|
2232
|
-
{
|
|
2233
|
-
variants: {
|
|
2234
|
-
size: {
|
|
2235
|
-
sm: "w-4 h-4",
|
|
2236
|
-
default: "w-6 h-6",
|
|
2237
|
-
lg: "w-8 h-8"
|
|
2238
|
-
},
|
|
2239
|
-
variant: {
|
|
2240
|
-
default: "text-yellow-400",
|
|
2241
|
-
primary: "text-primary",
|
|
2242
|
-
muted: "text-muted-foreground"
|
|
2243
|
-
},
|
|
2244
|
-
filled: {
|
|
2245
|
-
true: "",
|
|
2246
|
-
false: "text-gray-200"
|
|
2247
|
-
}
|
|
2248
|
-
},
|
|
2249
|
-
defaultVariants: {
|
|
2250
|
-
size: "default",
|
|
2251
|
-
variant: "default",
|
|
2252
|
-
filled: false
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
);
|
|
2256
|
-
}
|
|
2257
|
-
});
|
|
2258
|
-
var init_command = __esm({
|
|
2259
|
-
"src/ui/forms/command.tsx"() {
|
|
2260
|
-
"use client";
|
|
2261
|
-
}
|
|
2262
|
-
});
|
|
2263
|
-
var MultiSelect;
|
|
2264
|
-
var init_multi_select = __esm({
|
|
2265
|
-
"src/ui/forms/multi-select.tsx"() {
|
|
2266
|
-
"use client";
|
|
2267
|
-
init_utils();
|
|
2268
|
-
init_primitives();
|
|
2269
|
-
init_client();
|
|
2270
|
-
MultiSelect = React12__namespace.forwardRef(
|
|
2271
|
-
({
|
|
2272
|
-
options,
|
|
2273
|
-
value: controlledValue,
|
|
2274
|
-
onValueChange,
|
|
2275
|
-
defaultValue = [],
|
|
2276
|
-
placeholder = "Select options...",
|
|
2277
|
-
searchPlaceholder = "Search...",
|
|
2278
|
-
emptyText = "No option found.",
|
|
2279
|
-
maxCount = 3,
|
|
2280
|
-
disabled = false,
|
|
2281
|
-
responsive = false,
|
|
2282
|
-
className,
|
|
2283
|
-
id
|
|
2284
|
-
}, ref) => {
|
|
2285
|
-
const [internalValue, setInternalValue] = React12.useState(defaultValue);
|
|
2286
|
-
const [open, setOpen] = React12.useState(false);
|
|
2287
|
-
const [searchValue, setSearchValue] = React12.useState("");
|
|
2288
|
-
const isControlled = controlledValue !== void 0;
|
|
2289
|
-
const value = isControlled ? controlledValue : internalValue;
|
|
2290
|
-
const containerRef = React12.useRef(null);
|
|
2291
|
-
const searchInputRef = React12.useRef(null);
|
|
2292
|
-
const dropdownRef = React12.useRef(null);
|
|
2293
|
-
const buttonRef = React12.useRef(null);
|
|
2294
|
-
const [politeMessage, setPoliteMessage] = React12.useState("");
|
|
2295
|
-
const [assertiveMessage, setAssertiveMessage] = React12.useState("");
|
|
2296
|
-
const prevSelectedCount = React12.useRef(value.length);
|
|
2297
|
-
const announce = React12.useCallback(
|
|
2298
|
-
(message, priority = "polite") => {
|
|
2299
|
-
if (priority === "assertive") {
|
|
2300
|
-
setAssertiveMessage(message);
|
|
2301
|
-
setTimeout(() => setAssertiveMessage(""), 100);
|
|
2302
|
-
} else {
|
|
2303
|
-
setPoliteMessage(message);
|
|
2304
|
-
setTimeout(() => setPoliteMessage(""), 100);
|
|
2305
|
-
}
|
|
2306
|
-
},
|
|
2307
|
-
[]
|
|
2308
|
-
);
|
|
2309
|
-
const [screenSize, setScreenSize] = React12.useState("desktop");
|
|
2310
|
-
React12.useEffect(() => {
|
|
2311
|
-
if (typeof window === "undefined") return;
|
|
2312
|
-
const handleResize = () => {
|
|
2313
|
-
const width = window.innerWidth;
|
|
2314
|
-
if (width < 640) {
|
|
2315
|
-
setScreenSize("mobile");
|
|
2316
|
-
} else if (width < 1024) {
|
|
2317
|
-
setScreenSize("tablet");
|
|
2318
|
-
} else {
|
|
2319
|
-
setScreenSize("desktop");
|
|
2320
|
-
}
|
|
2321
|
-
};
|
|
2322
|
-
handleResize();
|
|
2323
|
-
window.addEventListener("resize", handleResize);
|
|
2324
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
2325
|
-
}, []);
|
|
2326
|
-
const getResponsiveSettings = React12.useCallback(() => {
|
|
2327
|
-
if (!responsive) {
|
|
2328
|
-
return {
|
|
2329
|
-
maxCount,
|
|
2330
|
-
compactMode: false
|
|
2331
|
-
};
|
|
2332
|
-
}
|
|
2333
|
-
if (responsive === true) {
|
|
2334
|
-
const defaultResponsive = {
|
|
2335
|
-
mobile: { maxCount: 2, compactMode: true },
|
|
2336
|
-
tablet: { maxCount: 4, compactMode: false },
|
|
2337
|
-
desktop: { maxCount: 6, compactMode: false }
|
|
2338
|
-
};
|
|
2339
|
-
const currentSettings2 = defaultResponsive[screenSize];
|
|
2340
|
-
return {
|
|
2341
|
-
maxCount: currentSettings2?.maxCount ?? maxCount,
|
|
2342
|
-
compactMode: currentSettings2?.compactMode ?? false
|
|
2343
|
-
};
|
|
2344
|
-
}
|
|
2345
|
-
const currentSettings = responsive[screenSize];
|
|
2346
|
-
return {
|
|
2347
|
-
maxCount: currentSettings?.maxCount ?? maxCount,
|
|
2348
|
-
compactMode: currentSettings?.compactMode ?? false
|
|
2349
|
-
};
|
|
2350
|
-
}, [responsive, screenSize, maxCount]);
|
|
2351
|
-
const responsiveSettings = getResponsiveSettings();
|
|
2352
|
-
const filteredOptions = React12.useMemo(() => {
|
|
2353
|
-
if (!searchValue.trim()) {
|
|
2354
|
-
return options;
|
|
2355
|
-
}
|
|
2356
|
-
const searchLower = searchValue.toLowerCase();
|
|
2357
|
-
return options.filter(
|
|
2358
|
-
(option) => option.label.toLowerCase().includes(searchLower) || String(option.value).toLowerCase().includes(searchLower)
|
|
2359
|
-
);
|
|
2360
|
-
}, [options, searchValue]);
|
|
2361
|
-
React12.useEffect(() => {
|
|
2362
|
-
if (!open) {
|
|
2363
|
-
setSearchValue("");
|
|
2364
|
-
}
|
|
2365
|
-
}, [open]);
|
|
2366
|
-
React12.useEffect(() => {
|
|
2367
|
-
if (open && searchInputRef.current) {
|
|
2368
|
-
setTimeout(() => {
|
|
2369
|
-
searchInputRef.current?.focus();
|
|
2370
|
-
}, 50);
|
|
2371
|
-
}
|
|
2372
|
-
}, [open]);
|
|
2373
|
-
React12.useEffect(() => {
|
|
2374
|
-
if (!open) return;
|
|
2375
|
-
const handleClickOutside = (event) => {
|
|
2376
|
-
const target = event.target;
|
|
2377
|
-
if (containerRef.current && !containerRef.current.contains(target) && dropdownRef.current && !dropdownRef.current.contains(target)) {
|
|
2378
|
-
if (target.closest('[data-slot="dialog-content"]')) {
|
|
2379
|
-
return;
|
|
2380
|
-
}
|
|
2381
|
-
setOpen(false);
|
|
2382
|
-
}
|
|
2383
|
-
};
|
|
2384
|
-
const handleEscape = (event) => {
|
|
2385
|
-
if (event.key === "Escape" && open) {
|
|
2386
|
-
event.stopPropagation();
|
|
2387
|
-
setOpen(false);
|
|
2388
|
-
}
|
|
2389
|
-
};
|
|
2390
|
-
document.addEventListener("mousedown", handleClickOutside, true);
|
|
2391
|
-
document.addEventListener("keydown", handleEscape, true);
|
|
2392
|
-
return () => {
|
|
2393
|
-
document.removeEventListener("mousedown", handleClickOutside, true);
|
|
2394
|
-
document.removeEventListener("keydown", handleEscape, true);
|
|
2395
|
-
};
|
|
2396
|
-
}, [open]);
|
|
2397
|
-
React12.useEffect(() => {
|
|
2398
|
-
const selectedCount = value.length;
|
|
2399
|
-
const totalOptions = options.filter((opt) => !opt.disabled).length;
|
|
2400
|
-
if (selectedCount !== prevSelectedCount.current) {
|
|
2401
|
-
const diff = selectedCount - prevSelectedCount.current;
|
|
2402
|
-
if (diff > 0) {
|
|
2403
|
-
announce(`${selectedCount} of ${totalOptions} options selected.`);
|
|
2404
|
-
} else if (diff < 0) {
|
|
2405
|
-
announce(
|
|
2406
|
-
`Option removed. ${selectedCount} of ${totalOptions} options selected.`
|
|
2407
|
-
);
|
|
2408
|
-
}
|
|
2409
|
-
prevSelectedCount.current = selectedCount;
|
|
2410
|
-
}
|
|
2411
|
-
}, [value, announce, options]);
|
|
2412
|
-
const updateValue = React12.useCallback(
|
|
2413
|
-
(newValue) => {
|
|
2414
|
-
if (!isControlled) {
|
|
2415
|
-
setInternalValue(newValue);
|
|
2416
|
-
}
|
|
2417
|
-
onValueChange?.(newValue);
|
|
2418
|
-
},
|
|
2419
|
-
[isControlled, onValueChange]
|
|
2420
|
-
);
|
|
2421
|
-
const handleSelect = React12.useCallback(
|
|
2422
|
-
(optionValue) => {
|
|
2423
|
-
const option = options.find((opt) => opt.value === optionValue);
|
|
2424
|
-
if (option?.disabled) {
|
|
2425
|
-
return;
|
|
2426
|
-
}
|
|
2427
|
-
const newValue = value.includes(optionValue) ? value.filter((v) => v !== optionValue) : [...value, optionValue];
|
|
2428
|
-
updateValue(newValue);
|
|
2429
|
-
},
|
|
2430
|
-
[value, options, updateValue]
|
|
2431
|
-
);
|
|
2432
|
-
const handleSelectAll = React12.useCallback(() => {
|
|
2433
|
-
updateValue(
|
|
2434
|
-
filteredOptions.filter((opt) => !opt.disabled).map((opt) => opt.value)
|
|
2435
|
-
);
|
|
2436
|
-
}, [updateValue, filteredOptions]);
|
|
2437
|
-
const handleClearAll = React12.useCallback(() => {
|
|
2438
|
-
updateValue([]);
|
|
2439
|
-
}, [updateValue]);
|
|
2440
|
-
const handleRemove = React12.useCallback(
|
|
2441
|
-
(optionValue, e) => {
|
|
2442
|
-
e.stopPropagation();
|
|
2443
|
-
updateValue(value.filter((v) => v !== optionValue));
|
|
2444
|
-
},
|
|
2445
|
-
[updateValue, value]
|
|
2446
|
-
);
|
|
2447
|
-
const clearExtraOptions = React12.useCallback(() => {
|
|
2448
|
-
const newSelectedValues = value.slice(0, responsiveSettings.maxCount);
|
|
2449
|
-
updateValue(newSelectedValues);
|
|
2450
|
-
}, [value, responsiveSettings.maxCount, updateValue]);
|
|
2451
|
-
React12__namespace.useImperativeHandle(
|
|
2452
|
-
ref,
|
|
2453
|
-
() => ({
|
|
2454
|
-
reset: () => {
|
|
2455
|
-
updateValue(defaultValue);
|
|
2456
|
-
setOpen(false);
|
|
2457
|
-
setSearchValue("");
|
|
2458
|
-
},
|
|
2459
|
-
getSelectedValues: () => value,
|
|
2460
|
-
setSelectedValues: (values) => {
|
|
2461
|
-
updateValue(values);
|
|
2462
|
-
},
|
|
2463
|
-
clear: () => {
|
|
2464
|
-
updateValue([]);
|
|
2465
|
-
},
|
|
2466
|
-
focus: () => {
|
|
2467
|
-
buttonRef.current?.focus();
|
|
2468
|
-
}
|
|
2469
|
-
}),
|
|
2470
|
-
[value, defaultValue, updateValue]
|
|
2471
|
-
);
|
|
2472
|
-
const selectedOptions = options.filter(
|
|
2473
|
-
(option) => value.includes(option.value)
|
|
2474
|
-
);
|
|
2475
|
-
const getBadgeColor = (index) => {
|
|
2476
|
-
const colors = [
|
|
2477
|
-
"bg-blue-100 text-blue-700 hover:bg-blue-200",
|
|
2478
|
-
"bg-green-100 text-green-700 hover:bg-green-200",
|
|
2479
|
-
"bg-purple-100 text-purple-700 hover:bg-purple-200",
|
|
2480
|
-
"bg-orange-100 text-orange-700 hover:bg-orange-200",
|
|
2481
|
-
"bg-pink-100 text-pink-700 hover:bg-pink-200",
|
|
2482
|
-
"bg-cyan-100 text-cyan-700 hover:bg-cyan-200"
|
|
2483
|
-
];
|
|
2484
|
-
return colors[index % colors.length];
|
|
2485
|
-
};
|
|
2486
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative w-full", children: [
|
|
2487
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sr-only", children: [
|
|
2488
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "polite", "aria-atomic": "true", role: "status", children: politeMessage }),
|
|
2489
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-live": "assertive", "aria-atomic": "true", role: "alert", children: assertiveMessage })
|
|
2490
|
-
] }),
|
|
2491
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2492
|
-
Button,
|
|
2493
|
-
{
|
|
2494
|
-
ref: buttonRef,
|
|
2495
|
-
type: "button",
|
|
2496
|
-
variant: "outline",
|
|
2497
|
-
role: "combobox",
|
|
2498
|
-
"aria-expanded": open,
|
|
2499
|
-
disabled,
|
|
2500
|
-
className: cn(
|
|
2501
|
-
"w-full justify-between h-auto min-h-10 px-3 py-2",
|
|
2502
|
-
responsiveSettings.compactMode && "min-h-8 text-sm",
|
|
2503
|
-
className
|
|
2504
|
-
),
|
|
2505
|
-
id,
|
|
2506
|
-
onClick: (e) => {
|
|
2507
|
-
e.stopPropagation();
|
|
2508
|
-
setOpen(!open);
|
|
2509
|
-
},
|
|
2510
|
-
children: [
|
|
2511
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: selectedOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2512
|
-
selectedOptions.slice(0, responsiveSettings.maxCount).map((option, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2513
|
-
Badge,
|
|
2514
|
-
{
|
|
2515
|
-
className: cn(
|
|
2516
|
-
"mr-1 mb-1",
|
|
2517
|
-
getBadgeColor(index),
|
|
2518
|
-
responsiveSettings.compactMode && "text-xs px-1.5 py-0.5"
|
|
2519
|
-
),
|
|
2520
|
-
onClick: (e) => handleRemove(option.value, e),
|
|
2521
|
-
children: [
|
|
2522
|
-
option.icon && !responsiveSettings.compactMode && /* @__PURE__ */ jsxRuntime.jsx(option.icon, { className: "mr-2 h-4 w-4" }),
|
|
2523
|
-
option.label,
|
|
2524
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2525
|
-
"div",
|
|
2526
|
-
{
|
|
2527
|
-
role: "button",
|
|
2528
|
-
tabIndex: 0,
|
|
2529
|
-
className: "ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",
|
|
2530
|
-
onKeyDown: (e) => {
|
|
2531
|
-
if (e.key === "Enter") {
|
|
2532
|
-
handleRemove(option.value, e);
|
|
2533
|
-
}
|
|
2534
|
-
},
|
|
2535
|
-
onMouseDown: (e) => {
|
|
2536
|
-
e.preventDefault();
|
|
2537
|
-
e.stopPropagation();
|
|
2538
|
-
},
|
|
2539
|
-
onClick: (e) => handleRemove(option.value, e),
|
|
2540
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
|
|
2541
|
-
}
|
|
2542
|
-
)
|
|
2543
|
-
]
|
|
2544
|
-
},
|
|
2545
|
-
String(option.value)
|
|
2546
|
-
)),
|
|
2547
|
-
value.length > responsiveSettings.maxCount && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2548
|
-
Badge,
|
|
2549
|
-
{
|
|
2550
|
-
className: cn(
|
|
2551
|
-
"mr-1 mb-1 bg-muted text-muted-foreground hover:bg-muted",
|
|
2552
|
-
responsiveSettings.compactMode && "text-xs px-1.5 py-0.5"
|
|
2553
|
-
),
|
|
2554
|
-
children: [
|
|
2555
|
-
"+",
|
|
2556
|
-
value.length - responsiveSettings.maxCount,
|
|
2557
|
-
" more",
|
|
2558
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2559
|
-
"div",
|
|
2560
|
-
{
|
|
2561
|
-
role: "button",
|
|
2562
|
-
tabIndex: 0,
|
|
2563
|
-
className: "ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",
|
|
2564
|
-
onClick: (e) => {
|
|
2565
|
-
e.stopPropagation();
|
|
2566
|
-
clearExtraOptions();
|
|
2567
|
-
},
|
|
2568
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
2569
|
-
}
|
|
2570
|
-
)
|
|
2571
|
-
]
|
|
2572
|
-
}
|
|
2573
|
-
)
|
|
2574
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: placeholder }) }),
|
|
2575
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
2576
|
-
]
|
|
2577
|
-
}
|
|
2578
|
-
),
|
|
2579
|
-
open && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2580
|
-
"div",
|
|
2581
|
-
{
|
|
2582
|
-
ref: dropdownRef,
|
|
2583
|
-
className: "absolute z-[100] mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
2584
|
-
style: {
|
|
2585
|
-
top: "100%",
|
|
2586
|
-
left: 0
|
|
2587
|
-
},
|
|
2588
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
2589
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b px-3 py-2", children: [
|
|
2590
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2591
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2592
|
-
Input,
|
|
2593
|
-
{
|
|
2594
|
-
ref: searchInputRef,
|
|
2595
|
-
placeholder: searchPlaceholder,
|
|
2596
|
-
value: searchValue,
|
|
2597
|
-
onChange: (e) => {
|
|
2598
|
-
e.stopPropagation();
|
|
2599
|
-
setSearchValue(e.target.value);
|
|
2600
|
-
},
|
|
2601
|
-
onKeyDown: (e) => {
|
|
2602
|
-
e.stopPropagation();
|
|
2603
|
-
if (e.key === "Escape") {
|
|
2604
|
-
e.preventDefault();
|
|
2605
|
-
setOpen(false);
|
|
2606
|
-
}
|
|
2607
|
-
},
|
|
2608
|
-
onClick: (e) => {
|
|
2609
|
-
e.stopPropagation();
|
|
2610
|
-
},
|
|
2611
|
-
onFocus: (e) => {
|
|
2612
|
-
e.stopPropagation();
|
|
2613
|
-
},
|
|
2614
|
-
className: "border-0 focus-visible:ring-0 focus-visible:ring-offset-0 h-9 bg-transparent px-0"
|
|
2615
|
-
}
|
|
2616
|
-
),
|
|
2617
|
-
searchValue && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2618
|
-
Button,
|
|
2619
|
-
{
|
|
2620
|
-
type: "button",
|
|
2621
|
-
variant: "ghost",
|
|
2622
|
-
size: "sm",
|
|
2623
|
-
className: "h-6 w-6 p-0",
|
|
2624
|
-
onClick: (e) => {
|
|
2625
|
-
e.stopPropagation();
|
|
2626
|
-
setSearchValue("");
|
|
2627
|
-
searchInputRef.current?.focus();
|
|
2628
|
-
},
|
|
2629
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
|
|
2630
|
-
}
|
|
2631
|
-
)
|
|
2632
|
-
] }),
|
|
2633
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between border-b p-1", children: [
|
|
2634
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2635
|
-
Button,
|
|
2636
|
-
{
|
|
2637
|
-
type: "button",
|
|
2638
|
-
variant: "ghost",
|
|
2639
|
-
size: "sm",
|
|
2640
|
-
className: "h-8 px-2 text-xs",
|
|
2641
|
-
onClick: (e) => {
|
|
2642
|
-
e.stopPropagation();
|
|
2643
|
-
handleSelectAll();
|
|
2644
|
-
},
|
|
2645
|
-
children: "Select All"
|
|
2646
|
-
}
|
|
2647
|
-
),
|
|
2648
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2649
|
-
Button,
|
|
2650
|
-
{
|
|
2651
|
-
type: "button",
|
|
2652
|
-
variant: "ghost",
|
|
2653
|
-
size: "sm",
|
|
2654
|
-
className: "h-8 px-2 text-xs",
|
|
2655
|
-
onClick: (e) => {
|
|
2656
|
-
e.stopPropagation();
|
|
2657
|
-
handleClearAll();
|
|
2658
|
-
},
|
|
2659
|
-
children: "Clear All"
|
|
2660
|
-
}
|
|
2661
|
-
)
|
|
2662
|
-
] }),
|
|
2663
|
-
/* @__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) => {
|
|
2664
|
-
const isSelected = value.includes(option.value);
|
|
2665
|
-
const isDisabled = option.disabled || false;
|
|
2666
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2667
|
-
"div",
|
|
2668
|
-
{
|
|
2669
|
-
role: "option",
|
|
2670
|
-
"aria-selected": isSelected,
|
|
2671
|
-
"aria-disabled": isDisabled,
|
|
2672
|
-
className: cn(
|
|
2673
|
-
"relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
|
|
2674
|
-
isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:bg-accent hover:text-accent-foreground",
|
|
2675
|
-
isSelected && !isDisabled && "bg-accent text-accent-foreground"
|
|
2676
|
-
),
|
|
2677
|
-
onMouseDown: (e) => {
|
|
2678
|
-
e.preventDefault();
|
|
2679
|
-
e.stopPropagation();
|
|
2680
|
-
},
|
|
2681
|
-
onClick: (e) => {
|
|
2682
|
-
e.preventDefault();
|
|
2683
|
-
e.stopPropagation();
|
|
2684
|
-
if (!isDisabled) {
|
|
2685
|
-
handleSelect(option.value);
|
|
2686
|
-
}
|
|
2687
|
-
},
|
|
2688
|
-
children: [
|
|
2689
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2690
|
-
"div",
|
|
2691
|
-
{
|
|
2692
|
-
className: cn(
|
|
2693
|
-
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
2694
|
-
isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
|
|
2695
|
-
),
|
|
2696
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: cn("h-4 w-4") })
|
|
2697
|
-
}
|
|
2698
|
-
),
|
|
2699
|
-
option.icon && /* @__PURE__ */ jsxRuntime.jsx(option.icon, { className: "mr-2 h-4 w-4 text-muted-foreground" }),
|
|
2700
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: option.label })
|
|
2701
|
-
]
|
|
2702
|
-
},
|
|
2703
|
-
String(option.value)
|
|
2704
|
-
);
|
|
2705
|
-
}) }) }),
|
|
2706
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2707
|
-
Button,
|
|
2708
|
-
{
|
|
2709
|
-
type: "button",
|
|
2710
|
-
variant: "outline",
|
|
2711
|
-
size: "sm",
|
|
2712
|
-
className: "w-full h-8 text-xs",
|
|
2713
|
-
onClick: (e) => {
|
|
2714
|
-
e.stopPropagation();
|
|
2715
|
-
setOpen(false);
|
|
2716
|
-
},
|
|
2717
|
-
children: "Close"
|
|
2718
|
-
}
|
|
2719
|
-
) })
|
|
2720
|
-
] })
|
|
2721
|
-
}
|
|
2722
|
-
)
|
|
2723
|
-
] });
|
|
2724
|
-
}
|
|
2725
|
-
);
|
|
2726
|
-
MultiSelect.displayName = "MultiSelect";
|
|
2727
|
-
}
|
|
2728
|
-
});
|
|
2729
|
-
var init_date_picker = __esm({
|
|
2730
|
-
"src/ui/forms/date-picker.tsx"() {
|
|
2731
|
-
"use client";
|
|
2732
|
-
}
|
|
2733
|
-
});
|
|
2734
|
-
var init_date_range_picker = __esm({
|
|
2735
|
-
"src/ui/forms/date-range-picker.tsx"() {
|
|
2736
|
-
"use client";
|
|
2737
|
-
}
|
|
2738
|
-
});
|
|
2739
|
-
var init_input_time = __esm({
|
|
2740
|
-
"src/ui/forms/input-time.tsx"() {
|
|
2741
|
-
"use client";
|
|
2742
|
-
}
|
|
2743
|
-
});
|
|
2744
|
-
var init_date_time_picker = __esm({
|
|
2745
|
-
"src/ui/forms/date-time-picker.tsx"() {
|
|
2746
|
-
"use client";
|
|
2747
|
-
}
|
|
2748
|
-
});
|
|
2749
|
-
var init_emoji_picker = __esm({
|
|
2750
|
-
"src/ui/forms/emoji-picker.tsx"() {
|
|
2751
|
-
"use client";
|
|
2752
|
-
dynamic__default.default(
|
|
2753
|
-
() => {
|
|
2754
|
-
return import('emoji-picker-react');
|
|
2755
|
-
},
|
|
2756
|
-
{ ssr: false }
|
|
2757
|
-
);
|
|
2758
|
-
}
|
|
2759
|
-
});
|
|
2760
|
-
var init_file_thumbnail = __esm({
|
|
2761
|
-
"src/ui/forms/file-thumbnail.tsx"() {
|
|
2762
|
-
}
|
|
2763
|
-
});
|
|
2764
|
-
var init_file_dropzone = __esm({
|
|
2765
|
-
"src/ui/forms/file-dropzone.tsx"() {
|
|
2766
|
-
"use client";
|
|
2767
|
-
}
|
|
2768
|
-
});
|
|
2769
|
-
var init_input_file = __esm({
|
|
2770
|
-
"src/ui/forms/input-file.tsx"() {
|
|
2771
|
-
"use client";
|
|
2772
|
-
}
|
|
2773
|
-
});
|
|
2774
|
-
var init_input_group = __esm({
|
|
2775
|
-
"src/ui/forms/input-group.tsx"() {
|
|
2776
|
-
"use client";
|
|
2777
|
-
}
|
|
2778
|
-
});
|
|
2779
|
-
var init_input_otp = __esm({
|
|
2780
|
-
"src/ui/forms/input-otp.tsx"() {
|
|
2781
|
-
"use client";
|
|
2782
|
-
}
|
|
2783
|
-
});
|
|
2784
|
-
var init_input_phone = __esm({
|
|
2785
|
-
"src/ui/forms/input-phone.tsx"() {
|
|
2786
|
-
"use client";
|
|
2787
|
-
}
|
|
2788
|
-
});
|
|
2789
|
-
var init_input_spin = __esm({
|
|
2790
|
-
"src/ui/forms/input-spin.tsx"() {
|
|
2791
|
-
"use client";
|
|
2792
|
-
}
|
|
2793
|
-
});
|
|
2794
|
-
var init_input_tags = __esm({
|
|
2795
|
-
"src/ui/forms/input-tags.tsx"() {
|
|
2796
|
-
"use client";
|
|
2797
|
-
}
|
|
2798
|
-
});
|
|
2799
|
-
var init_multiple_date_picker = __esm({
|
|
2800
|
-
"src/ui/forms/multiple-date-picker.tsx"() {
|
|
2801
|
-
"use client";
|
|
2802
|
-
}
|
|
2803
|
-
});
|
|
2804
|
-
var init_time_picker = __esm({
|
|
2805
|
-
"src/ui/forms/time-picker.tsx"() {
|
|
2806
|
-
"use client";
|
|
2807
|
-
}
|
|
2808
|
-
});
|
|
2809
|
-
var init_editor = __esm({
|
|
2810
|
-
"src/ui/forms/editor/index.tsx"() {
|
|
2811
|
-
"use client";
|
|
2812
|
-
}
|
|
2813
|
-
});
|
|
2814
|
-
var init_forms = __esm({
|
|
2815
|
-
"src/ui/forms/index.tsx"() {
|
|
2816
|
-
"use client";
|
|
2817
|
-
init_radio_group();
|
|
2818
|
-
init_rating();
|
|
2819
|
-
init_command();
|
|
2820
|
-
init_multi_select();
|
|
2821
|
-
init_date_picker();
|
|
2822
|
-
init_date_range_picker();
|
|
2823
|
-
init_date_time_picker();
|
|
2824
|
-
init_emoji_picker();
|
|
2825
|
-
init_file_dropzone();
|
|
2826
|
-
init_file_thumbnail();
|
|
2827
|
-
init_input_file();
|
|
2828
|
-
init_input_group();
|
|
2829
|
-
init_input_otp();
|
|
2830
|
-
init_input_phone();
|
|
2831
|
-
init_input_spin();
|
|
2832
|
-
init_input_tags();
|
|
2833
|
-
init_input_time();
|
|
2834
|
-
init_multiple_date_picker();
|
|
2835
|
-
init_time_picker();
|
|
2836
|
-
init_editor();
|
|
2837
|
-
React12.createContext(
|
|
2838
|
-
{}
|
|
2839
|
-
);
|
|
2840
|
-
React12.createContext(
|
|
2841
|
-
{}
|
|
2842
|
-
);
|
|
2843
|
-
}
|
|
2844
|
-
});
|
|
2845
|
-
var init_formatted_number_input = __esm({
|
|
2846
|
-
"src/ui/data-display/formatted-number-input.tsx"() {
|
|
2847
|
-
"use client";
|
|
2848
|
-
}
|
|
2849
|
-
});
|
|
2850
|
-
var init_data_table_pagination = __esm({
|
|
2851
|
-
"src/ui/data-display/data-table-pagination.tsx"() {
|
|
2852
|
-
"use client";
|
|
2853
|
-
}
|
|
2854
|
-
});
|
|
2855
|
-
var init_kpi_card = __esm({
|
|
2856
|
-
"src/ui/data-display/kpi-card.tsx"() {
|
|
2857
|
-
"use client";
|
|
2858
|
-
}
|
|
2859
|
-
});
|
|
2860
|
-
var THEME_STYLES;
|
|
2861
|
-
var init_compact_stat_bar = __esm({
|
|
2862
|
-
"src/ui/data-display/compact-stat-bar.tsx"() {
|
|
2863
|
-
init_utils();
|
|
2864
|
-
THEME_STYLES = {
|
|
2865
|
-
dark: {
|
|
2866
|
-
wrapper: "hover:bg-[#181d26]/5 dark:hover:bg-slate-100/5",
|
|
2867
|
-
box: "bg-[#181d26] group-hover:bg-[#0a2e0e] dark:bg-slate-800 dark:group-hover:bg-slate-700",
|
|
2868
|
-
icon: "text-white",
|
|
2869
|
-
label: "text-[#181d26] dark:text-slate-300"
|
|
2870
|
-
},
|
|
2871
|
-
green: {
|
|
2872
|
-
wrapper: "hover:bg-[#006400]/10",
|
|
2873
|
-
box: "bg-[#006400] group-hover:bg-[#39bf45]",
|
|
2874
|
-
icon: "text-white",
|
|
2875
|
-
label: "text-[#006400] dark:text-[#39bf45]"
|
|
2876
|
-
},
|
|
2877
|
-
blue: {
|
|
2878
|
-
wrapper: "hover:bg-[#254fad]/10",
|
|
2879
|
-
box: "bg-[#254fad] group-hover:bg-[#1d3d8f]",
|
|
2880
|
-
icon: "text-white",
|
|
2881
|
-
label: "text-[#254fad] dark:text-[#60a5fa]"
|
|
2882
|
-
},
|
|
2883
|
-
purple: {
|
|
2884
|
-
wrapper: "hover:bg-[#7C3AED]/10",
|
|
2885
|
-
box: "bg-[#7C3AED] group-hover:bg-[#6D28D9]",
|
|
2886
|
-
icon: "text-white",
|
|
2887
|
-
label: "text-[#7C3AED] dark:text-[#a78bfa]"
|
|
2888
|
-
},
|
|
2889
|
-
orange: {
|
|
2890
|
-
wrapper: "hover:bg-[#EA580C]/10",
|
|
2891
|
-
box: "bg-[#EA580C] group-hover:bg-[#C2410C]",
|
|
2892
|
-
icon: "text-white",
|
|
2893
|
-
label: "text-[#EA580C] dark:text-[#fb923c]"
|
|
2894
|
-
},
|
|
2895
|
-
emerald: {
|
|
2896
|
-
wrapper: "hover:bg-[#059669]/10",
|
|
2897
|
-
box: "bg-[#059669] group-hover:bg-[#047857]",
|
|
2898
|
-
icon: "text-white",
|
|
2899
|
-
label: "text-[#059669] dark:text-[#34d399]"
|
|
2900
|
-
},
|
|
2901
|
-
primary: {
|
|
2902
|
-
wrapper: "hover:bg-primary/10",
|
|
2903
|
-
box: "bg-primary group-hover:bg-primary/90",
|
|
2904
|
-
icon: "text-primary-foreground",
|
|
2905
|
-
label: "text-primary"
|
|
2906
|
-
},
|
|
2907
|
-
destructive: {
|
|
2908
|
-
wrapper: "hover:bg-destructive/10",
|
|
2909
|
-
box: "bg-destructive group-hover:bg-destructive/90",
|
|
2910
|
-
icon: "text-destructive-foreground",
|
|
2911
|
-
label: "text-destructive"
|
|
2912
|
-
},
|
|
2913
|
-
muted: {
|
|
2914
|
-
wrapper: "hover:bg-muted/50",
|
|
2915
|
-
box: "bg-muted group-hover:bg-muted-foreground/20",
|
|
2916
|
-
icon: "text-muted-foreground",
|
|
2917
|
-
label: "text-muted-foreground"
|
|
2918
|
-
},
|
|
2919
|
-
rose: {
|
|
2920
|
-
wrapper: "hover:bg-[#E11D48]/10",
|
|
2921
|
-
box: "bg-[#E11D48] group-hover:bg-[#BE123C]",
|
|
2922
|
-
icon: "text-white",
|
|
2923
|
-
label: "text-[#E11D48] dark:text-[#fb7185]"
|
|
2924
|
-
}
|
|
2925
|
-
};
|
|
2926
|
-
React12.memo(function CompactStatBar2({
|
|
2927
|
-
items,
|
|
2928
|
-
className
|
|
2929
|
-
}) {
|
|
2930
|
-
if (!items || items.length === 0) return null;
|
|
2931
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col md:flex-row md:items-stretch gap-2 pb-1", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-stretch overflow-x-auto no-scrollbar flex-1 bg-white dark:bg-[#1e293b] border border-slate-200 dark:border-slate-800 shadow-sm rounded-[10px] divide-x divide-slate-100 dark:divide-slate-800", children: items.map((item) => {
|
|
2932
|
-
const theme = THEME_STYLES[item.colorTheme || "dark"];
|
|
2933
|
-
const Icon2 = item.icon;
|
|
2934
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2935
|
-
"div",
|
|
2936
|
-
{
|
|
2937
|
-
className: cn(
|
|
2938
|
-
"flex items-center gap-3 min-w-fit px-5 py-2 flex-1 transition-colors group cursor-default",
|
|
2939
|
-
theme.wrapper
|
|
2940
|
-
),
|
|
2941
|
-
children: [
|
|
2942
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2943
|
-
"div",
|
|
2944
|
-
{
|
|
2945
|
-
className: cn(
|
|
2946
|
-
"p-1.5 rounded-md transition-colors shadow-sm shrink-0",
|
|
2947
|
-
theme.box
|
|
2948
|
-
),
|
|
2949
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: cn("w-3.5 h-3.5", theme.icon), strokeWidth: 2.5 })
|
|
2950
|
-
}
|
|
2951
|
-
),
|
|
2952
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
2953
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2954
|
-
"span",
|
|
2955
|
-
{
|
|
2956
|
-
className: cn(
|
|
2957
|
-
"text-[9px] font-bold uppercase tracking-wider mb-0.5",
|
|
2958
|
-
item.isHighlighted ? "text-emerald-600 dark:text-emerald-400" : theme.label
|
|
2959
|
-
),
|
|
2960
|
-
children: item.label
|
|
2961
|
-
}
|
|
2962
|
-
),
|
|
2963
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
2964
|
-
"font-black leading-none",
|
|
2965
|
-
item.isHighlighted ? "text-[22px] text-emerald-700 dark:text-emerald-400" : "text-[17px] text-slate-900 dark:text-white"
|
|
2966
|
-
), children: item.value })
|
|
2967
|
-
] })
|
|
2968
|
-
]
|
|
2969
|
-
},
|
|
2970
|
-
item.id
|
|
2971
|
-
);
|
|
2972
|
-
}) }) });
|
|
2973
|
-
});
|
|
2974
|
-
}
|
|
2975
|
-
});
|
|
2976
|
-
var init_show_more_text = __esm({
|
|
2977
|
-
"src/ui/data-display/show-more-text.tsx"() {
|
|
2978
|
-
"use client";
|
|
2979
|
-
}
|
|
2980
|
-
});
|
|
2981
|
-
var init_chart = __esm({
|
|
2982
|
-
"src/ui/data-display/chart.tsx"() {
|
|
2983
|
-
"use client";
|
|
2984
|
-
React12.createContext(null);
|
|
2985
|
-
}
|
|
2986
|
-
});
|
|
2987
|
-
var init_carousel = __esm({
|
|
2988
|
-
"src/ui/data-display/carousel.tsx"() {
|
|
2989
|
-
"use client";
|
|
2990
|
-
React12.createContext(null);
|
|
2991
|
-
}
|
|
2992
|
-
});
|
|
2993
|
-
var init_accordion = __esm({
|
|
2994
|
-
"src/ui/data-display/accordion.tsx"() {
|
|
2995
|
-
"use client";
|
|
2996
|
-
}
|
|
2997
|
-
});
|
|
2998
|
-
var init_kanban_item = __esm({
|
|
2999
|
-
"src/ui/data-display/kanban/kanban-item.tsx"() {
|
|
3000
|
-
}
|
|
3001
|
-
});
|
|
3002
|
-
var init_kanban_column = __esm({
|
|
3003
|
-
"src/ui/data-display/kanban/kanban-column.tsx"() {
|
|
3004
|
-
}
|
|
3005
|
-
});
|
|
3006
|
-
var init_kanban_board = __esm({
|
|
3007
|
-
"src/ui/data-display/kanban/kanban-board.tsx"() {
|
|
3008
|
-
}
|
|
3009
|
-
});
|
|
3010
|
-
|
|
3011
|
-
// src/ui/data-display/kanban/kanban-types.ts
|
|
3012
|
-
var init_kanban_types = __esm({
|
|
3013
|
-
"src/ui/data-display/kanban/kanban-types.ts"() {
|
|
3014
|
-
}
|
|
3015
|
-
});
|
|
3016
|
-
|
|
3017
|
-
// src/ui/data-display/kanban/index.ts
|
|
3018
|
-
var init_kanban = __esm({
|
|
3019
|
-
"src/ui/data-display/kanban/index.ts"() {
|
|
3020
|
-
init_kanban_board();
|
|
3021
|
-
init_kanban_column();
|
|
3022
|
-
init_kanban_item();
|
|
3023
|
-
init_kanban_types();
|
|
3024
|
-
}
|
|
3025
|
-
});
|
|
3026
|
-
var init_aspect_ratio = __esm({
|
|
3027
|
-
"src/ui/data-display/aspect-ratio.tsx"() {
|
|
3028
|
-
"use client";
|
|
3029
|
-
}
|
|
3030
|
-
});
|
|
3031
|
-
var init_bento_grid = __esm({
|
|
3032
|
-
"src/ui/data-display/bento-grid.tsx"() {
|
|
3033
|
-
}
|
|
3034
|
-
});
|
|
3035
|
-
var init_highlight = __esm({
|
|
3036
|
-
"src/ui/data-display/highlight.tsx"() {
|
|
3037
|
-
}
|
|
3038
|
-
});
|
|
3039
|
-
var init_code_block_highlight = __esm({
|
|
3040
|
-
"src/ui/data-display/code-block-highlight.tsx"() {
|
|
3041
|
-
"use client";
|
|
3042
|
-
}
|
|
3043
|
-
});
|
|
3044
|
-
var init_collapsible = __esm({
|
|
3045
|
-
"src/ui/data-display/collapsible.tsx"() {
|
|
3046
|
-
"use client";
|
|
3047
|
-
}
|
|
3048
|
-
});
|
|
3049
|
-
var init_hover_card = __esm({
|
|
3050
|
-
"src/ui/data-display/hover-card.tsx"() {
|
|
3051
|
-
"use client";
|
|
3052
|
-
}
|
|
3053
|
-
});
|
|
3054
|
-
var init_iphone_15_pro = __esm({
|
|
3055
|
-
"src/ui/data-display/iphone-15-pro.tsx"() {
|
|
3056
|
-
}
|
|
3057
|
-
});
|
|
3058
|
-
var init_media_grid = __esm({
|
|
3059
|
-
"src/ui/data-display/media-grid.tsx"() {
|
|
3060
|
-
"use client";
|
|
3061
|
-
}
|
|
3062
|
-
});
|
|
3063
|
-
var init_safari = __esm({
|
|
3064
|
-
"src/ui/data-display/safari.tsx"() {
|
|
3065
|
-
}
|
|
3066
|
-
});
|
|
3067
|
-
function Timeline({
|
|
3068
|
-
children,
|
|
3069
|
-
className,
|
|
3070
|
-
align,
|
|
3071
|
-
...props
|
|
3072
|
-
}) {
|
|
3073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3074
|
-
"ul",
|
|
3075
|
-
{
|
|
3076
|
-
"data-slot": "timeline",
|
|
3077
|
-
className: cn(timelineVariants({ align }), className),
|
|
3078
|
-
...props,
|
|
3079
|
-
children
|
|
3080
|
-
}
|
|
3081
|
-
);
|
|
3082
|
-
}
|
|
3083
|
-
function TimelineItem({
|
|
3084
|
-
className,
|
|
3085
|
-
status,
|
|
3086
|
-
...props
|
|
3087
|
-
}) {
|
|
3088
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3089
|
-
"li",
|
|
3090
|
-
{
|
|
3091
|
-
"data-slot": "timeline-item",
|
|
3092
|
-
className: cn(timelineItemVariants({ status }), className),
|
|
3093
|
-
...props
|
|
3094
|
-
}
|
|
3095
|
-
);
|
|
3096
|
-
}
|
|
3097
|
-
function TimelineDot({
|
|
3098
|
-
className,
|
|
3099
|
-
iconClassName,
|
|
3100
|
-
status = "current",
|
|
3101
|
-
customIconName,
|
|
3102
|
-
customStatusName,
|
|
3103
|
-
...props
|
|
3104
|
-
}) {
|
|
3105
|
-
let statusIconName = statusIconNames["current"].iconName;
|
|
3106
|
-
let statusLabel = "current";
|
|
3107
|
-
let statusClassName;
|
|
3108
|
-
if (customStatusName && customIconName) {
|
|
3109
|
-
statusIconName = customIconName;
|
|
3110
|
-
statusLabel = customStatusName;
|
|
3111
|
-
} else if (status) {
|
|
3112
|
-
statusIconName = statusIconNames[status].iconName;
|
|
3113
|
-
statusClassName = statusIconNames[status].className;
|
|
3114
|
-
statusLabel = status;
|
|
3115
|
-
}
|
|
3116
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3117
|
-
"div",
|
|
3118
|
-
{
|
|
3119
|
-
"data-slot": "timeline-dot",
|
|
3120
|
-
role: "status",
|
|
3121
|
-
className: cn(
|
|
3122
|
-
"col-start-2 col-end-3 row-start-1 row-end-1 flex justify-center items-center rounded-md",
|
|
3123
|
-
className
|
|
3124
|
-
),
|
|
3125
|
-
"aria-label": statusLabel,
|
|
3126
|
-
...props,
|
|
3127
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3128
|
-
DynamicIcon,
|
|
3129
|
-
{
|
|
3130
|
-
name: statusIconName,
|
|
3131
|
-
className: cn(
|
|
3132
|
-
"size-4 text-muted-foreground",
|
|
3133
|
-
statusClassName,
|
|
3134
|
-
iconClassName
|
|
3135
|
-
)
|
|
3136
|
-
}
|
|
3137
|
-
)
|
|
3138
|
-
}
|
|
3139
|
-
);
|
|
3140
|
-
}
|
|
3141
|
-
function TimelineContent({
|
|
3142
|
-
className,
|
|
3143
|
-
side,
|
|
3144
|
-
...props
|
|
3145
|
-
}) {
|
|
3146
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3147
|
-
"div",
|
|
3148
|
-
{
|
|
3149
|
-
"data-slot": "timeline-content",
|
|
3150
|
-
className: cn(timelineContentVariants({ side }), className),
|
|
3151
|
-
...props
|
|
3152
|
-
}
|
|
3153
|
-
);
|
|
3154
|
-
}
|
|
3155
|
-
function TimelineHeading({
|
|
3156
|
-
className,
|
|
3157
|
-
side,
|
|
3158
|
-
variant,
|
|
3159
|
-
asChild = false,
|
|
3160
|
-
...props
|
|
3161
|
-
}) {
|
|
3162
|
-
const Comp = asChild ? reactSlot.Slot : "h3";
|
|
3163
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3164
|
-
Comp,
|
|
3165
|
-
{
|
|
3166
|
-
"data-slot": "timeline-heading",
|
|
3167
|
-
className: cn(timelineHeadingVariants({ side, variant }), className),
|
|
3168
|
-
...props
|
|
3169
|
-
}
|
|
3170
|
-
);
|
|
3171
|
-
}
|
|
3172
|
-
function TimelineLine({
|
|
3173
|
-
className,
|
|
3174
|
-
done = false,
|
|
3175
|
-
...props
|
|
3176
|
-
}) {
|
|
3177
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3178
|
-
Separator,
|
|
3179
|
-
{
|
|
3180
|
-
"data-slot": "timeline-line",
|
|
3181
|
-
orientation: "vertical",
|
|
3182
|
-
className: cn(
|
|
3183
|
-
"col-start-2 col-end-3 row-start-2 row-end-2 bg-muted-foreground mx-auto w-[0.094rem]",
|
|
3184
|
-
done && "bg-foreground",
|
|
3185
|
-
className
|
|
3186
|
-
),
|
|
3187
|
-
...props
|
|
3188
|
-
}
|
|
3189
|
-
);
|
|
3190
|
-
}
|
|
3191
|
-
var timelineVariants, timelineItemVariants, statusIconNames, timelineContentVariants, timelineHeadingVariants;
|
|
3192
|
-
var init_timeline = __esm({
|
|
3193
|
-
"src/ui/data-display/timeline.tsx"() {
|
|
3194
|
-
init_utils();
|
|
3195
|
-
init_client();
|
|
3196
|
-
init_primitives();
|
|
3197
|
-
timelineVariants = classVarianceAuthority.cva("grid", {
|
|
3198
|
-
variants: {
|
|
3199
|
-
align: {
|
|
3200
|
-
left: "[&>li]:grid-cols-[0_min-content_1fr]",
|
|
3201
|
-
right: "[&>li]:grid-cols-[1fr_min-content]",
|
|
3202
|
-
center: "[&>li]:grid-cols-[1fr_min-content_1fr]"
|
|
3203
|
-
}
|
|
3204
|
-
},
|
|
3205
|
-
defaultVariants: {
|
|
3206
|
-
align: "left"
|
|
3207
|
-
}
|
|
3208
|
-
});
|
|
3209
|
-
timelineItemVariants = classVarianceAuthority.cva("grid items-center gap-x-2", {
|
|
3210
|
-
variants: {
|
|
3211
|
-
status: {
|
|
3212
|
-
done: "text-foreground",
|
|
3213
|
-
default: "text-muted-foreground"
|
|
3214
|
-
}
|
|
3215
|
-
},
|
|
3216
|
-
defaultVariants: {
|
|
3217
|
-
status: "default"
|
|
3218
|
-
}
|
|
3219
|
-
});
|
|
3220
|
-
statusIconNames = {
|
|
3221
|
-
current: {
|
|
3222
|
-
iconName: "Circle",
|
|
3223
|
-
className: "fill-foreground text-foreground rounded-full"
|
|
3224
|
-
},
|
|
3225
|
-
done: {
|
|
3226
|
-
iconName: "Check",
|
|
3227
|
-
className: "bg-primary text-primary-foreground p-0.5 rounded-full"
|
|
3228
|
-
},
|
|
3229
|
-
error: {
|
|
3230
|
-
iconName: "X",
|
|
3231
|
-
className: "bg-destructive text-destructive-foreground p-0.5 rounded-full"
|
|
3232
|
-
}
|
|
3233
|
-
};
|
|
3234
|
-
timelineContentVariants = classVarianceAuthority.cva("row-start-2 row-end-2 pb-8", {
|
|
3235
|
-
variants: {
|
|
3236
|
-
side: {
|
|
3237
|
-
start: "col-start-3 col-end-4 me-auto text-start",
|
|
3238
|
-
end: "col-start-1 col-end-2 ms-auto text-end"
|
|
3239
|
-
}
|
|
3240
|
-
},
|
|
3241
|
-
defaultVariants: {
|
|
3242
|
-
side: "start"
|
|
3243
|
-
}
|
|
3244
|
-
});
|
|
3245
|
-
timelineHeadingVariants = classVarianceAuthority.cva(
|
|
3246
|
-
"row-start-1 row-end-1 line-clamp-1 max-w-full truncate",
|
|
3247
|
-
{
|
|
3248
|
-
variants: {
|
|
3249
|
-
side: {
|
|
3250
|
-
start: "col-start-3 col-end-4 me-auto text-start",
|
|
3251
|
-
end: "col-start-1 col-end-2 ms-auto text-end"
|
|
3252
|
-
},
|
|
3253
|
-
variant: {
|
|
3254
|
-
primary: "text-base font-medium text-foreground",
|
|
3255
|
-
secondary: "text-sm font-light text-muted-foreground"
|
|
3256
|
-
}
|
|
3257
|
-
},
|
|
3258
|
-
defaultVariants: {
|
|
3259
|
-
side: "start",
|
|
3260
|
-
variant: "primary"
|
|
3261
|
-
}
|
|
3262
|
-
}
|
|
3263
|
-
);
|
|
3264
|
-
}
|
|
3265
|
-
});
|
|
3266
|
-
|
|
3267
|
-
// src/ui/data-display/data-table/index.ts
|
|
3268
|
-
var init_data_table = __esm({
|
|
3269
|
-
"src/ui/data-display/data-table/index.ts"() {
|
|
3270
|
-
}
|
|
3271
|
-
});
|
|
3272
|
-
|
|
3273
|
-
// src/ui/data-display/index.tsx
|
|
3274
|
-
var init_data_display = __esm({
|
|
3275
|
-
"src/ui/data-display/index.tsx"() {
|
|
3276
|
-
"use client";
|
|
3277
|
-
init_formatted_number_input();
|
|
3278
|
-
init_data_table_pagination();
|
|
3279
|
-
init_avatar();
|
|
3280
|
-
init_kpi_card();
|
|
3281
|
-
init_compact_stat_bar();
|
|
3282
|
-
init_show_more_text();
|
|
3283
|
-
init_chart();
|
|
3284
|
-
init_carousel();
|
|
3285
|
-
init_accordion();
|
|
3286
|
-
init_kanban();
|
|
3287
|
-
init_aspect_ratio();
|
|
3288
|
-
init_bento_grid();
|
|
3289
|
-
init_code_block_highlight();
|
|
3290
|
-
init_collapsible();
|
|
3291
|
-
init_highlight();
|
|
3292
|
-
init_hover_card();
|
|
3293
|
-
init_iphone_15_pro();
|
|
3294
|
-
init_media_grid();
|
|
3295
|
-
init_safari();
|
|
3296
|
-
init_timeline();
|
|
3297
|
-
init_data_table();
|
|
3298
|
-
}
|
|
3299
|
-
});
|
|
3300
|
-
var init_auth_layout = __esm({
|
|
3301
|
-
"src/ui/auth/auth-layout.tsx"() {
|
|
3302
|
-
"use client";
|
|
3303
|
-
}
|
|
3304
|
-
});
|
|
3305
|
-
var init_sign_in_form = __esm({
|
|
3306
|
-
"src/ui/auth/sign-in-form.tsx"() {
|
|
3307
|
-
"use client";
|
|
3308
|
-
}
|
|
3309
|
-
});
|
|
3310
|
-
var init_register_form = __esm({
|
|
3311
|
-
"src/ui/auth/register-form.tsx"() {
|
|
3312
|
-
"use client";
|
|
3313
|
-
}
|
|
3314
|
-
});
|
|
3315
|
-
var init_oauth_links = __esm({
|
|
3316
|
-
"src/ui/auth/oauth-links.tsx"() {
|
|
3317
|
-
"use client";
|
|
3318
|
-
}
|
|
3319
|
-
});
|
|
3320
|
-
var init_forgot_password_form = __esm({
|
|
3321
|
-
"src/ui/auth/forgot-password-form.tsx"() {
|
|
3322
|
-
"use client";
|
|
3323
|
-
}
|
|
3324
|
-
});
|
|
3325
|
-
var init_new_password_form = __esm({
|
|
3326
|
-
"src/ui/auth/new-password-form.tsx"() {
|
|
3327
|
-
"use client";
|
|
3328
|
-
}
|
|
3329
|
-
});
|
|
3330
|
-
var init_verify_email_form = __esm({
|
|
3331
|
-
"src/ui/auth/verify-email-form.tsx"() {
|
|
3332
|
-
"use client";
|
|
3333
|
-
}
|
|
3334
|
-
});
|
|
3335
|
-
|
|
3336
|
-
// src/ui/auth/index.tsx
|
|
3337
|
-
var init_auth = __esm({
|
|
3338
|
-
"src/ui/auth/index.tsx"() {
|
|
3339
|
-
init_auth_layout();
|
|
3340
|
-
init_sign_in_form();
|
|
3341
|
-
init_register_form();
|
|
3342
|
-
init_oauth_links();
|
|
3343
|
-
init_forgot_password_form();
|
|
3344
|
-
init_new_password_form();
|
|
3345
|
-
init_verify_email_form();
|
|
3346
|
-
}
|
|
3347
|
-
});
|
|
3348
|
-
var init_job_management = __esm({
|
|
3349
|
-
"src/ui/management/job-management.tsx"() {
|
|
3350
|
-
"use client";
|
|
3351
|
-
}
|
|
3352
|
-
});
|
|
3353
|
-
var init_audit_log_page = __esm({
|
|
3354
|
-
"src/ui/management/audit-log-page.tsx"() {
|
|
3355
|
-
"use client";
|
|
3356
|
-
}
|
|
3357
|
-
});
|
|
3358
|
-
var init_cache_management = __esm({
|
|
3359
|
-
"src/ui/management/cache-management.tsx"() {
|
|
3360
|
-
"use client";
|
|
3361
|
-
}
|
|
3362
|
-
});
|
|
3363
|
-
|
|
3364
|
-
// src/ui/management/index.ts
|
|
3365
|
-
var init_management = __esm({
|
|
3366
|
-
"src/ui/management/index.ts"() {
|
|
3367
|
-
init_job_management();
|
|
3368
|
-
init_audit_log_page();
|
|
3369
|
-
init_cache_management();
|
|
3370
|
-
}
|
|
3371
|
-
});
|
|
3372
|
-
var init_not_found = __esm({
|
|
3373
|
-
"src/ui/pages/not-found.tsx"() {
|
|
3374
|
-
}
|
|
3375
|
-
});
|
|
3376
|
-
|
|
3377
|
-
// src/ui/index.tsx
|
|
3378
|
-
var init_ui = __esm({
|
|
3379
|
-
"src/ui/index.tsx"() {
|
|
3380
|
-
init_primitives();
|
|
3381
|
-
init_client();
|
|
3382
|
-
init_forms();
|
|
3383
|
-
init_data_display();
|
|
3384
|
-
init_feedback();
|
|
3385
|
-
init_layout();
|
|
3386
|
-
init_auth();
|
|
3387
|
-
init_management();
|
|
3388
|
-
init_not_found();
|
|
3389
|
-
}
|
|
3390
|
-
});
|
|
3391
|
-
|
|
3392
|
-
// src/workflow/activity-timeline.tsx
|
|
3393
|
-
init_ui();
|
|
3394
|
-
init_utils();
|
|
3395
|
-
function RenderAvatarStack({
|
|
3396
|
-
assignedMembers
|
|
3397
|
-
}) {
|
|
3398
|
-
if (assignedMembers && assignedMembers.length > 0) {
|
|
3399
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3400
|
-
AvatarStack,
|
|
3401
|
-
{
|
|
3402
|
-
avatars: assignedMembers.map((member) => ({
|
|
3403
|
-
src: member.avatar,
|
|
3404
|
-
alt: member.name,
|
|
3405
|
-
href: member.href || "#"
|
|
3406
|
-
})),
|
|
3407
|
-
size: "sm",
|
|
3408
|
-
className: "mt-2"
|
|
3409
|
-
}
|
|
3410
|
-
);
|
|
3411
|
-
}
|
|
3412
|
-
return null;
|
|
3413
|
-
}
|
|
3414
|
-
function HorizontalStep({
|
|
3415
|
-
item,
|
|
3416
|
-
isLast,
|
|
3417
|
-
stepNumber
|
|
3418
|
-
}) {
|
|
3419
|
-
const getStepIcon = () => {
|
|
3420
|
-
if (item.status === "completed") {
|
|
3421
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "h-4 w-4 text-green-600 dark:text-green-400" });
|
|
3422
|
-
}
|
|
3423
|
-
if (item.status === "error") {
|
|
3424
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-4 w-4 text-red-600 dark:text-red-400" });
|
|
3425
|
-
}
|
|
3426
|
-
if (item.status === "current") {
|
|
3427
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "h-4 w-4 text-blue-600 dark:text-blue-400" });
|
|
3428
|
-
}
|
|
3429
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-4 w-4 text-muted-foreground opacity-50" });
|
|
3430
|
-
};
|
|
3431
|
-
const isCurrent = item.status === "current";
|
|
3432
|
-
const isCompleted = item.status === "completed";
|
|
3433
|
-
const isUpcoming = item.status === "upcoming" || !item.status;
|
|
3434
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 flex-1 relative min-w-0 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3435
|
-
"div",
|
|
3436
|
-
{
|
|
3437
|
-
className: cn(
|
|
3438
|
-
"flex items-center gap-1.5 flex-1 relative z-10 transition-all shrink-0",
|
|
3439
|
-
isCurrent && "bg-blue-50 dark:bg-blue-950/30 border-2 border-blue-500 dark:border-blue-400 rounded-md px-1.5 py-1 shadow-sm"
|
|
3440
|
-
),
|
|
3441
|
-
children: [
|
|
3442
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3443
|
-
"div",
|
|
3444
|
-
{
|
|
3445
|
-
className: cn(
|
|
3446
|
-
"shrink-0 w-4 h-4 rounded-full flex items-center justify-center text-[10px] font-bold transition-all",
|
|
3447
|
-
isCompleted && "bg-green-500 dark:bg-green-400 text-white",
|
|
3448
|
-
isCurrent && "bg-blue-500 dark:bg-blue-400 text-white",
|
|
3449
|
-
isUpcoming && "bg-muted text-muted-foreground opacity-50"
|
|
3450
|
-
),
|
|
3451
|
-
children: stepNumber
|
|
3452
|
-
}
|
|
3453
|
-
),
|
|
3454
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3455
|
-
"div",
|
|
3456
|
-
{
|
|
3457
|
-
className: cn(
|
|
3458
|
-
"shrink-0 transition-all",
|
|
3459
|
-
isCompleted && "text-green-600 dark:text-green-400",
|
|
3460
|
-
isCurrent && "text-blue-600 dark:text-blue-400",
|
|
3461
|
-
isUpcoming && "text-muted-foreground opacity-50"
|
|
3462
|
-
),
|
|
3463
|
-
children: item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3464
|
-
"div",
|
|
3465
|
-
{
|
|
3466
|
-
className: cn(
|
|
3467
|
-
"rounded-full p-0.5 transition-all",
|
|
3468
|
-
isCurrent && "scale-105"
|
|
3469
|
-
),
|
|
3470
|
-
style: item.fill ? { backgroundColor: item.fill, color: "white" } : void 0,
|
|
3471
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, className: "size-3" })
|
|
3472
|
-
}
|
|
3473
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "scale-90", children: getStepIcon() })
|
|
3474
|
-
}
|
|
3475
|
-
),
|
|
3476
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
3477
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [
|
|
3478
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3479
|
-
"p",
|
|
3480
|
-
{
|
|
3481
|
-
className: cn(
|
|
3482
|
-
"text-xs font-medium whitespace-nowrap transition-all leading-tight",
|
|
3483
|
-
isCompleted && "text-green-700 dark:text-green-300 font-semibold",
|
|
3484
|
-
isCurrent && "text-blue-700 dark:text-blue-300 font-semibold",
|
|
3485
|
-
isUpcoming && "text-muted-foreground opacity-60"
|
|
3486
|
-
),
|
|
3487
|
-
children: item.title
|
|
3488
|
-
}
|
|
3489
|
-
),
|
|
3490
|
-
item.badgeText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3491
|
-
Badge,
|
|
3492
|
-
{
|
|
3493
|
-
variant: isCurrent ? "default" : isCompleted ? "outline" : "outline",
|
|
3494
|
-
className: cn(
|
|
3495
|
-
"text-[10px] px-1 py-0 h-3.5 transition-all leading-none",
|
|
3496
|
-
isCompleted && "border-green-500 dark:border-green-400 text-green-700 dark:text-green-300",
|
|
3497
|
-
isCurrent && "bg-blue-600 dark:bg-blue-500 text-white border-blue-600 dark:border-blue-500",
|
|
3498
|
-
isUpcoming && "border-muted-foreground/30 text-muted-foreground opacity-50"
|
|
3499
|
-
),
|
|
3500
|
-
children: item.badgeText
|
|
3501
|
-
}
|
|
3502
|
-
)
|
|
3503
|
-
] }),
|
|
3504
|
-
item.description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3505
|
-
"p",
|
|
3506
|
-
{
|
|
3507
|
-
className: cn(
|
|
3508
|
-
"text-[10px] mt-0 line-clamp-1 transition-colors leading-tight",
|
|
3509
|
-
isCompleted && "text-green-600/80 dark:text-green-400/80",
|
|
3510
|
-
isCurrent && "text-blue-600/80 dark:text-blue-400/80",
|
|
3511
|
-
isUpcoming && "text-muted-foreground opacity-50"
|
|
3512
|
-
),
|
|
3513
|
-
children: item.description
|
|
3514
|
-
}
|
|
3515
|
-
)
|
|
3516
|
-
] }) })
|
|
3517
|
-
]
|
|
3518
|
-
}
|
|
3519
|
-
) });
|
|
3520
|
-
}
|
|
3521
|
-
function SharedActivityTimeline({
|
|
3522
|
-
items,
|
|
3523
|
-
className,
|
|
3524
|
-
orientation = "vertical"
|
|
3525
|
-
}) {
|
|
3526
|
-
if (orientation === "horizontal") {
|
|
3527
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-0.5", className), children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React12__namespace.default.Fragment, { children: [
|
|
3528
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3529
|
-
HorizontalStep,
|
|
3530
|
-
{
|
|
3531
|
-
item,
|
|
3532
|
-
isLast: index === items.length - 1,
|
|
3533
|
-
stepNumber: index + 1
|
|
3534
|
-
}
|
|
3535
|
-
),
|
|
3536
|
-
index < items.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center shrink-0 w-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3537
|
-
lucideReact.ArrowRight,
|
|
3538
|
-
{
|
|
3539
|
-
className: cn(
|
|
3540
|
-
"h-3.5 w-3.5 transition-colors",
|
|
3541
|
-
item.status === "completed" ? "text-green-600 dark:text-green-400" : "text-muted-foreground opacity-50"
|
|
3542
|
-
),
|
|
3543
|
-
strokeWidth: 2.5
|
|
3544
|
-
}
|
|
3545
|
-
) })
|
|
3546
|
-
] }, item.id)) });
|
|
3547
|
-
}
|
|
3548
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Timeline, { className: cn("pl-2", className), children: items.map((item, index) => {
|
|
3549
|
-
const isLast = index === items.length - 1;
|
|
3550
|
-
let dotStatus = void 0;
|
|
3551
|
-
let dotClass = "";
|
|
3552
|
-
if (item.status === "completed") {
|
|
3553
|
-
dotStatus = "done";
|
|
3554
|
-
} else if (item.status === "error") {
|
|
3555
|
-
dotStatus = "error";
|
|
3556
|
-
} else if (item.status === "current") {
|
|
3557
|
-
dotStatus = "current";
|
|
3558
|
-
} else {
|
|
3559
|
-
dotClass = "bg-muted text-muted-foreground border-muted-foreground/30";
|
|
3560
|
-
}
|
|
3561
|
-
const isCurrent = item.status === "current";
|
|
3562
|
-
const isCompleted = item.status === "completed";
|
|
3563
|
-
const isUpcoming = item.status === "upcoming" || !item.status;
|
|
3564
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3565
|
-
TimelineItem,
|
|
3566
|
-
{
|
|
3567
|
-
status: item.status === "completed" ? "done" : "default",
|
|
3568
|
-
className: cn(
|
|
3569
|
-
isCurrent && "bg-blue-50 dark:bg-blue-950/30 border-2 border-blue-500 dark:border-blue-400 rounded-lg px-3 py-2 -mx-1 shadow-sm"
|
|
3570
|
-
),
|
|
3571
|
-
children: [
|
|
3572
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
3573
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3574
|
-
"div",
|
|
3575
|
-
{
|
|
3576
|
-
className: cn(
|
|
3577
|
-
"shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-bold transition-all",
|
|
3578
|
-
isCompleted && "bg-green-500 dark:bg-green-400 text-white",
|
|
3579
|
-
isCurrent && "bg-blue-500 dark:bg-blue-400 text-white",
|
|
3580
|
-
isUpcoming && "bg-muted text-muted-foreground opacity-50"
|
|
3581
|
-
),
|
|
3582
|
-
children: index + 1
|
|
3583
|
-
}
|
|
3584
|
-
),
|
|
3585
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3586
|
-
TimelineHeading,
|
|
3587
|
-
{
|
|
3588
|
-
className: cn(
|
|
3589
|
-
"text-sm font-medium transition-all flex-1 leading-tight",
|
|
3590
|
-
isCompleted && "text-green-700 dark:text-green-300 font-semibold",
|
|
3591
|
-
isCurrent && "text-blue-700 dark:text-blue-300 font-semibold",
|
|
3592
|
-
isUpcoming && "text-muted-foreground opacity-60"
|
|
3593
|
-
),
|
|
3594
|
-
children: item.title
|
|
3595
|
-
}
|
|
3596
|
-
)
|
|
3597
|
-
] }),
|
|
3598
|
-
item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3599
|
-
TimelineDot,
|
|
3600
|
-
{
|
|
3601
|
-
customIconName: item.iconName,
|
|
3602
|
-
customStatusName: item.status || "default",
|
|
3603
|
-
className: cn(
|
|
3604
|
-
dotClass,
|
|
3605
|
-
isCompleted && "bg-green-100 dark:bg-green-900/30 border-green-500 dark:border-green-400",
|
|
3606
|
-
isCurrent && "ring-2 ring-blue-400 dark:ring-blue-500 ring-offset-2 ring-offset-background",
|
|
3607
|
-
isUpcoming && "opacity-50"
|
|
3608
|
-
),
|
|
3609
|
-
style: item.fill ? { backgroundColor: item.fill, color: "white" } : void 0,
|
|
3610
|
-
iconClassName: cn(
|
|
3611
|
-
"size-4 text-background p-0.5 transition-all",
|
|
3612
|
-
isCurrent && "scale-105"
|
|
3613
|
-
)
|
|
3614
|
-
}
|
|
3615
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3616
|
-
TimelineDot,
|
|
3617
|
-
{
|
|
3618
|
-
status: dotStatus,
|
|
3619
|
-
className: cn(
|
|
3620
|
-
dotClass,
|
|
3621
|
-
isCompleted && "bg-green-100 dark:bg-green-900/30 border-green-500 dark:border-green-400",
|
|
3622
|
-
isCurrent && "ring-2 ring-blue-400 dark:ring-blue-500 ring-offset-2 ring-offset-background",
|
|
3623
|
-
isUpcoming && "opacity-50"
|
|
3624
|
-
)
|
|
3625
|
-
}
|
|
3626
|
-
),
|
|
3627
|
-
!isLast && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative col-start-2 col-end-3 z-20", children: [
|
|
3628
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3629
|
-
TimelineLine,
|
|
3630
|
-
{
|
|
3631
|
-
done: isCompleted,
|
|
3632
|
-
className: cn(!isCompleted && "opacity-30")
|
|
3633
|
-
}
|
|
3634
|
-
),
|
|
3635
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3636
|
-
lucideReact.ArrowDown,
|
|
3637
|
-
{
|
|
3638
|
-
className: cn(
|
|
3639
|
-
"absolute left-1/2 -translate-x-1/2 bottom-0 translate-y-1/2 h-3.5 w-3.5 z-20 transition-colors bg-background rounded-full p-0.5",
|
|
3640
|
-
isCompleted ? "text-green-600 dark:text-green-400" : "text-muted-foreground opacity-50"
|
|
3641
|
-
),
|
|
3642
|
-
strokeWidth: 2.5
|
|
3643
|
-
}
|
|
3644
|
-
)
|
|
3645
|
-
] }),
|
|
3646
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TimelineContent, { className: cn("space-y-1 pb-2 transition-colors"), children: [
|
|
3647
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3648
|
-
"div",
|
|
3649
|
-
{
|
|
3650
|
-
className: cn(
|
|
3651
|
-
"flex items-center text-sm transition-colors",
|
|
3652
|
-
isCompleted && "text-green-600/80 dark:text-green-400/80",
|
|
3653
|
-
isCurrent && "text-blue-600/80 dark:text-blue-400/80",
|
|
3654
|
-
isUpcoming && "text-muted-foreground opacity-50"
|
|
3655
|
-
),
|
|
3656
|
-
children: [
|
|
3657
|
-
item.date && /* @__PURE__ */ jsxRuntime.jsx("span", { children: typeof item.date === "string" ? item.date : dateFns.format(new Date(item.date), "dd/MM/yyyy HH:mm", {
|
|
3658
|
-
locale: locale.vi
|
|
3659
|
-
}) }),
|
|
3660
|
-
item.badgeText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3661
|
-
Badge,
|
|
3662
|
-
{
|
|
3663
|
-
variant: isCurrent ? "default" : isCompleted ? "outline" : "outline",
|
|
3664
|
-
className: cn(
|
|
3665
|
-
"ms-1.5 text-[10px] px-1 py-0 h-3.5 transition-all leading-none",
|
|
3666
|
-
isCompleted && "border-green-500 dark:border-green-400 text-green-700 dark:text-green-300",
|
|
3667
|
-
isCurrent && "bg-blue-600 dark:bg-blue-500 text-white border-blue-600 dark:border-blue-500",
|
|
3668
|
-
isUpcoming && "border-muted-foreground/30 text-muted-foreground opacity-50"
|
|
3669
|
-
),
|
|
3670
|
-
children: item.badgeText
|
|
3671
|
-
}
|
|
3672
|
-
)
|
|
3673
|
-
]
|
|
3674
|
-
}
|
|
3675
|
-
),
|
|
3676
|
-
item.description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3677
|
-
"p",
|
|
3678
|
-
{
|
|
3679
|
-
className: cn(
|
|
3680
|
-
"text-sm transition-colors leading-tight",
|
|
3681
|
-
isCompleted && "text-green-600/80 dark:text-green-400/80",
|
|
3682
|
-
isCurrent && "text-blue-600/80 dark:text-blue-400/80",
|
|
3683
|
-
isUpcoming && "text-muted-foreground opacity-50"
|
|
3684
|
-
),
|
|
3685
|
-
children: item.description
|
|
3686
|
-
}
|
|
3687
|
-
),
|
|
3688
|
-
/* @__PURE__ */ jsxRuntime.jsx(RenderAvatarStack, { assignedMembers: item.assignedMembers })
|
|
3689
|
-
] })
|
|
3690
|
-
]
|
|
3691
|
-
},
|
|
3692
|
-
item.id
|
|
3693
|
-
);
|
|
3694
|
-
}) });
|
|
3695
|
-
}
|
|
3696
|
-
|
|
3697
|
-
// src/workflow/approval-workflow.tsx
|
|
3698
|
-
init_utils();
|
|
3699
|
-
function ApprovalWorkflow({
|
|
3700
|
-
steps,
|
|
3701
|
-
orientation = "horizontal",
|
|
3702
|
-
className
|
|
3703
|
-
}) {
|
|
3704
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(SharedActivityTimeline, { items: steps, orientation }) });
|
|
3705
|
-
}
|
|
3706
|
-
|
|
3707
|
-
exports.ApprovalWorkflow = ApprovalWorkflow;
|
|
3708
|
-
exports.SharedActivityTimeline = SharedActivityTimeline;
|
|
3709
|
-
//# sourceMappingURL=index.js.map
|
|
3710
|
-
//# sourceMappingURL=index.js.map
|