@windrun-huaiin/base-ui 4.1.0 → 5.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.js CHANGED
@@ -1,38 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var React32 = require('react');
4
- var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
5
- var clsx = require('clsx');
6
- var tailwindMerge = require('tailwind-merge');
7
- var reactSlot = require('@radix-ui/react-slot');
8
- var classVarianceAuthority = require('class-variance-authority');
3
+ var React29 = require('react');
9
4
  var jsxRuntime = require('react/jsx-runtime');
10
5
  var lucideReact = require('lucide-react');
11
- var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
12
- var LabelPrimitive = require('@radix-ui/react-label');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
13
8
 
14
- function _interopNamespace(e) {
15
- if (e && e.__esModule) return e;
16
- var n = Object.create(null);
17
- if (e) {
18
- Object.keys(e).forEach(function (k) {
19
- if (k !== 'default') {
20
- var d = Object.getOwnPropertyDescriptor(e, k);
21
- Object.defineProperty(n, k, d.get ? d : {
22
- enumerable: true,
23
- get: function () { return e[k]; }
24
- });
25
- }
26
- });
27
- }
28
- n.default = e;
29
- return Object.freeze(n);
30
- }
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
31
10
 
32
- var React32__namespace = /*#__PURE__*/_interopNamespace(React32);
33
- var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
34
- var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
35
- var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
11
+ var React29__default = /*#__PURE__*/_interopDefault(React29);
36
12
 
37
13
  var __defProp = Object.defineProperty;
38
14
  var __defProps = Object.defineProperties;
@@ -69,15 +45,12 @@ var __export = (target, all) => {
69
45
  for (var name in all)
70
46
  __defProp(target, name, { get: all[name], enumerable: true });
71
47
  };
72
- function cn(...inputs) {
73
- return tailwindMerge.twMerge(clsx.clsx(inputs));
74
- }
75
48
 
76
49
  // src/lib/theme-util.ts
77
50
  var themeIconColor = process.env.NEXT_PUBLIC_STYLE_ICON_COLOR || "text-purple-500";
78
51
  var themeSvgIconColor = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_COLOR || "#AC62FD";
79
52
  var themeSvgIconSize = process.env.NEXT_PUBLIC_STYLE_SVG_ICON_SIZE || 18;
80
- var GitHubIcon = React32__namespace.default.forwardRef(
53
+ var GitHubIcon = React29__default.default.forwardRef(
81
54
  (_a, ref) => {
82
55
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
83
56
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -103,7 +76,7 @@ var GitHubIcon = React32__namespace.default.forwardRef(
103
76
  );
104
77
  GitHubIcon.displayName = "GitHub";
105
78
  var github_default = GitHubIcon;
106
- var D8Icon = React32__namespace.default.forwardRef(
79
+ var D8Icon = React29__default.default.forwardRef(
107
80
  (_a, ref) => {
108
81
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
109
82
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -144,7 +117,7 @@ var D8Icon = React32__namespace.default.forwardRef(
144
117
  );
145
118
  D8Icon.displayName = "D8";
146
119
  var d8_default = D8Icon;
147
- var ClerkIcon = React32__namespace.default.forwardRef(
120
+ var ClerkIcon = React29__default.default.forwardRef(
148
121
  (_a, ref) => {
149
122
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
150
123
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -171,7 +144,7 @@ var ClerkIcon = React32__namespace.default.forwardRef(
171
144
  );
172
145
  ClerkIcon.displayName = "Clerk";
173
146
  var clerk_default = ClerkIcon;
174
- var ItermIcon = React32__namespace.default.forwardRef(
147
+ var ItermIcon = React29__default.default.forwardRef(
175
148
  (_a, ref) => {
176
149
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
177
150
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -198,7 +171,7 @@ var ItermIcon = React32__namespace.default.forwardRef(
198
171
  );
199
172
  ItermIcon.displayName = "Iterm";
200
173
  var iterm_default = ItermIcon;
201
- var MarkdownIcon = React32__namespace.default.forwardRef(
174
+ var MarkdownIcon = React29__default.default.forwardRef(
202
175
  (_a, ref) => {
203
176
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
204
177
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -224,7 +197,7 @@ var MarkdownIcon = React32__namespace.default.forwardRef(
224
197
  );
225
198
  MarkdownIcon.displayName = "Markdown";
226
199
  var markdown_default = MarkdownIcon;
227
- var MDXIcon = React32__namespace.default.forwardRef(
200
+ var MDXIcon = React29__default.default.forwardRef(
228
201
  (_a, ref) => {
229
202
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
230
203
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -346,7 +319,7 @@ var MDXIcon = React32__namespace.default.forwardRef(
346
319
  );
347
320
  MDXIcon.displayName = "MDX";
348
321
  var mdx_default = MDXIcon;
349
- var HtmlIcon = React32__namespace.default.forwardRef(
322
+ var HtmlIcon = React29__default.default.forwardRef(
350
323
  (_a, ref) => {
351
324
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
352
325
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -371,7 +344,7 @@ var HtmlIcon = React32__namespace.default.forwardRef(
371
344
  );
372
345
  HtmlIcon.displayName = "Html";
373
346
  var html_default = HtmlIcon;
374
- var JsonIcon = React32__namespace.default.forwardRef(
347
+ var JsonIcon = React29__default.default.forwardRef(
375
348
  (_a, ref) => {
376
349
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
377
350
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -396,7 +369,7 @@ var JsonIcon = React32__namespace.default.forwardRef(
396
369
  );
397
370
  JsonIcon.displayName = "Json";
398
371
  var json_default = JsonIcon;
399
- var XMLIcon = React32__namespace.default.forwardRef(
372
+ var XMLIcon = React29__default.default.forwardRef(
400
373
  (_a, ref) => {
401
374
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
402
375
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -422,7 +395,7 @@ var XMLIcon = React32__namespace.default.forwardRef(
422
395
  );
423
396
  XMLIcon.displayName = "XML";
424
397
  var xml_default = XMLIcon;
425
- var YamlIcon = React32__namespace.default.forwardRef(
398
+ var YamlIcon = React29__default.default.forwardRef(
426
399
  (_a, ref) => {
427
400
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
428
401
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -448,7 +421,7 @@ var YamlIcon = React32__namespace.default.forwardRef(
448
421
  );
449
422
  YamlIcon.displayName = "Yaml";
450
423
  var yaml_default = YamlIcon;
451
- var CSVIcon = React32__namespace.default.forwardRef(
424
+ var CSVIcon = React29__default.default.forwardRef(
452
425
  (_a, ref) => {
453
426
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
454
427
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -500,7 +473,7 @@ var CSVIcon = React32__namespace.default.forwardRef(
500
473
  );
501
474
  CSVIcon.displayName = "CSV";
502
475
  var csv_default = CSVIcon;
503
- var TxtIcon = React32__namespace.default.forwardRef(
476
+ var TxtIcon = React29__default.default.forwardRef(
504
477
  (_a, ref) => {
505
478
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
506
479
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -526,7 +499,7 @@ var TxtIcon = React32__namespace.default.forwardRef(
526
499
  );
527
500
  TxtIcon.displayName = "Txt";
528
501
  var txt_default = TxtIcon;
529
- var JavaIcon = React32__namespace.default.forwardRef(
502
+ var JavaIcon = React29__default.default.forwardRef(
530
503
  (_a, ref) => {
531
504
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
532
505
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -553,7 +526,7 @@ var JavaIcon = React32__namespace.default.forwardRef(
553
526
  );
554
527
  JavaIcon.displayName = "Java";
555
528
  var java_default = JavaIcon;
556
- var SQLIcon = React32__namespace.default.forwardRef(
529
+ var SQLIcon = React29__default.default.forwardRef(
557
530
  (_a, ref) => {
558
531
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
559
532
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -597,7 +570,7 @@ var SQLIcon = React32__namespace.default.forwardRef(
597
570
  );
598
571
  SQLIcon.displayName = "SQL";
599
572
  var sql_default = SQLIcon;
600
- var LogIcon = React32__namespace.default.forwardRef(
573
+ var LogIcon = React29__default.default.forwardRef(
601
574
  (_a, ref) => {
602
575
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
603
576
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -634,7 +607,7 @@ var LogIcon = React32__namespace.default.forwardRef(
634
607
  );
635
608
  LogIcon.displayName = "Log";
636
609
  var log_default = LogIcon;
637
- var MACIcon = React32__namespace.default.forwardRef(
610
+ var MACIcon = React29__default.default.forwardRef(
638
611
  (_a, ref) => {
639
612
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
640
613
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -661,7 +634,7 @@ var MACIcon = React32__namespace.default.forwardRef(
661
634
  );
662
635
  MACIcon.displayName = "MAC";
663
636
  var mac_default = MACIcon;
664
- var BitcoinIcon = React32__namespace.default.forwardRef(
637
+ var BitcoinIcon = React29__default.default.forwardRef(
665
638
  (_a, ref) => {
666
639
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
667
640
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -688,7 +661,7 @@ var BitcoinIcon = React32__namespace.default.forwardRef(
688
661
  );
689
662
  BitcoinIcon.displayName = "BTC";
690
663
  var bitcoin_default = BitcoinIcon;
691
- var CSSIcon = React32__namespace.default.forwardRef(
664
+ var CSSIcon = React29__default.default.forwardRef(
692
665
  (_a, ref) => {
693
666
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
694
667
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -713,7 +686,7 @@ var CSSIcon = React32__namespace.default.forwardRef(
713
686
  );
714
687
  CSSIcon.displayName = "CSS";
715
688
  var css_default = CSSIcon;
716
- var MermaidIcon = React32__namespace.default.forwardRef(
689
+ var MermaidIcon = React29__default.default.forwardRef(
717
690
  // Memmaid need special size for good view
718
691
  (_a, ref) => {
719
692
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
@@ -741,7 +714,7 @@ var MermaidIcon = React32__namespace.default.forwardRef(
741
714
  );
742
715
  MermaidIcon.displayName = "Mmd";
743
716
  var mermaid_default = MermaidIcon;
744
- var LastUpdatedIcon = React32__namespace.default.forwardRef(
717
+ var LastUpdatedIcon = React29__default.default.forwardRef(
745
718
  (_a, ref) => {
746
719
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
747
720
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -767,7 +740,7 @@ var LastUpdatedIcon = React32__namespace.default.forwardRef(
767
740
  );
768
741
  LastUpdatedIcon.displayName = "LastUpdated";
769
742
  var last_updated_default = LastUpdatedIcon;
770
- var SnippetsIcon = React32__namespace.default.forwardRef(
743
+ var SnippetsIcon = React29__default.default.forwardRef(
771
744
  (_a, ref) => {
772
745
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
773
746
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -792,7 +765,7 @@ var SnippetsIcon = React32__namespace.default.forwardRef(
792
765
  );
793
766
  SnippetsIcon.displayName = "Snippets";
794
767
  var snippets_default = SnippetsIcon;
795
- var TestIcon = React32__namespace.default.forwardRef(
768
+ var TestIcon = React29__default.default.forwardRef(
796
769
  (_a, ref) => {
797
770
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
798
771
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -818,7 +791,7 @@ var TestIcon = React32__namespace.default.forwardRef(
818
791
  );
819
792
  TestIcon.displayName = "Test";
820
793
  var test_default = TestIcon;
821
- var DiffIcon = React32__namespace.default.forwardRef(
794
+ var DiffIcon = React29__default.default.forwardRef(
822
795
  (_a, ref) => {
823
796
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
824
797
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -846,7 +819,7 @@ var DiffIcon = React32__namespace.default.forwardRef(
846
819
  );
847
820
  DiffIcon.displayName = "Diff";
848
821
  var diff_default = DiffIcon;
849
- var DPAIcon = React32__namespace.default.forwardRef(
822
+ var DPAIcon = React29__default.default.forwardRef(
850
823
  (_a, ref) => {
851
824
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
852
825
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -871,7 +844,7 @@ var DPAIcon = React32__namespace.default.forwardRef(
871
844
  );
872
845
  DPAIcon.displayName = "DPA";
873
846
  var dpa_default = DPAIcon;
874
- var SubPIcon = React32__namespace.default.forwardRef(
847
+ var SubPIcon = React29__default.default.forwardRef(
875
848
  (_a, ref) => {
876
849
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
877
850
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -898,7 +871,7 @@ var SubPIcon = React32__namespace.default.forwardRef(
898
871
  );
899
872
  SubPIcon.displayName = "SubP";
900
873
  var subp_default = SubPIcon;
901
- var T3PIcon = React32__namespace.default.forwardRef(
874
+ var T3PIcon = React29__default.default.forwardRef(
902
875
  (_a, ref) => {
903
876
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
904
877
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -923,7 +896,7 @@ var T3PIcon = React32__namespace.default.forwardRef(
923
896
  );
924
897
  T3PIcon.displayName = "T3P";
925
898
  var t3p_default = T3PIcon;
926
- var HttpIcon = React32__namespace.default.forwardRef(
899
+ var HttpIcon = React29__default.default.forwardRef(
927
900
  (_a, ref) => {
928
901
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
929
902
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -949,7 +922,7 @@ var HttpIcon = React32__namespace.default.forwardRef(
949
922
  );
950
923
  HttpIcon.displayName = "Http";
951
924
  var http_default = HttpIcon;
952
- var SchemeIcon = React32__namespace.default.forwardRef(
925
+ var SchemeIcon = React29__default.default.forwardRef(
953
926
  (_a, ref) => {
954
927
  var _b = _a, { color = "currentColor", className } = _b, props = __objRest(_b, ["color", "className"]);
955
928
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1157,12 +1130,12 @@ function getGlobalIcon(iconKey, createElement) {
1157
1130
  }
1158
1131
  const FallbackIcon = globalLucideIcons[DEFAULT_FALLBACK_ICON];
1159
1132
  if (createElement) {
1160
- return React32__namespace.default.createElement(FallbackIcon);
1133
+ return React29__default.default.createElement(FallbackIcon);
1161
1134
  }
1162
1135
  return FallbackIcon;
1163
1136
  }
1164
1137
  if (createElement) {
1165
- return React32__namespace.default.createElement(Icon);
1138
+ return React29__default.default.createElement(Icon);
1166
1139
  }
1167
1140
  return Icon;
1168
1141
  }
@@ -1171,462 +1144,40 @@ function getIconElement(icon) {
1171
1144
  }
1172
1145
  var DefaultSiteIcon = () => /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.Zap, { className: `h-8 w-8 rounded-full p-1 shadow-lg ring-0.5 border border-purple-500 ring-purple-500/20 ${themeIconColor}` });
1173
1146
  var NotFoundIcon = () => /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.SquareTerminal, { className: `h-8 w-8 rounded-full p-1 shadow-lg ring-0.5 border border-purple-500 ring-purple-500/20 ${themeIconColor}` });
1174
- var buttonVariants = classVarianceAuthority.cva(
1175
- "inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1176
- {
1177
- variants: {
1178
- variant: {
1179
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
1180
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1181
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1182
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
1183
- ghost: "hover:bg-accent hover:text-accent-foreground",
1184
- link: "text-primary underline-offset-4 hover:underline"
1185
- },
1186
- size: {
1187
- default: "h-10 px-4 py-2",
1188
- sm: "h-9 rounded-md px-3",
1189
- lg: "h-11 rounded-md px-8",
1190
- icon: "h-10 w-10"
1191
- }
1192
- },
1193
- defaultVariants: {
1194
- variant: "default",
1195
- size: "default"
1196
- }
1197
- }
1198
- );
1199
- var Button = React32__namespace.forwardRef(
1200
- (_a, ref) => {
1201
- var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
1202
- const Comp = asChild ? reactSlot.Slot : "button";
1203
- if (asChild) {
1204
- return /* @__PURE__ */ jsxRuntime.jsx(
1205
- Comp,
1206
- __spreadProps(__spreadValues({
1207
- className: cn(buttonVariants({ variant, size, className })),
1208
- ref,
1209
- disabled: loading || props.disabled
1210
- }, props), {
1211
- children
1212
- })
1213
- );
1214
- }
1215
- return /* @__PURE__ */ jsxRuntime.jsxs(
1216
- Comp,
1217
- __spreadProps(__spreadValues({
1218
- className: cn(buttonVariants({ variant, size, className })),
1219
- ref,
1220
- disabled: loading || props.disabled
1221
- }, props), {
1222
- children: [
1223
- children,
1224
- loading && /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
1225
- ]
1226
- })
1227
- );
1228
- }
1229
- );
1230
- Button.displayName = "Button";
1231
- var AlertDialog = AlertDialogPrimitive__namespace.Root;
1232
- var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
1233
- var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
1234
- var AlertDialogOverlay = React32__namespace.forwardRef((_a, ref) => {
1235
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1236
- return /* @__PURE__ */ jsxRuntime.jsx(
1237
- AlertDialogPrimitive__namespace.Overlay,
1238
- __spreadProps(__spreadValues({
1239
- className: cn(
1240
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1241
- className
1242
- )
1243
- }, props), {
1244
- ref
1245
- })
1246
- );
1247
- });
1248
- AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
1249
- var AlertDialogContent = React32__namespace.forwardRef((_a, ref) => {
1250
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1251
- return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
1252
- /* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
1253
- /* @__PURE__ */ jsxRuntime.jsx(
1254
- AlertDialogPrimitive__namespace.Content,
1255
- __spreadValues({
1256
- ref,
1257
- className: cn(
1258
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
1259
- className
1260
- )
1261
- }, props)
1262
- )
1263
- ] });
1264
- });
1265
- AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
1266
- var AlertDialogHeader = (_a) => {
1267
- var _b = _a, {
1268
- className
1269
- } = _b, props = __objRest(_b, [
1270
- "className"
1271
- ]);
1272
- return /* @__PURE__ */ jsxRuntime.jsx(
1273
- "div",
1274
- __spreadValues({
1275
- className: cn(
1276
- "flex flex-col space-y-2 text-center sm:text-left",
1277
- className
1278
- )
1279
- }, props)
1280
- );
1281
- };
1282
- AlertDialogHeader.displayName = "AlertDialogHeader";
1283
- var AlertDialogFooter = (_a) => {
1284
- var _b = _a, {
1285
- className
1286
- } = _b, props = __objRest(_b, [
1287
- "className"
1288
- ]);
1289
- return /* @__PURE__ */ jsxRuntime.jsx(
1290
- "div",
1291
- __spreadValues({
1292
- className: cn(
1293
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1294
- className
1295
- )
1296
- }, props)
1297
- );
1298
- };
1299
- AlertDialogFooter.displayName = "AlertDialogFooter";
1300
- var AlertDialogTitle = React32__namespace.forwardRef((_a, ref) => {
1301
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1302
- return /* @__PURE__ */ jsxRuntime.jsx(
1303
- AlertDialogPrimitive__namespace.Title,
1304
- __spreadValues({
1305
- ref,
1306
- className: cn("text-lg font-semibold", className)
1307
- }, props)
1308
- );
1309
- });
1310
- AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
1311
- var AlertDialogDescription = React32__namespace.forwardRef((_a, ref) => {
1312
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1313
- return /* @__PURE__ */ jsxRuntime.jsx(
1314
- AlertDialogPrimitive__namespace.Description,
1315
- __spreadValues({
1316
- ref,
1317
- className: cn("text-sm text-muted-foreground", className)
1318
- }, props)
1319
- );
1320
- });
1321
- AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
1322
- var AlertDialogAction = React32__namespace.forwardRef((_a, ref) => {
1323
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1324
- return /* @__PURE__ */ jsxRuntime.jsx(
1325
- AlertDialogPrimitive__namespace.Action,
1326
- __spreadValues({
1327
- ref,
1328
- className: cn(buttonVariants(), className)
1329
- }, props)
1330
- );
1331
- });
1332
- AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
1333
- var AlertDialogCancel = React32__namespace.forwardRef((_a, ref) => {
1334
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1335
- return /* @__PURE__ */ jsxRuntime.jsx(
1336
- AlertDialogPrimitive__namespace.Cancel,
1337
- __spreadValues({
1338
- ref,
1339
- className: cn(
1340
- buttonVariants({ variant: "outline" }),
1341
- "mt-2 sm:mt-0",
1342
- className
1343
- )
1344
- }, props)
1345
- );
1346
- });
1347
- AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
1348
- var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
1349
- var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
1350
- var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
1351
- var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
1352
- var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
1353
- var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
1354
- var DropdownMenuSubTrigger = React32__namespace.forwardRef((_a, ref) => {
1355
- var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
1356
- return /* @__PURE__ */ jsxRuntime.jsxs(
1357
- DropdownMenuPrimitive__namespace.SubTrigger,
1358
- __spreadProps(__spreadValues({
1359
- ref,
1360
- className: cn(
1361
- "flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1362
- inset && "pl-8",
1363
- className
1364
- )
1365
- }, props), {
1366
- children: [
1367
- children,
1368
- /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.ChevronRight, { className: "ml-auto" })
1369
- ]
1370
- })
1371
- );
1372
- });
1373
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
1374
- var DropdownMenuSubContent = React32__namespace.forwardRef((_a, ref) => {
1375
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1376
- return /* @__PURE__ */ jsxRuntime.jsx(
1377
- DropdownMenuPrimitive__namespace.SubContent,
1378
- __spreadValues({
1379
- ref,
1380
- className: cn(
1381
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1382
- className
1383
- )
1384
- }, props)
1385
- );
1386
- });
1387
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
1388
- var DropdownMenuContent = React32__namespace.forwardRef((_a, ref) => {
1389
- var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
1390
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1391
- DropdownMenuPrimitive__namespace.Content,
1392
- __spreadValues({
1393
- ref,
1394
- sideOffset,
1395
- className: cn(
1396
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1397
- className
1398
- )
1399
- }, props)
1400
- ) });
1401
- });
1402
- DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
1403
- var DropdownMenuItem = React32__namespace.forwardRef((_a, ref) => {
1404
- var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
1405
- return /* @__PURE__ */ jsxRuntime.jsx(
1406
- DropdownMenuPrimitive__namespace.Item,
1407
- __spreadValues({
1408
- ref,
1409
- className: cn(
1410
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1411
- inset && "pl-8",
1412
- className
1413
- )
1414
- }, props)
1415
- );
1416
- });
1417
- DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
1418
- var DropdownMenuCheckboxItem = React32__namespace.forwardRef((_a, ref) => {
1419
- var _b = _a, { className, children, checked } = _b, props = __objRest(_b, ["className", "children", "checked"]);
1420
- return /* @__PURE__ */ jsxRuntime.jsxs(
1421
- DropdownMenuPrimitive__namespace.CheckboxItem,
1422
- __spreadProps(__spreadValues({
1423
- ref,
1424
- className: cn(
1425
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1426
- className
1427
- ),
1428
- checked
1429
- }, props), {
1430
- children: [
1431
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.Check, { className: "h-4 w-4" }) }) }),
1432
- children
1433
- ]
1434
- })
1435
- );
1436
- });
1437
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
1438
- var DropdownMenuRadioItem = React32__namespace.forwardRef((_a, ref) => {
1439
- var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1440
- return /* @__PURE__ */ jsxRuntime.jsxs(
1441
- DropdownMenuPrimitive__namespace.RadioItem,
1442
- __spreadProps(__spreadValues({
1443
- ref,
1444
- className: cn(
1445
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
1446
- className
1447
- )
1448
- }, props), {
1449
- children: [
1450
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(globalLucideIcons.Circle, { className: "h-2 w-2 fill-current" }) }) }),
1451
- children
1452
- ]
1453
- })
1454
- );
1455
- });
1456
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
1457
- var DropdownMenuLabel = React32__namespace.forwardRef((_a, ref) => {
1458
- var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
1459
- return /* @__PURE__ */ jsxRuntime.jsx(
1460
- DropdownMenuPrimitive__namespace.Label,
1461
- __spreadValues({
1462
- ref,
1463
- className: cn(
1464
- "px-2 py-1.5 text-sm font-semibold",
1465
- inset && "pl-8",
1466
- className
1467
- )
1468
- }, props)
1469
- );
1470
- });
1471
- DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
1472
- var DropdownMenuSeparator = React32__namespace.forwardRef((_a, ref) => {
1473
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1474
- return /* @__PURE__ */ jsxRuntime.jsx(
1475
- DropdownMenuPrimitive__namespace.Separator,
1476
- __spreadValues({
1477
- ref,
1478
- className: cn("-mx-1 my-1 h-px bg-muted", className)
1479
- }, props)
1480
- );
1481
- });
1482
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
1483
- var DropdownMenuShortcut = (_a) => {
1484
- var _b = _a, {
1485
- className
1486
- } = _b, props = __objRest(_b, [
1487
- "className"
1488
- ]);
1489
- return /* @__PURE__ */ jsxRuntime.jsx(
1490
- "span",
1491
- __spreadValues({
1492
- className: cn("ml-auto text-xs tracking-widest opacity-60", className)
1493
- }, props)
1494
- );
1495
- };
1496
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1497
- var labelVariants = classVarianceAuthority.cva(
1498
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
1499
- );
1500
- var Label2 = React32__namespace.forwardRef((_a, ref) => {
1501
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1502
- return /* @__PURE__ */ jsxRuntime.jsx(
1503
- LabelPrimitive__namespace.Root,
1504
- __spreadValues({
1505
- ref,
1506
- className: cn(labelVariants(), className)
1507
- }, props)
1508
- );
1509
- });
1510
- Label2.displayName = LabelPrimitive__namespace.Root.displayName;
1511
- var LanguageButton = React32__namespace.forwardRef(
1512
- (_a, ref) => {
1513
- var _b = _a, { className, variant = "default", size = "default" } = _b, props = __objRest(_b, ["className", "variant", "size"]);
1514
- return /* @__PURE__ */ jsxRuntime.jsx(
1515
- "button",
1516
- __spreadValues({
1517
- className: cn(
1518
- "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background",
1519
- {
1520
- "bg-primary text-primary-foreground hover:bg-primary/90": variant === "default",
1521
- "hover:bg-accent hover:text-accent-foreground": variant === "ghost",
1522
- "h-10 px-4 py-2": size === "default",
1523
- "h-9 px-3": size === "sm",
1524
- "h-11 px-8": size === "lg",
1525
- "h-10 w-10": size === "icon"
1526
- },
1527
- className
1528
- ),
1529
- ref
1530
- }, props)
1531
- );
1532
- }
1533
- );
1534
- LanguageButton.displayName = "Button";
1535
- var IconConfigContext = React32.createContext(null);
1536
- function IconConfigProvider({ config, children }) {
1537
- return /* @__PURE__ */ jsxRuntime.jsx(IconConfigContext.Provider, { value: config, children });
1538
- }
1539
- function useIconConfig() {
1540
- const config = React32.useContext(IconConfigContext);
1541
- if (config === null) {
1542
- throw new Error(
1543
- '[SiteIcon] IconConfigProvider not found. Please wrap your app with <IconConfigProvider config={{ siteIcon: "YourIcon" }}>.'
1544
- );
1545
- }
1546
- return config;
1547
- }
1548
- function useIconConfigSafe(iconKey) {
1549
- try {
1550
- const config = useIconConfig();
1551
- return config[iconKey];
1552
- } catch (e) {
1553
- return void 0;
1554
- }
1147
+ function cn(...inputs) {
1148
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
1555
1149
  }
1556
- function SiteIcon(_a) {
1557
- var _b = _a, {
1558
- size = 24,
1559
- className
1560
- } = _b, props = __objRest(_b, [
1561
- "size",
1562
- "className"
1563
- ]);
1564
- const configuredIcon = useIconConfigSafe("siteIcon");
1565
- if (configuredIcon === void 0) {
1566
- throw new Error(
1567
- '[SiteIcon] Site icon is not configured. Please use <IconConfigProvider config={{ siteIcon: YourCustomIcon }}> or <IconConfigProvider config={{ siteIcon: "IconKeyName" }}> to set a custom site icon to avoid legal risks.'
1568
- );
1569
- }
1570
- if (typeof configuredIcon === "string") {
1571
- if (configuredIcon === "") {
1572
- const DefaultIcon = globalLucideIcons["Download"];
1573
- return /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, __spreadValues({ size, className: cn(themeIconColor, className) }, props));
1574
- }
1575
- const IconComponent = globalLucideIcons[configuredIcon];
1576
- if (!IconComponent) {
1577
- throw new Error(`[SiteIcon] Icon key "${configuredIcon}" not found in globalLucideIcons.`);
1150
+ function createSiteIcon(iconConfig) {
1151
+ return function CreatedSiteIcon(_a) {
1152
+ var _b = _a, {
1153
+ size = 24,
1154
+ className
1155
+ } = _b, props = __objRest(_b, [
1156
+ "size",
1157
+ "className"
1158
+ ]);
1159
+ if (typeof iconConfig === "string") {
1160
+ if (iconConfig === "") {
1161
+ const DefaultIcon = globalLucideIcons["Download"];
1162
+ return /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, __spreadValues({ size, className: cn(themeIconColor, className) }, props));
1163
+ }
1164
+ const IconComponent = globalLucideIcons[iconConfig];
1165
+ if (!IconComponent) {
1166
+ throw new Error(`[CreatedSiteIcon] Icon key "${iconConfig}" not found in globalLucideIcons.`);
1167
+ }
1168
+ return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, __spreadValues({ size, className: cn(themeIconColor, className) }, props));
1169
+ } else {
1170
+ const CustomIcon = iconConfig;
1171
+ const hasColorClass = className && /text-\w+/.test(className);
1172
+ const finalClassName = hasColorClass ? className : cn(themeIconColor, className);
1173
+ return /* @__PURE__ */ jsxRuntime.jsx(CustomIcon, __spreadValues({ size, className: finalClassName }, props));
1578
1174
  }
1579
- return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, __spreadValues({ size, className: cn(themeIconColor, className) }, props));
1580
- } else {
1581
- const CustomIcon = configuredIcon;
1582
- const hasColorClass = className && /text-\w+/.test(className);
1583
- const finalClassName = hasColorClass ? className : cn(themeIconColor, className);
1584
- return /* @__PURE__ */ jsxRuntime.jsx(CustomIcon, __spreadValues({ size, className: finalClassName }, props));
1585
- }
1175
+ };
1586
1176
  }
1587
- /**
1588
- * @license
1589
- * MIT License
1590
- * Copyright (c) 2025 D8ger
1591
- *
1592
- * This source code is licensed under the MIT license found in the
1593
- * LICENSE file in the root directory of this source tree.
1594
- */
1595
1177
 
1596
- exports.AlertDialog = AlertDialog;
1597
- exports.AlertDialogAction = AlertDialogAction;
1598
- exports.AlertDialogCancel = AlertDialogCancel;
1599
- exports.AlertDialogContent = AlertDialogContent;
1600
- exports.AlertDialogDescription = AlertDialogDescription;
1601
- exports.AlertDialogFooter = AlertDialogFooter;
1602
- exports.AlertDialogHeader = AlertDialogHeader;
1603
- exports.AlertDialogOverlay = AlertDialogOverlay;
1604
- exports.AlertDialogPortal = AlertDialogPortal;
1605
- exports.AlertDialogTitle = AlertDialogTitle;
1606
- exports.AlertDialogTrigger = AlertDialogTrigger;
1607
- exports.Button = Button;
1608
1178
  exports.DefaultSiteIcon = DefaultSiteIcon;
1609
- exports.DropdownMenu = DropdownMenu;
1610
- exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
1611
- exports.DropdownMenuContent = DropdownMenuContent;
1612
- exports.DropdownMenuGroup = DropdownMenuGroup;
1613
- exports.DropdownMenuItem = DropdownMenuItem;
1614
- exports.DropdownMenuLabel = DropdownMenuLabel;
1615
- exports.DropdownMenuPortal = DropdownMenuPortal;
1616
- exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
1617
- exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
1618
- exports.DropdownMenuSeparator = DropdownMenuSeparator;
1619
- exports.DropdownMenuShortcut = DropdownMenuShortcut;
1620
- exports.DropdownMenuSub = DropdownMenuSub;
1621
- exports.DropdownMenuSubContent = DropdownMenuSubContent;
1622
- exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
1623
- exports.DropdownMenuTrigger = DropdownMenuTrigger;
1624
- exports.IconConfigProvider = IconConfigProvider;
1625
- exports.Label = Label2;
1626
- exports.LanguageButton = LanguageButton;
1627
1179
  exports.NotFoundIcon = NotFoundIcon;
1628
- exports.SiteIcon = SiteIcon;
1629
- exports.buttonVariants = buttonVariants;
1180
+ exports.createSiteIcon = createSiteIcon;
1630
1181
  exports.getGlobalIcon = getGlobalIcon;
1631
1182
  exports.getIconElement = getIconElement;
1632
1183
  exports.globalLucideIcons = globalLucideIcons;