@bison-lab/ui 0.20.0 → 1.0.0
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.d.mts +48 -23
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +138 -330
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -5
package/dist/index.mjs
CHANGED
|
@@ -6,15 +6,14 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { AnimatePresence, motion } from "motion/react";
|
|
7
7
|
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, ContextMenu as ContextMenu$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1, unstable_PasswordToggleField } from "radix-ui";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
|
-
import {
|
|
10
|
-
import { faAlignCenter, faAlignLeft, faAlignRight, faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsUpDown, faBars, faBold, faCalendar, faCamera, faCheck, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faChevronsLeft, faChevronsRight, faCircle, faCircleCheck, faCircleExclamation, faCircleInfo, faCircleXmark, faCode, faEllipsis, faEnvelope, faEye, faEyeSlash, faFileCircleQuestion, faForward, faH1, faH2, faH3, faImage, faInbox, faItalic, faLink, faLinkSlash, faList, faListOl, faMagnifyingGlass, faMinus, faPen, faPlus, faQuoteLeft, faRightFromBracket, faRotateLeft, faRotateRight, faServer, faShieldExclamation, faSidebarFlip, faSlidersUp, faSpinnerThird, faStrikethrough, faTriangleExclamation, faUnderline, faUpDown, faWrench, faXmark } from "@fortawesome/pro-regular-svg-icons";
|
|
9
|
+
import { AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bold, Calendar as Calendar$1, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CircleX, Code, Eye, EyeOff, FastForward, FileQuestion, Heading1, Heading2, Heading3, Image, Inbox, Info, Italic, Link, List, ListOrdered, LoaderCircle, LogOut, Mail, Menu, Minus, MoreHorizontal, PanelLeft, Pencil, Plus, Quote, Redo, Search, Server, Settings2, ShieldAlert, Strikethrough, TriangleAlert, Underline, Undo, Unlink, Wrench, X } from "lucide-react";
|
|
11
10
|
import { DayPicker } from "react-day-picker";
|
|
12
11
|
import { endOfMonth, endOfWeek, format, startOfMonth, startOfWeek, startOfYear, subDays, subMonths, subYears } from "date-fns";
|
|
13
12
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
14
13
|
import StarterKit from "@tiptap/starter-kit";
|
|
15
14
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
16
|
-
import Link from "@tiptap/extension-link";
|
|
17
|
-
import Underline from "@tiptap/extension-underline";
|
|
15
|
+
import Link$1 from "@tiptap/extension-link";
|
|
16
|
+
import Underline$1 from "@tiptap/extension-underline";
|
|
18
17
|
import TextAlign from "@tiptap/extension-text-align";
|
|
19
18
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
20
19
|
import { flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
@@ -599,12 +598,7 @@ const Button = React.forwardRef(({ className, variant, size, fullWidth, asChild
|
|
|
599
598
|
}), /* @__PURE__ */ jsx("span", {
|
|
600
599
|
"aria-hidden": "true",
|
|
601
600
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
602
|
-
children: /* @__PURE__ */ jsx(
|
|
603
|
-
icon: faSpinnerThird,
|
|
604
|
-
spin: true,
|
|
605
|
-
className: spinnerSizeClass,
|
|
606
|
-
style: { "--fa-animation-duration": "0.6s" }
|
|
607
|
-
})
|
|
601
|
+
children: /* @__PURE__ */ jsx(LoaderCircle, { className: cn("animate-spin", spinnerSizeClass) })
|
|
608
602
|
})] }) : children
|
|
609
603
|
});
|
|
610
604
|
});
|
|
@@ -702,14 +696,8 @@ const PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
702
696
|
className: "absolute right-0 top-0 flex h-full w-10 items-center justify-center text-muted-foreground hover:text-foreground transition-colors disabled:pointer-events-none disabled:opacity-50",
|
|
703
697
|
disabled: props.disabled,
|
|
704
698
|
children: /* @__PURE__ */ jsx(unstable_PasswordToggleField.Icon, {
|
|
705
|
-
visible: /* @__PURE__ */ jsx(
|
|
706
|
-
|
|
707
|
-
className: "h-4 w-4"
|
|
708
|
-
}),
|
|
709
|
-
hidden: /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
710
|
-
icon: faEye,
|
|
711
|
-
className: "h-4 w-4"
|
|
712
|
-
})
|
|
699
|
+
visible: /* @__PURE__ */ jsx(EyeOff, { className: "h-4 w-4" }),
|
|
700
|
+
hidden: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
|
|
713
701
|
})
|
|
714
702
|
})]
|
|
715
703
|
}) });
|
|
@@ -832,6 +820,41 @@ const CurrencyInput = React.forwardRef(({ className, value, onChange, symbol = "
|
|
|
832
820
|
});
|
|
833
821
|
CurrencyInput.displayName = "CurrencyInput";
|
|
834
822
|
//#endregion
|
|
823
|
+
//#region src/components/phone-input.tsx
|
|
824
|
+
const PHONE_MAX_DIGITS = 10;
|
|
825
|
+
const PHONE_MAX_LENGTH = 14;
|
|
826
|
+
/** Strips non-digits and caps at 10 (US NANP). */
|
|
827
|
+
function parseUsPhoneDigits(value) {
|
|
828
|
+
return value.replace(/\D/g, "").slice(0, PHONE_MAX_DIGITS);
|
|
829
|
+
}
|
|
830
|
+
function formatPhoneDisplay(digits) {
|
|
831
|
+
const d = parseUsPhoneDigits(digits);
|
|
832
|
+
if (d.length <= 3) return d;
|
|
833
|
+
if (d.length <= 6) return `(${d.slice(0, 3)}) ${d.slice(3)}`;
|
|
834
|
+
return `(${d.slice(0, 3)}) ${d.slice(3, 6)}-${d.slice(6)}`;
|
|
835
|
+
}
|
|
836
|
+
const PhoneInput = React.forwardRef(function PhoneInput({ value: valueProp, defaultValue = "", onChange, autoComplete = "tel", ...props }, ref) {
|
|
837
|
+
const isControlled = valueProp !== void 0;
|
|
838
|
+
const [uncontrolledDigits, setUncontrolledDigits] = React.useState(() => parseUsPhoneDigits(defaultValue));
|
|
839
|
+
const display = formatPhoneDisplay(isControlled ? parseUsPhoneDigits(valueProp ?? "") : uncontrolledDigits);
|
|
840
|
+
function handleChange(event) {
|
|
841
|
+
const next = parseUsPhoneDigits(event.target.value);
|
|
842
|
+
if (!isControlled) setUncontrolledDigits(next);
|
|
843
|
+
onChange?.(next);
|
|
844
|
+
}
|
|
845
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
846
|
+
ref,
|
|
847
|
+
...props,
|
|
848
|
+
type: "text",
|
|
849
|
+
inputMode: "tel",
|
|
850
|
+
autoComplete,
|
|
851
|
+
maxLength: PHONE_MAX_LENGTH,
|
|
852
|
+
value: display,
|
|
853
|
+
onChange: handleChange
|
|
854
|
+
});
|
|
855
|
+
});
|
|
856
|
+
PhoneInput.displayName = "PhoneInput";
|
|
857
|
+
//#endregion
|
|
835
858
|
//#region src/components/label.tsx
|
|
836
859
|
const labelVariants = cva("inline-block text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70", {
|
|
837
860
|
variants: { layout: {
|
|
@@ -904,10 +927,7 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
904
927
|
...props,
|
|
905
928
|
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
|
|
906
929
|
asChild: true,
|
|
907
|
-
children: /* @__PURE__ */ jsx(
|
|
908
|
-
icon: faChevronDown,
|
|
909
|
-
className: "h-4 w-4 opacity-50"
|
|
910
|
-
})
|
|
930
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" })
|
|
911
931
|
})]
|
|
912
932
|
}));
|
|
913
933
|
SelectTrigger.displayName = Select$1.Trigger.displayName;
|
|
@@ -915,20 +935,14 @@ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) =>
|
|
|
915
935
|
ref,
|
|
916
936
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
917
937
|
...props,
|
|
918
|
-
children: /* @__PURE__ */ jsx(
|
|
919
|
-
icon: faChevronUp,
|
|
920
|
-
className: "h-4 w-4"
|
|
921
|
-
})
|
|
938
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
922
939
|
}));
|
|
923
940
|
SelectScrollUpButton.displayName = Select$1.ScrollUpButton.displayName;
|
|
924
941
|
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollDownButton, {
|
|
925
942
|
ref,
|
|
926
943
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
927
944
|
...props,
|
|
928
|
-
children: /* @__PURE__ */ jsx(
|
|
929
|
-
icon: faChevronDown,
|
|
930
|
-
className: "h-4 w-4"
|
|
931
|
-
})
|
|
945
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
932
946
|
}));
|
|
933
947
|
SelectScrollDownButton.displayName = Select$1.ScrollDownButton.displayName;
|
|
934
948
|
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsxs(Select$1.Content, {
|
|
@@ -958,10 +972,7 @@ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
958
972
|
...props,
|
|
959
973
|
children: [/* @__PURE__ */ jsx("span", {
|
|
960
974
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
961
|
-
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
962
|
-
icon: faCheck,
|
|
963
|
-
className: "h-4 w-4"
|
|
964
|
-
}) })
|
|
975
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
965
976
|
}), /* @__PURE__ */ jsx(Select$1.ItemText, { children })]
|
|
966
977
|
}));
|
|
967
978
|
SelectItem.displayName = Select$1.Item.displayName;
|
|
@@ -1001,12 +1012,7 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
|
|
|
1001
1012
|
hidden: "invisible",
|
|
1002
1013
|
...classNames
|
|
1003
1014
|
},
|
|
1004
|
-
components: { Chevron: ({ orientation }) => {
|
|
1005
|
-
return /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
1006
|
-
icon: orientation === "left" ? faChevronLeft : faChevronRight,
|
|
1007
|
-
className: "h-4 w-4"
|
|
1008
|
-
});
|
|
1009
|
-
} },
|
|
1015
|
+
components: { Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) },
|
|
1010
1016
|
...props
|
|
1011
1017
|
});
|
|
1012
1018
|
};
|
|
@@ -1041,10 +1047,7 @@ const DatePicker = React.forwardRef(({ value, onChange, placeholder = "Pick a da
|
|
|
1041
1047
|
variant: "outline",
|
|
1042
1048
|
disabled,
|
|
1043
1049
|
className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
|
|
1044
|
-
children: [/* @__PURE__ */ jsx(
|
|
1045
|
-
icon: faCalendar,
|
|
1046
|
-
className: "mr-2 h-4 w-4"
|
|
1047
|
-
}), value ? format(value, dateFormat) : /* @__PURE__ */ jsx("span", { children: placeholder })]
|
|
1050
|
+
children: [/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }), value ? format(value, dateFormat) : /* @__PURE__ */ jsx("span", { children: placeholder })]
|
|
1048
1051
|
})
|
|
1049
1052
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
1050
1053
|
className: "w-auto p-0",
|
|
@@ -1189,10 +1192,7 @@ const DateRangePicker = React.forwardRef(({ value, onChange, placeholder = "Pick
|
|
|
1189
1192
|
variant: "outline",
|
|
1190
1193
|
disabled,
|
|
1191
1194
|
className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", showClear && "pr-9", className),
|
|
1192
|
-
children: [/* @__PURE__ */ jsx(
|
|
1193
|
-
icon: faCalendar,
|
|
1194
|
-
className: "mr-2 h-4 w-4"
|
|
1195
|
-
}), value?.from ? value.to ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1195
|
+
children: [/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }), value?.from ? value.to ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1196
1196
|
format(value.from, dateFormat),
|
|
1197
1197
|
" –",
|
|
1198
1198
|
" ",
|
|
@@ -1208,10 +1208,7 @@ const DateRangePicker = React.forwardRef(({ value, onChange, placeholder = "Pick
|
|
|
1208
1208
|
if (e.key === "Enter" || e.key === " ") handleClear(e);
|
|
1209
1209
|
},
|
|
1210
1210
|
className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-full text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
1211
|
-
children: /* @__PURE__ */ jsx(
|
|
1212
|
-
icon: faCircleXmark,
|
|
1213
|
-
className: "h-4 w-4"
|
|
1214
|
-
})
|
|
1211
|
+
children: /* @__PURE__ */ jsx(CircleX, { className: "h-4 w-4" })
|
|
1215
1212
|
})]
|
|
1216
1213
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
1217
1214
|
className: "w-auto p-0",
|
|
@@ -1322,46 +1319,31 @@ const EditorToolbar = ({ editor, toolbar = defaultToolbar }) => {
|
|
|
1322
1319
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
1323
1320
|
isActive: editor.isActive("bold"),
|
|
1324
1321
|
tooltip: "Bold",
|
|
1325
|
-
children: /* @__PURE__ */ jsx(
|
|
1326
|
-
icon: faBold,
|
|
1327
|
-
className: "h-4 w-4"
|
|
1328
|
-
})
|
|
1322
|
+
children: /* @__PURE__ */ jsx(Bold, { className: "h-4 w-4" })
|
|
1329
1323
|
}),
|
|
1330
1324
|
has("italic") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1331
1325
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
1332
1326
|
isActive: editor.isActive("italic"),
|
|
1333
1327
|
tooltip: "Italic",
|
|
1334
|
-
children: /* @__PURE__ */ jsx(
|
|
1335
|
-
icon: faItalic,
|
|
1336
|
-
className: "h-4 w-4"
|
|
1337
|
-
})
|
|
1328
|
+
children: /* @__PURE__ */ jsx(Italic, { className: "h-4 w-4" })
|
|
1338
1329
|
}),
|
|
1339
1330
|
has("underline") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1340
1331
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
1341
1332
|
isActive: editor.isActive("underline"),
|
|
1342
1333
|
tooltip: "Underline",
|
|
1343
|
-
children: /* @__PURE__ */ jsx(
|
|
1344
|
-
icon: faUnderline,
|
|
1345
|
-
className: "h-4 w-4"
|
|
1346
|
-
})
|
|
1334
|
+
children: /* @__PURE__ */ jsx(Underline, { className: "h-4 w-4" })
|
|
1347
1335
|
}),
|
|
1348
1336
|
has("strike") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1349
1337
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
1350
1338
|
isActive: editor.isActive("strike"),
|
|
1351
1339
|
tooltip: "Strikethrough",
|
|
1352
|
-
children: /* @__PURE__ */ jsx(
|
|
1353
|
-
icon: faStrikethrough,
|
|
1354
|
-
className: "h-4 w-4"
|
|
1355
|
-
})
|
|
1340
|
+
children: /* @__PURE__ */ jsx(Strikethrough, { className: "h-4 w-4" })
|
|
1356
1341
|
}),
|
|
1357
1342
|
has("code") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1358
1343
|
onClick: () => editor.chain().focus().toggleCode().run(),
|
|
1359
1344
|
isActive: editor.isActive("code"),
|
|
1360
1345
|
tooltip: "Code",
|
|
1361
|
-
children: /* @__PURE__ */ jsx(
|
|
1362
|
-
icon: faCode,
|
|
1363
|
-
className: "h-4 w-4"
|
|
1364
|
-
})
|
|
1346
|
+
children: /* @__PURE__ */ jsx(Code, { className: "h-4 w-4" })
|
|
1365
1347
|
}),
|
|
1366
1348
|
(has("bold") || has("italic") || has("underline") || has("strike") || has("code")) && (has("heading") || has("bulletList") || has("orderedList") || has("blockquote")) && /* @__PURE__ */ jsx(Separator, {
|
|
1367
1349
|
orientation: "vertical",
|
|
@@ -1372,64 +1354,43 @@ const EditorToolbar = ({ editor, toolbar = defaultToolbar }) => {
|
|
|
1372
1354
|
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
1373
1355
|
isActive: editor.isActive("heading", { level: 1 }),
|
|
1374
1356
|
tooltip: "Heading 1",
|
|
1375
|
-
children: /* @__PURE__ */ jsx(
|
|
1376
|
-
icon: faH1,
|
|
1377
|
-
className: "h-4 w-4"
|
|
1378
|
-
})
|
|
1357
|
+
children: /* @__PURE__ */ jsx(Heading1, { className: "h-4 w-4" })
|
|
1379
1358
|
}),
|
|
1380
1359
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
1381
1360
|
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
1382
1361
|
isActive: editor.isActive("heading", { level: 2 }),
|
|
1383
1362
|
tooltip: "Heading 2",
|
|
1384
|
-
children: /* @__PURE__ */ jsx(
|
|
1385
|
-
icon: faH2,
|
|
1386
|
-
className: "h-4 w-4"
|
|
1387
|
-
})
|
|
1363
|
+
children: /* @__PURE__ */ jsx(Heading2, { className: "h-4 w-4" })
|
|
1388
1364
|
}),
|
|
1389
1365
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
1390
1366
|
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
1391
1367
|
isActive: editor.isActive("heading", { level: 3 }),
|
|
1392
1368
|
tooltip: "Heading 3",
|
|
1393
|
-
children: /* @__PURE__ */ jsx(
|
|
1394
|
-
icon: faH3,
|
|
1395
|
-
className: "h-4 w-4"
|
|
1396
|
-
})
|
|
1369
|
+
children: /* @__PURE__ */ jsx(Heading3, { className: "h-4 w-4" })
|
|
1397
1370
|
})
|
|
1398
1371
|
] }),
|
|
1399
1372
|
has("bulletList") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1400
1373
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
1401
1374
|
isActive: editor.isActive("bulletList"),
|
|
1402
1375
|
tooltip: "Bullet list",
|
|
1403
|
-
children: /* @__PURE__ */ jsx(
|
|
1404
|
-
icon: faList,
|
|
1405
|
-
className: "h-4 w-4"
|
|
1406
|
-
})
|
|
1376
|
+
children: /* @__PURE__ */ jsx(List, { className: "h-4 w-4" })
|
|
1407
1377
|
}),
|
|
1408
1378
|
has("orderedList") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1409
1379
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
1410
1380
|
isActive: editor.isActive("orderedList"),
|
|
1411
1381
|
tooltip: "Ordered list",
|
|
1412
|
-
children: /* @__PURE__ */ jsx(
|
|
1413
|
-
icon: faListOl,
|
|
1414
|
-
className: "h-4 w-4"
|
|
1415
|
-
})
|
|
1382
|
+
children: /* @__PURE__ */ jsx(ListOrdered, { className: "h-4 w-4" })
|
|
1416
1383
|
}),
|
|
1417
1384
|
has("blockquote") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1418
1385
|
onClick: () => editor.chain().focus().toggleBlockquote().run(),
|
|
1419
1386
|
isActive: editor.isActive("blockquote"),
|
|
1420
1387
|
tooltip: "Blockquote",
|
|
1421
|
-
children: /* @__PURE__ */ jsx(
|
|
1422
|
-
icon: faQuoteLeft,
|
|
1423
|
-
className: "h-4 w-4"
|
|
1424
|
-
})
|
|
1388
|
+
children: /* @__PURE__ */ jsx(Quote, { className: "h-4 w-4" })
|
|
1425
1389
|
}),
|
|
1426
1390
|
has("horizontalRule") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1427
1391
|
onClick: () => editor.chain().focus().setHorizontalRule().run(),
|
|
1428
1392
|
tooltip: "Horizontal rule",
|
|
1429
|
-
children: /* @__PURE__ */ jsx(
|
|
1430
|
-
icon: faMinus,
|
|
1431
|
-
className: "h-4 w-4"
|
|
1432
|
-
})
|
|
1393
|
+
children: /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4" })
|
|
1433
1394
|
}),
|
|
1434
1395
|
(has("heading") || has("bulletList") || has("orderedList") || has("blockquote")) && (has("link") || has("align")) && /* @__PURE__ */ jsx(Separator, {
|
|
1435
1396
|
orientation: "vertical",
|
|
@@ -1439,41 +1400,26 @@ const EditorToolbar = ({ editor, toolbar = defaultToolbar }) => {
|
|
|
1439
1400
|
onClick: handleLink,
|
|
1440
1401
|
isActive: editor.isActive("link"),
|
|
1441
1402
|
tooltip: editor.isActive("link") ? "Remove link" : "Add link",
|
|
1442
|
-
children: editor.isActive("link") ? /* @__PURE__ */ jsx(
|
|
1443
|
-
icon: faLinkSlash,
|
|
1444
|
-
className: "h-4 w-4"
|
|
1445
|
-
}) : /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
1446
|
-
icon: faLink,
|
|
1447
|
-
className: "h-4 w-4"
|
|
1448
|
-
})
|
|
1403
|
+
children: editor.isActive("link") ? /* @__PURE__ */ jsx(Unlink, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(Link, { className: "h-4 w-4" })
|
|
1449
1404
|
}),
|
|
1450
1405
|
has("align") && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1451
1406
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
1452
1407
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
1453
1408
|
isActive: editor.isActive({ textAlign: "left" }),
|
|
1454
1409
|
tooltip: "Align left",
|
|
1455
|
-
children: /* @__PURE__ */ jsx(
|
|
1456
|
-
icon: faAlignLeft,
|
|
1457
|
-
className: "h-4 w-4"
|
|
1458
|
-
})
|
|
1410
|
+
children: /* @__PURE__ */ jsx(AlignLeft, { className: "h-4 w-4" })
|
|
1459
1411
|
}),
|
|
1460
1412
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
1461
1413
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
1462
1414
|
isActive: editor.isActive({ textAlign: "center" }),
|
|
1463
1415
|
tooltip: "Align center",
|
|
1464
|
-
children: /* @__PURE__ */ jsx(
|
|
1465
|
-
icon: faAlignCenter,
|
|
1466
|
-
className: "h-4 w-4"
|
|
1467
|
-
})
|
|
1416
|
+
children: /* @__PURE__ */ jsx(AlignCenter, { className: "h-4 w-4" })
|
|
1468
1417
|
}),
|
|
1469
1418
|
/* @__PURE__ */ jsx(ToolbarButton, {
|
|
1470
1419
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
1471
1420
|
isActive: editor.isActive({ textAlign: "right" }),
|
|
1472
1421
|
tooltip: "Align right",
|
|
1473
|
-
children: /* @__PURE__ */ jsx(
|
|
1474
|
-
icon: faAlignRight,
|
|
1475
|
-
className: "h-4 w-4"
|
|
1476
|
-
})
|
|
1422
|
+
children: /* @__PURE__ */ jsx(AlignRight, { className: "h-4 w-4" })
|
|
1477
1423
|
})
|
|
1478
1424
|
] }),
|
|
1479
1425
|
(has("link") || has("align")) && (has("undo") || has("redo")) && /* @__PURE__ */ jsx(Separator, {
|
|
@@ -1484,19 +1430,13 @@ const EditorToolbar = ({ editor, toolbar = defaultToolbar }) => {
|
|
|
1484
1430
|
onClick: () => editor.chain().focus().undo().run(),
|
|
1485
1431
|
disabled: !editor.can().undo(),
|
|
1486
1432
|
tooltip: "Undo",
|
|
1487
|
-
children: /* @__PURE__ */ jsx(
|
|
1488
|
-
icon: faRotateLeft,
|
|
1489
|
-
className: "h-4 w-4"
|
|
1490
|
-
})
|
|
1433
|
+
children: /* @__PURE__ */ jsx(Undo, { className: "h-4 w-4" })
|
|
1491
1434
|
}),
|
|
1492
1435
|
has("redo") && /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1493
1436
|
onClick: () => editor.chain().focus().redo().run(),
|
|
1494
1437
|
disabled: !editor.can().redo(),
|
|
1495
1438
|
tooltip: "Redo",
|
|
1496
|
-
children: /* @__PURE__ */ jsx(
|
|
1497
|
-
icon: faRotateRight,
|
|
1498
|
-
className: "h-4 w-4"
|
|
1499
|
-
})
|
|
1439
|
+
children: /* @__PURE__ */ jsx(Redo, { className: "h-4 w-4" })
|
|
1500
1440
|
})
|
|
1501
1441
|
]
|
|
1502
1442
|
})
|
|
@@ -1512,8 +1452,8 @@ const TextEditor = React.forwardRef(({ value, onChange, placeholder = "Start wri
|
|
|
1512
1452
|
3
|
|
1513
1453
|
] } }),
|
|
1514
1454
|
Placeholder.configure({ placeholder }),
|
|
1515
|
-
Underline,
|
|
1516
|
-
Link.configure({
|
|
1455
|
+
Underline$1,
|
|
1456
|
+
Link$1.configure({
|
|
1517
1457
|
openOnClick: false,
|
|
1518
1458
|
HTMLAttributes: { class: "text-primary underline underline-offset-4 cursor-pointer" }
|
|
1519
1459
|
}),
|
|
@@ -1698,29 +1638,22 @@ const alertVariants = cva("flex w-full items-start gap-3 rounded-[var(--radius-m
|
|
|
1698
1638
|
defaultVariants: { variant: "default" }
|
|
1699
1639
|
});
|
|
1700
1640
|
const defaultIcons = {
|
|
1701
|
-
default:
|
|
1702
|
-
destructive:
|
|
1703
|
-
success:
|
|
1704
|
-
warning:
|
|
1705
|
-
danger:
|
|
1706
|
-
info:
|
|
1641
|
+
default: /* @__PURE__ */ jsx(Info, { className: "size-4" }),
|
|
1642
|
+
destructive: /* @__PURE__ */ jsx(ShieldAlert, { className: "size-4" }),
|
|
1643
|
+
success: /* @__PURE__ */ jsx(CircleCheck, { className: "size-4" }),
|
|
1644
|
+
warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "size-4" }),
|
|
1645
|
+
danger: /* @__PURE__ */ jsx(CircleAlert, { className: "size-4" }),
|
|
1646
|
+
info: /* @__PURE__ */ jsx(Info, { className: "size-4" })
|
|
1707
1647
|
};
|
|
1708
|
-
const Alert = React.forwardRef(({ className, variant = "default", showIcon = false, icon,
|
|
1648
|
+
const Alert = React.forwardRef(({ className, variant = "default", showIcon = false, icon, dismissable = false, onDismiss, children, ...props }, ref) => {
|
|
1709
1649
|
const [dismissed, setDismissed] = React.useState(false);
|
|
1710
1650
|
if (dismissed) return null;
|
|
1711
|
-
const resolvedIcon = icon ?? defaultIcons[variant ?? "default"];
|
|
1712
|
-
const leading =
|
|
1651
|
+
const resolvedIcon = icon ?? (showIcon ? defaultIcons[variant ?? "default"] : null);
|
|
1652
|
+
const leading = resolvedIcon ? /* @__PURE__ */ jsx("span", {
|
|
1713
1653
|
className: "mt-0.5 inline-flex shrink-0 [&_svg]:shrink-0",
|
|
1714
1654
|
"data-alert-icon": "",
|
|
1715
|
-
children: iconSlot
|
|
1716
|
-
}) : iconSlot == null && Boolean(showIcon && resolvedIcon) ? /* @__PURE__ */ jsx("span", {
|
|
1717
|
-
className: "mt-0.5 inline-flex shrink-0",
|
|
1718
|
-
"data-alert-icon": "",
|
|
1719
1655
|
"aria-hidden": true,
|
|
1720
|
-
children:
|
|
1721
|
-
icon: resolvedIcon,
|
|
1722
|
-
className: "size-4"
|
|
1723
|
-
})
|
|
1656
|
+
children: resolvedIcon
|
|
1724
1657
|
}) : null;
|
|
1725
1658
|
const handleDismiss = () => {
|
|
1726
1659
|
setDismissed(true);
|
|
@@ -1742,10 +1675,7 @@ const Alert = React.forwardRef(({ className, variant = "default", showIcon = fal
|
|
|
1742
1675
|
onClick: handleDismiss,
|
|
1743
1676
|
className: "shrink-0 self-start rounded-[var(--radius-sm)] p-1.5 opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-2",
|
|
1744
1677
|
"aria-label": "Dismiss",
|
|
1745
|
-
children: /* @__PURE__ */ jsx(
|
|
1746
|
-
icon: faXmark,
|
|
1747
|
-
className: "size-4"
|
|
1748
|
-
})
|
|
1678
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4" })
|
|
1749
1679
|
}) : null
|
|
1750
1680
|
]
|
|
1751
1681
|
});
|
|
@@ -1852,10 +1782,7 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
1852
1782
|
...props,
|
|
1853
1783
|
children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
1854
1784
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
|
|
1855
|
-
children: [/* @__PURE__ */ jsx(
|
|
1856
|
-
icon: faXmark,
|
|
1857
|
-
className: "h-4 w-4"
|
|
1858
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1785
|
+
children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
1859
1786
|
className: "sr-only",
|
|
1860
1787
|
children: "Close"
|
|
1861
1788
|
})]
|
|
@@ -2027,10 +1954,7 @@ const SheetContent = React.forwardRef(({ side = "right", size = "sm", className,
|
|
|
2027
1954
|
...props,
|
|
2028
1955
|
children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
|
|
2029
1956
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
2030
|
-
children: [/* @__PURE__ */ jsx(
|
|
2031
|
-
icon: faXmark,
|
|
2032
|
-
className: "h-4 w-4"
|
|
2033
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1957
|
+
children: [/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
2034
1958
|
className: "sr-only",
|
|
2035
1959
|
children: "Close"
|
|
2036
1960
|
})]
|
|
@@ -2075,10 +1999,7 @@ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, .
|
|
|
2075
1999
|
ref,
|
|
2076
2000
|
className: cn(menuItemClasses, "data-[state=open]:bg-accent", inset && "pl-8", className),
|
|
2077
2001
|
...props,
|
|
2078
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
2079
|
-
icon: faChevronRight,
|
|
2080
|
-
className: "ml-auto h-4 w-4"
|
|
2081
|
-
})]
|
|
2002
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })]
|
|
2082
2003
|
}));
|
|
2083
2004
|
DropdownMenuSubTrigger.displayName = DropdownMenu$1.SubTrigger.displayName;
|
|
2084
2005
|
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu$1.SubContent, {
|
|
@@ -2107,10 +2028,7 @@ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checke
|
|
|
2107
2028
|
...props,
|
|
2108
2029
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2109
2030
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
2110
|
-
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
2111
|
-
icon: faCheck,
|
|
2112
|
-
className: "h-4 w-4"
|
|
2113
|
-
}) })
|
|
2031
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
2114
2032
|
}), children]
|
|
2115
2033
|
}));
|
|
2116
2034
|
DropdownMenuCheckboxItem.displayName = DropdownMenu$1.CheckboxItem.displayName;
|
|
@@ -2120,10 +2038,7 @@ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props
|
|
|
2120
2038
|
...props,
|
|
2121
2039
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2122
2040
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
2123
|
-
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
2124
|
-
icon: faCircle,
|
|
2125
|
-
className: "h-2 w-2 fill-current"
|
|
2126
|
-
}) })
|
|
2041
|
+
children: /* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) })
|
|
2127
2042
|
}), children]
|
|
2128
2043
|
}));
|
|
2129
2044
|
DropdownMenuRadioItem.displayName = DropdownMenu$1.RadioItem.displayName;
|
|
@@ -2406,20 +2321,17 @@ const stepperIndicatorVariants = cva("relative z-10 inline-flex shrink-0 items-c
|
|
|
2406
2321
|
const StepperIndicator = React.forwardRef(({ className, icon, children, style, ...props }, ref) => {
|
|
2407
2322
|
const { state, index } = useStepperItemContext("StepperIndicator");
|
|
2408
2323
|
let inner;
|
|
2409
|
-
if (state === "completed") inner = /* @__PURE__ */ jsx(
|
|
2410
|
-
icon: faCheck,
|
|
2324
|
+
if (state === "completed") inner = /* @__PURE__ */ jsx(Check, {
|
|
2411
2325
|
className: "h-4 w-4",
|
|
2412
2326
|
"aria-hidden": "true"
|
|
2413
2327
|
});
|
|
2414
|
-
else if (state === "skipped") inner = /* @__PURE__ */ jsx(
|
|
2415
|
-
icon: faForward,
|
|
2328
|
+
else if (state === "skipped") inner = /* @__PURE__ */ jsx(FastForward, {
|
|
2416
2329
|
className: "h-4 w-4",
|
|
2417
2330
|
"aria-hidden": "true"
|
|
2418
2331
|
});
|
|
2419
|
-
else if (icon) inner = /* @__PURE__ */ jsx(
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
"aria-hidden": "true"
|
|
2332
|
+
else if (icon !== void 0 && icon !== null) inner = /* @__PURE__ */ jsx("span", {
|
|
2333
|
+
className: "inline-flex h-4 w-4 items-center justify-center [&_svg]:h-4 [&_svg]:w-4",
|
|
2334
|
+
children: icon
|
|
2423
2335
|
});
|
|
2424
2336
|
else if (children !== void 0) inner = children;
|
|
2425
2337
|
else inner = index + 1;
|
|
@@ -2489,10 +2401,7 @@ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, re
|
|
|
2489
2401
|
ref,
|
|
2490
2402
|
className: cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className),
|
|
2491
2403
|
...props,
|
|
2492
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
2493
|
-
icon: faChevronDown,
|
|
2494
|
-
className: "h-4 w-4 shrink-0 transition-transform duration-normal"
|
|
2495
|
-
})]
|
|
2404
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-normal" })]
|
|
2496
2405
|
})
|
|
2497
2406
|
}));
|
|
2498
2407
|
AccordionTrigger.displayName = Accordion$1.Trigger.displayName;
|
|
@@ -2591,16 +2500,7 @@ function DataTableColumnHeader({ column, title, className }) {
|
|
|
2591
2500
|
size: "sm",
|
|
2592
2501
|
className: cn("-ml-3 h-8 data-[state=open]:bg-accent", className),
|
|
2593
2502
|
onClick: () => column.toggleSorting(sorted === "asc"),
|
|
2594
|
-
children: [title, sorted === "asc" ? /* @__PURE__ */ jsx(
|
|
2595
|
-
icon: faArrowUp,
|
|
2596
|
-
className: "ml-2 h-3.5 w-3.5"
|
|
2597
|
-
}) : sorted === "desc" ? /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
2598
|
-
icon: faArrowDown,
|
|
2599
|
-
className: "ml-2 h-3.5 w-3.5"
|
|
2600
|
-
}) : /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
2601
|
-
icon: faArrowsUpDown,
|
|
2602
|
-
className: "ml-2 h-3.5 w-3.5 text-muted-foreground/50"
|
|
2603
|
-
})]
|
|
2503
|
+
children: [title, sorted === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "ml-2 h-3.5 w-3.5" }) : sorted === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "ml-2 h-3.5 w-3.5" }) : /* @__PURE__ */ jsx(ArrowUpDown, { className: "ml-2 h-3.5 w-3.5 text-muted-foreground/50" })]
|
|
2604
2504
|
});
|
|
2605
2505
|
}
|
|
2606
2506
|
DataTableColumnHeader.displayName = "DataTableColumnHeader";
|
|
@@ -2726,10 +2626,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
|
|
|
2726
2626
|
variant: "outline",
|
|
2727
2627
|
size: "sm",
|
|
2728
2628
|
className: "ml-auto h-8",
|
|
2729
|
-
children: [/* @__PURE__ */ jsx(
|
|
2730
|
-
icon: faSlidersUp,
|
|
2731
|
-
className: "mr-2 h-4 w-4"
|
|
2732
|
-
}), "Columns"]
|
|
2629
|
+
children: [/* @__PURE__ */ jsx(Settings2, { className: "mr-2 h-4 w-4" }), "Columns"]
|
|
2733
2630
|
})
|
|
2734
2631
|
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
2735
2632
|
align: "end",
|
|
@@ -2820,10 +2717,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
|
|
|
2820
2717
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2821
2718
|
className: "sr-only",
|
|
2822
2719
|
children: "Go to first page"
|
|
2823
|
-
}), /* @__PURE__ */ jsx(
|
|
2824
|
-
icon: faChevronsLeft,
|
|
2825
|
-
className: "h-4 w-4"
|
|
2826
|
-
})]
|
|
2720
|
+
}), /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })]
|
|
2827
2721
|
}),
|
|
2828
2722
|
/* @__PURE__ */ jsxs(Button, {
|
|
2829
2723
|
variant: "outline",
|
|
@@ -2834,10 +2728,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
|
|
|
2834
2728
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2835
2729
|
className: "sr-only",
|
|
2836
2730
|
children: "Go to previous page"
|
|
2837
|
-
}), /* @__PURE__ */ jsx(
|
|
2838
|
-
icon: faChevronLeft,
|
|
2839
|
-
className: "h-4 w-4"
|
|
2840
|
-
})]
|
|
2731
|
+
}), /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })]
|
|
2841
2732
|
}),
|
|
2842
2733
|
/* @__PURE__ */ jsxs(Button, {
|
|
2843
2734
|
variant: "outline",
|
|
@@ -2848,10 +2739,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
|
|
|
2848
2739
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2849
2740
|
className: "sr-only",
|
|
2850
2741
|
children: "Go to next page"
|
|
2851
|
-
}), /* @__PURE__ */ jsx(
|
|
2852
|
-
icon: faChevronRight,
|
|
2853
|
-
className: "h-4 w-4"
|
|
2854
|
-
})]
|
|
2742
|
+
}), /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })]
|
|
2855
2743
|
}),
|
|
2856
2744
|
/* @__PURE__ */ jsxs(Button, {
|
|
2857
2745
|
variant: "outline",
|
|
@@ -2862,10 +2750,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
|
|
|
2862
2750
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2863
2751
|
className: "sr-only",
|
|
2864
2752
|
children: "Go to last page"
|
|
2865
|
-
}), /* @__PURE__ */ jsx(
|
|
2866
|
-
icon: faChevronsRight,
|
|
2867
|
-
className: "h-4 w-4"
|
|
2868
|
-
})]
|
|
2753
|
+
}), /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })]
|
|
2869
2754
|
})
|
|
2870
2755
|
]
|
|
2871
2756
|
})
|
|
@@ -3004,11 +2889,7 @@ function Spinner({ className, size, ...props }) {
|
|
|
3004
2889
|
return /* @__PURE__ */ jsx("span", {
|
|
3005
2890
|
className: cn(spinnerVariants({ size }), className),
|
|
3006
2891
|
...props,
|
|
3007
|
-
children: /* @__PURE__ */ jsx(
|
|
3008
|
-
icon: faSpinnerThird,
|
|
3009
|
-
spin: true,
|
|
3010
|
-
className: "h-full w-full"
|
|
3011
|
-
})
|
|
2892
|
+
children: /* @__PURE__ */ jsx(LoaderCircle, { className: "h-full w-full animate-spin" })
|
|
3012
2893
|
});
|
|
3013
2894
|
}
|
|
3014
2895
|
//#endregion
|
|
@@ -3132,10 +3013,7 @@ const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ..
|
|
|
3132
3013
|
ref,
|
|
3133
3014
|
className: cn(menuItemClasses, "data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className),
|
|
3134
3015
|
...props,
|
|
3135
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
3136
|
-
icon: faChevronRight,
|
|
3137
|
-
className: "ml-auto h-4 w-4"
|
|
3138
|
-
})]
|
|
3016
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })]
|
|
3139
3017
|
}));
|
|
3140
3018
|
ContextMenuSubTrigger.displayName = ContextMenu$1.SubTrigger.displayName;
|
|
3141
3019
|
const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenu$1.SubContent, {
|
|
@@ -3163,10 +3041,7 @@ const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked
|
|
|
3163
3041
|
...props,
|
|
3164
3042
|
children: [/* @__PURE__ */ jsx("span", {
|
|
3165
3043
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
3166
|
-
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
3167
|
-
icon: faCheck,
|
|
3168
|
-
className: "h-4 w-4"
|
|
3169
|
-
}) })
|
|
3044
|
+
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
3170
3045
|
}), children]
|
|
3171
3046
|
}));
|
|
3172
3047
|
ContextMenuCheckboxItem.displayName = ContextMenu$1.CheckboxItem.displayName;
|
|
@@ -3176,10 +3051,7 @@ const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }
|
|
|
3176
3051
|
...props,
|
|
3177
3052
|
children: [/* @__PURE__ */ jsx("span", {
|
|
3178
3053
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
3179
|
-
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(
|
|
3180
|
-
icon: faCircle,
|
|
3181
|
-
className: "h-2 w-2 fill-current"
|
|
3182
|
-
}) })
|
|
3054
|
+
children: /* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) })
|
|
3183
3055
|
}), children]
|
|
3184
3056
|
}));
|
|
3185
3057
|
ContextMenuRadioItem.displayName = ContextMenu$1.RadioItem.displayName;
|
|
@@ -3223,8 +3095,7 @@ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props
|
|
|
3223
3095
|
children: [
|
|
3224
3096
|
children,
|
|
3225
3097
|
" ",
|
|
3226
|
-
/* @__PURE__ */ jsx(
|
|
3227
|
-
icon: faChevronDown,
|
|
3098
|
+
/* @__PURE__ */ jsx(ChevronDown, {
|
|
3228
3099
|
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180",
|
|
3229
3100
|
"aria-hidden": "true"
|
|
3230
3101
|
})
|
|
@@ -3296,7 +3167,7 @@ const BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__
|
|
|
3296
3167
|
"aria-hidden": "true",
|
|
3297
3168
|
className: cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className),
|
|
3298
3169
|
...props,
|
|
3299
|
-
children: children ?? /* @__PURE__ */ jsx(
|
|
3170
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
|
|
3300
3171
|
});
|
|
3301
3172
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
3302
3173
|
const BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
|
|
@@ -3304,10 +3175,7 @@ const BreadcrumbEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("sp
|
|
|
3304
3175
|
"aria-hidden": "true",
|
|
3305
3176
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3306
3177
|
...props,
|
|
3307
|
-
children: [/* @__PURE__ */ jsx(
|
|
3308
|
-
icon: faEllipsis,
|
|
3309
|
-
className: "h-4 w-4"
|
|
3310
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
3178
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
3311
3179
|
className: "sr-only",
|
|
3312
3180
|
children: "More"
|
|
3313
3181
|
})]
|
|
@@ -3348,10 +3216,7 @@ const PaginationPrevious = ({ className, ...props }) => /* @__PURE__ */ jsxs(Pag
|
|
|
3348
3216
|
size: "md",
|
|
3349
3217
|
className: cn("gap-1 pl-2.5", className),
|
|
3350
3218
|
...props,
|
|
3351
|
-
children: [/* @__PURE__ */ jsx(
|
|
3352
|
-
icon: faChevronLeft,
|
|
3353
|
-
className: "h-4 w-4"
|
|
3354
|
-
}), /* @__PURE__ */ jsx("span", { children: "Previous" })]
|
|
3219
|
+
children: [/* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "Previous" })]
|
|
3355
3220
|
});
|
|
3356
3221
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
3357
3222
|
const PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs(PaginationLink, {
|
|
@@ -3359,20 +3224,14 @@ const PaginationNext = ({ className, ...props }) => /* @__PURE__ */ jsxs(Paginat
|
|
|
3359
3224
|
size: "md",
|
|
3360
3225
|
className: cn("gap-1 pr-2.5", className),
|
|
3361
3226
|
...props,
|
|
3362
|
-
children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(
|
|
3363
|
-
icon: faChevronRight,
|
|
3364
|
-
className: "h-4 w-4"
|
|
3365
|
-
})]
|
|
3227
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Next" }), /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })]
|
|
3366
3228
|
});
|
|
3367
3229
|
PaginationNext.displayName = "PaginationNext";
|
|
3368
3230
|
const PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsxs("span", {
|
|
3369
3231
|
"aria-hidden": true,
|
|
3370
3232
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
3371
3233
|
...props,
|
|
3372
|
-
children: [/* @__PURE__ */ jsx(
|
|
3373
|
-
icon: faEllipsis,
|
|
3374
|
-
className: "h-4 w-4"
|
|
3375
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
3234
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
|
|
3376
3235
|
className: "sr-only",
|
|
3377
3236
|
children: "More pages"
|
|
3378
3237
|
})]
|
|
@@ -3399,10 +3258,7 @@ const CommandDialog = ({ children, ...props }) => /* @__PURE__ */ jsx(Dialog, {
|
|
|
3399
3258
|
const CommandInput = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", {
|
|
3400
3259
|
className: "flex items-center border-b px-3",
|
|
3401
3260
|
"cmdk-input-wrapper": "",
|
|
3402
|
-
children: [/* @__PURE__ */ jsx(
|
|
3403
|
-
icon: faMagnifyingGlass,
|
|
3404
|
-
className: "mr-2 h-4 w-4 shrink-0 opacity-50"
|
|
3405
|
-
}), /* @__PURE__ */ jsx(Command$1.Input, {
|
|
3261
|
+
children: [/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
|
|
3406
3262
|
ref,
|
|
3407
3263
|
className: cn("flex h-11 w-full rounded-md bg-transparent py-3 text-base sm:text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
3408
3264
|
...props
|
|
@@ -3559,7 +3415,7 @@ const EditableTitle = React.forwardRef(({ className, size, value, onSave, onChan
|
|
|
3559
3415
|
onMouseDown: (e) => e.preventDefault(),
|
|
3560
3416
|
onClick: save,
|
|
3561
3417
|
"aria-label": "Save title",
|
|
3562
|
-
children: /* @__PURE__ */ jsx(
|
|
3418
|
+
children: /* @__PURE__ */ jsx(Check, {})
|
|
3563
3419
|
}),
|
|
3564
3420
|
/* @__PURE__ */ jsx(Button, {
|
|
3565
3421
|
type: "button",
|
|
@@ -3569,7 +3425,7 @@ const EditableTitle = React.forwardRef(({ className, size, value, onSave, onChan
|
|
|
3569
3425
|
onMouseDown: (e) => e.preventDefault(),
|
|
3570
3426
|
onClick: cancel,
|
|
3571
3427
|
"aria-label": "Cancel editing",
|
|
3572
|
-
children: /* @__PURE__ */ jsx(
|
|
3428
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
3573
3429
|
})
|
|
3574
3430
|
]
|
|
3575
3431
|
});
|
|
@@ -3600,7 +3456,7 @@ const EditableTitle = React.forwardRef(({ className, size, value, onSave, onChan
|
|
|
3600
3456
|
onClick: startEditing,
|
|
3601
3457
|
tabIndex: -1,
|
|
3602
3458
|
"aria-hidden": "true",
|
|
3603
|
-
children: /* @__PURE__ */ jsx(
|
|
3459
|
+
children: /* @__PURE__ */ jsx(Pencil, {})
|
|
3604
3460
|
}),
|
|
3605
3461
|
loading && /* @__PURE__ */ jsx("span", {
|
|
3606
3462
|
className: cn("inline-flex items-center justify-center shrink-0 rounded-md text-muted-foreground", loadingSpinnerWrapClass(size), "animate-spin pointer-events-none"),
|
|
@@ -3792,7 +3648,7 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
3792
3648
|
toggleSidebar();
|
|
3793
3649
|
},
|
|
3794
3650
|
...props,
|
|
3795
|
-
children: [/* @__PURE__ */ jsx(
|
|
3651
|
+
children: [/* @__PURE__ */ jsx(PanelLeft, {}), /* @__PURE__ */ jsx("span", {
|
|
3796
3652
|
className: "sr-only",
|
|
3797
3653
|
children: "Toggle Sidebar"
|
|
3798
3654
|
})]
|
|
@@ -4542,10 +4398,7 @@ function ForgotPasswordBlock({ onSubmit, onBack, loading = false, error, disable
|
|
|
4542
4398
|
children: success ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4543
4399
|
/* @__PURE__ */ jsx("div", {
|
|
4544
4400
|
className: "mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",
|
|
4545
|
-
children: /* @__PURE__ */ jsx(
|
|
4546
|
-
icon: faEnvelope,
|
|
4547
|
-
className: "h-6 w-6 text-primary"
|
|
4548
|
-
})
|
|
4401
|
+
children: /* @__PURE__ */ jsx(Mail, { className: "h-6 w-6 text-primary" })
|
|
4549
4402
|
}),
|
|
4550
4403
|
/* @__PURE__ */ jsx(CardTitle, { children: "Check your email" }),
|
|
4551
4404
|
/* @__PURE__ */ jsx(CardDescription, { children: "We've sent a password reset link to your email address." })
|
|
@@ -4581,10 +4434,7 @@ function ForgotPasswordBlock({ onSubmit, onBack, loading = false, error, disable
|
|
|
4581
4434
|
type: "button",
|
|
4582
4435
|
onClick: onBack,
|
|
4583
4436
|
className: "flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground mx-auto",
|
|
4584
|
-
children: [/* @__PURE__ */ jsx(
|
|
4585
|
-
icon: faArrowLeft,
|
|
4586
|
-
className: "h-4 w-4"
|
|
4587
|
-
}), " Back to sign in"]
|
|
4437
|
+
children: [/* @__PURE__ */ jsx(ArrowLeft, { className: "h-4 w-4" }), " Back to sign in"]
|
|
4588
4438
|
})
|
|
4589
4439
|
]
|
|
4590
4440
|
}) })]
|
|
@@ -4743,10 +4593,7 @@ function NotFoundBlock({ title = "Page not found", message = "Sorry, we couldn't
|
|
|
4743
4593
|
children: [
|
|
4744
4594
|
/* @__PURE__ */ jsx("div", {
|
|
4745
4595
|
className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-muted",
|
|
4746
|
-
children: /* @__PURE__ */ jsx(
|
|
4747
|
-
icon: faFileCircleQuestion,
|
|
4748
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
4749
|
-
})
|
|
4596
|
+
children: /* @__PURE__ */ jsx(FileQuestion, { className: "h-12 w-12 text-muted-foreground" })
|
|
4750
4597
|
}),
|
|
4751
4598
|
/* @__PURE__ */ jsx("h1", {
|
|
4752
4599
|
className: "text-4xl font-bold tracking-tight mb-2",
|
|
@@ -4781,10 +4628,7 @@ function ServerErrorBlock({ title = "Something went wrong", message = "An unexpe
|
|
|
4781
4628
|
children: [
|
|
4782
4629
|
/* @__PURE__ */ jsx("div", {
|
|
4783
4630
|
className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-destructive/10",
|
|
4784
|
-
children: /* @__PURE__ */ jsx(
|
|
4785
|
-
icon: faServer,
|
|
4786
|
-
className: "h-12 w-12 text-destructive"
|
|
4787
|
-
})
|
|
4631
|
+
children: /* @__PURE__ */ jsx(Server, { className: "h-12 w-12 text-destructive" })
|
|
4788
4632
|
}),
|
|
4789
4633
|
/* @__PURE__ */ jsx("h1", {
|
|
4790
4634
|
className: "text-4xl font-bold tracking-tight mb-2",
|
|
@@ -4827,10 +4671,7 @@ function MaintenanceBlock({ title = "Under maintenance", message = "We're perfor
|
|
|
4827
4671
|
children: [
|
|
4828
4672
|
/* @__PURE__ */ jsx("div", {
|
|
4829
4673
|
className: "mb-8 flex h-24 w-24 items-center justify-center rounded-full bg-muted",
|
|
4830
|
-
children: /* @__PURE__ */ jsx(
|
|
4831
|
-
icon: faWrench,
|
|
4832
|
-
className: "h-12 w-12 text-muted-foreground"
|
|
4833
|
-
})
|
|
4674
|
+
children: /* @__PURE__ */ jsx(Wrench, { className: "h-12 w-12 text-muted-foreground" })
|
|
4834
4675
|
}),
|
|
4835
4676
|
/* @__PURE__ */ jsx("h2", {
|
|
4836
4677
|
className: "text-xl font-semibold mb-2",
|
|
@@ -4852,18 +4693,15 @@ function MaintenanceBlock({ title = "Under maintenance", message = "We're perfor
|
|
|
4852
4693
|
}
|
|
4853
4694
|
//#endregion
|
|
4854
4695
|
//#region src/blocks/error/empty-state-block.tsx
|
|
4855
|
-
const EmptyStateBlock = React.forwardRef(({ icon
|
|
4696
|
+
const EmptyStateBlock = React.forwardRef(({ icon, title = "No results found", description = "There's nothing here yet. Get started by creating your first item.", actionLabel, onAction, className, ...props }, ref) => {
|
|
4856
4697
|
return /* @__PURE__ */ jsxs("div", {
|
|
4857
4698
|
ref,
|
|
4858
4699
|
className: cn("flex flex-col items-center justify-center text-center py-16 px-4", className),
|
|
4859
4700
|
...props,
|
|
4860
4701
|
children: [
|
|
4861
4702
|
/* @__PURE__ */ jsx("div", {
|
|
4862
|
-
className: "mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-muted",
|
|
4863
|
-
children: /* @__PURE__ */ jsx(
|
|
4864
|
-
icon,
|
|
4865
|
-
className: "h-8 w-8 text-muted-foreground"
|
|
4866
|
-
})
|
|
4703
|
+
className: "mb-6 flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground [&_svg]:h-8 [&_svg]:w-8",
|
|
4704
|
+
children: icon ?? /* @__PURE__ */ jsx(Inbox, {})
|
|
4867
4705
|
}),
|
|
4868
4706
|
/* @__PURE__ */ jsx("h3", {
|
|
4869
4707
|
className: "text-lg font-semibold mb-1",
|
|
@@ -4914,10 +4752,7 @@ function HeaderBlock({ logo, nav, actions, onMenuToggle, sticky = true, classNam
|
|
|
4914
4752
|
size: "icon",
|
|
4915
4753
|
className: "md:hidden",
|
|
4916
4754
|
onClick: onMenuToggle,
|
|
4917
|
-
children: [/* @__PURE__ */ jsx(
|
|
4918
|
-
icon: faBars,
|
|
4919
|
-
className: "h-5 w-5"
|
|
4920
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
4755
|
+
children: [/* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" }), /* @__PURE__ */ jsx("span", {
|
|
4921
4756
|
className: "sr-only",
|
|
4922
4757
|
children: "Toggle menu"
|
|
4923
4758
|
})]
|
|
@@ -5029,10 +4864,7 @@ function TeamSwitcher({ teams, activeTeam: activeTeamProp, onTeamChange, onAddTe
|
|
|
5029
4864
|
children: activeTeam.plan
|
|
5030
4865
|
})]
|
|
5031
4866
|
}),
|
|
5032
|
-
/* @__PURE__ */ jsx(
|
|
5033
|
-
icon: faUpDown,
|
|
5034
|
-
className: "ml-auto"
|
|
5035
|
-
})
|
|
4867
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-auto" })
|
|
5036
4868
|
]
|
|
5037
4869
|
})
|
|
5038
4870
|
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
@@ -5065,10 +4897,7 @@ function TeamSwitcher({ teams, activeTeam: activeTeamProp, onTeamChange, onAddTe
|
|
|
5065
4897
|
onClick: onAddTeam,
|
|
5066
4898
|
children: [/* @__PURE__ */ jsx("div", {
|
|
5067
4899
|
className: "flex size-6 items-center justify-center rounded-md border bg-transparent",
|
|
5068
|
-
children: /* @__PURE__ */ jsx(
|
|
5069
|
-
icon: faPlus,
|
|
5070
|
-
className: "size-4"
|
|
5071
|
-
})
|
|
4900
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "size-4" })
|
|
5072
4901
|
}), /* @__PURE__ */ jsx("div", {
|
|
5073
4902
|
className: "font-medium text-muted-foreground",
|
|
5074
4903
|
children: "Add team"
|
|
@@ -5090,12 +4919,9 @@ function SidebarNav({ groups }) {
|
|
|
5090
4919
|
children: /* @__PURE__ */ jsxs(SidebarMenuButton, {
|
|
5091
4920
|
tooltip: item.title,
|
|
5092
4921
|
children: [
|
|
5093
|
-
item.icon
|
|
4922
|
+
item.icon,
|
|
5094
4923
|
/* @__PURE__ */ jsx("span", { children: item.title }),
|
|
5095
|
-
/* @__PURE__ */ jsx(
|
|
5096
|
-
icon: faChevronRight,
|
|
5097
|
-
className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"
|
|
5098
|
-
})
|
|
4924
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
5099
4925
|
]
|
|
5100
4926
|
})
|
|
5101
4927
|
}), /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx(SidebarMenuSub, { children: item.items.map((subItem) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(SidebarMenuSubButton, {
|
|
@@ -5125,7 +4951,7 @@ function SidebarNav({ groups }) {
|
|
|
5125
4951
|
item.onClick();
|
|
5126
4952
|
}
|
|
5127
4953
|
},
|
|
5128
|
-
children: [item.icon
|
|
4954
|
+
children: [item.icon, /* @__PURE__ */ jsx("span", { children: item.title })]
|
|
5129
4955
|
})
|
|
5130
4956
|
}) }, item.title);
|
|
5131
4957
|
}) })] }, group.label ?? groupIdx)) });
|
|
@@ -5163,10 +4989,7 @@ function SidebarUserNav({ user, menuGroups, onLogout }) {
|
|
|
5163
4989
|
children: user.email
|
|
5164
4990
|
})]
|
|
5165
4991
|
}),
|
|
5166
|
-
/* @__PURE__ */ jsx(
|
|
5167
|
-
icon: faUpDown,
|
|
5168
|
-
className: "ml-auto size-4"
|
|
5169
|
-
})
|
|
4992
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-auto size-4" })
|
|
5170
4993
|
]
|
|
5171
4994
|
})
|
|
5172
4995
|
}), /* @__PURE__ */ jsxs(DropdownMenuContent, {
|
|
@@ -5202,12 +5025,12 @@ function SidebarUserNav({ user, menuGroups, onLogout }) {
|
|
|
5202
5025
|
}),
|
|
5203
5026
|
menuGroups?.map((group, groupIdx) => /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx(DropdownMenuSeparator, {}), /* @__PURE__ */ jsx(DropdownMenuGroup, { children: group.map((item) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
5204
5027
|
onClick: item.onClick,
|
|
5205
|
-
children: [item.icon
|
|
5028
|
+
children: [item.icon, item.label]
|
|
5206
5029
|
}, item.label)) })] }, groupIdx)),
|
|
5207
5030
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
5208
5031
|
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
5209
5032
|
onClick: onLogout,
|
|
5210
|
-
children: [/* @__PURE__ */ jsx(
|
|
5033
|
+
children: [/* @__PURE__ */ jsx(LogOut, {}), "Log out"]
|
|
5211
5034
|
})
|
|
5212
5035
|
]
|
|
5213
5036
|
})] }) }) });
|
|
@@ -5237,7 +5060,7 @@ function AppSidebarBlock({ teams, activeTeam, onTeamChange, onAddTeam, navGroups
|
|
|
5237
5060
|
}
|
|
5238
5061
|
//#endregion
|
|
5239
5062
|
//#region src/blocks/data-display/media-card.tsx
|
|
5240
|
-
const MediaCard = React.forwardRef(({ image, fallbackIcon
|
|
5063
|
+
const MediaCard = React.forwardRef(({ image, fallbackIcon, badge, title, description, meta, footer, href, onAction, loading, disabled, className, ...props }, ref) => {
|
|
5241
5064
|
return /* @__PURE__ */ jsx(href ? "a" : "div", {
|
|
5242
5065
|
...href ? {
|
|
5243
5066
|
href,
|
|
@@ -5257,11 +5080,8 @@ const MediaCard = React.forwardRef(({ image, fallbackIcon = faImage, badge, titl
|
|
|
5257
5080
|
alt: image.alt,
|
|
5258
5081
|
className: "h-full w-full object-cover"
|
|
5259
5082
|
}) : /* @__PURE__ */ jsx("div", {
|
|
5260
|
-
className: "flex h-full w-full items-center justify-center bg-muted",
|
|
5261
|
-
children: /* @__PURE__ */ jsx(
|
|
5262
|
-
icon: fallbackIcon,
|
|
5263
|
-
className: "h-10 w-10 text-muted-foreground"
|
|
5264
|
-
})
|
|
5083
|
+
className: "flex h-full w-full items-center justify-center bg-muted text-muted-foreground [&_svg]:h-10 [&_svg]:w-10",
|
|
5084
|
+
children: fallbackIcon ?? /* @__PURE__ */ jsx(Image, {})
|
|
5265
5085
|
})
|
|
5266
5086
|
}), badge && /* @__PURE__ */ jsx("div", {
|
|
5267
5087
|
className: "absolute top-2 right-2",
|
|
@@ -5278,29 +5098,20 @@ const MediaCard = React.forwardRef(({ image, fallbackIcon = faImage, badge, titl
|
|
|
5278
5098
|
meta && meta.length > 0 && /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", {
|
|
5279
5099
|
className: "flex flex-wrap gap-x-4 gap-y-1 text-sm text-muted-foreground",
|
|
5280
5100
|
children: meta.map((item, i) => /* @__PURE__ */ jsxs("span", {
|
|
5281
|
-
className: "inline-flex items-center gap-1.5",
|
|
5282
|
-
children: [item.icon
|
|
5283
|
-
icon: item.icon,
|
|
5284
|
-
className: "h-3.5 w-3.5"
|
|
5285
|
-
}), item.label]
|
|
5101
|
+
className: "inline-flex items-center gap-1.5 [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
5102
|
+
children: [item.icon, item.label]
|
|
5286
5103
|
}, i))
|
|
5287
5104
|
}) }),
|
|
5288
5105
|
footer && /* @__PURE__ */ jsx(CardFooter, { children: href ? /* @__PURE__ */ jsxs("span", {
|
|
5289
5106
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary",
|
|
5290
|
-
children: [footer, /* @__PURE__ */ jsx(
|
|
5291
|
-
icon: faArrowRight,
|
|
5292
|
-
className: "h-3.5 w-3.5"
|
|
5293
|
-
})]
|
|
5107
|
+
children: [footer, /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })]
|
|
5294
5108
|
}) : /* @__PURE__ */ jsxs(Button, {
|
|
5295
5109
|
variant: "ghost",
|
|
5296
5110
|
size: "sm",
|
|
5297
5111
|
onClick: onAction,
|
|
5298
5112
|
disabled: disabled || loading,
|
|
5299
5113
|
className: "gap-1.5 px-0 text-primary hover:text-primary/80",
|
|
5300
|
-
children: [footer, /* @__PURE__ */ jsx(
|
|
5301
|
-
icon: faArrowRight,
|
|
5302
|
-
className: "h-3.5 w-3.5"
|
|
5303
|
-
})]
|
|
5114
|
+
children: [footer, /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })]
|
|
5304
5115
|
}) })
|
|
5305
5116
|
]
|
|
5306
5117
|
})
|
|
@@ -5355,10 +5166,7 @@ function ProfileSettingsBlock({ initialData, onSave, onAvatarChange, loading = f
|
|
|
5355
5166
|
onClick: handleAvatarClick,
|
|
5356
5167
|
disabled: loading || disabled,
|
|
5357
5168
|
className: "absolute inset-0 flex items-center justify-center rounded-full bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
5358
|
-
children: /* @__PURE__ */ jsx(
|
|
5359
|
-
icon: faCamera,
|
|
5360
|
-
className: "h-5 w-5 text-white"
|
|
5361
|
-
})
|
|
5169
|
+
children: /* @__PURE__ */ jsx(Camera, { className: "h-5 w-5 text-white" })
|
|
5362
5170
|
}),
|
|
5363
5171
|
/* @__PURE__ */ jsx("input", {
|
|
5364
5172
|
ref: fileInputRef,
|
|
@@ -5589,6 +5397,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
|
|
|
5589
5397
|
});
|
|
5590
5398
|
}
|
|
5591
5399
|
//#endregion
|
|
5592
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, Label, MaintenanceBlock, MediaCard, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5400
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, Label, MaintenanceBlock, MediaCard, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5593
5401
|
|
|
5594
5402
|
//# sourceMappingURL=index.mjs.map
|