@almadar/ui 2.25.4 → 2.27.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 +43 -43
- package/dist/avl/index.js +43 -43
- package/dist/components/atoms/AnimatedGraphic.d.ts +29 -0
- package/dist/components/atoms/AnimatedReveal.d.ts +24 -0
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/index.cjs +2272 -1924
- package/dist/components/index.js +1410 -1064
- package/dist/components/organisms/debug/RuntimeDebugger.d.ts +2 -2
- package/dist/components/organisms/game/three/index.cjs +41 -41
- package/dist/components/organisms/game/three/index.js +41 -41
- package/dist/docs/index.cjs +142 -142
- package/dist/docs/index.js +142 -142
- package/dist/illustrations/index.cjs +17 -17
- package/dist/illustrations/index.js +17 -17
- package/dist/lib/index.cjs +62 -50
- package/dist/lib/index.js +62 -50
- package/dist/marketing/index.cjs +452 -167
- package/dist/marketing/index.d.cts +54 -1
- package/dist/marketing/index.d.ts +4 -0
- package/dist/marketing/index.js +452 -169
- package/dist/providers/index.cjs +623 -327
- package/dist/providers/index.js +535 -239
- package/dist/runtime/index.cjs +2146 -1768
- package/dist/runtime/index.js +1387 -1009
- package/package.json +1 -1
- package/tailwind-preset.cjs +30 -188
package/dist/providers/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React112 from 'react';
|
|
2
|
+
import React112__default, { createContext, useCallback, useState, useRef, useEffect, useLayoutEffect, lazy, useContext, useMemo } from 'react';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { EventBusContext } from '@almadar/ui/providers';
|
|
5
5
|
import 'react-dom';
|
|
@@ -357,8 +357,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
357
357
|
payload,
|
|
358
358
|
timestamp: Date.now()
|
|
359
359
|
};
|
|
360
|
-
const
|
|
361
|
-
const listenerCount =
|
|
360
|
+
const listeners6 = listenersRef.current.get(type);
|
|
361
|
+
const listenerCount = listeners6?.size ?? 0;
|
|
362
362
|
if (debug2) {
|
|
363
363
|
if (listenerCount > 0) {
|
|
364
364
|
console.log(`[EventBus] Emit: ${type} \u2192 ${listenerCount} listener(s)`, payload);
|
|
@@ -366,8 +366,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
366
366
|
console.warn(`[EventBus] Emit: ${type} (NO LISTENERS - event may be lost!)`, payload);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
if (
|
|
370
|
-
const listenersCopy = Array.from(
|
|
369
|
+
if (listeners6) {
|
|
370
|
+
const listenersCopy = Array.from(listeners6);
|
|
371
371
|
for (const listener of listenersCopy) {
|
|
372
372
|
try {
|
|
373
373
|
listener(event);
|
|
@@ -389,17 +389,17 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
389
389
|
if (!listenersRef.current.has(type)) {
|
|
390
390
|
listenersRef.current.set(type, /* @__PURE__ */ new Set());
|
|
391
391
|
}
|
|
392
|
-
const
|
|
393
|
-
|
|
392
|
+
const listeners6 = listenersRef.current.get(type);
|
|
393
|
+
listeners6.add(listener);
|
|
394
394
|
if (debug2) {
|
|
395
|
-
console.log(`[EventBus] Subscribed to '${type}', total: ${
|
|
395
|
+
console.log(`[EventBus] Subscribed to '${type}', total: ${listeners6.size}`);
|
|
396
396
|
}
|
|
397
397
|
return () => {
|
|
398
|
-
|
|
398
|
+
listeners6.delete(listener);
|
|
399
399
|
if (debug2) {
|
|
400
|
-
console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${
|
|
400
|
+
console.log(`[EventBus] Unsubscribed from '${type}', remaining: ${listeners6.size}`);
|
|
401
401
|
}
|
|
402
|
-
if (
|
|
402
|
+
if (listeners6.size === 0) {
|
|
403
403
|
listenersRef.current.delete(type);
|
|
404
404
|
}
|
|
405
405
|
};
|
|
@@ -412,8 +412,8 @@ function EventBusProvider({ children, debug: debug2 = false }) {
|
|
|
412
412
|
return on(type, wrappedListener);
|
|
413
413
|
}, [on]);
|
|
414
414
|
const hasListeners = useCallback((type) => {
|
|
415
|
-
const
|
|
416
|
-
return
|
|
415
|
+
const listeners6 = listenersRef.current.get(type);
|
|
416
|
+
return listeners6 !== void 0 && listeners6.size > 0;
|
|
417
417
|
}, []);
|
|
418
418
|
const onAny = useCallback((listener) => {
|
|
419
419
|
anyListenersRef.current.add(listener);
|
|
@@ -631,28 +631,28 @@ var marginYStyles = {
|
|
|
631
631
|
};
|
|
632
632
|
var bgStyles = {
|
|
633
633
|
transparent: "bg-transparent",
|
|
634
|
-
primary: "bg-
|
|
635
|
-
secondary: "bg-
|
|
636
|
-
muted: "bg-
|
|
637
|
-
accent: "bg-
|
|
638
|
-
surface: "bg-
|
|
639
|
-
overlay: "bg-
|
|
634
|
+
primary: "bg-primary text-primary-foreground",
|
|
635
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
636
|
+
muted: "bg-muted text-foreground",
|
|
637
|
+
accent: "bg-accent text-accent-foreground",
|
|
638
|
+
surface: "bg-card",
|
|
639
|
+
overlay: "bg-card/80 backdrop-blur-sm"
|
|
640
640
|
};
|
|
641
641
|
var roundedStyles = {
|
|
642
642
|
none: "rounded-none",
|
|
643
|
-
sm: "rounded-
|
|
644
|
-
md: "rounded-
|
|
645
|
-
lg: "rounded-
|
|
646
|
-
xl: "rounded-
|
|
647
|
-
"2xl": "rounded-
|
|
648
|
-
full: "rounded-
|
|
643
|
+
sm: "rounded-sm",
|
|
644
|
+
md: "rounded-md",
|
|
645
|
+
lg: "rounded-lg",
|
|
646
|
+
xl: "rounded-xl",
|
|
647
|
+
"2xl": "rounded-xl",
|
|
648
|
+
full: "rounded-full"
|
|
649
649
|
};
|
|
650
650
|
var shadowStyles = {
|
|
651
651
|
none: "shadow-none",
|
|
652
|
-
sm: "shadow-
|
|
653
|
-
md: "shadow
|
|
654
|
-
lg: "shadow-
|
|
655
|
-
xl: "shadow-
|
|
652
|
+
sm: "shadow-sm",
|
|
653
|
+
md: "shadow",
|
|
654
|
+
lg: "shadow-lg",
|
|
655
|
+
xl: "shadow-lg"
|
|
656
656
|
};
|
|
657
657
|
var displayStyles = {
|
|
658
658
|
block: "block",
|
|
@@ -674,7 +674,7 @@ var positionStyles = {
|
|
|
674
674
|
fixed: "fixed",
|
|
675
675
|
sticky: "sticky"
|
|
676
676
|
};
|
|
677
|
-
var Box =
|
|
677
|
+
var Box = React112__default.forwardRef(
|
|
678
678
|
({
|
|
679
679
|
padding,
|
|
680
680
|
paddingX,
|
|
@@ -740,7 +740,7 @@ var Box = React110__default.forwardRef(
|
|
|
740
740
|
// Background
|
|
741
741
|
bgStyles[bg],
|
|
742
742
|
// Border - uses theme variables
|
|
743
|
-
border && "border-[length:var(--border-width)] border-
|
|
743
|
+
border && "border-[length:var(--border-width)] border-border",
|
|
744
744
|
// Rounded
|
|
745
745
|
roundedStyles[rounded],
|
|
746
746
|
// Shadow
|
|
@@ -769,30 +769,30 @@ var Box = React110__default.forwardRef(
|
|
|
769
769
|
);
|
|
770
770
|
Box.displayName = "Box";
|
|
771
771
|
var variantStyles = {
|
|
772
|
-
h1: "text-4xl font-bold tracking-tight text-
|
|
773
|
-
h2: "text-3xl font-bold tracking-tight text-
|
|
774
|
-
h3: "text-2xl font-bold text-
|
|
775
|
-
h4: "text-xl font-bold text-
|
|
776
|
-
h5: "text-lg font-bold text-
|
|
777
|
-
h6: "text-base font-bold text-
|
|
778
|
-
heading: "text-2xl font-bold text-
|
|
779
|
-
subheading: "text-lg font-semibold text-
|
|
780
|
-
body1: "text-base font-normal text-
|
|
781
|
-
body2: "text-sm font-normal text-
|
|
782
|
-
body: "text-base font-normal text-
|
|
783
|
-
caption: "text-xs font-normal text-
|
|
784
|
-
overline: "text-xs uppercase tracking-wide font-bold text-
|
|
785
|
-
small: "text-sm font-normal text-
|
|
786
|
-
large: "text-lg font-medium text-
|
|
787
|
-
label: "text-sm font-medium text-
|
|
772
|
+
h1: "text-4xl font-bold tracking-tight text-foreground",
|
|
773
|
+
h2: "text-3xl font-bold tracking-tight text-foreground",
|
|
774
|
+
h3: "text-2xl font-bold text-foreground",
|
|
775
|
+
h4: "text-xl font-bold text-foreground",
|
|
776
|
+
h5: "text-lg font-bold text-foreground",
|
|
777
|
+
h6: "text-base font-bold text-foreground",
|
|
778
|
+
heading: "text-2xl font-bold text-foreground",
|
|
779
|
+
subheading: "text-lg font-semibold text-foreground",
|
|
780
|
+
body1: "text-base font-normal text-foreground",
|
|
781
|
+
body2: "text-sm font-normal text-foreground",
|
|
782
|
+
body: "text-base font-normal text-foreground",
|
|
783
|
+
caption: "text-xs font-normal text-muted-foreground",
|
|
784
|
+
overline: "text-xs uppercase tracking-wide font-bold text-muted-foreground",
|
|
785
|
+
small: "text-sm font-normal text-foreground",
|
|
786
|
+
large: "text-lg font-medium text-foreground",
|
|
787
|
+
label: "text-sm font-medium text-foreground"
|
|
788
788
|
};
|
|
789
789
|
var colorStyles = {
|
|
790
|
-
primary: "text-
|
|
791
|
-
secondary: "text-
|
|
792
|
-
muted: "text-
|
|
793
|
-
error: "text-
|
|
794
|
-
success: "text-
|
|
795
|
-
warning: "text-
|
|
790
|
+
primary: "text-foreground",
|
|
791
|
+
secondary: "text-muted-foreground",
|
|
792
|
+
muted: "text-muted-foreground",
|
|
793
|
+
error: "text-error",
|
|
794
|
+
success: "text-success",
|
|
795
|
+
warning: "text-warning",
|
|
796
796
|
inherit: "text-inherit"
|
|
797
797
|
};
|
|
798
798
|
var weightStyles = {
|
|
@@ -877,49 +877,49 @@ var Typography = ({
|
|
|
877
877
|
Typography.displayName = "Typography";
|
|
878
878
|
var variantStyles2 = {
|
|
879
879
|
primary: [
|
|
880
|
-
"bg-
|
|
880
|
+
"bg-primary text-primary-foreground",
|
|
881
881
|
"border-none",
|
|
882
|
-
"shadow-
|
|
883
|
-
"hover:bg-
|
|
884
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
882
|
+
"shadow-sm",
|
|
883
|
+
"hover:bg-primary-hover hover:shadow-lg",
|
|
884
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
885
885
|
].join(" "),
|
|
886
886
|
secondary: [
|
|
887
|
-
"bg-transparent text-
|
|
888
|
-
"border border-
|
|
889
|
-
"hover:bg-
|
|
887
|
+
"bg-transparent text-accent",
|
|
888
|
+
"border border-accent",
|
|
889
|
+
"hover:bg-accent hover:text-white hover:border-accent",
|
|
890
890
|
"active:scale-[var(--active-scale)]"
|
|
891
891
|
].join(" "),
|
|
892
892
|
ghost: [
|
|
893
|
-
"bg-transparent text-
|
|
894
|
-
"hover:text-
|
|
893
|
+
"bg-transparent text-muted-foreground",
|
|
894
|
+
"hover:text-foreground hover:bg-muted",
|
|
895
895
|
"active:scale-[var(--active-scale)]"
|
|
896
896
|
].join(" "),
|
|
897
897
|
danger: [
|
|
898
|
-
"bg-
|
|
899
|
-
"border-[length:var(--border-width)] border-
|
|
900
|
-
"shadow-
|
|
901
|
-
"hover:bg-
|
|
902
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
898
|
+
"bg-surface text-error",
|
|
899
|
+
"border-[length:var(--border-width)] border-error",
|
|
900
|
+
"shadow-sm",
|
|
901
|
+
"hover:bg-error hover:text-error-foreground hover:shadow-lg",
|
|
902
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
903
903
|
].join(" "),
|
|
904
904
|
success: [
|
|
905
|
-
"bg-
|
|
906
|
-
"border-[length:var(--border-width)] border-
|
|
907
|
-
"shadow-
|
|
908
|
-
"hover:bg-
|
|
909
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
905
|
+
"bg-surface text-success",
|
|
906
|
+
"border-[length:var(--border-width)] border-success",
|
|
907
|
+
"shadow-sm",
|
|
908
|
+
"hover:bg-success hover:text-success-foreground hover:shadow-lg",
|
|
909
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
910
910
|
].join(" "),
|
|
911
911
|
warning: [
|
|
912
|
-
"bg-
|
|
913
|
-
"border-[length:var(--border-width)] border-
|
|
914
|
-
"shadow-
|
|
915
|
-
"hover:bg-
|
|
916
|
-
"active:scale-[var(--active-scale)] active:shadow-
|
|
912
|
+
"bg-surface text-warning",
|
|
913
|
+
"border-[length:var(--border-width)] border-warning",
|
|
914
|
+
"shadow-sm",
|
|
915
|
+
"hover:bg-warning hover:text-warning-foreground hover:shadow-lg",
|
|
916
|
+
"active:scale-[var(--active-scale)] active:shadow-sm"
|
|
917
917
|
].join(" "),
|
|
918
918
|
// "default" is an alias for secondary
|
|
919
919
|
default: [
|
|
920
|
-
"bg-
|
|
921
|
-
"border-[length:var(--border-width-thin)] border-
|
|
922
|
-
"hover:bg-
|
|
920
|
+
"bg-secondary text-secondary-foreground",
|
|
921
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
922
|
+
"hover:bg-secondary-hover",
|
|
923
923
|
"active:scale-[var(--active-scale)]"
|
|
924
924
|
].join(" ")
|
|
925
925
|
};
|
|
@@ -944,7 +944,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
944
944
|
const IconComp = value;
|
|
945
945
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
946
946
|
}
|
|
947
|
-
if (
|
|
947
|
+
if (React112__default.isValidElement(value)) {
|
|
948
948
|
return value;
|
|
949
949
|
}
|
|
950
950
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -953,7 +953,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
953
953
|
}
|
|
954
954
|
return value;
|
|
955
955
|
}
|
|
956
|
-
var Button =
|
|
956
|
+
var Button = React112__default.forwardRef(
|
|
957
957
|
({
|
|
958
958
|
className,
|
|
959
959
|
variant = "primary",
|
|
@@ -990,10 +990,10 @@ var Button = React110__default.forwardRef(
|
|
|
990
990
|
className: cn(
|
|
991
991
|
"inline-flex items-center justify-center gap-2",
|
|
992
992
|
"font-[var(--font-weight-medium)]",
|
|
993
|
-
"rounded-
|
|
993
|
+
"rounded-sm",
|
|
994
994
|
"cursor-pointer",
|
|
995
995
|
"transition-all duration-[var(--transition-normal)]",
|
|
996
|
-
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-
|
|
996
|
+
"focus:outline-none focus:ring-[length:var(--focus-ring-width)] focus:ring-ring focus:ring-offset-[length:var(--focus-ring-offset)]",
|
|
997
997
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
998
998
|
variantStyles2[variant],
|
|
999
999
|
sizeStyles2[size],
|
|
@@ -1014,34 +1014,34 @@ var Button = React110__default.forwardRef(
|
|
|
1014
1014
|
Button.displayName = "Button";
|
|
1015
1015
|
var variantStyles3 = {
|
|
1016
1016
|
default: [
|
|
1017
|
-
"bg-
|
|
1018
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1017
|
+
"bg-muted text-foreground",
|
|
1018
|
+
"border-[length:var(--border-width-thin)] border-border"
|
|
1019
1019
|
].join(" "),
|
|
1020
|
-
primary: "bg-
|
|
1021
|
-
secondary: "bg-
|
|
1020
|
+
primary: "bg-primary text-primary-foreground",
|
|
1021
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
1022
1022
|
success: [
|
|
1023
|
-
"bg-
|
|
1024
|
-
"border-[length:var(--border-width)] border-
|
|
1023
|
+
"bg-surface text-success",
|
|
1024
|
+
"border-[length:var(--border-width)] border-success"
|
|
1025
1025
|
].join(" "),
|
|
1026
1026
|
warning: [
|
|
1027
|
-
"bg-
|
|
1028
|
-
"border-[length:var(--border-width)] border-
|
|
1027
|
+
"bg-surface text-warning",
|
|
1028
|
+
"border-[length:var(--border-width)] border-warning"
|
|
1029
1029
|
].join(" "),
|
|
1030
1030
|
danger: [
|
|
1031
|
-
"bg-
|
|
1032
|
-
"border-[length:var(--border-width)] border-
|
|
1031
|
+
"bg-surface text-error",
|
|
1032
|
+
"border-[length:var(--border-width)] border-error"
|
|
1033
1033
|
].join(" "),
|
|
1034
1034
|
error: [
|
|
1035
|
-
"bg-
|
|
1036
|
-
"border-[length:var(--border-width)] border-
|
|
1035
|
+
"bg-surface text-error",
|
|
1036
|
+
"border-[length:var(--border-width)] border-error"
|
|
1037
1037
|
].join(" "),
|
|
1038
1038
|
info: [
|
|
1039
|
-
"bg-
|
|
1040
|
-
"border-[length:var(--border-width)] border-
|
|
1039
|
+
"bg-surface text-info",
|
|
1040
|
+
"border-[length:var(--border-width)] border-info"
|
|
1041
1041
|
].join(" "),
|
|
1042
1042
|
neutral: [
|
|
1043
|
-
"bg-
|
|
1044
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1043
|
+
"bg-muted text-muted-foreground",
|
|
1044
|
+
"border-[length:var(--border-width-thin)] border-border"
|
|
1045
1045
|
].join(" ")
|
|
1046
1046
|
};
|
|
1047
1047
|
var sizeStyles3 = {
|
|
@@ -1049,7 +1049,7 @@ var sizeStyles3 = {
|
|
|
1049
1049
|
md: "px-2.5 py-1 text-sm",
|
|
1050
1050
|
lg: "px-3 py-1.5 text-base"
|
|
1051
1051
|
};
|
|
1052
|
-
var Badge =
|
|
1052
|
+
var Badge = React112__default.forwardRef(
|
|
1053
1053
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
1054
1054
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
1055
1055
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -1061,7 +1061,7 @@ var Badge = React110__default.forwardRef(
|
|
|
1061
1061
|
{
|
|
1062
1062
|
ref,
|
|
1063
1063
|
className: cn(
|
|
1064
|
-
"inline-flex items-center gap-1 font-bold rounded-
|
|
1064
|
+
"inline-flex items-center gap-1 font-bold rounded-sm",
|
|
1065
1065
|
variantStyles3[variant],
|
|
1066
1066
|
sizeStyles3[size],
|
|
1067
1067
|
className
|
|
@@ -1076,7 +1076,7 @@ var Badge = React110__default.forwardRef(
|
|
|
1076
1076
|
}
|
|
1077
1077
|
);
|
|
1078
1078
|
Badge.displayName = "Badge";
|
|
1079
|
-
var Input =
|
|
1079
|
+
var Input = React112__default.forwardRef(
|
|
1080
1080
|
({
|
|
1081
1081
|
className,
|
|
1082
1082
|
inputType,
|
|
@@ -1097,21 +1097,21 @@ var Input = React110__default.forwardRef(
|
|
|
1097
1097
|
const resolvedLeftIcon = leftIcon || IconComponent && /* @__PURE__ */ jsx(IconComponent, { className: "h-4 w-4" });
|
|
1098
1098
|
const showClearButton = clearable && value && String(value).length > 0;
|
|
1099
1099
|
const baseClassName = cn(
|
|
1100
|
-
"block w-full rounded-
|
|
1101
|
-
"border-[length:var(--border-width-thin)] border-
|
|
1100
|
+
"block w-full rounded-sm transition-all duration-[var(--transition-fast)]",
|
|
1101
|
+
"border-[length:var(--border-width-thin)] border-border",
|
|
1102
1102
|
"px-3 py-2 text-sm",
|
|
1103
|
-
"bg-
|
|
1104
|
-
"text-
|
|
1105
|
-
"focus:outline-none focus:ring-1 focus:ring-
|
|
1106
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-
|
|
1107
|
-
error ? "border-
|
|
1103
|
+
"bg-card hover:bg-muted focus:bg-card",
|
|
1104
|
+
"text-foreground placeholder:text-muted-foreground",
|
|
1105
|
+
"focus:outline-none focus:ring-1 focus:ring-ring focus:border-ring",
|
|
1106
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-muted",
|
|
1107
|
+
error ? "border-error focus:border-error focus:ring-error" : "",
|
|
1108
1108
|
resolvedLeftIcon && "pl-10",
|
|
1109
1109
|
(rightIcon || showClearButton) && "pr-10",
|
|
1110
1110
|
className
|
|
1111
1111
|
);
|
|
1112
1112
|
if (type === "select") {
|
|
1113
1113
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1114
|
-
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-
|
|
1114
|
+
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
1115
1115
|
/* @__PURE__ */ jsxs(
|
|
1116
1116
|
"select",
|
|
1117
1117
|
{
|
|
@@ -1126,7 +1126,7 @@ var Input = React110__default.forwardRef(
|
|
|
1126
1126
|
]
|
|
1127
1127
|
}
|
|
1128
1128
|
),
|
|
1129
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-
|
|
1129
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none text-muted-foreground", children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) })
|
|
1130
1130
|
] });
|
|
1131
1131
|
}
|
|
1132
1132
|
if (type === "textarea") {
|
|
@@ -1151,9 +1151,9 @@ var Input = React110__default.forwardRef(
|
|
|
1151
1151
|
checked: props.checked,
|
|
1152
1152
|
onChange,
|
|
1153
1153
|
className: cn(
|
|
1154
|
-
"h-4 w-4 rounded-
|
|
1155
|
-
"border-
|
|
1156
|
-
"text-
|
|
1154
|
+
"h-4 w-4 rounded-sm",
|
|
1155
|
+
"border-border",
|
|
1156
|
+
"text-primary focus:ring-ring",
|
|
1157
1157
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1158
1158
|
className
|
|
1159
1159
|
),
|
|
@@ -1162,7 +1162,7 @@ var Input = React110__default.forwardRef(
|
|
|
1162
1162
|
);
|
|
1163
1163
|
}
|
|
1164
1164
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1165
|
-
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-
|
|
1165
|
+
resolvedLeftIcon && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none text-muted-foreground", children: resolvedLeftIcon }),
|
|
1166
1166
|
/* @__PURE__ */ jsx(
|
|
1167
1167
|
"input",
|
|
1168
1168
|
{
|
|
@@ -1179,50 +1179,50 @@ var Input = React110__default.forwardRef(
|
|
|
1179
1179
|
{
|
|
1180
1180
|
type: "button",
|
|
1181
1181
|
onClick: onClear,
|
|
1182
|
-
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-
|
|
1182
|
+
className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground",
|
|
1183
1183
|
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
1184
1184
|
}
|
|
1185
1185
|
),
|
|
1186
|
-
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-
|
|
1186
|
+
rightIcon && !showClearButton && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground", children: rightIcon })
|
|
1187
1187
|
] });
|
|
1188
1188
|
}
|
|
1189
1189
|
);
|
|
1190
1190
|
Input.displayName = "Input";
|
|
1191
|
-
var Label =
|
|
1191
|
+
var Label = React112__default.forwardRef(
|
|
1192
1192
|
({ className, required, children, ...props }, ref) => {
|
|
1193
1193
|
return /* @__PURE__ */ jsxs(
|
|
1194
1194
|
"label",
|
|
1195
1195
|
{
|
|
1196
1196
|
ref,
|
|
1197
1197
|
className: cn(
|
|
1198
|
-
"block text-sm font-bold text-
|
|
1198
|
+
"block text-sm font-bold text-foreground",
|
|
1199
1199
|
className
|
|
1200
1200
|
),
|
|
1201
1201
|
...props,
|
|
1202
1202
|
children: [
|
|
1203
1203
|
children,
|
|
1204
|
-
required && /* @__PURE__ */ jsx("span", { className: "text-
|
|
1204
|
+
required && /* @__PURE__ */ jsx("span", { className: "text-error ml-1", children: "*" })
|
|
1205
1205
|
]
|
|
1206
1206
|
}
|
|
1207
1207
|
);
|
|
1208
1208
|
}
|
|
1209
1209
|
);
|
|
1210
1210
|
Label.displayName = "Label";
|
|
1211
|
-
var Textarea =
|
|
1211
|
+
var Textarea = React112__default.forwardRef(
|
|
1212
1212
|
({ className, error, ...props }, ref) => {
|
|
1213
1213
|
return /* @__PURE__ */ jsx(
|
|
1214
1214
|
"textarea",
|
|
1215
1215
|
{
|
|
1216
1216
|
ref,
|
|
1217
1217
|
className: cn(
|
|
1218
|
-
"block w-full border-[length:var(--border-width)] shadow-
|
|
1219
|
-
"px-3 py-2 text-sm text-
|
|
1220
|
-
"bg-
|
|
1218
|
+
"block w-full border-[length:var(--border-width)] shadow-sm",
|
|
1219
|
+
"px-3 py-2 text-sm text-foreground",
|
|
1220
|
+
"bg-card",
|
|
1221
1221
|
"placeholder:text-[var(--color-placeholder)]",
|
|
1222
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-
|
|
1223
|
-
"disabled:bg-
|
|
1222
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
1223
|
+
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
1224
1224
|
"resize-y min-h-[80px]",
|
|
1225
|
-
error ? "border-
|
|
1225
|
+
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
1226
1226
|
className
|
|
1227
1227
|
),
|
|
1228
1228
|
...props
|
|
@@ -1231,7 +1231,7 @@ var Textarea = React110__default.forwardRef(
|
|
|
1231
1231
|
}
|
|
1232
1232
|
);
|
|
1233
1233
|
Textarea.displayName = "Textarea";
|
|
1234
|
-
var Select =
|
|
1234
|
+
var Select = React112__default.forwardRef(
|
|
1235
1235
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
1236
1236
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
1237
1237
|
/* @__PURE__ */ jsxs(
|
|
@@ -1239,12 +1239,12 @@ var Select = React110__default.forwardRef(
|
|
|
1239
1239
|
{
|
|
1240
1240
|
ref,
|
|
1241
1241
|
className: cn(
|
|
1242
|
-
"block w-full border-[length:var(--border-width)] shadow-
|
|
1243
|
-
"px-3 py-2 pr-10 text-sm text-
|
|
1244
|
-
"bg-
|
|
1245
|
-
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-
|
|
1246
|
-
"disabled:bg-
|
|
1247
|
-
error ? "border-
|
|
1242
|
+
"block w-full border-[length:var(--border-width)] shadow-sm appearance-none",
|
|
1243
|
+
"px-3 py-2 pr-10 text-sm text-foreground font-medium",
|
|
1244
|
+
"bg-card",
|
|
1245
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-0 focus:ring-ring",
|
|
1246
|
+
"disabled:bg-muted disabled:text-muted-foreground disabled:cursor-not-allowed",
|
|
1247
|
+
error ? "border-error focus:border-error" : "border-border focus:border-primary",
|
|
1248
1248
|
className
|
|
1249
1249
|
),
|
|
1250
1250
|
...props,
|
|
@@ -1262,12 +1262,12 @@ var Select = React110__default.forwardRef(
|
|
|
1262
1262
|
]
|
|
1263
1263
|
}
|
|
1264
1264
|
),
|
|
1265
|
-
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 text-
|
|
1265
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 text-foreground" }) })
|
|
1266
1266
|
] });
|
|
1267
1267
|
}
|
|
1268
1268
|
);
|
|
1269
1269
|
Select.displayName = "Select";
|
|
1270
|
-
var Checkbox =
|
|
1270
|
+
var Checkbox = React112__default.forwardRef(
|
|
1271
1271
|
({ className, label, id, ...props }, ref) => {
|
|
1272
1272
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
1273
1273
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -1278,9 +1278,9 @@ var Checkbox = React110__default.forwardRef(
|
|
|
1278
1278
|
type: "checkbox",
|
|
1279
1279
|
id: inputId,
|
|
1280
1280
|
className: cn(
|
|
1281
|
-
"peer h-4 w-4 border-[length:var(--border-width)] border-
|
|
1282
|
-
"accent-
|
|
1283
|
-
"bg-
|
|
1281
|
+
"peer h-4 w-4 border-[length:var(--border-width)] border-border",
|
|
1282
|
+
"accent-primary focus:ring-ring focus:ring-offset-0",
|
|
1283
|
+
"bg-card checked:bg-primary",
|
|
1284
1284
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1285
1285
|
className
|
|
1286
1286
|
),
|
|
@@ -1291,7 +1291,7 @@ var Checkbox = React110__default.forwardRef(
|
|
|
1291
1291
|
"label",
|
|
1292
1292
|
{
|
|
1293
1293
|
htmlFor: inputId,
|
|
1294
|
-
className: "ml-2 text-sm text-
|
|
1294
|
+
className: "ml-2 text-sm text-foreground font-medium cursor-pointer select-none",
|
|
1295
1295
|
children: label
|
|
1296
1296
|
}
|
|
1297
1297
|
)
|
|
@@ -1301,34 +1301,34 @@ var Checkbox = React110__default.forwardRef(
|
|
|
1301
1301
|
Checkbox.displayName = "Checkbox";
|
|
1302
1302
|
var variantStyles4 = {
|
|
1303
1303
|
default: [
|
|
1304
|
-
"bg-
|
|
1305
|
-
"border-[length:var(--border-width)] border-
|
|
1306
|
-
"shadow-
|
|
1304
|
+
"bg-card",
|
|
1305
|
+
"border-[length:var(--border-width)] border-border",
|
|
1306
|
+
"shadow-sm",
|
|
1307
1307
|
"transition-all duration-[var(--transition-normal)]",
|
|
1308
|
-
"hover:shadow-
|
|
1308
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1309
1309
|
].join(" "),
|
|
1310
1310
|
bordered: [
|
|
1311
|
-
"bg-
|
|
1312
|
-
"border-[length:var(--border-width)] border-
|
|
1313
|
-
"shadow-
|
|
1311
|
+
"bg-card",
|
|
1312
|
+
"border-[length:var(--border-width)] border-border",
|
|
1313
|
+
"shadow-sm",
|
|
1314
1314
|
"transition-all duration-[var(--transition-normal)]",
|
|
1315
|
-
"hover:shadow-
|
|
1315
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1316
1316
|
].join(" "),
|
|
1317
1317
|
elevated: [
|
|
1318
|
-
"bg-
|
|
1319
|
-
"border-[length:var(--border-width)] border-
|
|
1320
|
-
"shadow
|
|
1318
|
+
"bg-card",
|
|
1319
|
+
"border-[length:var(--border-width)] border-border",
|
|
1320
|
+
"shadow",
|
|
1321
1321
|
"transition-all duration-[var(--transition-normal)]",
|
|
1322
|
-
"hover:shadow-
|
|
1322
|
+
"hover:shadow-lg hover:-translate-y-0.5"
|
|
1323
1323
|
].join(" "),
|
|
1324
1324
|
// Interactive variant with theme-specific hover effects
|
|
1325
1325
|
interactive: [
|
|
1326
|
-
"bg-
|
|
1327
|
-
"border-[length:var(--border-width)] border-
|
|
1328
|
-
"shadow
|
|
1326
|
+
"bg-card",
|
|
1327
|
+
"border-[length:var(--border-width)] border-border",
|
|
1328
|
+
"shadow",
|
|
1329
1329
|
"cursor-pointer",
|
|
1330
1330
|
"transition-all duration-[var(--transition-normal)]",
|
|
1331
|
-
"hover:shadow-
|
|
1331
|
+
"hover:shadow-lg"
|
|
1332
1332
|
].join(" ")
|
|
1333
1333
|
};
|
|
1334
1334
|
var paddingStyles2 = {
|
|
@@ -1339,11 +1339,11 @@ var paddingStyles2 = {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
var shadowStyles2 = {
|
|
1341
1341
|
none: "shadow-none",
|
|
1342
|
-
sm: "shadow-
|
|
1343
|
-
md: "shadow
|
|
1344
|
-
lg: "shadow-
|
|
1342
|
+
sm: "shadow-sm",
|
|
1343
|
+
md: "shadow",
|
|
1344
|
+
lg: "shadow-lg"
|
|
1345
1345
|
};
|
|
1346
|
-
var Card =
|
|
1346
|
+
var Card = React112__default.forwardRef(
|
|
1347
1347
|
({
|
|
1348
1348
|
className,
|
|
1349
1349
|
variant = "bordered",
|
|
@@ -1359,7 +1359,7 @@ var Card = React110__default.forwardRef(
|
|
|
1359
1359
|
{
|
|
1360
1360
|
ref,
|
|
1361
1361
|
className: cn(
|
|
1362
|
-
"rounded-
|
|
1362
|
+
"rounded-md",
|
|
1363
1363
|
"transition-all duration-[var(--transition-normal)]",
|
|
1364
1364
|
variantStyles4[variant],
|
|
1365
1365
|
paddingStyles2[padding],
|
|
@@ -1369,8 +1369,8 @@ var Card = React110__default.forwardRef(
|
|
|
1369
1369
|
...props,
|
|
1370
1370
|
children: [
|
|
1371
1371
|
(title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
1372
|
-
title && /* @__PURE__ */ jsx("h3", { className: "text-lg text-
|
|
1373
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-
|
|
1372
|
+
title && /* @__PURE__ */ jsx("h3", { className: "text-lg text-card-foreground font-[var(--font-weight-bold)]", children: title }),
|
|
1373
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: subtitle })
|
|
1374
1374
|
] }),
|
|
1375
1375
|
children
|
|
1376
1376
|
]
|
|
@@ -1379,14 +1379,14 @@ var Card = React110__default.forwardRef(
|
|
|
1379
1379
|
}
|
|
1380
1380
|
);
|
|
1381
1381
|
Card.displayName = "Card";
|
|
1382
|
-
var CardHeader =
|
|
1382
|
+
var CardHeader = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
1383
1383
|
CardHeader.displayName = "CardHeader";
|
|
1384
|
-
var CardTitle =
|
|
1384
|
+
var CardTitle = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1385
1385
|
"h3",
|
|
1386
1386
|
{
|
|
1387
1387
|
ref,
|
|
1388
1388
|
className: cn(
|
|
1389
|
-
"text-lg text-
|
|
1389
|
+
"text-lg text-card-foreground",
|
|
1390
1390
|
"font-[var(--font-weight-bold)]",
|
|
1391
1391
|
className
|
|
1392
1392
|
),
|
|
@@ -1394,11 +1394,11 @@ var CardTitle = React110__default.forwardRef(({ className, ...props }, ref) => /
|
|
|
1394
1394
|
}
|
|
1395
1395
|
));
|
|
1396
1396
|
CardTitle.displayName = "CardTitle";
|
|
1397
|
-
var CardContent =
|
|
1397
|
+
var CardContent = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
1398
1398
|
CardContent.displayName = "CardContent";
|
|
1399
1399
|
var CardBody = CardContent;
|
|
1400
1400
|
CardBody.displayName = "CardBody";
|
|
1401
|
-
var CardFooter =
|
|
1401
|
+
var CardFooter = React112__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1402
1402
|
"div",
|
|
1403
1403
|
{
|
|
1404
1404
|
ref,
|
|
@@ -1413,13 +1413,13 @@ var sizeStyles4 = {
|
|
|
1413
1413
|
md: "h-6 w-6",
|
|
1414
1414
|
lg: "h-8 w-8"
|
|
1415
1415
|
};
|
|
1416
|
-
var Spinner =
|
|
1416
|
+
var Spinner = React112__default.forwardRef(
|
|
1417
1417
|
({ className, size = "md", ...props }, ref) => {
|
|
1418
1418
|
return /* @__PURE__ */ jsx(
|
|
1419
1419
|
"div",
|
|
1420
1420
|
{
|
|
1421
1421
|
ref,
|
|
1422
|
-
className: cn("text-
|
|
1422
|
+
className: cn("text-foreground", className),
|
|
1423
1423
|
...props,
|
|
1424
1424
|
children: /* @__PURE__ */ jsx(Loader2, { className: cn("animate-spin", sizeStyles4[size]) })
|
|
1425
1425
|
}
|
|
@@ -1427,7 +1427,7 @@ var Spinner = React110__default.forwardRef(
|
|
|
1427
1427
|
}
|
|
1428
1428
|
);
|
|
1429
1429
|
Spinner.displayName = "Spinner";
|
|
1430
|
-
var Radio =
|
|
1430
|
+
var Radio = React112__default.forwardRef(
|
|
1431
1431
|
({
|
|
1432
1432
|
label,
|
|
1433
1433
|
helperText,
|
|
@@ -1476,8 +1476,8 @@ var Radio = React110__default.forwardRef(
|
|
|
1476
1476
|
"flex items-center justify-center",
|
|
1477
1477
|
"border-[length:var(--border-width)] transition-all cursor-pointer",
|
|
1478
1478
|
sizeClasses6[size],
|
|
1479
|
-
hasError ? "border-
|
|
1480
|
-
checked ? hasError ? "border-
|
|
1479
|
+
hasError ? "border-error peer-focus:ring-error/20" : "border-border peer-focus:ring-ring/20",
|
|
1480
|
+
checked ? hasError ? "border-error" : "border-primary bg-primary" : "",
|
|
1481
1481
|
"peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-offset-2",
|
|
1482
1482
|
disabled && "opacity-50 cursor-not-allowed",
|
|
1483
1483
|
!disabled && "hover:border-[var(--color-border-hover)]"
|
|
@@ -1488,7 +1488,7 @@ var Radio = React110__default.forwardRef(
|
|
|
1488
1488
|
className: cn(
|
|
1489
1489
|
"transition-all",
|
|
1490
1490
|
dotSizeClasses[size],
|
|
1491
|
-
hasError ? "bg-
|
|
1491
|
+
hasError ? "bg-error" : "bg-primary-foreground"
|
|
1492
1492
|
)
|
|
1493
1493
|
}
|
|
1494
1494
|
)
|
|
@@ -1501,7 +1501,7 @@ var Radio = React110__default.forwardRef(
|
|
|
1501
1501
|
htmlFor: radioId,
|
|
1502
1502
|
className: cn(
|
|
1503
1503
|
"block text-sm font-medium cursor-pointer select-none",
|
|
1504
|
-
hasError ? "text-
|
|
1504
|
+
hasError ? "text-error" : "text-foreground",
|
|
1505
1505
|
disabled && "opacity-50 cursor-not-allowed"
|
|
1506
1506
|
),
|
|
1507
1507
|
children: label
|
|
@@ -1513,7 +1513,7 @@ var Radio = React110__default.forwardRef(
|
|
|
1513
1513
|
"p",
|
|
1514
1514
|
{
|
|
1515
1515
|
id: `${radioId}-error`,
|
|
1516
|
-
className: "text-sm text-
|
|
1516
|
+
className: "text-sm text-error font-medium",
|
|
1517
1517
|
role: "alert",
|
|
1518
1518
|
children: error
|
|
1519
1519
|
}
|
|
@@ -1522,7 +1522,7 @@ var Radio = React110__default.forwardRef(
|
|
|
1522
1522
|
"p",
|
|
1523
1523
|
{
|
|
1524
1524
|
id: `${radioId}-helper`,
|
|
1525
|
-
className: "text-sm text-
|
|
1525
|
+
className: "text-sm text-muted-foreground",
|
|
1526
1526
|
children: helperText
|
|
1527
1527
|
}
|
|
1528
1528
|
)
|
|
@@ -1531,7 +1531,7 @@ var Radio = React110__default.forwardRef(
|
|
|
1531
1531
|
}
|
|
1532
1532
|
);
|
|
1533
1533
|
Radio.displayName = "Radio";
|
|
1534
|
-
var Switch =
|
|
1534
|
+
var Switch = React112.forwardRef(
|
|
1535
1535
|
({
|
|
1536
1536
|
checked,
|
|
1537
1537
|
defaultChecked = false,
|
|
@@ -1542,10 +1542,10 @@ var Switch = React110.forwardRef(
|
|
|
1542
1542
|
name,
|
|
1543
1543
|
className
|
|
1544
1544
|
}, ref) => {
|
|
1545
|
-
const [isChecked, setIsChecked] =
|
|
1545
|
+
const [isChecked, setIsChecked] = React112.useState(
|
|
1546
1546
|
checked !== void 0 ? checked : defaultChecked
|
|
1547
1547
|
);
|
|
1548
|
-
|
|
1548
|
+
React112.useEffect(() => {
|
|
1549
1549
|
if (checked !== void 0) {
|
|
1550
1550
|
setIsChecked(checked);
|
|
1551
1551
|
}
|
|
@@ -1683,27 +1683,27 @@ var Stack = ({
|
|
|
1683
1683
|
var VStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "vertical", ...props });
|
|
1684
1684
|
var HStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "horizontal", ...props });
|
|
1685
1685
|
var statusColors = {
|
|
1686
|
-
online: "bg-
|
|
1687
|
-
offline: "bg-
|
|
1688
|
-
away: "bg-
|
|
1689
|
-
busy: "bg-
|
|
1690
|
-
warning: "bg-
|
|
1691
|
-
critical: "bg-
|
|
1686
|
+
online: "bg-success",
|
|
1687
|
+
offline: "bg-muted-foreground",
|
|
1688
|
+
away: "bg-warning",
|
|
1689
|
+
busy: "bg-error",
|
|
1690
|
+
warning: "bg-warning",
|
|
1691
|
+
critical: "bg-error"
|
|
1692
1692
|
};
|
|
1693
1693
|
var pulseRingColors = {
|
|
1694
|
-
online: "ring-
|
|
1695
|
-
offline: "ring-
|
|
1696
|
-
away: "ring-
|
|
1697
|
-
busy: "ring-
|
|
1698
|
-
warning: "ring-
|
|
1699
|
-
critical: "ring-
|
|
1694
|
+
online: "ring-success",
|
|
1695
|
+
offline: "ring-muted-foreground",
|
|
1696
|
+
away: "ring-warning",
|
|
1697
|
+
busy: "ring-error",
|
|
1698
|
+
warning: "ring-warning",
|
|
1699
|
+
critical: "ring-error"
|
|
1700
1700
|
};
|
|
1701
1701
|
var sizeStyles5 = {
|
|
1702
1702
|
sm: "w-2 h-2",
|
|
1703
1703
|
md: "w-2.5 h-2.5",
|
|
1704
1704
|
lg: "w-3 h-3"
|
|
1705
1705
|
};
|
|
1706
|
-
var StatusDot =
|
|
1706
|
+
var StatusDot = React112__default.forwardRef(
|
|
1707
1707
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
1708
1708
|
return /* @__PURE__ */ jsx(
|
|
1709
1709
|
"span",
|
|
@@ -1740,17 +1740,17 @@ function resolveDirection(value, direction) {
|
|
|
1740
1740
|
return value > 0 ? "up" : "down";
|
|
1741
1741
|
}
|
|
1742
1742
|
function resolveColor(dir, invert) {
|
|
1743
|
-
if (dir === "flat") return "text-
|
|
1743
|
+
if (dir === "flat") return "text-muted-foreground";
|
|
1744
1744
|
const isPositive = dir === "up";
|
|
1745
1745
|
const isGood = invert ? !isPositive : isPositive;
|
|
1746
|
-
return isGood ? "text-
|
|
1746
|
+
return isGood ? "text-success" : "text-error";
|
|
1747
1747
|
}
|
|
1748
1748
|
var iconMap2 = {
|
|
1749
1749
|
up: TrendingUp,
|
|
1750
1750
|
down: TrendingDown,
|
|
1751
1751
|
flat: ArrowRight
|
|
1752
1752
|
};
|
|
1753
|
-
var TrendIndicator =
|
|
1753
|
+
var TrendIndicator = React112__default.forwardRef(
|
|
1754
1754
|
({
|
|
1755
1755
|
className,
|
|
1756
1756
|
value,
|
|
@@ -1809,7 +1809,7 @@ var thumbSizes = {
|
|
|
1809
1809
|
md: "w-4 h-4",
|
|
1810
1810
|
lg: "w-5 h-5"
|
|
1811
1811
|
};
|
|
1812
|
-
var RangeSlider =
|
|
1812
|
+
var RangeSlider = React112__default.forwardRef(
|
|
1813
1813
|
({
|
|
1814
1814
|
className,
|
|
1815
1815
|
min = 0,
|
|
@@ -1861,7 +1861,7 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1861
1861
|
"div",
|
|
1862
1862
|
{
|
|
1863
1863
|
className: cn(
|
|
1864
|
-
"absolute inset-x-0 rounded-full bg-
|
|
1864
|
+
"absolute inset-x-0 rounded-full bg-muted",
|
|
1865
1865
|
trackSizes[size]
|
|
1866
1866
|
),
|
|
1867
1867
|
style: { top: "50%", transform: "translateY(-50%)" }
|
|
@@ -1871,7 +1871,7 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1871
1871
|
"div",
|
|
1872
1872
|
{
|
|
1873
1873
|
className: cn(
|
|
1874
|
-
"absolute rounded-full bg-
|
|
1874
|
+
"absolute rounded-full bg-muted-foreground opacity-30",
|
|
1875
1875
|
trackSizes[size]
|
|
1876
1876
|
),
|
|
1877
1877
|
style: {
|
|
@@ -1886,7 +1886,7 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1886
1886
|
"div",
|
|
1887
1887
|
{
|
|
1888
1888
|
className: cn(
|
|
1889
|
-
"absolute rounded-full bg-
|
|
1889
|
+
"absolute rounded-full bg-primary",
|
|
1890
1890
|
trackSizes[size]
|
|
1891
1891
|
),
|
|
1892
1892
|
style: {
|
|
@@ -1948,9 +1948,9 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1948
1948
|
"div",
|
|
1949
1949
|
{
|
|
1950
1950
|
className: cn(
|
|
1951
|
-
"absolute rounded-full bg-
|
|
1952
|
-
"border-2 border-
|
|
1953
|
-
"shadow-
|
|
1951
|
+
"absolute rounded-full bg-primary-foreground",
|
|
1952
|
+
"border-2 border-primary",
|
|
1953
|
+
"shadow-sm",
|
|
1954
1954
|
"pointer-events-none",
|
|
1955
1955
|
"transition-transform duration-100",
|
|
1956
1956
|
isDragging && "scale-110",
|
|
@@ -1968,7 +1968,7 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1968
1968
|
{
|
|
1969
1969
|
className: cn(
|
|
1970
1970
|
"absolute -top-8 px-2 py-0.5 rounded",
|
|
1971
|
-
"bg-
|
|
1971
|
+
"bg-foreground text-background",
|
|
1972
1972
|
"text-xs font-medium whitespace-nowrap",
|
|
1973
1973
|
"pointer-events-none"
|
|
1974
1974
|
),
|
|
@@ -1985,7 +1985,7 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1985
1985
|
return /* @__PURE__ */ jsx(
|
|
1986
1986
|
"div",
|
|
1987
1987
|
{
|
|
1988
|
-
className: "absolute w-px h-1.5 bg-
|
|
1988
|
+
className: "absolute w-px h-1.5 bg-muted-foreground",
|
|
1989
1989
|
style: { left: `${tickPercent}%` }
|
|
1990
1990
|
},
|
|
1991
1991
|
i
|
|
@@ -1999,8 +1999,8 @@ var RangeSlider = React110__default.forwardRef(
|
|
|
1999
1999
|
RangeSlider.displayName = "RangeSlider";
|
|
2000
2000
|
var backgroundClasses = {
|
|
2001
2001
|
default: "",
|
|
2002
|
-
alt: "bg-
|
|
2003
|
-
dark: "bg-
|
|
2002
|
+
alt: "bg-surface",
|
|
2003
|
+
dark: "bg-foreground text-background",
|
|
2004
2004
|
gradient: [
|
|
2005
2005
|
"bg-gradient-to-b",
|
|
2006
2006
|
"from-[var(--color-primary)]/5",
|
|
@@ -2012,7 +2012,7 @@ var paddingClasses = {
|
|
|
2012
2012
|
md: "py-16",
|
|
2013
2013
|
lg: "py-24"
|
|
2014
2014
|
};
|
|
2015
|
-
var ContentSection =
|
|
2015
|
+
var ContentSection = React112__default.forwardRef(
|
|
2016
2016
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
2017
2017
|
return /* @__PURE__ */ jsx(
|
|
2018
2018
|
Box,
|
|
@@ -2031,6 +2031,289 @@ var ContentSection = React110__default.forwardRef(
|
|
|
2031
2031
|
}
|
|
2032
2032
|
);
|
|
2033
2033
|
ContentSection.displayName = "ContentSection";
|
|
2034
|
+
var initialStyles = {
|
|
2035
|
+
"fade-up": { opacity: 0, transform: "translateY(24px)" },
|
|
2036
|
+
"fade-down": { opacity: 0, transform: "translateY(-24px)" },
|
|
2037
|
+
"fade-in": { opacity: 0 },
|
|
2038
|
+
"fade-left": { opacity: 0, transform: "translateX(24px)" },
|
|
2039
|
+
"fade-right": { opacity: 0, transform: "translateX(-24px)" },
|
|
2040
|
+
"scale": { opacity: 0, transform: "scale(0.92)" },
|
|
2041
|
+
"scale-up": { opacity: 0, transform: "scale(0.92) translateY(16px)" },
|
|
2042
|
+
"none": {}
|
|
2043
|
+
};
|
|
2044
|
+
var animatedStyles = {
|
|
2045
|
+
"fade-up": { opacity: 1, transform: "translateY(0)" },
|
|
2046
|
+
"fade-down": { opacity: 1, transform: "translateY(0)" },
|
|
2047
|
+
"fade-in": { opacity: 1 },
|
|
2048
|
+
"fade-left": { opacity: 1, transform: "translateX(0)" },
|
|
2049
|
+
"fade-right": { opacity: 1, transform: "translateX(0)" },
|
|
2050
|
+
"scale": { opacity: 1, transform: "scale(1)" },
|
|
2051
|
+
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
2052
|
+
"none": {}
|
|
2053
|
+
};
|
|
2054
|
+
var AnimatedReveal = React112__default.forwardRef(
|
|
2055
|
+
({
|
|
2056
|
+
trigger = "scroll",
|
|
2057
|
+
animation = "fade-up",
|
|
2058
|
+
duration = 600,
|
|
2059
|
+
delay = 0,
|
|
2060
|
+
threshold = 0.15,
|
|
2061
|
+
once = true,
|
|
2062
|
+
animate: manualAnimate,
|
|
2063
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2064
|
+
children,
|
|
2065
|
+
className,
|
|
2066
|
+
style,
|
|
2067
|
+
...props
|
|
2068
|
+
}, forwardedRef) => {
|
|
2069
|
+
const [isAnimated, setIsAnimated] = useState(false);
|
|
2070
|
+
const internalRef = useRef(null);
|
|
2071
|
+
const hasAnimated = useRef(false);
|
|
2072
|
+
const setRef = useCallback(
|
|
2073
|
+
(node) => {
|
|
2074
|
+
internalRef.current = node;
|
|
2075
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2076
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2077
|
+
},
|
|
2078
|
+
[forwardedRef]
|
|
2079
|
+
);
|
|
2080
|
+
useEffect(() => {
|
|
2081
|
+
if (trigger !== "scroll") return;
|
|
2082
|
+
const el = internalRef.current;
|
|
2083
|
+
if (!el) return;
|
|
2084
|
+
const observer = new IntersectionObserver(
|
|
2085
|
+
([entry]) => {
|
|
2086
|
+
if (entry.isIntersecting) {
|
|
2087
|
+
if (once && hasAnimated.current) return;
|
|
2088
|
+
hasAnimated.current = true;
|
|
2089
|
+
setIsAnimated(true);
|
|
2090
|
+
} else if (!once) {
|
|
2091
|
+
setIsAnimated(false);
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
{ threshold }
|
|
2095
|
+
);
|
|
2096
|
+
observer.observe(el);
|
|
2097
|
+
return () => observer.disconnect();
|
|
2098
|
+
}, [trigger, threshold, once]);
|
|
2099
|
+
const handleMouseEnter = trigger === "hover" ? () => setIsAnimated(true) : void 0;
|
|
2100
|
+
const handleMouseLeave = trigger === "hover" ? () => {
|
|
2101
|
+
if (!once || !hasAnimated.current) {
|
|
2102
|
+
hasAnimated.current = true;
|
|
2103
|
+
setIsAnimated(false);
|
|
2104
|
+
}
|
|
2105
|
+
} : void 0;
|
|
2106
|
+
useEffect(() => {
|
|
2107
|
+
if (trigger === "manual" && manualAnimate !== void 0) {
|
|
2108
|
+
setIsAnimated(manualAnimate);
|
|
2109
|
+
}
|
|
2110
|
+
}, [trigger, manualAnimate]);
|
|
2111
|
+
const active = isAnimated;
|
|
2112
|
+
const currentStyle = active ? animatedStyles[animation] : initialStyles[animation];
|
|
2113
|
+
return /* @__PURE__ */ jsx(
|
|
2114
|
+
"div",
|
|
2115
|
+
{
|
|
2116
|
+
ref: setRef,
|
|
2117
|
+
className: cn("will-change-[opacity,transform]", className),
|
|
2118
|
+
style: {
|
|
2119
|
+
...currentStyle,
|
|
2120
|
+
transitionProperty: "opacity, transform",
|
|
2121
|
+
transitionDuration: `${duration}ms`,
|
|
2122
|
+
transitionDelay: `${delay}ms`,
|
|
2123
|
+
transitionTimingFunction: easing,
|
|
2124
|
+
...style
|
|
2125
|
+
},
|
|
2126
|
+
onMouseEnter: handleMouseEnter,
|
|
2127
|
+
onMouseLeave: handleMouseLeave,
|
|
2128
|
+
...props,
|
|
2129
|
+
children: typeof children === "function" ? children(active) : children
|
|
2130
|
+
}
|
|
2131
|
+
);
|
|
2132
|
+
}
|
|
2133
|
+
);
|
|
2134
|
+
AnimatedReveal.displayName = "AnimatedReveal";
|
|
2135
|
+
function useFetchedSvg(src) {
|
|
2136
|
+
const [svg, setSvg] = useState(null);
|
|
2137
|
+
const cache = useRef({});
|
|
2138
|
+
useEffect(() => {
|
|
2139
|
+
if (!src) {
|
|
2140
|
+
setSvg(null);
|
|
2141
|
+
return;
|
|
2142
|
+
}
|
|
2143
|
+
if (cache.current[src]) {
|
|
2144
|
+
setSvg(cache.current[src]);
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
let cancelled = false;
|
|
2148
|
+
fetch(src).then((res) => {
|
|
2149
|
+
if (!res.ok) throw new Error(`Failed to fetch SVG: ${res.status}`);
|
|
2150
|
+
return res.text();
|
|
2151
|
+
}).then((text) => {
|
|
2152
|
+
if (cancelled) return;
|
|
2153
|
+
cache.current[src] = text;
|
|
2154
|
+
setSvg(text);
|
|
2155
|
+
}).catch(() => {
|
|
2156
|
+
if (!cancelled) setSvg(null);
|
|
2157
|
+
});
|
|
2158
|
+
return () => {
|
|
2159
|
+
cancelled = true;
|
|
2160
|
+
};
|
|
2161
|
+
}, [src]);
|
|
2162
|
+
return svg;
|
|
2163
|
+
}
|
|
2164
|
+
function applyDrawAnimation(container, animate, duration, delay, easing) {
|
|
2165
|
+
const paths = container.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2166
|
+
paths.forEach((el) => {
|
|
2167
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
2168
|
+
const len = el.getTotalLength();
|
|
2169
|
+
el.style.strokeDasharray = `${len}`;
|
|
2170
|
+
el.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
2171
|
+
el.style.transition = `stroke-dashoffset ${duration}ms ${easing} ${delay}ms`;
|
|
2172
|
+
}
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
function applyFillAnimation(container, animate, duration, delay, easing, fillColor) {
|
|
2176
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2177
|
+
paths.forEach((el) => {
|
|
2178
|
+
if ("getTotalLength" in el && typeof el.getTotalLength === "function") {
|
|
2179
|
+
const geom = el;
|
|
2180
|
+
const len = geom.getTotalLength();
|
|
2181
|
+
geom.style.strokeDasharray = `${len}`;
|
|
2182
|
+
geom.style.strokeDashoffset = animate ? "0" : `${len}`;
|
|
2183
|
+
geom.style.transition = `stroke-dashoffset ${duration * 0.6}ms ${easing} ${delay}ms, fill-opacity ${duration * 0.4}ms ${easing} ${delay + duration * 0.6}ms`;
|
|
2184
|
+
}
|
|
2185
|
+
if (fillColor) el.style.fill = fillColor;
|
|
2186
|
+
el.style.fillOpacity = animate ? "1" : "0";
|
|
2187
|
+
});
|
|
2188
|
+
}
|
|
2189
|
+
function applyPulseAnimation(container, animate, duration) {
|
|
2190
|
+
const svg = container.querySelector("svg");
|
|
2191
|
+
if (!svg) return;
|
|
2192
|
+
if (animate) {
|
|
2193
|
+
svg.style.animation = `ag-pulse ${duration}ms ease-in-out infinite`;
|
|
2194
|
+
} else {
|
|
2195
|
+
svg.style.animation = "none";
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
function applyMorphAnimation(container, animate, duration, delay, easing) {
|
|
2199
|
+
const paths = container.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2200
|
+
paths.forEach((el) => {
|
|
2201
|
+
el.style.transition = `all ${duration}ms ${easing} ${delay}ms`;
|
|
2202
|
+
el.style.transform = animate ? "scale(1)" : "scale(0)";
|
|
2203
|
+
el.style.transformOrigin = "center";
|
|
2204
|
+
el.style.opacity = animate ? "1" : "0";
|
|
2205
|
+
});
|
|
2206
|
+
}
|
|
2207
|
+
var AnimatedGraphic = React112__default.forwardRef(
|
|
2208
|
+
({
|
|
2209
|
+
src,
|
|
2210
|
+
svgContent,
|
|
2211
|
+
animation = "draw",
|
|
2212
|
+
animate = false,
|
|
2213
|
+
duration = 1200,
|
|
2214
|
+
delay = 0,
|
|
2215
|
+
easing = "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
2216
|
+
width,
|
|
2217
|
+
height,
|
|
2218
|
+
strokeColor,
|
|
2219
|
+
fillColor,
|
|
2220
|
+
alt,
|
|
2221
|
+
className,
|
|
2222
|
+
style,
|
|
2223
|
+
children,
|
|
2224
|
+
...props
|
|
2225
|
+
}, ref) => {
|
|
2226
|
+
const containerRef = useRef(null);
|
|
2227
|
+
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
2228
|
+
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
2229
|
+
const prevAnimateRef = useRef(animate);
|
|
2230
|
+
const setRef = React112__default.useCallback(
|
|
2231
|
+
(node) => {
|
|
2232
|
+
containerRef.current = node;
|
|
2233
|
+
if (typeof ref === "function") ref(node);
|
|
2234
|
+
else if (ref) ref.current = node;
|
|
2235
|
+
},
|
|
2236
|
+
[ref]
|
|
2237
|
+
);
|
|
2238
|
+
useEffect(() => {
|
|
2239
|
+
const el = containerRef.current;
|
|
2240
|
+
if (!el || !strokeColor) return;
|
|
2241
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2242
|
+
paths.forEach((p2) => {
|
|
2243
|
+
p2.style.stroke = strokeColor;
|
|
2244
|
+
});
|
|
2245
|
+
}, [resolvedSvg, strokeColor]);
|
|
2246
|
+
useEffect(() => {
|
|
2247
|
+
const el = containerRef.current;
|
|
2248
|
+
if (!el || !resolvedSvg) return;
|
|
2249
|
+
if (animation === "draw" || animation === "fill") {
|
|
2250
|
+
const paths = el.querySelectorAll("path, line, polyline, polygon, circle, ellipse, rect");
|
|
2251
|
+
paths.forEach((p2) => {
|
|
2252
|
+
if ("getTotalLength" in p2 && typeof p2.getTotalLength === "function") {
|
|
2253
|
+
const len = p2.getTotalLength();
|
|
2254
|
+
p2.style.strokeDasharray = `${len}`;
|
|
2255
|
+
p2.style.strokeDashoffset = `${len}`;
|
|
2256
|
+
}
|
|
2257
|
+
if (animation === "fill") {
|
|
2258
|
+
p2.style.fillOpacity = "0";
|
|
2259
|
+
}
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
if (animation === "morph") {
|
|
2263
|
+
const paths = el.querySelectorAll("path, circle, ellipse, rect, polygon");
|
|
2264
|
+
paths.forEach((p2) => {
|
|
2265
|
+
p2.style.transform = "scale(0)";
|
|
2266
|
+
p2.style.transformOrigin = "center";
|
|
2267
|
+
p2.style.opacity = "0";
|
|
2268
|
+
});
|
|
2269
|
+
}
|
|
2270
|
+
}, [resolvedSvg, animation]);
|
|
2271
|
+
useEffect(() => {
|
|
2272
|
+
const el = containerRef.current;
|
|
2273
|
+
if (!el) return;
|
|
2274
|
+
const id = requestAnimationFrame(() => {
|
|
2275
|
+
switch (animation) {
|
|
2276
|
+
case "draw":
|
|
2277
|
+
applyDrawAnimation(el, animate, duration, delay, easing);
|
|
2278
|
+
break;
|
|
2279
|
+
case "fill":
|
|
2280
|
+
applyFillAnimation(el, animate, duration, delay, easing, fillColor);
|
|
2281
|
+
break;
|
|
2282
|
+
case "pulse":
|
|
2283
|
+
applyPulseAnimation(el, animate, duration);
|
|
2284
|
+
break;
|
|
2285
|
+
case "morph":
|
|
2286
|
+
applyMorphAnimation(el, animate, duration, delay, easing);
|
|
2287
|
+
break;
|
|
2288
|
+
}
|
|
2289
|
+
});
|
|
2290
|
+
prevAnimateRef.current = animate;
|
|
2291
|
+
return () => cancelAnimationFrame(id);
|
|
2292
|
+
}, [animate, animation, duration, delay, easing, fillColor, resolvedSvg]);
|
|
2293
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2294
|
+
/* @__PURE__ */ jsx("style", { children: `@keyframes ag-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.85; } }` }),
|
|
2295
|
+
/* @__PURE__ */ jsx(
|
|
2296
|
+
"div",
|
|
2297
|
+
{
|
|
2298
|
+
ref: setRef,
|
|
2299
|
+
className: cn("inline-flex items-center justify-center", className),
|
|
2300
|
+
style: { width, height, ...style },
|
|
2301
|
+
role: alt ? "img" : void 0,
|
|
2302
|
+
"aria-label": alt,
|
|
2303
|
+
...props,
|
|
2304
|
+
children: resolvedSvg ? /* @__PURE__ */ jsx(
|
|
2305
|
+
"div",
|
|
2306
|
+
{
|
|
2307
|
+
className: "w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
2308
|
+
dangerouslySetInnerHTML: { __html: resolvedSvg }
|
|
2309
|
+
}
|
|
2310
|
+
) : children
|
|
2311
|
+
}
|
|
2312
|
+
)
|
|
2313
|
+
] });
|
|
2314
|
+
}
|
|
2315
|
+
);
|
|
2316
|
+
AnimatedGraphic.displayName = "AnimatedGraphic";
|
|
2034
2317
|
|
|
2035
2318
|
// locales/en.json
|
|
2036
2319
|
var en_default = {
|
|
@@ -2177,16 +2460,16 @@ var ErrorState = ({
|
|
|
2177
2460
|
className
|
|
2178
2461
|
),
|
|
2179
2462
|
children: [
|
|
2180
|
-
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-
|
|
2181
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-
|
|
2182
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-
|
|
2463
|
+
/* @__PURE__ */ jsx(Box, { className: "mb-4 rounded-full bg-error/10 p-3", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-8 w-8 text-error" }) }),
|
|
2464
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", className: "text-lg font-medium text-foreground", children: resolvedTitle }),
|
|
2465
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-1 text-muted-foreground max-w-sm", children: resolvedMessage }),
|
|
2183
2466
|
(onRetry || retryEvent) && /* @__PURE__ */ jsx(Button, { variant: "secondary", className: "mt-4", onClick: handleRetry, children: t("error.retry") })
|
|
2184
2467
|
]
|
|
2185
2468
|
}
|
|
2186
2469
|
);
|
|
2187
2470
|
};
|
|
2188
2471
|
ErrorState.displayName = "ErrorState";
|
|
2189
|
-
var ErrorBoundary = class extends
|
|
2472
|
+
var ErrorBoundary = class extends React112__default.Component {
|
|
2190
2473
|
constructor(props) {
|
|
2191
2474
|
super(props);
|
|
2192
2475
|
__publicField(this, "reset", () => {
|
|
@@ -2614,29 +2897,41 @@ var defaultIcon = L.icon({
|
|
|
2614
2897
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
2615
2898
|
|
|
2616
2899
|
// lib/verificationRegistry.ts
|
|
2617
|
-
var checks = /* @__PURE__ */ new Map();
|
|
2618
|
-
var transitions = [];
|
|
2619
2900
|
var MAX_TRANSITIONS = 500;
|
|
2620
|
-
|
|
2901
|
+
function getState() {
|
|
2902
|
+
if (typeof window !== "undefined") {
|
|
2903
|
+
const w = window;
|
|
2904
|
+
if (!w.__verificationRegistryState) {
|
|
2905
|
+
w.__verificationRegistryState = {
|
|
2906
|
+
checks: /* @__PURE__ */ new Map(),
|
|
2907
|
+
transitions: [],
|
|
2908
|
+
bridgeHealth: null,
|
|
2909
|
+
listeners: /* @__PURE__ */ new Set()
|
|
2910
|
+
};
|
|
2911
|
+
}
|
|
2912
|
+
return w.__verificationRegistryState;
|
|
2913
|
+
}
|
|
2914
|
+
return { checks: /* @__PURE__ */ new Map(), transitions: [], bridgeHealth: null, listeners: /* @__PURE__ */ new Set() };
|
|
2915
|
+
}
|
|
2621
2916
|
function notifyListeners() {
|
|
2622
|
-
listeners.forEach((l) => l());
|
|
2917
|
+
getState().listeners.forEach((l) => l());
|
|
2623
2918
|
exposeOnWindow();
|
|
2624
2919
|
}
|
|
2625
2920
|
function registerCheck(id, label, status = "pending", details) {
|
|
2626
|
-
checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
2921
|
+
getState().checks.set(id, { id, label, status, details, updatedAt: Date.now() });
|
|
2627
2922
|
notifyListeners();
|
|
2628
2923
|
}
|
|
2629
2924
|
function getAllChecks() {
|
|
2630
|
-
return Array.from(checks.values());
|
|
2925
|
+
return Array.from(getState().checks.values());
|
|
2631
2926
|
}
|
|
2632
2927
|
function recordTransition(trace) {
|
|
2633
2928
|
const entry = {
|
|
2634
2929
|
...trace,
|
|
2635
2930
|
id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
|
|
2636
2931
|
};
|
|
2637
|
-
transitions.push(entry);
|
|
2638
|
-
if (transitions.length > MAX_TRANSITIONS) {
|
|
2639
|
-
transitions.shift();
|
|
2932
|
+
getState().transitions.push(entry);
|
|
2933
|
+
if (getState().transitions.length > MAX_TRANSITIONS) {
|
|
2934
|
+
getState().transitions.shift();
|
|
2640
2935
|
}
|
|
2641
2936
|
if (entry.event === "INIT") {
|
|
2642
2937
|
const hasFetch = entry.effects.some((e) => e.type === "fetch");
|
|
@@ -2671,10 +2966,11 @@ function recordTransition(trace) {
|
|
|
2671
2966
|
notifyListeners();
|
|
2672
2967
|
}
|
|
2673
2968
|
function getTransitions() {
|
|
2674
|
-
return [...transitions];
|
|
2969
|
+
return [...getState().transitions];
|
|
2675
2970
|
}
|
|
2676
2971
|
function getBridgeHealth() {
|
|
2677
|
-
|
|
2972
|
+
const bh = getState().bridgeHealth;
|
|
2973
|
+
return bh ? { ...bh } : null;
|
|
2678
2974
|
}
|
|
2679
2975
|
function getSummary() {
|
|
2680
2976
|
const allChecks = getAllChecks();
|
|
@@ -2695,8 +2991,8 @@ function getSnapshot() {
|
|
|
2695
2991
|
};
|
|
2696
2992
|
}
|
|
2697
2993
|
function subscribeToVerification(listener) {
|
|
2698
|
-
listeners.add(listener);
|
|
2699
|
-
return () => listeners.delete(listener);
|
|
2994
|
+
getState().listeners.add(listener);
|
|
2995
|
+
return () => getState().listeners.delete(listener);
|
|
2700
2996
|
}
|
|
2701
2997
|
function exposeOnWindow() {
|
|
2702
2998
|
if (typeof window === "undefined") return;
|
|
@@ -2713,7 +3009,7 @@ function exposeOnWindow() {
|
|
|
2713
3009
|
}
|
|
2714
3010
|
function waitForTransition(event, timeoutMs = 1e4) {
|
|
2715
3011
|
return new Promise((resolve) => {
|
|
2716
|
-
const existing = transitions.find((t) => t.event === event);
|
|
3012
|
+
const existing = getState().transitions.find((t) => t.event === event);
|
|
2717
3013
|
if (existing) {
|
|
2718
3014
|
resolve(existing);
|
|
2719
3015
|
return;
|
|
@@ -2723,7 +3019,7 @@ function waitForTransition(event, timeoutMs = 1e4) {
|
|
|
2723
3019
|
resolve(null);
|
|
2724
3020
|
}, timeoutMs);
|
|
2725
3021
|
const unsub = subscribeToVerification(() => {
|
|
2726
|
-
const found = transitions.find((t) => t.event === event);
|
|
3022
|
+
const found = getState().transitions.find((t) => t.event === event);
|
|
2727
3023
|
if (found) {
|
|
2728
3024
|
clearTimeout(timeout);
|
|
2729
3025
|
unsub();
|
|
@@ -2766,7 +3062,7 @@ function bindTraitStateGetter(getter) {
|
|
|
2766
3062
|
}
|
|
2767
3063
|
}
|
|
2768
3064
|
exposeOnWindow();
|
|
2769
|
-
var MarkdownContent =
|
|
3065
|
+
var MarkdownContent = React112__default.memo(
|
|
2770
3066
|
({ content, direction, className }) => {
|
|
2771
3067
|
const { t: _t } = useTranslate();
|
|
2772
3068
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -2853,7 +3149,7 @@ var MarkdownContent = React110__default.memo(
|
|
|
2853
3149
|
"blockquote",
|
|
2854
3150
|
{
|
|
2855
3151
|
...props,
|
|
2856
|
-
className: "border-l-4 border-blue-500 pl-4 italic text-
|
|
3152
|
+
className: "border-l-4 border-blue-500 pl-4 italic text-foreground my-4",
|
|
2857
3153
|
children
|
|
2858
3154
|
}
|
|
2859
3155
|
);
|
|
@@ -2868,7 +3164,7 @@ var MarkdownContent = React110__default.memo(
|
|
|
2868
3164
|
(prev, next) => prev.content === next.content && prev.className === next.className && prev.direction === next.direction
|
|
2869
3165
|
);
|
|
2870
3166
|
MarkdownContent.displayName = "MarkdownContent";
|
|
2871
|
-
var CodeBlock =
|
|
3167
|
+
var CodeBlock = React112__default.memo(
|
|
2872
3168
|
({
|
|
2873
3169
|
code: rawCode,
|
|
2874
3170
|
language = "text",
|
|
@@ -2928,7 +3224,7 @@ var CodeBlock = React110__default.memo(
|
|
|
2928
3224
|
variant: "ghost",
|
|
2929
3225
|
size: "sm",
|
|
2930
3226
|
onClick: handleCopy,
|
|
2931
|
-
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-
|
|
3227
|
+
className: "opacity-0 group-hover:opacity-100 focus:opacity-100 transition-opacity text-muted-foreground hover:text-white",
|
|
2932
3228
|
"aria-label": "Copy code",
|
|
2933
3229
|
children: copied ? /* @__PURE__ */ jsx(Check, { size: 16, className: "text-green-400" }) : /* @__PURE__ */ jsx(Copy, { size: 16 })
|
|
2934
3230
|
}
|
|
@@ -2985,12 +3281,12 @@ GameAudioContext.displayName = "GameAudioContext";
|
|
|
2985
3281
|
|
|
2986
3282
|
// components/organisms/component-registry.generated.ts
|
|
2987
3283
|
function lazyThree(name, loader) {
|
|
2988
|
-
const Lazy =
|
|
3284
|
+
const Lazy = React112__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
2989
3285
|
function ThreeWrapper(props) {
|
|
2990
|
-
return
|
|
2991
|
-
|
|
3286
|
+
return React112__default.createElement(
|
|
3287
|
+
React112__default.Suspense,
|
|
2992
3288
|
{ fallback: null },
|
|
2993
|
-
|
|
3289
|
+
React112__default.createElement(Lazy, props)
|
|
2994
3290
|
);
|
|
2995
3291
|
}
|
|
2996
3292
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -3017,7 +3313,7 @@ function SuspenseConfigProvider({
|
|
|
3017
3313
|
config,
|
|
3018
3314
|
children
|
|
3019
3315
|
}) {
|
|
3020
|
-
return
|
|
3316
|
+
return React112__default.createElement(
|
|
3021
3317
|
SuspenseConfigContext.Provider,
|
|
3022
3318
|
{ value: config },
|
|
3023
3319
|
children
|
|
@@ -3090,7 +3386,7 @@ function VerificationProvider({
|
|
|
3090
3386
|
})) : [];
|
|
3091
3387
|
recordTransition({
|
|
3092
3388
|
traitName: parsed.traitName,
|
|
3093
|
-
from: pending?.from ?? "unknown",
|
|
3389
|
+
from: pending?.from ?? (parsed.event === "INIT" ? "init" : "unknown"),
|
|
3094
3390
|
to: newState,
|
|
3095
3391
|
event: parsed.event,
|
|
3096
3392
|
effects,
|