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 CHANGED
@@ -1,12 +1,16 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var clsx = require('clsx');
4
5
  var tailwindMerge = require('tailwind-merge');
5
6
  var classVarianceAuthority = require('class-variance-authority');
6
- var React5 = require('react');
7
+ var radixUi = require('radix-ui');
7
8
  var jsxRuntime = require('react/jsx-runtime');
8
- require('react-dom');
9
+ var SlotPrimitive = require('@radix-ui/react-slot');
9
10
  var lucideReact = require('lucide-react');
11
+ var React = require('react');
12
+ var CheckboxPrimitive = require('@radix-ui/react-checkbox');
13
+ var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
10
14
 
11
15
  function _interopNamespace(e) {
12
16
  if (e && e.__esModule) return e;
@@ -26,505 +30,15 @@ function _interopNamespace(e) {
26
30
  return Object.freeze(n);
27
31
  }
28
32
 
29
- var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
33
+ var SlotPrimitive__namespace = /*#__PURE__*/_interopNamespace(SlotPrimitive);
34
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
35
+ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
36
+ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
30
37
 
31
- var __create = Object.create;
32
- var __defProp = Object.defineProperty;
33
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
34
- var __getOwnPropNames = Object.getOwnPropertyNames;
35
- var __getProtoOf = Object.getPrototypeOf;
36
- var __hasOwnProp = Object.prototype.hasOwnProperty;
37
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
38
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
39
- }) : x)(function(x) {
40
- if (typeof require !== "undefined") return require.apply(this, arguments);
41
- throw Error('Dynamic require of "' + x + '" is not supported');
42
- });
43
- var __commonJS = (cb, mod) => function __require2() {
44
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
45
- };
46
- var __copyProps = (to, from, except, desc) => {
47
- if (from && typeof from === "object" || typeof from === "function") {
48
- for (let key of __getOwnPropNames(from))
49
- if (!__hasOwnProp.call(to, key) && key !== except)
50
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
51
- }
52
- return to;
53
- };
54
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
55
- // If the importer is in node compatibility mode or this is not an ESM
56
- // file that has been converted to a CommonJS file using a Babel-
57
- // compatible transform (i.e. "__esModule" has not been set), then set
58
- // "default" to the CommonJS "module.exports" for node compatibility.
59
- __defProp(target, "default", { value: mod, enumerable: true }) ,
60
- mod
61
- ));
62
-
63
- // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
64
- var require_use_sync_external_store_shim_production = __commonJS({
65
- "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js"(exports$1) {
66
- var React16 = __require("react");
67
- function is(x, y) {
68
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
69
- }
70
- var objectIs = "function" === typeof Object.is ? Object.is : is;
71
- var useState9 = React16.useState;
72
- var useEffect9 = React16.useEffect;
73
- var useLayoutEffect3 = React16.useLayoutEffect;
74
- var useDebugValue = React16.useDebugValue;
75
- function useSyncExternalStore$2(subscribe2, getSnapshot) {
76
- var value = getSnapshot(), _useState = useState9({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
77
- useLayoutEffect3(
78
- function() {
79
- inst.value = value;
80
- inst.getSnapshot = getSnapshot;
81
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
82
- },
83
- [subscribe2, value, getSnapshot]
84
- );
85
- useEffect9(
86
- function() {
87
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
88
- return subscribe2(function() {
89
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
90
- });
91
- },
92
- [subscribe2]
93
- );
94
- useDebugValue(value);
95
- return value;
96
- }
97
- function checkIfSnapshotChanged(inst) {
98
- var latestGetSnapshot = inst.getSnapshot;
99
- inst = inst.value;
100
- try {
101
- var nextValue = latestGetSnapshot();
102
- return !objectIs(inst, nextValue);
103
- } catch (error) {
104
- return true;
105
- }
106
- }
107
- function useSyncExternalStore$1(subscribe2, getSnapshot) {
108
- return getSnapshot();
109
- }
110
- var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
111
- exports$1.useSyncExternalStore = void 0 !== React16.useSyncExternalStore ? React16.useSyncExternalStore : shim;
112
- }
113
- });
114
-
115
- // node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
116
- var require_use_sync_external_store_shim_development = __commonJS({
117
- "node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports$1) {
118
- "production" !== process.env.NODE_ENV && (function() {
119
- function is(x, y) {
120
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
121
- }
122
- function useSyncExternalStore$2(subscribe2, getSnapshot) {
123
- didWarnOld18Alpha || void 0 === React16.startTransition || (didWarnOld18Alpha = true, console.error(
124
- "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."
125
- ));
126
- var value = getSnapshot();
127
- if (!didWarnUncachedGetSnapshot) {
128
- var cachedValue = getSnapshot();
129
- objectIs(value, cachedValue) || (console.error(
130
- "The result of getSnapshot should be cached to avoid an infinite loop"
131
- ), didWarnUncachedGetSnapshot = true);
132
- }
133
- cachedValue = useState9({
134
- inst: { value, getSnapshot }
135
- });
136
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
137
- useLayoutEffect3(
138
- function() {
139
- inst.value = value;
140
- inst.getSnapshot = getSnapshot;
141
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
142
- },
143
- [subscribe2, value, getSnapshot]
144
- );
145
- useEffect9(
146
- function() {
147
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
148
- return subscribe2(function() {
149
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
150
- });
151
- },
152
- [subscribe2]
153
- );
154
- useDebugValue(value);
155
- return value;
156
- }
157
- function checkIfSnapshotChanged(inst) {
158
- var latestGetSnapshot = inst.getSnapshot;
159
- inst = inst.value;
160
- try {
161
- var nextValue = latestGetSnapshot();
162
- return !objectIs(inst, nextValue);
163
- } catch (error) {
164
- return true;
165
- }
166
- }
167
- function useSyncExternalStore$1(subscribe2, getSnapshot) {
168
- return getSnapshot();
169
- }
170
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
171
- 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;
172
- exports$1.useSyncExternalStore = void 0 !== React16.useSyncExternalStore ? React16.useSyncExternalStore : shim;
173
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
174
- })();
175
- }
176
- });
177
-
178
- // node_modules/use-sync-external-store/shim/index.js
179
- var require_shim = __commonJS({
180
- "node_modules/use-sync-external-store/shim/index.js"(exports$1, module) {
181
- if (process.env.NODE_ENV === "production") {
182
- module.exports = require_use_sync_external_store_shim_production();
183
- } else {
184
- module.exports = require_use_sync_external_store_shim_development();
185
- }
186
- }
187
- });
38
+ // src/lib/utils.ts
188
39
  function cn(...inputs) {
189
40
  return tailwindMerge.twMerge(clsx.clsx(inputs));
190
41
  }
191
- function createContextScope(scopeName, createContextScopeDeps = []) {
192
- let defaultContexts = [];
193
- function createContext3(rootComponentName, defaultContext) {
194
- const BaseContext = React5__namespace.createContext(defaultContext);
195
- const index = defaultContexts.length;
196
- defaultContexts = [...defaultContexts, defaultContext];
197
- const Provider = (props) => {
198
- const { scope, children, ...context } = props;
199
- const Context = scope?.[scopeName]?.[index] || BaseContext;
200
- const value = React5__namespace.useMemo(() => context, Object.values(context));
201
- return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
202
- };
203
- Provider.displayName = rootComponentName + "Provider";
204
- function useContext2(consumerName, scope) {
205
- const Context = scope?.[scopeName]?.[index] || BaseContext;
206
- const context = React5__namespace.useContext(Context);
207
- if (context) return context;
208
- if (defaultContext !== void 0) return defaultContext;
209
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
210
- }
211
- return [Provider, useContext2];
212
- }
213
- const createScope = () => {
214
- const scopeContexts = defaultContexts.map((defaultContext) => {
215
- return React5__namespace.createContext(defaultContext);
216
- });
217
- return function useScope(scope) {
218
- const contexts = scope?.[scopeName] || scopeContexts;
219
- return React5__namespace.useMemo(
220
- () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
221
- [scope, contexts]
222
- );
223
- };
224
- };
225
- createScope.scopeName = scopeName;
226
- return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
227
- }
228
- function composeContextScopes(...scopes) {
229
- const baseScope = scopes[0];
230
- if (scopes.length === 1) return baseScope;
231
- const createScope = () => {
232
- const scopeHooks = scopes.map((createScope2) => ({
233
- useScope: createScope2(),
234
- scopeName: createScope2.scopeName
235
- }));
236
- return function useComposedScopes(overrideScopes) {
237
- const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
238
- const scopeProps = useScope(overrideScopes);
239
- const currentScope = scopeProps[`__scope${scopeName}`];
240
- return { ...nextScopes2, ...currentScope };
241
- }, {});
242
- return React5__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
243
- };
244
- };
245
- createScope.scopeName = baseScope.scopeName;
246
- return createScope;
247
- }
248
- function useCallbackRef(callback) {
249
- const callbackRef = React5__namespace.useRef(callback);
250
- React5__namespace.useEffect(() => {
251
- callbackRef.current = callback;
252
- });
253
- return React5__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
254
- }
255
- var useLayoutEffect2 = globalThis?.document ? React5__namespace.useLayoutEffect : () => {
256
- };
257
- function setRef(ref, value) {
258
- if (typeof ref === "function") {
259
- return ref(value);
260
- } else if (ref !== null && ref !== void 0) {
261
- ref.current = value;
262
- }
263
- }
264
- function composeRefs(...refs) {
265
- return (node) => {
266
- let hasCleanup = false;
267
- const cleanups = refs.map((ref) => {
268
- const cleanup = setRef(ref, node);
269
- if (!hasCleanup && typeof cleanup == "function") {
270
- hasCleanup = true;
271
- }
272
- return cleanup;
273
- });
274
- if (hasCleanup) {
275
- return () => {
276
- for (let i = 0; i < cleanups.length; i++) {
277
- const cleanup = cleanups[i];
278
- if (typeof cleanup == "function") {
279
- cleanup();
280
- } else {
281
- setRef(refs[i], null);
282
- }
283
- }
284
- };
285
- }
286
- };
287
- }
288
- function useComposedRefs(...refs) {
289
- return React5__namespace.useCallback(composeRefs(...refs), refs);
290
- }
291
- // @__NO_SIDE_EFFECTS__
292
- function createSlot(ownerName) {
293
- const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
294
- const Slot2 = React5__namespace.forwardRef((props, forwardedRef) => {
295
- const { children, ...slotProps } = props;
296
- const childrenArray = React5__namespace.Children.toArray(children);
297
- const slottable = childrenArray.find(isSlottable);
298
- if (slottable) {
299
- const newElement = slottable.props.children;
300
- const newChildren = childrenArray.map((child) => {
301
- if (child === slottable) {
302
- if (React5__namespace.Children.count(newElement) > 1) return React5__namespace.Children.only(null);
303
- return React5__namespace.isValidElement(newElement) ? newElement.props.children : null;
304
- } else {
305
- return child;
306
- }
307
- });
308
- return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React5__namespace.isValidElement(newElement) ? React5__namespace.cloneElement(newElement, void 0, newChildren) : null });
309
- }
310
- return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
311
- });
312
- Slot2.displayName = `${ownerName}.Slot`;
313
- return Slot2;
314
- }
315
- var Slot = /* @__PURE__ */ createSlot("Slot");
316
- // @__NO_SIDE_EFFECTS__
317
- function createSlotClone(ownerName) {
318
- const SlotClone = React5__namespace.forwardRef((props, forwardedRef) => {
319
- const { children, ...slotProps } = props;
320
- if (React5__namespace.isValidElement(children)) {
321
- const childrenRef = getElementRef(children);
322
- const props2 = mergeProps(slotProps, children.props);
323
- if (children.type !== React5__namespace.Fragment) {
324
- props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
325
- }
326
- return React5__namespace.cloneElement(children, props2);
327
- }
328
- return React5__namespace.Children.count(children) > 1 ? React5__namespace.Children.only(null) : null;
329
- });
330
- SlotClone.displayName = `${ownerName}.SlotClone`;
331
- return SlotClone;
332
- }
333
- var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
334
- function isSlottable(child) {
335
- return React5__namespace.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
336
- }
337
- function mergeProps(slotProps, childProps) {
338
- const overrideProps = { ...childProps };
339
- for (const propName in childProps) {
340
- const slotPropValue = slotProps[propName];
341
- const childPropValue = childProps[propName];
342
- const isHandler = /^on[A-Z]/.test(propName);
343
- if (isHandler) {
344
- if (slotPropValue && childPropValue) {
345
- overrideProps[propName] = (...args) => {
346
- const result = childPropValue(...args);
347
- slotPropValue(...args);
348
- return result;
349
- };
350
- } else if (slotPropValue) {
351
- overrideProps[propName] = slotPropValue;
352
- }
353
- } else if (propName === "style") {
354
- overrideProps[propName] = { ...slotPropValue, ...childPropValue };
355
- } else if (propName === "className") {
356
- overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
357
- }
358
- }
359
- return { ...slotProps, ...overrideProps };
360
- }
361
- function getElementRef(element) {
362
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
363
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
364
- if (mayWarn) {
365
- return element.ref;
366
- }
367
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
368
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
369
- if (mayWarn) {
370
- return element.props.ref;
371
- }
372
- return element.props.ref || element.ref;
373
- }
374
- var NODES = [
375
- "a",
376
- "button",
377
- "div",
378
- "form",
379
- "h2",
380
- "h3",
381
- "img",
382
- "input",
383
- "label",
384
- "li",
385
- "nav",
386
- "ol",
387
- "p",
388
- "select",
389
- "span",
390
- "svg",
391
- "ul"
392
- ];
393
- var Primitive = NODES.reduce((primitive, node) => {
394
- const Slot2 = createSlot(`Primitive.${node}`);
395
- const Node = React5__namespace.forwardRef((props, forwardedRef) => {
396
- const { asChild, ...primitiveProps } = props;
397
- const Comp = asChild ? Slot2 : node;
398
- if (typeof window !== "undefined") {
399
- window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
400
- }
401
- return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
402
- });
403
- Node.displayName = `Primitive.${node}`;
404
- return { ...primitive, [node]: Node };
405
- }, {});
406
-
407
- // node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs
408
- var import_shim = __toESM(require_shim());
409
- function useIsHydrated() {
410
- return (0, import_shim.useSyncExternalStore)(
411
- subscribe,
412
- () => true,
413
- () => false
414
- );
415
- }
416
- function subscribe() {
417
- return () => {
418
- };
419
- }
420
- var AVATAR_NAME = "Avatar";
421
- var [createAvatarContext] = createContextScope(AVATAR_NAME);
422
- var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
423
- var Avatar = React5__namespace.forwardRef(
424
- (props, forwardedRef) => {
425
- const { __scopeAvatar, ...avatarProps } = props;
426
- const [imageLoadingStatus, setImageLoadingStatus] = React5__namespace.useState("idle");
427
- return /* @__PURE__ */ jsxRuntime.jsx(
428
- AvatarProvider,
429
- {
430
- scope: __scopeAvatar,
431
- imageLoadingStatus,
432
- onImageLoadingStatusChange: setImageLoadingStatus,
433
- children: /* @__PURE__ */ jsxRuntime.jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
434
- }
435
- );
436
- }
437
- );
438
- Avatar.displayName = AVATAR_NAME;
439
- var IMAGE_NAME = "AvatarImage";
440
- var AvatarImage = React5__namespace.forwardRef(
441
- (props, forwardedRef) => {
442
- const { __scopeAvatar, src, onLoadingStatusChange = () => {
443
- }, ...imageProps } = props;
444
- const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
445
- const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
446
- const handleLoadingStatusChange = useCallbackRef((status) => {
447
- onLoadingStatusChange(status);
448
- context.onImageLoadingStatusChange(status);
449
- });
450
- useLayoutEffect2(() => {
451
- if (imageLoadingStatus !== "idle") {
452
- handleLoadingStatusChange(imageLoadingStatus);
453
- }
454
- }, [imageLoadingStatus, handleLoadingStatusChange]);
455
- return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsxRuntime.jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
456
- }
457
- );
458
- AvatarImage.displayName = IMAGE_NAME;
459
- var FALLBACK_NAME = "AvatarFallback";
460
- var AvatarFallback = React5__namespace.forwardRef(
461
- (props, forwardedRef) => {
462
- const { __scopeAvatar, delayMs, ...fallbackProps } = props;
463
- const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
464
- const [canRender, setCanRender] = React5__namespace.useState(delayMs === void 0);
465
- React5__namespace.useEffect(() => {
466
- if (delayMs !== void 0) {
467
- const timerId = window.setTimeout(() => setCanRender(true), delayMs);
468
- return () => window.clearTimeout(timerId);
469
- }
470
- }, [delayMs]);
471
- return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsxRuntime.jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
472
- }
473
- );
474
- AvatarFallback.displayName = FALLBACK_NAME;
475
- function resolveLoadingStatus(image, src) {
476
- if (!image) {
477
- return "idle";
478
- }
479
- if (!src) {
480
- return "error";
481
- }
482
- if (image.src !== src) {
483
- image.src = src;
484
- }
485
- return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
486
- }
487
- function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
488
- const isHydrated = useIsHydrated();
489
- const imageRef = React5__namespace.useRef(null);
490
- const image = (() => {
491
- if (!isHydrated) return null;
492
- if (!imageRef.current) {
493
- imageRef.current = new window.Image();
494
- }
495
- return imageRef.current;
496
- })();
497
- const [loadingStatus, setLoadingStatus] = React5__namespace.useState(
498
- () => resolveLoadingStatus(image, src)
499
- );
500
- useLayoutEffect2(() => {
501
- setLoadingStatus(resolveLoadingStatus(image, src));
502
- }, [image, src]);
503
- useLayoutEffect2(() => {
504
- const updateStatus = (status) => () => {
505
- setLoadingStatus(status);
506
- };
507
- if (!image) return;
508
- const handleLoad = updateStatus("loaded");
509
- const handleError = updateStatus("error");
510
- image.addEventListener("load", handleLoad);
511
- image.addEventListener("error", handleError);
512
- if (referrerPolicy) {
513
- image.referrerPolicy = referrerPolicy;
514
- }
515
- if (typeof crossOrigin === "string") {
516
- image.crossOrigin = crossOrigin;
517
- }
518
- return () => {
519
- image.removeEventListener("load", handleLoad);
520
- image.removeEventListener("error", handleError);
521
- };
522
- }, [image, crossOrigin, referrerPolicy]);
523
- return loadingStatus;
524
- }
525
- var Root = Avatar;
526
- var Image = AvatarImage;
527
- var Fallback = AvatarFallback;
528
42
  var avatarStatusVariants = classVarianceAuthority.cva(
529
43
  "flex items-center rounded-full size-2 border-2 border-background",
530
44
  {
@@ -541,12 +55,12 @@ var avatarStatusVariants = classVarianceAuthority.cva(
541
55
  }
542
56
  }
543
57
  );
544
- function Avatar2({
58
+ function Avatar({
545
59
  className,
546
60
  ...props
547
61
  }) {
548
62
  return /* @__PURE__ */ jsxRuntime.jsx(
549
- Root,
63
+ radixUi.Avatar.Root,
550
64
  {
551
65
  "data-slot": "avatar",
552
66
  className: cn("relative flex shrink-0 size-10", className),
@@ -554,12 +68,12 @@ function Avatar2({
554
68
  }
555
69
  );
556
70
  }
557
- function AvatarImage2({
71
+ function AvatarImage({
558
72
  className,
559
73
  ...props
560
74
  }) {
561
75
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative overflow-hidden rounded-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
562
- Image,
76
+ radixUi.Avatar.Image,
563
77
  {
564
78
  "data-slot": "avatar-image",
565
79
  className: cn("aspect-square h-full w-full"),
@@ -567,12 +81,12 @@ function AvatarImage2({
567
81
  }
568
82
  ) });
569
83
  }
570
- function AvatarFallback2({
84
+ function AvatarFallback({
571
85
  className,
572
86
  ...props
573
87
  }) {
574
88
  return /* @__PURE__ */ jsxRuntime.jsx(
575
- Fallback,
89
+ radixUi.Avatar.Fallback,
576
90
  {
577
91
  "data-slot": "avatar-fallback",
578
92
  className: cn(
@@ -770,7 +284,7 @@ function Badge({
770
284
  disabled,
771
285
  ...props
772
286
  }) {
773
- const Comp = asChild ? Slot : "span";
287
+ const Comp = asChild ? SlotPrimitive__namespace.Slot : "span";
774
288
  return /* @__PURE__ */ jsxRuntime.jsx(
775
289
  Comp,
776
290
  {
@@ -789,7 +303,7 @@ function BadgeButton({
789
303
  asChild = false,
790
304
  ...props
791
305
  }) {
792
- const Comp = asChild ? Slot : "span";
306
+ const Comp = asChild ? SlotPrimitive__namespace.Slot : "span";
793
307
  return /* @__PURE__ */ jsxRuntime.jsx(
794
308
  Comp,
795
309
  {
@@ -844,7 +358,7 @@ var buttonVariants = classVarianceAuthority.cva(
844
358
  },
845
359
  size: {
846
360
  lg: "h-10 rounded-md px-4 text-sm gap-1.5 [&_svg:not([class*=size-])]:size-4",
847
- 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",
361
+ 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",
848
362
  sm: "h-7 rounded-md px-2.5 gap-1.25 text-xs [&_svg:not([class*=size-])]:size-3.5",
849
363
  icon: "size-8.5 rounded-md [&_svg:not([class*=size-])]:size-4 shrink-0"
850
364
  },
@@ -1161,7 +675,7 @@ function Button({
1161
675
  placeholder = false,
1162
676
  ...props
1163
677
  }) {
1164
- const Comp = asChild ? Slot : "button";
678
+ const Comp = asChild ? SlotPrimitive__namespace.Slot : "button";
1165
679
  return /* @__PURE__ */ jsxRuntime.jsx(
1166
680
  Comp,
1167
681
  {
@@ -1200,500 +714,199 @@ function ButtonArrow({
1200
714
  }
1201
715
  );
1202
716
  }
1203
- function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1204
- return function handleEvent(event) {
1205
- originalEventHandler?.(event);
1206
- if (checkForDefaultPrevented === false || !event.defaultPrevented) {
1207
- return ourEventHandler?.(event);
1208
- }
1209
- };
1210
- }
1211
- var useInsertionEffect = React5__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
1212
- function useControllableState({
1213
- prop,
1214
- defaultProp,
1215
- onChange = () => {
1216
- },
1217
- caller
1218
- }) {
1219
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
1220
- defaultProp,
1221
- onChange
1222
- });
1223
- const isControlled = prop !== void 0;
1224
- const value = isControlled ? prop : uncontrolledProp;
717
+ var CardContext = React__namespace.createContext({
718
+ variant: "default"
719
+ // Default value
720
+ });
721
+ var useCardContext = () => {
722
+ const context = React__namespace.useContext(CardContext);
723
+ return context;
724
+ };
725
+ var cardVariants = classVarianceAuthority.cva(
726
+ "flex flex-col items-stretch text-card-foreground rounded-xl",
1225
727
  {
1226
- const isControlledRef = React5__namespace.useRef(prop !== void 0);
1227
- React5__namespace.useEffect(() => {
1228
- const wasControlled = isControlledRef.current;
1229
- if (wasControlled !== isControlled) {
1230
- const from = wasControlled ? "controlled" : "uncontrolled";
1231
- const to = isControlled ? "controlled" : "uncontrolled";
1232
- console.warn(
1233
- `${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.`
1234
- );
728
+ variants: {
729
+ variant: {
730
+ default: "bg-card border border-border shadow-xs shadow-black/5",
731
+ accent: "bg-muted shadow-xs p-1"
1235
732
  }
1236
- isControlledRef.current = isControlled;
1237
- }, [isControlled, caller]);
733
+ },
734
+ defaultVariants: {
735
+ variant: "default"
736
+ }
1238
737
  }
1239
- const setValue = React5__namespace.useCallback(
1240
- (nextValue) => {
1241
- if (isControlled) {
1242
- const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
1243
- if (value2 !== prop) {
1244
- onChangeRef.current?.(value2);
1245
- }
1246
- } else {
1247
- setUncontrolledProp(nextValue);
738
+ );
739
+ var cardHeaderVariants = classVarianceAuthority.cva(
740
+ "flex items-center justify-between flex-wrap px-5 min-h-14 gap-2.5",
741
+ {
742
+ variants: {
743
+ variant: {
744
+ default: "border-b border-border",
745
+ accent: ""
1248
746
  }
1249
747
  },
1250
- [isControlled, prop, setUncontrolledProp, onChangeRef]
1251
- );
1252
- return [value, setValue];
1253
- }
1254
- function useUncontrolledState({
1255
- defaultProp,
1256
- onChange
748
+ defaultVariants: {
749
+ variant: "default"
750
+ }
751
+ }
752
+ );
753
+ var cardContentVariants = classVarianceAuthority.cva("grow p-5", {
754
+ variants: {
755
+ variant: {
756
+ default: "",
757
+ accent: "bg-card rounded-t-xl [&:last-child]:rounded-b-xl"
758
+ }
759
+ },
760
+ defaultVariants: {
761
+ variant: "default"
762
+ }
763
+ });
764
+ var cardTableVariants = classVarianceAuthority.cva("grid grow", {
765
+ variants: {
766
+ variant: {
767
+ default: "",
768
+ accent: "bg-card rounded-xl"
769
+ }
770
+ },
771
+ defaultVariants: {
772
+ variant: "default"
773
+ }
774
+ });
775
+ var cardFooterVariants = classVarianceAuthority.cva("flex items-center px-5 min-h-14", {
776
+ variants: {
777
+ variant: {
778
+ default: "border-t border-border",
779
+ accent: "bg-card rounded-b-xl mt-[2px]"
780
+ }
781
+ },
782
+ defaultVariants: {
783
+ variant: "default"
784
+ }
785
+ });
786
+ function Card({
787
+ className,
788
+ variant = "default",
789
+ ...props
1257
790
  }) {
1258
- const [value, setValue] = React5__namespace.useState(defaultProp);
1259
- const prevValueRef = React5__namespace.useRef(value);
1260
- const onChangeRef = React5__namespace.useRef(onChange);
1261
- useInsertionEffect(() => {
1262
- onChangeRef.current = onChange;
1263
- }, [onChange]);
1264
- React5__namespace.useEffect(() => {
1265
- if (prevValueRef.current !== value) {
1266
- onChangeRef.current?.(value);
1267
- prevValueRef.current = value;
1268
- }
1269
- }, [value, prevValueRef]);
1270
- return [value, setValue, onChangeRef];
1271
- }
1272
- function isFunction(value) {
1273
- return typeof value === "function";
1274
- }
1275
- function usePrevious(value) {
1276
- const ref = React5__namespace.useRef({ value, previous: value });
1277
- return React5__namespace.useMemo(() => {
1278
- if (ref.current.value !== value) {
1279
- ref.current.previous = ref.current.value;
1280
- ref.current.value = value;
1281
- }
1282
- return ref.current.previous;
1283
- }, [value]);
1284
- }
1285
- function useSize(element) {
1286
- const [size, setSize] = React5__namespace.useState(void 0);
1287
- useLayoutEffect2(() => {
1288
- if (element) {
1289
- setSize({ width: element.offsetWidth, height: element.offsetHeight });
1290
- const resizeObserver = new ResizeObserver((entries) => {
1291
- if (!Array.isArray(entries)) {
1292
- return;
1293
- }
1294
- if (!entries.length) {
1295
- return;
1296
- }
1297
- const entry = entries[0];
1298
- let width;
1299
- let height;
1300
- if ("borderBoxSize" in entry) {
1301
- const borderSizeEntry = entry["borderBoxSize"];
1302
- const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
1303
- width = borderSize["inlineSize"];
1304
- height = borderSize["blockSize"];
1305
- } else {
1306
- width = element.offsetWidth;
1307
- height = element.offsetHeight;
1308
- }
1309
- setSize({ width, height });
1310
- });
1311
- resizeObserver.observe(element, { box: "border-box" });
1312
- return () => resizeObserver.unobserve(element);
1313
- } else {
1314
- setSize(void 0);
1315
- }
1316
- }, [element]);
1317
- return size;
1318
- }
1319
- function useStateMachine(initialState, machine) {
1320
- return React5__namespace.useReducer((state, event) => {
1321
- const nextState = machine[state][event];
1322
- return nextState ?? state;
1323
- }, initialState);
791
+ return /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: { variant: variant || "default" }, children: /* @__PURE__ */ jsxRuntime.jsx(
792
+ "div",
793
+ {
794
+ "data-slot": "card",
795
+ className: cn(cardVariants({ variant }), className),
796
+ ...props
797
+ }
798
+ ) });
1324
799
  }
1325
- var Presence = (props) => {
1326
- const { present, children } = props;
1327
- const presence = usePresence(present);
1328
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : React5__namespace.Children.only(children);
1329
- const ref = useComposedRefs(presence.ref, getElementRef2(child));
1330
- const forceMount = typeof children === "function";
1331
- return forceMount || presence.isPresent ? React5__namespace.cloneElement(child, { ref }) : null;
1332
- };
1333
- Presence.displayName = "Presence";
1334
- function usePresence(present) {
1335
- const [node, setNode] = React5__namespace.useState();
1336
- const stylesRef = React5__namespace.useRef(null);
1337
- const prevPresentRef = React5__namespace.useRef(present);
1338
- const prevAnimationNameRef = React5__namespace.useRef("none");
1339
- const initialState = present ? "mounted" : "unmounted";
1340
- const [state, send] = useStateMachine(initialState, {
1341
- mounted: {
1342
- UNMOUNT: "unmounted",
1343
- ANIMATION_OUT: "unmountSuspended"
1344
- },
1345
- unmountSuspended: {
1346
- MOUNT: "mounted",
1347
- ANIMATION_END: "unmounted"
1348
- },
1349
- unmounted: {
1350
- MOUNT: "mounted"
1351
- }
1352
- });
1353
- React5__namespace.useEffect(() => {
1354
- const currentAnimationName = getAnimationName(stylesRef.current);
1355
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1356
- }, [state]);
1357
- useLayoutEffect2(() => {
1358
- const styles = stylesRef.current;
1359
- const wasPresent = prevPresentRef.current;
1360
- const hasPresentChanged = wasPresent !== present;
1361
- if (hasPresentChanged) {
1362
- const prevAnimationName = prevAnimationNameRef.current;
1363
- const currentAnimationName = getAnimationName(styles);
1364
- if (present) {
1365
- send("MOUNT");
1366
- } else if (currentAnimationName === "none" || styles?.display === "none") {
1367
- send("UNMOUNT");
1368
- } else {
1369
- const isAnimating = prevAnimationName !== currentAnimationName;
1370
- if (wasPresent && isAnimating) {
1371
- send("ANIMATION_OUT");
1372
- } else {
1373
- send("UNMOUNT");
1374
- }
1375
- }
1376
- prevPresentRef.current = present;
1377
- }
1378
- }, [present, send]);
1379
- useLayoutEffect2(() => {
1380
- if (node) {
1381
- let timeoutId;
1382
- const ownerWindow = node.ownerDocument.defaultView ?? window;
1383
- const handleAnimationEnd = (event) => {
1384
- const currentAnimationName = getAnimationName(stylesRef.current);
1385
- const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
1386
- if (event.target === node && isCurrentAnimation) {
1387
- send("ANIMATION_END");
1388
- if (!prevPresentRef.current) {
1389
- const currentFillMode = node.style.animationFillMode;
1390
- node.style.animationFillMode = "forwards";
1391
- timeoutId = ownerWindow.setTimeout(() => {
1392
- if (node.style.animationFillMode === "forwards") {
1393
- node.style.animationFillMode = currentFillMode;
1394
- }
1395
- });
1396
- }
1397
- }
1398
- };
1399
- const handleAnimationStart = (event) => {
1400
- if (event.target === node) {
1401
- prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1402
- }
1403
- };
1404
- node.addEventListener("animationstart", handleAnimationStart);
1405
- node.addEventListener("animationcancel", handleAnimationEnd);
1406
- node.addEventListener("animationend", handleAnimationEnd);
1407
- return () => {
1408
- ownerWindow.clearTimeout(timeoutId);
1409
- node.removeEventListener("animationstart", handleAnimationStart);
1410
- node.removeEventListener("animationcancel", handleAnimationEnd);
1411
- node.removeEventListener("animationend", handleAnimationEnd);
1412
- };
1413
- } else {
1414
- send("ANIMATION_END");
1415
- }
1416
- }, [node, send]);
1417
- return {
1418
- isPresent: ["mounted", "unmountSuspended"].includes(state),
1419
- ref: React5__namespace.useCallback((node2) => {
1420
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
1421
- setNode(node2);
1422
- }, [])
1423
- };
800
+ function CardHeader({
801
+ className,
802
+ ...props
803
+ }) {
804
+ const { variant } = useCardContext();
805
+ return /* @__PURE__ */ jsxRuntime.jsx(
806
+ "div",
807
+ {
808
+ "data-slot": "card-header",
809
+ className: cn(cardHeaderVariants({ variant }), className),
810
+ ...props
811
+ }
812
+ );
1424
813
  }
1425
- function getAnimationName(styles) {
1426
- return styles?.animationName || "none";
814
+ function CardContent({
815
+ className,
816
+ ...props
817
+ }) {
818
+ const { variant } = useCardContext();
819
+ return /* @__PURE__ */ jsxRuntime.jsx(
820
+ "div",
821
+ {
822
+ "data-slot": "card-content",
823
+ className: cn(cardContentVariants({ variant }), className),
824
+ ...props
825
+ }
826
+ );
1427
827
  }
1428
- function getElementRef2(element) {
1429
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1430
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1431
- if (mayWarn) {
1432
- return element.ref;
1433
- }
1434
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1435
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1436
- if (mayWarn) {
1437
- return element.props.ref;
1438
- }
1439
- return element.props.ref || element.ref;
828
+ function CardTable({
829
+ className,
830
+ ...props
831
+ }) {
832
+ const { variant } = useCardContext();
833
+ return /* @__PURE__ */ jsxRuntime.jsx(
834
+ "div",
835
+ {
836
+ "data-slot": "card-table",
837
+ className: cn(cardTableVariants({ variant }), className),
838
+ ...props
839
+ }
840
+ );
1440
841
  }
1441
- var CHECKBOX_NAME = "Checkbox";
1442
- var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
1443
- var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
1444
- function CheckboxProvider(props) {
1445
- const {
1446
- __scopeCheckbox,
1447
- checked: checkedProp,
1448
- children,
1449
- defaultChecked,
1450
- disabled,
1451
- form,
1452
- name,
1453
- onCheckedChange,
1454
- required,
1455
- value = "on",
1456
- // @ts-expect-error
1457
- internal_do_not_use_render
1458
- } = props;
1459
- const [checked, setChecked] = useControllableState({
1460
- prop: checkedProp,
1461
- defaultProp: defaultChecked ?? false,
1462
- onChange: onCheckedChange,
1463
- caller: CHECKBOX_NAME
1464
- });
1465
- const [control, setControl] = React5__namespace.useState(null);
1466
- const [bubbleInput, setBubbleInput] = React5__namespace.useState(null);
1467
- const hasConsumerStoppedPropagationRef = React5__namespace.useRef(false);
1468
- const isFormControl = control ? !!form || !!control.closest("form") : (
1469
- // We set this to true by default so that events bubble to forms without JS (SSR)
1470
- true
842
+ function CardFooter({
843
+ className,
844
+ ...props
845
+ }) {
846
+ const { variant } = useCardContext();
847
+ return /* @__PURE__ */ jsxRuntime.jsx(
848
+ "div",
849
+ {
850
+ "data-slot": "card-footer",
851
+ className: cn(cardFooterVariants({ variant }), className),
852
+ ...props
853
+ }
1471
854
  );
1472
- const context = {
1473
- checked,
1474
- disabled,
1475
- setChecked,
1476
- control,
1477
- setControl,
1478
- name,
1479
- form,
1480
- value,
1481
- hasConsumerStoppedPropagationRef,
1482
- required,
1483
- defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
1484
- isFormControl,
1485
- bubbleInput,
1486
- setBubbleInput
1487
- };
855
+ }
856
+ function CardHeading({
857
+ className,
858
+ ...props
859
+ }) {
1488
860
  return /* @__PURE__ */ jsxRuntime.jsx(
1489
- CheckboxProviderImpl,
861
+ "div",
1490
862
  {
1491
- scope: __scopeCheckbox,
1492
- ...context,
1493
- children: isFunction2(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
863
+ "data-slot": "card-heading",
864
+ className: cn("space-y-1", className),
865
+ ...props
1494
866
  }
1495
867
  );
1496
868
  }
1497
- var TRIGGER_NAME = "CheckboxTrigger";
1498
- var CheckboxTrigger = React5__namespace.forwardRef(
1499
- ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
1500
- const {
1501
- control,
1502
- value,
1503
- disabled,
1504
- checked,
1505
- required,
1506
- setControl,
1507
- setChecked,
1508
- hasConsumerStoppedPropagationRef,
1509
- isFormControl,
1510
- bubbleInput
1511
- } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
1512
- const composedRefs = useComposedRefs(forwardedRef, setControl);
1513
- const initialCheckedStateRef = React5__namespace.useRef(checked);
1514
- React5__namespace.useEffect(() => {
1515
- const form = control?.form;
1516
- if (form) {
1517
- const reset = () => setChecked(initialCheckedStateRef.current);
1518
- form.addEventListener("reset", reset);
1519
- return () => form.removeEventListener("reset", reset);
1520
- }
1521
- }, [control, setChecked]);
1522
- return /* @__PURE__ */ jsxRuntime.jsx(
1523
- Primitive.button,
1524
- {
1525
- type: "button",
1526
- role: "checkbox",
1527
- "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
1528
- "aria-required": required,
1529
- "data-state": getState(checked),
1530
- "data-disabled": disabled ? "" : void 0,
1531
- disabled,
1532
- value,
1533
- ...checkboxProps,
1534
- ref: composedRefs,
1535
- onKeyDown: composeEventHandlers(onKeyDown, (event) => {
1536
- if (event.key === "Enter") event.preventDefault();
1537
- }),
1538
- onClick: composeEventHandlers(onClick, (event) => {
1539
- setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
1540
- if (bubbleInput && isFormControl) {
1541
- hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
1542
- if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
1543
- }
1544
- })
1545
- }
1546
- );
1547
- }
1548
- );
1549
- CheckboxTrigger.displayName = TRIGGER_NAME;
1550
- var Checkbox = React5__namespace.forwardRef(
1551
- (props, forwardedRef) => {
1552
- const {
1553
- __scopeCheckbox,
1554
- name,
1555
- checked,
1556
- defaultChecked,
1557
- required,
1558
- disabled,
1559
- value,
1560
- onCheckedChange,
1561
- form,
1562
- ...checkboxProps
1563
- } = props;
1564
- return /* @__PURE__ */ jsxRuntime.jsx(
1565
- CheckboxProvider,
1566
- {
1567
- __scopeCheckbox,
1568
- checked,
1569
- defaultChecked,
1570
- disabled,
1571
- required,
1572
- onCheckedChange,
1573
- name,
1574
- form,
1575
- value,
1576
- internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1577
- /* @__PURE__ */ jsxRuntime.jsx(
1578
- CheckboxTrigger,
1579
- {
1580
- ...checkboxProps,
1581
- ref: forwardedRef,
1582
- __scopeCheckbox
1583
- }
1584
- ),
1585
- isFormControl && /* @__PURE__ */ jsxRuntime.jsx(
1586
- CheckboxBubbleInput,
1587
- {
1588
- __scopeCheckbox
1589
- }
1590
- )
1591
- ] })
1592
- }
1593
- );
1594
- }
1595
- );
1596
- Checkbox.displayName = CHECKBOX_NAME;
1597
- var INDICATOR_NAME = "CheckboxIndicator";
1598
- var CheckboxIndicator = React5__namespace.forwardRef(
1599
- (props, forwardedRef) => {
1600
- const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
1601
- const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
1602
- return /* @__PURE__ */ jsxRuntime.jsx(
1603
- Presence,
1604
- {
1605
- present: forceMount || isIndeterminate(context.checked) || context.checked === true,
1606
- children: /* @__PURE__ */ jsxRuntime.jsx(
1607
- Primitive.span,
1608
- {
1609
- "data-state": getState(context.checked),
1610
- "data-disabled": context.disabled ? "" : void 0,
1611
- ...indicatorProps,
1612
- ref: forwardedRef,
1613
- style: { pointerEvents: "none", ...props.style }
1614
- }
1615
- )
1616
- }
1617
- );
1618
- }
1619
- );
1620
- CheckboxIndicator.displayName = INDICATOR_NAME;
1621
- var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
1622
- var CheckboxBubbleInput = React5__namespace.forwardRef(
1623
- ({ __scopeCheckbox, ...props }, forwardedRef) => {
1624
- const {
1625
- control,
1626
- hasConsumerStoppedPropagationRef,
1627
- checked,
1628
- defaultChecked,
1629
- required,
1630
- disabled,
1631
- name,
1632
- value,
1633
- form,
1634
- bubbleInput,
1635
- setBubbleInput
1636
- } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
1637
- const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
1638
- const prevChecked = usePrevious(checked);
1639
- const controlSize = useSize(control);
1640
- React5__namespace.useEffect(() => {
1641
- const input = bubbleInput;
1642
- if (!input) return;
1643
- const inputProto = window.HTMLInputElement.prototype;
1644
- const descriptor = Object.getOwnPropertyDescriptor(
1645
- inputProto,
1646
- "checked"
1647
- );
1648
- const setChecked = descriptor.set;
1649
- const bubbles = !hasConsumerStoppedPropagationRef.current;
1650
- if (prevChecked !== checked && setChecked) {
1651
- const event = new Event("click", { bubbles });
1652
- input.indeterminate = isIndeterminate(checked);
1653
- setChecked.call(input, isIndeterminate(checked) ? false : checked);
1654
- input.dispatchEvent(event);
1655
- }
1656
- }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
1657
- const defaultCheckedRef = React5__namespace.useRef(isIndeterminate(checked) ? false : checked);
1658
- return /* @__PURE__ */ jsxRuntime.jsx(
1659
- Primitive.input,
1660
- {
1661
- type: "checkbox",
1662
- "aria-hidden": true,
1663
- defaultChecked: defaultChecked ?? defaultCheckedRef.current,
1664
- required,
1665
- disabled,
1666
- name,
1667
- value,
1668
- form,
1669
- ...props,
1670
- tabIndex: -1,
1671
- ref: composedRefs,
1672
- style: {
1673
- ...props.style,
1674
- ...controlSize,
1675
- position: "absolute",
1676
- pointerEvents: "none",
1677
- opacity: 0,
1678
- margin: 0,
1679
- // We transform because the input is absolutely positioned but we have
1680
- // rendered it **after** the button. This pulls it back to sit on top
1681
- // of the button.
1682
- transform: "translateX(-100%)"
1683
- }
1684
- }
1685
- );
1686
- }
1687
- );
1688
- CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
1689
- function isFunction2(value) {
1690
- return typeof value === "function";
869
+ function CardToolbar({
870
+ className,
871
+ ...props
872
+ }) {
873
+ return /* @__PURE__ */ jsxRuntime.jsx(
874
+ "div",
875
+ {
876
+ "data-slot": "card-toolbar",
877
+ className: cn("flex items-center gap-2.5", className),
878
+ ...props
879
+ }
880
+ );
1691
881
  }
1692
- function isIndeterminate(checked) {
1693
- return checked === "indeterminate";
882
+ function CardTitle({
883
+ className,
884
+ ...props
885
+ }) {
886
+ return /* @__PURE__ */ jsxRuntime.jsx(
887
+ "h3",
888
+ {
889
+ "data-slot": "card-title",
890
+ className: cn(
891
+ "text-base font-semibold leading-none tracking-tight",
892
+ className
893
+ ),
894
+ ...props
895
+ }
896
+ );
1694
897
  }
1695
- function getState(checked) {
1696
- return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
898
+ function CardDescription({
899
+ className,
900
+ ...props
901
+ }) {
902
+ return /* @__PURE__ */ jsxRuntime.jsx(
903
+ "div",
904
+ {
905
+ "data-slot": "card-description",
906
+ className: cn("text-sm text-muted-foreground", className),
907
+ ...props
908
+ }
909
+ );
1697
910
  }
1698
911
  var checkboxVariants = classVarianceAuthority.cva(
1699
912
  `
@@ -1716,19 +929,19 @@ var checkboxVariants = classVarianceAuthority.cva(
1716
929
  }
1717
930
  }
1718
931
  );
1719
- function Checkbox2({
932
+ function Checkbox({
1720
933
  className,
1721
934
  size,
1722
935
  ...props
1723
936
  }) {
1724
937
  return /* @__PURE__ */ jsxRuntime.jsx(
1725
- Checkbox,
938
+ CheckboxPrimitive__namespace.Root,
1726
939
  {
1727
940
  "data-slot": "checkbox",
1728
941
  className: cn(checkboxVariants({ size }), className),
1729
942
  ...props,
1730
943
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1731
- CheckboxIndicator,
944
+ CheckboxPrimitive__namespace.Indicator,
1732
945
  {
1733
946
  className: cn("flex items-center justify-center text-current"),
1734
947
  children: [
@@ -1988,12 +1201,419 @@ var Icons = {
1988
1201
  ) }),
1989
1202
  postgresql: (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { fill: "currentColor", viewBox: "0 0 32 32", ...props, children: /* @__PURE__ */ jsxRuntime.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" }) })
1990
1203
  };
1204
+ var inputVariants = classVarianceAuthority.cva(
1205
+ `
1206
+ flex w-full bg-background border border-input shadow-xs shadow-black/5 transition-[color,box-shadow] text-foreground placeholder:text-muted-foreground/80
1207
+ focus-visible:ring-ring/30 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-[3px]
1208
+ disabled:cursor-not-allowed disabled:opacity-60
1209
+ [&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed
1210
+ file:h-full [&[type=file]]:py-0 file:border-solid file:border-input file:bg-transparent
1211
+ file:font-medium file:not-italic file:text-foreground file:p-0 file:border-0 file:border-e
1212
+ aria-invalid:border-destructive/60 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive dark:aria-invalid:ring-destructive/20
1213
+ `,
1214
+ {
1215
+ variants: {
1216
+ variant: {
1217
+ lg: "h-10 px-4 text-sm rounded-md file:pe-4 file:me-4",
1218
+ md: "h-8.5 px-3 text-[0.8125rem] leading-[var(--text-sm--line-height)] rounded-md file:pe-3 file:me-3",
1219
+ sm: "h-7 px-2.5 text-xs rounded-md file:pe-2.5 file:me-2.5"
1220
+ }
1221
+ },
1222
+ defaultVariants: {
1223
+ variant: "md"
1224
+ }
1225
+ }
1226
+ );
1227
+ var inputAddonVariants = classVarianceAuthority.cva(
1228
+ "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",
1229
+ {
1230
+ variants: {
1231
+ variant: {
1232
+ sm: "rounded-md h-7 min-w-7 text-xs px-2.5 [&_svg:not([class*=size-])]:size-3.5",
1233
+ 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",
1234
+ lg: "rounded-md h-10 min-w-10 px-4 text-sm [&_svg:not([class*=size-])]:size-4.5"
1235
+ },
1236
+ mode: {
1237
+ default: "",
1238
+ icon: "px-0 justify-center"
1239
+ }
1240
+ },
1241
+ defaultVariants: {
1242
+ variant: "md",
1243
+ mode: "default"
1244
+ }
1245
+ }
1246
+ );
1247
+ var inputGroupVariants = classVarianceAuthority.cva(
1248
+ `
1249
+ flex items-stretch
1250
+ [&_[data-slot=input]]:grow
1251
+ [&_[data-slot=input-addon]:has(+[data-slot=input])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=input])]:border-e-0
1252
+ [&_[data-slot=input-addon]:has(+[data-slot=datefield])]:rounded-e-none [&_[data-slot=input-addon]:has(+[data-slot=datefield])]:border-e-0
1253
+ [&_[data-slot=input]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=input]+[data-slot=input-addon]]:border-s-0
1254
+ [&_[data-slot=input-addon]:has(+[data-slot=button])]:rounded-e-none
1255
+ [&_[data-slot=input]+[data-slot=button]]:rounded-s-none
1256
+ [&_[data-slot=button]+[data-slot=input]]:rounded-s-none
1257
+ [&_[data-slot=input-addon]+[data-slot=input]]:rounded-s-none
1258
+ [&_[data-slot=input-addon]+[data-slot=datefield]]:[&_[data-slot=input]]:rounded-s-none
1259
+ [&_[data-slot=datefield]:has(+[data-slot=input-addon])]:[&_[data-slot=input]]:rounded-e-none
1260
+ [&_[data-slot=input]:has(+[data-slot=button])]:rounded-e-none
1261
+ [&_[data-slot=input]:has(+[data-slot=input-addon])]:rounded-e-none
1262
+ [&_[data-slot=datefield]]:grow
1263
+ [&_[data-slot=datefield]+[data-slot=input-addon]]:rounded-s-none [&_[data-slot=datefield]+[data-slot=input-addon]]:border-s-0
1264
+ `,
1265
+ {
1266
+ variants: {},
1267
+ defaultVariants: {}
1268
+ }
1269
+ );
1270
+ var inputWrapperVariants = classVarianceAuthority.cva(
1271
+ `
1272
+ flex items-center gap-1.5
1273
+ has-[:focus-visible]:ring-ring/30
1274
+ has-[:focus-visible]:border-ring
1275
+ has-[:focus-visible]:outline-none
1276
+ has-[:focus-visible]:ring-[3px]
1277
+
1278
+ [&_[data-slot=datefield]]:grow
1279
+ focus-within:[&_[data-slot=input]]:ring-transparent
1280
+ focus-within:[&_[data-slot=input]]:ring-0
1281
+ focus-within:[&_[data-slot=input]]:border-0
1282
+ [&_[data-slot[input]]]:flex
1283
+ [&_[data-slot=input]]:w-full
1284
+ [&_[data-slot=input]]:outline-none
1285
+ [&_[data-slot=input]]:transition-colors
1286
+ [&_[data-slot=input]]:text-foreground
1287
+ [&_[data-slot=input]]:placeholder:text-muted-foreground
1288
+ [&_[data-slot=input]]:border-0
1289
+ [&_[data-slot=input]]:bg-transparent
1290
+ [&_[data-slot=input]]:p-0
1291
+ [&_[data-slot=input]]:shadow-none
1292
+ [&_[data-slot=input]]:focus-visible:ring-0
1293
+ [&_[data-slot=input]]:h-auto
1294
+ [&_[data-slot=input]]:disabled:cursor-not-allowed
1295
+ [&_[data-slot=input]]:disabled:opacity-50
1296
+
1297
+ [&_svg]:text-muted-foreground
1298
+ [&_svg]:shrink-0
1299
+ `,
1300
+ {
1301
+ variants: {
1302
+ variant: {
1303
+ sm: "gap-1.25 [&_svg:not([class*=size-])]:size-3.5",
1304
+ md: "gap-1.5 [&_svg:not([class*=size-])]:size-4",
1305
+ lg: "gap-1.5 [&_svg:not([class*=size-])]:size-4"
1306
+ }
1307
+ },
1308
+ defaultVariants: {
1309
+ variant: "md"
1310
+ }
1311
+ }
1312
+ );
1313
+ function Input({
1314
+ className,
1315
+ type,
1316
+ variant,
1317
+ ...props
1318
+ }) {
1319
+ return /* @__PURE__ */ jsxRuntime.jsx(
1320
+ "input",
1321
+ {
1322
+ "data-slot": "input",
1323
+ type,
1324
+ className: cn(inputVariants({ variant }), className),
1325
+ ...props
1326
+ }
1327
+ );
1328
+ }
1329
+ function InputAddon({
1330
+ className,
1331
+ variant,
1332
+ mode,
1333
+ ...props
1334
+ }) {
1335
+ return /* @__PURE__ */ jsxRuntime.jsx(
1336
+ "div",
1337
+ {
1338
+ "data-slot": "input-addon",
1339
+ className: cn(inputAddonVariants({ variant, mode }), className),
1340
+ ...props
1341
+ }
1342
+ );
1343
+ }
1344
+ function InputGroup({
1345
+ className,
1346
+ ...props
1347
+ }) {
1348
+ return /* @__PURE__ */ jsxRuntime.jsx(
1349
+ "div",
1350
+ {
1351
+ "data-slot": "input-group",
1352
+ className: cn(inputGroupVariants(), className),
1353
+ ...props
1354
+ }
1355
+ );
1356
+ }
1357
+ function InputWrapper({
1358
+ className,
1359
+ variant,
1360
+ ...props
1361
+ }) {
1362
+ return /* @__PURE__ */ jsxRuntime.jsx(
1363
+ "div",
1364
+ {
1365
+ "data-slot": "input-wrapper",
1366
+ className: cn(
1367
+ inputVariants({ variant }),
1368
+ inputWrapperVariants({ variant }),
1369
+ className
1370
+ ),
1371
+ ...props
1372
+ }
1373
+ );
1374
+ }
1375
+ function Skeleton({ className, ...props }) {
1376
+ return /* @__PURE__ */ jsxRuntime.jsx(
1377
+ "div",
1378
+ {
1379
+ "aria-hidden": props["aria-hidden"] ?? true,
1380
+ "data-slot": "skeleton",
1381
+ className: cn(
1382
+ "block animate-pulse rounded-md bg-muted/40 shrink-0",
1383
+ // ensure sensible default size when none provided
1384
+ "h-4 w-full",
1385
+ className
1386
+ ),
1387
+ ...props
1388
+ }
1389
+ );
1390
+ }
1391
+ function DropdownMenu({
1392
+ ...props
1393
+ }) {
1394
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
1395
+ }
1396
+ function DropdownMenuPortal({
1397
+ ...props
1398
+ }) {
1399
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
1400
+ }
1401
+ function DropdownMenuTrigger({
1402
+ ...props
1403
+ }) {
1404
+ return /* @__PURE__ */ jsxRuntime.jsx(
1405
+ DropdownMenuPrimitive__namespace.Trigger,
1406
+ {
1407
+ className: "select-none",
1408
+ "data-slot": "dropdown-menu-trigger",
1409
+ ...props
1410
+ }
1411
+ );
1412
+ }
1413
+ function DropdownMenuSubTrigger({
1414
+ className,
1415
+ inset,
1416
+ children,
1417
+ ...props
1418
+ }) {
1419
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1420
+ DropdownMenuPrimitive__namespace.SubTrigger,
1421
+ {
1422
+ "data-slot": "dropdown-menu-sub-trigger",
1423
+ className: cn(
1424
+ "flex cursor-default gap-2 select-none items-center rounded-md px-2 py-1.5 text-sm outline-hidden",
1425
+ "focus:bg-accent focus:text-foreground",
1426
+ "data-[state=open]:bg-accent data-[state=open]:text-foreground",
1427
+ "data-[here=true]:bg-accent data-[here=true]:text-foreground",
1428
+ "[&>svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&>svg]:size-4 [&>svg]:shrink-0",
1429
+ inset && "ps-8",
1430
+ className
1431
+ ),
1432
+ ...props,
1433
+ children: [
1434
+ children,
1435
+ /* @__PURE__ */ jsxRuntime.jsx(
1436
+ lucideReact.ChevronRight,
1437
+ {
1438
+ "data-slot": "dropdown-menu-sub-trigger-indicator",
1439
+ className: "ms-auto size-3.5! rtl:rotate-180"
1440
+ }
1441
+ )
1442
+ ]
1443
+ }
1444
+ );
1445
+ }
1446
+ function DropdownMenuSubContent({
1447
+ className,
1448
+ ...props
1449
+ }) {
1450
+ return /* @__PURE__ */ jsxRuntime.jsx(
1451
+ DropdownMenuPrimitive__namespace.SubContent,
1452
+ {
1453
+ "data-slot": "dropdown-menu-sub-content",
1454
+ className: cn(
1455
+ "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",
1456
+ className
1457
+ ),
1458
+ ...props
1459
+ }
1460
+ );
1461
+ }
1462
+ function DropdownMenuContent({
1463
+ className,
1464
+ sideOffset = 4,
1465
+ ...props
1466
+ }) {
1467
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1468
+ DropdownMenuPrimitive__namespace.Content,
1469
+ {
1470
+ "data-slot": "dropdown-menu-content",
1471
+ sideOffset,
1472
+ className: cn(
1473
+ "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",
1474
+ className
1475
+ ),
1476
+ ...props
1477
+ }
1478
+ ) });
1479
+ }
1480
+ function DropdownMenuGroup({
1481
+ ...props
1482
+ }) {
1483
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
1484
+ }
1485
+ function DropdownMenuItem({
1486
+ className,
1487
+ inset,
1488
+ variant,
1489
+ ...props
1490
+ }) {
1491
+ return /* @__PURE__ */ jsxRuntime.jsx(
1492
+ DropdownMenuPrimitive__namespace.Item,
1493
+ {
1494
+ "data-slot": "dropdown-menu-item",
1495
+ className: cn(
1496
+ "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",
1497
+ "focus:bg-accent focus:text-foreground",
1498
+ "data-[active=true]:bg-accent data-[active=true]:text-accent-foreground",
1499
+ inset && "ps-8",
1500
+ variant === "destructive" && "text-destructive hover:text-destructive focus:text-destructive hover:bg-destructive/5 focus:bg-destructive/5 data-[active=true]:bg-destructive/5",
1501
+ className
1502
+ ),
1503
+ ...props
1504
+ }
1505
+ );
1506
+ }
1507
+ function DropdownMenuCheckboxItem({
1508
+ className,
1509
+ children,
1510
+ checked,
1511
+ ...props
1512
+ }) {
1513
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1514
+ DropdownMenuPrimitive__namespace.CheckboxItem,
1515
+ {
1516
+ "data-slot": "dropdown-menu-checkbox-item",
1517
+ className: cn(
1518
+ "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",
1519
+ className
1520
+ ),
1521
+ checked,
1522
+ ...props,
1523
+ children: [
1524
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center text-muted-foreground justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" }) }) }),
1525
+ children
1526
+ ]
1527
+ }
1528
+ );
1529
+ }
1530
+ function DropdownMenuRadioItem({
1531
+ className,
1532
+ children,
1533
+ ...props
1534
+ }) {
1535
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1536
+ DropdownMenuPrimitive__namespace.RadioItem,
1537
+ {
1538
+ "data-slot": "dropdown-menu-radio-item",
1539
+ className: cn(
1540
+ "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",
1541
+ className
1542
+ ),
1543
+ ...props,
1544
+ children: [
1545
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute start-1.5 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-1.5 w-1.5 fill-primary stroke-primary" }) }) }),
1546
+ children
1547
+ ]
1548
+ }
1549
+ );
1550
+ }
1551
+ function DropdownMenuLabel({
1552
+ className,
1553
+ inset,
1554
+ ...props
1555
+ }) {
1556
+ return /* @__PURE__ */ jsxRuntime.jsx(
1557
+ DropdownMenuPrimitive__namespace.Label,
1558
+ {
1559
+ "data-slot": "dropdown-menu-label",
1560
+ className: cn(
1561
+ "px-2 py-1.5 text-xs text-muted-foreground font-medium",
1562
+ inset && "ps-8",
1563
+ className
1564
+ ),
1565
+ ...props
1566
+ }
1567
+ );
1568
+ }
1569
+ function DropdownMenuRadioGroup({
1570
+ ...props
1571
+ }) {
1572
+ return /* @__PURE__ */ jsxRuntime.jsx(
1573
+ DropdownMenuPrimitive__namespace.RadioGroup,
1574
+ {
1575
+ "data-slot": "dropdown-menu-radio-group",
1576
+ ...props
1577
+ }
1578
+ );
1579
+ }
1580
+ function DropdownMenuSeparator({
1581
+ className,
1582
+ ...props
1583
+ }) {
1584
+ return /* @__PURE__ */ jsxRuntime.jsx(
1585
+ DropdownMenuPrimitive__namespace.Separator,
1586
+ {
1587
+ "data-slot": "dropdown-menu-separator",
1588
+ className: cn("-mx-2 my-1.5 h-px bg-muted", className),
1589
+ ...props
1590
+ }
1591
+ );
1592
+ }
1593
+ function DropdownMenuShortcut({
1594
+ className,
1595
+ ...props
1596
+ }) {
1597
+ return /* @__PURE__ */ jsxRuntime.jsx(
1598
+ "span",
1599
+ {
1600
+ "data-slot": "dropdown-menu-shortcut",
1601
+ className: cn("ms-auto text-xs tracking-widest opacity-60", className),
1602
+ ...props
1603
+ }
1604
+ );
1605
+ }
1606
+ function DropdownMenuSub({
1607
+ ...props
1608
+ }) {
1609
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1610
+ }
1991
1611
  var MOBILE_BREAKPOINT = 992;
1992
1612
  function useIsMobile() {
1993
- const [isMobile, setIsMobile] = React5__namespace.useState(
1613
+ const [isMobile, setIsMobile] = React__namespace.useState(
1994
1614
  void 0
1995
1615
  );
1996
- React5__namespace.useEffect(() => {
1616
+ React__namespace.useEffect(() => {
1997
1617
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1998
1618
  const onChange = () => {
1999
1619
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -2008,7 +1628,7 @@ function useCopyToClipboard({
2008
1628
  timeout = 2e3,
2009
1629
  onCopy
2010
1630
  } = {}) {
2011
- const [isCopied, setIsCopied] = React5__namespace.useState(false);
1631
+ const [isCopied, setIsCopied] = React__namespace.useState(false);
2012
1632
  const copyToClipboard = (value) => {
2013
1633
  if (typeof window === "undefined" || !navigator.clipboard.writeText) {
2014
1634
  return;
@@ -2027,40 +1647,16 @@ function useCopyToClipboard({
2027
1647
  return { isCopied, copyToClipboard };
2028
1648
  }
2029
1649
  function useMounted() {
2030
- const [mounted, setMounted] = React5__namespace.useState(false);
2031
- React5__namespace.useEffect(() => {
1650
+ const [mounted, setMounted] = React__namespace.useState(false);
1651
+ React__namespace.useEffect(() => {
2032
1652
  setMounted(true);
2033
1653
  }, []);
2034
1654
  return mounted;
2035
1655
  }
2036
- /*! Bundled license information:
2037
-
2038
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
2039
- (**
2040
- * @license React
2041
- * use-sync-external-store-shim.production.js
2042
- *
2043
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2044
- *
2045
- * This source code is licensed under the MIT license found in the
2046
- * LICENSE file in the root directory of this source tree.
2047
- *)
2048
-
2049
- use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
2050
- (**
2051
- * @license React
2052
- * use-sync-external-store-shim.development.js
2053
- *
2054
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2055
- *
2056
- * This source code is licensed under the MIT license found in the
2057
- * LICENSE file in the root directory of this source tree.
2058
- *)
2059
- */
2060
1656
 
2061
- exports.Avatar = Avatar2;
2062
- exports.AvatarFallback = AvatarFallback2;
2063
- exports.AvatarImage = AvatarImage2;
1657
+ exports.Avatar = Avatar;
1658
+ exports.AvatarFallback = AvatarFallback;
1659
+ exports.AvatarImage = AvatarImage;
2064
1660
  exports.AvatarIndicator = AvatarIndicator;
2065
1661
  exports.AvatarStatus = AvatarStatus;
2066
1662
  exports.Badge = Badge;
@@ -2068,12 +1664,43 @@ exports.BadgeButton = BadgeButton;
2068
1664
  exports.BadgeDot = BadgeDot;
2069
1665
  exports.Button = Button;
2070
1666
  exports.ButtonArrow = ButtonArrow;
2071
- exports.Checkbox = Checkbox2;
1667
+ exports.Card = Card;
1668
+ exports.CardContent = CardContent;
1669
+ exports.CardDescription = CardDescription;
1670
+ exports.CardFooter = CardFooter;
1671
+ exports.CardHeader = CardHeader;
1672
+ exports.CardHeading = CardHeading;
1673
+ exports.CardTable = CardTable;
1674
+ exports.CardTitle = CardTitle;
1675
+ exports.CardToolbar = CardToolbar;
1676
+ exports.Checkbox = Checkbox;
1677
+ exports.DropdownMenu = DropdownMenu;
1678
+ exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
1679
+ exports.DropdownMenuContent = DropdownMenuContent;
1680
+ exports.DropdownMenuGroup = DropdownMenuGroup;
1681
+ exports.DropdownMenuItem = DropdownMenuItem;
1682
+ exports.DropdownMenuLabel = DropdownMenuLabel;
1683
+ exports.DropdownMenuPortal = DropdownMenuPortal;
1684
+ exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
1685
+ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
1686
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
1687
+ exports.DropdownMenuShortcut = DropdownMenuShortcut;
1688
+ exports.DropdownMenuSub = DropdownMenuSub;
1689
+ exports.DropdownMenuSubContent = DropdownMenuSubContent;
1690
+ exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
1691
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
2072
1692
  exports.Icons = Icons;
1693
+ exports.Input = Input;
1694
+ exports.InputAddon = InputAddon;
1695
+ exports.InputGroup = InputGroup;
1696
+ exports.InputWrapper = InputWrapper;
1697
+ exports.Skeleton = Skeleton;
2073
1698
  exports.avatarStatusVariants = avatarStatusVariants;
2074
1699
  exports.badgeVariants = badgeVariants;
2075
1700
  exports.buttonVariants = buttonVariants;
2076
1701
  exports.cn = cn;
1702
+ exports.inputAddonVariants = inputAddonVariants;
1703
+ exports.inputVariants = inputVariants;
2077
1704
  exports.useCopyToClipboard = useCopyToClipboard;
2078
1705
  exports.useIsMobile = useIsMobile;
2079
1706
  exports.useMounted = useMounted;