@almadar/ui 5.0.0 → 5.1.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,9 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var React5 = require('react');
3
+ var React7 = require('react');
4
4
  var logger = require('@almadar/logger');
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var LucideIcons = require('lucide-react');
7
+ var PhosphorIcons = require('@phosphor-icons/react');
8
+ var TablerIcons = require('@tabler/icons-react');
9
+ var FaIcons = require('react-icons/fa');
7
10
 
8
11
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
12
 
@@ -25,8 +28,11 @@ function _interopNamespace(e) {
25
28
  return Object.freeze(n);
26
29
  }
27
30
 
28
- var React5__default = /*#__PURE__*/_interopDefault(React5);
31
+ var React7__default = /*#__PURE__*/_interopDefault(React7);
29
32
  var LucideIcons__namespace = /*#__PURE__*/_interopNamespace(LucideIcons);
33
+ var PhosphorIcons__namespace = /*#__PURE__*/_interopNamespace(PhosphorIcons);
34
+ var TablerIcons__namespace = /*#__PURE__*/_interopNamespace(TablerIcons);
35
+ var FaIcons__namespace = /*#__PURE__*/_interopNamespace(FaIcons);
30
36
 
31
37
  // node_modules/clsx/dist/clsx.mjs
32
38
  function r(e) {
@@ -2509,10 +2515,10 @@ function cn(...inputs) {
2509
2515
  }
2510
2516
  logger.createLogger("almadar:eventbus");
2511
2517
  logger.createLogger("almadar:eventbus:subscribe");
2512
- var EventBusContext = React5.createContext(null);
2513
- var TraitScopeContext = React5.createContext(null);
2518
+ var EventBusContext = React7.createContext(null);
2519
+ var TraitScopeContext = React7.createContext(null);
2514
2520
  function useTraitScope() {
2515
- return React5.useContext(TraitScopeContext);
2521
+ return React7.useContext(TraitScopeContext);
2516
2522
  }
2517
2523
  var log = logger.createLogger("almadar:eventbus");
2518
2524
  var subLog2 = logger.createLogger("almadar:eventbus:subscribe");
@@ -2588,10 +2594,10 @@ var fallbackEventBus = {
2588
2594
  }
2589
2595
  };
2590
2596
  function useEventBus() {
2591
- const context = React5.useContext(EventBusContext);
2597
+ const context = React7.useContext(EventBusContext);
2592
2598
  const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
2593
2599
  const scope = useTraitScope();
2594
- return React5.useMemo(() => {
2600
+ return React7.useMemo(() => {
2595
2601
  if (!scope) {
2596
2602
  return {
2597
2603
  ...baseBus,
@@ -2729,7 +2735,7 @@ var positionStyles = {
2729
2735
  fixed: "fixed",
2730
2736
  sticky: "sticky"
2731
2737
  };
2732
- var Box = React5__default.default.forwardRef(
2738
+ var Box = React7__default.default.forwardRef(
2733
2739
  ({
2734
2740
  padding,
2735
2741
  paddingX,
@@ -2759,27 +2765,27 @@ var Box = React5__default.default.forwardRef(
2759
2765
  ...rest
2760
2766
  }, ref) => {
2761
2767
  const eventBus = useEventBus();
2762
- const handleClick = React5.useCallback((e) => {
2768
+ const handleClick = React7.useCallback((e) => {
2763
2769
  if (action) {
2764
2770
  e.stopPropagation();
2765
2771
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
2766
2772
  }
2767
2773
  onClick?.(e);
2768
2774
  }, [action, actionPayload, eventBus, onClick]);
2769
- const handleMouseEnter = React5.useCallback((e) => {
2775
+ const handleMouseEnter = React7.useCallback((e) => {
2770
2776
  if (hoverEvent) {
2771
2777
  eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
2772
2778
  }
2773
2779
  onMouseEnter?.(e);
2774
2780
  }, [hoverEvent, eventBus, onMouseEnter]);
2775
- const handleMouseLeave = React5.useCallback((e) => {
2781
+ const handleMouseLeave = React7.useCallback((e) => {
2776
2782
  if (hoverEvent) {
2777
2783
  eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
2778
2784
  }
2779
2785
  onMouseLeave?.(e);
2780
2786
  }, [hoverEvent, eventBus, onMouseLeave]);
2781
2787
  const isClickable = action || onClick;
2782
- return React5__default.default.createElement(
2788
+ return React7__default.default.createElement(
2783
2789
  Component,
2784
2790
  {
2785
2791
  ref,
@@ -2998,41 +3004,366 @@ var Typography = ({
2998
3004
  );
2999
3005
  };
3000
3006
  Typography.displayName = "Typography";
3001
- var iconAliases = {
3002
- "close": LucideIcons__namespace.X,
3003
- "trash": LucideIcons__namespace.Trash2,
3004
- "loader": LucideIcons__namespace.Loader2,
3005
- "stop": LucideIcons__namespace.Square,
3006
- "volume": LucideIcons__namespace.Volume2,
3007
- "volume-off": LucideIcons__namespace.VolumeX,
3008
- "refresh": LucideIcons__namespace.RefreshCw,
3009
- "share": LucideIcons__namespace.Share2,
3010
- "sort-asc": LucideIcons__namespace.ArrowUpNarrowWide,
3011
- "sort-desc": LucideIcons__namespace.ArrowDownNarrowWide
3012
- };
3007
+ var DEFAULT_FAMILY = "lucide";
3008
+ var VALID_FAMILIES = [
3009
+ "lucide",
3010
+ "phosphor-outline",
3011
+ "phosphor-fill",
3012
+ "phosphor-duotone",
3013
+ "tabler",
3014
+ "fa-solid"
3015
+ ];
3016
+ function getCurrentIconFamily() {
3017
+ if (typeof window === "undefined" || typeof document === "undefined") {
3018
+ return DEFAULT_FAMILY;
3019
+ }
3020
+ const raw = getComputedStyle(document.documentElement).getPropertyValue("--icon-family").trim().replace(/^["']|["']$/g, "");
3021
+ return VALID_FAMILIES.includes(raw) ? raw : DEFAULT_FAMILY;
3022
+ }
3023
+ var cachedFamily = null;
3024
+ var listeners = /* @__PURE__ */ new Set();
3025
+ var observer = null;
3026
+ function ensureObserver() {
3027
+ if (typeof window === "undefined" || observer) return;
3028
+ observer = new MutationObserver(() => {
3029
+ const next = getCurrentIconFamily();
3030
+ if (next !== cachedFamily) {
3031
+ cachedFamily = next;
3032
+ listeners.forEach((fn) => fn());
3033
+ }
3034
+ });
3035
+ observer.observe(document.documentElement, {
3036
+ attributes: true,
3037
+ attributeFilter: ["data-theme", "style"]
3038
+ });
3039
+ cachedFamily = getCurrentIconFamily();
3040
+ }
3041
+ function subscribeIconFamily(notify) {
3042
+ ensureObserver();
3043
+ listeners.add(notify);
3044
+ return () => {
3045
+ listeners.delete(notify);
3046
+ };
3047
+ }
3048
+ function getIconFamilySnapshot() {
3049
+ if (cachedFamily !== null) return cachedFamily;
3050
+ cachedFamily = getCurrentIconFamily();
3051
+ return cachedFamily;
3052
+ }
3053
+ function getIconFamilyServerSnapshot() {
3054
+ return DEFAULT_FAMILY;
3055
+ }
3056
+ function useIconFamily() {
3057
+ return React7.useSyncExternalStore(
3058
+ subscribeIconFamily,
3059
+ getIconFamilySnapshot,
3060
+ getIconFamilyServerSnapshot
3061
+ );
3062
+ }
3013
3063
  function kebabToPascal(name) {
3014
3064
  return name.split("-").map((part) => {
3015
3065
  if (/^\d+$/.test(part)) return part;
3016
3066
  return part.charAt(0).toUpperCase() + part.slice(1);
3017
3067
  }).join("");
3018
3068
  }
3019
- var resolvedCache = /* @__PURE__ */ new Map();
3020
- function resolveIcon(name) {
3021
- const cached = resolvedCache.get(name);
3022
- if (cached) return cached;
3023
- const resolved = doResolve(name);
3024
- resolvedCache.set(name, resolved);
3025
- return resolved;
3026
- }
3027
- function doResolve(name) {
3028
- if (iconAliases[name]) return iconAliases[name];
3029
- const pascalName = kebabToPascal(name);
3030
- const directLookup = LucideIcons__namespace[pascalName];
3031
- if (directLookup && typeof directLookup === "object") return directLookup;
3032
- const asIs = LucideIcons__namespace[name];
3069
+ var lucideAliases = {
3070
+ close: LucideIcons__namespace.X,
3071
+ trash: LucideIcons__namespace.Trash2,
3072
+ loader: LucideIcons__namespace.Loader2,
3073
+ stop: LucideIcons__namespace.Square,
3074
+ volume: LucideIcons__namespace.Volume2,
3075
+ "volume-off": LucideIcons__namespace.VolumeX,
3076
+ refresh: LucideIcons__namespace.RefreshCw,
3077
+ share: LucideIcons__namespace.Share2,
3078
+ "sort-asc": LucideIcons__namespace.ArrowUpNarrowWide,
3079
+ "sort-desc": LucideIcons__namespace.ArrowDownNarrowWide
3080
+ };
3081
+ function resolveLucide(name) {
3082
+ if (lucideAliases[name]) return lucideAliases[name];
3083
+ const pascal = kebabToPascal(name);
3084
+ const lucideMap = LucideIcons__namespace;
3085
+ const direct = lucideMap[pascal];
3086
+ if (direct && typeof direct === "object") return direct;
3087
+ const asIs = lucideMap[name];
3033
3088
  if (asIs && typeof asIs === "object") return asIs;
3034
3089
  return LucideIcons__namespace.HelpCircle;
3035
3090
  }
3091
+ var phosphorAliases = {
3092
+ // lucide name → phosphor PascalCase name
3093
+ search: "MagnifyingGlass",
3094
+ close: "X",
3095
+ loader: "CircleNotch",
3096
+ refresh: "ArrowsClockwise",
3097
+ "sort-asc": "SortAscending",
3098
+ "sort-desc": "SortDescending",
3099
+ "chevron-down": "CaretDown",
3100
+ "chevron-up": "CaretUp",
3101
+ "chevron-left": "CaretLeft",
3102
+ "chevron-right": "CaretRight",
3103
+ "help-circle": "Question",
3104
+ "alert-triangle": "Warning",
3105
+ "alert-circle": "WarningCircle",
3106
+ "check-circle": "CheckCircle",
3107
+ "x-circle": "XCircle",
3108
+ edit: "PencilSimple",
3109
+ pencil: "PencilSimple",
3110
+ trash: "Trash",
3111
+ send: "PaperPlaneRight",
3112
+ external: "ArrowSquareOut",
3113
+ "external-link": "ArrowSquareOut",
3114
+ plus: "Plus",
3115
+ minus: "Minus",
3116
+ x: "X",
3117
+ check: "Check",
3118
+ star: "Star",
3119
+ heart: "Heart",
3120
+ home: "House",
3121
+ user: "User",
3122
+ users: "Users",
3123
+ settings: "Gear",
3124
+ menu: "List",
3125
+ "arrow-up": "ArrowUp",
3126
+ "arrow-down": "ArrowDown",
3127
+ "arrow-left": "ArrowLeft",
3128
+ "arrow-right": "ArrowRight",
3129
+ copy: "Copy",
3130
+ download: "DownloadSimple",
3131
+ upload: "UploadSimple",
3132
+ filter: "Funnel",
3133
+ calendar: "Calendar",
3134
+ clock: "Clock",
3135
+ bell: "Bell",
3136
+ mail: "Envelope",
3137
+ envelope: "Envelope",
3138
+ lock: "Lock",
3139
+ unlock: "LockOpen",
3140
+ eye: "Eye",
3141
+ "eye-off": "EyeSlash",
3142
+ more: "DotsThree",
3143
+ "more-vertical": "DotsThreeVertical",
3144
+ info: "Info",
3145
+ warning: "Warning",
3146
+ error: "WarningCircle"
3147
+ };
3148
+ function resolvePhosphor(name, weight) {
3149
+ const target = phosphorAliases[name] ?? kebabToPascal(name);
3150
+ const map = PhosphorIcons__namespace;
3151
+ const PhosphorComp = map[target];
3152
+ if (!PhosphorComp || typeof PhosphorComp !== "object") return null;
3153
+ const Component = PhosphorComp;
3154
+ const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3155
+ Component,
3156
+ {
3157
+ weight,
3158
+ className: props.className,
3159
+ style: props.style,
3160
+ size: props.size ?? "1em"
3161
+ }
3162
+ );
3163
+ Adapter.displayName = `Phosphor.${target}.${weight}`;
3164
+ return Adapter;
3165
+ }
3166
+ var tablerAliases = {
3167
+ // lucide name → tabler suffix (after the `Icon` prefix)
3168
+ search: "Search",
3169
+ close: "X",
3170
+ loader: "Loader2",
3171
+ refresh: "Refresh",
3172
+ "sort-asc": "SortAscending",
3173
+ "sort-desc": "SortDescending",
3174
+ "chevron-down": "ChevronDown",
3175
+ "chevron-up": "ChevronUp",
3176
+ "chevron-left": "ChevronLeft",
3177
+ "chevron-right": "ChevronRight",
3178
+ "help-circle": "HelpCircle",
3179
+ "alert-triangle": "AlertTriangle",
3180
+ "alert-circle": "AlertCircle",
3181
+ "check-circle": "CircleCheck",
3182
+ "x-circle": "CircleX",
3183
+ edit: "Pencil",
3184
+ trash: "Trash",
3185
+ send: "Send",
3186
+ external: "ExternalLink",
3187
+ plus: "Plus",
3188
+ x: "X",
3189
+ check: "Check",
3190
+ star: "Star",
3191
+ heart: "Heart",
3192
+ home: "Home",
3193
+ user: "User",
3194
+ users: "Users",
3195
+ settings: "Settings",
3196
+ menu: "Menu2",
3197
+ copy: "Copy",
3198
+ download: "Download",
3199
+ upload: "Upload",
3200
+ filter: "Filter",
3201
+ calendar: "Calendar",
3202
+ clock: "Clock",
3203
+ bell: "Bell",
3204
+ mail: "Mail",
3205
+ envelope: "Mail",
3206
+ lock: "Lock",
3207
+ unlock: "LockOpen",
3208
+ eye: "Eye",
3209
+ "eye-off": "EyeOff",
3210
+ more: "Dots",
3211
+ "more-vertical": "DotsVertical",
3212
+ info: "InfoCircle"
3213
+ };
3214
+ function resolveTabler(name) {
3215
+ const suffix = tablerAliases[name] ?? kebabToPascal(name);
3216
+ const target = `Icon${suffix}`;
3217
+ const map = TablerIcons__namespace;
3218
+ const TablerComp = map[target];
3219
+ if (!TablerComp || typeof TablerComp !== "object") return null;
3220
+ const Component = TablerComp;
3221
+ const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3222
+ Component,
3223
+ {
3224
+ stroke: props.strokeWidth ?? 1.5,
3225
+ className: props.className,
3226
+ style: props.style,
3227
+ size: props.size ?? 24
3228
+ }
3229
+ );
3230
+ Adapter.displayName = `Tabler.${target}`;
3231
+ return Adapter;
3232
+ }
3233
+ var faAliases = {
3234
+ // lucide name → fa-solid suffix (after the `Fa` prefix)
3235
+ search: "Search",
3236
+ close: "Times",
3237
+ x: "Times",
3238
+ loader: "Spinner",
3239
+ refresh: "Sync",
3240
+ "sort-asc": "SortAmountUp",
3241
+ "sort-desc": "SortAmountDown",
3242
+ "chevron-down": "ChevronDown",
3243
+ "chevron-up": "ChevronUp",
3244
+ "chevron-left": "ChevronLeft",
3245
+ "chevron-right": "ChevronRight",
3246
+ "help-circle": "QuestionCircle",
3247
+ "alert-triangle": "ExclamationTriangle",
3248
+ "alert-circle": "ExclamationCircle",
3249
+ "check-circle": "CheckCircle",
3250
+ "x-circle": "TimesCircle",
3251
+ edit: "Edit",
3252
+ pencil: "Pencil",
3253
+ trash: "Trash",
3254
+ send: "PaperPlane",
3255
+ external: "ExternalLinkAlt",
3256
+ plus: "Plus",
3257
+ minus: "Minus",
3258
+ check: "Check",
3259
+ star: "Star",
3260
+ heart: "Heart",
3261
+ home: "Home",
3262
+ user: "User",
3263
+ users: "Users",
3264
+ settings: "Cog",
3265
+ menu: "Bars",
3266
+ "arrow-up": "ArrowUp",
3267
+ "arrow-down": "ArrowDown",
3268
+ "arrow-left": "ArrowLeft",
3269
+ "arrow-right": "ArrowRight",
3270
+ copy: "Copy",
3271
+ download: "Download",
3272
+ upload: "Upload",
3273
+ filter: "Filter",
3274
+ calendar: "Calendar",
3275
+ clock: "Clock",
3276
+ bell: "Bell",
3277
+ mail: "Envelope",
3278
+ envelope: "Envelope",
3279
+ lock: "Lock",
3280
+ unlock: "LockOpen",
3281
+ eye: "Eye",
3282
+ "eye-off": "EyeSlash",
3283
+ more: "EllipsisH",
3284
+ "more-vertical": "EllipsisV",
3285
+ info: "InfoCircle",
3286
+ warning: "ExclamationTriangle"
3287
+ };
3288
+ function resolveFa(name) {
3289
+ const suffix = faAliases[name] ?? kebabToPascal(name);
3290
+ const target = `Fa${suffix}`;
3291
+ const map = FaIcons__namespace;
3292
+ const FaComp = map[target];
3293
+ if (!FaComp || typeof FaComp !== "function") return null;
3294
+ const Component = FaComp;
3295
+ const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3296
+ Component,
3297
+ {
3298
+ className: props.className,
3299
+ style: props.style,
3300
+ size: props.size ?? "1em"
3301
+ }
3302
+ );
3303
+ Adapter.displayName = `Fa.${target}`;
3304
+ return Adapter;
3305
+ }
3306
+ var warned = /* @__PURE__ */ new Set();
3307
+ function warnFallback(name, family) {
3308
+ const key = `${family}::${name}`;
3309
+ if (warned.has(key)) return;
3310
+ warned.add(key);
3311
+ if (typeof console !== "undefined") {
3312
+ console.warn(
3313
+ `[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
3314
+ );
3315
+ }
3316
+ }
3317
+ function makeLucideAdapter(name) {
3318
+ const LucideComp = resolveLucide(name);
3319
+ const Adapter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3320
+ LucideComp,
3321
+ {
3322
+ className: props.className,
3323
+ strokeWidth: props.strokeWidth,
3324
+ style: props.style,
3325
+ size: props.size
3326
+ }
3327
+ );
3328
+ Adapter.displayName = `Lucide.${name}`;
3329
+ return Adapter;
3330
+ }
3331
+ function resolveIconForFamily(name, family) {
3332
+ switch (family) {
3333
+ case "lucide":
3334
+ return makeLucideAdapter(name);
3335
+ case "phosphor-outline": {
3336
+ const p = resolvePhosphor(name, "regular");
3337
+ if (p) return p;
3338
+ warnFallback(name, family);
3339
+ return makeLucideAdapter(name);
3340
+ }
3341
+ case "phosphor-fill": {
3342
+ const p = resolvePhosphor(name, "fill");
3343
+ if (p) return p;
3344
+ warnFallback(name, family);
3345
+ return makeLucideAdapter(name);
3346
+ }
3347
+ case "phosphor-duotone": {
3348
+ const p = resolvePhosphor(name, "duotone");
3349
+ if (p) return p;
3350
+ warnFallback(name, family);
3351
+ return makeLucideAdapter(name);
3352
+ }
3353
+ case "tabler": {
3354
+ const t = resolveTabler(name);
3355
+ if (t) return t;
3356
+ warnFallback(name, family);
3357
+ return makeLucideAdapter(name);
3358
+ }
3359
+ case "fa-solid": {
3360
+ const f = resolveFa(name);
3361
+ if (f) return f;
3362
+ warnFallback(name, family);
3363
+ return makeLucideAdapter(name);
3364
+ }
3365
+ }
3366
+ }
3036
3367
  var sizeClasses = {
3037
3368
  xs: "w-3 h-3",
3038
3369
  sm: "w-4 h-4",
@@ -3055,22 +3386,50 @@ var Icon = ({
3055
3386
  strokeWidth,
3056
3387
  style
3057
3388
  }) => {
3058
- const IconComponent = icon ?? (name ? resolveIcon(name) : LucideIcons__namespace.HelpCircle);
3389
+ const family = useIconFamily();
3390
+ const RenderedComponent = React7__default.default.useMemo(() => {
3391
+ if (icon) return null;
3392
+ return name ? resolveIconForFamily(name, family) : null;
3393
+ }, [icon, name, family]);
3059
3394
  const effectiveStrokeWidth = strokeWidth ?? void 0;
3395
+ const inlineStyle = {
3396
+ ...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
3397
+ ...style
3398
+ };
3399
+ const composedClassName = cn(
3400
+ sizeClasses[size],
3401
+ animationClasses[animation],
3402
+ color ? color : "text-current",
3403
+ className
3404
+ );
3405
+ if (icon) {
3406
+ const Direct = icon;
3407
+ return /* @__PURE__ */ jsxRuntime.jsx(
3408
+ Direct,
3409
+ {
3410
+ className: composedClassName,
3411
+ strokeWidth: effectiveStrokeWidth,
3412
+ style: inlineStyle
3413
+ }
3414
+ );
3415
+ }
3416
+ if (RenderedComponent) {
3417
+ return /* @__PURE__ */ jsxRuntime.jsx(
3418
+ RenderedComponent,
3419
+ {
3420
+ className: composedClassName,
3421
+ strokeWidth: effectiveStrokeWidth,
3422
+ style: inlineStyle
3423
+ }
3424
+ );
3425
+ }
3426
+ const Fallback = LucideIcons__namespace.HelpCircle;
3060
3427
  return /* @__PURE__ */ jsxRuntime.jsx(
3061
- IconComponent,
3428
+ Fallback,
3062
3429
  {
3063
- className: cn(
3064
- sizeClasses[size],
3065
- animationClasses[animation],
3066
- color ? color : "text-current",
3067
- className
3068
- ),
3430
+ className: composedClassName,
3069
3431
  strokeWidth: effectiveStrokeWidth,
3070
- style: {
3071
- ...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
3072
- ...style
3073
- }
3432
+ style: inlineStyle
3074
3433
  }
3075
3434
  );
3076
3435
  };
@@ -3138,14 +3497,13 @@ var iconSizeStyles = {
3138
3497
  function resolveIconProp(value, sizeClass) {
3139
3498
  if (!value) return null;
3140
3499
  if (typeof value === "string") {
3141
- const Resolved = resolveIcon(value);
3142
- return Resolved ? /* @__PURE__ */ jsxRuntime.jsx(Resolved, { className: sizeClass }) : null;
3500
+ return /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: value, className: sizeClass });
3143
3501
  }
3144
3502
  if (typeof value === "function") {
3145
3503
  const IconComp = value;
3146
3504
  return /* @__PURE__ */ jsxRuntime.jsx(IconComp, { className: sizeClass });
3147
3505
  }
3148
- if (React5__default.default.isValidElement(value)) {
3506
+ if (React7__default.default.isValidElement(value)) {
3149
3507
  return value;
3150
3508
  }
3151
3509
  if (typeof value === "object" && value !== null && "render" in value) {
@@ -3154,7 +3512,7 @@ function resolveIconProp(value, sizeClass) {
3154
3512
  }
3155
3513
  return value;
3156
3514
  }
3157
- var Button = React5__default.default.forwardRef(
3515
+ var Button = React7__default.default.forwardRef(
3158
3516
  ({
3159
3517
  className,
3160
3518
  variant = "primary",
@@ -3257,7 +3615,7 @@ var shadowStyles2 = {
3257
3615
  md: "shadow",
3258
3616
  lg: "shadow-elevation-dialog"
3259
3617
  };
3260
- var Card = React5__default.default.forwardRef(
3618
+ var Card = React7__default.default.forwardRef(
3261
3619
  ({
3262
3620
  className,
3263
3621
  variant = "bordered",
@@ -3293,9 +3651,9 @@ var Card = React5__default.default.forwardRef(
3293
3651
  }
3294
3652
  );
3295
3653
  Card.displayName = "Card";
3296
- var CardHeader = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
3654
+ var CardHeader = React7__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
3297
3655
  CardHeader.displayName = "CardHeader";
3298
- var CardTitle = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3656
+ var CardTitle = React7__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3299
3657
  "h3",
3300
3658
  {
3301
3659
  ref,
@@ -3308,11 +3666,11 @@ var CardTitle = React5__default.default.forwardRef(({ className, ...props }, ref
3308
3666
  }
3309
3667
  ));
3310
3668
  CardTitle.displayName = "CardTitle";
3311
- var CardContent = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
3669
+ var CardContent = React7__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
3312
3670
  CardContent.displayName = "CardContent";
3313
3671
  var CardBody = CardContent;
3314
3672
  CardBody.displayName = "CardBody";
3315
- var CardFooter = React5__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3673
+ var CardFooter = React7__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3316
3674
  "div",
3317
3675
  {
3318
3676
  ref,
@@ -3391,7 +3749,7 @@ var Divider = ({
3391
3749
  );
3392
3750
  };
3393
3751
  Divider.displayName = "Divider";
3394
- var Input = React5__default.default.forwardRef(
3752
+ var Input = React7__default.default.forwardRef(
3395
3753
  ({
3396
3754
  className,
3397
3755
  inputType,
@@ -3441,7 +3799,7 @@ var Input = React5__default.default.forwardRef(
3441
3799
  ]
3442
3800
  }
3443
3801
  ),
3444
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "h-icon-default w-icon-default" }) })
3802
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron-down", className: "h-icon-default w-icon-default" }) })
3445
3803
  ] });
3446
3804
  }
3447
3805
  if (type === "textarea") {
@@ -3495,7 +3853,7 @@ var Input = React5__default.default.forwardRef(
3495
3853
  type: "button",
3496
3854
  onClick: onClear,
3497
3855
  className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
3498
- children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: "h-icon-default w-icon-default" })
3856
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
3499
3857
  }
3500
3858
  ),
3501
3859
  rightIcon && !showClearButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
@@ -3504,7 +3862,7 @@ var Input = React5__default.default.forwardRef(
3504
3862
  );
3505
3863
  Input.displayName = "Input";
3506
3864
  var DocSidebarCategory = ({ item, depth }) => {
3507
- const [expanded, setExpanded] = React5.useState(
3865
+ const [expanded, setExpanded] = React7.useState(
3508
3866
  () => item.items?.some(function hasActive(child) {
3509
3867
  if (child.active) return true;
3510
3868
  return child.items?.some(hasActive) ?? false;
@@ -3659,7 +4017,7 @@ var DocBreadcrumb = ({
3659
4017
  "aria-label": "Breadcrumb",
3660
4018
  children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
3661
4019
  const isLast = idx === items.length - 1;
3662
- return /* @__PURE__ */ jsxRuntime.jsxs(React5__default.default.Fragment, { children: [
4020
+ return /* @__PURE__ */ jsxRuntime.jsxs(React7__default.default.Fragment, { children: [
3663
4021
  idx > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3664
4022
  Icon,
3665
4023
  {
@@ -3711,8 +4069,8 @@ function DocCodeBlock({
3711
4069
  showLineNumbers = false,
3712
4070
  className
3713
4071
  }) {
3714
- const [copied, setCopied] = React5.useState(false);
3715
- const handleCopy = React5.useCallback(() => {
4072
+ const [copied, setCopied] = React7.useState(false);
4073
+ const handleCopy = React7.useCallback(() => {
3716
4074
  void navigator.clipboard.writeText(code).then(() => {
3717
4075
  setCopied(true);
3718
4076
  setTimeout(() => setCopied(false), 2e3);
@@ -3877,13 +4235,13 @@ function DocSearch({
3877
4235
  onSearch,
3878
4236
  className
3879
4237
  }) {
3880
- const [query, setQuery] = React5.useState("");
3881
- const [results, setResults] = React5.useState([]);
3882
- const [isOpen, setIsOpen] = React5.useState(false);
3883
- const [activeIndex, setActiveIndex] = React5.useState(-1);
3884
- const containerRef = React5.useRef(null);
3885
- const debounceRef = React5.useRef(void 0);
3886
- React5.useEffect(() => {
4238
+ const [query, setQuery] = React7.useState("");
4239
+ const [results, setResults] = React7.useState([]);
4240
+ const [isOpen, setIsOpen] = React7.useState(false);
4241
+ const [activeIndex, setActiveIndex] = React7.useState(-1);
4242
+ const containerRef = React7.useRef(null);
4243
+ const debounceRef = React7.useRef(void 0);
4244
+ React7.useEffect(() => {
3887
4245
  function handleClickOutside(e) {
3888
4246
  if (containerRef.current && !containerRef.current.contains(e.target)) {
3889
4247
  setIsOpen(false);
@@ -3892,7 +4250,7 @@ function DocSearch({
3892
4250
  document.addEventListener("mousedown", handleClickOutside);
3893
4251
  return () => document.removeEventListener("mousedown", handleClickOutside);
3894
4252
  }, []);
3895
- const performSearch = React5.useCallback(
4253
+ const performSearch = React7.useCallback(
3896
4254
  (value) => {
3897
4255
  if (!onSearch || !value.trim()) {
3898
4256
  setResults([]);
@@ -3914,7 +4272,7 @@ function DocSearch({
3914
4272
  },
3915
4273
  [onSearch]
3916
4274
  );
3917
- const handleChange = React5.useCallback(
4275
+ const handleChange = React7.useCallback(
3918
4276
  (e) => {
3919
4277
  const value = e.target.value;
3920
4278
  setQuery(value);
@@ -3927,18 +4285,18 @@ function DocSearch({
3927
4285
  },
3928
4286
  [performSearch]
3929
4287
  );
3930
- const handleFocus = React5.useCallback(() => {
4288
+ const handleFocus = React7.useCallback(() => {
3931
4289
  if (results.length > 0) {
3932
4290
  setIsOpen(true);
3933
4291
  }
3934
4292
  }, [results]);
3935
- const navigateTo = React5.useCallback((href) => {
4293
+ const navigateTo = React7.useCallback((href) => {
3936
4294
  setIsOpen(false);
3937
4295
  setQuery("");
3938
4296
  setResults([]);
3939
4297
  window.location.href = href;
3940
4298
  }, []);
3941
- const handleKeyDown = React5.useCallback(
4299
+ const handleKeyDown = React7.useCallback(
3942
4300
  (e) => {
3943
4301
  if (e.key === "Escape") {
3944
4302
  setIsOpen(false);
@@ -3965,7 +4323,7 @@ function DocSearch({
3965
4323
  },
3966
4324
  [isOpen, results, activeIndex, navigateTo]
3967
4325
  );
3968
- React5.useEffect(() => {
4326
+ React7.useEffect(() => {
3969
4327
  return () => {
3970
4328
  if (debounceRef.current) {
3971
4329
  clearTimeout(debounceRef.current);