adminium 1.0.0 → 1.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +646 -1019
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -5
- package/dist/index.d.ts +60 -5
- package/dist/index.js +610 -1017
- package/dist/index.js.map +1 -1
- package/package.json +15 -22
- package/src/styles/global.css +0 -20
package/dist/index.js
CHANGED
|
@@ -1,508 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import { twMerge } from 'tailwind-merge';
|
|
3
4
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
import
|
|
5
|
-
import { jsx, jsxs
|
|
6
|
-
import 'react-
|
|
7
|
-
import { ChevronDown, Check, Minus } from 'lucide-react';
|
|
5
|
+
import { Avatar as Avatar$1 } from 'radix-ui';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import * as SlotPrimitive from '@radix-ui/react-slot';
|
|
8
|
+
import { ChevronDown, Check, Minus, ChevronRight, Circle } from 'lucide-react';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
11
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
16
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
17
|
-
}) : x)(function(x) {
|
|
18
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
19
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
20
|
-
});
|
|
21
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
22
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
23
|
-
};
|
|
24
|
-
var __copyProps = (to, from, except, desc) => {
|
|
25
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
-
for (let key of __getOwnPropNames(from))
|
|
27
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
-
}
|
|
30
|
-
return to;
|
|
31
|
-
};
|
|
32
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
33
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
38
|
-
mod
|
|
39
|
-
));
|
|
40
|
-
|
|
41
|
-
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
42
|
-
var require_use_sync_external_store_shim_production = __commonJS({
|
|
43
|
-
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports$1) {
|
|
44
|
-
var React16 = __require("react");
|
|
45
|
-
function is(x, y) {
|
|
46
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
47
|
-
}
|
|
48
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
49
|
-
var useState9 = React16.useState;
|
|
50
|
-
var useEffect9 = React16.useEffect;
|
|
51
|
-
var useLayoutEffect3 = React16.useLayoutEffect;
|
|
52
|
-
var useDebugValue = React16.useDebugValue;
|
|
53
|
-
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
54
|
-
var value = getSnapshot(), _useState = useState9({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
55
|
-
useLayoutEffect3(
|
|
56
|
-
function() {
|
|
57
|
-
inst.value = value;
|
|
58
|
-
inst.getSnapshot = getSnapshot;
|
|
59
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
60
|
-
},
|
|
61
|
-
[subscribe2, value, getSnapshot]
|
|
62
|
-
);
|
|
63
|
-
useEffect9(
|
|
64
|
-
function() {
|
|
65
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
66
|
-
return subscribe2(function() {
|
|
67
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
[subscribe2]
|
|
71
|
-
);
|
|
72
|
-
useDebugValue(value);
|
|
73
|
-
return value;
|
|
74
|
-
}
|
|
75
|
-
function checkIfSnapshotChanged(inst) {
|
|
76
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
77
|
-
inst = inst.value;
|
|
78
|
-
try {
|
|
79
|
-
var nextValue = latestGetSnapshot();
|
|
80
|
-
return !objectIs(inst, nextValue);
|
|
81
|
-
} catch (error) {
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function useSyncExternalStore$1(subscribe2, getSnapshot) {
|
|
86
|
-
return getSnapshot();
|
|
87
|
-
}
|
|
88
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
89
|
-
exports$1.useSyncExternalStore = void 0 !== React16.useSyncExternalStore ? React16.useSyncExternalStore : shim;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
94
|
-
var require_use_sync_external_store_shim_development = __commonJS({
|
|
95
|
-
"node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports$1) {
|
|
96
|
-
"production" !== process.env.NODE_ENV && (function() {
|
|
97
|
-
function is(x, y) {
|
|
98
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
99
|
-
}
|
|
100
|
-
function useSyncExternalStore$2(subscribe2, getSnapshot) {
|
|
101
|
-
didWarnOld18Alpha || void 0 === React16.startTransition || (didWarnOld18Alpha = true, console.error(
|
|
102
|
-
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
103
|
-
));
|
|
104
|
-
var value = getSnapshot();
|
|
105
|
-
if (!didWarnUncachedGetSnapshot) {
|
|
106
|
-
var cachedValue = getSnapshot();
|
|
107
|
-
objectIs(value, cachedValue) || (console.error(
|
|
108
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
109
|
-
), didWarnUncachedGetSnapshot = true);
|
|
110
|
-
}
|
|
111
|
-
cachedValue = useState9({
|
|
112
|
-
inst: { value, getSnapshot }
|
|
113
|
-
});
|
|
114
|
-
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
|
|
115
|
-
useLayoutEffect3(
|
|
116
|
-
function() {
|
|
117
|
-
inst.value = value;
|
|
118
|
-
inst.getSnapshot = getSnapshot;
|
|
119
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
120
|
-
},
|
|
121
|
-
[subscribe2, value, getSnapshot]
|
|
122
|
-
);
|
|
123
|
-
useEffect9(
|
|
124
|
-
function() {
|
|
125
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
126
|
-
return subscribe2(function() {
|
|
127
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
[subscribe2]
|
|
131
|
-
);
|
|
132
|
-
useDebugValue(value);
|
|
133
|
-
return value;
|
|
134
|
-
}
|
|
135
|
-
function checkIfSnapshotChanged(inst) {
|
|
136
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
137
|
-
inst = inst.value;
|
|
138
|
-
try {
|
|
139
|
-
var nextValue = latestGetSnapshot();
|
|
140
|
-
return !objectIs(inst, nextValue);
|
|
141
|
-
} catch (error) {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function useSyncExternalStore$1(subscribe2, getSnapshot) {
|
|
146
|
-
return getSnapshot();
|
|
147
|
-
}
|
|
148
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
149
|
-
var React16 = __require("react"), objectIs = "function" === typeof Object.is ? Object.is : is, useState9 = React16.useState, useEffect9 = React16.useEffect, useLayoutEffect3 = React16.useLayoutEffect, useDebugValue = React16.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
150
|
-
exports$1.useSyncExternalStore = void 0 !== React16.useSyncExternalStore ? React16.useSyncExternalStore : shim;
|
|
151
|
-
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
152
|
-
})();
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
// node_modules/use-sync-external-store/shim/index.js
|
|
157
|
-
var require_shim = __commonJS({
|
|
158
|
-
"node_modules/use-sync-external-store/shim/index.js"(exports$1, module) {
|
|
159
|
-
if (process.env.NODE_ENV === "production") {
|
|
160
|
-
module.exports = require_use_sync_external_store_shim_production();
|
|
161
|
-
} else {
|
|
162
|
-
module.exports = require_use_sync_external_store_shim_development();
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
});
|
|
13
|
+
// src/lib/utils.ts
|
|
166
14
|
function cn(...inputs) {
|
|
167
15
|
return twMerge(clsx(inputs));
|
|
168
16
|
}
|
|
169
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
170
|
-
let defaultContexts = [];
|
|
171
|
-
function createContext3(rootComponentName, defaultContext) {
|
|
172
|
-
const BaseContext = React5.createContext(defaultContext);
|
|
173
|
-
const index = defaultContexts.length;
|
|
174
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
175
|
-
const Provider = (props) => {
|
|
176
|
-
const { scope, children, ...context } = props;
|
|
177
|
-
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
178
|
-
const value = React5.useMemo(() => context, Object.values(context));
|
|
179
|
-
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
180
|
-
};
|
|
181
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
182
|
-
function useContext2(consumerName, scope) {
|
|
183
|
-
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
184
|
-
const context = React5.useContext(Context);
|
|
185
|
-
if (context) return context;
|
|
186
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
187
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
188
|
-
}
|
|
189
|
-
return [Provider, useContext2];
|
|
190
|
-
}
|
|
191
|
-
const createScope = () => {
|
|
192
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
193
|
-
return React5.createContext(defaultContext);
|
|
194
|
-
});
|
|
195
|
-
return function useScope(scope) {
|
|
196
|
-
const contexts = scope?.[scopeName] || scopeContexts;
|
|
197
|
-
return React5.useMemo(
|
|
198
|
-
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
199
|
-
[scope, contexts]
|
|
200
|
-
);
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
createScope.scopeName = scopeName;
|
|
204
|
-
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
205
|
-
}
|
|
206
|
-
function composeContextScopes(...scopes) {
|
|
207
|
-
const baseScope = scopes[0];
|
|
208
|
-
if (scopes.length === 1) return baseScope;
|
|
209
|
-
const createScope = () => {
|
|
210
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
211
|
-
useScope: createScope2(),
|
|
212
|
-
scopeName: createScope2.scopeName
|
|
213
|
-
}));
|
|
214
|
-
return function useComposedScopes(overrideScopes) {
|
|
215
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
216
|
-
const scopeProps = useScope(overrideScopes);
|
|
217
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
218
|
-
return { ...nextScopes2, ...currentScope };
|
|
219
|
-
}, {});
|
|
220
|
-
return React5.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
createScope.scopeName = baseScope.scopeName;
|
|
224
|
-
return createScope;
|
|
225
|
-
}
|
|
226
|
-
function useCallbackRef(callback) {
|
|
227
|
-
const callbackRef = React5.useRef(callback);
|
|
228
|
-
React5.useEffect(() => {
|
|
229
|
-
callbackRef.current = callback;
|
|
230
|
-
});
|
|
231
|
-
return React5.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
232
|
-
}
|
|
233
|
-
var useLayoutEffect2 = globalThis?.document ? React5.useLayoutEffect : () => {
|
|
234
|
-
};
|
|
235
|
-
function setRef(ref, value) {
|
|
236
|
-
if (typeof ref === "function") {
|
|
237
|
-
return ref(value);
|
|
238
|
-
} else if (ref !== null && ref !== void 0) {
|
|
239
|
-
ref.current = value;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
function composeRefs(...refs) {
|
|
243
|
-
return (node) => {
|
|
244
|
-
let hasCleanup = false;
|
|
245
|
-
const cleanups = refs.map((ref) => {
|
|
246
|
-
const cleanup = setRef(ref, node);
|
|
247
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
248
|
-
hasCleanup = true;
|
|
249
|
-
}
|
|
250
|
-
return cleanup;
|
|
251
|
-
});
|
|
252
|
-
if (hasCleanup) {
|
|
253
|
-
return () => {
|
|
254
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
255
|
-
const cleanup = cleanups[i];
|
|
256
|
-
if (typeof cleanup == "function") {
|
|
257
|
-
cleanup();
|
|
258
|
-
} else {
|
|
259
|
-
setRef(refs[i], null);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
function useComposedRefs(...refs) {
|
|
267
|
-
return React5.useCallback(composeRefs(...refs), refs);
|
|
268
|
-
}
|
|
269
|
-
// @__NO_SIDE_EFFECTS__
|
|
270
|
-
function createSlot(ownerName) {
|
|
271
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
272
|
-
const Slot2 = React5.forwardRef((props, forwardedRef) => {
|
|
273
|
-
const { children, ...slotProps } = props;
|
|
274
|
-
const childrenArray = React5.Children.toArray(children);
|
|
275
|
-
const slottable = childrenArray.find(isSlottable);
|
|
276
|
-
if (slottable) {
|
|
277
|
-
const newElement = slottable.props.children;
|
|
278
|
-
const newChildren = childrenArray.map((child) => {
|
|
279
|
-
if (child === slottable) {
|
|
280
|
-
if (React5.Children.count(newElement) > 1) return React5.Children.only(null);
|
|
281
|
-
return React5.isValidElement(newElement) ? newElement.props.children : null;
|
|
282
|
-
} else {
|
|
283
|
-
return child;
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React5.isValidElement(newElement) ? React5.cloneElement(newElement, void 0, newChildren) : null });
|
|
287
|
-
}
|
|
288
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
289
|
-
});
|
|
290
|
-
Slot2.displayName = `${ownerName}.Slot`;
|
|
291
|
-
return Slot2;
|
|
292
|
-
}
|
|
293
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
294
|
-
// @__NO_SIDE_EFFECTS__
|
|
295
|
-
function createSlotClone(ownerName) {
|
|
296
|
-
const SlotClone = React5.forwardRef((props, forwardedRef) => {
|
|
297
|
-
const { children, ...slotProps } = props;
|
|
298
|
-
if (React5.isValidElement(children)) {
|
|
299
|
-
const childrenRef = getElementRef(children);
|
|
300
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
301
|
-
if (children.type !== React5.Fragment) {
|
|
302
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
303
|
-
}
|
|
304
|
-
return React5.cloneElement(children, props2);
|
|
305
|
-
}
|
|
306
|
-
return React5.Children.count(children) > 1 ? React5.Children.only(null) : null;
|
|
307
|
-
});
|
|
308
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
309
|
-
return SlotClone;
|
|
310
|
-
}
|
|
311
|
-
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
312
|
-
function isSlottable(child) {
|
|
313
|
-
return React5.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
314
|
-
}
|
|
315
|
-
function mergeProps(slotProps, childProps) {
|
|
316
|
-
const overrideProps = { ...childProps };
|
|
317
|
-
for (const propName in childProps) {
|
|
318
|
-
const slotPropValue = slotProps[propName];
|
|
319
|
-
const childPropValue = childProps[propName];
|
|
320
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
321
|
-
if (isHandler) {
|
|
322
|
-
if (slotPropValue && childPropValue) {
|
|
323
|
-
overrideProps[propName] = (...args) => {
|
|
324
|
-
const result = childPropValue(...args);
|
|
325
|
-
slotPropValue(...args);
|
|
326
|
-
return result;
|
|
327
|
-
};
|
|
328
|
-
} else if (slotPropValue) {
|
|
329
|
-
overrideProps[propName] = slotPropValue;
|
|
330
|
-
}
|
|
331
|
-
} else if (propName === "style") {
|
|
332
|
-
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
333
|
-
} else if (propName === "className") {
|
|
334
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return { ...slotProps, ...overrideProps };
|
|
338
|
-
}
|
|
339
|
-
function getElementRef(element) {
|
|
340
|
-
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
341
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
342
|
-
if (mayWarn) {
|
|
343
|
-
return element.ref;
|
|
344
|
-
}
|
|
345
|
-
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
346
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
347
|
-
if (mayWarn) {
|
|
348
|
-
return element.props.ref;
|
|
349
|
-
}
|
|
350
|
-
return element.props.ref || element.ref;
|
|
351
|
-
}
|
|
352
|
-
var NODES = [
|
|
353
|
-
"a",
|
|
354
|
-
"button",
|
|
355
|
-
"div",
|
|
356
|
-
"form",
|
|
357
|
-
"h2",
|
|
358
|
-
"h3",
|
|
359
|
-
"img",
|
|
360
|
-
"input",
|
|
361
|
-
"label",
|
|
362
|
-
"li",
|
|
363
|
-
"nav",
|
|
364
|
-
"ol",
|
|
365
|
-
"p",
|
|
366
|
-
"select",
|
|
367
|
-
"span",
|
|
368
|
-
"svg",
|
|
369
|
-
"ul"
|
|
370
|
-
];
|
|
371
|
-
var Primitive = NODES.reduce((primitive, node) => {
|
|
372
|
-
const Slot2 = createSlot(`Primitive.${node}`);
|
|
373
|
-
const Node = React5.forwardRef((props, forwardedRef) => {
|
|
374
|
-
const { asChild, ...primitiveProps } = props;
|
|
375
|
-
const Comp = asChild ? Slot2 : node;
|
|
376
|
-
if (typeof window !== "undefined") {
|
|
377
|
-
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
378
|
-
}
|
|
379
|
-
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
380
|
-
});
|
|
381
|
-
Node.displayName = `Primitive.${node}`;
|
|
382
|
-
return { ...primitive, [node]: Node };
|
|
383
|
-
}, {});
|
|
384
|
-
|
|
385
|
-
// node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs
|
|
386
|
-
var import_shim = __toESM(require_shim());
|
|
387
|
-
function useIsHydrated() {
|
|
388
|
-
return (0, import_shim.useSyncExternalStore)(
|
|
389
|
-
subscribe,
|
|
390
|
-
() => true,
|
|
391
|
-
() => false
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
function subscribe() {
|
|
395
|
-
return () => {
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
var AVATAR_NAME = "Avatar";
|
|
399
|
-
var [createAvatarContext] = createContextScope(AVATAR_NAME);
|
|
400
|
-
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
|
401
|
-
var Avatar = React5.forwardRef(
|
|
402
|
-
(props, forwardedRef) => {
|
|
403
|
-
const { __scopeAvatar, ...avatarProps } = props;
|
|
404
|
-
const [imageLoadingStatus, setImageLoadingStatus] = React5.useState("idle");
|
|
405
|
-
return /* @__PURE__ */ jsx(
|
|
406
|
-
AvatarProvider,
|
|
407
|
-
{
|
|
408
|
-
scope: __scopeAvatar,
|
|
409
|
-
imageLoadingStatus,
|
|
410
|
-
onImageLoadingStatusChange: setImageLoadingStatus,
|
|
411
|
-
children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
);
|
|
416
|
-
Avatar.displayName = AVATAR_NAME;
|
|
417
|
-
var IMAGE_NAME = "AvatarImage";
|
|
418
|
-
var AvatarImage = React5.forwardRef(
|
|
419
|
-
(props, forwardedRef) => {
|
|
420
|
-
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
|
421
|
-
}, ...imageProps } = props;
|
|
422
|
-
const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
|
|
423
|
-
const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
|
|
424
|
-
const handleLoadingStatusChange = useCallbackRef((status) => {
|
|
425
|
-
onLoadingStatusChange(status);
|
|
426
|
-
context.onImageLoadingStatusChange(status);
|
|
427
|
-
});
|
|
428
|
-
useLayoutEffect2(() => {
|
|
429
|
-
if (imageLoadingStatus !== "idle") {
|
|
430
|
-
handleLoadingStatusChange(imageLoadingStatus);
|
|
431
|
-
}
|
|
432
|
-
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
|
433
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
|
434
|
-
}
|
|
435
|
-
);
|
|
436
|
-
AvatarImage.displayName = IMAGE_NAME;
|
|
437
|
-
var FALLBACK_NAME = "AvatarFallback";
|
|
438
|
-
var AvatarFallback = React5.forwardRef(
|
|
439
|
-
(props, forwardedRef) => {
|
|
440
|
-
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
|
441
|
-
const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
|
|
442
|
-
const [canRender, setCanRender] = React5.useState(delayMs === void 0);
|
|
443
|
-
React5.useEffect(() => {
|
|
444
|
-
if (delayMs !== void 0) {
|
|
445
|
-
const timerId = window.setTimeout(() => setCanRender(true), delayMs);
|
|
446
|
-
return () => window.clearTimeout(timerId);
|
|
447
|
-
}
|
|
448
|
-
}, [delayMs]);
|
|
449
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
|
450
|
-
}
|
|
451
|
-
);
|
|
452
|
-
AvatarFallback.displayName = FALLBACK_NAME;
|
|
453
|
-
function resolveLoadingStatus(image, src) {
|
|
454
|
-
if (!image) {
|
|
455
|
-
return "idle";
|
|
456
|
-
}
|
|
457
|
-
if (!src) {
|
|
458
|
-
return "error";
|
|
459
|
-
}
|
|
460
|
-
if (image.src !== src) {
|
|
461
|
-
image.src = src;
|
|
462
|
-
}
|
|
463
|
-
return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
|
|
464
|
-
}
|
|
465
|
-
function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
|
|
466
|
-
const isHydrated = useIsHydrated();
|
|
467
|
-
const imageRef = React5.useRef(null);
|
|
468
|
-
const image = (() => {
|
|
469
|
-
if (!isHydrated) return null;
|
|
470
|
-
if (!imageRef.current) {
|
|
471
|
-
imageRef.current = new window.Image();
|
|
472
|
-
}
|
|
473
|
-
return imageRef.current;
|
|
474
|
-
})();
|
|
475
|
-
const [loadingStatus, setLoadingStatus] = React5.useState(
|
|
476
|
-
() => resolveLoadingStatus(image, src)
|
|
477
|
-
);
|
|
478
|
-
useLayoutEffect2(() => {
|
|
479
|
-
setLoadingStatus(resolveLoadingStatus(image, src));
|
|
480
|
-
}, [image, src]);
|
|
481
|
-
useLayoutEffect2(() => {
|
|
482
|
-
const updateStatus = (status) => () => {
|
|
483
|
-
setLoadingStatus(status);
|
|
484
|
-
};
|
|
485
|
-
if (!image) return;
|
|
486
|
-
const handleLoad = updateStatus("loaded");
|
|
487
|
-
const handleError = updateStatus("error");
|
|
488
|
-
image.addEventListener("load", handleLoad);
|
|
489
|
-
image.addEventListener("error", handleError);
|
|
490
|
-
if (referrerPolicy) {
|
|
491
|
-
image.referrerPolicy = referrerPolicy;
|
|
492
|
-
}
|
|
493
|
-
if (typeof crossOrigin === "string") {
|
|
494
|
-
image.crossOrigin = crossOrigin;
|
|
495
|
-
}
|
|
496
|
-
return () => {
|
|
497
|
-
image.removeEventListener("load", handleLoad);
|
|
498
|
-
image.removeEventListener("error", handleError);
|
|
499
|
-
};
|
|
500
|
-
}, [image, crossOrigin, referrerPolicy]);
|
|
501
|
-
return loadingStatus;
|
|
502
|
-
}
|
|
503
|
-
var Root = Avatar;
|
|
504
|
-
var Image = AvatarImage;
|
|
505
|
-
var Fallback = AvatarFallback;
|
|
506
17
|
var avatarStatusVariants = cva(
|
|
507
18
|
"flex items-center rounded-full size-2 border-2 border-background",
|
|
508
19
|
{
|
|
@@ -519,12 +30,12 @@ var avatarStatusVariants = cva(
|
|
|
519
30
|
}
|
|
520
31
|
}
|
|
521
32
|
);
|
|
522
|
-
function
|
|
33
|
+
function Avatar({
|
|
523
34
|
className,
|
|
524
35
|
...props
|
|
525
36
|
}) {
|
|
526
37
|
return /* @__PURE__ */ jsx(
|
|
527
|
-
Root,
|
|
38
|
+
Avatar$1.Root,
|
|
528
39
|
{
|
|
529
40
|
"data-slot": "avatar",
|
|
530
41
|
className: cn("relative flex shrink-0 size-10", className),
|
|
@@ -532,12 +43,12 @@ function Avatar2({
|
|
|
532
43
|
}
|
|
533
44
|
);
|
|
534
45
|
}
|
|
535
|
-
function
|
|
46
|
+
function AvatarImage({
|
|
536
47
|
className,
|
|
537
48
|
...props
|
|
538
49
|
}) {
|
|
539
50
|
return /* @__PURE__ */ jsx("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsx(
|
|
540
|
-
Image,
|
|
51
|
+
Avatar$1.Image,
|
|
541
52
|
{
|
|
542
53
|
"data-slot": "avatar-image",
|
|
543
54
|
className: cn("aspect-square h-full w-full"),
|
|
@@ -545,12 +56,12 @@ function AvatarImage2({
|
|
|
545
56
|
}
|
|
546
57
|
) });
|
|
547
58
|
}
|
|
548
|
-
function
|
|
59
|
+
function AvatarFallback({
|
|
549
60
|
className,
|
|
550
61
|
...props
|
|
551
62
|
}) {
|
|
552
63
|
return /* @__PURE__ */ jsx(
|
|
553
|
-
Fallback,
|
|
64
|
+
Avatar$1.Fallback,
|
|
554
65
|
{
|
|
555
66
|
"data-slot": "avatar-fallback",
|
|
556
67
|
className: cn(
|
|
@@ -748,7 +259,7 @@ function Badge({
|
|
|
748
259
|
disabled,
|
|
749
260
|
...props
|
|
750
261
|
}) {
|
|
751
|
-
const Comp = asChild ? Slot : "span";
|
|
262
|
+
const Comp = asChild ? SlotPrimitive.Slot : "span";
|
|
752
263
|
return /* @__PURE__ */ jsx(
|
|
753
264
|
Comp,
|
|
754
265
|
{
|
|
@@ -767,7 +278,7 @@ function BadgeButton({
|
|
|
767
278
|
asChild = false,
|
|
768
279
|
...props
|
|
769
280
|
}) {
|
|
770
|
-
const Comp = asChild ? Slot : "span";
|
|
281
|
+
const Comp = asChild ? SlotPrimitive.Slot : "span";
|
|
771
282
|
return /* @__PURE__ */ jsx(
|
|
772
283
|
Comp,
|
|
773
284
|
{
|
|
@@ -822,7 +333,7 @@ var buttonVariants = cva(
|
|
|
822
333
|
},
|
|
823
334
|
size: {
|
|
824
335
|
lg: "h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",
|
|
825
|
-
md: "h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-(--text-sm--line-height) [&_svg:not([class*=size-])]:size-4",
|
|
336
|
+
md: "h-8.5 rounded-md px-3 gap-1.5 text-[0.8125rem] leading-[var(--text-sm--line-height)] [&_svg:not([class*=size-])]:size-4",
|
|
826
337
|
sm: "h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",
|
|
827
338
|
icon: "size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0"
|
|
828
339
|
},
|
|
@@ -1139,7 +650,7 @@ function Button({
|
|
|
1139
650
|
placeholder = false,
|
|
1140
651
|
...props
|
|
1141
652
|
}) {
|
|
1142
|
-
const Comp = asChild ? Slot : "button";
|
|
653
|
+
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
1143
654
|
return /* @__PURE__ */ jsx(
|
|
1144
655
|
Comp,
|
|
1145
656
|
{
|
|
@@ -1178,500 +689,199 @@ function ButtonArrow({
|
|
|
1178
689
|
}
|
|
1179
690
|
);
|
|
1180
691
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}
|
|
1189
|
-
var
|
|
1190
|
-
|
|
1191
|
-
prop,
|
|
1192
|
-
defaultProp,
|
|
1193
|
-
onChange = () => {
|
|
1194
|
-
},
|
|
1195
|
-
caller
|
|
1196
|
-
}) {
|
|
1197
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
1198
|
-
defaultProp,
|
|
1199
|
-
onChange
|
|
1200
|
-
});
|
|
1201
|
-
const isControlled = prop !== void 0;
|
|
1202
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
692
|
+
var CardContext = React.createContext({
|
|
693
|
+
variant: "default"
|
|
694
|
+
// Default value
|
|
695
|
+
});
|
|
696
|
+
var useCardContext = () => {
|
|
697
|
+
const context = React.useContext(CardContext);
|
|
698
|
+
return context;
|
|
699
|
+
};
|
|
700
|
+
var cardVariants = cva(
|
|
701
|
+
"flex flex-col items-stretch text-card-foreground rounded-xl",
|
|
1203
702
|
{
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
1209
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
1210
|
-
console.warn(
|
|
1211
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
1212
|
-
);
|
|
703
|
+
variants: {
|
|
704
|
+
variant: {
|
|
705
|
+
default: "bg-card border border-border shadow-xs shadow-black/5",
|
|
706
|
+
accent: "bg-muted shadow-xs p-1"
|
|
1213
707
|
}
|
|
1214
|
-
|
|
1215
|
-
|
|
708
|
+
},
|
|
709
|
+
defaultVariants: {
|
|
710
|
+
variant: "default"
|
|
711
|
+
}
|
|
1216
712
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
setUncontrolledProp(nextValue);
|
|
713
|
+
);
|
|
714
|
+
var cardHeaderVariants = cva(
|
|
715
|
+
"flex items-center justify-between flex-wrap px-5 min-h-14 gap-2.5",
|
|
716
|
+
{
|
|
717
|
+
variants: {
|
|
718
|
+
variant: {
|
|
719
|
+
default: "border-b border-border",
|
|
720
|
+
accent: ""
|
|
1226
721
|
}
|
|
1227
722
|
},
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
723
|
+
defaultVariants: {
|
|
724
|
+
variant: "default"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
var cardContentVariants = cva("grow p-5", {
|
|
729
|
+
variants: {
|
|
730
|
+
variant: {
|
|
731
|
+
default: "",
|
|
732
|
+
accent: "bg-card rounded-t-xl [&:last-child]:rounded-b-xl"
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
defaultVariants: {
|
|
736
|
+
variant: "default"
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
var cardTableVariants = cva("grid grow", {
|
|
740
|
+
variants: {
|
|
741
|
+
variant: {
|
|
742
|
+
default: "",
|
|
743
|
+
accent: "bg-card rounded-xl"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
defaultVariants: {
|
|
747
|
+
variant: "default"
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
var cardFooterVariants = cva("flex items-center px-5 min-h-14", {
|
|
751
|
+
variants: {
|
|
752
|
+
variant: {
|
|
753
|
+
default: "border-t border-border",
|
|
754
|
+
accent: "bg-card rounded-b-xl mt-[2px]"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
defaultVariants: {
|
|
758
|
+
variant: "default"
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
function Card({
|
|
762
|
+
className,
|
|
763
|
+
variant = "default",
|
|
764
|
+
...props
|
|
1235
765
|
}) {
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
onChangeRef.current?.(value);
|
|
1245
|
-
prevValueRef.current = value;
|
|
1246
|
-
}
|
|
1247
|
-
}, [value, prevValueRef]);
|
|
1248
|
-
return [value, setValue, onChangeRef];
|
|
1249
|
-
}
|
|
1250
|
-
function isFunction(value) {
|
|
1251
|
-
return typeof value === "function";
|
|
1252
|
-
}
|
|
1253
|
-
function usePrevious(value) {
|
|
1254
|
-
const ref = React5.useRef({ value, previous: value });
|
|
1255
|
-
return React5.useMemo(() => {
|
|
1256
|
-
if (ref.current.value !== value) {
|
|
1257
|
-
ref.current.previous = ref.current.value;
|
|
1258
|
-
ref.current.value = value;
|
|
1259
|
-
}
|
|
1260
|
-
return ref.current.previous;
|
|
1261
|
-
}, [value]);
|
|
1262
|
-
}
|
|
1263
|
-
function useSize(element) {
|
|
1264
|
-
const [size, setSize] = React5.useState(void 0);
|
|
1265
|
-
useLayoutEffect2(() => {
|
|
1266
|
-
if (element) {
|
|
1267
|
-
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
1268
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
1269
|
-
if (!Array.isArray(entries)) {
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
if (!entries.length) {
|
|
1273
|
-
return;
|
|
1274
|
-
}
|
|
1275
|
-
const entry = entries[0];
|
|
1276
|
-
let width;
|
|
1277
|
-
let height;
|
|
1278
|
-
if ("borderBoxSize" in entry) {
|
|
1279
|
-
const borderSizeEntry = entry["borderBoxSize"];
|
|
1280
|
-
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
1281
|
-
width = borderSize["inlineSize"];
|
|
1282
|
-
height = borderSize["blockSize"];
|
|
1283
|
-
} else {
|
|
1284
|
-
width = element.offsetWidth;
|
|
1285
|
-
height = element.offsetHeight;
|
|
1286
|
-
}
|
|
1287
|
-
setSize({ width, height });
|
|
1288
|
-
});
|
|
1289
|
-
resizeObserver.observe(element, { box: "border-box" });
|
|
1290
|
-
return () => resizeObserver.unobserve(element);
|
|
1291
|
-
} else {
|
|
1292
|
-
setSize(void 0);
|
|
1293
|
-
}
|
|
1294
|
-
}, [element]);
|
|
1295
|
-
return size;
|
|
1296
|
-
}
|
|
1297
|
-
function useStateMachine(initialState, machine) {
|
|
1298
|
-
return React5.useReducer((state, event) => {
|
|
1299
|
-
const nextState = machine[state][event];
|
|
1300
|
-
return nextState ?? state;
|
|
1301
|
-
}, initialState);
|
|
766
|
+
return /* @__PURE__ */ jsx(CardContext.Provider, { value: { variant: variant || "default" }, children: /* @__PURE__ */ jsx(
|
|
767
|
+
"div",
|
|
768
|
+
{
|
|
769
|
+
"data-slot": "card",
|
|
770
|
+
className: cn(cardVariants({ variant }), className),
|
|
771
|
+
...props
|
|
772
|
+
}
|
|
773
|
+
) });
|
|
1302
774
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
const prevAnimationNameRef = React5.useRef("none");
|
|
1317
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
1318
|
-
const [state, send] = useStateMachine(initialState, {
|
|
1319
|
-
mounted: {
|
|
1320
|
-
UNMOUNT: "unmounted",
|
|
1321
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
1322
|
-
},
|
|
1323
|
-
unmountSuspended: {
|
|
1324
|
-
MOUNT: "mounted",
|
|
1325
|
-
ANIMATION_END: "unmounted"
|
|
1326
|
-
},
|
|
1327
|
-
unmounted: {
|
|
1328
|
-
MOUNT: "mounted"
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
|
-
React5.useEffect(() => {
|
|
1332
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
1333
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
1334
|
-
}, [state]);
|
|
1335
|
-
useLayoutEffect2(() => {
|
|
1336
|
-
const styles = stylesRef.current;
|
|
1337
|
-
const wasPresent = prevPresentRef.current;
|
|
1338
|
-
const hasPresentChanged = wasPresent !== present;
|
|
1339
|
-
if (hasPresentChanged) {
|
|
1340
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
1341
|
-
const currentAnimationName = getAnimationName(styles);
|
|
1342
|
-
if (present) {
|
|
1343
|
-
send("MOUNT");
|
|
1344
|
-
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
1345
|
-
send("UNMOUNT");
|
|
1346
|
-
} else {
|
|
1347
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
1348
|
-
if (wasPresent && isAnimating) {
|
|
1349
|
-
send("ANIMATION_OUT");
|
|
1350
|
-
} else {
|
|
1351
|
-
send("UNMOUNT");
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
prevPresentRef.current = present;
|
|
1355
|
-
}
|
|
1356
|
-
}, [present, send]);
|
|
1357
|
-
useLayoutEffect2(() => {
|
|
1358
|
-
if (node) {
|
|
1359
|
-
let timeoutId;
|
|
1360
|
-
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
1361
|
-
const handleAnimationEnd = (event) => {
|
|
1362
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
1363
|
-
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
1364
|
-
if (event.target === node && isCurrentAnimation) {
|
|
1365
|
-
send("ANIMATION_END");
|
|
1366
|
-
if (!prevPresentRef.current) {
|
|
1367
|
-
const currentFillMode = node.style.animationFillMode;
|
|
1368
|
-
node.style.animationFillMode = "forwards";
|
|
1369
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
1370
|
-
if (node.style.animationFillMode === "forwards") {
|
|
1371
|
-
node.style.animationFillMode = currentFillMode;
|
|
1372
|
-
}
|
|
1373
|
-
});
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
const handleAnimationStart = (event) => {
|
|
1378
|
-
if (event.target === node) {
|
|
1379
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
1380
|
-
}
|
|
1381
|
-
};
|
|
1382
|
-
node.addEventListener("animationstart", handleAnimationStart);
|
|
1383
|
-
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
1384
|
-
node.addEventListener("animationend", handleAnimationEnd);
|
|
1385
|
-
return () => {
|
|
1386
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
1387
|
-
node.removeEventListener("animationstart", handleAnimationStart);
|
|
1388
|
-
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
1389
|
-
node.removeEventListener("animationend", handleAnimationEnd);
|
|
1390
|
-
};
|
|
1391
|
-
} else {
|
|
1392
|
-
send("ANIMATION_END");
|
|
1393
|
-
}
|
|
1394
|
-
}, [node, send]);
|
|
1395
|
-
return {
|
|
1396
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
1397
|
-
ref: React5.useCallback((node2) => {
|
|
1398
|
-
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
1399
|
-
setNode(node2);
|
|
1400
|
-
}, [])
|
|
1401
|
-
};
|
|
775
|
+
function CardHeader({
|
|
776
|
+
className,
|
|
777
|
+
...props
|
|
778
|
+
}) {
|
|
779
|
+
const { variant } = useCardContext();
|
|
780
|
+
return /* @__PURE__ */ jsx(
|
|
781
|
+
"div",
|
|
782
|
+
{
|
|
783
|
+
"data-slot": "card-header",
|
|
784
|
+
className: cn(cardHeaderVariants({ variant }), className),
|
|
785
|
+
...props
|
|
786
|
+
}
|
|
787
|
+
);
|
|
1402
788
|
}
|
|
1403
|
-
function
|
|
1404
|
-
|
|
789
|
+
function CardContent({
|
|
790
|
+
className,
|
|
791
|
+
...props
|
|
792
|
+
}) {
|
|
793
|
+
const { variant } = useCardContext();
|
|
794
|
+
return /* @__PURE__ */ jsx(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
"data-slot": "card-content",
|
|
798
|
+
className: cn(cardContentVariants({ variant }), className),
|
|
799
|
+
...props
|
|
800
|
+
}
|
|
801
|
+
);
|
|
1405
802
|
}
|
|
1406
|
-
function
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
803
|
+
function CardTable({
|
|
804
|
+
className,
|
|
805
|
+
...props
|
|
806
|
+
}) {
|
|
807
|
+
const { variant } = useCardContext();
|
|
808
|
+
return /* @__PURE__ */ jsx(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
"data-slot": "card-table",
|
|
812
|
+
className: cn(cardTableVariants({ variant }), className),
|
|
813
|
+
...props
|
|
814
|
+
}
|
|
815
|
+
);
|
|
1418
816
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
const {
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
onCheckedChange,
|
|
1432
|
-
required,
|
|
1433
|
-
value = "on",
|
|
1434
|
-
// @ts-expect-error
|
|
1435
|
-
internal_do_not_use_render
|
|
1436
|
-
} = props;
|
|
1437
|
-
const [checked, setChecked] = useControllableState({
|
|
1438
|
-
prop: checkedProp,
|
|
1439
|
-
defaultProp: defaultChecked ?? false,
|
|
1440
|
-
onChange: onCheckedChange,
|
|
1441
|
-
caller: CHECKBOX_NAME
|
|
1442
|
-
});
|
|
1443
|
-
const [control, setControl] = React5.useState(null);
|
|
1444
|
-
const [bubbleInput, setBubbleInput] = React5.useState(null);
|
|
1445
|
-
const hasConsumerStoppedPropagationRef = React5.useRef(false);
|
|
1446
|
-
const isFormControl = control ? !!form || !!control.closest("form") : (
|
|
1447
|
-
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
1448
|
-
true
|
|
817
|
+
function CardFooter({
|
|
818
|
+
className,
|
|
819
|
+
...props
|
|
820
|
+
}) {
|
|
821
|
+
const { variant } = useCardContext();
|
|
822
|
+
return /* @__PURE__ */ jsx(
|
|
823
|
+
"div",
|
|
824
|
+
{
|
|
825
|
+
"data-slot": "card-footer",
|
|
826
|
+
className: cn(cardFooterVariants({ variant }), className),
|
|
827
|
+
...props
|
|
828
|
+
}
|
|
1449
829
|
);
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
setControl,
|
|
1456
|
-
name,
|
|
1457
|
-
form,
|
|
1458
|
-
value,
|
|
1459
|
-
hasConsumerStoppedPropagationRef,
|
|
1460
|
-
required,
|
|
1461
|
-
defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
|
|
1462
|
-
isFormControl,
|
|
1463
|
-
bubbleInput,
|
|
1464
|
-
setBubbleInput
|
|
1465
|
-
};
|
|
830
|
+
}
|
|
831
|
+
function CardHeading({
|
|
832
|
+
className,
|
|
833
|
+
...props
|
|
834
|
+
}) {
|
|
1466
835
|
return /* @__PURE__ */ jsx(
|
|
1467
|
-
|
|
836
|
+
"div",
|
|
1468
837
|
{
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
838
|
+
"data-slot": "card-heading",
|
|
839
|
+
className: cn("space-y-1", className),
|
|
840
|
+
...props
|
|
1472
841
|
}
|
|
1473
842
|
);
|
|
1474
843
|
}
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
isFormControl,
|
|
1488
|
-
bubbleInput
|
|
1489
|
-
} = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
|
|
1490
|
-
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
|
1491
|
-
const initialCheckedStateRef = React5.useRef(checked);
|
|
1492
|
-
React5.useEffect(() => {
|
|
1493
|
-
const form = control?.form;
|
|
1494
|
-
if (form) {
|
|
1495
|
-
const reset = () => setChecked(initialCheckedStateRef.current);
|
|
1496
|
-
form.addEventListener("reset", reset);
|
|
1497
|
-
return () => form.removeEventListener("reset", reset);
|
|
1498
|
-
}
|
|
1499
|
-
}, [control, setChecked]);
|
|
1500
|
-
return /* @__PURE__ */ jsx(
|
|
1501
|
-
Primitive.button,
|
|
1502
|
-
{
|
|
1503
|
-
type: "button",
|
|
1504
|
-
role: "checkbox",
|
|
1505
|
-
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
1506
|
-
"aria-required": required,
|
|
1507
|
-
"data-state": getState(checked),
|
|
1508
|
-
"data-disabled": disabled ? "" : void 0,
|
|
1509
|
-
disabled,
|
|
1510
|
-
value,
|
|
1511
|
-
...checkboxProps,
|
|
1512
|
-
ref: composedRefs,
|
|
1513
|
-
onKeyDown: composeEventHandlers(onKeyDown, (event) => {
|
|
1514
|
-
if (event.key === "Enter") event.preventDefault();
|
|
1515
|
-
}),
|
|
1516
|
-
onClick: composeEventHandlers(onClick, (event) => {
|
|
1517
|
-
setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
|
|
1518
|
-
if (bubbleInput && isFormControl) {
|
|
1519
|
-
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
1520
|
-
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
1521
|
-
}
|
|
1522
|
-
})
|
|
1523
|
-
}
|
|
1524
|
-
);
|
|
1525
|
-
}
|
|
1526
|
-
);
|
|
1527
|
-
CheckboxTrigger.displayName = TRIGGER_NAME;
|
|
1528
|
-
var Checkbox = React5.forwardRef(
|
|
1529
|
-
(props, forwardedRef) => {
|
|
1530
|
-
const {
|
|
1531
|
-
__scopeCheckbox,
|
|
1532
|
-
name,
|
|
1533
|
-
checked,
|
|
1534
|
-
defaultChecked,
|
|
1535
|
-
required,
|
|
1536
|
-
disabled,
|
|
1537
|
-
value,
|
|
1538
|
-
onCheckedChange,
|
|
1539
|
-
form,
|
|
1540
|
-
...checkboxProps
|
|
1541
|
-
} = props;
|
|
1542
|
-
return /* @__PURE__ */ jsx(
|
|
1543
|
-
CheckboxProvider,
|
|
1544
|
-
{
|
|
1545
|
-
__scopeCheckbox,
|
|
1546
|
-
checked,
|
|
1547
|
-
defaultChecked,
|
|
1548
|
-
disabled,
|
|
1549
|
-
required,
|
|
1550
|
-
onCheckedChange,
|
|
1551
|
-
name,
|
|
1552
|
-
form,
|
|
1553
|
-
value,
|
|
1554
|
-
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1555
|
-
/* @__PURE__ */ jsx(
|
|
1556
|
-
CheckboxTrigger,
|
|
1557
|
-
{
|
|
1558
|
-
...checkboxProps,
|
|
1559
|
-
ref: forwardedRef,
|
|
1560
|
-
__scopeCheckbox
|
|
1561
|
-
}
|
|
1562
|
-
),
|
|
1563
|
-
isFormControl && /* @__PURE__ */ jsx(
|
|
1564
|
-
CheckboxBubbleInput,
|
|
1565
|
-
{
|
|
1566
|
-
__scopeCheckbox
|
|
1567
|
-
}
|
|
1568
|
-
)
|
|
1569
|
-
] })
|
|
1570
|
-
}
|
|
1571
|
-
);
|
|
1572
|
-
}
|
|
1573
|
-
);
|
|
1574
|
-
Checkbox.displayName = CHECKBOX_NAME;
|
|
1575
|
-
var INDICATOR_NAME = "CheckboxIndicator";
|
|
1576
|
-
var CheckboxIndicator = React5.forwardRef(
|
|
1577
|
-
(props, forwardedRef) => {
|
|
1578
|
-
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
1579
|
-
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
|
1580
|
-
return /* @__PURE__ */ jsx(
|
|
1581
|
-
Presence,
|
|
1582
|
-
{
|
|
1583
|
-
present: forceMount || isIndeterminate(context.checked) || context.checked === true,
|
|
1584
|
-
children: /* @__PURE__ */ jsx(
|
|
1585
|
-
Primitive.span,
|
|
1586
|
-
{
|
|
1587
|
-
"data-state": getState(context.checked),
|
|
1588
|
-
"data-disabled": context.disabled ? "" : void 0,
|
|
1589
|
-
...indicatorProps,
|
|
1590
|
-
ref: forwardedRef,
|
|
1591
|
-
style: { pointerEvents: "none", ...props.style }
|
|
1592
|
-
}
|
|
1593
|
-
)
|
|
1594
|
-
}
|
|
1595
|
-
);
|
|
1596
|
-
}
|
|
1597
|
-
);
|
|
1598
|
-
CheckboxIndicator.displayName = INDICATOR_NAME;
|
|
1599
|
-
var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
|
|
1600
|
-
var CheckboxBubbleInput = React5.forwardRef(
|
|
1601
|
-
({ __scopeCheckbox, ...props }, forwardedRef) => {
|
|
1602
|
-
const {
|
|
1603
|
-
control,
|
|
1604
|
-
hasConsumerStoppedPropagationRef,
|
|
1605
|
-
checked,
|
|
1606
|
-
defaultChecked,
|
|
1607
|
-
required,
|
|
1608
|
-
disabled,
|
|
1609
|
-
name,
|
|
1610
|
-
value,
|
|
1611
|
-
form,
|
|
1612
|
-
bubbleInput,
|
|
1613
|
-
setBubbleInput
|
|
1614
|
-
} = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
|
|
1615
|
-
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
|
|
1616
|
-
const prevChecked = usePrevious(checked);
|
|
1617
|
-
const controlSize = useSize(control);
|
|
1618
|
-
React5.useEffect(() => {
|
|
1619
|
-
const input = bubbleInput;
|
|
1620
|
-
if (!input) return;
|
|
1621
|
-
const inputProto = window.HTMLInputElement.prototype;
|
|
1622
|
-
const descriptor = Object.getOwnPropertyDescriptor(
|
|
1623
|
-
inputProto,
|
|
1624
|
-
"checked"
|
|
1625
|
-
);
|
|
1626
|
-
const setChecked = descriptor.set;
|
|
1627
|
-
const bubbles = !hasConsumerStoppedPropagationRef.current;
|
|
1628
|
-
if (prevChecked !== checked && setChecked) {
|
|
1629
|
-
const event = new Event("click", { bubbles });
|
|
1630
|
-
input.indeterminate = isIndeterminate(checked);
|
|
1631
|
-
setChecked.call(input, isIndeterminate(checked) ? false : checked);
|
|
1632
|
-
input.dispatchEvent(event);
|
|
1633
|
-
}
|
|
1634
|
-
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
1635
|
-
const defaultCheckedRef = React5.useRef(isIndeterminate(checked) ? false : checked);
|
|
1636
|
-
return /* @__PURE__ */ jsx(
|
|
1637
|
-
Primitive.input,
|
|
1638
|
-
{
|
|
1639
|
-
type: "checkbox",
|
|
1640
|
-
"aria-hidden": true,
|
|
1641
|
-
defaultChecked: defaultChecked ?? defaultCheckedRef.current,
|
|
1642
|
-
required,
|
|
1643
|
-
disabled,
|
|
1644
|
-
name,
|
|
1645
|
-
value,
|
|
1646
|
-
form,
|
|
1647
|
-
...props,
|
|
1648
|
-
tabIndex: -1,
|
|
1649
|
-
ref: composedRefs,
|
|
1650
|
-
style: {
|
|
1651
|
-
...props.style,
|
|
1652
|
-
...controlSize,
|
|
1653
|
-
position: "absolute",
|
|
1654
|
-
pointerEvents: "none",
|
|
1655
|
-
opacity: 0,
|
|
1656
|
-
margin: 0,
|
|
1657
|
-
// We transform because the input is absolutely positioned but we have
|
|
1658
|
-
// rendered it **after** the button. This pulls it back to sit on top
|
|
1659
|
-
// of the button.
|
|
1660
|
-
transform: "translateX(-100%)"
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
);
|
|
1664
|
-
}
|
|
1665
|
-
);
|
|
1666
|
-
CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
1667
|
-
function isFunction2(value) {
|
|
1668
|
-
return typeof value === "function";
|
|
844
|
+
function CardToolbar({
|
|
845
|
+
className,
|
|
846
|
+
...props
|
|
847
|
+
}) {
|
|
848
|
+
return /* @__PURE__ */ jsx(
|
|
849
|
+
"div",
|
|
850
|
+
{
|
|
851
|
+
"data-slot": "card-toolbar",
|
|
852
|
+
className: cn("flex items-center gap-2.5", className),
|
|
853
|
+
...props
|
|
854
|
+
}
|
|
855
|
+
);
|
|
1669
856
|
}
|
|
1670
|
-
function
|
|
1671
|
-
|
|
857
|
+
function CardTitle({
|
|
858
|
+
className,
|
|
859
|
+
...props
|
|
860
|
+
}) {
|
|
861
|
+
return /* @__PURE__ */ jsx(
|
|
862
|
+
"h3",
|
|
863
|
+
{
|
|
864
|
+
"data-slot": "card-title",
|
|
865
|
+
className: cn(
|
|
866
|
+
"text-base font-semibold leading-none tracking-tight",
|
|
867
|
+
className
|
|
868
|
+
),
|
|
869
|
+
...props
|
|
870
|
+
}
|
|
871
|
+
);
|
|
1672
872
|
}
|
|
1673
|
-
function
|
|
1674
|
-
|
|
873
|
+
function CardDescription({
|
|
874
|
+
className,
|
|
875
|
+
...props
|
|
876
|
+
}) {
|
|
877
|
+
return /* @__PURE__ */ jsx(
|
|
878
|
+
"div",
|
|
879
|
+
{
|
|
880
|
+
"data-slot": "card-description",
|
|
881
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
882
|
+
...props
|
|
883
|
+
}
|
|
884
|
+
);
|
|
1675
885
|
}
|
|
1676
886
|
var checkboxVariants = cva(
|
|
1677
887
|
`
|
|
@@ -1694,19 +904,19 @@ var checkboxVariants = cva(
|
|
|
1694
904
|
}
|
|
1695
905
|
}
|
|
1696
906
|
);
|
|
1697
|
-
function
|
|
907
|
+
function Checkbox({
|
|
1698
908
|
className,
|
|
1699
909
|
size,
|
|
1700
910
|
...props
|
|
1701
911
|
}) {
|
|
1702
912
|
return /* @__PURE__ */ jsx(
|
|
1703
|
-
|
|
913
|
+
CheckboxPrimitive.Root,
|
|
1704
914
|
{
|
|
1705
915
|
"data-slot": "checkbox",
|
|
1706
916
|
className: cn(checkboxVariants({ size }), className),
|
|
1707
917
|
...props,
|
|
1708
918
|
children: /* @__PURE__ */ jsxs(
|
|
1709
|
-
|
|
919
|
+
CheckboxPrimitive.Indicator,
|
|
1710
920
|
{
|
|
1711
921
|
className: cn("flex items-center justify-center text-current"),
|
|
1712
922
|
children: [
|
|
@@ -1966,12 +1176,419 @@ var Icons = {
|
|
|
1966
1176
|
) }),
|
|
1967
1177
|
postgresql: (props) => /* @__PURE__ */ jsx("svg", { fill: "currentColor", viewBox: "0 0 32 32", ...props, children: /* @__PURE__ */ jsx("path", { d: "M22.839 0c-1.245 0.011-2.479 0.188-3.677 0.536l-0.083 0.027c-0.751-0.131-1.516-0.203-2.276-0.219-1.573-0.027-2.923 0.353-4.011 0.989-1.073-0.369-3.297-1.016-5.641-0.885-1.629 0.088-3.411 0.583-4.735 1.979-1.312 1.391-2.009 3.547-1.864 6.485 0.041 0.807 0.271 2.124 0.656 3.837 0.38 1.709 0.917 3.709 1.589 5.537 0.672 1.823 1.405 3.463 2.552 4.577 0.572 0.557 1.364 1.032 2.296 0.991 0.652-0.027 1.24-0.313 1.751-0.735 0.249 0.328 0.516 0.468 0.755 0.599 0.308 0.167 0.599 0.281 0.907 0.355 0.552 0.14 1.495 0.323 2.599 0.135 0.375-0.063 0.771-0.187 1.167-0.359 0.016 0.437 0.032 0.869 0.047 1.307 0.057 1.38 0.095 2.656 0.505 3.776 0.068 0.183 0.251 1.12 0.969 1.953 0.724 0.833 2.129 1.349 3.739 1.005 1.131-0.24 2.573-0.677 3.532-2.041 0.948-1.344 1.375-3.276 1.459-6.412 0.020-0.172 0.047-0.312 0.072-0.448l0.224 0.021h0.027c1.208 0.052 2.521-0.12 3.62-0.631 0.968-0.448 1.703-0.901 2.239-1.708 0.131-0.199 0.281-0.443 0.319-0.86 0.041-0.411-0.199-1.063-0.595-1.364-0.791-0.604-1.291-0.375-1.828-0.26-0.525 0.115-1.063 0.176-1.599 0.192 1.541-2.593 2.645-5.353 3.276-7.792 0.375-1.443 0.584-2.771 0.599-3.932 0.021-1.161-0.077-2.187-0.771-3.077-2.177-2.776-5.235-3.548-7.599-3.573-0.073 0-0.145 0-0.219 0zM22.776 0.855c2.235-0.021 5.093 0.604 7.145 3.228 0.464 0.589 0.6 1.448 0.584 2.511s-0.213 2.328-0.573 3.719c-0.692 2.699-2.011 5.833-3.859 8.652 0.063 0.047 0.135 0.088 0.208 0.115 0.385 0.161 1.265 0.296 3.025-0.063 0.443-0.095 0.767-0.156 1.105 0.099 0.167 0.14 0.255 0.349 0.244 0.568-0.020 0.161-0.077 0.317-0.177 0.448-0.339 0.509-1.009 0.995-1.869 1.396-0.76 0.353-1.855 0.536-2.817 0.547-0.489 0.005-0.937-0.032-1.319-0.152l-0.020-0.004c-0.147 1.411-0.484 4.203-0.704 5.473-0.176 1.025-0.484 1.844-1.072 2.453-0.589 0.615-1.417 0.979-2.537 1.219-1.385 0.297-2.391-0.021-3.041-0.568s-0.948-1.276-1.125-1.719c-0.124-0.307-0.187-0.703-0.249-1.235-0.063-0.531-0.104-1.177-0.136-1.911-0.041-1.12-0.057-2.24-0.041-3.365-0.577 0.532-1.296 0.88-2.068 1.016-0.921 0.156-1.739 0-2.228-0.12-0.24-0.063-0.475-0.151-0.693-0.271-0.229-0.12-0.443-0.255-0.588-0.527-0.084-0.156-0.109-0.337-0.073-0.509 0.041-0.177 0.145-0.328 0.287-0.443 0.265-0.215 0.615-0.333 1.14-0.443 0.959-0.199 1.297-0.333 1.5-0.496 0.172-0.135 0.371-0.416 0.713-0.828 0-0.015 0-0.036-0.005-0.052-0.619-0.020-1.224-0.181-1.771-0.479-0.197 0.208-1.224 1.292-2.468 2.792-0.521 0.624-1.099 0.984-1.713 1.011-0.609 0.025-1.163-0.281-1.631-0.735-0.937-0.912-1.688-2.48-2.339-4.251s-1.177-3.744-1.557-5.421c-0.375-1.683-0.599-3.037-0.631-3.688-0.14-2.776 0.511-4.645 1.625-5.828s2.641-1.625 4.131-1.713c2.672-0.151 5.213 0.781 5.724 0.979 0.989-0.672 2.265-1.088 3.859-1.063 0.756 0.011 1.505 0.109 2.24 0.292l0.027-0.016c0.323-0.109 0.651-0.208 0.984-0.28 0.907-0.215 1.833-0.324 2.76-0.339zM22.979 1.745h-0.197c-0.76 0.009-1.527 0.099-2.271 0.26 1.661 0.735 2.916 1.864 3.801 3 0.615 0.781 1.12 1.64 1.505 2.557 0.152 0.355 0.251 0.651 0.303 0.88 0.031 0.115 0.047 0.213 0.057 0.312 0 0.052 0.005 0.105-0.021 0.193 0 0.005-0.005 0.016-0.005 0.021 0.043 1.167-0.249 1.957-0.287 3.072-0.025 0.808 0.183 1.756 0.235 2.792 0.047 0.973-0.072 2.041-0.703 3.093 0.052 0.063 0.099 0.125 0.151 0.193 1.672-2.636 2.88-5.547 3.521-8.032 0.344-1.339 0.525-2.552 0.541-3.509 0.016-0.959-0.161-1.657-0.391-1.948-1.792-2.287-4.213-2.871-6.24-2.885zM16.588 2.088c-1.572 0.005-2.703 0.48-3.561 1.193-0.887 0.74-1.48 1.745-1.865 2.781-0.464 1.224-0.625 2.411-0.688 3.219l0.021-0.011c0.475-0.265 1.099-0.536 1.771-0.687 0.667-0.157 1.391-0.204 2.041 0.052 0.657 0.249 1.193 0.848 1.391 1.749 0.939 4.344-0.291 5.959-0.744 7.177-0.172 0.443-0.323 0.891-0.443 1.349 0.057-0.011 0.115-0.027 0.172-0.032 0.323-0.025 0.572 0.079 0.719 0.141 0.459 0.192 0.771 0.588 0.943 1.041 0.041 0.12 0.072 0.244 0.093 0.38 0.016 0.052 0.027 0.109 0.027 0.167-0.052 1.661-0.048 3.323 0.015 4.984 0.032 0.719 0.079 1.349 0.136 1.849 0.057 0.495 0.135 0.875 0.188 1.005 0.171 0.427 0.421 0.984 0.875 1.364 0.448 0.381 1.093 0.631 2.276 0.381 1.025-0.224 1.656-0.527 2.077-0.964 0.423-0.443 0.672-1.052 0.833-1.984 0.245-1.401 0.729-5.464 0.787-6.224-0.025-0.579 0.057-1.021 0.245-1.36 0.187-0.344 0.479-0.557 0.735-0.672 0.124-0.057 0.244-0.093 0.343-0.125-0.104-0.145-0.213-0.291-0.323-0.432-0.364-0.443-0.667-0.937-0.891-1.463-0.104-0.22-0.219-0.439-0.344-0.647-0.176-0.317-0.4-0.719-0.635-1.172-0.469-0.896-0.979-1.989-1.245-3.052-0.265-1.063-0.301-2.161 0.376-2.932 0.599-0.688 1.656-0.973 3.233-0.812-0.047-0.141-0.072-0.261-0.151-0.443-0.359-0.844-0.828-1.636-1.391-2.355-1.339-1.713-3.511-3.412-6.859-3.469zM7.735 2.156c-0.167 0-0.339 0.005-0.505 0.016-1.349 0.079-2.62 0.468-3.532 1.432-0.911 0.969-1.509 2.547-1.38 5.167 0.027 0.5 0.24 1.885 0.609 3.536 0.371 1.652 0.896 3.595 1.527 5.313 0.629 1.713 1.391 3.208 2.12 3.916 0.364 0.349 0.681 0.495 0.968 0.485 0.287-0.016 0.636-0.183 1.063-0.693 0.776-0.937 1.579-1.844 2.412-2.729-1.199-1.047-1.787-2.629-1.552-4.203 0.135-0.984 0.156-1.907 0.135-2.636-0.015-0.708-0.063-1.176-0.063-1.473 0-0.011 0-0.016 0-0.027v-0.005l-0.005-0.009c0-1.537 0.272-3.057 0.792-4.5 0.375-0.996 0.928-2 1.76-2.819-0.817-0.271-2.271-0.676-3.843-0.755-0.167-0.011-0.339-0.016-0.505-0.016zM24.265 9.197c-0.905 0.016-1.411 0.251-1.681 0.552-0.376 0.433-0.412 1.193-0.177 2.131 0.233 0.937 0.719 1.984 1.172 2.855 0.224 0.437 0.443 0.828 0.619 1.145 0.183 0.323 0.313 0.547 0.391 0.745 0.073 0.177 0.157 0.333 0.24 0.479 0.349-0.74 0.412-1.464 0.375-2.224-0.047-0.937-0.265-1.896-0.229-2.864 0.037-1.136 0.261-1.876 0.277-2.751-0.324-0.041-0.657-0.068-0.985-0.068zM13.287 9.355c-0.276 0-0.552 0.036-0.823 0.099-0.537 0.131-1.052 0.328-1.537 0.599-0.161 0.088-0.317 0.188-0.463 0.303l-0.032 0.025c0.011 0.199 0.047 0.667 0.063 1.365 0.016 0.76 0 1.728-0.145 2.776-0.323 2.281 1.333 4.167 3.276 4.172 0.115-0.469 0.301-0.944 0.489-1.443 0.541-1.459 1.604-2.521 0.708-6.677-0.145-0.677-0.437-0.953-0.839-1.109-0.224-0.079-0.457-0.115-0.697-0.109zM23.844 9.625h0.068c0.083 0.005 0.167 0.011 0.239 0.031 0.068 0.016 0.131 0.037 0.183 0.073 0.052 0.031 0.088 0.083 0.099 0.145v0.011c0 0.063-0.016 0.125-0.047 0.183-0.041 0.072-0.088 0.14-0.145 0.197-0.136 0.151-0.319 0.251-0.516 0.281-0.193 0.027-0.385-0.025-0.547-0.135-0.063-0.048-0.125-0.1-0.172-0.157-0.047-0.047-0.073-0.109-0.084-0.172-0.004-0.061 0.011-0.124 0.052-0.171 0.048-0.048 0.1-0.089 0.157-0.12 0.129-0.073 0.301-0.125 0.5-0.152 0.072-0.009 0.145-0.015 0.213-0.020zM13.416 9.849c0.068 0 0.147 0.005 0.22 0.015 0.208 0.032 0.385 0.084 0.525 0.167 0.068 0.032 0.131 0.084 0.177 0.141 0.052 0.063 0.077 0.14 0.073 0.224-0.016 0.077-0.048 0.151-0.1 0.208-0.057 0.068-0.119 0.125-0.192 0.172-0.172 0.125-0.385 0.177-0.599 0.151-0.215-0.036-0.412-0.14-0.557-0.301-0.063-0.068-0.115-0.141-0.157-0.219-0.047-0.073-0.067-0.156-0.057-0.24 0.021-0.14 0.141-0.219 0.256-0.26 0.131-0.043 0.271-0.057 0.411-0.052zM25.495 19.64h-0.005c-0.192 0.073-0.353 0.1-0.489 0.163-0.14 0.052-0.251 0.156-0.317 0.285-0.089 0.152-0.156 0.423-0.136 0.885 0.057 0.043 0.125 0.073 0.199 0.095 0.224 0.068 0.609 0.115 1.036 0.109 0.849-0.011 1.896-0.208 2.453-0.469 0.453-0.208 0.88-0.489 1.255-0.817-1.859 0.38-2.905 0.281-3.552 0.016-0.156-0.068-0.307-0.157-0.443-0.267zM14.787 19.765h-0.027c-0.072 0.005-0.172 0.032-0.375 0.251-0.464 0.52-0.625 0.848-1.005 1.151-0.385 0.307-0.88 0.469-1.875 0.672-0.312 0.063-0.495 0.135-0.615 0.192 0.036 0.032 0.036 0.043 0.093 0.068 0.147 0.084 0.333 0.152 0.485 0.193 0.427 0.104 1.124 0.229 1.859 0.104 0.729-0.125 1.489-0.475 2.141-1.385 0.115-0.156 0.124-0.391 0.031-0.641-0.093-0.244-0.297-0.463-0.437-0.52-0.089-0.043-0.183-0.068-0.276-0.084z" }) })
|
|
1968
1178
|
};
|
|
1179
|
+
var inputVariants = cva(
|
|
1180
|
+
`
|
|
1181
|
+
flex w-full bg-background border border-input shadow-xs shadow-black/5 transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80
|
|
1182
|
+
focus-visible:ring-ring/30 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
|
|
1183
|
+
disabled:cursor-not-allowed disabled:opacity-60
|
|
1184
|
+
[&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed
|
|
1185
|
+
file:h-full [&[type=file]]:py-0 file:border-solid file:border-input file:bg-transparent
|
|
1186
|
+
file:font-medium file:not-italic file:text-foreground file:p-0 file:border-0 file:border-e
|
|
1187
|
+
aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
|
|
1188
|
+
`,
|
|
1189
|
+
{
|
|
1190
|
+
variants: {
|
|
1191
|
+
variant: {
|
|
1192
|
+
lg: "h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",
|
|
1193
|
+
md: "h-8.5 px-3 text-[0.8125rem] leading-[var(--text-sm--line-height)] rounded-md file:pe-3 file:me-3",
|
|
1194
|
+
sm: "h-7 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
defaultVariants: {
|
|
1198
|
+
variant: "md"
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
);
|
|
1202
|
+
var inputAddonVariants = cva(
|
|
1203
|
+
"flex items-center shrink-0 justify-center bg-muted border border-input shadow-xs shadow-[rgba(0,0,0,0.05)] text-secondary-foreground [&_svg]:text-secondary-foreground/60",
|
|
1204
|
+
{
|
|
1205
|
+
variants: {
|
|
1206
|
+
variant: {
|
|
1207
|
+
sm: "rounded-md h-7 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5",
|
|
1208
|
+
md: "rounded-md h-8.5 min-w-8.5 px-3 text-[0.8125rem] leading-[var(--text-sm--line-height)] [&_svg:not([class*=size-])]:size-4.5",
|
|
1209
|
+
lg: "rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5"
|
|
1210
|
+
},
|
|
1211
|
+
mode: {
|
|
1212
|
+
default: "",
|
|
1213
|
+
icon: "px-0 justify-center"
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
defaultVariants: {
|
|
1217
|
+
variant: "md",
|
|
1218
|
+
mode: "default"
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
var inputGroupVariants = cva(
|
|
1223
|
+
`
|
|
1224
|
+
flex items-stretch
|
|
1225
|
+
[&_[data-slot=input]]:grow
|
|
1226
|
+
[&_[data-slot=input-addon]:has(+[data-slot=input])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=input])]:border-e-0
|
|
1227
|
+
[&_[data-slot=input-addon]:has(+[data-slot=datefield])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=datefield])]:border-e-0
|
|
1228
|
+
[&_[data-slot=input]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=input]+[data-slot=input-addon]]:border-s-0
|
|
1229
|
+
[&_[data-slot=input-addon]:has(+[data-slot=button])]:rounded-e-none
|
|
1230
|
+
[&_[data-slot=input]+[data-slot=button]]:rounded-s-none
|
|
1231
|
+
[&_[data-slot=button]+[data-slot=input]]:rounded-s-none
|
|
1232
|
+
[&_[data-slot=input-addon]+[data-slot=input]]:rounded-s-none
|
|
1233
|
+
[&_[data-slot=input-addon]+[data-slot=datefield]]:[&_[data-slot=input]]:rounded-s-none
|
|
1234
|
+
[&_[data-slot=datefield]:has(+[data-slot=input-addon])]:[&_[data-slot=input]]:rounded-e-none
|
|
1235
|
+
[&_[data-slot=input]:has(+[data-slot=button])]:rounded-e-none
|
|
1236
|
+
[&_[data-slot=input]:has(+[data-slot=input-addon])]:rounded-e-none
|
|
1237
|
+
[&_[data-slot=datefield]]:grow
|
|
1238
|
+
[&_[data-slot=datefield]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=datefield]+[data-slot=input-addon]]:border-s-0
|
|
1239
|
+
`,
|
|
1240
|
+
{
|
|
1241
|
+
variants: {},
|
|
1242
|
+
defaultVariants: {}
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
var inputWrapperVariants = cva(
|
|
1246
|
+
`
|
|
1247
|
+
flex items-center gap-1.5
|
|
1248
|
+
has-[:focus-visible]:ring-ring/30
|
|
1249
|
+
has-[:focus-visible]:border-ring
|
|
1250
|
+
has-[:focus-visible]:outline-none
|
|
1251
|
+
has-[:focus-visible]:ring-[3px]
|
|
1252
|
+
|
|
1253
|
+
[&_[data-slot=datefield]]:grow
|
|
1254
|
+
focus-within:[&_[data-slot=input]]:ring-transparent
|
|
1255
|
+
focus-within:[&_[data-slot=input]]:ring-0
|
|
1256
|
+
focus-within:[&_[data-slot=input]]:border-0
|
|
1257
|
+
[&_[data-slot[input]]]:flex
|
|
1258
|
+
[&_[data-slot=input]]:w-full
|
|
1259
|
+
[&_[data-slot=input]]:outline-none
|
|
1260
|
+
[&_[data-slot=input]]:transition-colors
|
|
1261
|
+
[&_[data-slot=input]]:text-foreground
|
|
1262
|
+
[&_[data-slot=input]]:placeholder:text-muted-foreground
|
|
1263
|
+
[&_[data-slot=input]]:border-0
|
|
1264
|
+
[&_[data-slot=input]]:bg-transparent
|
|
1265
|
+
[&_[data-slot=input]]:p-0
|
|
1266
|
+
[&_[data-slot=input]]:shadow-none
|
|
1267
|
+
[&_[data-slot=input]]:focus-visible:ring-0
|
|
1268
|
+
[&_[data-slot=input]]:h-auto
|
|
1269
|
+
[&_[data-slot=input]]:disabled:cursor-not-allowed
|
|
1270
|
+
[&_[data-slot=input]]:disabled:opacity-50
|
|
1271
|
+
|
|
1272
|
+
[&_svg]:text-muted-foreground
|
|
1273
|
+
[&_svg]:shrink-0
|
|
1274
|
+
`,
|
|
1275
|
+
{
|
|
1276
|
+
variants: {
|
|
1277
|
+
variant: {
|
|
1278
|
+
sm: "gap-1.25 [&_svg:not([class*=size-])]:size-3.5",
|
|
1279
|
+
md: "gap-1.5 [&_svg:not([class*=size-])]:size-4",
|
|
1280
|
+
lg: "gap-1.5 [&_svg:not([class*=size-])]:size-4"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
defaultVariants: {
|
|
1284
|
+
variant: "md"
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
function Input({
|
|
1289
|
+
className,
|
|
1290
|
+
type,
|
|
1291
|
+
variant,
|
|
1292
|
+
...props
|
|
1293
|
+
}) {
|
|
1294
|
+
return /* @__PURE__ */ jsx(
|
|
1295
|
+
"input",
|
|
1296
|
+
{
|
|
1297
|
+
"data-slot": "input",
|
|
1298
|
+
type,
|
|
1299
|
+
className: cn(inputVariants({ variant }), className),
|
|
1300
|
+
...props
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function InputAddon({
|
|
1305
|
+
className,
|
|
1306
|
+
variant,
|
|
1307
|
+
mode,
|
|
1308
|
+
...props
|
|
1309
|
+
}) {
|
|
1310
|
+
return /* @__PURE__ */ jsx(
|
|
1311
|
+
"div",
|
|
1312
|
+
{
|
|
1313
|
+
"data-slot": "input-addon",
|
|
1314
|
+
className: cn(inputAddonVariants({ variant, mode }), className),
|
|
1315
|
+
...props
|
|
1316
|
+
}
|
|
1317
|
+
);
|
|
1318
|
+
}
|
|
1319
|
+
function InputGroup({
|
|
1320
|
+
className,
|
|
1321
|
+
...props
|
|
1322
|
+
}) {
|
|
1323
|
+
return /* @__PURE__ */ jsx(
|
|
1324
|
+
"div",
|
|
1325
|
+
{
|
|
1326
|
+
"data-slot": "input-group",
|
|
1327
|
+
className: cn(inputGroupVariants(), className),
|
|
1328
|
+
...props
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1331
|
+
}
|
|
1332
|
+
function InputWrapper({
|
|
1333
|
+
className,
|
|
1334
|
+
variant,
|
|
1335
|
+
...props
|
|
1336
|
+
}) {
|
|
1337
|
+
return /* @__PURE__ */ jsx(
|
|
1338
|
+
"div",
|
|
1339
|
+
{
|
|
1340
|
+
"data-slot": "input-wrapper",
|
|
1341
|
+
className: cn(
|
|
1342
|
+
inputVariants({ variant }),
|
|
1343
|
+
inputWrapperVariants({ variant }),
|
|
1344
|
+
className
|
|
1345
|
+
),
|
|
1346
|
+
...props
|
|
1347
|
+
}
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
function Skeleton({ className, ...props }) {
|
|
1351
|
+
return /* @__PURE__ */ jsx(
|
|
1352
|
+
"div",
|
|
1353
|
+
{
|
|
1354
|
+
"aria-hidden": props["aria-hidden"] ?? true,
|
|
1355
|
+
"data-slot": "skeleton",
|
|
1356
|
+
className: cn(
|
|
1357
|
+
"block animate-pulse rounded-md bg-muted/40 shrink-0",
|
|
1358
|
+
// ensure sensible default size when none provided
|
|
1359
|
+
"h-4 w-full",
|
|
1360
|
+
className
|
|
1361
|
+
),
|
|
1362
|
+
...props
|
|
1363
|
+
}
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
function DropdownMenu({
|
|
1367
|
+
...props
|
|
1368
|
+
}) {
|
|
1369
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
1370
|
+
}
|
|
1371
|
+
function DropdownMenuPortal({
|
|
1372
|
+
...props
|
|
1373
|
+
}) {
|
|
1374
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
1375
|
+
}
|
|
1376
|
+
function DropdownMenuTrigger({
|
|
1377
|
+
...props
|
|
1378
|
+
}) {
|
|
1379
|
+
return /* @__PURE__ */ jsx(
|
|
1380
|
+
DropdownMenuPrimitive.Trigger,
|
|
1381
|
+
{
|
|
1382
|
+
className: "select-none",
|
|
1383
|
+
"data-slot": "dropdown-menu-trigger",
|
|
1384
|
+
...props
|
|
1385
|
+
}
|
|
1386
|
+
);
|
|
1387
|
+
}
|
|
1388
|
+
function DropdownMenuSubTrigger({
|
|
1389
|
+
className,
|
|
1390
|
+
inset,
|
|
1391
|
+
children,
|
|
1392
|
+
...props
|
|
1393
|
+
}) {
|
|
1394
|
+
return /* @__PURE__ */ jsxs(
|
|
1395
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1396
|
+
{
|
|
1397
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
1398
|
+
className: cn(
|
|
1399
|
+
"flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-hidden",
|
|
1400
|
+
"focus:bg-accent focus:text-foreground",
|
|
1401
|
+
"data-[state=open]:bg-accent data-[state=open]:text-foreground",
|
|
1402
|
+
"data-[here=true]:bg-accent data-[here=true]:text-foreground",
|
|
1403
|
+
"[&>svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1404
|
+
inset && "ps-8",
|
|
1405
|
+
className
|
|
1406
|
+
),
|
|
1407
|
+
...props,
|
|
1408
|
+
children: [
|
|
1409
|
+
children,
|
|
1410
|
+
/* @__PURE__ */ jsx(
|
|
1411
|
+
ChevronRight,
|
|
1412
|
+
{
|
|
1413
|
+
"data-slot": "dropdown-menu-sub-trigger-indicator",
|
|
1414
|
+
className: "ms-auto size-3.5! rtl:rotate-180"
|
|
1415
|
+
}
|
|
1416
|
+
)
|
|
1417
|
+
]
|
|
1418
|
+
}
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
function DropdownMenuSubContent({
|
|
1422
|
+
className,
|
|
1423
|
+
...props
|
|
1424
|
+
}) {
|
|
1425
|
+
return /* @__PURE__ */ jsx(
|
|
1426
|
+
DropdownMenuPrimitive.SubContent,
|
|
1427
|
+
{
|
|
1428
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
1429
|
+
className: cn(
|
|
1430
|
+
"space-y-0.5 z-50 min-w-32 overflow-hidden shadow-md shadow-black/5 rounded-md border border-border bg-popover text-popover-foreground p-2 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1431
|
+
className
|
|
1432
|
+
),
|
|
1433
|
+
...props
|
|
1434
|
+
}
|
|
1435
|
+
);
|
|
1436
|
+
}
|
|
1437
|
+
function DropdownMenuContent({
|
|
1438
|
+
className,
|
|
1439
|
+
sideOffset = 4,
|
|
1440
|
+
...props
|
|
1441
|
+
}) {
|
|
1442
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1443
|
+
DropdownMenuPrimitive.Content,
|
|
1444
|
+
{
|
|
1445
|
+
"data-slot": "dropdown-menu-content",
|
|
1446
|
+
sideOffset,
|
|
1447
|
+
className: cn(
|
|
1448
|
+
"space-y-0.5 z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md shadow-black/5 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1449
|
+
className
|
|
1450
|
+
),
|
|
1451
|
+
...props
|
|
1452
|
+
}
|
|
1453
|
+
) });
|
|
1454
|
+
}
|
|
1455
|
+
function DropdownMenuGroup({
|
|
1456
|
+
...props
|
|
1457
|
+
}) {
|
|
1458
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
1459
|
+
}
|
|
1460
|
+
function DropdownMenuItem({
|
|
1461
|
+
className,
|
|
1462
|
+
inset,
|
|
1463
|
+
variant,
|
|
1464
|
+
...props
|
|
1465
|
+
}) {
|
|
1466
|
+
return /* @__PURE__ */ jsx(
|
|
1467
|
+
DropdownMenuPrimitive.Item,
|
|
1468
|
+
{
|
|
1469
|
+
"data-slot": "dropdown-menu-item",
|
|
1470
|
+
className: cn(
|
|
1471
|
+
"text-foreground relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0",
|
|
1472
|
+
"focus:bg-accent focus:text-foreground",
|
|
1473
|
+
"data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
|
|
1474
|
+
inset && "ps-8",
|
|
1475
|
+
variant === "destructive" && "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",
|
|
1476
|
+
className
|
|
1477
|
+
),
|
|
1478
|
+
...props
|
|
1479
|
+
}
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
function DropdownMenuCheckboxItem({
|
|
1483
|
+
className,
|
|
1484
|
+
children,
|
|
1485
|
+
checked,
|
|
1486
|
+
...props
|
|
1487
|
+
}) {
|
|
1488
|
+
return /* @__PURE__ */ jsxs(
|
|
1489
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1490
|
+
{
|
|
1491
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
1492
|
+
className: cn(
|
|
1493
|
+
"relative flex cursor-default select-none items-center rounded-md py-1.5 ps-8 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1494
|
+
className
|
|
1495
|
+
),
|
|
1496
|
+
checked,
|
|
1497
|
+
...props,
|
|
1498
|
+
children: [
|
|
1499
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center text-muted-foreground justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-primary" }) }) }),
|
|
1500
|
+
children
|
|
1501
|
+
]
|
|
1502
|
+
}
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
function DropdownMenuRadioItem({
|
|
1506
|
+
className,
|
|
1507
|
+
children,
|
|
1508
|
+
...props
|
|
1509
|
+
}) {
|
|
1510
|
+
return /* @__PURE__ */ jsxs(
|
|
1511
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1512
|
+
{
|
|
1513
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
1514
|
+
className: cn(
|
|
1515
|
+
"relative flex cursor-default select-none items-center rounded-md py-1.5 ps-6 pe-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1516
|
+
className
|
|
1517
|
+
),
|
|
1518
|
+
...props,
|
|
1519
|
+
children: [
|
|
1520
|
+
/* @__PURE__ */ jsx("span", { className: "absolute start-1.5 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-1.5 w-1.5 fill-primary stroke-primary" }) }) }),
|
|
1521
|
+
children
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
function DropdownMenuLabel({
|
|
1527
|
+
className,
|
|
1528
|
+
inset,
|
|
1529
|
+
...props
|
|
1530
|
+
}) {
|
|
1531
|
+
return /* @__PURE__ */ jsx(
|
|
1532
|
+
DropdownMenuPrimitive.Label,
|
|
1533
|
+
{
|
|
1534
|
+
"data-slot": "dropdown-menu-label",
|
|
1535
|
+
className: cn(
|
|
1536
|
+
"px-2 py-1.5 text-xs text-muted-foreground font-medium",
|
|
1537
|
+
inset && "ps-8",
|
|
1538
|
+
className
|
|
1539
|
+
),
|
|
1540
|
+
...props
|
|
1541
|
+
}
|
|
1542
|
+
);
|
|
1543
|
+
}
|
|
1544
|
+
function DropdownMenuRadioGroup({
|
|
1545
|
+
...props
|
|
1546
|
+
}) {
|
|
1547
|
+
return /* @__PURE__ */ jsx(
|
|
1548
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
1549
|
+
{
|
|
1550
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
1551
|
+
...props
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
function DropdownMenuSeparator({
|
|
1556
|
+
className,
|
|
1557
|
+
...props
|
|
1558
|
+
}) {
|
|
1559
|
+
return /* @__PURE__ */ jsx(
|
|
1560
|
+
DropdownMenuPrimitive.Separator,
|
|
1561
|
+
{
|
|
1562
|
+
"data-slot": "dropdown-menu-separator",
|
|
1563
|
+
className: cn("-mx-2 my-1.5 h-px bg-muted", className),
|
|
1564
|
+
...props
|
|
1565
|
+
}
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1568
|
+
function DropdownMenuShortcut({
|
|
1569
|
+
className,
|
|
1570
|
+
...props
|
|
1571
|
+
}) {
|
|
1572
|
+
return /* @__PURE__ */ jsx(
|
|
1573
|
+
"span",
|
|
1574
|
+
{
|
|
1575
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
1576
|
+
className: cn("ms-auto text-xs tracking-widest opacity-60", className),
|
|
1577
|
+
...props
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
function DropdownMenuSub({
|
|
1582
|
+
...props
|
|
1583
|
+
}) {
|
|
1584
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1585
|
+
}
|
|
1969
1586
|
var MOBILE_BREAKPOINT = 992;
|
|
1970
1587
|
function useIsMobile() {
|
|
1971
|
-
const [isMobile, setIsMobile] =
|
|
1588
|
+
const [isMobile, setIsMobile] = React.useState(
|
|
1972
1589
|
void 0
|
|
1973
1590
|
);
|
|
1974
|
-
|
|
1591
|
+
React.useEffect(() => {
|
|
1975
1592
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1976
1593
|
const onChange = () => {
|
|
1977
1594
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1986,7 +1603,7 @@ function useCopyToClipboard({
|
|
|
1986
1603
|
timeout = 2e3,
|
|
1987
1604
|
onCopy
|
|
1988
1605
|
} = {}) {
|
|
1989
|
-
const [isCopied, setIsCopied] =
|
|
1606
|
+
const [isCopied, setIsCopied] = React.useState(false);
|
|
1990
1607
|
const copyToClipboard = (value) => {
|
|
1991
1608
|
if (typeof window === "undefined" || !navigator.clipboard.writeText) {
|
|
1992
1609
|
return;
|
|
@@ -2005,37 +1622,13 @@ function useCopyToClipboard({
|
|
|
2005
1622
|
return { isCopied, copyToClipboard };
|
|
2006
1623
|
}
|
|
2007
1624
|
function useMounted() {
|
|
2008
|
-
const [mounted, setMounted] =
|
|
2009
|
-
|
|
1625
|
+
const [mounted, setMounted] = React.useState(false);
|
|
1626
|
+
React.useEffect(() => {
|
|
2010
1627
|
setMounted(true);
|
|
2011
1628
|
}, []);
|
|
2012
1629
|
return mounted;
|
|
2013
1630
|
}
|
|
2014
|
-
/*! Bundled license information:
|
|
2015
|
-
|
|
2016
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
2017
|
-
(**
|
|
2018
|
-
* @license React
|
|
2019
|
-
* use-sync-external-store-shim.production.js
|
|
2020
|
-
*
|
|
2021
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2022
|
-
*
|
|
2023
|
-
* This source code is licensed under the MIT license found in the
|
|
2024
|
-
* LICENSE file in the root directory of this source tree.
|
|
2025
|
-
*)
|
|
2026
|
-
|
|
2027
|
-
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
|
|
2028
|
-
(**
|
|
2029
|
-
* @license React
|
|
2030
|
-
* use-sync-external-store-shim.development.js
|
|
2031
|
-
*
|
|
2032
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2033
|
-
*
|
|
2034
|
-
* This source code is licensed under the MIT license found in the
|
|
2035
|
-
* LICENSE file in the root directory of this source tree.
|
|
2036
|
-
*)
|
|
2037
|
-
*/
|
|
2038
1631
|
|
|
2039
|
-
export {
|
|
1632
|
+
export { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
|
|
2040
1633
|
//# sourceMappingURL=index.js.map
|
|
2041
1634
|
//# sourceMappingURL=index.js.map
|