@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.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React7, { createContext, useCallback, useContext, useMemo, useSyncExternalStore, useState, useRef, useEffect } from 'react';
|
|
2
2
|
import { createLogger } from '@almadar/logger';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as LucideIcons from 'lucide-react';
|
|
5
|
-
import { Loader2
|
|
5
|
+
import { Loader2 } from 'lucide-react';
|
|
6
|
+
import * as PhosphorIcons from '@phosphor-icons/react';
|
|
7
|
+
import * as TablerIcons from '@tabler/icons-react';
|
|
8
|
+
import * as FaIcons from 'react-icons/fa';
|
|
6
9
|
|
|
7
10
|
// node_modules/clsx/dist/clsx.mjs
|
|
8
11
|
function r(e) {
|
|
@@ -2705,7 +2708,7 @@ var positionStyles = {
|
|
|
2705
2708
|
fixed: "fixed",
|
|
2706
2709
|
sticky: "sticky"
|
|
2707
2710
|
};
|
|
2708
|
-
var Box =
|
|
2711
|
+
var Box = React7.forwardRef(
|
|
2709
2712
|
({
|
|
2710
2713
|
padding,
|
|
2711
2714
|
paddingX,
|
|
@@ -2755,7 +2758,7 @@ var Box = React5.forwardRef(
|
|
|
2755
2758
|
onMouseLeave?.(e);
|
|
2756
2759
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2757
2760
|
const isClickable = action || onClick;
|
|
2758
|
-
return
|
|
2761
|
+
return React7.createElement(
|
|
2759
2762
|
Component,
|
|
2760
2763
|
{
|
|
2761
2764
|
ref,
|
|
@@ -2974,41 +2977,366 @@ var Typography = ({
|
|
|
2974
2977
|
);
|
|
2975
2978
|
};
|
|
2976
2979
|
Typography.displayName = "Typography";
|
|
2977
|
-
var
|
|
2978
|
-
|
|
2979
|
-
"
|
|
2980
|
-
"
|
|
2981
|
-
"
|
|
2982
|
-
"
|
|
2983
|
-
"
|
|
2984
|
-
"
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
"
|
|
2988
|
-
|
|
2980
|
+
var DEFAULT_FAMILY = "lucide";
|
|
2981
|
+
var VALID_FAMILIES = [
|
|
2982
|
+
"lucide",
|
|
2983
|
+
"phosphor-outline",
|
|
2984
|
+
"phosphor-fill",
|
|
2985
|
+
"phosphor-duotone",
|
|
2986
|
+
"tabler",
|
|
2987
|
+
"fa-solid"
|
|
2988
|
+
];
|
|
2989
|
+
function getCurrentIconFamily() {
|
|
2990
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
2991
|
+
return DEFAULT_FAMILY;
|
|
2992
|
+
}
|
|
2993
|
+
const raw = getComputedStyle(document.documentElement).getPropertyValue("--icon-family").trim().replace(/^["']|["']$/g, "");
|
|
2994
|
+
return VALID_FAMILIES.includes(raw) ? raw : DEFAULT_FAMILY;
|
|
2995
|
+
}
|
|
2996
|
+
var cachedFamily = null;
|
|
2997
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
2998
|
+
var observer = null;
|
|
2999
|
+
function ensureObserver() {
|
|
3000
|
+
if (typeof window === "undefined" || observer) return;
|
|
3001
|
+
observer = new MutationObserver(() => {
|
|
3002
|
+
const next = getCurrentIconFamily();
|
|
3003
|
+
if (next !== cachedFamily) {
|
|
3004
|
+
cachedFamily = next;
|
|
3005
|
+
listeners.forEach((fn) => fn());
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
observer.observe(document.documentElement, {
|
|
3009
|
+
attributes: true,
|
|
3010
|
+
attributeFilter: ["data-theme", "style"]
|
|
3011
|
+
});
|
|
3012
|
+
cachedFamily = getCurrentIconFamily();
|
|
3013
|
+
}
|
|
3014
|
+
function subscribeIconFamily(notify) {
|
|
3015
|
+
ensureObserver();
|
|
3016
|
+
listeners.add(notify);
|
|
3017
|
+
return () => {
|
|
3018
|
+
listeners.delete(notify);
|
|
3019
|
+
};
|
|
3020
|
+
}
|
|
3021
|
+
function getIconFamilySnapshot() {
|
|
3022
|
+
if (cachedFamily !== null) return cachedFamily;
|
|
3023
|
+
cachedFamily = getCurrentIconFamily();
|
|
3024
|
+
return cachedFamily;
|
|
3025
|
+
}
|
|
3026
|
+
function getIconFamilyServerSnapshot() {
|
|
3027
|
+
return DEFAULT_FAMILY;
|
|
3028
|
+
}
|
|
3029
|
+
function useIconFamily() {
|
|
3030
|
+
return useSyncExternalStore(
|
|
3031
|
+
subscribeIconFamily,
|
|
3032
|
+
getIconFamilySnapshot,
|
|
3033
|
+
getIconFamilyServerSnapshot
|
|
3034
|
+
);
|
|
3035
|
+
}
|
|
2989
3036
|
function kebabToPascal(name) {
|
|
2990
3037
|
return name.split("-").map((part) => {
|
|
2991
3038
|
if (/^\d+$/.test(part)) return part;
|
|
2992
3039
|
return part.charAt(0).toUpperCase() + part.slice(1);
|
|
2993
3040
|
}).join("");
|
|
2994
3041
|
}
|
|
2995
|
-
var
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3042
|
+
var lucideAliases = {
|
|
3043
|
+
close: LucideIcons.X,
|
|
3044
|
+
trash: LucideIcons.Trash2,
|
|
3045
|
+
loader: LucideIcons.Loader2,
|
|
3046
|
+
stop: LucideIcons.Square,
|
|
3047
|
+
volume: LucideIcons.Volume2,
|
|
3048
|
+
"volume-off": LucideIcons.VolumeX,
|
|
3049
|
+
refresh: LucideIcons.RefreshCw,
|
|
3050
|
+
share: LucideIcons.Share2,
|
|
3051
|
+
"sort-asc": LucideIcons.ArrowUpNarrowWide,
|
|
3052
|
+
"sort-desc": LucideIcons.ArrowDownNarrowWide
|
|
3053
|
+
};
|
|
3054
|
+
function resolveLucide(name) {
|
|
3055
|
+
if (lucideAliases[name]) return lucideAliases[name];
|
|
3056
|
+
const pascal = kebabToPascal(name);
|
|
3057
|
+
const lucideMap = LucideIcons;
|
|
3058
|
+
const direct = lucideMap[pascal];
|
|
3059
|
+
if (direct && typeof direct === "object") return direct;
|
|
3060
|
+
const asIs = lucideMap[name];
|
|
3009
3061
|
if (asIs && typeof asIs === "object") return asIs;
|
|
3010
3062
|
return LucideIcons.HelpCircle;
|
|
3011
3063
|
}
|
|
3064
|
+
var phosphorAliases = {
|
|
3065
|
+
// lucide name → phosphor PascalCase name
|
|
3066
|
+
search: "MagnifyingGlass",
|
|
3067
|
+
close: "X",
|
|
3068
|
+
loader: "CircleNotch",
|
|
3069
|
+
refresh: "ArrowsClockwise",
|
|
3070
|
+
"sort-asc": "SortAscending",
|
|
3071
|
+
"sort-desc": "SortDescending",
|
|
3072
|
+
"chevron-down": "CaretDown",
|
|
3073
|
+
"chevron-up": "CaretUp",
|
|
3074
|
+
"chevron-left": "CaretLeft",
|
|
3075
|
+
"chevron-right": "CaretRight",
|
|
3076
|
+
"help-circle": "Question",
|
|
3077
|
+
"alert-triangle": "Warning",
|
|
3078
|
+
"alert-circle": "WarningCircle",
|
|
3079
|
+
"check-circle": "CheckCircle",
|
|
3080
|
+
"x-circle": "XCircle",
|
|
3081
|
+
edit: "PencilSimple",
|
|
3082
|
+
pencil: "PencilSimple",
|
|
3083
|
+
trash: "Trash",
|
|
3084
|
+
send: "PaperPlaneRight",
|
|
3085
|
+
external: "ArrowSquareOut",
|
|
3086
|
+
"external-link": "ArrowSquareOut",
|
|
3087
|
+
plus: "Plus",
|
|
3088
|
+
minus: "Minus",
|
|
3089
|
+
x: "X",
|
|
3090
|
+
check: "Check",
|
|
3091
|
+
star: "Star",
|
|
3092
|
+
heart: "Heart",
|
|
3093
|
+
home: "House",
|
|
3094
|
+
user: "User",
|
|
3095
|
+
users: "Users",
|
|
3096
|
+
settings: "Gear",
|
|
3097
|
+
menu: "List",
|
|
3098
|
+
"arrow-up": "ArrowUp",
|
|
3099
|
+
"arrow-down": "ArrowDown",
|
|
3100
|
+
"arrow-left": "ArrowLeft",
|
|
3101
|
+
"arrow-right": "ArrowRight",
|
|
3102
|
+
copy: "Copy",
|
|
3103
|
+
download: "DownloadSimple",
|
|
3104
|
+
upload: "UploadSimple",
|
|
3105
|
+
filter: "Funnel",
|
|
3106
|
+
calendar: "Calendar",
|
|
3107
|
+
clock: "Clock",
|
|
3108
|
+
bell: "Bell",
|
|
3109
|
+
mail: "Envelope",
|
|
3110
|
+
envelope: "Envelope",
|
|
3111
|
+
lock: "Lock",
|
|
3112
|
+
unlock: "LockOpen",
|
|
3113
|
+
eye: "Eye",
|
|
3114
|
+
"eye-off": "EyeSlash",
|
|
3115
|
+
more: "DotsThree",
|
|
3116
|
+
"more-vertical": "DotsThreeVertical",
|
|
3117
|
+
info: "Info",
|
|
3118
|
+
warning: "Warning",
|
|
3119
|
+
error: "WarningCircle"
|
|
3120
|
+
};
|
|
3121
|
+
function resolvePhosphor(name, weight) {
|
|
3122
|
+
const target = phosphorAliases[name] ?? kebabToPascal(name);
|
|
3123
|
+
const map = PhosphorIcons;
|
|
3124
|
+
const PhosphorComp = map[target];
|
|
3125
|
+
if (!PhosphorComp || typeof PhosphorComp !== "object") return null;
|
|
3126
|
+
const Component = PhosphorComp;
|
|
3127
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
3128
|
+
Component,
|
|
3129
|
+
{
|
|
3130
|
+
weight,
|
|
3131
|
+
className: props.className,
|
|
3132
|
+
style: props.style,
|
|
3133
|
+
size: props.size ?? "1em"
|
|
3134
|
+
}
|
|
3135
|
+
);
|
|
3136
|
+
Adapter.displayName = `Phosphor.${target}.${weight}`;
|
|
3137
|
+
return Adapter;
|
|
3138
|
+
}
|
|
3139
|
+
var tablerAliases = {
|
|
3140
|
+
// lucide name → tabler suffix (after the `Icon` prefix)
|
|
3141
|
+
search: "Search",
|
|
3142
|
+
close: "X",
|
|
3143
|
+
loader: "Loader2",
|
|
3144
|
+
refresh: "Refresh",
|
|
3145
|
+
"sort-asc": "SortAscending",
|
|
3146
|
+
"sort-desc": "SortDescending",
|
|
3147
|
+
"chevron-down": "ChevronDown",
|
|
3148
|
+
"chevron-up": "ChevronUp",
|
|
3149
|
+
"chevron-left": "ChevronLeft",
|
|
3150
|
+
"chevron-right": "ChevronRight",
|
|
3151
|
+
"help-circle": "HelpCircle",
|
|
3152
|
+
"alert-triangle": "AlertTriangle",
|
|
3153
|
+
"alert-circle": "AlertCircle",
|
|
3154
|
+
"check-circle": "CircleCheck",
|
|
3155
|
+
"x-circle": "CircleX",
|
|
3156
|
+
edit: "Pencil",
|
|
3157
|
+
trash: "Trash",
|
|
3158
|
+
send: "Send",
|
|
3159
|
+
external: "ExternalLink",
|
|
3160
|
+
plus: "Plus",
|
|
3161
|
+
x: "X",
|
|
3162
|
+
check: "Check",
|
|
3163
|
+
star: "Star",
|
|
3164
|
+
heart: "Heart",
|
|
3165
|
+
home: "Home",
|
|
3166
|
+
user: "User",
|
|
3167
|
+
users: "Users",
|
|
3168
|
+
settings: "Settings",
|
|
3169
|
+
menu: "Menu2",
|
|
3170
|
+
copy: "Copy",
|
|
3171
|
+
download: "Download",
|
|
3172
|
+
upload: "Upload",
|
|
3173
|
+
filter: "Filter",
|
|
3174
|
+
calendar: "Calendar",
|
|
3175
|
+
clock: "Clock",
|
|
3176
|
+
bell: "Bell",
|
|
3177
|
+
mail: "Mail",
|
|
3178
|
+
envelope: "Mail",
|
|
3179
|
+
lock: "Lock",
|
|
3180
|
+
unlock: "LockOpen",
|
|
3181
|
+
eye: "Eye",
|
|
3182
|
+
"eye-off": "EyeOff",
|
|
3183
|
+
more: "Dots",
|
|
3184
|
+
"more-vertical": "DotsVertical",
|
|
3185
|
+
info: "InfoCircle"
|
|
3186
|
+
};
|
|
3187
|
+
function resolveTabler(name) {
|
|
3188
|
+
const suffix = tablerAliases[name] ?? kebabToPascal(name);
|
|
3189
|
+
const target = `Icon${suffix}`;
|
|
3190
|
+
const map = TablerIcons;
|
|
3191
|
+
const TablerComp = map[target];
|
|
3192
|
+
if (!TablerComp || typeof TablerComp !== "object") return null;
|
|
3193
|
+
const Component = TablerComp;
|
|
3194
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
3195
|
+
Component,
|
|
3196
|
+
{
|
|
3197
|
+
stroke: props.strokeWidth ?? 1.5,
|
|
3198
|
+
className: props.className,
|
|
3199
|
+
style: props.style,
|
|
3200
|
+
size: props.size ?? 24
|
|
3201
|
+
}
|
|
3202
|
+
);
|
|
3203
|
+
Adapter.displayName = `Tabler.${target}`;
|
|
3204
|
+
return Adapter;
|
|
3205
|
+
}
|
|
3206
|
+
var faAliases = {
|
|
3207
|
+
// lucide name → fa-solid suffix (after the `Fa` prefix)
|
|
3208
|
+
search: "Search",
|
|
3209
|
+
close: "Times",
|
|
3210
|
+
x: "Times",
|
|
3211
|
+
loader: "Spinner",
|
|
3212
|
+
refresh: "Sync",
|
|
3213
|
+
"sort-asc": "SortAmountUp",
|
|
3214
|
+
"sort-desc": "SortAmountDown",
|
|
3215
|
+
"chevron-down": "ChevronDown",
|
|
3216
|
+
"chevron-up": "ChevronUp",
|
|
3217
|
+
"chevron-left": "ChevronLeft",
|
|
3218
|
+
"chevron-right": "ChevronRight",
|
|
3219
|
+
"help-circle": "QuestionCircle",
|
|
3220
|
+
"alert-triangle": "ExclamationTriangle",
|
|
3221
|
+
"alert-circle": "ExclamationCircle",
|
|
3222
|
+
"check-circle": "CheckCircle",
|
|
3223
|
+
"x-circle": "TimesCircle",
|
|
3224
|
+
edit: "Edit",
|
|
3225
|
+
pencil: "Pencil",
|
|
3226
|
+
trash: "Trash",
|
|
3227
|
+
send: "PaperPlane",
|
|
3228
|
+
external: "ExternalLinkAlt",
|
|
3229
|
+
plus: "Plus",
|
|
3230
|
+
minus: "Minus",
|
|
3231
|
+
check: "Check",
|
|
3232
|
+
star: "Star",
|
|
3233
|
+
heart: "Heart",
|
|
3234
|
+
home: "Home",
|
|
3235
|
+
user: "User",
|
|
3236
|
+
users: "Users",
|
|
3237
|
+
settings: "Cog",
|
|
3238
|
+
menu: "Bars",
|
|
3239
|
+
"arrow-up": "ArrowUp",
|
|
3240
|
+
"arrow-down": "ArrowDown",
|
|
3241
|
+
"arrow-left": "ArrowLeft",
|
|
3242
|
+
"arrow-right": "ArrowRight",
|
|
3243
|
+
copy: "Copy",
|
|
3244
|
+
download: "Download",
|
|
3245
|
+
upload: "Upload",
|
|
3246
|
+
filter: "Filter",
|
|
3247
|
+
calendar: "Calendar",
|
|
3248
|
+
clock: "Clock",
|
|
3249
|
+
bell: "Bell",
|
|
3250
|
+
mail: "Envelope",
|
|
3251
|
+
envelope: "Envelope",
|
|
3252
|
+
lock: "Lock",
|
|
3253
|
+
unlock: "LockOpen",
|
|
3254
|
+
eye: "Eye",
|
|
3255
|
+
"eye-off": "EyeSlash",
|
|
3256
|
+
more: "EllipsisH",
|
|
3257
|
+
"more-vertical": "EllipsisV",
|
|
3258
|
+
info: "InfoCircle",
|
|
3259
|
+
warning: "ExclamationTriangle"
|
|
3260
|
+
};
|
|
3261
|
+
function resolveFa(name) {
|
|
3262
|
+
const suffix = faAliases[name] ?? kebabToPascal(name);
|
|
3263
|
+
const target = `Fa${suffix}`;
|
|
3264
|
+
const map = FaIcons;
|
|
3265
|
+
const FaComp = map[target];
|
|
3266
|
+
if (!FaComp || typeof FaComp !== "function") return null;
|
|
3267
|
+
const Component = FaComp;
|
|
3268
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
3269
|
+
Component,
|
|
3270
|
+
{
|
|
3271
|
+
className: props.className,
|
|
3272
|
+
style: props.style,
|
|
3273
|
+
size: props.size ?? "1em"
|
|
3274
|
+
}
|
|
3275
|
+
);
|
|
3276
|
+
Adapter.displayName = `Fa.${target}`;
|
|
3277
|
+
return Adapter;
|
|
3278
|
+
}
|
|
3279
|
+
var warned = /* @__PURE__ */ new Set();
|
|
3280
|
+
function warnFallback(name, family) {
|
|
3281
|
+
const key = `${family}::${name}`;
|
|
3282
|
+
if (warned.has(key)) return;
|
|
3283
|
+
warned.add(key);
|
|
3284
|
+
if (typeof console !== "undefined") {
|
|
3285
|
+
console.warn(
|
|
3286
|
+
`[iconFamily] No '${name}' mapping in family '${family}'; falling back to lucide. Add an alias in lib/iconFamily.ts.`
|
|
3287
|
+
);
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
function makeLucideAdapter(name) {
|
|
3291
|
+
const LucideComp = resolveLucide(name);
|
|
3292
|
+
const Adapter = (props) => /* @__PURE__ */ jsx(
|
|
3293
|
+
LucideComp,
|
|
3294
|
+
{
|
|
3295
|
+
className: props.className,
|
|
3296
|
+
strokeWidth: props.strokeWidth,
|
|
3297
|
+
style: props.style,
|
|
3298
|
+
size: props.size
|
|
3299
|
+
}
|
|
3300
|
+
);
|
|
3301
|
+
Adapter.displayName = `Lucide.${name}`;
|
|
3302
|
+
return Adapter;
|
|
3303
|
+
}
|
|
3304
|
+
function resolveIconForFamily(name, family) {
|
|
3305
|
+
switch (family) {
|
|
3306
|
+
case "lucide":
|
|
3307
|
+
return makeLucideAdapter(name);
|
|
3308
|
+
case "phosphor-outline": {
|
|
3309
|
+
const p = resolvePhosphor(name, "regular");
|
|
3310
|
+
if (p) return p;
|
|
3311
|
+
warnFallback(name, family);
|
|
3312
|
+
return makeLucideAdapter(name);
|
|
3313
|
+
}
|
|
3314
|
+
case "phosphor-fill": {
|
|
3315
|
+
const p = resolvePhosphor(name, "fill");
|
|
3316
|
+
if (p) return p;
|
|
3317
|
+
warnFallback(name, family);
|
|
3318
|
+
return makeLucideAdapter(name);
|
|
3319
|
+
}
|
|
3320
|
+
case "phosphor-duotone": {
|
|
3321
|
+
const p = resolvePhosphor(name, "duotone");
|
|
3322
|
+
if (p) return p;
|
|
3323
|
+
warnFallback(name, family);
|
|
3324
|
+
return makeLucideAdapter(name);
|
|
3325
|
+
}
|
|
3326
|
+
case "tabler": {
|
|
3327
|
+
const t = resolveTabler(name);
|
|
3328
|
+
if (t) return t;
|
|
3329
|
+
warnFallback(name, family);
|
|
3330
|
+
return makeLucideAdapter(name);
|
|
3331
|
+
}
|
|
3332
|
+
case "fa-solid": {
|
|
3333
|
+
const f = resolveFa(name);
|
|
3334
|
+
if (f) return f;
|
|
3335
|
+
warnFallback(name, family);
|
|
3336
|
+
return makeLucideAdapter(name);
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3012
3340
|
var sizeClasses = {
|
|
3013
3341
|
xs: "w-3 h-3",
|
|
3014
3342
|
sm: "w-4 h-4",
|
|
@@ -3031,22 +3359,50 @@ var Icon = ({
|
|
|
3031
3359
|
strokeWidth,
|
|
3032
3360
|
style
|
|
3033
3361
|
}) => {
|
|
3034
|
-
const
|
|
3362
|
+
const family = useIconFamily();
|
|
3363
|
+
const RenderedComponent = React7.useMemo(() => {
|
|
3364
|
+
if (icon) return null;
|
|
3365
|
+
return name ? resolveIconForFamily(name, family) : null;
|
|
3366
|
+
}, [icon, name, family]);
|
|
3035
3367
|
const effectiveStrokeWidth = strokeWidth ?? void 0;
|
|
3368
|
+
const inlineStyle = {
|
|
3369
|
+
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
3370
|
+
...style
|
|
3371
|
+
};
|
|
3372
|
+
const composedClassName = cn(
|
|
3373
|
+
sizeClasses[size],
|
|
3374
|
+
animationClasses[animation],
|
|
3375
|
+
color ? color : "text-current",
|
|
3376
|
+
className
|
|
3377
|
+
);
|
|
3378
|
+
if (icon) {
|
|
3379
|
+
const Direct = icon;
|
|
3380
|
+
return /* @__PURE__ */ jsx(
|
|
3381
|
+
Direct,
|
|
3382
|
+
{
|
|
3383
|
+
className: composedClassName,
|
|
3384
|
+
strokeWidth: effectiveStrokeWidth,
|
|
3385
|
+
style: inlineStyle
|
|
3386
|
+
}
|
|
3387
|
+
);
|
|
3388
|
+
}
|
|
3389
|
+
if (RenderedComponent) {
|
|
3390
|
+
return /* @__PURE__ */ jsx(
|
|
3391
|
+
RenderedComponent,
|
|
3392
|
+
{
|
|
3393
|
+
className: composedClassName,
|
|
3394
|
+
strokeWidth: effectiveStrokeWidth,
|
|
3395
|
+
style: inlineStyle
|
|
3396
|
+
}
|
|
3397
|
+
);
|
|
3398
|
+
}
|
|
3399
|
+
const Fallback = LucideIcons.HelpCircle;
|
|
3036
3400
|
return /* @__PURE__ */ jsx(
|
|
3037
|
-
|
|
3401
|
+
Fallback,
|
|
3038
3402
|
{
|
|
3039
|
-
className:
|
|
3040
|
-
sizeClasses[size],
|
|
3041
|
-
animationClasses[animation],
|
|
3042
|
-
color ? color : "text-current",
|
|
3043
|
-
className
|
|
3044
|
-
),
|
|
3403
|
+
className: composedClassName,
|
|
3045
3404
|
strokeWidth: effectiveStrokeWidth,
|
|
3046
|
-
style:
|
|
3047
|
-
...effectiveStrokeWidth === void 0 ? { strokeWidth: "var(--icon-stroke-width, 2)" } : {},
|
|
3048
|
-
...style
|
|
3049
|
-
}
|
|
3405
|
+
style: inlineStyle
|
|
3050
3406
|
}
|
|
3051
3407
|
);
|
|
3052
3408
|
};
|
|
@@ -3108,20 +3464,19 @@ var sizeStyles2 = {
|
|
|
3108
3464
|
};
|
|
3109
3465
|
var iconSizeStyles = {
|
|
3110
3466
|
sm: "h-3.5 w-3.5",
|
|
3111
|
-
md: "h-
|
|
3467
|
+
md: "h-icon-default w-icon-default",
|
|
3112
3468
|
lg: "h-5 w-5"
|
|
3113
3469
|
};
|
|
3114
3470
|
function resolveIconProp(value, sizeClass) {
|
|
3115
3471
|
if (!value) return null;
|
|
3116
3472
|
if (typeof value === "string") {
|
|
3117
|
-
|
|
3118
|
-
return Resolved ? /* @__PURE__ */ jsx(Resolved, { className: sizeClass }) : null;
|
|
3473
|
+
return /* @__PURE__ */ jsx(Icon, { name: value, className: sizeClass });
|
|
3119
3474
|
}
|
|
3120
3475
|
if (typeof value === "function") {
|
|
3121
3476
|
const IconComp = value;
|
|
3122
3477
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
3123
3478
|
}
|
|
3124
|
-
if (
|
|
3479
|
+
if (React7.isValidElement(value)) {
|
|
3125
3480
|
return value;
|
|
3126
3481
|
}
|
|
3127
3482
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -3130,7 +3485,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
3130
3485
|
}
|
|
3131
3486
|
return value;
|
|
3132
3487
|
}
|
|
3133
|
-
var Button =
|
|
3488
|
+
var Button = React7.forwardRef(
|
|
3134
3489
|
({
|
|
3135
3490
|
className,
|
|
3136
3491
|
variant = "primary",
|
|
@@ -3180,7 +3535,7 @@ var Button = React5.forwardRef(
|
|
|
3180
3535
|
...props,
|
|
3181
3536
|
"data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
|
|
3182
3537
|
children: [
|
|
3183
|
-
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-
|
|
3538
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
|
|
3184
3539
|
children || label,
|
|
3185
3540
|
resolvedRightIcon && !isLoading && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedRightIcon })
|
|
3186
3541
|
]
|
|
@@ -3193,23 +3548,23 @@ var variantStyles3 = {
|
|
|
3193
3548
|
default: [
|
|
3194
3549
|
"bg-card",
|
|
3195
3550
|
"border-[length:var(--border-width)] border-border",
|
|
3196
|
-
"shadow-
|
|
3551
|
+
"shadow-elevation-card",
|
|
3197
3552
|
"transition-all duration-[var(--transition-normal)]",
|
|
3198
|
-
"hover:shadow-
|
|
3553
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3199
3554
|
].join(" "),
|
|
3200
3555
|
bordered: [
|
|
3201
3556
|
"bg-card",
|
|
3202
3557
|
"border-[length:var(--border-width)] border-border",
|
|
3203
|
-
"shadow-
|
|
3558
|
+
"shadow-elevation-card",
|
|
3204
3559
|
"transition-all duration-[var(--transition-normal)]",
|
|
3205
|
-
"hover:shadow-
|
|
3560
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3206
3561
|
].join(" "),
|
|
3207
3562
|
elevated: [
|
|
3208
3563
|
"bg-card",
|
|
3209
3564
|
"border-[length:var(--border-width)] border-border",
|
|
3210
3565
|
"shadow",
|
|
3211
3566
|
"transition-all duration-[var(--transition-normal)]",
|
|
3212
|
-
"hover:shadow-
|
|
3567
|
+
"hover:shadow-elevation-dialog hover:-translate-y-0.5"
|
|
3213
3568
|
].join(" "),
|
|
3214
3569
|
// Interactive variant with theme-specific hover effects
|
|
3215
3570
|
interactive: [
|
|
@@ -3218,22 +3573,22 @@ var variantStyles3 = {
|
|
|
3218
3573
|
"shadow",
|
|
3219
3574
|
"cursor-pointer",
|
|
3220
3575
|
"transition-all duration-[var(--transition-normal)]",
|
|
3221
|
-
"hover:shadow-
|
|
3576
|
+
"hover:shadow-elevation-dialog"
|
|
3222
3577
|
].join(" ")
|
|
3223
3578
|
};
|
|
3224
3579
|
var paddingStyles2 = {
|
|
3225
3580
|
none: "",
|
|
3226
|
-
sm: "p-
|
|
3227
|
-
md: "p-
|
|
3228
|
-
lg: "p-
|
|
3581
|
+
sm: "p-card-sm",
|
|
3582
|
+
md: "p-card-md",
|
|
3583
|
+
lg: "p-card-lg"
|
|
3229
3584
|
};
|
|
3230
3585
|
var shadowStyles2 = {
|
|
3231
3586
|
none: "shadow-none",
|
|
3232
|
-
sm: "shadow-
|
|
3587
|
+
sm: "shadow-elevation-card",
|
|
3233
3588
|
md: "shadow",
|
|
3234
|
-
lg: "shadow-
|
|
3589
|
+
lg: "shadow-elevation-dialog"
|
|
3235
3590
|
};
|
|
3236
|
-
var Card =
|
|
3591
|
+
var Card = React7.forwardRef(
|
|
3237
3592
|
({
|
|
3238
3593
|
className,
|
|
3239
3594
|
variant = "bordered",
|
|
@@ -3249,7 +3604,7 @@ var Card = React5.forwardRef(
|
|
|
3249
3604
|
{
|
|
3250
3605
|
ref,
|
|
3251
3606
|
className: cn(
|
|
3252
|
-
"rounded-
|
|
3607
|
+
"rounded-container",
|
|
3253
3608
|
"transition-all duration-[var(--transition-normal)]",
|
|
3254
3609
|
variantStyles3[variant],
|
|
3255
3610
|
paddingStyles2[padding],
|
|
@@ -3269,9 +3624,9 @@ var Card = React5.forwardRef(
|
|
|
3269
3624
|
}
|
|
3270
3625
|
);
|
|
3271
3626
|
Card.displayName = "Card";
|
|
3272
|
-
var CardHeader =
|
|
3627
|
+
var CardHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3273
3628
|
CardHeader.displayName = "CardHeader";
|
|
3274
|
-
var CardTitle =
|
|
3629
|
+
var CardTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3275
3630
|
"h3",
|
|
3276
3631
|
{
|
|
3277
3632
|
ref,
|
|
@@ -3284,11 +3639,11 @@ var CardTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3284
3639
|
}
|
|
3285
3640
|
));
|
|
3286
3641
|
CardTitle.displayName = "CardTitle";
|
|
3287
|
-
var CardContent =
|
|
3642
|
+
var CardContent = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
3288
3643
|
CardContent.displayName = "CardContent";
|
|
3289
3644
|
var CardBody = CardContent;
|
|
3290
3645
|
CardBody.displayName = "CardBody";
|
|
3291
|
-
var CardFooter =
|
|
3646
|
+
var CardFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3292
3647
|
"div",
|
|
3293
3648
|
{
|
|
3294
3649
|
ref,
|
|
@@ -3367,7 +3722,7 @@ var Divider = ({
|
|
|
3367
3722
|
);
|
|
3368
3723
|
};
|
|
3369
3724
|
Divider.displayName = "Divider";
|
|
3370
|
-
var Input =
|
|
3725
|
+
var Input = React7.forwardRef(
|
|
3371
3726
|
({
|
|
3372
3727
|
className,
|
|
3373
3728
|
inputType,
|
|
@@ -3385,7 +3740,7 @@ var Input = React5.forwardRef(
|
|
|
3385
3740
|
...props
|
|
3386
3741
|
}, ref) => {
|
|
3387
3742
|
const type = inputType || htmlType || "text";
|
|
3388
|
-
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "h-
|
|
3743
|
+
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "h-icon-default w-icon-default" });
|
|
3389
3744
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
3390
3745
|
const baseClassName = cn(
|
|
3391
3746
|
"block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
|
|
@@ -3417,7 +3772,7 @@ var Input = React5.forwardRef(
|
|
|
3417
3772
|
]
|
|
3418
3773
|
}
|
|
3419
3774
|
),
|
|
3420
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(
|
|
3775
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "h-icon-default w-icon-default" }) })
|
|
3421
3776
|
] });
|
|
3422
3777
|
}
|
|
3423
3778
|
if (type === "textarea") {
|
|
@@ -3471,7 +3826,7 @@ var Input = React5.forwardRef(
|
|
|
3471
3826
|
type: "button",
|
|
3472
3827
|
onClick: onClear,
|
|
3473
3828
|
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
3474
|
-
children: /* @__PURE__ */ jsx(
|
|
3829
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-icon-default w-icon-default" })
|
|
3475
3830
|
}
|
|
3476
3831
|
),
|
|
3477
3832
|
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
@@ -3635,7 +3990,7 @@ var DocBreadcrumb = ({
|
|
|
3635
3990
|
"aria-label": "Breadcrumb",
|
|
3636
3991
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
3637
3992
|
const isLast = idx === items.length - 1;
|
|
3638
|
-
return /* @__PURE__ */ jsxs(
|
|
3993
|
+
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
3639
3994
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
3640
3995
|
Icon,
|
|
3641
3996
|
{
|
|
@@ -3699,7 +4054,7 @@ function DocCodeBlock({
|
|
|
3699
4054
|
Box,
|
|
3700
4055
|
{
|
|
3701
4056
|
className: cn(
|
|
3702
|
-
"rounded-
|
|
4057
|
+
"rounded-container border border-border overflow-hidden",
|
|
3703
4058
|
className
|
|
3704
4059
|
),
|
|
3705
4060
|
position: "relative",
|
|
@@ -3774,11 +4129,11 @@ function DocCodeBlock({
|
|
|
3774
4129
|
}
|
|
3775
4130
|
var linkCardStyles = [
|
|
3776
4131
|
"border border-border",
|
|
3777
|
-
"rounded-
|
|
4132
|
+
"rounded-container",
|
|
3778
4133
|
"p-4",
|
|
3779
4134
|
"transition-all",
|
|
3780
4135
|
"hover:border-primary",
|
|
3781
|
-
"hover:shadow-
|
|
4136
|
+
"hover:shadow-elevation-dialog",
|
|
3782
4137
|
"no-underline",
|
|
3783
4138
|
"flex-1",
|
|
3784
4139
|
"min-w-0",
|
|
@@ -3977,7 +4332,7 @@ function DocSearch({
|
|
|
3977
4332
|
Box,
|
|
3978
4333
|
{
|
|
3979
4334
|
position: "absolute",
|
|
3980
|
-
className: "top-full left-0 right-0 mt-1 z-50 bg-card border border-border rounded-
|
|
4335
|
+
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",
|
|
3981
4336
|
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: results.map((result, index) => /* @__PURE__ */ jsx(
|
|
3982
4337
|
Box,
|
|
3983
4338
|
{
|