@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.
- package/dist/avl/index.cjs +2233 -1838
- package/dist/avl/index.js +844 -452
- package/dist/components/atoms/Icon.d.ts +7 -4
- package/dist/components/index.cjs +1967 -1572
- package/dist/components/index.js +807 -415
- 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/docs/index.cjs +437 -79
- package/dist/docs/index.d.cts +7 -4
- package/dist/docs/index.js +410 -55
- package/dist/lib/iconFamily.d.ts +41 -0
- package/dist/marketing/index.cjs +462 -106
- package/dist/marketing/index.d.cts +7 -4
- package/dist/marketing/index.js +428 -75
- package/dist/providers/index.cjs +1836 -1441
- package/dist/providers/index.js +811 -419
- package/dist/runtime/index.cjs +1864 -1469
- package/dist/runtime/index.js +804 -412
- package/package.json +4 -1
- package/themes/atelier.css +4 -3
- package/themes/index.css +5 -0
- package/themes/kiosk.css +6 -4
package/dist/marketing/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React8 = 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 React8__default = /*#__PURE__*/_interopDefault(React8);
|
|
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 = React8.createContext(null);
|
|
2519
|
+
var TraitScopeContext = React8.createContext(null);
|
|
2514
2520
|
function useTraitScope() {
|
|
2515
|
-
return
|
|
2521
|
+
return React8.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 = React8.useContext(EventBusContext);
|
|
2592
2598
|
const baseBus = context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
2593
2599
|
const scope = useTraitScope();
|
|
2594
|
-
return
|
|
2600
|
+
return React8.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 = React8__default.default.forwardRef(
|
|
2733
2739
|
({
|
|
2734
2740
|
padding,
|
|
2735
2741
|
paddingX,
|
|
@@ -2759,27 +2765,27 @@ var Box = React6__default.default.forwardRef(
|
|
|
2759
2765
|
...rest
|
|
2760
2766
|
}, ref) => {
|
|
2761
2767
|
const eventBus = useEventBus();
|
|
2762
|
-
const handleClick =
|
|
2768
|
+
const handleClick = React8.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 = React8.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 = React8.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 React8__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 React8.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 f3 = resolveFa(name);
|
|
3361
|
+
if (f3) return f3;
|
|
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 = React8__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
|
};
|
|
@@ -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
|
-
|
|
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 (React8__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 = React8__default.default.forwardRef(
|
|
3158
3516
|
({
|
|
3159
3517
|
className,
|
|
3160
3518
|
variant = "primary",
|
|
@@ -3250,13 +3608,10 @@ var sizeStyles3 = {
|
|
|
3250
3608
|
md: "px-2.5 py-1 text-sm",
|
|
3251
3609
|
lg: "px-3 py-1.5 text-base"
|
|
3252
3610
|
};
|
|
3253
|
-
var Badge =
|
|
3611
|
+
var Badge = React8__default.default.forwardRef(
|
|
3254
3612
|
({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
|
|
3255
3613
|
const iconSizes = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
3256
|
-
const resolvedIcon = typeof icon === "string" ? (
|
|
3257
|
-
const I = resolveIcon(icon);
|
|
3258
|
-
return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: iconSizes[size] }) : null;
|
|
3259
|
-
})() : icon;
|
|
3614
|
+
const resolvedIcon = typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: icon, className: iconSizes[size] }) : icon;
|
|
3260
3615
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3261
3616
|
"span",
|
|
3262
3617
|
{
|
|
@@ -3340,7 +3695,7 @@ var shadowStyles2 = {
|
|
|
3340
3695
|
md: "shadow",
|
|
3341
3696
|
lg: "shadow-elevation-dialog"
|
|
3342
3697
|
};
|
|
3343
|
-
var Card =
|
|
3698
|
+
var Card = React8__default.default.forwardRef(
|
|
3344
3699
|
({
|
|
3345
3700
|
className,
|
|
3346
3701
|
variant = "bordered",
|
|
@@ -3376,9 +3731,9 @@ var Card = React6__default.default.forwardRef(
|
|
|
3376
3731
|
}
|
|
3377
3732
|
);
|
|
3378
3733
|
Card.displayName = "Card";
|
|
3379
|
-
var CardHeader =
|
|
3734
|
+
var CardHeader = React8__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
3380
3735
|
CardHeader.displayName = "CardHeader";
|
|
3381
|
-
var CardTitle =
|
|
3736
|
+
var CardTitle = React8__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3382
3737
|
"h3",
|
|
3383
3738
|
{
|
|
3384
3739
|
ref,
|
|
@@ -3391,11 +3746,11 @@ var CardTitle = React6__default.default.forwardRef(({ className, ...props }, ref
|
|
|
3391
3746
|
}
|
|
3392
3747
|
));
|
|
3393
3748
|
CardTitle.displayName = "CardTitle";
|
|
3394
|
-
var CardContent =
|
|
3749
|
+
var CardContent = React8__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("", className), ...props }));
|
|
3395
3750
|
CardContent.displayName = "CardContent";
|
|
3396
3751
|
var CardBody = CardContent;
|
|
3397
3752
|
CardBody.displayName = "CardBody";
|
|
3398
|
-
var CardFooter =
|
|
3753
|
+
var CardFooter = React8__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3399
3754
|
"div",
|
|
3400
3755
|
{
|
|
3401
3756
|
ref,
|
|
@@ -3552,7 +3907,7 @@ var paddingClasses = {
|
|
|
3552
3907
|
md: "py-16",
|
|
3553
3908
|
lg: "py-24"
|
|
3554
3909
|
};
|
|
3555
|
-
var ContentSection =
|
|
3910
|
+
var ContentSection = React8__default.default.forwardRef(
|
|
3556
3911
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
3557
3912
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3558
3913
|
Box,
|
|
@@ -3576,8 +3931,8 @@ var InstallBox = ({
|
|
|
3576
3931
|
label,
|
|
3577
3932
|
className
|
|
3578
3933
|
}) => {
|
|
3579
|
-
const [copied, setCopied] =
|
|
3580
|
-
const handleCopy =
|
|
3934
|
+
const [copied, setCopied] = React8.useState(false);
|
|
3935
|
+
const handleCopy = React8.useCallback(() => {
|
|
3581
3936
|
void navigator.clipboard.writeText(command);
|
|
3582
3937
|
setCopied(true);
|
|
3583
3938
|
const timer = setTimeout(() => setCopied(false), 2e3);
|
|
@@ -4012,7 +4367,7 @@ var PricingCard = ({
|
|
|
4012
4367
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4013
4368
|
Icon,
|
|
4014
4369
|
{
|
|
4015
|
-
|
|
4370
|
+
name: "check",
|
|
4016
4371
|
size: "sm",
|
|
4017
4372
|
className: "flex-shrink-0 text-success"
|
|
4018
4373
|
}
|
|
@@ -4148,7 +4503,7 @@ var StepFlow = ({
|
|
|
4148
4503
|
className
|
|
4149
4504
|
}) => {
|
|
4150
4505
|
if (orientation === "vertical") {
|
|
4151
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4506
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsx(React8__default.default.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
4152
4507
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", align: "center", children: [
|
|
4153
4508
|
/* @__PURE__ */ jsxRuntime.jsx(StepCircle, { step, index }),
|
|
4154
4509
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -4159,7 +4514,7 @@ var StepFlow = ({
|
|
|
4159
4514
|
] })
|
|
4160
4515
|
] }) }, index)) });
|
|
4161
4516
|
}
|
|
4162
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4517
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxRuntime.jsxs(React8__default.default.Fragment, { children: [
|
|
4163
4518
|
/* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
4164
4519
|
/* @__PURE__ */ jsxRuntime.jsx(StepCircle, { step, index }),
|
|
4165
4520
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -4357,7 +4712,7 @@ var Avatar = ({
|
|
|
4357
4712
|
alt,
|
|
4358
4713
|
name,
|
|
4359
4714
|
initials: providedInitials,
|
|
4360
|
-
icon:
|
|
4715
|
+
icon: IconComponent,
|
|
4361
4716
|
size = "md",
|
|
4362
4717
|
status,
|
|
4363
4718
|
badge,
|
|
@@ -4370,7 +4725,7 @@ var Avatar = ({
|
|
|
4370
4725
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
4371
4726
|
const hasImage = !!src;
|
|
4372
4727
|
const hasInitials = !!initials;
|
|
4373
|
-
const hasIcon = !!
|
|
4728
|
+
const hasIcon = !!IconComponent;
|
|
4374
4729
|
const getInitialsBackground = () => "bg-primary text-primary-foreground";
|
|
4375
4730
|
const isClickable = action || onClick;
|
|
4376
4731
|
const handleClick = () => {
|
|
@@ -4414,8 +4769,8 @@ var Avatar = ({
|
|
|
4414
4769
|
),
|
|
4415
4770
|
children: initials.substring(0, 2).toUpperCase()
|
|
4416
4771
|
}
|
|
4417
|
-
) : hasIcon ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4418
|
-
|
|
4772
|
+
) : hasIcon && IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4773
|
+
IconComponent,
|
|
4419
4774
|
{
|
|
4420
4775
|
className: cn(
|
|
4421
4776
|
"text-foreground",
|
|
@@ -4423,8 +4778,9 @@ var Avatar = ({
|
|
|
4423
4778
|
)
|
|
4424
4779
|
}
|
|
4425
4780
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
4426
|
-
|
|
4781
|
+
Icon,
|
|
4427
4782
|
{
|
|
4783
|
+
name: "user",
|
|
4428
4784
|
className: cn(
|
|
4429
4785
|
"text-foreground",
|
|
4430
4786
|
iconSizeClasses[size]
|
|
@@ -4674,10 +5030,10 @@ var AnimatedCounter = ({
|
|
|
4674
5030
|
duration = 1500,
|
|
4675
5031
|
className
|
|
4676
5032
|
}) => {
|
|
4677
|
-
const ref =
|
|
4678
|
-
const [displayValue, setDisplayValue] =
|
|
4679
|
-
const [hasAnimated, setHasAnimated] =
|
|
4680
|
-
const animate =
|
|
5033
|
+
const ref = React8.useRef(null);
|
|
5034
|
+
const [displayValue, setDisplayValue] = React8.useState("0");
|
|
5035
|
+
const [hasAnimated, setHasAnimated] = React8.useState(false);
|
|
5036
|
+
const animate = React8.useCallback(() => {
|
|
4681
5037
|
const { num, prefix, suffix, decimals } = parseValue(value);
|
|
4682
5038
|
if (num === 0) {
|
|
4683
5039
|
setDisplayValue(String(value));
|
|
@@ -4698,22 +5054,22 @@ var AnimatedCounter = ({
|
|
|
4698
5054
|
};
|
|
4699
5055
|
requestAnimationFrame(tick);
|
|
4700
5056
|
}, [value, duration]);
|
|
4701
|
-
|
|
5057
|
+
React8.useEffect(() => {
|
|
4702
5058
|
if (hasAnimated) return;
|
|
4703
5059
|
const el = ref.current;
|
|
4704
5060
|
if (!el) return;
|
|
4705
|
-
const
|
|
5061
|
+
const observer2 = new IntersectionObserver(
|
|
4706
5062
|
(entries) => {
|
|
4707
5063
|
if (entries[0].isIntersecting) {
|
|
4708
5064
|
setHasAnimated(true);
|
|
4709
5065
|
animate();
|
|
4710
|
-
|
|
5066
|
+
observer2.disconnect();
|
|
4711
5067
|
}
|
|
4712
5068
|
},
|
|
4713
5069
|
{ threshold: 0.3 }
|
|
4714
5070
|
);
|
|
4715
|
-
|
|
4716
|
-
return () =>
|
|
5071
|
+
observer2.observe(el);
|
|
5072
|
+
return () => observer2.disconnect();
|
|
4717
5073
|
}, [hasAnimated, animate]);
|
|
4718
5074
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { ref, className: cn("flex flex-col items-center gap-1 p-4", className), children: [
|
|
4719
5075
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4748,7 +5104,7 @@ var animatedStyles = {
|
|
|
4748
5104
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4749
5105
|
"none": {}
|
|
4750
5106
|
};
|
|
4751
|
-
var AnimatedReveal =
|
|
5107
|
+
var AnimatedReveal = React8__default.default.forwardRef(
|
|
4752
5108
|
({
|
|
4753
5109
|
trigger = "scroll",
|
|
4754
5110
|
animation = "fade-up",
|
|
@@ -4763,10 +5119,10 @@ var AnimatedReveal = React6__default.default.forwardRef(
|
|
|
4763
5119
|
style,
|
|
4764
5120
|
...props
|
|
4765
5121
|
}, forwardedRef) => {
|
|
4766
|
-
const [isAnimated, setIsAnimated] =
|
|
4767
|
-
const internalRef =
|
|
4768
|
-
const hasAnimated =
|
|
4769
|
-
const setRef =
|
|
5122
|
+
const [isAnimated, setIsAnimated] = React8.useState(false);
|
|
5123
|
+
const internalRef = React8.useRef(null);
|
|
5124
|
+
const hasAnimated = React8.useRef(false);
|
|
5125
|
+
const setRef = React8.useCallback(
|
|
4770
5126
|
(node) => {
|
|
4771
5127
|
internalRef.current = node;
|
|
4772
5128
|
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
@@ -4774,11 +5130,11 @@ var AnimatedReveal = React6__default.default.forwardRef(
|
|
|
4774
5130
|
},
|
|
4775
5131
|
[forwardedRef]
|
|
4776
5132
|
);
|
|
4777
|
-
|
|
5133
|
+
React8.useEffect(() => {
|
|
4778
5134
|
if (trigger !== "scroll") return;
|
|
4779
5135
|
const el = internalRef.current;
|
|
4780
5136
|
if (!el) return;
|
|
4781
|
-
const
|
|
5137
|
+
const observer2 = new IntersectionObserver(
|
|
4782
5138
|
([entry]) => {
|
|
4783
5139
|
if (entry.isIntersecting) {
|
|
4784
5140
|
if (once && hasAnimated.current) return;
|
|
@@ -4790,8 +5146,8 @@ var AnimatedReveal = React6__default.default.forwardRef(
|
|
|
4790
5146
|
},
|
|
4791
5147
|
{ threshold }
|
|
4792
5148
|
);
|
|
4793
|
-
|
|
4794
|
-
return () =>
|
|
5149
|
+
observer2.observe(el);
|
|
5150
|
+
return () => observer2.disconnect();
|
|
4795
5151
|
}, [trigger, threshold, once]);
|
|
4796
5152
|
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
4797
5153
|
const handleMouseLeave = trigger === "hover" ? () => {
|
|
@@ -4800,7 +5156,7 @@ var AnimatedReveal = React6__default.default.forwardRef(
|
|
|
4800
5156
|
setIsAnimated(false);
|
|
4801
5157
|
}
|
|
4802
5158
|
} : void 0;
|
|
4803
|
-
|
|
5159
|
+
React8.useEffect(() => {
|
|
4804
5160
|
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
4805
5161
|
setIsAnimated(manualAnimate);
|
|
4806
5162
|
}
|
|
@@ -4830,9 +5186,9 @@ var AnimatedReveal = React6__default.default.forwardRef(
|
|
|
4830
5186
|
);
|
|
4831
5187
|
AnimatedReveal.displayName = "AnimatedReveal";
|
|
4832
5188
|
function useFetchedSvg(src) {
|
|
4833
|
-
const [svg, setSvg] =
|
|
4834
|
-
const cache =
|
|
4835
|
-
|
|
5189
|
+
const [svg, setSvg] = React8.useState(null);
|
|
5190
|
+
const cache = React8.useRef({});
|
|
5191
|
+
React8.useEffect(() => {
|
|
4836
5192
|
if (!src) {
|
|
4837
5193
|
setSvg(null);
|
|
4838
5194
|
return;
|
|
@@ -4901,7 +5257,7 @@ function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
|
4901
5257
|
el.style.opacity = animate ? "1" : "0";
|
|
4902
5258
|
});
|
|
4903
5259
|
}
|
|
4904
|
-
var AnimatedGraphic =
|
|
5260
|
+
var AnimatedGraphic = React8__default.default.forwardRef(
|
|
4905
5261
|
({
|
|
4906
5262
|
src,
|
|
4907
5263
|
svgContent,
|
|
@@ -4920,11 +5276,11 @@ var AnimatedGraphic = React6__default.default.forwardRef(
|
|
|
4920
5276
|
children,
|
|
4921
5277
|
...props
|
|
4922
5278
|
}, ref) => {
|
|
4923
|
-
const containerRef =
|
|
5279
|
+
const containerRef = React8.useRef(null);
|
|
4924
5280
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
4925
5281
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
4926
|
-
const prevAnimateRef =
|
|
4927
|
-
const setRef =
|
|
5282
|
+
const prevAnimateRef = React8.useRef(animate);
|
|
5283
|
+
const setRef = React8__default.default.useCallback(
|
|
4928
5284
|
(node) => {
|
|
4929
5285
|
containerRef.current = node;
|
|
4930
5286
|
if (typeof ref === "function") ref(node);
|
|
@@ -4932,7 +5288,7 @@ var AnimatedGraphic = React6__default.default.forwardRef(
|
|
|
4932
5288
|
},
|
|
4933
5289
|
[ref]
|
|
4934
5290
|
);
|
|
4935
|
-
|
|
5291
|
+
React8.useEffect(() => {
|
|
4936
5292
|
const el = containerRef.current;
|
|
4937
5293
|
if (!el || !strokeColor) return;
|
|
4938
5294
|
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
@@ -4940,7 +5296,7 @@ var AnimatedGraphic = React6__default.default.forwardRef(
|
|
|
4940
5296
|
p.style.stroke = strokeColor;
|
|
4941
5297
|
});
|
|
4942
5298
|
}, [resolvedSvg, strokeColor]);
|
|
4943
|
-
|
|
5299
|
+
React8.useEffect(() => {
|
|
4944
5300
|
const el = containerRef.current;
|
|
4945
5301
|
if (!el || !resolvedSvg) return;
|
|
4946
5302
|
if (animation === "draw" || animation === "fill") {
|
|
@@ -4965,7 +5321,7 @@ var AnimatedGraphic = React6__default.default.forwardRef(
|
|
|
4965
5321
|
});
|
|
4966
5322
|
}
|
|
4967
5323
|
}, [resolvedSvg, animation]);
|
|
4968
|
-
|
|
5324
|
+
React8.useEffect(() => {
|
|
4969
5325
|
const el = containerRef.current;
|
|
4970
5326
|
if (!el) return;
|
|
4971
5327
|
const id = requestAnimationFrame(() => {
|
|
@@ -5765,7 +6121,7 @@ var GeometricPattern = ({
|
|
|
5765
6121
|
children,
|
|
5766
6122
|
className
|
|
5767
6123
|
}) => {
|
|
5768
|
-
const reactId =
|
|
6124
|
+
const reactId = React8.useId();
|
|
5769
6125
|
const patternId = `gp${reactId.replace(/:/g, "")}`;
|
|
5770
6126
|
const size = 60 * scale;
|
|
5771
6127
|
const stripHeight = 40 * scale;
|
|
@@ -5992,7 +6348,7 @@ var EdgeDecoration = ({
|
|
|
5992
6348
|
width = 15,
|
|
5993
6349
|
className
|
|
5994
6350
|
}) => {
|
|
5995
|
-
const id =
|
|
6351
|
+
const id = React8.useId();
|
|
5996
6352
|
const Variant = VARIANT_MAP2[variant];
|
|
5997
6353
|
const sides = side === "both" ? ["left", "right"] : [side];
|
|
5998
6354
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sides.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|