@almadar/ui 4.57.5 → 5.1.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/avl/index.cjs +2499 -1903
- package/dist/avl/index.js +1111 -518
- package/dist/components/atoms/Icon.d.ts +7 -4
- package/dist/components/index.cjs +2064 -1636
- package/dist/components/index.js +905 -480
- package/dist/components/molecules/Breadcrumb.d.ts +4 -4
- package/dist/components/molecules/EmptyState.d.ts +1 -1
- package/dist/components/templates/DashboardLayout.d.ts +1 -1
- package/dist/context/index.cjs +199 -0
- package/dist/context/index.js +199 -0
- package/dist/context/themeTokens.d.ts +1 -1
- package/dist/docs/index.cjs +456 -98
- package/dist/docs/index.d.cts +7 -4
- package/dist/docs/index.js +429 -74
- package/dist/lib/iconFamily.d.ts +41 -0
- package/dist/marketing/index.cjs +480 -124
- package/dist/marketing/index.d.cts +7 -4
- package/dist/marketing/index.js +446 -93
- package/dist/providers/index.cjs +1933 -1505
- package/dist/providers/index.js +909 -484
- package/dist/runtime/index.cjs +2130 -1534
- package/dist/runtime/index.js +1071 -478
- package/package.json +5 -2
- package/tailwind-preset.cjs +118 -3
- package/themes/_contract.md +198 -0
- package/themes/almadar-website.css +212 -0
- package/themes/almadar.css +210 -0
- package/themes/arctic.css +210 -0
- package/themes/atelier.css +427 -0
- package/themes/copper.css +210 -0
- package/themes/ember.css +210 -0
- package/themes/forest.css +210 -0
- package/themes/gazette.css +411 -0
- package/themes/index.css +12 -0
- package/themes/kiosk.css +412 -0
- package/themes/lavender.css +210 -0
- package/themes/midnight.css +210 -0
- package/themes/minimalist.css +210 -0
- package/themes/neon.css +210 -0
- package/themes/ocean.css +210 -0
- package/themes/prism.css +406 -0
- package/themes/rose.css +210 -0
- package/themes/sand.css +210 -0
- package/themes/slate.css +210 -0
- package/themes/sunset.css +210 -0
- package/themes/terminal.css +422 -0
- package/themes/trait-wars.css +210 -0
- package/themes/wireframe.css +216 -0
package/dist/docs/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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
|
|
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 =
|
|
2513
|
-
var TraitScopeContext =
|
|
2518
|
+
var EventBusContext = React7.createContext(null);
|
|
2519
|
+
var TraitScopeContext = React7.createContext(null);
|
|
2514
2520
|
function useTraitScope() {
|
|
2515
|
-
return
|
|
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 =
|
|
2597
|
+
const context = React7.useContext(EventBusContext);
|
|
2592
2598
|
const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
2593
2599
|
const scope = useTraitScope();
|
|
2594
|
-
return
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
3002
|
-
|
|
3003
|
-
"
|
|
3004
|
-
"
|
|
3005
|
-
"
|
|
3006
|
-
"
|
|
3007
|
-
"
|
|
3008
|
-
"
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
"
|
|
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
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
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
|
|
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
|
-
|
|
3428
|
+
Fallback,
|
|
3062
3429
|
{
|
|
3063
|
-
className:
|
|
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
|
};
|
|
@@ -3132,20 +3491,19 @@ var sizeStyles2 = {
|
|
|
3132
3491
|
};
|
|
3133
3492
|
var iconSizeStyles = {
|
|
3134
3493
|
sm: "h-3.5 w-3.5",
|
|
3135
|
-
md: "h-
|
|
3494
|
+
md: "h-icon-default w-icon-default",
|
|
3136
3495
|
lg: "h-5 w-5"
|
|
3137
3496
|
};
|
|
3138
3497
|
function resolveIconProp(value, sizeClass) {
|
|
3139
3498
|
if (!value) return null;
|
|
3140
3499
|
if (typeof value === "string") {
|
|
3141
|
-
|
|
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 (
|
|
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 =
|
|
3515
|
+
var Button = React7__default.default.forwardRef(
|
|
3158
3516
|
({
|
|
3159
3517
|
className,
|
|
3160
3518
|
variant = "primary",
|
|
@@ -3204,7 +3562,7 @@ var Button = React5__default.default.forwardRef(
|
|
|
3204
3562
|
...props,
|
|
3205
3563
|
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
3206
3564
|
children: [
|
|
3207
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Loader2, { className: "h-
|
|
3565
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
3208
3566
|
children || label,
|
|
3209
3567
|
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
3210
3568
|
]
|
|
@@ -3217,23 +3575,23 @@ var variantStyles3 = {
|
|
|
3217
3575
|
default: [
|
|
3218
3576
|
"bg-card",
|
|
3219
3577
|
"border-[length:var(--border-width)] border-border",
|
|
3220
|
-
"shadow-
|
|
3578
|
+
"shadow-elevation-card",
|
|
3221
3579
|
"transition-all duration-[var(--transition-normal)]",
|
|
3222
|
-
"hover:shadow-
|
|
3580
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3223
3581
|
].join(" "),
|
|
3224
3582
|
bordered: [
|
|
3225
3583
|
"bg-card",
|
|
3226
3584
|
"border-[length:var(--border-width)] border-border",
|
|
3227
|
-
"shadow-
|
|
3585
|
+
"shadow-elevation-card",
|
|
3228
3586
|
"transition-all duration-[var(--transition-normal)]",
|
|
3229
|
-
"hover:shadow-
|
|
3587
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3230
3588
|
].join(" "),
|
|
3231
3589
|
elevated: [
|
|
3232
3590
|
"bg-card",
|
|
3233
3591
|
"border-[length:var(--border-width)] border-border",
|
|
3234
3592
|
"shadow",
|
|
3235
3593
|
"transition-all duration-[var(--transition-normal)]",
|
|
3236
|
-
"hover:shadow-
|
|
3594
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3237
3595
|
].join(" "),
|
|
3238
3596
|
// Interactive variant with theme-specific hover effects
|
|
3239
3597
|
interactive: [
|
|
@@ -3242,22 +3600,22 @@ var variantStyles3 = {
|
|
|
3242
3600
|
"shadow",
|
|
3243
3601
|
"cursor-pointer",
|
|
3244
3602
|
"transition-all duration-[var(--transition-normal)]",
|
|
3245
|
-
"hover:shadow-
|
|
3603
|
+
"hover:shadow-elevation-dialog"
|
|
3246
3604
|
].join(" ")
|
|
3247
3605
|
};
|
|
3248
3606
|
var paddingStyles2 = {
|
|
3249
3607
|
none: "",
|
|
3250
|
-
sm: "p-
|
|
3251
|
-
md: "p-
|
|
3252
|
-
lg: "p-
|
|
3608
|
+
sm: "p-card-sm",
|
|
3609
|
+
md: "p-card-md",
|
|
3610
|
+
lg: "p-card-lg"
|
|
3253
3611
|
};
|
|
3254
3612
|
var shadowStyles2 = {
|
|
3255
3613
|
none: "shadow-none",
|
|
3256
|
-
sm: "shadow-
|
|
3614
|
+
sm: "shadow-elevation-card",
|
|
3257
3615
|
md: "shadow",
|
|
3258
|
-
lg: "shadow-
|
|
3616
|
+
lg: "shadow-elevation-dialog"
|
|
3259
3617
|
};
|
|
3260
|
-
var Card =
|
|
3618
|
+
var Card = React7__default.default.forwardRef(
|
|
3261
3619
|
({
|
|
3262
3620
|
className,
|
|
3263
3621
|
variant = "bordered",
|
|
@@ -3273,7 +3631,7 @@ var Card = React5__default.default.forwardRef(
|
|
|
3273
3631
|
{
|
|
3274
3632
|
ref,
|
|
3275
3633
|
className: cn(
|
|
3276
|
-
"rounded-
|
|
3634
|
+
"rounded-container",
|
|
3277
3635
|
"transition-all duration-[var(--transition-normal)]",
|
|
3278
3636
|
variantStyles3[variant],
|
|
3279
3637
|
paddingStyles2[padding],
|
|
@@ -3293,9 +3651,9 @@ var Card = React5__default.default.forwardRef(
|
|
|
3293
3651
|
}
|
|
3294
3652
|
);
|
|
3295
3653
|
Card.displayName = "Card";
|
|
3296
|
-
var CardHeader =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
3752
|
+
var Input = React7__default.default.forwardRef(
|
|
3395
3753
|
({
|
|
3396
3754
|
className,
|
|
3397
3755
|
inputType,
|
|
@@ -3409,7 +3767,7 @@ var Input = React5__default.default.forwardRef(
|
|
|
3409
3767
|
...props
|
|
3410
3768
|
}, ref) => {
|
|
3411
3769
|
const type = inputType || htmlType || "text";
|
|
3412
|
-
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-
|
|
3770
|
+
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
3413
3771
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
3414
3772
|
const baseClassName = cn(
|
|
3415
3773
|
"block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
|
|
@@ -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(
|
|
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(
|
|
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] =
|
|
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(
|
|
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] =
|
|
3715
|
-
const handleCopy =
|
|
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);
|
|
@@ -3723,7 +4081,7 @@ function DocCodeBlock({
|
|
|
3723
4081
|
Box,
|
|
3724
4082
|
{
|
|
3725
4083
|
className: cn(
|
|
3726
|
-
"rounded-
|
|
4084
|
+
"rounded-container border border-border overflow-hidden",
|
|
3727
4085
|
className
|
|
3728
4086
|
),
|
|
3729
4087
|
position: "relative",
|
|
@@ -3798,11 +4156,11 @@ function DocCodeBlock({
|
|
|
3798
4156
|
}
|
|
3799
4157
|
var linkCardStyles = [
|
|
3800
4158
|
"border border-border",
|
|
3801
|
-
"rounded-
|
|
4159
|
+
"rounded-container",
|
|
3802
4160
|
"p-4",
|
|
3803
4161
|
"transition-all",
|
|
3804
4162
|
"hover:border-primary",
|
|
3805
|
-
"hover:shadow-
|
|
4163
|
+
"hover:shadow-elevation-dialog",
|
|
3806
4164
|
"no-underline",
|
|
3807
4165
|
"flex-1",
|
|
3808
4166
|
"min-w-0",
|
|
@@ -3877,13 +4235,13 @@ function DocSearch({
|
|
|
3877
4235
|
onSearch,
|
|
3878
4236
|
className
|
|
3879
4237
|
}) {
|
|
3880
|
-
const [query, setQuery] =
|
|
3881
|
-
const [results, setResults] =
|
|
3882
|
-
const [isOpen, setIsOpen] =
|
|
3883
|
-
const [activeIndex, setActiveIndex] =
|
|
3884
|
-
const containerRef =
|
|
3885
|
-
const debounceRef =
|
|
3886
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4288
|
+
const handleFocus = React7.useCallback(() => {
|
|
3931
4289
|
if (results.length > 0) {
|
|
3932
4290
|
setIsOpen(true);
|
|
3933
4291
|
}
|
|
3934
4292
|
}, [results]);
|
|
3935
|
-
const navigateTo =
|
|
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 =
|
|
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
|
-
|
|
4326
|
+
React7.useEffect(() => {
|
|
3969
4327
|
return () => {
|
|
3970
4328
|
if (debounceRef.current) {
|
|
3971
4329
|
clearTimeout(debounceRef.current);
|
|
@@ -4001,7 +4359,7 @@ function DocSearch({
|
|
|
4001
4359
|
Box,
|
|
4002
4360
|
{
|
|
4003
4361
|
position: "absolute",
|
|
4004
|
-
className: "top-full left-0 right-0 mt-1 z-50 bg-card border border-border rounded-
|
|
4362
|
+
className: "top-full left-0 right-0 mt-1 z-50 bg-card border border-border rounded-container shadow-elevation-popover max-h-80 overflow-y-auto",
|
|
4005
4363
|
children: /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", children: results.map((result, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4006
4364
|
Box,
|
|
4007
4365
|
{
|