@yuhuanowo/yunui 0.1.8 → 0.2.1

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { cn } from './chunk-N7JHOWGR.js';
3
3
  import { useYunUI } from './chunk-T37N6OZA.js';
4
- import * as React from 'react';
4
+ import * as React7 from 'react';
5
5
  import { forwardRef, useState, useEffect, useRef, useCallback, useId } from 'react';
6
6
  import * as DialogPrimitive from '@radix-ui/react-dialog';
7
7
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
@@ -12,9 +12,11 @@ import * as ProgressPrimitive from '@radix-ui/react-progress';
12
12
  import * as TabsPrimitive from '@radix-ui/react-tabs';
13
13
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
14
14
  import { motion, AnimatePresence, useSpring, useTransform } from 'framer-motion';
15
- import { Check, Loader2, AlertCircle, X, ChevronDown, ChevronRight, CheckCircle2, CheckCircle, Info, RefreshCw, Trash2, Search, ArrowRight, AlertTriangle } from 'lucide-react';
15
+ import { Check, ChevronDown, ChevronLeft, ChevronRight, Loader2, AlertCircle, X, CheckCircle2, CheckCircle, Info, RefreshCw, Trash2, Search, ArrowRight, AlertTriangle } from 'lucide-react';
16
16
  import { createPortal } from 'react-dom';
17
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
18
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
19
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
18
20
  import * as Primitive from '@radix-ui/react-collapsible';
19
21
  import * as PopoverPrimitive from '@radix-ui/react-popover';
20
22
  import { Toaster as Toaster$1, toast as toast$1 } from 'sonner';
@@ -573,6 +575,7 @@ var Checkbox = forwardRef(
573
575
  className: `
574
576
  w-4 h-4 rounded border-2 flex items-center justify-center
575
577
  transition-all duration-200 ease-in-out
578
+ outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background
576
579
  ${checked ? "bg-primary border-primary text-primary-foreground" : "border-slate-300 dark:border-slate-600 bg-transparent hover:border-primary/50"}
577
580
  ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
578
581
  ${className}
@@ -752,7 +755,523 @@ function Combobox({
752
755
  ] }) }) })
753
756
  ] });
754
757
  }
755
- var Button = React.forwardRef(
758
+ var Accordion = AccordionPrimitive.Root;
759
+ var AccordionItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
760
+ AccordionPrimitive.Item,
761
+ {
762
+ ref,
763
+ className: cn(
764
+ "rounded-xl border border-(--border-default) bg-(--bg-elevated) overflow-hidden",
765
+ "data-[state=open]:border-(--border-strong) transition-colors",
766
+ className
767
+ ),
768
+ ...props
769
+ }
770
+ ));
771
+ AccordionItem.displayName = AccordionPrimitive.Item.displayName;
772
+ var AccordionTrigger = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
773
+ AccordionPrimitive.Trigger,
774
+ {
775
+ ref,
776
+ className: cn(
777
+ "flex flex-1 items-center justify-between gap-2 px-4 py-3 text-sm font-medium text-left",
778
+ "transition-colors hover:bg-(--bg-hover)",
779
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/20",
780
+ "disabled:cursor-not-allowed disabled:opacity-50",
781
+ "[&[data-state=open]>svg]:rotate-180",
782
+ className
783
+ ),
784
+ ...props,
785
+ children: [
786
+ children,
787
+ /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
788
+ ]
789
+ }
790
+ ) }));
791
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
792
+ var AccordionContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
793
+ AccordionPrimitive.Content,
794
+ {
795
+ ref,
796
+ className: cn(
797
+ "grid text-sm text-muted-foreground",
798
+ "transition-[grid-template-rows] duration-200 ease-out",
799
+ "data-[state=closed]:grid-rows-[0fr] data-[state=open]:grid-rows-[1fr]",
800
+ className
801
+ ),
802
+ ...props,
803
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "px-4 pb-3 pt-0", children }) })
804
+ }
805
+ ));
806
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
807
+ var RadioGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
808
+ RadioGroupPrimitive.Root,
809
+ {
810
+ ref,
811
+ className: cn("grid gap-2", className),
812
+ ...props
813
+ }
814
+ ));
815
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
816
+ var RadioGroupItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
817
+ RadioGroupPrimitive.Item,
818
+ {
819
+ ref,
820
+ className: cn(
821
+ "h-4 w-4 shrink-0 rounded-full border-2 flex items-center justify-center",
822
+ "border-slate-300 dark:border-slate-600 bg-transparent",
823
+ "transition-all duration-200 ease-in-out",
824
+ "hover:border-primary/50",
825
+ "data-[state=checked]:border-primary",
826
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/20",
827
+ "disabled:cursor-not-allowed disabled:opacity-50",
828
+ className
829
+ ),
830
+ ...props,
831
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-primary" }) })
832
+ }
833
+ ));
834
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
835
+ var gapMap = {
836
+ 0: "gap-0",
837
+ 1: "gap-1",
838
+ 2: "gap-2",
839
+ 3: "gap-3",
840
+ 4: "gap-4",
841
+ 5: "gap-5",
842
+ 6: "gap-6",
843
+ 8: "gap-8",
844
+ 10: "gap-10",
845
+ 12: "gap-12"
846
+ };
847
+ var paddingMap = {
848
+ 0: "p-0",
849
+ 1: "p-1",
850
+ 2: "p-2",
851
+ 3: "p-3",
852
+ 4: "p-4",
853
+ 5: "p-5",
854
+ 6: "p-6",
855
+ 8: "p-8",
856
+ 10: "p-10",
857
+ 12: "p-12"
858
+ };
859
+ var pxMap = {
860
+ 0: "px-0",
861
+ 1: "px-1",
862
+ 2: "px-2",
863
+ 3: "px-3",
864
+ 4: "px-4",
865
+ 5: "px-5",
866
+ 6: "px-6",
867
+ 8: "px-8",
868
+ 10: "px-10",
869
+ 12: "px-12"
870
+ };
871
+ var pyMap = {
872
+ 0: "py-0",
873
+ 1: "py-1",
874
+ 2: "py-2",
875
+ 3: "py-3",
876
+ 4: "py-4",
877
+ 5: "py-5",
878
+ 6: "py-6",
879
+ 8: "py-8",
880
+ 10: "py-10",
881
+ 12: "py-12"
882
+ };
883
+ var directionMap = {
884
+ row: "flex-row",
885
+ col: "flex-col",
886
+ "row-reverse": "flex-row-reverse",
887
+ "col-reverse": "flex-col-reverse"
888
+ };
889
+ var alignMap = {
890
+ start: "items-start",
891
+ center: "items-center",
892
+ end: "items-end",
893
+ stretch: "items-stretch",
894
+ baseline: "items-baseline"
895
+ };
896
+ var justifyMap = {
897
+ start: "justify-start",
898
+ center: "justify-center",
899
+ end: "justify-end",
900
+ between: "justify-between",
901
+ around: "justify-around",
902
+ evenly: "justify-evenly"
903
+ };
904
+ var colsMap = {
905
+ 1: "grid-cols-1",
906
+ 2: "grid-cols-2",
907
+ 3: "grid-cols-3",
908
+ 4: "grid-cols-4",
909
+ 5: "grid-cols-5",
910
+ 6: "grid-cols-6",
911
+ 7: "grid-cols-7",
912
+ 8: "grid-cols-8",
913
+ 9: "grid-cols-9",
914
+ 10: "grid-cols-10",
915
+ 11: "grid-cols-11",
916
+ 12: "grid-cols-12"
917
+ };
918
+ var rowsMap = {
919
+ 1: "grid-rows-1",
920
+ 2: "grid-rows-2",
921
+ 3: "grid-rows-3",
922
+ 4: "grid-rows-4",
923
+ 5: "grid-rows-5",
924
+ 6: "grid-rows-6",
925
+ 7: "grid-rows-7",
926
+ 8: "grid-rows-8",
927
+ 9: "grid-rows-9",
928
+ 10: "grid-rows-10",
929
+ 11: "grid-rows-11",
930
+ 12: "grid-rows-12"
931
+ };
932
+ var Flex = React7.forwardRef(
933
+ ({
934
+ as,
935
+ direction = "row",
936
+ align,
937
+ justify,
938
+ gap,
939
+ wrap,
940
+ padding,
941
+ px,
942
+ py,
943
+ className,
944
+ children,
945
+ ...props
946
+ }, ref) => {
947
+ const Comp = as ?? "div";
948
+ return /* @__PURE__ */ jsx(
949
+ Comp,
950
+ {
951
+ ref,
952
+ className: cn(
953
+ "flex",
954
+ directionMap[direction],
955
+ align && alignMap[align],
956
+ justify && justifyMap[justify],
957
+ gap !== void 0 && gapMap[gap],
958
+ wrap && "flex-wrap",
959
+ padding !== void 0 && paddingMap[padding],
960
+ px !== void 0 && pxMap[px],
961
+ py !== void 0 && pyMap[py],
962
+ className
963
+ ),
964
+ ...props,
965
+ children
966
+ }
967
+ );
968
+ }
969
+ );
970
+ Flex.displayName = "Flex";
971
+ var Grid = React7.forwardRef(
972
+ ({ as, columns, rows, gap, align, padding, className, children, ...props }, ref) => {
973
+ const Comp = as ?? "div";
974
+ return /* @__PURE__ */ jsx(
975
+ Comp,
976
+ {
977
+ ref,
978
+ className: cn(
979
+ "grid",
980
+ columns !== void 0 && colsMap[columns],
981
+ rows !== void 0 && rowsMap[rows],
982
+ gap !== void 0 && gapMap[gap],
983
+ align && alignMap[align],
984
+ padding !== void 0 && paddingMap[padding],
985
+ className
986
+ ),
987
+ ...props,
988
+ children
989
+ }
990
+ );
991
+ }
992
+ );
993
+ Grid.displayName = "Grid";
994
+ var Column = React7.forwardRef(
995
+ (props, ref) => /* @__PURE__ */ jsx(Flex, { ref, direction: "col", ...props })
996
+ );
997
+ Column.displayName = "Column";
998
+ var Row = React7.forwardRef(
999
+ (props, ref) => /* @__PURE__ */ jsx(Flex, { ref, direction: "row", ...props })
1000
+ );
1001
+ Row.displayName = "Row";
1002
+ var Stack = React7.forwardRef(
1003
+ ({ gap = 4, ...props }, ref) => /* @__PURE__ */ jsx(Flex, { ref, direction: "col", gap, ...props })
1004
+ );
1005
+ Stack.displayName = "Stack";
1006
+ var Table = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("relative w-full overflow-x-auto", containerClassName), children: /* @__PURE__ */ jsx(
1007
+ "table",
1008
+ {
1009
+ ref,
1010
+ className: cn("w-full caption-bottom border-collapse text-sm", className),
1011
+ ...props
1012
+ }
1013
+ ) }));
1014
+ Table.displayName = "Table";
1015
+ var TableHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1016
+ "thead",
1017
+ {
1018
+ ref,
1019
+ className: cn("[&_tr]:border-b [&_tr]:border-(--border-default)", className),
1020
+ ...props
1021
+ }
1022
+ ));
1023
+ TableHeader.displayName = "TableHeader";
1024
+ var TableBody = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1025
+ "tbody",
1026
+ {
1027
+ ref,
1028
+ className: cn("[&_tr:last-child]:border-0", className),
1029
+ ...props
1030
+ }
1031
+ ));
1032
+ TableBody.displayName = "TableBody";
1033
+ var TableFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1034
+ "tfoot",
1035
+ {
1036
+ ref,
1037
+ className: cn(
1038
+ "border-t border-(--border-default) bg-muted/30 font-medium [&>tr]:last:border-b-0",
1039
+ className
1040
+ ),
1041
+ ...props
1042
+ }
1043
+ ));
1044
+ TableFooter.displayName = "TableFooter";
1045
+ var TableRow = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1046
+ "tr",
1047
+ {
1048
+ ref,
1049
+ className: cn(
1050
+ "border-b border-(--border-default) transition-colors hover:bg-(--bg-hover) data-[state=selected]:bg-muted",
1051
+ className
1052
+ ),
1053
+ ...props
1054
+ }
1055
+ ));
1056
+ TableRow.displayName = "TableRow";
1057
+ var TableHead = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1058
+ "th",
1059
+ {
1060
+ ref,
1061
+ className: cn(
1062
+ "h-10 px-4 text-left align-middle text-[11px] font-medium uppercase tracking-wider text-muted-foreground [&:has([role=checkbox])]:pr-0",
1063
+ className
1064
+ ),
1065
+ ...props
1066
+ }
1067
+ ));
1068
+ TableHead.displayName = "TableHead";
1069
+ var TableCell = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1070
+ "td",
1071
+ {
1072
+ ref,
1073
+ className: cn("px-4 py-3 align-middle [&:has([role=checkbox])]:pr-0", className),
1074
+ ...props
1075
+ }
1076
+ ));
1077
+ TableCell.displayName = "TableCell";
1078
+ var TableCaption = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1079
+ "caption",
1080
+ {
1081
+ ref,
1082
+ className: cn("mt-4 text-sm text-muted-foreground", className),
1083
+ ...props
1084
+ }
1085
+ ));
1086
+ TableCaption.displayName = "TableCaption";
1087
+ var Breadcrumb = React7.forwardRef(({ "aria-label": ariaLabel = "Breadcrumb", ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": ariaLabel, ...props }));
1088
+ Breadcrumb.displayName = "Breadcrumb";
1089
+ var BreadcrumbList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1090
+ "ol",
1091
+ {
1092
+ ref,
1093
+ className: cn(
1094
+ "flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground sm:gap-2.5",
1095
+ className
1096
+ ),
1097
+ ...props
1098
+ }
1099
+ ));
1100
+ BreadcrumbList.displayName = "BreadcrumbList";
1101
+ var BreadcrumbItem = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1102
+ "li",
1103
+ {
1104
+ ref,
1105
+ className: cn("inline-flex items-center gap-1.5", className),
1106
+ ...props
1107
+ }
1108
+ ));
1109
+ BreadcrumbItem.displayName = "BreadcrumbItem";
1110
+ function BreadcrumbLink({
1111
+ className,
1112
+ href,
1113
+ ...props
1114
+ }) {
1115
+ const { Link } = useYunUI();
1116
+ return /* @__PURE__ */ jsx(
1117
+ Link,
1118
+ {
1119
+ href,
1120
+ className: cn("transition-colors hover:text-foreground", className),
1121
+ ...props
1122
+ }
1123
+ );
1124
+ }
1125
+ BreadcrumbLink.displayName = "BreadcrumbLink";
1126
+ var BreadcrumbPage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1127
+ "span",
1128
+ {
1129
+ ref,
1130
+ role: "link",
1131
+ "aria-disabled": "true",
1132
+ "aria-current": "page",
1133
+ className: cn("font-medium text-foreground", className),
1134
+ ...props
1135
+ }
1136
+ ));
1137
+ BreadcrumbPage.displayName = "BreadcrumbPage";
1138
+ var BreadcrumbSeparator = ({
1139
+ children,
1140
+ className,
1141
+ ...props
1142
+ }) => /* @__PURE__ */ jsx(
1143
+ "li",
1144
+ {
1145
+ role: "presentation",
1146
+ "aria-hidden": "true",
1147
+ className: cn("[&>svg]:size-3.5 text-muted-foreground/60", className),
1148
+ ...props,
1149
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
1150
+ }
1151
+ );
1152
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
1153
+ var BreadcrumbEllipsis = ({
1154
+ className,
1155
+ ...props
1156
+ }) => /* @__PURE__ */ jsxs(
1157
+ "span",
1158
+ {
1159
+ role: "presentation",
1160
+ "aria-hidden": "true",
1161
+ className: cn("flex h-9 w-9 items-center justify-center", className),
1162
+ ...props,
1163
+ children: [
1164
+ /* @__PURE__ */ jsx("span", { className: "text-base leading-none", children: "\u2026" }),
1165
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
1166
+ ]
1167
+ }
1168
+ );
1169
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
1170
+ function getPageRange(page, totalPages, siblingCount) {
1171
+ const totalNumbers = siblingCount * 2 + 5;
1172
+ if (totalPages <= totalNumbers) {
1173
+ return Array.from({ length: totalPages }, (_, i) => i + 1);
1174
+ }
1175
+ const leftSibling = Math.max(page - siblingCount, 1);
1176
+ const rightSibling = Math.min(page + siblingCount, totalPages);
1177
+ const showLeftEllipsis = leftSibling > 2;
1178
+ const showRightEllipsis = rightSibling < totalPages - 1;
1179
+ const tokens = [1];
1180
+ if (showLeftEllipsis) {
1181
+ tokens.push("ellipsis");
1182
+ } else {
1183
+ for (let i = 2; i < leftSibling; i++) tokens.push(i);
1184
+ }
1185
+ for (let i = leftSibling; i <= rightSibling; i++) {
1186
+ if (i !== 1 && i !== totalPages) tokens.push(i);
1187
+ }
1188
+ if (showRightEllipsis) {
1189
+ tokens.push("ellipsis");
1190
+ } else {
1191
+ for (let i = rightSibling + 1; i < totalPages; i++) tokens.push(i);
1192
+ }
1193
+ if (totalPages > 1) tokens.push(totalPages);
1194
+ return tokens;
1195
+ }
1196
+ var navButton = "inline-flex h-9 min-w-9 items-center justify-center gap-1 rounded-xl border border-(--border-default) bg-(--bg-elevated) px-2 text-sm transition-all duration-200 hover:border-(--border-strong) hover:bg-(--bg-hover) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:opacity-50";
1197
+ var Pagination = React7.forwardRef(
1198
+ ({
1199
+ page,
1200
+ totalPages,
1201
+ onPageChange,
1202
+ siblingCount = 1,
1203
+ previousLabel = "Go to previous page",
1204
+ nextLabel = "Go to next page",
1205
+ ariaLabel = "Pagination",
1206
+ className,
1207
+ ...props
1208
+ }, ref) => {
1209
+ if (totalPages <= 1) return null;
1210
+ const tokens = getPageRange(page, totalPages, siblingCount);
1211
+ const isFirst = page <= 1;
1212
+ const isLast = page >= totalPages;
1213
+ return /* @__PURE__ */ jsxs(
1214
+ "nav",
1215
+ {
1216
+ ref,
1217
+ "aria-label": ariaLabel,
1218
+ className: cn("flex items-center justify-center gap-1.5", className),
1219
+ ...props,
1220
+ children: [
1221
+ /* @__PURE__ */ jsx(
1222
+ "button",
1223
+ {
1224
+ type: "button",
1225
+ "aria-label": previousLabel,
1226
+ disabled: isFirst,
1227
+ onClick: () => !isFirst && onPageChange(page - 1),
1228
+ className: navButton,
1229
+ children: /* @__PURE__ */ jsx(ChevronLeft, { size: 16 })
1230
+ }
1231
+ ),
1232
+ tokens.map(
1233
+ (token, i) => token === "ellipsis" ? /* @__PURE__ */ jsx(
1234
+ "span",
1235
+ {
1236
+ "aria-hidden": "true",
1237
+ className: "flex h-9 min-w-9 items-center justify-center text-muted-foreground",
1238
+ children: "\u2026"
1239
+ },
1240
+ `ellipsis-${i}`
1241
+ ) : /* @__PURE__ */ jsx(
1242
+ "button",
1243
+ {
1244
+ type: "button",
1245
+ "aria-label": `Go to page ${token}`,
1246
+ "aria-current": token === page ? "page" : void 0,
1247
+ onClick: () => onPageChange(token),
1248
+ className: cn(
1249
+ navButton,
1250
+ token === page && "border-primary bg-primary text-primary-foreground hover:border-primary hover:bg-primary"
1251
+ ),
1252
+ children: token
1253
+ },
1254
+ token
1255
+ )
1256
+ ),
1257
+ /* @__PURE__ */ jsx(
1258
+ "button",
1259
+ {
1260
+ type: "button",
1261
+ "aria-label": nextLabel,
1262
+ disabled: isLast,
1263
+ onClick: () => !isLast && onPageChange(page + 1),
1264
+ className: navButton,
1265
+ children: /* @__PURE__ */ jsx(ChevronRight, { size: 16 })
1266
+ }
1267
+ )
1268
+ ]
1269
+ }
1270
+ );
1271
+ }
1272
+ );
1273
+ Pagination.displayName = "Pagination";
1274
+ var Button = React7.forwardRef(
756
1275
  ({ className, variant = "default", size = "md", loading, disabled, asChild, children, ...props }, ref) => {
757
1276
  const variantMap = {
758
1277
  default: "btn-primary",
@@ -760,6 +1279,7 @@ var Button = React.forwardRef(
760
1279
  secondary: "btn-secondary",
761
1280
  ghost: "btn-ghost",
762
1281
  accent: "btn-accent",
1282
+ brand: "btn-brand",
763
1283
  outline: "btn-outline",
764
1284
  amber: "btn-amber",
765
1285
  red: "btn-red",
@@ -773,8 +1293,8 @@ var Button = React.forwardRef(
773
1293
  icon: "w-10 h-10 p-0"
774
1294
  };
775
1295
  const classes = cn("btn", variantClass, sizes[size], className);
776
- if (asChild && React.isValidElement(children)) {
777
- return React.cloneElement(children, {
1296
+ if (asChild && React7.isValidElement(children)) {
1297
+ return React7.cloneElement(children, {
778
1298
  className: cn(classes, children.props.className)
779
1299
  });
780
1300
  }
@@ -794,18 +1314,26 @@ var Button = React.forwardRef(
794
1314
  }
795
1315
  );
796
1316
  Button.displayName = "Button";
797
- var Input = React.forwardRef(
798
- ({ className, icon, error, ...props }, ref) => {
1317
+ var Input = React7.forwardRef(
1318
+ ({ className, icon, error, id, "aria-describedby": describedBy, ...props }, ref) => {
1319
+ const reactId = React7.useId();
1320
+ const fieldId = id ?? reactId;
1321
+ const errorId = error ? `${fieldId}-error` : void 0;
1322
+ const describedByIds = [describedBy, errorId].filter(Boolean).join(" ") || void 0;
799
1323
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
800
- icon && /* @__PURE__ */ jsx("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: icon }),
1324
+ icon && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: icon }),
801
1325
  /* @__PURE__ */ jsx(
802
1326
  "input",
803
1327
  {
804
1328
  ref,
1329
+ id: fieldId,
1330
+ "aria-invalid": error ? true : void 0,
1331
+ "aria-describedby": describedByIds,
805
1332
  className: cn(
806
1333
  "w-full h-10 px-4 bg-background border rounded-xl text-sm outline-none transition-colors",
807
1334
  "placeholder:text-muted-foreground",
808
1335
  "focus:border-ring focus:ring-2 focus:ring-ring/20",
1336
+ "disabled:opacity-50 disabled:cursor-not-allowed",
809
1337
  icon && "pl-10",
810
1338
  error ? "border-red-300 focus:border-red-400 dark:border-red-700" : "border-border",
811
1339
  className
@@ -813,40 +1341,48 @@ var Input = React.forwardRef(
813
1341
  ...props
814
1342
  }
815
1343
  ),
816
- error && /* @__PURE__ */ jsxs("p", { className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
817
- /* @__PURE__ */ jsx(AlertCircle, { className: "w-3 h-3" }),
1344
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1345
+ /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
818
1346
  error
819
1347
  ] })
820
1348
  ] });
821
1349
  }
822
1350
  );
823
1351
  Input.displayName = "Input";
824
- var Textarea = React.forwardRef(
825
- ({ className, error, ...props }, ref) => {
1352
+ var Textarea = React7.forwardRef(
1353
+ ({ className, error, id, "aria-describedby": describedBy, ...props }, ref) => {
1354
+ const reactId = React7.useId();
1355
+ const fieldId = id ?? reactId;
1356
+ const errorId = error ? `${fieldId}-error` : void 0;
1357
+ const describedByIds = [describedBy, errorId].filter(Boolean).join(" ") || void 0;
826
1358
  return /* @__PURE__ */ jsxs("div", { children: [
827
1359
  /* @__PURE__ */ jsx(
828
1360
  "textarea",
829
1361
  {
830
1362
  ref,
1363
+ id: fieldId,
1364
+ "aria-invalid": error ? true : void 0,
1365
+ "aria-describedby": describedByIds,
831
1366
  className: cn(
832
1367
  "w-full px-4 py-3 bg-background border rounded-xl text-sm outline-none transition-colors resize-none",
833
1368
  "placeholder:text-muted-foreground",
834
1369
  "focus:border-ring focus:ring-2 focus:ring-ring/20",
1370
+ "disabled:opacity-50 disabled:cursor-not-allowed",
835
1371
  error ? "border-red-300 dark:border-red-700" : "border-border",
836
1372
  className
837
1373
  ),
838
1374
  ...props
839
1375
  }
840
1376
  ),
841
- error && /* @__PURE__ */ jsxs("p", { className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
842
- /* @__PURE__ */ jsx(AlertCircle, { className: "w-3 h-3" }),
1377
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1378
+ /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
843
1379
  error
844
1380
  ] })
845
1381
  ] });
846
1382
  }
847
1383
  );
848
1384
  Textarea.displayName = "Textarea";
849
- var Card = React.forwardRef(
1385
+ var Card = React7.forwardRef(
850
1386
  ({ className, hover, ...props }, ref) => {
851
1387
  return /* @__PURE__ */ jsx(
852
1388
  "div",
@@ -889,7 +1425,7 @@ var Dialog = DialogPrimitive.Root;
889
1425
  var DialogTrigger = DialogPrimitive.Trigger;
890
1426
  var DialogPortal = DialogPrimitive.Portal;
891
1427
  var DialogClose = DialogPrimitive.Close;
892
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1428
+ var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
893
1429
  DialogPrimitive.Overlay,
894
1430
  {
895
1431
  ref,
@@ -903,7 +1439,7 @@ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
903
1439
  }
904
1440
  ));
905
1441
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
906
- var DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
1442
+ var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
907
1443
  /* @__PURE__ */ jsx(DialogOverlay, {}),
908
1444
  /* @__PURE__ */ jsxs(
909
1445
  DialogPrimitive.Content,
@@ -931,7 +1467,7 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
931
1467
  function DialogHeader({ className, ...props }) {
932
1468
  return /* @__PURE__ */ jsx("div", { className: cn("mb-4", className), ...props });
933
1469
  }
934
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1470
+ var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
935
1471
  DialogPrimitive.Title,
936
1472
  {
937
1473
  ref,
@@ -940,7 +1476,7 @@ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
940
1476
  }
941
1477
  ));
942
1478
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
943
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1479
+ var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
944
1480
  DialogPrimitive.Description,
945
1481
  {
946
1482
  ref,
@@ -955,7 +1491,7 @@ function DialogFooter({ className, ...props }) {
955
1491
  var Select = SelectPrimitive.Root;
956
1492
  var SelectValue = SelectPrimitive.Value;
957
1493
  var SelectGroup = SelectPrimitive.Group;
958
- var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1494
+ var SelectTrigger = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
959
1495
  SelectPrimitive.Trigger,
960
1496
  {
961
1497
  ref,
@@ -974,7 +1510,7 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
974
1510
  }
975
1511
  ));
976
1512
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
977
- var SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1513
+ var SelectContent = React7.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
978
1514
  SelectPrimitive.Content,
979
1515
  {
980
1516
  ref,
@@ -1001,7 +1537,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
1001
1537
  }
1002
1538
  ) }));
1003
1539
  SelectContent.displayName = SelectPrimitive.Content.displayName;
1004
- var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1540
+ var SelectItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1005
1541
  SelectPrimitive.Item,
1006
1542
  {
1007
1543
  ref,
@@ -1018,7 +1554,7 @@ var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /*
1018
1554
  }
1019
1555
  ));
1020
1556
  SelectItem.displayName = SelectPrimitive.Item.displayName;
1021
- var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
1557
+ var Slider = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
1022
1558
  SliderPrimitive.Root,
1023
1559
  {
1024
1560
  ref,
@@ -1036,7 +1572,7 @@ var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1036
1572
  }
1037
1573
  ));
1038
1574
  Slider.displayName = SliderPrimitive.Root.displayName;
1039
- var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
1575
+ var Progress = React7.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
1040
1576
  ProgressPrimitive.Root,
1041
1577
  {
1042
1578
  ref,
@@ -1053,7 +1589,7 @@ var Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @__P
1053
1589
  ));
1054
1590
  Progress.displayName = ProgressPrimitive.Root.displayName;
1055
1591
  var Tabs = TabsPrimitive.Root;
1056
- var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1592
+ var TabsList = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1057
1593
  TabsPrimitive.List,
1058
1594
  {
1059
1595
  ref,
@@ -1065,7 +1601,7 @@ var TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
1065
1601
  }
1066
1602
  ));
1067
1603
  TabsList.displayName = TabsPrimitive.List.displayName;
1068
- var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1604
+ var TabsTrigger = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1069
1605
  TabsPrimitive.Trigger,
1070
1606
  {
1071
1607
  ref,
@@ -1081,7 +1617,7 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1081
1617
  }
1082
1618
  ));
1083
1619
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
1084
- var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1620
+ var TabsContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1085
1621
  TabsPrimitive.Content,
1086
1622
  {
1087
1623
  ref,
@@ -1090,7 +1626,7 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1090
1626
  }
1091
1627
  ));
1092
1628
  TabsContent.displayName = TabsPrimitive.Content.displayName;
1093
- var Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1629
+ var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1094
1630
  AvatarPrimitive.Root,
1095
1631
  {
1096
1632
  ref,
@@ -1102,7 +1638,7 @@ var Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1102
1638
  }
1103
1639
  ));
1104
1640
  Avatar.displayName = AvatarPrimitive.Root.displayName;
1105
- var AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1641
+ var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1106
1642
  AvatarPrimitive.Image,
1107
1643
  {
1108
1644
  ref,
@@ -1111,7 +1647,7 @@ var AvatarImage = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1111
1647
  }
1112
1648
  ));
1113
1649
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
1114
- var AvatarFallback = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1650
+ var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1115
1651
  AvatarPrimitive.Fallback,
1116
1652
  {
1117
1653
  ref,
@@ -1126,7 +1662,7 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
1126
1662
  var TooltipProvider = TooltipPrimitive.Provider;
1127
1663
  var Tooltip = TooltipPrimitive.Root;
1128
1664
  var TooltipTrigger = TooltipPrimitive.Trigger;
1129
- var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
1665
+ var TooltipContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
1130
1666
  TooltipPrimitive.Content,
1131
1667
  {
1132
1668
  ref,
@@ -1201,20 +1737,22 @@ var staggerItem = {
1201
1737
  initial: { opacity: 0, y: 20 },
1202
1738
  animate: { opacity: 1, y: 0 }
1203
1739
  };
1204
- var IconButton = React.forwardRef(
1740
+ var IconButton = React7.forwardRef(
1205
1741
  ({ className, icon, label, ...props }, ref) => {
1206
1742
  return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
1207
1743
  /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
1208
1744
  "button",
1209
1745
  {
1210
1746
  ref,
1747
+ type: props.type ?? "button",
1748
+ "aria-label": label,
1211
1749
  className: cn(
1212
1750
  "p-2 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
1213
1751
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1214
1752
  className
1215
1753
  ),
1216
1754
  ...props,
1217
- children: icon
1755
+ children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: icon })
1218
1756
  }
1219
1757
  ) }),
1220
1758
  /* @__PURE__ */ jsx(TooltipContent, { children: label })
@@ -1240,7 +1778,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
1240
1778
  var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
1241
1779
  var DropdownMenuSub = DropdownMenuPrimitive.Sub;
1242
1780
  var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
1243
- var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1781
+ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1244
1782
  DropdownMenuPrimitive.SubTrigger,
1245
1783
  {
1246
1784
  ref,
@@ -1257,7 +1795,7 @@ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...
1257
1795
  }
1258
1796
  ));
1259
1797
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
1260
- var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1798
+ var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1261
1799
  DropdownMenuPrimitive.SubContent,
1262
1800
  {
1263
1801
  ref,
@@ -1269,7 +1807,7 @@ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =>
1269
1807
  }
1270
1808
  ));
1271
1809
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
1272
- var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1810
+ var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1273
1811
  DropdownMenuPrimitive.Content,
1274
1812
  {
1275
1813
  ref,
@@ -1283,7 +1821,7 @@ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...prop
1283
1821
  }
1284
1822
  ) }));
1285
1823
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1286
- var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1824
+ var DropdownMenuItem = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1287
1825
  DropdownMenuItemInternal,
1288
1826
  {
1289
1827
  ref,
@@ -1297,7 +1835,7 @@ var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) =>
1297
1835
  ));
1298
1836
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
1299
1837
  var DropdownMenuItemInternal = DropdownMenuPrimitive.Item;
1300
- var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
1838
+ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
1301
1839
  DropdownMenuPrimitive.CheckboxItem,
1302
1840
  {
1303
1841
  ref,
@@ -1314,7 +1852,7 @@ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked,
1314
1852
  }
1315
1853
  ));
1316
1854
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
1317
- var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1855
+ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1318
1856
  DropdownMenuPrimitive.RadioItem,
1319
1857
  {
1320
1858
  ref,
@@ -1330,7 +1868,7 @@ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props },
1330
1868
  }
1331
1869
  ));
1332
1870
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
1333
- var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1871
+ var DropdownMenuLabel = React7.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
1334
1872
  DropdownMenuPrimitive.Label,
1335
1873
  {
1336
1874
  ref,
@@ -1343,7 +1881,7 @@ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) =
1343
1881
  }
1344
1882
  ));
1345
1883
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
1346
- var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1884
+ var DropdownMenuSeparator = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1347
1885
  DropdownMenuPrimitive.Separator,
1348
1886
  {
1349
1887
  ref,
@@ -1600,8 +2138,10 @@ function SegmentedSelect({
1600
2138
  return /* @__PURE__ */ jsxs(
1601
2139
  "button",
1602
2140
  {
2141
+ type: "button",
1603
2142
  onClick: () => !disabled && onChange(opt.value),
1604
2143
  disabled,
2144
+ "aria-pressed": value === opt.value,
1605
2145
  title: opt.desc,
1606
2146
  className: cn(
1607
2147
  "inline-flex items-center justify-center gap-2 px-3 py-1.5 text-xs font-medium border rounded-lg whitespace-nowrap transition-all duration-150 ease cursor-pointer outline-none",
@@ -1764,7 +2304,7 @@ var CollapsibleContent2 = forwardRef(({ children, ...props }, ref) => {
1764
2304
  CollapsibleContent2.displayName = Primitive.CollapsibleContent.displayName;
1765
2305
  var Popover = PopoverPrimitive.Root;
1766
2306
  var PopoverTrigger = PopoverPrimitive.Trigger;
1767
- var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
2307
+ var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1768
2308
  PopoverPrimitive.Content,
1769
2309
  {
1770
2310
  ref,
@@ -1835,6 +2375,7 @@ var Switch = forwardRef(
1835
2375
  className: `
1836
2376
  ${sizeClass.track} rounded-full border-2 flex items-center px-0.5
1837
2377
  transition-all duration-200 ease-in-out
2378
+ outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background
1838
2379
  ${checked ? variantClass.checkedTrack : variantClass.uncheckedTrack}
1839
2380
  ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
1840
2381
  ${className}
@@ -1923,7 +2464,87 @@ var toast = {
1923
2464
  });
1924
2465
  }
1925
2466
  };
2467
+ var YUNUI_PALETTES = [
2468
+ "gray",
2469
+ "sand",
2470
+ "slate",
2471
+ "mint",
2472
+ "rose",
2473
+ "dusk",
2474
+ "red",
2475
+ "orange",
2476
+ "yellow",
2477
+ "moss",
2478
+ "green",
2479
+ "emerald",
2480
+ "aqua",
2481
+ "cyan",
2482
+ "blue",
2483
+ "indigo",
2484
+ "violet",
2485
+ "magenta",
2486
+ "pink"
2487
+ ];
2488
+ var ATTR = {
2489
+ brand: "data-brand",
2490
+ accent: "data-accent",
2491
+ neutral: "data-neutral",
2492
+ solid: "data-solid",
2493
+ surface: "data-surface",
2494
+ theme: "data-theme"
2495
+ };
2496
+ function resolveTarget(el) {
2497
+ if (el) return el;
2498
+ return typeof document !== "undefined" ? document.documentElement : null;
2499
+ }
2500
+ function applyTheme(theme, el) {
2501
+ const target = resolveTarget(el);
2502
+ if (!target) return;
2503
+ for (const key of Object.keys(theme)) {
2504
+ const value = theme[key];
2505
+ const attr = ATTR[key];
2506
+ if (!attr) continue;
2507
+ if (value == null) target.removeAttribute(attr);
2508
+ else target.setAttribute(attr, value);
2509
+ }
2510
+ }
2511
+ function readTheme(el) {
2512
+ const target = resolveTarget(el);
2513
+ const out = {};
2514
+ if (!target) return out;
2515
+ for (const key of Object.keys(ATTR)) {
2516
+ const v = target.getAttribute(ATTR[key]);
2517
+ if (v != null) out[key] = v;
2518
+ }
2519
+ return out;
2520
+ }
2521
+ var STORAGE_KEY = "yunui-theme";
2522
+ function useYunUITheme(defaults = {}) {
2523
+ const [theme, setTheme] = React7.useState(defaults);
2524
+ React7.useEffect(() => {
2525
+ let stored = {};
2526
+ try {
2527
+ stored = JSON.parse(localStorage.getItem(STORAGE_KEY) || "{}");
2528
+ } catch {
2529
+ }
2530
+ const merged = { ...defaults, ...stored };
2531
+ setTheme(merged);
2532
+ applyTheme(merged);
2533
+ }, []);
2534
+ const update = React7.useCallback((patch) => {
2535
+ setTheme((prev) => {
2536
+ const next = { ...prev, ...patch };
2537
+ applyTheme(next);
2538
+ try {
2539
+ localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
2540
+ } catch {
2541
+ }
2542
+ return next;
2543
+ });
2544
+ }, []);
2545
+ return [theme, update];
2546
+ }
1926
2547
 
1927
- export { AnimatedNumber, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Button, Card, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, 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, EmptyState, IconButton, Input, Label2 as Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, PageLoader, Popover, PopoverClose2 as PopoverClose, PopoverContent, PopoverTrigger, Progress, RegenerateConfirmModal, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, fadeIn, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useModalBehavior };
1928
- //# sourceMappingURL=chunk-EFIELFBW.js.map
1929
- //# sourceMappingURL=chunk-EFIELFBW.js.map
2548
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AnimatedNumber, Avatar, AvatarFallback, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Column, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, 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, EmptyState, Flex, Grid, IconButton, Input, Label2 as Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, PageLoader, Pagination, Popover, PopoverClose2 as PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Sheet, ShinyButton, Skeleton, Slider, Spinner, Stack, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, YUNUI_PALETTES, applyTheme, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useModalBehavior, useYunUITheme };
2549
+ //# sourceMappingURL=chunk-KTA7HC4V.js.map
2550
+ //# sourceMappingURL=chunk-KTA7HC4V.js.map