@moontra/moonui 2.3.4 → 2.3.6

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.mjs CHANGED
@@ -3,7 +3,7 @@
3
3
  import * as t from 'react';
4
4
  import t__default, { useState, useCallback, useEffect } from 'react';
5
5
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
6
- import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, Minus, Search, ChevronUp, ChevronRight, Circle, Upload, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, Copy, Download, RefreshCw, Columns, ArrowDown, ArrowUp, ArrowUpDown, ChevronsLeft, ChevronLeft, ChevronsRight, Calendar as Calendar$1, Clock, CheckCircle, Star, GitFork, ExternalLink, Crown, Lock, Zap, Video, Music, FileText, File } from 'lucide-react';
6
+ import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, CreditCard, Minus, Search, ChevronRight, Circle, Upload, ChevronUp, Phone, Bold, Italic, Underline, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code, Link, Image, Palette, Undo, Redo, Edit, Eye, Copy, ArrowDown, ArrowUp, ArrowUpDown, ChevronLeft, Calendar as Calendar$1, Clock, CheckCircle, Star, GitFork, ExternalLink, Crown, Lock, Zap, Video, Music, FileText, File } from 'lucide-react';
7
7
  export { Palette, Pipette } from 'lucide-react';
8
8
  import { clsx } from 'clsx';
9
9
  import { twMerge } from 'tailwind-merge';
@@ -18,10 +18,10 @@ import * as LabelPrimitive from '@radix-ui/react-label';
18
18
  import * as PopoverPrimitive from '@radix-ui/react-popover';
19
19
  import * as TabsPrimitive from '@radix-ui/react-tabs';
20
20
  import * as DialogPrimitive from '@radix-ui/react-dialog';
21
- import * as SelectPrimitive from '@radix-ui/react-select';
22
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
23
21
  import { isValid, format, isSameMonth, isToday, subMonths, addMonths, isSameDay, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek } from 'date-fns';
24
22
  export { format } from 'date-fns';
23
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
24
+ import * as SelectPrimitive from '@radix-ui/react-select';
25
25
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
26
26
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
27
27
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -2350,7 +2350,7 @@ var TabsContent = t.forwardRef(({ className, animated = false, ...props }, ref)
2350
2350
  ref,
2351
2351
  className: cn(
2352
2352
  "moonui-theme",
2353
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2353
+ "mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
2354
2354
  animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
2355
2355
  className
2356
2356
  ),
@@ -3443,7 +3443,7 @@ var me = t.forwardRef((r, o) => {
3443
3443
  var e;
3444
3444
  return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
3445
3445
  }
3446
- function X8(e) {
3446
+ function X7(e) {
3447
3447
  let s = V()[e];
3448
3448
  s && E.setState("value", s.getAttribute(T));
3449
3449
  }
@@ -3458,10 +3458,10 @@ var me = t.forwardRef((r, o) => {
3458
3458
  s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
3459
3459
  i ? E.setState("value", i.getAttribute(T)) : Q(e);
3460
3460
  }
3461
- let oe = () => X8(V().length - 1), ie = (e) => {
3461
+ let oe = () => X7(V().length - 1), ie = (e) => {
3462
3462
  e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
3463
3463
  }, se = (e) => {
3464
- e.preventDefault(), e.metaKey ? X8(0) : e.altKey ? re(-1) : Q(-1);
3464
+ e.preventDefault(), e.metaKey ? X7(0) : e.altKey ? re(-1) : Q(-1);
3465
3465
  };
3466
3466
  return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3467
3467
  var s;
@@ -3488,7 +3488,7 @@ var me = t.forwardRef((r, o) => {
3488
3488
  break;
3489
3489
  }
3490
3490
  case "Home": {
3491
- e.preventDefault(), X8(0);
3491
+ e.preventDefault(), X7(0);
3492
3492
  break;
3493
3493
  }
3494
3494
  case "End": {
@@ -6733,46 +6733,6 @@ function filterRowModelFromRoot(rowsToFilter, filterRow, table) {
6733
6733
  rowsById: newFilteredRowsById
6734
6734
  };
6735
6735
  }
6736
- function getFacetedRowModel() {
6737
- return (table, columnId) => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter, table.getFilteredRowModel()], (preRowModel, columnFilters, globalFilter) => {
6738
- if (!preRowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {
6739
- return preRowModel;
6740
- }
6741
- const filterableIds = [...columnFilters.map((d) => d.id).filter((d) => d !== columnId), globalFilter ? "__global__" : void 0].filter(Boolean);
6742
- const filterRowsImpl = (row) => {
6743
- for (let i = 0; i < filterableIds.length; i++) {
6744
- if (row.columnFilters[filterableIds[i]] === false) {
6745
- return false;
6746
- }
6747
- }
6748
- return true;
6749
- };
6750
- return filterRows(preRowModel.rows, filterRowsImpl, table);
6751
- }, getMemoOptions(table.options, "debugTable", "getFacetedRowModel"));
6752
- }
6753
- function getFacetedUniqueValues() {
6754
- return (table, columnId) => memo(() => {
6755
- var _table$getColumn;
6756
- return [(_table$getColumn = table.getColumn(columnId)) == null ? void 0 : _table$getColumn.getFacetedRowModel()];
6757
- }, (facetedRowModel) => {
6758
- if (!facetedRowModel)
6759
- return /* @__PURE__ */ new Map();
6760
- let facetedUniqueValues = /* @__PURE__ */ new Map();
6761
- for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
6762
- const values = facetedRowModel.flatRows[i].getUniqueValues(columnId);
6763
- for (let j = 0; j < values.length; j++) {
6764
- const value = values[j];
6765
- if (facetedUniqueValues.has(value)) {
6766
- var _facetedUniqueValues$;
6767
- facetedUniqueValues.set(value, ((_facetedUniqueValues$ = facetedUniqueValues.get(value)) != null ? _facetedUniqueValues$ : 0) + 1);
6768
- } else {
6769
- facetedUniqueValues.set(value, 1);
6770
- }
6771
- }
6772
- }
6773
- return facetedUniqueValues;
6774
- }, getMemoOptions(table.options, "debugTable", `getFacetedUniqueValues_${columnId}`));
6775
- }
6776
6736
  function getFilteredRowModel() {
6777
6737
  return (table) => memo(() => [table.getPreFilteredRowModel(), table.getState().columnFilters, table.getState().globalFilter], (rowModel, columnFilters, globalFilter) => {
6778
6738
  if (!rowModel.rows.length || !(columnFilters != null && columnFilters.length) && !globalFilter) {
@@ -7229,749 +7189,52 @@ var TableCaption = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
7229
7189
  }
7230
7190
  ));
7231
7191
  TableCaption.displayName = "TableCaption";
7232
- var Select = SelectPrimitive.Root;
7233
- Select.displayName = "Select";
7234
- var SelectGroup = SelectPrimitive.Group;
7235
- var SelectValue = SelectPrimitive.Value;
7236
- var SelectTrigger = t.forwardRef(({ className, children, variant = "standard", size = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
7237
- SelectPrimitive.Trigger,
7238
- {
7239
- ref,
7240
- className: cn(
7241
- /* Base styles */
7242
- "flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200",
7243
- "disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
7244
- "focus-visible:outline-none",
7245
- /* Error state */
7246
- error && "border-error focus-visible:ring-error/30 focus-visible:border-error",
7247
- /* Success state */
7248
- success && "border-success focus-visible:ring-success/30 focus-visible:border-success",
7249
- /* Size variants */
7250
- size === "sm" && "h-8 text-xs px-2",
7251
- size === "md" && "h-10 text-sm px-3",
7252
- size === "lg" && "h-12 text-base px-4",
7253
- /* Visual variants */
7254
- variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
7255
- variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
7256
- variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",
7257
- variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",
7258
- className
7259
- ),
7260
- ...props,
7261
- disabled: props.disabled || loading,
7262
- "data-error": error ? true : void 0,
7263
- "data-success": success ? true : void 0,
7264
- "data-loading": loading ? true : void 0,
7265
- children: [
7266
- /* @__PURE__ */ jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
7267
- leftIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center text-gray-500 dark:text-gray-400", children: leftIcon }),
7268
- loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7269
- /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400" }),
7270
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground dark:text-gray-400", children: "Loading..." })
7271
- ] }) : children
7272
- ] }),
7273
- !loading && /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
7274
- ]
7275
- }
7276
- ));
7277
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
7278
- var SelectScrollUpButton = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7279
- SelectPrimitive.ScrollUpButton,
7280
- {
7281
- ref,
7282
- className: cn(
7283
- "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
7284
- className
7285
- ),
7286
- ...props,
7287
- children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
7288
- }
7289
- ));
7290
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
7291
- var SelectScrollDownButton = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7292
- SelectPrimitive.ScrollDownButton,
7293
- {
7294
- ref,
7295
- className: cn(
7296
- "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
7297
- className
7298
- ),
7299
- ...props,
7300
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
7301
- }
7302
- ));
7303
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
7304
- var SelectContent = t.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
7305
- SelectPrimitive.Content,
7306
- {
7307
- ref,
7308
- side,
7309
- sideOffset,
7310
- align,
7311
- avoidCollisions: false,
7312
- className: cn(
7313
- [
7314
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
7315
- "rounded-md border border-gray-200 dark:border-gray-700",
7316
- "bg-white dark:bg-gray-900 text-foreground",
7317
- "shadow-lg dark:shadow-gray-900/20",
7318
- "data-[state=open]:animate-in data-[state=closed]:animate-out",
7319
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
7320
- "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
7321
- "data-[state=open]:duration-150"
7322
- ],
7323
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
7324
- className
7325
- ),
7326
- position,
7327
- ...props,
7328
- children: [
7329
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
7192
+ function DataTableBasic({
7193
+ columns,
7194
+ data,
7195
+ enableSorting = true,
7196
+ enablePagination = true,
7197
+ enableSearch = true,
7198
+ pageSize = 10,
7199
+ searchPlaceholder = "Search...",
7200
+ emptyMessage = "No results found.",
7201
+ className
7202
+ }) {
7203
+ const [sorting, setSorting] = t.useState([]);
7204
+ const [globalFilter, setGlobalFilter] = t.useState("");
7205
+ const table = useReactTable({
7206
+ data,
7207
+ columns,
7208
+ onSortingChange: enableSorting ? setSorting : void 0,
7209
+ onGlobalFilterChange: enableSearch ? setGlobalFilter : void 0,
7210
+ getCoreRowModel: getCoreRowModel(),
7211
+ getPaginationRowModel: enablePagination ? getPaginationRowModel() : void 0,
7212
+ getSortedRowModel: enableSorting ? getSortedRowModel() : void 0,
7213
+ getFilteredRowModel: enableSearch ? getFilteredRowModel() : void 0,
7214
+ state: {
7215
+ sorting,
7216
+ globalFilter
7217
+ },
7218
+ initialState: {
7219
+ pagination: {
7220
+ pageSize
7221
+ }
7222
+ }
7223
+ });
7224
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
7225
+ enableSearch && /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxs("div", { className: "relative max-w-sm", children: [
7226
+ /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
7330
7227
  /* @__PURE__ */ jsx(
7331
- SelectPrimitive.Viewport,
7228
+ Input,
7332
7229
  {
7333
- className: cn(
7334
- "p-1",
7335
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
7336
- ),
7337
- children
7230
+ placeholder: searchPlaceholder,
7231
+ value: globalFilter,
7232
+ onChange: (event) => setGlobalFilter(event.target.value),
7233
+ className: "pl-8"
7338
7234
  }
7339
- ),
7340
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
7341
- ]
7342
- }
7343
- ) }));
7344
- SelectContent.displayName = SelectPrimitive.Content.displayName;
7345
- var SelectLabel = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7346
- SelectPrimitive.Label,
7347
- {
7348
- ref,
7349
- className: cn("moonui-theme", "py-1.5 pl-8 pr-2 text-sm font-semibold", className),
7350
- ...props
7351
- }
7352
- ));
7353
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
7354
- var SelectItem = t.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxs(
7355
- SelectPrimitive.Item,
7356
- {
7357
- ref,
7358
- className: cn(
7359
- "relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
7360
- /* Size variants */
7361
- size === "sm" && "py-1 pl-7 pr-2 text-xs",
7362
- size === "md" && "py-1.5 pl-8 pr-2 text-sm",
7363
- size === "lg" && "py-2 pl-9 pr-3 text-base",
7364
- /* Color variants */
7365
- variant === "default" && "focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",
7366
- variant === "subtle" && "focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",
7367
- variant === "destructive" && "text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",
7368
- variant === "success" && "text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",
7369
- variant === "warning" && "text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",
7370
- className
7371
- ),
7372
- ...props,
7373
- children: [
7374
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: customIndicator || /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
7375
- /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
7376
- rightIcon && /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2 opacity-70", children: rightIcon })
7377
- ]
7378
- }
7379
- ));
7380
- SelectItem.displayName = SelectPrimitive.Item.displayName;
7381
- var SelectSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7382
- SelectPrimitive.Separator,
7383
- {
7384
- ref,
7385
- className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
7386
- ...props
7387
- }
7388
- ));
7389
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
7390
- var DropdownMenu = DropdownMenuPrimitive.Root;
7391
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
7392
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
7393
- var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
7394
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
7395
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
7396
- var DropdownMenuSubTrigger = t.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7397
- DropdownMenuPrimitive.SubTrigger,
7398
- {
7399
- ref,
7400
- className: cn(
7401
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
7402
- inset && "pl-8",
7403
- className
7404
- ),
7405
- ...props,
7406
- children: [
7407
- children,
7408
- /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
7409
- ]
7410
- }
7411
- ));
7412
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
7413
- var DropdownMenuSubContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7414
- DropdownMenuPrimitive.SubContent,
7415
- {
7416
- ref,
7417
- className: cn(
7418
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
7419
- className
7420
- ),
7421
- ...props
7422
- }
7423
- ));
7424
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
7425
- var DropdownMenuContent = t.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
7426
- DropdownMenuPrimitive.Content,
7427
- {
7428
- ref,
7429
- sideOffset,
7430
- className: cn(
7431
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
7432
- className
7433
- ),
7434
- ...props
7435
- }
7436
- ) }));
7437
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
7438
- var DropdownMenuItem = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7439
- DropdownMenuPrimitive.Item,
7440
- {
7441
- ref,
7442
- className: cn(
7443
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
7444
- inset && "pl-8",
7445
- className
7446
- ),
7447
- ...props
7448
- }
7449
- ));
7450
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
7451
- var DropdownMenuCheckboxItem = t.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
7452
- DropdownMenuPrimitive.CheckboxItem,
7453
- {
7454
- ref,
7455
- className: cn(
7456
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
7457
- className
7458
- ),
7459
- checked,
7460
- ...props,
7461
- children: [
7462
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
7463
- children
7464
- ]
7465
- }
7466
- ));
7467
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
7468
- var DropdownMenuRadioItem = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7469
- DropdownMenuPrimitive.RadioItem,
7470
- {
7471
- ref,
7472
- className: cn(
7473
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
7474
- className
7475
- ),
7476
- ...props,
7477
- children: [
7478
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
7479
- children
7480
- ]
7481
- }
7482
- ));
7483
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
7484
- var DropdownMenuLabel = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
7485
- DropdownMenuPrimitive.Label,
7486
- {
7487
- ref,
7488
- className: cn(
7489
- "px-2 py-1.5 text-sm font-semibold",
7490
- inset && "pl-8",
7491
- className
7492
- ),
7493
- ...props
7494
- }
7495
- ));
7496
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
7497
- var DropdownMenuSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7498
- DropdownMenuPrimitive.Separator,
7499
- {
7500
- ref,
7501
- className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted", className),
7502
- ...props
7503
- }
7504
- ));
7505
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
7506
- var DropdownMenuShortcut = ({
7507
- className,
7508
- ...props
7509
- }) => {
7510
- return /* @__PURE__ */ jsx(
7511
- "span",
7512
- {
7513
- className: cn("moonui-theme", "ml-auto text-xs tracking-widest opacity-60", className),
7514
- ...props
7515
- }
7516
- );
7517
- };
7518
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
7519
- var skeletonVariants = cva(
7520
- "animate-pulse rounded-md",
7521
- {
7522
- variants: {
7523
- variant: {
7524
- default: "bg-muted",
7525
- primary: "bg-primary/10",
7526
- secondary: "bg-secondary/10",
7527
- accent: "bg-accent"
7528
- },
7529
- size: {
7530
- default: "",
7531
- sm: "scale-90",
7532
- lg: "scale-110"
7533
- },
7534
- shape: {
7535
- rect: "rounded-md",
7536
- circle: "rounded-full",
7537
- pill: "rounded-full"
7538
- },
7539
- animation: {
7540
- pulse: "animate-pulse",
7541
- wave: "overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",
7542
- none: "animate-none"
7543
- }
7544
- },
7545
- defaultVariants: {
7546
- variant: "default",
7547
- size: "default",
7548
- shape: "rect",
7549
- animation: "pulse"
7550
- }
7551
- }
7552
- );
7553
- var Skeleton = t.forwardRef(
7554
- ({
7555
- className,
7556
- variant,
7557
- size,
7558
- shape,
7559
- animation,
7560
- height,
7561
- width,
7562
- isLoaded = false,
7563
- children,
7564
- fadeInDuration = 400,
7565
- motion: useMotion = false,
7566
- style,
7567
- ...props
7568
- }, ref) => {
7569
- const {
7570
- onDrag,
7571
- onDragEnd,
7572
- onDragStart,
7573
- onAnimationStart,
7574
- onAnimationEnd,
7575
- onAnimationIteration,
7576
- ...filteredProps
7577
- } = props;
7578
- if (isLoaded && children) {
7579
- if (useMotion) {
7580
- return /* @__PURE__ */ jsx(
7581
- motion.div,
7582
- {
7583
- ref,
7584
- initial: { opacity: 0 },
7585
- animate: { opacity: 1 },
7586
- transition: { duration: fadeInDuration / 1e3 },
7587
- className: cn("moonui-theme", className),
7588
- style: {
7589
- height,
7590
- width,
7591
- ...style
7592
- },
7593
- ...filteredProps,
7594
- children
7595
- }
7596
- );
7597
- }
7598
- return /* @__PURE__ */ jsx(
7599
- "div",
7600
- {
7601
- ref,
7602
- className: cn("moonui-theme", "animate-fade-in", className),
7603
- style: {
7604
- animationDuration: `${fadeInDuration}ms`,
7605
- height,
7606
- width,
7607
- ...style
7608
- },
7609
- ...props,
7610
- children
7611
- }
7612
- );
7613
- }
7614
- const SkeletonElement = useMotion ? motion.div : "div";
7615
- return /* @__PURE__ */ jsx(
7616
- SkeletonElement,
7617
- {
7618
- ref,
7619
- className: cn(
7620
- "moonui-theme",
7621
- skeletonVariants({ variant, size, shape, animation }),
7622
- "relative isolate",
7623
- className
7624
- ),
7625
- style: {
7626
- height,
7627
- width,
7628
- ...style
7629
- },
7630
- ...useMotion ? skeletonAnimation : {},
7631
- ...filteredProps
7632
- }
7633
- );
7634
- }
7635
- );
7636
- Skeleton.displayName = "Skeleton";
7637
- var SkeletonText = t.forwardRef(
7638
- ({
7639
- className,
7640
- lines = 3,
7641
- lineHeight = "0.85rem",
7642
- spacing = "0.5rem",
7643
- lastLineWidth = 80,
7644
- randomWidths = false,
7645
- variant = "default",
7646
- animation = "pulse",
7647
- ...props
7648
- }, ref) => {
7649
- return /* @__PURE__ */ jsx(
7650
- "div",
7651
- {
7652
- ref,
7653
- className: cn("moonui-theme", "flex flex-col", className),
7654
- style: { gap: spacing },
7655
- ...props,
7656
- children: Array.from({ length: lines }).map((_, i) => {
7657
- const isLastLine = i === lines - 1;
7658
- const widthPercentage = isLastLine ? lastLineWidth : randomWidths ? 85 + i % 3 * 5 : 100;
7659
- return /* @__PURE__ */ jsx(
7660
- Skeleton,
7661
- {
7662
- variant,
7663
- animation,
7664
- className: "w-full",
7665
- style: {
7666
- height: lineHeight,
7667
- width: `${widthPercentage}%`
7668
- }
7669
- },
7670
- i
7671
- );
7672
- })
7673
- }
7674
- );
7675
- }
7676
- );
7677
- SkeletonText.displayName = "SkeletonText";
7678
- var SkeletonAvatar = t.forwardRef(
7679
- ({
7680
- className,
7681
- size = "2.5rem",
7682
- variant = "default",
7683
- animation = "pulse",
7684
- ...props
7685
- }, ref) => {
7686
- return /* @__PURE__ */ jsx(
7687
- Skeleton,
7688
- {
7689
- ref,
7690
- variant,
7691
- animation,
7692
- shape: "circle",
7693
- className: cn("moonui-theme", "shrink-0", className),
7694
- style: {
7695
- height: size,
7696
- width: size
7697
- },
7698
- ...props
7699
- }
7700
- );
7701
- }
7702
- );
7703
- SkeletonAvatar.displayName = "SkeletonAvatar";
7704
- var SkeletonCard = t.forwardRef(
7705
- ({
7706
- className,
7707
- showHeader = true,
7708
- contentLines = 3,
7709
- showFooter = true,
7710
- variant = "default",
7711
- animation = "pulse",
7712
- ...props
7713
- }, ref) => {
7714
- return /* @__PURE__ */ jsxs(
7715
- "div",
7716
- {
7717
- ref,
7718
- className: cn(
7719
- "overflow-hidden rounded-md border border-border bg-background p-4",
7720
- className
7721
- ),
7722
- ...props,
7723
- children: [
7724
- showHeader && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center gap-4", children: [
7725
- /* @__PURE__ */ jsx(SkeletonAvatar, { size: "2.5rem", variant, animation }),
7726
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
7727
- /* @__PURE__ */ jsx(
7728
- Skeleton,
7729
- {
7730
- variant,
7731
- animation,
7732
- className: "mb-2 h-4 w-1/3"
7733
- }
7734
- ),
7735
- /* @__PURE__ */ jsx(
7736
- Skeleton,
7737
- {
7738
- variant,
7739
- animation,
7740
- className: "h-3 w-1/4"
7741
- }
7742
- )
7743
- ] })
7744
- ] }),
7745
- /* @__PURE__ */ jsx(
7746
- SkeletonText,
7747
- {
7748
- lines: contentLines,
7749
- variant,
7750
- animation,
7751
- className: "mb-4"
7752
- }
7753
- ),
7754
- showFooter && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-4 pt-4 border-t border-border", children: [
7755
- /* @__PURE__ */ jsx(
7756
- Skeleton,
7757
- {
7758
- variant,
7759
- animation,
7760
- className: "h-4 w-1/4"
7761
- }
7762
- ),
7763
- /* @__PURE__ */ jsx(
7764
- Skeleton,
7765
- {
7766
- variant,
7767
- animation,
7768
- className: "h-4 w-1/5"
7769
- }
7770
- )
7771
- ] })
7772
- ]
7773
- }
7774
- );
7775
- }
7776
- );
7777
- SkeletonCard.displayName = "SkeletonCard";
7778
- cva(
7779
- "w-full",
7780
- {
7781
- variants: {
7782
- variant: {
7783
- default: "",
7784
- bordered: "border rounded-lg",
7785
- striped: "[&_tbody_tr:nth-child(even)]:bg-muted/50",
7786
- cards: "gap-4 [&_tbody]:flex [&_tbody]:flex-col [&_tbody_tr]:rounded-lg [&_tbody_tr]:border [&_tbody_tr]:p-4"
7787
- },
7788
- size: {
7789
- default: "",
7790
- sm: "text-sm [&_th]:py-2 [&_td]:py-2",
7791
- lg: "text-base [&_th]:py-4 [&_td]:py-4"
7792
- },
7793
- density: {
7794
- default: "",
7795
- compact: "[&_th]:py-1 [&_td]:py-1",
7796
- comfortable: "[&_th]:py-6 [&_td]:py-6"
7797
- }
7798
- },
7799
- defaultVariants: {
7800
- variant: "default",
7801
- size: "default",
7802
- density: "default"
7803
- }
7804
- }
7805
- );
7806
- function DataTableLoading() {
7807
- return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
7808
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7809
- /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-[250px]" }),
7810
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
7811
- /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8" }),
7812
- /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8" })
7813
- ] })
7814
- ] }),
7815
- /* @__PURE__ */ jsxs("div", { className: "rounded-lg border", children: [
7816
- /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx("div", { className: "flex gap-4", children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: "h-8 flex-1" }, i)) }) }),
7817
- /* @__PURE__ */ jsx("div", { className: "p-4 space-y-2", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: "h-12 w-full" }, i)) })
7818
- ] })
7819
- ] });
7820
- }
7821
- function DataTable({
7822
- columns,
7823
- data,
7824
- enableFiltering = true,
7825
- enableSorting = true,
7826
- enableColumnVisibility = true,
7827
- enableRowSelection = false,
7828
- enablePagination = true,
7829
- pageSizeOptions = [10, 20, 30, 50, 100],
7830
- defaultPageSize: defaultPageSize2 = 10,
7831
- filterPlaceholder = "Filter...",
7832
- filterColumn,
7833
- isLoading = false,
7834
- emptyMessage = "No results found.",
7835
- title,
7836
- description,
7837
- enableExport = false,
7838
- onExport,
7839
- enableRefresh = false,
7840
- onRefresh,
7841
- toolbarActions,
7842
- customFilter,
7843
- onRowClick,
7844
- variant,
7845
- size,
7846
- density,
7847
- className
7848
- }) {
7849
- const [sorting, setSorting] = t.useState([]);
7850
- const [columnFilters, setColumnFilters] = t.useState([]);
7851
- const [columnVisibility, setColumnVisibility] = t.useState({});
7852
- const [rowSelection, setRowSelection] = t.useState({});
7853
- const [globalFilter, setGlobalFilter] = t.useState("");
7854
- const table = useReactTable({
7855
- data,
7856
- columns,
7857
- onSortingChange: enableSorting ? setSorting : void 0,
7858
- onColumnFiltersChange: enableFiltering ? setColumnFilters : void 0,
7859
- onColumnVisibilityChange: enableColumnVisibility ? setColumnVisibility : void 0,
7860
- onRowSelectionChange: enableRowSelection ? setRowSelection : void 0,
7861
- onGlobalFilterChange: enableFiltering && !filterColumn ? setGlobalFilter : void 0,
7862
- getCoreRowModel: getCoreRowModel(),
7863
- getPaginationRowModel: enablePagination ? getPaginationRowModel() : void 0,
7864
- getSortedRowModel: enableSorting ? getSortedRowModel() : void 0,
7865
- getFilteredRowModel: enableFiltering ? getFilteredRowModel() : void 0,
7866
- getFacetedRowModel: enableFiltering ? getFacetedRowModel() : void 0,
7867
- getFacetedUniqueValues: enableFiltering ? getFacetedUniqueValues() : void 0,
7868
- state: {
7869
- sorting,
7870
- columnFilters,
7871
- columnVisibility,
7872
- rowSelection,
7873
- globalFilter
7874
- },
7875
- initialState: {
7876
- pagination: {
7877
- pageSize: defaultPageSize2
7878
- }
7879
- }
7880
- });
7881
- if (isLoading) {
7882
- return /* @__PURE__ */ jsx(DataTableLoading, {});
7883
- }
7884
- const selectedRows = table.getFilteredSelectedRowModel().rows;
7885
- return /* @__PURE__ */ jsxs("div", { className: cn("moonui-theme", "space-y-4", className), children: [
7886
- (title || description) && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
7887
- title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: title }),
7888
- description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
7889
- ] }),
7890
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
7891
- /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-sm", children: enableFiltering && /* @__PURE__ */ jsx(Fragment, { children: customFilter || /* @__PURE__ */ jsxs("div", { className: "relative", children: [
7892
- /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
7893
- /* @__PURE__ */ jsx(
7894
- Input,
7895
- {
7896
- placeholder: filterPlaceholder,
7897
- value: filterColumn ? table.getColumn(filterColumn)?.getFilterValue() ?? "" : globalFilter,
7898
- onChange: (event) => {
7899
- const value = event.target.value;
7900
- if (filterColumn) {
7901
- table.getColumn(filterColumn)?.setFilterValue(value);
7902
- } else {
7903
- setGlobalFilter(value);
7904
- }
7905
- },
7906
- className: "pl-8"
7907
- }
7908
- ),
7909
- (filterColumn && table.getColumn(filterColumn)?.getFilterValue() || !filterColumn && globalFilter) && /* @__PURE__ */ jsx(
7910
- Button,
7911
- {
7912
- variant: "ghost",
7913
- size: "sm",
7914
- className: "absolute right-0 top-0 h-full px-2",
7915
- onClick: () => {
7916
- if (filterColumn) {
7917
- table.getColumn(filterColumn)?.setFilterValue("");
7918
- } else {
7919
- setGlobalFilter("");
7920
- }
7921
- },
7922
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
7923
- }
7924
- )
7925
- ] }) }) }),
7926
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7927
- enableRowSelection && selectedRows.length > 0 && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "whitespace-nowrap", children: [
7928
- selectedRows.length,
7929
- " selected"
7930
- ] }),
7931
- toolbarActions,
7932
- enableExport && onExport && /* @__PURE__ */ jsxs(
7933
- Button,
7934
- {
7935
- variant: "outline",
7936
- size: "sm",
7937
- onClick: () => onExport(table.getFilteredRowModel().rows.map((row) => row.original)),
7938
- children: [
7939
- /* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
7940
- "Export"
7941
- ]
7942
- }
7943
- ),
7944
- enableRefresh && onRefresh && /* @__PURE__ */ jsx(
7945
- Button,
7946
- {
7947
- variant: "outline",
7948
- size: "icon",
7949
- onClick: onRefresh,
7950
- children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" })
7951
- }
7952
- ),
7953
- enableColumnVisibility && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
7954
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "icon", children: /* @__PURE__ */ jsx(Columns, { className: "h-4 w-4" }) }) }),
7955
- /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-[180px]", children: [
7956
- /* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Toggle columns" }),
7957
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
7958
- table.getAllColumns().filter((column) => column.getCanHide()).map((column) => {
7959
- return /* @__PURE__ */ jsx(
7960
- DropdownMenuCheckboxItem,
7961
- {
7962
- className: "capitalize",
7963
- checked: column.getIsVisible(),
7964
- onCheckedChange: (value) => column.toggleVisibility(!!value),
7965
- children: column.id
7966
- },
7967
- column.id
7968
- );
7969
- })
7970
- ] })
7971
- ] })
7972
- ] })
7973
- ] }),
7974
- /* @__PURE__ */ jsx("div", { className: cn("rounded-lg", variant === "bordered" && "border"), children: /* @__PURE__ */ jsxs(Table, { children: [
7235
+ )
7236
+ ] }) }),
7237
+ /* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs(Table, { children: [
7975
7238
  /* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
7976
7239
  return /* @__PURE__ */ jsx(TableHead, { children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs(
7977
7240
  "div",
@@ -7991,27 +7254,17 @@ function DataTable({
7991
7254
  }
7992
7255
  ) }, header.id);
7993
7256
  }) }, headerGroup.id)) }),
7994
- /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows?.length ? /* @__PURE__ */ jsx(AnimatePresence, { children: table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
7995
- motion.tr,
7257
+ /* @__PURE__ */ jsx(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
7258
+ TableRow,
7996
7259
  {
7997
- initial: { opacity: 0, y: -10 },
7998
- animate: { opacity: 1, y: 0 },
7999
- exit: { opacity: 0, y: 10 },
8000
- transition: { duration: 0.2 },
8001
7260
  "data-state": row.getIsSelected() && "selected",
8002
- className: cn(
8003
- "border-b transition-colors",
8004
- onRowClick && "cursor-pointer hover:bg-muted/50",
8005
- row.getIsSelected() && "bg-muted"
8006
- ),
8007
- onClick: () => onRowClick?.(row.original),
8008
7261
  children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, { children: flexRender(
8009
7262
  cell.column.columnDef.cell,
8010
7263
  cell.getContext()
8011
7264
  ) }, cell.id))
8012
7265
  },
8013
7266
  row.id
8014
- )) }) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
7267
+ )) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
8015
7268
  TableCell,
8016
7269
  {
8017
7270
  colSpan: columns.length,
@@ -8020,89 +7273,45 @@ function DataTable({
8020
7273
  }
8021
7274
  ) }) })
8022
7275
  ] }) }),
8023
- enablePagination && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
8024
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
8025
- /* @__PURE__ */ jsxs("span", { children: [
8026
- table.getFilteredRowModel().rows.length,
7276
+ enablePagination && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end space-x-2", children: [
7277
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 text-sm text-muted-foreground", children: [
7278
+ table.getFilteredRowModel().rows.length,
7279
+ " row(s)"
7280
+ ] }),
7281
+ /* @__PURE__ */ jsxs("div", { className: "space-x-2", children: [
7282
+ /* @__PURE__ */ jsxs(
7283
+ Button,
7284
+ {
7285
+ variant: "outline",
7286
+ size: "sm",
7287
+ onClick: () => table.previousPage(),
7288
+ disabled: !table.getCanPreviousPage(),
7289
+ children: [
7290
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
7291
+ "Previous"
7292
+ ]
7293
+ }
7294
+ ),
7295
+ /* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
7296
+ "Page ",
7297
+ table.getState().pagination.pageIndex + 1,
8027
7298
  " of",
8028
7299
  " ",
8029
- table.getCoreRowModel().rows.length,
8030
- " row(s)"
8031
- ] }),
8032
- enableRowSelection && selectedRows.length > 0 && /* @__PURE__ */ jsxs("span", { children: [
8033
- "\u2022 ",
8034
- selectedRows.length,
8035
- " selected"
8036
- ] })
8037
- ] }),
8038
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8039
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
8040
- /* @__PURE__ */ jsx("p", { className: "text-sm", children: "Rows per page" }),
8041
- /* @__PURE__ */ jsxs(
8042
- Select,
8043
- {
8044
- value: `${table.getState().pagination.pageSize}`,
8045
- onValueChange: (value) => {
8046
- table.setPageSize(Number(value));
8047
- },
8048
- children: [
8049
- /* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
8050
- /* @__PURE__ */ jsx(SelectContent, { side: "top", children: pageSizeOptions.map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
8051
- ]
8052
- }
8053
- )
7300
+ table.getPageCount()
8054
7301
  ] }),
8055
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
8056
- /* @__PURE__ */ jsx(
8057
- Button,
8058
- {
8059
- variant: "outline",
8060
- size: "icon",
8061
- onClick: () => table.setPageIndex(0),
8062
- disabled: !table.getCanPreviousPage(),
8063
- children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
8064
- }
8065
- ),
8066
- /* @__PURE__ */ jsx(
8067
- Button,
8068
- {
8069
- variant: "outline",
8070
- size: "icon",
8071
- onClick: () => table.previousPage(),
8072
- disabled: !table.getCanPreviousPage(),
8073
- children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
8074
- }
8075
- ),
8076
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-sm", children: [
8077
- /* @__PURE__ */ jsx("span", { children: "Page" }),
8078
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
8079
- table.getState().pagination.pageIndex + 1,
8080
- " of",
8081
- " ",
8082
- table.getPageCount()
8083
- ] })
8084
- ] }),
8085
- /* @__PURE__ */ jsx(
8086
- Button,
8087
- {
8088
- variant: "outline",
8089
- size: "icon",
8090
- onClick: () => table.nextPage(),
8091
- disabled: !table.getCanNextPage(),
8092
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
8093
- }
8094
- ),
8095
- /* @__PURE__ */ jsx(
8096
- Button,
8097
- {
8098
- variant: "outline",
8099
- size: "icon",
8100
- onClick: () => table.setPageIndex(table.getPageCount() - 1),
8101
- disabled: !table.getCanNextPage(),
8102
- children: /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })
8103
- }
8104
- )
8105
- ] })
7302
+ /* @__PURE__ */ jsxs(
7303
+ Button,
7304
+ {
7305
+ variant: "outline",
7306
+ size: "sm",
7307
+ onClick: () => table.nextPage(),
7308
+ disabled: !table.getCanNextPage(),
7309
+ children: [
7310
+ "Next",
7311
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
7312
+ ]
7313
+ }
7314
+ )
8106
7315
  ] })
8107
7316
  ] })
8108
7317
  ] });
@@ -8121,13 +7330,6 @@ function createSortableHeader(label) {
8121
7330
  }
8122
7331
  );
8123
7332
  }
8124
- function createFilterableColumn(accessorKey, header, filterFn) {
8125
- return {
8126
- accessorKey,
8127
- header: createSortableHeader(header),
8128
- filterFn
8129
- };
8130
- }
8131
7333
  function Calendar({
8132
7334
  mode = "single",
8133
7335
  selected,
@@ -8783,54 +7985,183 @@ function DraggableList({
8783
7985
  renderItem,
8784
7986
  keyExtractor,
8785
7987
  className,
8786
- disabled = false
8787
- }) {
8788
- const [draggedIndex, setDraggedIndex] = t.useState(null);
8789
- const handleDragStart = (e, index) => {
8790
- if (disabled)
8791
- return;
8792
- setDraggedIndex(index);
8793
- e.dataTransfer.effectAllowed = "move";
8794
- };
8795
- const handleDragOver = (e) => {
8796
- e.preventDefault();
8797
- e.dataTransfer.dropEffect = "move";
8798
- };
8799
- const handleDrop = (e, dropIndex) => {
8800
- e.preventDefault();
8801
- if (disabled || draggedIndex === null || draggedIndex === dropIndex) {
8802
- setDraggedIndex(null);
8803
- return;
8804
- }
8805
- const newItems = [...items];
8806
- const draggedItem = newItems[draggedIndex];
8807
- newItems.splice(draggedIndex, 1);
8808
- newItems.splice(dropIndex, 0, draggedItem);
8809
- onReorder(newItems);
8810
- setDraggedIndex(null);
8811
- };
8812
- const handleDragEnd = () => {
8813
- setDraggedIndex(null);
8814
- };
8815
- return /* @__PURE__ */ jsx("div", { className: cn("moonui-theme", "space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsx(
8816
- "div",
7988
+ disabled = false
7989
+ }) {
7990
+ const [draggedIndex, setDraggedIndex] = t.useState(null);
7991
+ const handleDragStart = (e, index) => {
7992
+ if (disabled)
7993
+ return;
7994
+ setDraggedIndex(index);
7995
+ e.dataTransfer.effectAllowed = "move";
7996
+ };
7997
+ const handleDragOver = (e) => {
7998
+ e.preventDefault();
7999
+ e.dataTransfer.dropEffect = "move";
8000
+ };
8001
+ const handleDrop = (e, dropIndex) => {
8002
+ e.preventDefault();
8003
+ if (disabled || draggedIndex === null || draggedIndex === dropIndex) {
8004
+ setDraggedIndex(null);
8005
+ return;
8006
+ }
8007
+ const newItems = [...items];
8008
+ const draggedItem = newItems[draggedIndex];
8009
+ newItems.splice(draggedIndex, 1);
8010
+ newItems.splice(dropIndex, 0, draggedItem);
8011
+ onReorder(newItems);
8012
+ setDraggedIndex(null);
8013
+ };
8014
+ const handleDragEnd = () => {
8015
+ setDraggedIndex(null);
8016
+ };
8017
+ return /* @__PURE__ */ jsx("div", { className: cn("moonui-theme", "space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsx(
8018
+ "div",
8019
+ {
8020
+ draggable: !disabled,
8021
+ onDragStart: (e) => handleDragStart(e, index),
8022
+ onDragOver: handleDragOver,
8023
+ onDrop: (e) => handleDrop(e, index),
8024
+ onDragEnd: handleDragEnd,
8025
+ className: cn(
8026
+ "transition-opacity duration-200",
8027
+ !disabled && "cursor-move hover:opacity-80",
8028
+ draggedIndex === index && "opacity-50",
8029
+ disabled && "cursor-not-allowed"
8030
+ ),
8031
+ children: renderItem(item, index)
8032
+ },
8033
+ keyExtractor(item)
8034
+ )) });
8035
+ }
8036
+ var DropdownMenu = DropdownMenuPrimitive.Root;
8037
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
8038
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
8039
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
8040
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
8041
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
8042
+ var DropdownMenuSubTrigger = t.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
8043
+ DropdownMenuPrimitive.SubTrigger,
8044
+ {
8045
+ ref,
8046
+ className: cn(
8047
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
8048
+ inset && "pl-8",
8049
+ className
8050
+ ),
8051
+ ...props,
8052
+ children: [
8053
+ children,
8054
+ /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
8055
+ ]
8056
+ }
8057
+ ));
8058
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
8059
+ var DropdownMenuSubContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8060
+ DropdownMenuPrimitive.SubContent,
8061
+ {
8062
+ ref,
8063
+ className: cn(
8064
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
8065
+ className
8066
+ ),
8067
+ ...props
8068
+ }
8069
+ ));
8070
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
8071
+ var DropdownMenuContent = t.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
8072
+ DropdownMenuPrimitive.Content,
8073
+ {
8074
+ ref,
8075
+ sideOffset,
8076
+ className: cn(
8077
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
8078
+ className
8079
+ ),
8080
+ ...props
8081
+ }
8082
+ ) }));
8083
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
8084
+ var DropdownMenuItem = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
8085
+ DropdownMenuPrimitive.Item,
8086
+ {
8087
+ ref,
8088
+ className: cn(
8089
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
8090
+ inset && "pl-8",
8091
+ className
8092
+ ),
8093
+ ...props
8094
+ }
8095
+ ));
8096
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
8097
+ var DropdownMenuCheckboxItem = t.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
8098
+ DropdownMenuPrimitive.CheckboxItem,
8099
+ {
8100
+ ref,
8101
+ className: cn(
8102
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
8103
+ className
8104
+ ),
8105
+ checked,
8106
+ ...props,
8107
+ children: [
8108
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
8109
+ children
8110
+ ]
8111
+ }
8112
+ ));
8113
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
8114
+ var DropdownMenuRadioItem = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
8115
+ DropdownMenuPrimitive.RadioItem,
8116
+ {
8117
+ ref,
8118
+ className: cn(
8119
+ "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
8120
+ className
8121
+ ),
8122
+ ...props,
8123
+ children: [
8124
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
8125
+ children
8126
+ ]
8127
+ }
8128
+ ));
8129
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
8130
+ var DropdownMenuLabel = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
8131
+ DropdownMenuPrimitive.Label,
8132
+ {
8133
+ ref,
8134
+ className: cn(
8135
+ "px-2 py-1.5 text-sm font-semibold",
8136
+ inset && "pl-8",
8137
+ className
8138
+ ),
8139
+ ...props
8140
+ }
8141
+ ));
8142
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
8143
+ var DropdownMenuSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
8144
+ DropdownMenuPrimitive.Separator,
8145
+ {
8146
+ ref,
8147
+ className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted", className),
8148
+ ...props
8149
+ }
8150
+ ));
8151
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
8152
+ var DropdownMenuShortcut = ({
8153
+ className,
8154
+ ...props
8155
+ }) => {
8156
+ return /* @__PURE__ */ jsx(
8157
+ "span",
8817
8158
  {
8818
- draggable: !disabled,
8819
- onDragStart: (e) => handleDragStart(e, index),
8820
- onDragOver: handleDragOver,
8821
- onDrop: (e) => handleDrop(e, index),
8822
- onDragEnd: handleDragEnd,
8823
- className: cn(
8824
- "transition-opacity duration-200",
8825
- !disabled && "cursor-move hover:opacity-80",
8826
- draggedIndex === index && "opacity-50",
8827
- disabled && "cursor-not-allowed"
8828
- ),
8829
- children: renderItem(item, index)
8830
- },
8831
- keyExtractor(item)
8832
- )) });
8833
- }
8159
+ className: cn("moonui-theme", "ml-auto text-xs tracking-widest opacity-60", className),
8160
+ ...props
8161
+ }
8162
+ );
8163
+ };
8164
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
8834
8165
  var progressVariants = cva(
8835
8166
  "relative overflow-hidden bg-muted",
8836
8167
  {
@@ -9896,83 +9227,241 @@ var PaginationContent = t.forwardRef(({ className, ...props }, ref) => /* @__PUR
9896
9227
  "ul",
9897
9228
  {
9898
9229
  ref,
9899
- className: cn("moonui-theme", "flex flex-row items-center gap-1", className),
9230
+ className: cn("moonui-theme", "flex flex-row items-center gap-1", className),
9231
+ ...props
9232
+ }
9233
+ ));
9234
+ PaginationContent.displayName = "PaginationContent";
9235
+ var PaginationItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
9236
+ PaginationItem.displayName = "PaginationItem";
9237
+ var PaginationLink = ({
9238
+ className,
9239
+ isActive,
9240
+ size = "icon",
9241
+ ...props
9242
+ }) => /* @__PURE__ */ jsx(
9243
+ "a",
9244
+ {
9245
+ "aria-current": isActive ? "page" : void 0,
9246
+ className: cn(
9247
+ buttonVariants({
9248
+ variant: isActive ? "outline" : "ghost",
9249
+ size
9250
+ }),
9251
+ className
9252
+ ),
9253
+ ...props
9254
+ }
9255
+ );
9256
+ PaginationLink.displayName = "PaginationLink";
9257
+ var PaginationPrevious = ({
9258
+ className,
9259
+ ...props
9260
+ }) => /* @__PURE__ */ jsxs(
9261
+ PaginationLink,
9262
+ {
9263
+ "aria-label": "Go to previous page",
9264
+ size: "md",
9265
+ className: cn("moonui-theme", "gap-1 pl-2.5", className),
9266
+ ...props,
9267
+ children: [
9268
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
9269
+ /* @__PURE__ */ jsx("span", { children: "Previous" })
9270
+ ]
9271
+ }
9272
+ );
9273
+ PaginationPrevious.displayName = "PaginationPrevious";
9274
+ var PaginationNext = ({
9275
+ className,
9276
+ ...props
9277
+ }) => /* @__PURE__ */ jsxs(
9278
+ PaginationLink,
9279
+ {
9280
+ "aria-label": "Go to next page",
9281
+ size: "md",
9282
+ className: cn("moonui-theme", "gap-1 pr-2.5", className),
9283
+ ...props,
9284
+ children: [
9285
+ /* @__PURE__ */ jsx("span", { children: "Next" }),
9286
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
9287
+ ]
9288
+ }
9289
+ );
9290
+ PaginationNext.displayName = "PaginationNext";
9291
+ var PaginationEllipsis = ({
9292
+ className,
9293
+ ...props
9294
+ }) => /* @__PURE__ */ jsxs(
9295
+ "span",
9296
+ {
9297
+ "aria-hidden": true,
9298
+ className: cn("moonui-theme", "flex h-9 w-9 items-center justify-center", className),
9299
+ ...props,
9300
+ children: [
9301
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
9302
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
9303
+ ]
9304
+ }
9305
+ );
9306
+ PaginationEllipsis.displayName = "PaginationEllipsis";
9307
+ var Select = SelectPrimitive.Root;
9308
+ Select.displayName = "Select";
9309
+ var SelectGroup = SelectPrimitive.Group;
9310
+ var SelectValue = SelectPrimitive.Value;
9311
+ var SelectTrigger = t.forwardRef(({ className, children, variant = "standard", size = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
9312
+ SelectPrimitive.Trigger,
9313
+ {
9314
+ ref,
9315
+ className: cn(
9316
+ /* Base styles */
9317
+ "flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200",
9318
+ "disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
9319
+ "focus-visible:outline-none",
9320
+ /* Error state */
9321
+ error && "border-error focus-visible:ring-error/30 focus-visible:border-error",
9322
+ /* Success state */
9323
+ success && "border-success focus-visible:ring-success/30 focus-visible:border-success",
9324
+ /* Size variants */
9325
+ size === "sm" && "h-8 text-xs px-2",
9326
+ size === "md" && "h-10 text-sm px-3",
9327
+ size === "lg" && "h-12 text-base px-4",
9328
+ /* Visual variants */
9329
+ variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
9330
+ variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",
9331
+ variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",
9332
+ variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",
9333
+ className
9334
+ ),
9335
+ ...props,
9336
+ disabled: props.disabled || loading,
9337
+ "data-error": error ? true : void 0,
9338
+ "data-success": success ? true : void 0,
9339
+ "data-loading": loading ? true : void 0,
9340
+ children: [
9341
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center flex-1 gap-2", children: [
9342
+ leftIcon && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center text-gray-500 dark:text-gray-400", children: leftIcon }),
9343
+ loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
9344
+ /* @__PURE__ */ jsx(Loader2, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400" }),
9345
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground dark:text-gray-400", children: "Loading..." })
9346
+ ] }) : children
9347
+ ] }),
9348
+ !loading && /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
9349
+ ]
9350
+ }
9351
+ ));
9352
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
9353
+ var SelectScrollUpButton = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9354
+ SelectPrimitive.ScrollUpButton,
9355
+ {
9356
+ ref,
9357
+ className: cn(
9358
+ "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
9359
+ className
9360
+ ),
9361
+ ...props,
9362
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
9363
+ }
9364
+ ));
9365
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
9366
+ var SelectScrollDownButton = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9367
+ SelectPrimitive.ScrollDownButton,
9368
+ {
9369
+ ref,
9370
+ className: cn(
9371
+ "flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",
9372
+ className
9373
+ ),
9374
+ ...props,
9375
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
9376
+ }
9377
+ ));
9378
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
9379
+ var SelectContent = t.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
9380
+ SelectPrimitive.Content,
9381
+ {
9382
+ ref,
9383
+ side,
9384
+ sideOffset,
9385
+ align,
9386
+ avoidCollisions: false,
9387
+ className: cn(
9388
+ [
9389
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
9390
+ "rounded-md border border-gray-200 dark:border-gray-700",
9391
+ "bg-white dark:bg-gray-900 text-foreground",
9392
+ "shadow-lg dark:shadow-gray-900/20",
9393
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
9394
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
9395
+ "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
9396
+ "data-[state=open]:duration-150"
9397
+ ],
9398
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
9399
+ className
9400
+ ),
9401
+ position,
9402
+ ...props,
9403
+ children: [
9404
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
9405
+ /* @__PURE__ */ jsx(
9406
+ SelectPrimitive.Viewport,
9407
+ {
9408
+ className: cn(
9409
+ "p-1",
9410
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
9411
+ ),
9412
+ children
9413
+ }
9414
+ ),
9415
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
9416
+ ]
9417
+ }
9418
+ ) }));
9419
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
9420
+ var SelectLabel = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9421
+ SelectPrimitive.Label,
9422
+ {
9423
+ ref,
9424
+ className: cn("moonui-theme", "py-1.5 pl-8 pr-2 text-sm font-semibold", className),
9900
9425
  ...props
9901
9426
  }
9902
9427
  ));
9903
- PaginationContent.displayName = "PaginationContent";
9904
- var PaginationItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
9905
- PaginationItem.displayName = "PaginationItem";
9906
- var PaginationLink = ({
9907
- className,
9908
- isActive,
9909
- size = "icon",
9910
- ...props
9911
- }) => /* @__PURE__ */ jsx(
9912
- "a",
9428
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
9429
+ var SelectItem = t.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxs(
9430
+ SelectPrimitive.Item,
9913
9431
  {
9914
- "aria-current": isActive ? "page" : void 0,
9432
+ ref,
9915
9433
  className: cn(
9916
- buttonVariants({
9917
- variant: isActive ? "outline" : "ghost",
9918
- size
9919
- }),
9434
+ "relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
9435
+ /* Size variants */
9436
+ size === "sm" && "py-1 pl-7 pr-2 text-xs",
9437
+ size === "md" && "py-1.5 pl-8 pr-2 text-sm",
9438
+ size === "lg" && "py-2 pl-9 pr-3 text-base",
9439
+ /* Color variants */
9440
+ variant === "default" && "focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",
9441
+ variant === "subtle" && "focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",
9442
+ variant === "destructive" && "text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",
9443
+ variant === "success" && "text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",
9444
+ variant === "warning" && "text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",
9920
9445
  className
9921
9446
  ),
9922
- ...props
9923
- }
9924
- );
9925
- PaginationLink.displayName = "PaginationLink";
9926
- var PaginationPrevious = ({
9927
- className,
9928
- ...props
9929
- }) => /* @__PURE__ */ jsxs(
9930
- PaginationLink,
9931
- {
9932
- "aria-label": "Go to previous page",
9933
- size: "md",
9934
- className: cn("moonui-theme", "gap-1 pl-2.5", className),
9935
- ...props,
9936
- children: [
9937
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
9938
- /* @__PURE__ */ jsx("span", { children: "Previous" })
9939
- ]
9940
- }
9941
- );
9942
- PaginationPrevious.displayName = "PaginationPrevious";
9943
- var PaginationNext = ({
9944
- className,
9945
- ...props
9946
- }) => /* @__PURE__ */ jsxs(
9947
- PaginationLink,
9948
- {
9949
- "aria-label": "Go to next page",
9950
- size: "md",
9951
- className: cn("moonui-theme", "gap-1 pr-2.5", className),
9952
9447
  ...props,
9953
9448
  children: [
9954
- /* @__PURE__ */ jsx("span", { children: "Next" }),
9955
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
9449
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: customIndicator || /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
9450
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children }),
9451
+ rightIcon && /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2 opacity-70", children: rightIcon })
9956
9452
  ]
9957
9453
  }
9958
- );
9959
- PaginationNext.displayName = "PaginationNext";
9960
- var PaginationEllipsis = ({
9961
- className,
9962
- ...props
9963
- }) => /* @__PURE__ */ jsxs(
9964
- "span",
9454
+ ));
9455
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
9456
+ var SelectSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
9457
+ SelectPrimitive.Separator,
9965
9458
  {
9966
- "aria-hidden": true,
9967
- className: cn("moonui-theme", "flex h-9 w-9 items-center justify-center", className),
9968
- ...props,
9969
- children: [
9970
- /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
9971
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
9972
- ]
9459
+ ref,
9460
+ className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
9461
+ ...props
9973
9462
  }
9974
- );
9975
- PaginationEllipsis.displayName = "PaginationEllipsis";
9463
+ ));
9464
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
9976
9465
  var countryCodes = [
9977
9466
  { code: "+1", country: "US", flag: "\u{1F1FA}\u{1F1F8}", name: "United States" },
9978
9467
  { code: "+44", country: "GB", flag: "\u{1F1EC}\u{1F1E7}", name: "United Kingdom" },
@@ -10363,7 +9852,7 @@ function usePresence2(present) {
10363
9852
  const ownerWindow = node.ownerDocument.defaultView ?? window;
10364
9853
  const handleAnimationEnd = (event) => {
10365
9854
  const currentAnimationName = getAnimationName2(stylesRef.current);
10366
- const isCurrentAnimation = currentAnimationName.includes(event.animationName);
9855
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
10367
9856
  if (event.target === node && isCurrentAnimation) {
10368
9857
  send("ANIMATION_END");
10369
9858
  if (!prevPresentRef.current) {
@@ -10496,8 +9985,6 @@ function useDirection(localDir) {
10496
9985
  function clamp(value, [min2, max2]) {
10497
9986
  return Math.min(max2, Math.max(min2, value));
10498
9987
  }
10499
-
10500
- // ../../node_modules/@radix-ui/primitive/dist/index.mjs
10501
9988
  function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
10502
9989
  return function handleEvent(event) {
10503
9990
  originalEventHandler?.(event);
@@ -12054,106 +11541,365 @@ var SimpleEditor = t__default.forwardRef(
12054
11541
  },
12055
11542
  disabled
12056
11543
  }
12057
- )
12058
- ] })
12059
- ]
11544
+ )
11545
+ ] })
11546
+ ]
11547
+ }
11548
+ ) });
11549
+ return /* @__PURE__ */ jsxs(
11550
+ "div",
11551
+ {
11552
+ ref,
11553
+ className: cn(
11554
+ "border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",
11555
+ disabled && "opacity-50 cursor-not-allowed",
11556
+ className
11557
+ ),
11558
+ ...props,
11559
+ children: [
11560
+ toolbar,
11561
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
11562
+ isPreview ? /* @__PURE__ */ jsx(
11563
+ motion.div,
11564
+ {
11565
+ initial: { opacity: 0 },
11566
+ animate: { opacity: 1 },
11567
+ className: "bg-slate-50 dark:bg-zinc-900/95",
11568
+ style: { minHeight, maxHeight, overflow: "auto" },
11569
+ children: /* @__PURE__ */ jsx(
11570
+ "textarea",
11571
+ {
11572
+ ref: sourceRef,
11573
+ value: sourceContent,
11574
+ onChange: (e) => setSourceContent(e.target.value),
11575
+ className: "w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",
11576
+ style: { minHeight: minHeight - 32 },
11577
+ disabled,
11578
+ placeholder: "HTML source code..."
11579
+ }
11580
+ )
11581
+ }
11582
+ ) : /* @__PURE__ */ jsx(
11583
+ motion.div,
11584
+ {
11585
+ ref: editorRef,
11586
+ contentEditable: !disabled,
11587
+ suppressContentEditableWarning: true,
11588
+ className: cn(
11589
+ "p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto",
11590
+ "bg-slate-50 dark:bg-zinc-900/95",
11591
+ "text-gray-900 dark:text-gray-100",
11592
+ "focus:ring-0",
11593
+ "[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4",
11594
+ "[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3",
11595
+ "[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2",
11596
+ "[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2",
11597
+ "[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1",
11598
+ "[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1",
11599
+ "[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4",
11600
+ "[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4",
11601
+ "[&_li]:mb-1",
11602
+ "[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic",
11603
+ "[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"
11604
+ ),
11605
+ style: { minHeight, maxHeight },
11606
+ onInput: handleInput,
11607
+ onKeyDown: handleKeyDown,
11608
+ "data-placeholder": placeholder,
11609
+ initial: { opacity: 0 },
11610
+ animate: { opacity: 1 }
11611
+ }
11612
+ ),
11613
+ !content && !isPreview && /* @__PURE__ */ jsx(
11614
+ "div",
11615
+ {
11616
+ className: "absolute top-4 left-4 text-muted-foreground pointer-events-none",
11617
+ style: { fontSize: "16px" },
11618
+ children: placeholder
11619
+ }
11620
+ )
11621
+ ] }),
11622
+ /* @__PURE__ */ jsx("div", { className: "px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsx(CharacterCount, { content }) })
11623
+ ]
11624
+ }
11625
+ );
11626
+ }
11627
+ );
11628
+ SimpleEditor.displayName = "SimpleEditor";
11629
+ var CharacterCount = ({ content }) => {
11630
+ const [count4, setCount] = useState(0);
11631
+ useEffect(() => {
11632
+ const getPlainText = (html) => {
11633
+ const div = document.createElement("div");
11634
+ div.innerHTML = html;
11635
+ return div.textContent || div.innerText || "";
11636
+ };
11637
+ setCount(getPlainText(content).length);
11638
+ }, [content]);
11639
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
11640
+ count4,
11641
+ " characters"
11642
+ ] });
11643
+ };
11644
+ var skeletonVariants = cva(
11645
+ "animate-pulse rounded-md",
11646
+ {
11647
+ variants: {
11648
+ variant: {
11649
+ default: "bg-muted",
11650
+ primary: "bg-primary/10",
11651
+ secondary: "bg-secondary/10",
11652
+ accent: "bg-accent"
11653
+ },
11654
+ size: {
11655
+ default: "",
11656
+ sm: "scale-90",
11657
+ lg: "scale-110"
11658
+ },
11659
+ shape: {
11660
+ rect: "rounded-md",
11661
+ circle: "rounded-full",
11662
+ pill: "rounded-full"
11663
+ },
11664
+ animation: {
11665
+ pulse: "animate-pulse",
11666
+ wave: "overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",
11667
+ none: "animate-none"
11668
+ }
11669
+ },
11670
+ defaultVariants: {
11671
+ variant: "default",
11672
+ size: "default",
11673
+ shape: "rect",
11674
+ animation: "pulse"
11675
+ }
11676
+ }
11677
+ );
11678
+ var Skeleton = t.forwardRef(
11679
+ ({
11680
+ className,
11681
+ variant,
11682
+ size,
11683
+ shape,
11684
+ animation,
11685
+ height,
11686
+ width,
11687
+ isLoaded = false,
11688
+ children,
11689
+ fadeInDuration = 400,
11690
+ motion: useMotion = false,
11691
+ style,
11692
+ ...props
11693
+ }, ref) => {
11694
+ const {
11695
+ onDrag,
11696
+ onDragEnd,
11697
+ onDragStart,
11698
+ onAnimationStart,
11699
+ onAnimationEnd,
11700
+ onAnimationIteration,
11701
+ ...filteredProps
11702
+ } = props;
11703
+ if (isLoaded && children) {
11704
+ if (useMotion) {
11705
+ return /* @__PURE__ */ jsx(
11706
+ motion.div,
11707
+ {
11708
+ ref,
11709
+ initial: { opacity: 0 },
11710
+ animate: { opacity: 1 },
11711
+ transition: { duration: fadeInDuration / 1e3 },
11712
+ className: cn("moonui-theme", className),
11713
+ style: {
11714
+ height,
11715
+ width,
11716
+ ...style
11717
+ },
11718
+ ...filteredProps,
11719
+ children
11720
+ }
11721
+ );
11722
+ }
11723
+ return /* @__PURE__ */ jsx(
11724
+ "div",
11725
+ {
11726
+ ref,
11727
+ className: cn("moonui-theme", "animate-fade-in", className),
11728
+ style: {
11729
+ animationDuration: `${fadeInDuration}ms`,
11730
+ height,
11731
+ width,
11732
+ ...style
11733
+ },
11734
+ ...props,
11735
+ children
11736
+ }
11737
+ );
11738
+ }
11739
+ const SkeletonElement = useMotion ? motion.div : "div";
11740
+ return /* @__PURE__ */ jsx(
11741
+ SkeletonElement,
11742
+ {
11743
+ ref,
11744
+ className: cn(
11745
+ "moonui-theme",
11746
+ skeletonVariants({ variant, size, shape, animation }),
11747
+ "relative isolate",
11748
+ className
11749
+ ),
11750
+ style: {
11751
+ height,
11752
+ width,
11753
+ ...style
11754
+ },
11755
+ ...useMotion ? skeletonAnimation : {},
11756
+ ...filteredProps
11757
+ }
11758
+ );
11759
+ }
11760
+ );
11761
+ Skeleton.displayName = "Skeleton";
11762
+ var SkeletonText = t.forwardRef(
11763
+ ({
11764
+ className,
11765
+ lines = 3,
11766
+ lineHeight = "0.85rem",
11767
+ spacing = "0.5rem",
11768
+ lastLineWidth = 80,
11769
+ randomWidths = false,
11770
+ variant = "default",
11771
+ animation = "pulse",
11772
+ ...props
11773
+ }, ref) => {
11774
+ return /* @__PURE__ */ jsx(
11775
+ "div",
11776
+ {
11777
+ ref,
11778
+ className: cn("moonui-theme", "flex flex-col", className),
11779
+ style: { gap: spacing },
11780
+ ...props,
11781
+ children: Array.from({ length: lines }).map((_, i) => {
11782
+ const isLastLine = i === lines - 1;
11783
+ const widthPercentage = isLastLine ? lastLineWidth : randomWidths ? 85 + i % 3 * 5 : 100;
11784
+ return /* @__PURE__ */ jsx(
11785
+ Skeleton,
11786
+ {
11787
+ variant,
11788
+ animation,
11789
+ className: "w-full",
11790
+ style: {
11791
+ height: lineHeight,
11792
+ width: `${widthPercentage}%`
11793
+ }
11794
+ },
11795
+ i
11796
+ );
11797
+ })
12060
11798
  }
12061
- ) });
11799
+ );
11800
+ }
11801
+ );
11802
+ SkeletonText.displayName = "SkeletonText";
11803
+ var SkeletonAvatar = t.forwardRef(
11804
+ ({
11805
+ className,
11806
+ size = "2.5rem",
11807
+ variant = "default",
11808
+ animation = "pulse",
11809
+ ...props
11810
+ }, ref) => {
11811
+ return /* @__PURE__ */ jsx(
11812
+ Skeleton,
11813
+ {
11814
+ ref,
11815
+ variant,
11816
+ animation,
11817
+ shape: "circle",
11818
+ className: cn("moonui-theme", "shrink-0", className),
11819
+ style: {
11820
+ height: size,
11821
+ width: size
11822
+ },
11823
+ ...props
11824
+ }
11825
+ );
11826
+ }
11827
+ );
11828
+ SkeletonAvatar.displayName = "SkeletonAvatar";
11829
+ var SkeletonCard = t.forwardRef(
11830
+ ({
11831
+ className,
11832
+ showHeader = true,
11833
+ contentLines = 3,
11834
+ showFooter = true,
11835
+ variant = "default",
11836
+ animation = "pulse",
11837
+ ...props
11838
+ }, ref) => {
12062
11839
  return /* @__PURE__ */ jsxs(
12063
11840
  "div",
12064
11841
  {
12065
11842
  ref,
12066
11843
  className: cn(
12067
- "border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",
12068
- disabled && "opacity-50 cursor-not-allowed",
11844
+ "overflow-hidden rounded-md border border-border bg-background p-4",
12069
11845
  className
12070
11846
  ),
12071
11847
  ...props,
12072
11848
  children: [
12073
- toolbar,
12074
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
12075
- isPreview ? /* @__PURE__ */ jsx(
12076
- motion.div,
12077
- {
12078
- initial: { opacity: 0 },
12079
- animate: { opacity: 1 },
12080
- className: "bg-slate-50 dark:bg-zinc-900/95",
12081
- style: { minHeight, maxHeight, overflow: "auto" },
12082
- children: /* @__PURE__ */ jsx(
12083
- "textarea",
12084
- {
12085
- ref: sourceRef,
12086
- value: sourceContent,
12087
- onChange: (e) => setSourceContent(e.target.value),
12088
- className: "w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",
12089
- style: { minHeight: minHeight - 32 },
12090
- disabled,
12091
- placeholder: "HTML source code..."
12092
- }
12093
- )
12094
- }
12095
- ) : /* @__PURE__ */ jsx(
12096
- motion.div,
11849
+ showHeader && /* @__PURE__ */ jsxs("div", { className: "mb-4 flex items-center gap-4", children: [
11850
+ /* @__PURE__ */ jsx(SkeletonAvatar, { size: "2.5rem", variant, animation }),
11851
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
11852
+ /* @__PURE__ */ jsx(
11853
+ Skeleton,
11854
+ {
11855
+ variant,
11856
+ animation,
11857
+ className: "mb-2 h-4 w-1/3"
11858
+ }
11859
+ ),
11860
+ /* @__PURE__ */ jsx(
11861
+ Skeleton,
11862
+ {
11863
+ variant,
11864
+ animation,
11865
+ className: "h-3 w-1/4"
11866
+ }
11867
+ )
11868
+ ] })
11869
+ ] }),
11870
+ /* @__PURE__ */ jsx(
11871
+ SkeletonText,
11872
+ {
11873
+ lines: contentLines,
11874
+ variant,
11875
+ animation,
11876
+ className: "mb-4"
11877
+ }
11878
+ ),
11879
+ showFooter && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-4 pt-4 border-t border-border", children: [
11880
+ /* @__PURE__ */ jsx(
11881
+ Skeleton,
12097
11882
  {
12098
- ref: editorRef,
12099
- contentEditable: !disabled,
12100
- suppressContentEditableWarning: true,
12101
- className: cn(
12102
- "p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto",
12103
- "bg-slate-50 dark:bg-zinc-900/95",
12104
- "text-gray-900 dark:text-gray-100",
12105
- "focus:ring-0",
12106
- "[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4",
12107
- "[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3",
12108
- "[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2",
12109
- "[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2",
12110
- "[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1",
12111
- "[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1",
12112
- "[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4",
12113
- "[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4",
12114
- "[&_li]:mb-1",
12115
- "[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic",
12116
- "[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"
12117
- ),
12118
- style: { minHeight, maxHeight },
12119
- onInput: handleInput,
12120
- onKeyDown: handleKeyDown,
12121
- "data-placeholder": placeholder,
12122
- initial: { opacity: 0 },
12123
- animate: { opacity: 1 }
11883
+ variant,
11884
+ animation,
11885
+ className: "h-4 w-1/4"
12124
11886
  }
12125
11887
  ),
12126
- !content && !isPreview && /* @__PURE__ */ jsx(
12127
- "div",
11888
+ /* @__PURE__ */ jsx(
11889
+ Skeleton,
12128
11890
  {
12129
- className: "absolute top-4 left-4 text-muted-foreground pointer-events-none",
12130
- style: { fontSize: "16px" },
12131
- children: placeholder
11891
+ variant,
11892
+ animation,
11893
+ className: "h-4 w-1/5"
12132
11894
  }
12133
11895
  )
12134
- ] }),
12135
- /* @__PURE__ */ jsx("div", { className: "px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsx(CharacterCount, { content }) })
11896
+ ] })
12136
11897
  ]
12137
11898
  }
12138
11899
  );
12139
11900
  }
12140
11901
  );
12141
- SimpleEditor.displayName = "SimpleEditor";
12142
- var CharacterCount = ({ content }) => {
12143
- const [count4, setCount] = useState(0);
12144
- useEffect(() => {
12145
- const getPlainText = (html) => {
12146
- const div = document.createElement("div");
12147
- div.innerHTML = html;
12148
- return div.textContent || div.innerText || "";
12149
- };
12150
- setCount(getPlainText(content).length);
12151
- }, [content]);
12152
- return /* @__PURE__ */ jsxs(Fragment, { children: [
12153
- count4,
12154
- " characters"
12155
- ] });
12156
- };
11902
+ SkeletonCard.displayName = "SkeletonCard";
12157
11903
  var SwipeableCard = t.forwardRef(
12158
11904
  ({ className, children, onSwipeLeft, onSwipeRight, threshold = 100, disabled = false, ...props }, ref) => {
12159
11905
  const [startX, setStartX] = t.useState(0);
@@ -12629,6 +12375,6 @@ function Toaster() {
12629
12375
  *)
12630
12376
  */
12631
12377
 
12632
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DataTable, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FreeBadge, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, LockedComponent, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Accordion as MoonUIAccordion, AccordionContent as MoonUIAccordionContent, AccordionItem as MoonUIAccordionItem, AccordionTrigger as MoonUIAccordionTrigger, Alert as MoonUIAlert, AlertDescription as MoonUIAlertDescription, AlertTitle as MoonUIAlertTitle, AspectRatio as MoonUIAspectRatio, Avatar as MoonUIAvatar, AvatarFallback as MoonUIAvatarFallback, AvatarGroup as MoonUIAvatarGroup, AvatarImage as MoonUIAvatarImage, Badge as MoonUIBadge, Breadcrumb as MoonUIBreadcrumb, BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis, BreadcrumbItem as MoonUIBreadcrumbItem, BreadcrumbLink as MoonUIBreadcrumbLink, BreadcrumbList as MoonUIBreadcrumbList, BreadcrumbPage as MoonUIBreadcrumbPage, BreadcrumbSeparator as MoonUIBreadcrumbSeparator, Button as MoonUIButton, Card as MoonUICard, CardCVCInput as MoonUICardCVCInput, CardContent as MoonUICardContent, CardDescription as MoonUICardDescription, CardExpiryInput as MoonUICardExpiryInput, CardFooter as MoonUICardFooter, CardHeader as MoonUICardHeader, CardNumberInput as MoonUICardNumberInput, CardTitle as MoonUICardTitle, CardZipInput as MoonUICardZipInput, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible2 as MoonUICollapsible, CollapsibleContent2 as MoonUICollapsibleContent, CollapsibleTrigger2 as MoonUICollapsibleTrigger, ColorPicker as MoonUIColorPicker, Command as MoonUICommand, CommandDialog as MoonUICommandDialog, CommandEmpty as MoonUICommandEmpty, CommandGroup as MoonUICommandGroup, CommandInput as MoonUICommandInput, CommandItem as MoonUICommandItem, CommandList as MoonUICommandList, CommandSeparator as MoonUICommandSeparator, CommandShortcut as MoonUICommandShortcut, DataTable as MoonUIDataTable, DatePicker as MoonUIDatePicker, DateRangePicker as MoonUIDateRangePicker, DateTimePicker as MoonUIDateTimePicker, Dialog as MoonUIDialog, DialogClose as MoonUIDialogClose, DialogContent as MoonUIDialogContent, DialogDescription as MoonUIDialogDescription, DialogFooter as MoonUIDialogFooter, DialogHeader as MoonUIDialogHeader, DialogTitle as MoonUIDialogTitle, DialogTrigger as MoonUIDialogTrigger, DraggableList as MoonUIDraggableList, DropdownMenu as MoonUIDropdownMenu, DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem, DropdownMenuContent as MoonUIDropdownMenuContent, DropdownMenuGroup as MoonUIDropdownMenuGroup, DropdownMenuItem as MoonUIDropdownMenuItem, DropdownMenuLabel as MoonUIDropdownMenuLabel, DropdownMenuPortal as MoonUIDropdownMenuPortal, DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup, DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem, DropdownMenuSeparator as MoonUIDropdownMenuSeparator, DropdownMenuShortcut as MoonUIDropdownMenuShortcut, DropdownMenuSub as MoonUIDropdownMenuSub, DropdownMenuSubContent as MoonUIDropdownMenuSubContent, DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger, DropdownMenuTrigger as MoonUIDropdownMenuTrigger, FileUpload as MoonUIFileUpload, FreeBadge as MoonUIFreeBadge, GestureDrawer as MoonUIGestureDrawer, GitHubStars as MoonUIGitHubStars, GradientPicker as MoonUIGradientPicker, Input as MoonUIInput, Label as MoonUILabel, LockedComponent as MoonUILockedComponent, MonthPicker as MoonUIMonthPicker, MoonLogo as MoonUIMoonLogo, Pagination as MoonUIPagination, PaginationContent as MoonUIPaginationContent, PaginationEllipsis as MoonUIPaginationEllipsis, PaginationItem as MoonUIPaginationItem, PaginationLink as MoonUIPaginationLink, PaginationNext as MoonUIPaginationNext, PaginationPrevious as MoonUIPaginationPrevious, PhoneInput as MoonUIPhoneInput, Popover as MoonUIPopover, PopoverContent as MoonUIPopoverContent, PopoverTrigger as MoonUIPopoverTrigger, ProBadge as MoonUIProBadge, ProComponentWrapper as MoonUIProComponentWrapper, Progress as MoonUIProgress, RadioGroup2 as MoonUIRadioGroup, RadioGroupItem as MoonUIRadioGroupItem, RadioItemWithLabel as MoonUIRadioItemWithLabel, RadioLabel as MoonUIRadioLabel, RichTextEditor as MoonUIRichTextEditor, ScrollArea2 as MoonUIScrollArea, ScrollBar as MoonUIScrollBar, Select as MoonUISelect, SelectContent as MoonUISelectContent, SelectGroup as MoonUISelectGroup, SelectItem as MoonUISelectItem, SelectLabel as MoonUISelectLabel, SelectScrollDownButton as MoonUISelectScrollDownButton, SelectScrollUpButton as MoonUISelectScrollUpButton, SelectSeparator as MoonUISelectSeparator, SelectTrigger as MoonUISelectTrigger, SelectValue as MoonUISelectValue, Separator3 as MoonUISeparator, SimpleColorPicker as MoonUISimpleColorPicker, SimpleEditor as MoonUISimpleEditor, Skeleton as MoonUISkeleton, SkeletonAvatar as MoonUISkeletonAvatar, SkeletonCard as MoonUISkeletonCard, SkeletonText as MoonUISkeletonText, Slider as MoonUISlider, SwipeableCard as MoonUISwipeableCard, Switch as MoonUISwitch, Table as MoonUITable, TableBody as MoonUITableBody, TableCaption as MoonUITableCaption, TableCell as MoonUITableCell, TableFooter as MoonUITableFooter, TableHead as MoonUITableHead, TableHeader as MoonUITableHeader, TableRow as MoonUITableRow, Tabs as MoonUITabs, TabsContent as MoonUITabsContent, TabsList as MoonUITabsList, TabsTrigger as MoonUITabsTrigger, TagsInput as MoonUITagsInput, Textarea as MoonUITextarea, Toast as MoonUIToast, ToastAction as MoonUIToastAction, ToastClose as MoonUIToastClose, ToastDescription as MoonUIToastDescription, ToastProvider as MoonUIToastProvider, ToastTitle as MoonUIToastTitle, ToastViewport as MoonUIToastViewport, Toaster as MoonUIToaster, Toggle2 as MoonUIToggle, Tooltip as MoonUITooltip, TooltipContent as MoonUITooltipContent, TooltipProvider as MoonUITooltipProvider, TooltipTrigger as MoonUITooltipTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, ProBadge, ProComponentWrapper, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, ScrollArea2 as ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, createFilterableColumn, createSortableHeader, badgeVariants as moonUIBadgeVariants, buttonVariants as moonUIButtonVariants, skeletonVariants as moonUISkeletonVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
12378
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardCVCInput, CardContent, CardDescription, CardExpiryInput, CardFooter, CardHeader, CardNumberInput, CardTitle, CardZipInput, Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DatePicker, DateRangePicker, DateTimePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogForm, DialogHeader, DialogTitle, DialogTrigger, DraggableList, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, FreeBadge, GestureDrawer, GitHubStarButton, GitHubStars, GradientPicker, Input, Label, LockedComponent, MonthPicker, MoonLogo, MoonLogoAnimated, MoonLogoIcon, Accordion as MoonUIAccordion, AccordionContent as MoonUIAccordionContent, AccordionItem as MoonUIAccordionItem, AccordionTrigger as MoonUIAccordionTrigger, Alert as MoonUIAlert, AlertDescription as MoonUIAlertDescription, AlertTitle as MoonUIAlertTitle, AspectRatio as MoonUIAspectRatio, Avatar as MoonUIAvatar, AvatarFallback as MoonUIAvatarFallback, AvatarGroup as MoonUIAvatarGroup, AvatarImage as MoonUIAvatarImage, Badge as MoonUIBadge, Breadcrumb as MoonUIBreadcrumb, BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis, BreadcrumbItem as MoonUIBreadcrumbItem, BreadcrumbLink as MoonUIBreadcrumbLink, BreadcrumbList as MoonUIBreadcrumbList, BreadcrumbPage as MoonUIBreadcrumbPage, BreadcrumbSeparator as MoonUIBreadcrumbSeparator, Button as MoonUIButton, Card as MoonUICard, CardCVCInput as MoonUICardCVCInput, CardContent as MoonUICardContent, CardDescription as MoonUICardDescription, CardExpiryInput as MoonUICardExpiryInput, CardFooter as MoonUICardFooter, CardHeader as MoonUICardHeader, CardNumberInput as MoonUICardNumberInput, CardTitle as MoonUICardTitle, CardZipInput as MoonUICardZipInput, Checkbox as MoonUICheckbox, CheckboxGroup as MoonUICheckboxGroup, CheckboxLabel as MoonUICheckboxLabel, CheckboxWithLabel as MoonUICheckboxWithLabel, Collapsible2 as MoonUICollapsible, CollapsibleContent2 as MoonUICollapsibleContent, CollapsibleTrigger2 as MoonUICollapsibleTrigger, ColorPicker as MoonUIColorPicker, Command as MoonUICommand, CommandDialog as MoonUICommandDialog, CommandEmpty as MoonUICommandEmpty, CommandGroup as MoonUICommandGroup, CommandInput as MoonUICommandInput, CommandItem as MoonUICommandItem, CommandList as MoonUICommandList, CommandSeparator as MoonUICommandSeparator, CommandShortcut as MoonUICommandShortcut, DataTableBasic as MoonUIDataTableBasic, DatePicker as MoonUIDatePicker, DateRangePicker as MoonUIDateRangePicker, DateTimePicker as MoonUIDateTimePicker, Dialog as MoonUIDialog, DialogClose as MoonUIDialogClose, DialogContent as MoonUIDialogContent, DialogDescription as MoonUIDialogDescription, DialogFooter as MoonUIDialogFooter, DialogHeader as MoonUIDialogHeader, DialogTitle as MoonUIDialogTitle, DialogTrigger as MoonUIDialogTrigger, DraggableList as MoonUIDraggableList, DropdownMenu as MoonUIDropdownMenu, DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem, DropdownMenuContent as MoonUIDropdownMenuContent, DropdownMenuGroup as MoonUIDropdownMenuGroup, DropdownMenuItem as MoonUIDropdownMenuItem, DropdownMenuLabel as MoonUIDropdownMenuLabel, DropdownMenuPortal as MoonUIDropdownMenuPortal, DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup, DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem, DropdownMenuSeparator as MoonUIDropdownMenuSeparator, DropdownMenuShortcut as MoonUIDropdownMenuShortcut, DropdownMenuSub as MoonUIDropdownMenuSub, DropdownMenuSubContent as MoonUIDropdownMenuSubContent, DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger, DropdownMenuTrigger as MoonUIDropdownMenuTrigger, FileUpload as MoonUIFileUpload, FreeBadge as MoonUIFreeBadge, GestureDrawer as MoonUIGestureDrawer, GitHubStars as MoonUIGitHubStars, GradientPicker as MoonUIGradientPicker, Input as MoonUIInput, Label as MoonUILabel, LockedComponent as MoonUILockedComponent, MonthPicker as MoonUIMonthPicker, MoonLogo as MoonUIMoonLogo, Pagination as MoonUIPagination, PaginationContent as MoonUIPaginationContent, PaginationEllipsis as MoonUIPaginationEllipsis, PaginationItem as MoonUIPaginationItem, PaginationLink as MoonUIPaginationLink, PaginationNext as MoonUIPaginationNext, PaginationPrevious as MoonUIPaginationPrevious, PhoneInput as MoonUIPhoneInput, Popover as MoonUIPopover, PopoverContent as MoonUIPopoverContent, PopoverTrigger as MoonUIPopoverTrigger, ProBadge as MoonUIProBadge, ProComponentWrapper as MoonUIProComponentWrapper, Progress as MoonUIProgress, RadioGroup2 as MoonUIRadioGroup, RadioGroupItem as MoonUIRadioGroupItem, RadioItemWithLabel as MoonUIRadioItemWithLabel, RadioLabel as MoonUIRadioLabel, RichTextEditor as MoonUIRichTextEditor, ScrollArea2 as MoonUIScrollArea, ScrollBar as MoonUIScrollBar, Select as MoonUISelect, SelectContent as MoonUISelectContent, SelectGroup as MoonUISelectGroup, SelectItem as MoonUISelectItem, SelectLabel as MoonUISelectLabel, SelectScrollDownButton as MoonUISelectScrollDownButton, SelectScrollUpButton as MoonUISelectScrollUpButton, SelectSeparator as MoonUISelectSeparator, SelectTrigger as MoonUISelectTrigger, SelectValue as MoonUISelectValue, Separator3 as MoonUISeparator, SimpleColorPicker as MoonUISimpleColorPicker, SimpleEditor as MoonUISimpleEditor, Skeleton as MoonUISkeleton, SkeletonAvatar as MoonUISkeletonAvatar, SkeletonCard as MoonUISkeletonCard, SkeletonText as MoonUISkeletonText, Slider as MoonUISlider, SwipeableCard as MoonUISwipeableCard, Switch as MoonUISwitch, Table as MoonUITable, TableBody as MoonUITableBody, TableCaption as MoonUITableCaption, TableCell as MoonUITableCell, TableFooter as MoonUITableFooter, TableHead as MoonUITableHead, TableHeader as MoonUITableHeader, TableRow as MoonUITableRow, Tabs as MoonUITabs, TabsContent as MoonUITabsContent, TabsList as MoonUITabsList, TabsTrigger as MoonUITabsTrigger, TagsInput as MoonUITagsInput, Textarea as MoonUITextarea, Toast as MoonUIToast, ToastAction as MoonUIToastAction, ToastClose as MoonUIToastClose, ToastDescription as MoonUIToastDescription, ToastProvider as MoonUIToastProvider, ToastTitle as MoonUIToastTitle, ToastViewport as MoonUIToastViewport, Toaster as MoonUIToaster, Toggle2 as MoonUIToggle, Tooltip as MoonUITooltip, TooltipContent as MoonUITooltipContent, TooltipProvider as MoonUITooltipProvider, TooltipTrigger as MoonUITooltipTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PhoneInput, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, PopoverTrigger, ProBadge, ProComponentWrapper, Progress, RadioGroup2 as RadioGroup, RadioGroupItem, RadioItemWithLabel, RadioLabel, RichTextEditor, ScrollArea2 as ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SimpleColorPicker, SimpleEditor, SimpleTooltip, Skeleton, SkeletonAvatar, SkeletonCard, SkeletonText, Slider, SwipeableCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, Textarea, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle2 as Toggle, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, aspectRatioVariants, badgeVariants, buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, badgeVariants as moonUIBadgeVariants, buttonVariants as moonUIButtonVariants, createSortableHeader as moonUICreateSortableHeader, skeletonVariants as moonUISkeletonVariants, toggleVariants as moonUIToggleVariants, popoverContentVariants, progressVariants, separatorVariants, skeletonVariants, toast, toggleVariants, tooltipVariants, useToast };
12633
12379
  //# sourceMappingURL=out.js.map
12634
12380
  //# sourceMappingURL=index.mjs.map