@dimaan/ui 0.0.14 → 0.0.17
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 +675 -258
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +606 -103
- package/dist/index.d.ts +606 -103
- package/dist/index.js +632 -262
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
package/dist/index.cjs
CHANGED
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
var React10 = require('react');
|
|
4
4
|
var ReactDOM = require('react-dom');
|
|
5
|
-
var
|
|
5
|
+
var RadixAlertDialog = require('@radix-ui/react-alert-dialog');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var tailwindMerge = require('tailwind-merge');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var lucideReact = require('lucide-react');
|
|
10
|
+
var reactDirection = require('@radix-ui/react-direction');
|
|
10
11
|
var RadixPopover = require('@radix-ui/react-popover');
|
|
11
12
|
var reactDayPicker = require('react-day-picker');
|
|
13
|
+
var RadixDialog = require('@radix-ui/react-dialog');
|
|
12
14
|
var RadixDropdown = require('@radix-ui/react-dropdown-menu');
|
|
13
15
|
var reactHookForm = require('react-hook-form');
|
|
14
16
|
var RadixSelect = require('@radix-ui/react-select');
|
|
15
17
|
var RadixRadioGroup = require('@radix-ui/react-radio-group');
|
|
16
18
|
var RadixSwitch = require('@radix-ui/react-switch');
|
|
19
|
+
var sonner = require('sonner');
|
|
20
|
+
var RadixTooltip = require('@radix-ui/react-tooltip');
|
|
17
21
|
|
|
18
22
|
function _interopNamespace(e) {
|
|
19
23
|
if (e && e.__esModule) return e;
|
|
@@ -35,11 +39,14 @@ function _interopNamespace(e) {
|
|
|
35
39
|
|
|
36
40
|
var React10__namespace = /*#__PURE__*/_interopNamespace(React10);
|
|
37
41
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
42
|
+
var RadixAlertDialog__namespace = /*#__PURE__*/_interopNamespace(RadixAlertDialog);
|
|
38
43
|
var RadixPopover__namespace = /*#__PURE__*/_interopNamespace(RadixPopover);
|
|
44
|
+
var RadixDialog__namespace = /*#__PURE__*/_interopNamespace(RadixDialog);
|
|
39
45
|
var RadixDropdown__namespace = /*#__PURE__*/_interopNamespace(RadixDropdown);
|
|
40
46
|
var RadixSelect__namespace = /*#__PURE__*/_interopNamespace(RadixSelect);
|
|
41
47
|
var RadixRadioGroup__namespace = /*#__PURE__*/_interopNamespace(RadixRadioGroup);
|
|
42
48
|
var RadixSwitch__namespace = /*#__PURE__*/_interopNamespace(RadixSwitch);
|
|
49
|
+
var RadixTooltip__namespace = /*#__PURE__*/_interopNamespace(RadixTooltip);
|
|
43
50
|
|
|
44
51
|
var __create = Object.create;
|
|
45
52
|
var __defProp = Object.defineProperty;
|
|
@@ -428,7 +435,7 @@ function createBrowserURLImpl(to, isAbsolute = false) {
|
|
|
428
435
|
}
|
|
429
436
|
return new URL(href2, base);
|
|
430
437
|
}
|
|
431
|
-
function
|
|
438
|
+
function createContext6(defaultValue) {
|
|
432
439
|
return { defaultValue };
|
|
433
440
|
}
|
|
434
441
|
function isUnsupportedLazyRouteObjectKey(key) {
|
|
@@ -10506,7 +10513,7 @@ function encodeLocation(to) {
|
|
|
10506
10513
|
hash: encoded.hash
|
|
10507
10514
|
};
|
|
10508
10515
|
}
|
|
10509
|
-
var __typeError, __accessCheck, __privateGet, __privateAdd, __privateSet,
|
|
10516
|
+
var __typeError, __accessCheck, __privateGet, __privateAdd, __privateSet, Action2, PopStateEventType, _map, RouterContextProvider, unsupportedLazyRouteObjectKeys, unsupportedLazyRouteFunctionKeys, paramRe, dynamicSegmentValue, indexRouteValue, emptySegmentValue, staticSegmentValue, splatPenalty, isSplat, ABSOLUTE_URL_REGEX, isAbsoluteUrl, removeDoubleSlashes, joinPaths, removeTrailingSlash, normalizePathname, normalizeSearch, normalizeHash, DataWithResponseInit, redirect, redirectDocument, replace, ErrorResponseImpl, isBrowser, UninstrumentedSymbol, objectProtoNames, validMutationMethodsArr, validMutationMethods, validRequestMethodsArr, validRequestMethods, redirectStatusCodes, redirectPreserveMethodStatusCodes, IDLE_NAVIGATION, IDLE_FETCHER, IDLE_BLOCKER, defaultMapRouteProperties, TRANSITIONS_STORAGE_KEY, ResetLoaderDataSymbol, _routes, _branches, _hmrRoutes, _hmrBranches, DataRoutes, lazyRoutePropertyCache, loadLazyRouteProperty, lazyRouteFunctionCache, invalidProtocols, DataRouterContext, DataRouterStateContext, RSCRouterContext, ViewTransitionContext, FetchersContext, AwaitContext, AwaitContextProvider, NavigationContext, LocationContext, RouteContext, RouteErrorContext, ENABLE_DEV_WARNINGS, ERROR_DIGEST_BASE, ERROR_DIGEST_REDIRECT, ERROR_DIGEST_ROUTE_ERROR_RESPONSE, navigateEffectWarning, OutletContext, defaultErrorElement, RenderErrorBoundary, errorRedirectHandledMap, blockerId, alreadyWarned, alreadyWarned2, USE_OPTIMISTIC, useOptimisticImpl, stableUseOptimisticSetter, hydrationRouteProperties, Deferred, MemoizedDataRoutes, AwaitErrorBoundary, createRoutesFromElements, defaultMethod, defaultEncType, _formDataSupportsSubmitter, supportedFormEncTypes, HOLE, NAN, NEGATIVE_INFINITY, NEGATIVE_ZERO, NULL, POSITIVE_INFINITY, UNDEFINED, TYPE_BIGINT, TYPE_DATE, TYPE_ERROR, TYPE_MAP, TYPE_NULL_OBJECT, TYPE_PROMISE, TYPE_REGEXP, TYPE_SET, TYPE_SYMBOL, TYPE_URL, TYPE_PREVIOUS_RESOLVED, SUPPORTED_ERROR_TYPES, Deferred2, TIME_LIMIT_MS, getNow, yieldToMain, objectProtoNames2, globalObj, ESCAPE_LOOKUP, ESCAPE_REGEX, SingleFetchRedirectSymbol, SingleFetchNoResultError, SINGLE_FETCH_REDIRECT_STATUS, NO_BODY_STATUS_CODES, _isPreloadSupported, nextPaths, discoveredPathsMaxSize, discoveredPaths, URL_LIMIT, MANIFEST_VERSION_STORAGE_KEY, FrameworkContext, CRITICAL_CSS_DATA_ATTRIBUTE, isHydrated, RemixErrorBoundary, isBrowser2, ABSOLUTE_URL_REGEX2, Link, NavLink, Form, fetcherId, getUniqueFetcherId, SCROLL_RESTORATION_STORAGE_KEY, savedScrollPositions, ABSOLUTE_URL_REGEX3;
|
|
10510
10517
|
var init_chunk_5KNZJZUH = __esm({
|
|
10511
10518
|
"node_modules/.pnpm/react-router@7.15.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-router/dist/development/chunk-5KNZJZUH.mjs"() {
|
|
10512
10519
|
__typeError = (msg) => {
|
|
@@ -10516,12 +10523,12 @@ var init_chunk_5KNZJZUH = __esm({
|
|
|
10516
10523
|
__privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
10517
10524
|
__privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10518
10525
|
__privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
return
|
|
10524
|
-
})(
|
|
10526
|
+
Action2 = /* @__PURE__ */ ((Action22) => {
|
|
10527
|
+
Action22["Pop"] = "POP";
|
|
10528
|
+
Action22["Push"] = "PUSH";
|
|
10529
|
+
Action22["Replace"] = "REPLACE";
|
|
10530
|
+
return Action22;
|
|
10531
|
+
})(Action2 || {});
|
|
10525
10532
|
PopStateEventType = "popstate";
|
|
10526
10533
|
RouterContextProvider = class {
|
|
10527
10534
|
/**
|
|
@@ -15146,7 +15153,7 @@ var init_dom_export = __esm({
|
|
|
15146
15153
|
ssrInfo = null;
|
|
15147
15154
|
router = null;
|
|
15148
15155
|
defaultManifestPath2 = "/__manifest";
|
|
15149
|
-
renderedRoutesContext =
|
|
15156
|
+
renderedRoutesContext = createContext6();
|
|
15150
15157
|
nextPaths2 = /* @__PURE__ */ new Set();
|
|
15151
15158
|
discoveredPathsMaxSize2 = 1e3;
|
|
15152
15159
|
discoveredPaths2 = /* @__PURE__ */ new Set();
|
|
@@ -15169,7 +15176,7 @@ __export(development_exports, {
|
|
|
15169
15176
|
Meta: () => Meta,
|
|
15170
15177
|
NavLink: () => NavLink,
|
|
15171
15178
|
Navigate: () => Navigate,
|
|
15172
|
-
NavigationType: () =>
|
|
15179
|
+
NavigationType: () => Action2,
|
|
15173
15180
|
Outlet: () => Outlet,
|
|
15174
15181
|
PrefetchPageLinks: () => PrefetchPageLinks,
|
|
15175
15182
|
Route: () => Route,
|
|
@@ -15220,7 +15227,7 @@ __export(development_exports, {
|
|
|
15220
15227
|
UNSAFE_withErrorBoundaryProps: () => withErrorBoundaryProps,
|
|
15221
15228
|
UNSAFE_withHydrateFallbackProps: () => withHydrateFallbackProps,
|
|
15222
15229
|
createBrowserRouter: () => createBrowserRouter,
|
|
15223
|
-
createContext: () =>
|
|
15230
|
+
createContext: () => createContext6,
|
|
15224
15231
|
createCookie: () => createCookie,
|
|
15225
15232
|
createCookieSessionStorage: () => createCookieSessionStorage,
|
|
15226
15233
|
createHashRouter: () => createHashRouter,
|
|
@@ -15325,6 +15332,225 @@ var require_dist2 = __commonJS({
|
|
|
15325
15332
|
__reExport(index_exports, (init_development(), __toCommonJS(development_exports)), module.exports);
|
|
15326
15333
|
}
|
|
15327
15334
|
});
|
|
15335
|
+
function cn(...inputs) {
|
|
15336
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
15337
|
+
}
|
|
15338
|
+
|
|
15339
|
+
// src/components/dialog/dialogVariants.ts
|
|
15340
|
+
var dialogOverlayClass = "fixed inset-0 z-50 bg-foreground/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
|
|
15341
|
+
var dialogContentClass = "fixed start-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border border-border bg-background p-6 text-foreground shadow-lg outline-none rtl:translate-x-1/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";
|
|
15342
|
+
var dialogHeaderClass = "flex flex-col gap-1.5 text-start";
|
|
15343
|
+
var dialogTitleClass = "text-lg font-semibold text-foreground";
|
|
15344
|
+
var dialogDescriptionClass = "text-sm text-muted-foreground";
|
|
15345
|
+
var dialogFooterClass = "flex flex-col-reverse gap-2 sm:flex-row sm:items-center sm:justify-end";
|
|
15346
|
+
var dialogCloseButtonClass = "absolute end-4 top-4 inline-flex size-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none";
|
|
15347
|
+
var AlertDialog = RadixAlertDialog__namespace.Root;
|
|
15348
|
+
var AlertDialogTrigger = RadixAlertDialog__namespace.Trigger;
|
|
15349
|
+
var AlertDialogPortal = RadixAlertDialog__namespace.Portal;
|
|
15350
|
+
var AlertDialogAction = RadixAlertDialog__namespace.Action;
|
|
15351
|
+
var AlertDialogCancel = RadixAlertDialog__namespace.Cancel;
|
|
15352
|
+
var AlertDialogOverlay = React10.forwardRef(function AlertDialogOverlay2({ className, ...props }, ref) {
|
|
15353
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15354
|
+
RadixAlertDialog__namespace.Overlay,
|
|
15355
|
+
{
|
|
15356
|
+
ref,
|
|
15357
|
+
"data-slot": "alert-dialog-overlay",
|
|
15358
|
+
className: cn(dialogOverlayClass, className),
|
|
15359
|
+
...props
|
|
15360
|
+
}
|
|
15361
|
+
);
|
|
15362
|
+
});
|
|
15363
|
+
var AlertDialogContent = React10.forwardRef(function AlertDialogContent2({ className, ...props }, ref) {
|
|
15364
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadixAlertDialog__namespace.Portal, { children: [
|
|
15365
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
15366
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15367
|
+
RadixAlertDialog__namespace.Content,
|
|
15368
|
+
{
|
|
15369
|
+
ref,
|
|
15370
|
+
"data-slot": "alert-dialog-content",
|
|
15371
|
+
className: cn(dialogContentClass, className),
|
|
15372
|
+
...props
|
|
15373
|
+
}
|
|
15374
|
+
)
|
|
15375
|
+
] });
|
|
15376
|
+
});
|
|
15377
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
15378
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-dialog-header", className: cn(dialogHeaderClass, className), ...props });
|
|
15379
|
+
}
|
|
15380
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
15381
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-dialog-footer", className: cn(dialogFooterClass, className), ...props });
|
|
15382
|
+
}
|
|
15383
|
+
var AlertDialogTitle = React10.forwardRef(function AlertDialogTitle2({ className, ...props }, ref) {
|
|
15384
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15385
|
+
RadixAlertDialog__namespace.Title,
|
|
15386
|
+
{
|
|
15387
|
+
ref,
|
|
15388
|
+
"data-slot": "alert-dialog-title",
|
|
15389
|
+
className: cn(dialogTitleClass, className),
|
|
15390
|
+
...props
|
|
15391
|
+
}
|
|
15392
|
+
);
|
|
15393
|
+
});
|
|
15394
|
+
var AlertDialogDescription = React10.forwardRef(function AlertDialogDescription2({ className, ...props }, ref) {
|
|
15395
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15396
|
+
RadixAlertDialog__namespace.Description,
|
|
15397
|
+
{
|
|
15398
|
+
ref,
|
|
15399
|
+
"data-slot": "alert-dialog-description",
|
|
15400
|
+
className: cn(dialogDescriptionClass, className),
|
|
15401
|
+
...props
|
|
15402
|
+
}
|
|
15403
|
+
);
|
|
15404
|
+
});
|
|
15405
|
+
|
|
15406
|
+
// src/components/button/buttonVariants.ts
|
|
15407
|
+
var buttonVariantClass = {
|
|
15408
|
+
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 focus-visible:ring-primary/40",
|
|
15409
|
+
secondary: "bg-muted text-foreground hover:bg-muted/80 focus-visible:ring-muted-foreground/30",
|
|
15410
|
+
outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/40",
|
|
15411
|
+
ghost: "bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/40",
|
|
15412
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 focus-visible:ring-destructive/40",
|
|
15413
|
+
success: "bg-success text-success-foreground shadow-sm hover:bg-success/90 focus-visible:ring-success/40",
|
|
15414
|
+
warning: "bg-warning text-warning-foreground shadow-sm hover:bg-warning/90 focus-visible:ring-warning/40",
|
|
15415
|
+
link: "text-primary underline-offset-4 hover:underline focus-visible:ring-primary/40 px-0 shadow-none"
|
|
15416
|
+
};
|
|
15417
|
+
var buttonSizeClass = {
|
|
15418
|
+
sm: "h-8 gap-1.5 rounded-md px-3 text-sm",
|
|
15419
|
+
md: "h-9 gap-2 rounded-md px-4 text-sm",
|
|
15420
|
+
lg: "h-11 gap-2.5 rounded-md px-6 text-base",
|
|
15421
|
+
icon: "h-9 w-9 shrink-0 rounded-md p-0",
|
|
15422
|
+
"icon-sm": "h-8 w-8 shrink-0 rounded-md p-0"
|
|
15423
|
+
};
|
|
15424
|
+
var buttonBaseClass = "group/button relative inline-flex items-center justify-center font-medium select-none whitespace-nowrap outline-none transition-[background-color,color,box-shadow,opacity] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
15425
|
+
var Button = React10.forwardRef(function Button2({
|
|
15426
|
+
variant = "primary",
|
|
15427
|
+
size = "md",
|
|
15428
|
+
loading = false,
|
|
15429
|
+
loadingText,
|
|
15430
|
+
leadingIcon,
|
|
15431
|
+
trailingIcon,
|
|
15432
|
+
fullWidth = false,
|
|
15433
|
+
asChild = false,
|
|
15434
|
+
type,
|
|
15435
|
+
disabled,
|
|
15436
|
+
className,
|
|
15437
|
+
children,
|
|
15438
|
+
...props
|
|
15439
|
+
}, ref) {
|
|
15440
|
+
const isDisabled = disabled || loading;
|
|
15441
|
+
const composedClass = cn(
|
|
15442
|
+
buttonBaseClass,
|
|
15443
|
+
buttonVariantClass[variant],
|
|
15444
|
+
buttonSizeClass[size],
|
|
15445
|
+
fullWidth && "w-full",
|
|
15446
|
+
className
|
|
15447
|
+
);
|
|
15448
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15449
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : leadingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: leadingIcon }) : null,
|
|
15450
|
+
loading && loadingText !== void 0 ? loadingText : children,
|
|
15451
|
+
!loading && trailingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: trailingIcon }) : null
|
|
15452
|
+
] });
|
|
15453
|
+
if (asChild) {
|
|
15454
|
+
const child = React10.Children.only(children);
|
|
15455
|
+
if (!React10.isValidElement(child)) {
|
|
15456
|
+
throw new Error("Button: `asChild` requires a single valid React element as a child.");
|
|
15457
|
+
}
|
|
15458
|
+
const mergedClassName = cn(composedClass, child.props.className);
|
|
15459
|
+
return React10.cloneElement(child, {
|
|
15460
|
+
...child.props,
|
|
15461
|
+
className: mergedClassName,
|
|
15462
|
+
"aria-disabled": isDisabled ? true : void 0,
|
|
15463
|
+
"data-loading": loading ? "true" : void 0,
|
|
15464
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15465
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : leadingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: leadingIcon }) : null,
|
|
15466
|
+
loading && loadingText !== void 0 ? loadingText : child.props.children,
|
|
15467
|
+
!loading && trailingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: trailingIcon }) : null
|
|
15468
|
+
] })
|
|
15469
|
+
});
|
|
15470
|
+
}
|
|
15471
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15472
|
+
"button",
|
|
15473
|
+
{
|
|
15474
|
+
ref,
|
|
15475
|
+
type: type ?? "button",
|
|
15476
|
+
disabled: isDisabled,
|
|
15477
|
+
"data-loading": loading ? "true" : void 0,
|
|
15478
|
+
className: composedClass,
|
|
15479
|
+
...props,
|
|
15480
|
+
children: content
|
|
15481
|
+
}
|
|
15482
|
+
);
|
|
15483
|
+
});
|
|
15484
|
+
function Slot({ children }) {
|
|
15485
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "inline-flex h-4 w-4 items-center justify-center", children });
|
|
15486
|
+
}
|
|
15487
|
+
function Spinner() {
|
|
15488
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { "aria-hidden": "true", className: "h-4 w-4 animate-spin", "data-testid": "button-spinner" });
|
|
15489
|
+
}
|
|
15490
|
+
var ConfirmDialogContext = React10.createContext(null);
|
|
15491
|
+
function ConfirmDialogProvider({ labels, children }) {
|
|
15492
|
+
const [pending, setPending] = React10.useState(null);
|
|
15493
|
+
const pendingRef = React10.useRef(null);
|
|
15494
|
+
pendingRef.current = pending;
|
|
15495
|
+
const confirm = React10.useCallback((options) => {
|
|
15496
|
+
return new Promise((resolve) => {
|
|
15497
|
+
const prior = pendingRef.current;
|
|
15498
|
+
if (prior) {
|
|
15499
|
+
prior.resolve(false);
|
|
15500
|
+
}
|
|
15501
|
+
setPending({ options, resolve });
|
|
15502
|
+
});
|
|
15503
|
+
}, []);
|
|
15504
|
+
const resolveWith = React10.useCallback((value) => {
|
|
15505
|
+
const current = pendingRef.current;
|
|
15506
|
+
if (!current) return;
|
|
15507
|
+
current.resolve(value);
|
|
15508
|
+
setPending(null);
|
|
15509
|
+
}, []);
|
|
15510
|
+
const confirmLabel = pending?.options.confirmLabel ?? labels?.confirm ?? "Confirm";
|
|
15511
|
+
const cancelLabel = pending?.options.cancelLabel ?? labels?.cancel ?? "Cancel";
|
|
15512
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ConfirmDialogContext.Provider, { value: confirm, children: [
|
|
15513
|
+
children,
|
|
15514
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15515
|
+
AlertDialog,
|
|
15516
|
+
{
|
|
15517
|
+
open: pending !== null,
|
|
15518
|
+
onOpenChange: (open) => {
|
|
15519
|
+
if (!open) resolveWith(false);
|
|
15520
|
+
},
|
|
15521
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { children: [
|
|
15522
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { children: [
|
|
15523
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { children: pending?.options.title }),
|
|
15524
|
+
pending?.options.description !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(AlertDialogDescription, { children: pending.options.description }) : (
|
|
15525
|
+
// Radix logs a warning when AlertDialogDescription is missing —
|
|
15526
|
+
// always render a node even if the consumer didn't supply text.
|
|
15527
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogDescription, { className: "sr-only", children: pending?.options.title })
|
|
15528
|
+
)
|
|
15529
|
+
] }),
|
|
15530
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogFooter, { children: [
|
|
15531
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "outline", onClick: () => resolveWith(false), children: cancelLabel }) }),
|
|
15532
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15533
|
+
Button,
|
|
15534
|
+
{
|
|
15535
|
+
type: "button",
|
|
15536
|
+
variant: pending?.options.destructive ? "destructive" : "primary",
|
|
15537
|
+
onClick: () => resolveWith(true),
|
|
15538
|
+
children: confirmLabel
|
|
15539
|
+
}
|
|
15540
|
+
) })
|
|
15541
|
+
] })
|
|
15542
|
+
] })
|
|
15543
|
+
}
|
|
15544
|
+
)
|
|
15545
|
+
] });
|
|
15546
|
+
}
|
|
15547
|
+
function useConfirm() {
|
|
15548
|
+
const fn = React10.useContext(ConfirmDialogContext);
|
|
15549
|
+
if (!fn) {
|
|
15550
|
+
throw new Error("useConfirm() must be used inside <ConfirmDialogProvider>");
|
|
15551
|
+
}
|
|
15552
|
+
return React10.useMemo(() => fn, [fn]);
|
|
15553
|
+
}
|
|
15328
15554
|
function readDocumentDirection() {
|
|
15329
15555
|
if (typeof document === "undefined") return "ltr";
|
|
15330
15556
|
const dir = document.documentElement.getAttribute("dir");
|
|
@@ -15353,9 +15579,6 @@ function useDashboardLayout() {
|
|
|
15353
15579
|
}
|
|
15354
15580
|
return ctx;
|
|
15355
15581
|
}
|
|
15356
|
-
function cn(...inputs) {
|
|
15357
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
15358
|
-
}
|
|
15359
15582
|
function DashboardContent({ className, children, ...props }) {
|
|
15360
15583
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15361
15584
|
"main",
|
|
@@ -15453,91 +15676,6 @@ function DashboardHeader({ className, children, ...props }) {
|
|
|
15453
15676
|
function HeaderActions({ className, children, ...props }) {
|
|
15454
15677
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("ms-auto flex items-center gap-1", className), ...props, children });
|
|
15455
15678
|
}
|
|
15456
|
-
|
|
15457
|
-
// src/components/button/buttonVariants.ts
|
|
15458
|
-
var buttonVariantClass = {
|
|
15459
|
-
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 focus-visible:ring-primary/40",
|
|
15460
|
-
secondary: "bg-muted text-foreground hover:bg-muted/80 focus-visible:ring-muted-foreground/30",
|
|
15461
|
-
outline: "border border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/40",
|
|
15462
|
-
ghost: "bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring/40",
|
|
15463
|
-
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 focus-visible:ring-destructive/40",
|
|
15464
|
-
success: "bg-success text-success-foreground shadow-sm hover:bg-success/90 focus-visible:ring-success/40",
|
|
15465
|
-
warning: "bg-warning text-warning-foreground shadow-sm hover:bg-warning/90 focus-visible:ring-warning/40",
|
|
15466
|
-
link: "text-primary underline-offset-4 hover:underline focus-visible:ring-primary/40 px-0 shadow-none"
|
|
15467
|
-
};
|
|
15468
|
-
var buttonSizeClass = {
|
|
15469
|
-
sm: "h-8 gap-1.5 rounded-md px-3 text-sm",
|
|
15470
|
-
md: "h-9 gap-2 rounded-md px-4 text-sm",
|
|
15471
|
-
lg: "h-11 gap-2.5 rounded-md px-6 text-base",
|
|
15472
|
-
icon: "h-9 w-9 shrink-0 rounded-md p-0",
|
|
15473
|
-
"icon-sm": "h-8 w-8 shrink-0 rounded-md p-0"
|
|
15474
|
-
};
|
|
15475
|
-
var buttonBaseClass = "group/button relative inline-flex items-center justify-center font-medium select-none whitespace-nowrap outline-none transition-[background-color,color,box-shadow,opacity] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
15476
|
-
var Button = React10.forwardRef(function Button2({
|
|
15477
|
-
variant = "primary",
|
|
15478
|
-
size = "md",
|
|
15479
|
-
loading = false,
|
|
15480
|
-
loadingText,
|
|
15481
|
-
leadingIcon,
|
|
15482
|
-
trailingIcon,
|
|
15483
|
-
fullWidth = false,
|
|
15484
|
-
asChild = false,
|
|
15485
|
-
type,
|
|
15486
|
-
disabled,
|
|
15487
|
-
className,
|
|
15488
|
-
children,
|
|
15489
|
-
...props
|
|
15490
|
-
}, ref) {
|
|
15491
|
-
const isDisabled = disabled || loading;
|
|
15492
|
-
const composedClass = cn(
|
|
15493
|
-
buttonBaseClass,
|
|
15494
|
-
buttonVariantClass[variant],
|
|
15495
|
-
buttonSizeClass[size],
|
|
15496
|
-
fullWidth && "w-full",
|
|
15497
|
-
className
|
|
15498
|
-
);
|
|
15499
|
-
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15500
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : leadingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: leadingIcon }) : null,
|
|
15501
|
-
loading && loadingText !== void 0 ? loadingText : children,
|
|
15502
|
-
!loading && trailingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: trailingIcon }) : null
|
|
15503
|
-
] });
|
|
15504
|
-
if (asChild) {
|
|
15505
|
-
const child = React10.Children.only(children);
|
|
15506
|
-
if (!React10.isValidElement(child)) {
|
|
15507
|
-
throw new Error("Button: `asChild` requires a single valid React element as a child.");
|
|
15508
|
-
}
|
|
15509
|
-
const mergedClassName = cn(composedClass, child.props.className);
|
|
15510
|
-
return React10.cloneElement(child, {
|
|
15511
|
-
...child.props,
|
|
15512
|
-
className: mergedClassName,
|
|
15513
|
-
"aria-disabled": isDisabled ? true : void 0,
|
|
15514
|
-
"data-loading": loading ? "true" : void 0,
|
|
15515
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15516
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : leadingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: leadingIcon }) : null,
|
|
15517
|
-
loading && loadingText !== void 0 ? loadingText : child.props.children,
|
|
15518
|
-
!loading && trailingIcon ? /* @__PURE__ */ jsxRuntime.jsx(Slot, { children: trailingIcon }) : null
|
|
15519
|
-
] })
|
|
15520
|
-
});
|
|
15521
|
-
}
|
|
15522
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15523
|
-
"button",
|
|
15524
|
-
{
|
|
15525
|
-
ref,
|
|
15526
|
-
type: type ?? "button",
|
|
15527
|
-
disabled: isDisabled,
|
|
15528
|
-
"data-loading": loading ? "true" : void 0,
|
|
15529
|
-
className: composedClass,
|
|
15530
|
-
...props,
|
|
15531
|
-
children: content
|
|
15532
|
-
}
|
|
15533
|
-
);
|
|
15534
|
-
});
|
|
15535
|
-
function Slot({ children }) {
|
|
15536
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "inline-flex h-4 w-4 items-center justify-center", children });
|
|
15537
|
-
}
|
|
15538
|
-
function Spinner() {
|
|
15539
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { "aria-hidden": "true", className: "h-4 w-4 animate-spin", "data-testid": "button-spinner" });
|
|
15540
|
-
}
|
|
15541
15679
|
function HeaderCollapseTrigger({
|
|
15542
15680
|
icon,
|
|
15543
15681
|
className,
|
|
@@ -16374,91 +16512,11 @@ function readDocumentLocale() {
|
|
|
16374
16512
|
return lang || void 0;
|
|
16375
16513
|
}
|
|
16376
16514
|
|
|
16377
|
-
// src/components/
|
|
16378
|
-
var
|
|
16379
|
-
|
|
16380
|
-
|
|
16381
|
-
|
|
16382
|
-
destructive: "text-destructive data-[highlighted]:bg-destructive data-[highlighted]:text-destructive-foreground"
|
|
16383
|
-
};
|
|
16384
|
-
var dropdownMenuItemInsetClass = "ps-8";
|
|
16385
|
-
var dropdownMenuSeparatorClass = "-mx-1 my-1 h-px bg-border";
|
|
16386
|
-
var dropdownMenuLabelClass = "px-2 py-1.5 text-xs font-semibold text-muted-foreground select-none";
|
|
16387
|
-
var dropdownMenuShortcutClass = "ms-auto text-xs tracking-widest text-muted-foreground";
|
|
16388
|
-
var DropdownMenu = RadixDropdown__namespace.Root;
|
|
16389
|
-
var DropdownMenuTrigger = RadixDropdown__namespace.Trigger;
|
|
16390
|
-
var DropdownMenuGroup = RadixDropdown__namespace.Group;
|
|
16391
|
-
var DropdownMenuPortal = RadixDropdown__namespace.Portal;
|
|
16392
|
-
var DropdownMenuContent = React10.forwardRef(function DropdownMenuContent2({ className, sideOffset = 4, ...props }, ref) {
|
|
16393
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RadixDropdown__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16394
|
-
RadixDropdown__namespace.Content,
|
|
16395
|
-
{
|
|
16396
|
-
ref,
|
|
16397
|
-
sideOffset,
|
|
16398
|
-
"data-slot": "dropdown-menu-content",
|
|
16399
|
-
className: cn(dropdownMenuContentClass, className),
|
|
16400
|
-
...props
|
|
16401
|
-
}
|
|
16402
|
-
) });
|
|
16403
|
-
});
|
|
16404
|
-
var DropdownMenuItem = React10.forwardRef(function DropdownMenuItem2({ className, variant = "default", inset = false, ...props }, ref) {
|
|
16405
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16406
|
-
RadixDropdown__namespace.Item,
|
|
16407
|
-
{
|
|
16408
|
-
ref,
|
|
16409
|
-
"data-slot": "dropdown-menu-item",
|
|
16410
|
-
"data-variant": variant,
|
|
16411
|
-
className: cn(
|
|
16412
|
-
dropdownMenuItemBaseClass,
|
|
16413
|
-
dropdownMenuItemVariantClass[variant],
|
|
16414
|
-
inset && dropdownMenuItemInsetClass,
|
|
16415
|
-
className
|
|
16416
|
-
),
|
|
16417
|
-
...props
|
|
16418
|
-
}
|
|
16419
|
-
);
|
|
16420
|
-
});
|
|
16421
|
-
var DropdownMenuSeparator = React10.forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
|
|
16422
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16423
|
-
RadixDropdown__namespace.Separator,
|
|
16424
|
-
{
|
|
16425
|
-
ref,
|
|
16426
|
-
"data-slot": "dropdown-menu-separator",
|
|
16427
|
-
className: cn(dropdownMenuSeparatorClass, className),
|
|
16428
|
-
...props
|
|
16429
|
-
}
|
|
16430
|
-
);
|
|
16431
|
-
});
|
|
16432
|
-
var DropdownMenuLabel = React10.forwardRef(function DropdownMenuLabel2({ className, inset = false, ...props }, ref) {
|
|
16433
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16434
|
-
RadixDropdown__namespace.Label,
|
|
16435
|
-
{
|
|
16436
|
-
ref,
|
|
16437
|
-
"data-slot": "dropdown-menu-label",
|
|
16438
|
-
className: cn(dropdownMenuLabelClass, inset && dropdownMenuItemInsetClass, className),
|
|
16439
|
-
...props
|
|
16440
|
-
}
|
|
16441
|
-
);
|
|
16442
|
-
});
|
|
16443
|
-
var DropdownMenuShortcut = React10.forwardRef(
|
|
16444
|
-
function DropdownMenuShortcut2({ className, ...props }, ref) {
|
|
16445
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16446
|
-
"span",
|
|
16447
|
-
{
|
|
16448
|
-
ref,
|
|
16449
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
16450
|
-
className: cn(dropdownMenuShortcutClass, className),
|
|
16451
|
-
...props
|
|
16452
|
-
}
|
|
16453
|
-
);
|
|
16454
|
-
}
|
|
16455
|
-
);
|
|
16456
|
-
|
|
16457
|
-
// src/components/empty-state/emptyStateVariants.ts
|
|
16458
|
-
var emptyStateContainerSizeClass = {
|
|
16459
|
-
sm: "py-8 gap-2",
|
|
16460
|
-
md: "py-14 gap-3",
|
|
16461
|
-
lg: "py-20 gap-4"
|
|
16515
|
+
// src/components/empty-state/emptyStateVariants.ts
|
|
16516
|
+
var emptyStateContainerSizeClass = {
|
|
16517
|
+
sm: "py-8 gap-2",
|
|
16518
|
+
md: "py-14 gap-3",
|
|
16519
|
+
lg: "py-20 gap-4"
|
|
16462
16520
|
};
|
|
16463
16521
|
var emptyStateIconWrapperSizeClass = {
|
|
16464
16522
|
sm: "size-10 [&_svg]:size-5",
|
|
@@ -16533,6 +16591,294 @@ var EmptyState = React10.forwardRef(function EmptyState2({ icon, title, descript
|
|
|
16533
16591
|
}
|
|
16534
16592
|
);
|
|
16535
16593
|
});
|
|
16594
|
+
|
|
16595
|
+
// src/components/page-header/PageHeader.tsx
|
|
16596
|
+
var import_react_router_dom2 = __toESM(require_dist2());
|
|
16597
|
+
|
|
16598
|
+
// src/components/page-header/pageHeaderVariants.ts
|
|
16599
|
+
var pageHeaderBaseClass = "flex w-full flex-col gap-3";
|
|
16600
|
+
var pageHeaderBorderedClass = "border-b border-border pb-4";
|
|
16601
|
+
var pageHeaderTitleRowClass = "flex flex-wrap items-start justify-between gap-3 sm:gap-4";
|
|
16602
|
+
var pageHeaderTitleBlockClass = "min-w-0 flex-1 space-y-1";
|
|
16603
|
+
var pageHeaderTitleClass = "text-2xl font-semibold tracking-tight text-foreground";
|
|
16604
|
+
var pageHeaderDescriptionClass = "text-sm text-muted-foreground";
|
|
16605
|
+
var pageHeaderActionsClass = "flex shrink-0 flex-wrap items-center gap-2";
|
|
16606
|
+
var pageHeaderBackClass = "inline-flex items-center gap-1.5 self-start text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-md";
|
|
16607
|
+
var pageHeaderBackIconClass = "size-4 shrink-0 rtl:rotate-180";
|
|
16608
|
+
var pageHeaderBreadcrumbsClass = "text-xs text-muted-foreground";
|
|
16609
|
+
var PageHeader = React10.forwardRef(function PageHeader2({
|
|
16610
|
+
title,
|
|
16611
|
+
description,
|
|
16612
|
+
breadcrumbs,
|
|
16613
|
+
back,
|
|
16614
|
+
actions,
|
|
16615
|
+
as = "h1",
|
|
16616
|
+
bordered = false,
|
|
16617
|
+
className,
|
|
16618
|
+
...props
|
|
16619
|
+
}, ref) {
|
|
16620
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16621
|
+
"header",
|
|
16622
|
+
{
|
|
16623
|
+
ref,
|
|
16624
|
+
"data-slot": "page-header",
|
|
16625
|
+
className: cn(pageHeaderBaseClass, bordered && pageHeaderBorderedClass, className),
|
|
16626
|
+
...props,
|
|
16627
|
+
children: [
|
|
16628
|
+
breadcrumbs ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "page-header-breadcrumbs", className: pageHeaderBreadcrumbsClass, children: breadcrumbs }) : null,
|
|
16629
|
+
back ? /* @__PURE__ */ jsxRuntime.jsx(PageHeaderBack, { ...back }) : null,
|
|
16630
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "page-header-row", className: pageHeaderTitleRowClass, children: [
|
|
16631
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: pageHeaderTitleBlockClass, children: [
|
|
16632
|
+
React10.createElement(
|
|
16633
|
+
as,
|
|
16634
|
+
{ "data-slot": "page-header-title", className: pageHeaderTitleClass },
|
|
16635
|
+
title
|
|
16636
|
+
),
|
|
16637
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "page-header-description", className: pageHeaderDescriptionClass, children: description }) : null
|
|
16638
|
+
] }),
|
|
16639
|
+
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "page-header-actions", className: pageHeaderActionsClass, children: actions }) : null
|
|
16640
|
+
] })
|
|
16641
|
+
]
|
|
16642
|
+
}
|
|
16643
|
+
);
|
|
16644
|
+
});
|
|
16645
|
+
function PageHeaderBack({ label = "Back", to, onClick, render }) {
|
|
16646
|
+
const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16647
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: pageHeaderBackIconClass, "aria-hidden": "true" }),
|
|
16648
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
16649
|
+
] });
|
|
16650
|
+
if (render) {
|
|
16651
|
+
return render({
|
|
16652
|
+
to,
|
|
16653
|
+
onClick,
|
|
16654
|
+
className: pageHeaderBackClass,
|
|
16655
|
+
children: inner
|
|
16656
|
+
});
|
|
16657
|
+
}
|
|
16658
|
+
if (to) {
|
|
16659
|
+
return /* @__PURE__ */ jsxRuntime.jsx(import_react_router_dom2.Link, { to, onClick, className: pageHeaderBackClass, children: inner });
|
|
16660
|
+
}
|
|
16661
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick, className: pageHeaderBackClass, children: inner });
|
|
16662
|
+
}
|
|
16663
|
+
|
|
16664
|
+
// src/components/detail-page/detailPageVariants.ts
|
|
16665
|
+
var detailPageBaseClass = "flex w-full flex-col gap-6";
|
|
16666
|
+
var detailPageBodyClass = "flex flex-col gap-6";
|
|
16667
|
+
var detailPageSkeletonRowClass = "h-5 w-full animate-pulse rounded-md bg-muted";
|
|
16668
|
+
var detailPageEmptyClass = "rounded-md border border-border bg-card";
|
|
16669
|
+
var DEFAULT_LABELS = {
|
|
16670
|
+
notFoundTitle: "Not found",
|
|
16671
|
+
notFoundDescription: "The record you\u2019re looking for does not exist or has been removed."
|
|
16672
|
+
};
|
|
16673
|
+
var DEFAULT_SKELETON_ROW_COUNT = 6;
|
|
16674
|
+
function DetailPage({
|
|
16675
|
+
title,
|
|
16676
|
+
description,
|
|
16677
|
+
back,
|
|
16678
|
+
actions,
|
|
16679
|
+
bordered = true,
|
|
16680
|
+
isLoading = false,
|
|
16681
|
+
loadingRowCount = DEFAULT_SKELETON_ROW_COUNT,
|
|
16682
|
+
notFound = false,
|
|
16683
|
+
notFoundState,
|
|
16684
|
+
labels: labelsProp,
|
|
16685
|
+
children,
|
|
16686
|
+
className,
|
|
16687
|
+
bodyClassName
|
|
16688
|
+
}) {
|
|
16689
|
+
const labels = { ...DEFAULT_LABELS, ...labelsProp };
|
|
16690
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16691
|
+
"div",
|
|
16692
|
+
{
|
|
16693
|
+
"data-slot": "detail-page",
|
|
16694
|
+
"data-state": isLoading ? "loading" : notFound ? "not-found" : "ready",
|
|
16695
|
+
"aria-busy": isLoading || void 0,
|
|
16696
|
+
className: cn(detailPageBaseClass, className),
|
|
16697
|
+
children: [
|
|
16698
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16699
|
+
PageHeader,
|
|
16700
|
+
{
|
|
16701
|
+
title,
|
|
16702
|
+
description,
|
|
16703
|
+
back,
|
|
16704
|
+
actions,
|
|
16705
|
+
bordered
|
|
16706
|
+
}
|
|
16707
|
+
),
|
|
16708
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(DetailPageSkeleton, { rowCount: loadingRowCount }) : notFound ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "detail-page-empty", "data-state": "not-found", className: detailPageEmptyClass, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16709
|
+
EmptyState,
|
|
16710
|
+
{
|
|
16711
|
+
size: "lg",
|
|
16712
|
+
icon: notFoundState?.icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileQuestion, {}),
|
|
16713
|
+
title: notFoundState?.title ?? labels.notFoundTitle,
|
|
16714
|
+
description: notFoundState?.description ?? labels.notFoundDescription,
|
|
16715
|
+
action: notFoundState?.action ?? null
|
|
16716
|
+
}
|
|
16717
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "detail-page-body", className: cn(detailPageBodyClass, bodyClassName), children })
|
|
16718
|
+
]
|
|
16719
|
+
}
|
|
16720
|
+
);
|
|
16721
|
+
}
|
|
16722
|
+
function DetailPageSkeleton({ rowCount }) {
|
|
16723
|
+
const rows = Array.from({ length: Math.max(1, rowCount) }, (_, i) => `detail-page-skeleton-${i}`);
|
|
16724
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4", "aria-hidden": "true", children: rows.map((key) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16725
|
+
"div",
|
|
16726
|
+
{
|
|
16727
|
+
"data-testid": "detail-page-skeleton-row",
|
|
16728
|
+
className: detailPageSkeletonRowClass
|
|
16729
|
+
},
|
|
16730
|
+
key
|
|
16731
|
+
)) });
|
|
16732
|
+
}
|
|
16733
|
+
var Dialog = RadixDialog__namespace.Root;
|
|
16734
|
+
var DialogTrigger = RadixDialog__namespace.Trigger;
|
|
16735
|
+
var DialogPortal = RadixDialog__namespace.Portal;
|
|
16736
|
+
var DialogClose = RadixDialog__namespace.Close;
|
|
16737
|
+
var DialogOverlay = React10.forwardRef(function DialogOverlay2({ className, ...props }, ref) {
|
|
16738
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16739
|
+
RadixDialog__namespace.Overlay,
|
|
16740
|
+
{
|
|
16741
|
+
ref,
|
|
16742
|
+
"data-slot": "dialog-overlay",
|
|
16743
|
+
className: cn(dialogOverlayClass, className),
|
|
16744
|
+
...props
|
|
16745
|
+
}
|
|
16746
|
+
);
|
|
16747
|
+
});
|
|
16748
|
+
var DialogContent = React10.forwardRef(function DialogContent2({ className, children, showCloseButton = true, closeLabel = "Close", ...props }, ref) {
|
|
16749
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadixDialog__namespace.Portal, { children: [
|
|
16750
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
16751
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16752
|
+
RadixDialog__namespace.Content,
|
|
16753
|
+
{
|
|
16754
|
+
ref,
|
|
16755
|
+
"data-slot": "dialog-content",
|
|
16756
|
+
className: cn(dialogContentClass, className),
|
|
16757
|
+
...props,
|
|
16758
|
+
children: [
|
|
16759
|
+
children,
|
|
16760
|
+
showCloseButton ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
16761
|
+
RadixDialog__namespace.Close,
|
|
16762
|
+
{
|
|
16763
|
+
"aria-label": closeLabel,
|
|
16764
|
+
"data-slot": "dialog-close-button",
|
|
16765
|
+
className: dialogCloseButtonClass,
|
|
16766
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4", "aria-hidden": "true" })
|
|
16767
|
+
}
|
|
16768
|
+
) : null
|
|
16769
|
+
]
|
|
16770
|
+
}
|
|
16771
|
+
)
|
|
16772
|
+
] });
|
|
16773
|
+
});
|
|
16774
|
+
function DialogHeader({ className, ...props }) {
|
|
16775
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "dialog-header", className: cn(dialogHeaderClass, className), ...props });
|
|
16776
|
+
}
|
|
16777
|
+
function DialogFooter({ className, ...props }) {
|
|
16778
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "dialog-footer", className: cn(dialogFooterClass, className), ...props });
|
|
16779
|
+
}
|
|
16780
|
+
var DialogTitle = React10.forwardRef(function DialogTitle2({ className, ...props }, ref) {
|
|
16781
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16782
|
+
RadixDialog__namespace.Title,
|
|
16783
|
+
{
|
|
16784
|
+
ref,
|
|
16785
|
+
"data-slot": "dialog-title",
|
|
16786
|
+
className: cn(dialogTitleClass, className),
|
|
16787
|
+
...props
|
|
16788
|
+
}
|
|
16789
|
+
);
|
|
16790
|
+
});
|
|
16791
|
+
var DialogDescription = React10.forwardRef(function DialogDescription2({ className, ...props }, ref) {
|
|
16792
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16793
|
+
RadixDialog__namespace.Description,
|
|
16794
|
+
{
|
|
16795
|
+
ref,
|
|
16796
|
+
"data-slot": "dialog-description",
|
|
16797
|
+
className: cn(dialogDescriptionClass, className),
|
|
16798
|
+
...props
|
|
16799
|
+
}
|
|
16800
|
+
);
|
|
16801
|
+
});
|
|
16802
|
+
|
|
16803
|
+
// src/components/dropdown-menu/dropdownMenuVariants.ts
|
|
16804
|
+
var dropdownMenuContentClass = "z-50 min-w-32 overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95";
|
|
16805
|
+
var dropdownMenuItemBaseClass = "relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0";
|
|
16806
|
+
var dropdownMenuItemVariantClass = {
|
|
16807
|
+
default: "text-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
16808
|
+
destructive: "text-destructive data-[highlighted]:bg-destructive data-[highlighted]:text-destructive-foreground"
|
|
16809
|
+
};
|
|
16810
|
+
var dropdownMenuItemInsetClass = "ps-8";
|
|
16811
|
+
var dropdownMenuSeparatorClass = "-mx-1 my-1 h-px bg-border";
|
|
16812
|
+
var dropdownMenuLabelClass = "px-2 py-1.5 text-xs font-semibold text-muted-foreground select-none";
|
|
16813
|
+
var dropdownMenuShortcutClass = "ms-auto text-xs tracking-widest text-muted-foreground";
|
|
16814
|
+
var DropdownMenu = RadixDropdown__namespace.Root;
|
|
16815
|
+
var DropdownMenuTrigger = RadixDropdown__namespace.Trigger;
|
|
16816
|
+
var DropdownMenuGroup = RadixDropdown__namespace.Group;
|
|
16817
|
+
var DropdownMenuPortal = RadixDropdown__namespace.Portal;
|
|
16818
|
+
var DropdownMenuContent = React10.forwardRef(function DropdownMenuContent2({ className, sideOffset = 4, ...props }, ref) {
|
|
16819
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RadixDropdown__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16820
|
+
RadixDropdown__namespace.Content,
|
|
16821
|
+
{
|
|
16822
|
+
ref,
|
|
16823
|
+
sideOffset,
|
|
16824
|
+
"data-slot": "dropdown-menu-content",
|
|
16825
|
+
className: cn(dropdownMenuContentClass, className),
|
|
16826
|
+
...props
|
|
16827
|
+
}
|
|
16828
|
+
) });
|
|
16829
|
+
});
|
|
16830
|
+
var DropdownMenuItem = React10.forwardRef(function DropdownMenuItem2({ className, variant = "default", inset = false, ...props }, ref) {
|
|
16831
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16832
|
+
RadixDropdown__namespace.Item,
|
|
16833
|
+
{
|
|
16834
|
+
ref,
|
|
16835
|
+
"data-slot": "dropdown-menu-item",
|
|
16836
|
+
"data-variant": variant,
|
|
16837
|
+
className: cn(
|
|
16838
|
+
dropdownMenuItemBaseClass,
|
|
16839
|
+
dropdownMenuItemVariantClass[variant],
|
|
16840
|
+
inset && dropdownMenuItemInsetClass,
|
|
16841
|
+
className
|
|
16842
|
+
),
|
|
16843
|
+
...props
|
|
16844
|
+
}
|
|
16845
|
+
);
|
|
16846
|
+
});
|
|
16847
|
+
var DropdownMenuSeparator = React10.forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
|
|
16848
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16849
|
+
RadixDropdown__namespace.Separator,
|
|
16850
|
+
{
|
|
16851
|
+
ref,
|
|
16852
|
+
"data-slot": "dropdown-menu-separator",
|
|
16853
|
+
className: cn(dropdownMenuSeparatorClass, className),
|
|
16854
|
+
...props
|
|
16855
|
+
}
|
|
16856
|
+
);
|
|
16857
|
+
});
|
|
16858
|
+
var DropdownMenuLabel = React10.forwardRef(function DropdownMenuLabel2({ className, inset = false, ...props }, ref) {
|
|
16859
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16860
|
+
RadixDropdown__namespace.Label,
|
|
16861
|
+
{
|
|
16862
|
+
ref,
|
|
16863
|
+
"data-slot": "dropdown-menu-label",
|
|
16864
|
+
className: cn(dropdownMenuLabelClass, inset && dropdownMenuItemInsetClass, className),
|
|
16865
|
+
...props
|
|
16866
|
+
}
|
|
16867
|
+
);
|
|
16868
|
+
});
|
|
16869
|
+
var DropdownMenuShortcut = React10.forwardRef(
|
|
16870
|
+
function DropdownMenuShortcut2({ className, ...props }, ref) {
|
|
16871
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16872
|
+
"span",
|
|
16873
|
+
{
|
|
16874
|
+
ref,
|
|
16875
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
16876
|
+
className: cn(dropdownMenuShortcutClass, className),
|
|
16877
|
+
...props
|
|
16878
|
+
}
|
|
16879
|
+
);
|
|
16880
|
+
}
|
|
16881
|
+
);
|
|
16536
16882
|
function Field(props) {
|
|
16537
16883
|
const formContext = reactHookForm.useFormContext();
|
|
16538
16884
|
if (props.name !== void 0) {
|
|
@@ -16662,81 +17008,12 @@ function mergeRefs2(...refs) {
|
|
|
16662
17008
|
};
|
|
16663
17009
|
}
|
|
16664
17010
|
|
|
16665
|
-
// src/components/page-header/PageHeader.tsx
|
|
16666
|
-
var import_react_router_dom2 = __toESM(require_dist2());
|
|
16667
|
-
|
|
16668
|
-
// src/components/page-header/pageHeaderVariants.ts
|
|
16669
|
-
var pageHeaderBaseClass = "flex w-full flex-col gap-3";
|
|
16670
|
-
var pageHeaderBorderedClass = "border-b border-border pb-4";
|
|
16671
|
-
var pageHeaderTitleRowClass = "flex flex-wrap items-start justify-between gap-3 sm:gap-4";
|
|
16672
|
-
var pageHeaderTitleBlockClass = "min-w-0 flex-1 space-y-1";
|
|
16673
|
-
var pageHeaderTitleClass = "text-2xl font-semibold tracking-tight text-foreground";
|
|
16674
|
-
var pageHeaderDescriptionClass = "text-sm text-muted-foreground";
|
|
16675
|
-
var pageHeaderActionsClass = "flex shrink-0 flex-wrap items-center gap-2";
|
|
16676
|
-
var pageHeaderBackClass = "inline-flex items-center gap-1.5 self-start text-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-md";
|
|
16677
|
-
var pageHeaderBackIconClass = "size-4 shrink-0 rtl:rotate-180";
|
|
16678
|
-
var pageHeaderBreadcrumbsClass = "text-xs text-muted-foreground";
|
|
16679
|
-
var PageHeader = React10.forwardRef(function PageHeader2({
|
|
16680
|
-
title,
|
|
16681
|
-
description,
|
|
16682
|
-
breadcrumbs,
|
|
16683
|
-
back,
|
|
16684
|
-
actions,
|
|
16685
|
-
as = "h1",
|
|
16686
|
-
bordered = false,
|
|
16687
|
-
className,
|
|
16688
|
-
...props
|
|
16689
|
-
}, ref) {
|
|
16690
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16691
|
-
"header",
|
|
16692
|
-
{
|
|
16693
|
-
ref,
|
|
16694
|
-
"data-slot": "page-header",
|
|
16695
|
-
className: cn(pageHeaderBaseClass, bordered && pageHeaderBorderedClass, className),
|
|
16696
|
-
...props,
|
|
16697
|
-
children: [
|
|
16698
|
-
breadcrumbs ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "page-header-breadcrumbs", className: pageHeaderBreadcrumbsClass, children: breadcrumbs }) : null,
|
|
16699
|
-
back ? /* @__PURE__ */ jsxRuntime.jsx(PageHeaderBack, { ...back }) : null,
|
|
16700
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "page-header-row", className: pageHeaderTitleRowClass, children: [
|
|
16701
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: pageHeaderTitleBlockClass, children: [
|
|
16702
|
-
React10.createElement(
|
|
16703
|
-
as,
|
|
16704
|
-
{ "data-slot": "page-header-title", className: pageHeaderTitleClass },
|
|
16705
|
-
title
|
|
16706
|
-
),
|
|
16707
|
-
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "page-header-description", className: pageHeaderDescriptionClass, children: description }) : null
|
|
16708
|
-
] }),
|
|
16709
|
-
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "page-header-actions", className: pageHeaderActionsClass, children: actions }) : null
|
|
16710
|
-
] })
|
|
16711
|
-
]
|
|
16712
|
-
}
|
|
16713
|
-
);
|
|
16714
|
-
});
|
|
16715
|
-
function PageHeaderBack({ label = "Back", to, onClick, render }) {
|
|
16716
|
-
const inner = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16717
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: pageHeaderBackIconClass, "aria-hidden": "true" }),
|
|
16718
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
16719
|
-
] });
|
|
16720
|
-
if (render) {
|
|
16721
|
-
return render({
|
|
16722
|
-
to,
|
|
16723
|
-
onClick,
|
|
16724
|
-
className: pageHeaderBackClass,
|
|
16725
|
-
children: inner
|
|
16726
|
-
});
|
|
16727
|
-
}
|
|
16728
|
-
if (to) {
|
|
16729
|
-
return /* @__PURE__ */ jsxRuntime.jsx(import_react_router_dom2.Link, { to, onClick, className: pageHeaderBackClass, children: inner });
|
|
16730
|
-
}
|
|
16731
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick, className: pageHeaderBackClass, children: inner });
|
|
16732
|
-
}
|
|
16733
|
-
|
|
16734
17011
|
// src/components/form-page/formPageVariants.ts
|
|
16735
17012
|
var formPageBaseClass = "flex w-full flex-col gap-6";
|
|
16736
17013
|
var formPageBodyClass = "flex-1";
|
|
16737
17014
|
var formPageActionsBarClass = "sticky bottom-0 -mx-6 -mb-6 mt-6 flex items-center justify-end gap-2 border-t border-border bg-background/95 px-6 py-3 backdrop-blur supports-[backdrop-filter]:bg-background/80";
|
|
16738
17015
|
var formPageSkeletonRowClass = "h-10 w-full animate-pulse rounded-md bg-muted";
|
|
16739
|
-
var
|
|
17016
|
+
var DEFAULT_SKELETON_ROW_COUNT2 = 6;
|
|
16740
17017
|
function FormPage({
|
|
16741
17018
|
title,
|
|
16742
17019
|
description,
|
|
@@ -16744,7 +17021,7 @@ function FormPage({
|
|
|
16744
17021
|
bordered = true,
|
|
16745
17022
|
onSubmit,
|
|
16746
17023
|
isLoading = false,
|
|
16747
|
-
loadingRowCount =
|
|
17024
|
+
loadingRowCount = DEFAULT_SKELETON_ROW_COUNT2,
|
|
16748
17025
|
actions,
|
|
16749
17026
|
children,
|
|
16750
17027
|
className,
|
|
@@ -17509,7 +17786,7 @@ function SortIndicator({ active, direction }) {
|
|
|
17509
17786
|
if (!active) return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { "aria-hidden": "true", className });
|
|
17510
17787
|
return direction === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { "aria-hidden": "true", className }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": "true", className });
|
|
17511
17788
|
}
|
|
17512
|
-
var
|
|
17789
|
+
var DEFAULT_LABELS2 = {
|
|
17513
17790
|
searchPlaceholder: "Search\u2026",
|
|
17514
17791
|
searchAriaLabel: "Search",
|
|
17515
17792
|
reset: "Reset filters",
|
|
@@ -17542,7 +17819,7 @@ function ListPage({
|
|
|
17542
17819
|
labels: labelsProp,
|
|
17543
17820
|
className
|
|
17544
17821
|
}) {
|
|
17545
|
-
const labels = { ...
|
|
17822
|
+
const labels = { ...DEFAULT_LABELS2, ...labelsProp };
|
|
17546
17823
|
const initialFilterValues = React10.useMemo(() => {
|
|
17547
17824
|
const init = {};
|
|
17548
17825
|
for (const f of filters ?? []) {
|
|
@@ -17941,6 +18218,101 @@ var Textarea = React10.forwardRef(function Textarea2({
|
|
|
17941
18218
|
}
|
|
17942
18219
|
);
|
|
17943
18220
|
});
|
|
18221
|
+
|
|
18222
|
+
// src/components/toast/toastVariants.ts
|
|
18223
|
+
var toastClassNames = {
|
|
18224
|
+
toast: "group/toast pointer-events-auto flex w-full items-start gap-3 rounded-md border border-border bg-popover p-4 text-sm text-popover-foreground shadow-lg",
|
|
18225
|
+
title: "text-sm font-medium text-foreground",
|
|
18226
|
+
description: "text-xs text-muted-foreground",
|
|
18227
|
+
actionButton: "inline-flex h-7 items-center justify-center rounded-sm bg-primary px-2 text-xs font-medium text-primary-foreground hover:bg-primary/90",
|
|
18228
|
+
cancelButton: "inline-flex h-7 items-center justify-center rounded-sm border border-border bg-background px-2 text-xs font-medium text-foreground hover:bg-accent",
|
|
18229
|
+
closeButton: "group-hover/toast:opacity-100 absolute end-2 top-2 inline-flex size-5 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
|
|
18230
|
+
icon: "shrink-0",
|
|
18231
|
+
content: "flex flex-col gap-0.5 min-w-0",
|
|
18232
|
+
success: "[--normal-bg:var(--color-popover)] [--normal-border:var(--color-success)]",
|
|
18233
|
+
error: "[--normal-bg:var(--color-popover)] [--normal-border:var(--color-destructive)]",
|
|
18234
|
+
warning: "[--normal-bg:var(--color-popover)] [--normal-border:var(--color-warning)]",
|
|
18235
|
+
info: "[--normal-bg:var(--color-popover)] [--normal-border:var(--color-primary)]"
|
|
18236
|
+
};
|
|
18237
|
+
function Toaster(props) {
|
|
18238
|
+
const dir = useDirection();
|
|
18239
|
+
const defaultPosition = dir === "rtl" ? "bottom-left" : "bottom-right";
|
|
18240
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18241
|
+
sonner.Toaster,
|
|
18242
|
+
{
|
|
18243
|
+
dir,
|
|
18244
|
+
position: props.position ?? defaultPosition,
|
|
18245
|
+
richColors: props.richColors ?? true,
|
|
18246
|
+
closeButton: props.closeButton ?? true,
|
|
18247
|
+
...props,
|
|
18248
|
+
toastOptions: {
|
|
18249
|
+
...props.toastOptions,
|
|
18250
|
+
classNames: {
|
|
18251
|
+
...toastClassNames,
|
|
18252
|
+
...props.toastOptions?.classNames ?? {}
|
|
18253
|
+
}
|
|
18254
|
+
}
|
|
18255
|
+
}
|
|
18256
|
+
);
|
|
18257
|
+
}
|
|
18258
|
+
|
|
18259
|
+
// src/components/tooltip/tooltipVariants.ts
|
|
18260
|
+
var tooltipContentClass = "z-50 max-w-xs rounded-md bg-foreground px-2.5 py-1.5 text-xs font-medium text-background shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95";
|
|
18261
|
+
var tooltipArrowClass = "fill-foreground";
|
|
18262
|
+
function TooltipProvider({
|
|
18263
|
+
delayDuration = 200,
|
|
18264
|
+
skipDelayDuration = 300,
|
|
18265
|
+
...props
|
|
18266
|
+
}) {
|
|
18267
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18268
|
+
RadixTooltip__namespace.Provider,
|
|
18269
|
+
{
|
|
18270
|
+
delayDuration,
|
|
18271
|
+
skipDelayDuration,
|
|
18272
|
+
...props
|
|
18273
|
+
}
|
|
18274
|
+
);
|
|
18275
|
+
}
|
|
18276
|
+
function Tooltip({
|
|
18277
|
+
content,
|
|
18278
|
+
children,
|
|
18279
|
+
side = "top",
|
|
18280
|
+
align = "center",
|
|
18281
|
+
delayDuration,
|
|
18282
|
+
disabled = false,
|
|
18283
|
+
open,
|
|
18284
|
+
defaultOpen,
|
|
18285
|
+
onOpenChange,
|
|
18286
|
+
className,
|
|
18287
|
+
sideOffset = 6
|
|
18288
|
+
}) {
|
|
18289
|
+
if (disabled || content === null || content === void 0 || content === false) {
|
|
18290
|
+
return children;
|
|
18291
|
+
}
|
|
18292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18293
|
+
RadixTooltip__namespace.Root,
|
|
18294
|
+
{
|
|
18295
|
+
open,
|
|
18296
|
+
defaultOpen,
|
|
18297
|
+
onOpenChange,
|
|
18298
|
+
delayDuration,
|
|
18299
|
+
children: [
|
|
18300
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Trigger, { asChild: true, children }),
|
|
18301
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadixTooltip__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18302
|
+
RadixTooltip__namespace.Content,
|
|
18303
|
+
{
|
|
18304
|
+
side,
|
|
18305
|
+
align,
|
|
18306
|
+
sideOffset,
|
|
18307
|
+
"data-slot": "tooltip-content",
|
|
18308
|
+
className: cn(tooltipContentClass, className),
|
|
18309
|
+
children: content
|
|
18310
|
+
}
|
|
18311
|
+
) })
|
|
18312
|
+
]
|
|
18313
|
+
}
|
|
18314
|
+
);
|
|
18315
|
+
}
|
|
17944
18316
|
/*! Bundled license information:
|
|
17945
18317
|
|
|
17946
18318
|
react-router/dist/development/chunk-5KNZJZUH.mjs:
|
|
@@ -17971,16 +18343,43 @@ react-router-dom/dist/index.js:
|
|
|
17971
18343
|
*)
|
|
17972
18344
|
*/
|
|
17973
18345
|
|
|
18346
|
+
Object.defineProperty(exports, "toast", {
|
|
18347
|
+
enumerable: true,
|
|
18348
|
+
get: function () { return sonner.toast; }
|
|
18349
|
+
});
|
|
18350
|
+
exports.AlertDialog = AlertDialog;
|
|
18351
|
+
exports.AlertDialogAction = AlertDialogAction;
|
|
18352
|
+
exports.AlertDialogCancel = AlertDialogCancel;
|
|
18353
|
+
exports.AlertDialogContent = AlertDialogContent;
|
|
18354
|
+
exports.AlertDialogDescription = AlertDialogDescription;
|
|
18355
|
+
exports.AlertDialogFooter = AlertDialogFooter;
|
|
18356
|
+
exports.AlertDialogHeader = AlertDialogHeader;
|
|
18357
|
+
exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
18358
|
+
exports.AlertDialogPortal = AlertDialogPortal;
|
|
18359
|
+
exports.AlertDialogTitle = AlertDialogTitle;
|
|
18360
|
+
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
17974
18361
|
exports.AppShell = AppShell;
|
|
17975
18362
|
exports.Avatar = Avatar;
|
|
17976
18363
|
exports.Badge = Badge;
|
|
17977
18364
|
exports.Button = Button;
|
|
17978
18365
|
exports.Checkbox = Checkbox;
|
|
18366
|
+
exports.ConfirmDialogProvider = ConfirmDialogProvider;
|
|
17979
18367
|
exports.DashboardContent = DashboardContent;
|
|
17980
18368
|
exports.DashboardHeader = DashboardHeader;
|
|
17981
18369
|
exports.DashboardLayout = DashboardLayout;
|
|
17982
18370
|
exports.DashboardMain = DashboardMain;
|
|
17983
18371
|
exports.DatePicker = DatePicker;
|
|
18372
|
+
exports.DetailPage = DetailPage;
|
|
18373
|
+
exports.Dialog = Dialog;
|
|
18374
|
+
exports.DialogClose = DialogClose;
|
|
18375
|
+
exports.DialogContent = DialogContent;
|
|
18376
|
+
exports.DialogDescription = DialogDescription;
|
|
18377
|
+
exports.DialogFooter = DialogFooter;
|
|
18378
|
+
exports.DialogHeader = DialogHeader;
|
|
18379
|
+
exports.DialogOverlay = DialogOverlay;
|
|
18380
|
+
exports.DialogPortal = DialogPortal;
|
|
18381
|
+
exports.DialogTitle = DialogTitle;
|
|
18382
|
+
exports.DialogTrigger = DialogTrigger;
|
|
17984
18383
|
exports.DropdownMenu = DropdownMenu;
|
|
17985
18384
|
exports.DropdownMenuContent = DropdownMenuContent;
|
|
17986
18385
|
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
@@ -18015,6 +18414,9 @@ exports.SidebarNavItem = SidebarNavItem;
|
|
|
18015
18414
|
exports.Switch = Switch;
|
|
18016
18415
|
exports.Table = Table;
|
|
18017
18416
|
exports.Textarea = Textarea;
|
|
18417
|
+
exports.Toaster = Toaster;
|
|
18418
|
+
exports.Tooltip = Tooltip;
|
|
18419
|
+
exports.TooltipProvider = TooltipProvider;
|
|
18018
18420
|
exports.badgeBaseClass = badgeBaseClass;
|
|
18019
18421
|
exports.badgeDotSizeClass = badgeDotSizeClass;
|
|
18020
18422
|
exports.badgeSizeClass = badgeSizeClass;
|
|
@@ -18045,6 +18447,17 @@ exports.datePickerValueClass = datePickerValueClass;
|
|
|
18045
18447
|
exports.datePickerWeekClass = datePickerWeekClass;
|
|
18046
18448
|
exports.datePickerWeekdayClass = datePickerWeekdayClass;
|
|
18047
18449
|
exports.datePickerWeekdaysClass = datePickerWeekdaysClass;
|
|
18450
|
+
exports.detailPageBaseClass = detailPageBaseClass;
|
|
18451
|
+
exports.detailPageBodyClass = detailPageBodyClass;
|
|
18452
|
+
exports.detailPageEmptyClass = detailPageEmptyClass;
|
|
18453
|
+
exports.detailPageSkeletonRowClass = detailPageSkeletonRowClass;
|
|
18454
|
+
exports.dialogCloseButtonClass = dialogCloseButtonClass;
|
|
18455
|
+
exports.dialogContentClass = dialogContentClass;
|
|
18456
|
+
exports.dialogDescriptionClass = dialogDescriptionClass;
|
|
18457
|
+
exports.dialogFooterClass = dialogFooterClass;
|
|
18458
|
+
exports.dialogHeaderClass = dialogHeaderClass;
|
|
18459
|
+
exports.dialogOverlayClass = dialogOverlayClass;
|
|
18460
|
+
exports.dialogTitleClass = dialogTitleClass;
|
|
18048
18461
|
exports.dropdownMenuContentClass = dropdownMenuContentClass;
|
|
18049
18462
|
exports.dropdownMenuItemBaseClass = dropdownMenuItemBaseClass;
|
|
18050
18463
|
exports.dropdownMenuItemInsetClass = dropdownMenuItemInsetClass;
|
|
@@ -18101,6 +18514,10 @@ exports.textareaBaseClass = textareaBaseClass;
|
|
|
18101
18514
|
exports.textareaResizeClass = textareaResizeClass;
|
|
18102
18515
|
exports.textareaSizeClass = textareaSizeClass;
|
|
18103
18516
|
exports.textareaVariantClass = textareaVariantClass;
|
|
18517
|
+
exports.toastClassNames = toastClassNames;
|
|
18518
|
+
exports.tooltipArrowClass = tooltipArrowClass;
|
|
18519
|
+
exports.tooltipContentClass = tooltipContentClass;
|
|
18520
|
+
exports.useConfirm = useConfirm;
|
|
18104
18521
|
exports.useDashboardLayout = useDashboardLayout;
|
|
18105
18522
|
exports.useDirection = useDirection;
|
|
18106
18523
|
//# sourceMappingURL=index.cjs.map
|