@geomak/ui 6.34.0 → 7.0.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/LICENSE +21 -0
- package/README.md +85 -76
- package/dist/index.cjs +148 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -20
- package/dist/index.d.ts +32 -20
- package/dist/index.js +148 -125
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -57,6 +57,15 @@ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimit
|
|
|
57
57
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
58
58
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
59
59
|
|
|
60
|
+
// src/utils/cx.ts
|
|
61
|
+
function cx(...values) {
|
|
62
|
+
let out = "";
|
|
63
|
+
for (const value of values) {
|
|
64
|
+
if (!value) continue;
|
|
65
|
+
out += (out && " ") + value;
|
|
66
|
+
}
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
60
69
|
function Portal({ children, target }) {
|
|
61
70
|
const [resolved, setResolved] = React28.useState(null);
|
|
62
71
|
React28.useEffect(() => {
|
|
@@ -142,7 +151,7 @@ function Box({
|
|
|
142
151
|
Element,
|
|
143
152
|
{
|
|
144
153
|
onClick,
|
|
145
|
-
className:
|
|
154
|
+
className: cx(
|
|
146
155
|
padding(p, "p"),
|
|
147
156
|
padding(px2, "px"),
|
|
148
157
|
padding(py, "py"),
|
|
@@ -162,7 +171,7 @@ function Box({
|
|
|
162
171
|
radius ? RADIUS_MAP[radius] : "",
|
|
163
172
|
SHADOW_MAP[shadow],
|
|
164
173
|
className
|
|
165
|
-
|
|
174
|
+
),
|
|
166
175
|
style: {
|
|
167
176
|
width: typeof width === "number" ? `${width}px` : width,
|
|
168
177
|
height: typeof height === "number" ? `${height}px` : height,
|
|
@@ -221,7 +230,7 @@ function Flex({
|
|
|
221
230
|
Box,
|
|
222
231
|
{
|
|
223
232
|
...boxProps,
|
|
224
|
-
className:
|
|
233
|
+
className: cx(
|
|
225
234
|
inline ? "inline-flex" : "flex",
|
|
226
235
|
DIRECTION_CLASS[direction],
|
|
227
236
|
align ? ALIGN_CLASS[align] : "",
|
|
@@ -229,7 +238,7 @@ function Flex({
|
|
|
229
238
|
wrap ? WRAP_CLASS[wrap] : "",
|
|
230
239
|
gap ? GAP_MAP[gap] : "",
|
|
231
240
|
className
|
|
232
|
-
|
|
241
|
+
)
|
|
233
242
|
}
|
|
234
243
|
);
|
|
235
244
|
}
|
|
@@ -296,7 +305,7 @@ function Grid({
|
|
|
296
305
|
Box,
|
|
297
306
|
{
|
|
298
307
|
...boxProps,
|
|
299
|
-
className:
|
|
308
|
+
className: cx(
|
|
300
309
|
"grid",
|
|
301
310
|
colClass,
|
|
302
311
|
rowClass,
|
|
@@ -306,7 +315,7 @@ function Grid({
|
|
|
306
315
|
align ? ALIGN_CLASS2[align] : "",
|
|
307
316
|
justify ? JUSTIFY_CLASS2[justify] : "",
|
|
308
317
|
className
|
|
309
|
-
|
|
318
|
+
),
|
|
310
319
|
style: {
|
|
311
320
|
gridTemplateColumns: inlineCols,
|
|
312
321
|
gridTemplateRows: inlineRows,
|
|
@@ -466,7 +475,7 @@ function Typography({
|
|
|
466
475
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
467
476
|
Element,
|
|
468
477
|
{
|
|
469
|
-
className:
|
|
478
|
+
className: cx(
|
|
470
479
|
VARIANT_CLASS[variant],
|
|
471
480
|
COLOR_CLASS[color],
|
|
472
481
|
weight ? WEIGHT_CLASS[weight] : "",
|
|
@@ -474,7 +483,7 @@ function Typography({
|
|
|
474
483
|
truncate ? "truncate" : "",
|
|
475
484
|
muted ? "opacity-60" : "",
|
|
476
485
|
className
|
|
477
|
-
|
|
486
|
+
),
|
|
478
487
|
style,
|
|
479
488
|
children
|
|
480
489
|
}
|
|
@@ -486,7 +495,7 @@ function IconButton({
|
|
|
486
495
|
type = "primary",
|
|
487
496
|
buttonType = "button",
|
|
488
497
|
disabled = false,
|
|
489
|
-
size = "
|
|
498
|
+
size = "md",
|
|
490
499
|
loading = false,
|
|
491
500
|
loadingIcon,
|
|
492
501
|
title,
|
|
@@ -511,7 +520,7 @@ function IconButton({
|
|
|
511
520
|
title,
|
|
512
521
|
"aria-label": title,
|
|
513
522
|
style,
|
|
514
|
-
className: `${size === "sm" ? "p-1" : "p-2"} rounded-lg shadow-md transition-colors duration-150 ${colorScheme} disabled:bg-surface-raised disabled:text-foreground-muted disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${className}`.trim(),
|
|
523
|
+
className: `${size === "sm" ? "p-1" : size === "md" ? "p-1.5" : "p-2"} rounded-lg shadow-md transition-colors duration-150 ${colorScheme} disabled:bg-surface-raised disabled:text-foreground-muted disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${className}`.trim(),
|
|
515
524
|
children: loading ? loadingIcon : icon
|
|
516
525
|
}
|
|
517
526
|
);
|
|
@@ -607,14 +616,14 @@ var Button = React28__default.default.forwardRef(function Button2({
|
|
|
607
616
|
disabled: disabled || loading,
|
|
608
617
|
type: buttonType,
|
|
609
618
|
style,
|
|
610
|
-
className:
|
|
619
|
+
className: cx(
|
|
611
620
|
"inline-flex items-center justify-center font-medium",
|
|
612
621
|
"outline-none transition-colors duration-150 select-none",
|
|
613
622
|
"whitespace-nowrap",
|
|
614
623
|
SIZE_CLASSES[size],
|
|
615
624
|
VARIANT_CLASSES[variant],
|
|
616
625
|
className
|
|
617
|
-
|
|
626
|
+
),
|
|
618
627
|
children: [
|
|
619
628
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
620
629
|
"svg",
|
|
@@ -724,7 +733,7 @@ var SIZE_MAP = {
|
|
|
724
733
|
function Modal({
|
|
725
734
|
width,
|
|
726
735
|
size = "md",
|
|
727
|
-
|
|
736
|
+
open = false,
|
|
728
737
|
onClose,
|
|
729
738
|
onOk,
|
|
730
739
|
onCancel,
|
|
@@ -737,10 +746,10 @@ function Modal({
|
|
|
737
746
|
}) {
|
|
738
747
|
const reduced = framerMotion.useReducedMotion();
|
|
739
748
|
const maxWidth = width ?? SIZE_MAP[size];
|
|
740
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open
|
|
741
|
-
if (!
|
|
749
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open, onOpenChange: (next) => {
|
|
750
|
+
if (!next) onClose?.();
|
|
742
751
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { forceMount: true, children: [
|
|
743
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children:
|
|
752
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
744
753
|
framerMotion.motion.div,
|
|
745
754
|
{
|
|
746
755
|
className: "fixed inset-0 bg-backdrop z-overlay",
|
|
@@ -750,7 +759,7 @@ function Modal({
|
|
|
750
759
|
transition: { duration: reduced ? 0 : 0.18, ease: "easeOut" }
|
|
751
760
|
}
|
|
752
761
|
) }) }),
|
|
753
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children:
|
|
762
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
754
763
|
framerMotion.motion.div,
|
|
755
764
|
{
|
|
756
765
|
className: `fixed left-1/2 top-1/2 z-modal flex flex-col w-[calc(100%-2rem)] max-h-[90dvh] bg-surface rounded-2xl shadow-xl overflow-hidden focus:outline-none ${className}`.trim(),
|
|
@@ -776,7 +785,7 @@ function Modal({
|
|
|
776
785
|
{
|
|
777
786
|
"aria-label": "Close",
|
|
778
787
|
className: "flex h-7 w-7 items-center justify-center rounded-lg text-foreground-muted hover:bg-surface-raised hover:text-foreground transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
779
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) })
|
|
788
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) })
|
|
780
789
|
}
|
|
781
790
|
) })
|
|
782
791
|
] }),
|
|
@@ -812,7 +821,7 @@ var SIZE_MAP2 = {
|
|
|
812
821
|
full: "calc(100vw - 1rem)"
|
|
813
822
|
};
|
|
814
823
|
function Drawer({
|
|
815
|
-
|
|
824
|
+
open = false,
|
|
816
825
|
onClose,
|
|
817
826
|
hasFooter = true,
|
|
818
827
|
placement = "right",
|
|
@@ -831,10 +840,10 @@ function Drawer({
|
|
|
831
840
|
const hiddenX = isRight ? "100%" : "-100%";
|
|
832
841
|
const resolvedWidth = width ?? SIZE_MAP2[size];
|
|
833
842
|
const widthCss = typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth;
|
|
834
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open
|
|
835
|
-
if (!
|
|
843
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Root, { open, onOpenChange: (next) => {
|
|
844
|
+
if (!next) onClose?.();
|
|
836
845
|
}, children: /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { forceMount: true, children: [
|
|
837
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children:
|
|
846
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Overlay, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
838
847
|
framerMotion.motion.div,
|
|
839
848
|
{
|
|
840
849
|
className: "fixed inset-0 bg-backdrop z-overlay",
|
|
@@ -844,7 +853,7 @@ function Drawer({
|
|
|
844
853
|
transition: { duration: reduced ? 0 : 0.2, ease: "easeOut" }
|
|
845
854
|
}
|
|
846
855
|
) }) }),
|
|
847
|
-
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children:
|
|
856
|
+
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
848
857
|
framerMotion.motion.div,
|
|
849
858
|
{
|
|
850
859
|
className: `fixed top-0 bottom-0 ${isRight ? "right-0" : "left-0"} z-modal flex flex-col bg-surface shadow-xl focus:outline-none ${className}`.trim(),
|
|
@@ -869,7 +878,7 @@ function Drawer({
|
|
|
869
878
|
{
|
|
870
879
|
"aria-label": "Close drawer",
|
|
871
880
|
className: "flex h-7 w-7 items-center justify-center rounded-lg text-foreground-muted hover:bg-surface-raised hover:text-foreground transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
872
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) })
|
|
881
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" }) })
|
|
873
882
|
}
|
|
874
883
|
) })
|
|
875
884
|
] }),
|
|
@@ -904,7 +913,7 @@ function Tooltip({
|
|
|
904
913
|
{
|
|
905
914
|
side: placement,
|
|
906
915
|
sideOffset,
|
|
907
|
-
className:
|
|
916
|
+
className: cx(
|
|
908
917
|
// Layout + typography
|
|
909
918
|
"pointer-events-none z-[500000] max-w-[220px] px-2.5 py-1.5",
|
|
910
919
|
// Inverted surface: dark on light, light on dark — both readable
|
|
@@ -917,7 +926,7 @@ function Tooltip({
|
|
|
917
926
|
// In animation — direction-aware
|
|
918
927
|
ANIMATION[placement],
|
|
919
928
|
className
|
|
920
|
-
|
|
929
|
+
),
|
|
921
930
|
children: [
|
|
922
931
|
title,
|
|
923
932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -949,7 +958,7 @@ var MARKER_TRANSITION = { duration: 0.26, ease: [0.16, 1, 0.3, 1] };
|
|
|
949
958
|
function Tabs({
|
|
950
959
|
value,
|
|
951
960
|
defaultValue,
|
|
952
|
-
|
|
961
|
+
onChange,
|
|
953
962
|
variant = "underline",
|
|
954
963
|
size = "md",
|
|
955
964
|
orientation = "horizontal",
|
|
@@ -964,8 +973,8 @@ function Tabs({
|
|
|
964
973
|
const indicatorId = React28.useId();
|
|
965
974
|
const select = React28.useCallback((next) => {
|
|
966
975
|
if (!isControlled) setInternal(next);
|
|
967
|
-
|
|
968
|
-
}, [isControlled,
|
|
976
|
+
onChange?.(next);
|
|
977
|
+
}, [isControlled, onChange]);
|
|
969
978
|
const registry = React28.useRef(/* @__PURE__ */ new Map());
|
|
970
979
|
const orderRef = React28.useRef(0);
|
|
971
980
|
const [, bump] = React28.useState(0);
|
|
@@ -984,11 +993,11 @@ function Tabs({
|
|
|
984
993
|
value: current,
|
|
985
994
|
onValueChange: select,
|
|
986
995
|
orientation,
|
|
987
|
-
className:
|
|
996
|
+
className: cx(
|
|
988
997
|
"flex min-w-0",
|
|
989
998
|
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-3",
|
|
990
999
|
className
|
|
991
|
-
|
|
1000
|
+
),
|
|
992
1001
|
style,
|
|
993
1002
|
children
|
|
994
1003
|
}
|
|
@@ -1056,14 +1065,14 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
|
1056
1065
|
})();
|
|
1057
1066
|
const scrollClass = scrollable ? horizontal ? "overflow-x-auto overflow-y-hidden hidden-scrollbar" : "overflow-y-auto overflow-x-hidden hidden-scrollbar" : "";
|
|
1058
1067
|
const overflowing = scrollable && (edges.start || edges.end);
|
|
1059
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1068
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("relative flex min-w-0 gap-1", horizontal ? "flex-row items-stretch" : "flex-col items-stretch", className), children: [
|
|
1060
1069
|
scrollable && edges.start && /* @__PURE__ */ jsxRuntime.jsx(Chevron2, { side: "start", orientation, onClick: () => nudge(-1) }),
|
|
1061
1070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1062
1071
|
TabsPrimitive__namespace.List,
|
|
1063
1072
|
{
|
|
1064
1073
|
ref: scrollRef,
|
|
1065
1074
|
"aria-label": ariaLabel,
|
|
1066
|
-
className:
|
|
1075
|
+
className: cx(scrollClass, trackClass, "min-w-0 flex-1"),
|
|
1067
1076
|
style: maskStyle,
|
|
1068
1077
|
children
|
|
1069
1078
|
}
|
|
@@ -1192,7 +1201,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
|
|
|
1192
1201
|
{
|
|
1193
1202
|
value,
|
|
1194
1203
|
disabled,
|
|
1195
|
-
className:
|
|
1204
|
+
className: cx(base, sz.trigger, layoutCls, closeable ? "pr-8" : "", variantCls, className),
|
|
1196
1205
|
children: [
|
|
1197
1206
|
variant === "segmented" && isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1198
1207
|
framerMotion.motion.span,
|
|
@@ -1261,7 +1270,7 @@ function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
|
1261
1270
|
{
|
|
1262
1271
|
value,
|
|
1263
1272
|
forceMount: keepMounted || void 0,
|
|
1264
|
-
className:
|
|
1273
|
+
className: cx("min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className),
|
|
1265
1274
|
style,
|
|
1266
1275
|
children
|
|
1267
1276
|
}
|
|
@@ -1384,17 +1393,17 @@ function Accordion2({
|
|
|
1384
1393
|
type = "single",
|
|
1385
1394
|
defaultValue,
|
|
1386
1395
|
value,
|
|
1387
|
-
|
|
1396
|
+
onChange,
|
|
1388
1397
|
collapsible = true,
|
|
1389
1398
|
variant = "separated",
|
|
1390
1399
|
className = "",
|
|
1391
1400
|
style
|
|
1392
1401
|
}) {
|
|
1393
1402
|
const common = {
|
|
1394
|
-
className:
|
|
1403
|
+
className: cx(
|
|
1395
1404
|
variant === "contained" ? "rounded-lg border border-border bg-surface overflow-hidden divide-y divide-border" : "flex flex-col gap-2",
|
|
1396
1405
|
className
|
|
1397
|
-
|
|
1406
|
+
),
|
|
1398
1407
|
style
|
|
1399
1408
|
};
|
|
1400
1409
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(AccordionCtx.Provider, { value: { variant }, children });
|
|
@@ -1405,7 +1414,7 @@ function Accordion2({
|
|
|
1405
1414
|
type: "multiple",
|
|
1406
1415
|
defaultValue,
|
|
1407
1416
|
value,
|
|
1408
|
-
onValueChange,
|
|
1417
|
+
onValueChange: onChange,
|
|
1409
1418
|
...common,
|
|
1410
1419
|
children: inner
|
|
1411
1420
|
}
|
|
@@ -1418,7 +1427,7 @@ function Accordion2({
|
|
|
1418
1427
|
collapsible,
|
|
1419
1428
|
defaultValue,
|
|
1420
1429
|
value,
|
|
1421
|
-
onValueChange,
|
|
1430
|
+
onValueChange: onChange,
|
|
1422
1431
|
...common,
|
|
1423
1432
|
children: inner
|
|
1424
1433
|
}
|
|
@@ -1443,11 +1452,11 @@ function AccordionItem({ value, title, icon, children, disabled, className = ""
|
|
|
1443
1452
|
{
|
|
1444
1453
|
value,
|
|
1445
1454
|
disabled,
|
|
1446
|
-
className:
|
|
1455
|
+
className: cx(
|
|
1447
1456
|
variant === "separated" ? "rounded-lg border border-border bg-surface overflow-hidden" : "",
|
|
1448
1457
|
"data-[disabled]:opacity-60",
|
|
1449
1458
|
className
|
|
1450
|
-
|
|
1459
|
+
),
|
|
1451
1460
|
children: [
|
|
1452
1461
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "m-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1453
1462
|
AccordionPrimitive__namespace.Trigger,
|
|
@@ -1507,7 +1516,7 @@ function Breadcrumbs({
|
|
|
1507
1516
|
} else {
|
|
1508
1517
|
items.forEach((item, index) => visible.push({ item, index }));
|
|
1509
1518
|
}
|
|
1510
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className:
|
|
1519
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: cx("min-w-0", className), style, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center gap-1.5 flex-nowrap min-w-0", children: visible.map((entry, i) => {
|
|
1511
1520
|
const isLast = i === visible.length - 1;
|
|
1512
1521
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
1513
1522
|
entry === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1586,12 +1595,12 @@ function Badge({
|
|
|
1586
1595
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1587
1596
|
"span",
|
|
1588
1597
|
{
|
|
1589
|
-
className:
|
|
1598
|
+
className: cx(
|
|
1590
1599
|
"inline-flex items-center font-medium select-none whitespace-nowrap leading-none",
|
|
1591
1600
|
SIZE2[size],
|
|
1592
1601
|
TONE[tone][variant],
|
|
1593
1602
|
className
|
|
1594
|
-
|
|
1603
|
+
),
|
|
1595
1604
|
style,
|
|
1596
1605
|
children: [
|
|
1597
1606
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center", children: icon }),
|
|
@@ -1603,19 +1612,19 @@ function Badge({
|
|
|
1603
1612
|
const indicator = dot ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1604
1613
|
"span",
|
|
1605
1614
|
{
|
|
1606
|
-
className:
|
|
1615
|
+
className: cx("inline-block rounded-full", size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5", TONE[tone].dot, className),
|
|
1607
1616
|
style: children ? void 0 : style,
|
|
1608
1617
|
"aria-hidden": children ? true : void 0
|
|
1609
1618
|
}
|
|
1610
1619
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1611
1620
|
"span",
|
|
1612
1621
|
{
|
|
1613
|
-
className:
|
|
1622
|
+
className: cx(
|
|
1614
1623
|
"inline-flex items-center justify-center rounded-full font-semibold leading-none tabular-nums",
|
|
1615
1624
|
size === "sm" ? "h-4 min-w-4 px-1 text-[10px]" : "h-[18px] min-w-[18px] px-1.5 text-[11px]",
|
|
1616
1625
|
TONE[tone].solid,
|
|
1617
1626
|
className
|
|
1618
|
-
|
|
1627
|
+
),
|
|
1619
1628
|
style: children ? void 0 : style,
|
|
1620
1629
|
children: display2
|
|
1621
1630
|
}
|
|
@@ -1701,7 +1710,7 @@ function Stepper({
|
|
|
1701
1710
|
const clickable = (i) => Boolean(onStepClick) && i <= current;
|
|
1702
1711
|
const stepButton = (i, node) => clickable(i) ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => onStepClick?.(i), className: "rounded-md text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-accent", children: node }) : node;
|
|
1703
1712
|
if (vertical) {
|
|
1704
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1713
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex flex-col", className), children: steps.map((step, i) => {
|
|
1705
1714
|
const state = stateOf(i);
|
|
1706
1715
|
const last = i === steps.length - 1;
|
|
1707
1716
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex gap-3", children: [
|
|
@@ -1713,7 +1722,7 @@ function Stepper({
|
|
|
1713
1722
|
] }, step.key);
|
|
1714
1723
|
}) });
|
|
1715
1724
|
}
|
|
1716
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1725
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex items-start", className), children: steps.map((step, i) => {
|
|
1717
1726
|
const state = stateOf(i);
|
|
1718
1727
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative flex flex-1 flex-col items-center", children: [
|
|
1719
1728
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-1/2 h-0.5 w-full bg-border", style: { top: s.center - 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1747,7 +1756,7 @@ function Timeline({ events, current, className = "" }) {
|
|
|
1747
1756
|
if (current == null) return "upcoming";
|
|
1748
1757
|
return i < current ? "complete" : i === current ? "current" : "upcoming";
|
|
1749
1758
|
};
|
|
1750
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1759
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex flex-col", className), children: events.map((event, i) => {
|
|
1751
1760
|
const status = statusOf(event, i);
|
|
1752
1761
|
const last = i === events.length - 1;
|
|
1753
1762
|
const railFilled = status === "complete";
|
|
@@ -1790,22 +1799,22 @@ function Kbd({
|
|
|
1790
1799
|
style
|
|
1791
1800
|
}) {
|
|
1792
1801
|
if (keys && keys.length > 0) {
|
|
1793
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
1802
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("inline-flex items-center gap-1", className), style, children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__default.default.Fragment, { children: [
|
|
1794
1803
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
1795
1804
|
/* @__PURE__ */ jsxRuntime.jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
1796
1805
|
] }, `${k}-${i}`)) });
|
|
1797
1806
|
}
|
|
1798
|
-
return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className:
|
|
1807
|
+
return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: cx(cap, SIZE3[size], className), style, children });
|
|
1799
1808
|
}
|
|
1800
1809
|
var PAD = { none: "", sm: "p-3", md: "p-5", lg: "p-6" };
|
|
1801
1810
|
function Card({ children, interactive, onClick, padding: padding2 = "none", flush, className = "", style }) {
|
|
1802
|
-
const base =
|
|
1811
|
+
const base = cx(
|
|
1803
1812
|
"rounded-xl overflow-hidden bg-surface",
|
|
1804
1813
|
flush ? "" : "border border-border shadow-sm",
|
|
1805
1814
|
PAD[padding2],
|
|
1806
1815
|
interactive ? "transition-[transform,box-shadow] duration-200 ease-out hover:-translate-y-0.5 hover:shadow-md cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-accent" : "",
|
|
1807
1816
|
className
|
|
1808
|
-
|
|
1817
|
+
);
|
|
1809
1818
|
if (interactive && onClick) {
|
|
1810
1819
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
1820
|
"div",
|
|
@@ -1828,10 +1837,10 @@ function Card({ children, interactive, onClick, padding: padding2 = "none", flus
|
|
|
1828
1837
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick, className: base, style, children });
|
|
1829
1838
|
}
|
|
1830
1839
|
function CardMedia({ children, className = "" }) {
|
|
1831
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1840
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("[&>img]:block [&>img]:w-full [&>img]:object-cover", className), children });
|
|
1832
1841
|
}
|
|
1833
1842
|
function CardHeader({ title, subtitle, action, avatar, children, className = "" }) {
|
|
1834
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1843
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("flex items-start gap-3 px-5 pt-5", children ? "pb-0" : "pb-3", className), children: [
|
|
1835
1844
|
avatar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: avatar }),
|
|
1836
1845
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1837
1846
|
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-foreground leading-snug", children: title }),
|
|
@@ -1842,10 +1851,10 @@ function CardHeader({ title, subtitle, action, avatar, children, className = ""
|
|
|
1842
1851
|
] });
|
|
1843
1852
|
}
|
|
1844
1853
|
function CardBody({ children, className = "" }) {
|
|
1845
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1854
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("px-5 py-4 text-sm text-foreground-secondary leading-relaxed", className), children });
|
|
1846
1855
|
}
|
|
1847
1856
|
function CardFooter({ children, noDivider, className = "" }) {
|
|
1848
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1857
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("flex items-center gap-2 px-5 py-3", noDivider ? "" : "border-t border-border", className), children });
|
|
1849
1858
|
}
|
|
1850
1859
|
Card.Media = CardMedia;
|
|
1851
1860
|
Card.Header = CardHeader;
|
|
@@ -1921,7 +1930,7 @@ function FlatCarousel({
|
|
|
1921
1930
|
const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
|
|
1922
1931
|
el.scrollTo({ left: i * slideW, behavior: "smooth" });
|
|
1923
1932
|
};
|
|
1924
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": ariaLabel, "aria-roledescription": "carousel", className:
|
|
1933
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": ariaLabel, "aria-roledescription": "carousel", className: cx("relative", className), style, children: [
|
|
1925
1934
|
showArrows && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Previous", onClick: () => slideStep(-1), disabled: atStart, className: `${arrowBtn} left-1`, children: /* @__PURE__ */ jsxRuntime.jsx(Arrow2, { dir: "left" }) }),
|
|
1926
1935
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: scrollerRef, className: "flex overflow-x-auto snap-x snap-mandatory hidden-scrollbar scroll-smooth", style: { gap }, children: slides.map((slide, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "snap-start flex-shrink-0", style: { width }, children: slide }, i)) }),
|
|
1927
1936
|
showArrows && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Next", onClick: () => slideStep(1), disabled: atEnd, className: `${arrowBtn} right-1`, children: /* @__PURE__ */ jsxRuntime.jsx(Arrow2, { dir: "right" }) }),
|
|
@@ -1964,7 +1973,7 @@ function RotatingCarousel({
|
|
|
1964
1973
|
{
|
|
1965
1974
|
"aria-label": ariaLabel,
|
|
1966
1975
|
"aria-roledescription": "carousel",
|
|
1967
|
-
className:
|
|
1976
|
+
className: cx("relative", className),
|
|
1968
1977
|
style,
|
|
1969
1978
|
onKeyDown,
|
|
1970
1979
|
children: [
|
|
@@ -2027,7 +2036,7 @@ function fieldShell({
|
|
|
2027
2036
|
sized = true
|
|
2028
2037
|
} = {}) {
|
|
2029
2038
|
const s = FIELD_SIZE[size];
|
|
2030
|
-
return
|
|
2039
|
+
return cx(
|
|
2031
2040
|
"w-full rounded-lg border bg-surface text-foreground",
|
|
2032
2041
|
"transition-[color,box-shadow,border-color] duration-150",
|
|
2033
2042
|
s.text,
|
|
@@ -2041,7 +2050,7 @@ function fieldShell({
|
|
|
2041
2050
|
hasError ? focusWithin ? FOCUS_WITHIN_ERROR : FOCUS_ELEMENT_ERROR : "",
|
|
2042
2051
|
// placeholder colour for native inputs
|
|
2043
2052
|
"placeholder:text-foreground-muted"
|
|
2044
|
-
|
|
2053
|
+
);
|
|
2045
2054
|
}
|
|
2046
2055
|
function FieldHelpIcon({ text }) {
|
|
2047
2056
|
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { title: text, placement: "top", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2074,14 +2083,14 @@ function FieldLabel({
|
|
|
2074
2083
|
"div",
|
|
2075
2084
|
{
|
|
2076
2085
|
style: { width: horizontal ? width : void 0, ...style },
|
|
2077
|
-
className:
|
|
2086
|
+
className: cx(
|
|
2078
2087
|
"flex items-center gap-1",
|
|
2079
2088
|
horizontal ? "flex-shrink-0 whitespace-nowrap" : "",
|
|
2080
2089
|
// Only the 'start' alignment needs the top nudge; 'center' relies
|
|
2081
2090
|
// on the row's items-center to line up with a short control.
|
|
2082
2091
|
horizontal && align === "start" ? "mt-2" : "",
|
|
2083
2092
|
className
|
|
2084
|
-
|
|
2093
|
+
),
|
|
2085
2094
|
children: [
|
|
2086
2095
|
label != null && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor, className: "text-sm font-medium text-foreground select-none", children: [
|
|
2087
2096
|
label,
|
|
@@ -2111,11 +2120,11 @@ function Field({
|
|
|
2111
2120
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2112
2121
|
"div",
|
|
2113
2122
|
{
|
|
2114
|
-
className:
|
|
2123
|
+
className: cx(
|
|
2115
2124
|
"flex",
|
|
2116
2125
|
horizontal ? `flex-row gap-3 ${labelAlign === "center" ? "items-center" : "items-start"}` : "flex-col gap-1.5",
|
|
2117
2126
|
className
|
|
2118
|
-
|
|
2127
|
+
),
|
|
2119
2128
|
children: [
|
|
2120
2129
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2121
2130
|
FieldLabel,
|
|
@@ -2154,7 +2163,7 @@ var SKELETON_ROWS = [
|
|
|
2154
2163
|
{ own: true, w: 90 }
|
|
2155
2164
|
];
|
|
2156
2165
|
function ChatSkeleton() {
|
|
2157
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", "aria-hidden": "true", children: SKELETON_ROWS.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2166
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", "aria-hidden": "true", children: SKELETON_ROWS.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("flex items-end gap-2", r.own ? "flex-row-reverse" : ""), children: [
|
|
2158
2167
|
!r.own && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-6 w-6 flex-shrink-0 animate-pulse rounded-full bg-surface" }),
|
|
2159
2168
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-8 animate-pulse rounded-2xl bg-surface", style: { width: r.w } })
|
|
2160
2169
|
] }, i)) });
|
|
@@ -2217,7 +2226,7 @@ function Chat({
|
|
|
2217
2226
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2218
2227
|
"div",
|
|
2219
2228
|
{
|
|
2220
|
-
className:
|
|
2229
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
2221
2230
|
style: { height, ...style },
|
|
2222
2231
|
children: [
|
|
2223
2232
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -2237,18 +2246,18 @@ function Chat({
|
|
|
2237
2246
|
const firstOfGroup = !prev || prev.authorId !== m.authorId;
|
|
2238
2247
|
const lastOfGroup = !next || next.authorId !== m.authorId;
|
|
2239
2248
|
const ts = m.timestamp ? toDate(m.timestamp) : null;
|
|
2240
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2249
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("flex items-end gap-2", own ? "flex-row-reverse" : "", firstOfGroup ? "mt-2 first:mt-0" : ""), children: [
|
|
2241
2250
|
!own && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-7 flex-shrink-0", children: lastOfGroup && /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: m.avatar, alt: m.authorName ?? "User", fallback: initials(m.authorName), size: "xs" }) }),
|
|
2242
2251
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["flex max-w-[78%] flex-col", own ? "items-end" : "items-start"].join(" "), children: [
|
|
2243
2252
|
firstOfGroup && !own && m.authorName && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-0.5 px-1 text-[11px] font-medium text-foreground-muted", children: m.authorName }),
|
|
2244
2253
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2245
2254
|
"div",
|
|
2246
2255
|
{
|
|
2247
|
-
className:
|
|
2256
|
+
className: cx(
|
|
2248
2257
|
"whitespace-pre-wrap break-words px-3 py-1.5 text-sm leading-snug",
|
|
2249
2258
|
own ? "rounded-2xl bg-accent text-accent-fg" : "rounded-2xl border border-border bg-surface text-foreground",
|
|
2250
2259
|
lastOfGroup ? own ? "rounded-br-md" : "rounded-bl-md" : ""
|
|
2251
|
-
|
|
2260
|
+
),
|
|
2252
2261
|
children: m.text
|
|
2253
2262
|
}
|
|
2254
2263
|
),
|
|
@@ -2341,7 +2350,7 @@ function Statistic({
|
|
|
2341
2350
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2342
2351
|
"div",
|
|
2343
2352
|
{
|
|
2344
|
-
className:
|
|
2353
|
+
className: cx("flex gap-3", align === "center" ? "flex-col items-center text-center" : "items-start", className),
|
|
2345
2354
|
style,
|
|
2346
2355
|
children: [
|
|
2347
2356
|
icon && align === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-5 w-5 inline-flex items-center justify-center", children: icon }) }),
|
|
@@ -2434,7 +2443,7 @@ function FAB({
|
|
|
2434
2443
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2435
2444
|
"div",
|
|
2436
2445
|
{
|
|
2437
|
-
className:
|
|
2446
|
+
className: cx(fixed ? "fixed" : "absolute", "z-40 flex flex-col", POS[position], className),
|
|
2438
2447
|
style,
|
|
2439
2448
|
children: [
|
|
2440
2449
|
bottom && dial,
|
|
@@ -2445,13 +2454,13 @@ function FAB({
|
|
|
2445
2454
|
"aria-label": label,
|
|
2446
2455
|
"aria-expanded": hasDial ? open : void 0,
|
|
2447
2456
|
onClick: (e) => hasDial ? setOpen((o) => !o) : onClick?.(e),
|
|
2448
|
-
className:
|
|
2457
|
+
className: cx(
|
|
2449
2458
|
"flex items-center justify-center rounded-full shadow-lg transition-[background-color,transform] duration-200",
|
|
2450
2459
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",
|
|
2451
2460
|
SIZE4[size],
|
|
2452
2461
|
TONE3[tone],
|
|
2453
2462
|
hasDial && open ? "rotate-45" : ""
|
|
2454
|
-
|
|
2463
|
+
),
|
|
2455
2464
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-6 w-6 inline-flex items-center justify-center", children: icon })
|
|
2456
2465
|
}
|
|
2457
2466
|
),
|
|
@@ -2519,7 +2528,7 @@ function PopConfirm({
|
|
|
2519
2528
|
side,
|
|
2520
2529
|
sideOffset: 8,
|
|
2521
2530
|
collisionPadding: 12,
|
|
2522
|
-
className:
|
|
2531
|
+
className: cx("z-[400] focus:outline-none", className),
|
|
2523
2532
|
children: [
|
|
2524
2533
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2525
2534
|
framerMotion.motion.div,
|
|
@@ -2650,7 +2659,7 @@ function LogoutTimer({
|
|
|
2650
2659
|
clearTimers();
|
|
2651
2660
|
};
|
|
2652
2661
|
}, [enabled, timeout, countdown, events.join(","), startIdle, clearTimers]);
|
|
2653
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Modal, {
|
|
2662
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Modal, { open: warning, onClose: stay, hasFooter: false, title, size: "sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
2654
2663
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground-secondary", children: description }),
|
|
2655
2664
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2656
2665
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-3xl font-semibold tabular-nums text-foreground", "aria-live": "polite", children: formatTime(remaining) }),
|
|
@@ -2729,19 +2738,19 @@ function SegmentedControl({
|
|
|
2729
2738
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
2730
2739
|
"aria-invalid": hasError || void 0,
|
|
2731
2740
|
"aria-describedby": hasError ? errorId : void 0,
|
|
2732
|
-
className:
|
|
2741
|
+
className: cx(
|
|
2733
2742
|
"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1",
|
|
2734
2743
|
hasError ? "border-status-error" : "border-border",
|
|
2735
2744
|
sz.h,
|
|
2736
2745
|
fullWidth ? "flex w-full" : "w-fit",
|
|
2737
2746
|
disabled ? "opacity-60 cursor-not-allowed" : ""
|
|
2738
|
-
|
|
2747
|
+
),
|
|
2739
2748
|
children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2740
2749
|
ToggleGroup__namespace.Item,
|
|
2741
2750
|
{
|
|
2742
2751
|
value: opt.value,
|
|
2743
2752
|
disabled: opt.disabled,
|
|
2744
|
-
className:
|
|
2753
|
+
className: cx(
|
|
2745
2754
|
"inline-flex items-center justify-center gap-1.5 rounded-md select-none whitespace-nowrap",
|
|
2746
2755
|
"transition-colors duration-150 h-full",
|
|
2747
2756
|
sz.text,
|
|
@@ -2753,7 +2762,7 @@ function SegmentedControl({
|
|
|
2753
2762
|
"data-[state=on]:bg-surface data-[state=on]:text-accent data-[state=on]:shadow-sm",
|
|
2754
2763
|
"focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring",
|
|
2755
2764
|
"disabled:opacity-40 disabled:cursor-not-allowed"
|
|
2756
|
-
|
|
2765
|
+
),
|
|
2757
2766
|
children: [
|
|
2758
2767
|
opt.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: opt.icon }),
|
|
2759
2768
|
opt.label
|
|
@@ -2795,6 +2804,7 @@ var addDays = (d, n) => {
|
|
|
2795
2804
|
var addMonths = (d, n) => new Date(d.getFullYear(), d.getMonth() + n, 1);
|
|
2796
2805
|
var sameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
2797
2806
|
var isToday = (d) => sameDay(d, /* @__PURE__ */ new Date());
|
|
2807
|
+
var dayKey = (d) => `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
|
|
2798
2808
|
var isSameMonth = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
2799
2809
|
var startOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
|
|
2800
2810
|
var endOfMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0);
|
|
@@ -2911,7 +2921,7 @@ function Scheduler({
|
|
|
2911
2921
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2912
2922
|
"div",
|
|
2913
2923
|
{
|
|
2914
|
-
className:
|
|
2924
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
2915
2925
|
style,
|
|
2916
2926
|
children: [
|
|
2917
2927
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -3070,6 +3080,17 @@ function MonthYearPicker({ label, cursor, onPick }) {
|
|
|
3070
3080
|
] });
|
|
3071
3081
|
}
|
|
3072
3082
|
var MAX_CHIPS = 3;
|
|
3083
|
+
var NO_EVENTS = [];
|
|
3084
|
+
function bucketByDay(events) {
|
|
3085
|
+
const map = /* @__PURE__ */ new Map();
|
|
3086
|
+
for (const e of events) {
|
|
3087
|
+
const key = dayKey(e.start);
|
|
3088
|
+
const bucket = map.get(key);
|
|
3089
|
+
if (bucket) bucket.push(e);
|
|
3090
|
+
else map.set(key, [e]);
|
|
3091
|
+
}
|
|
3092
|
+
return map;
|
|
3093
|
+
}
|
|
3073
3094
|
function MonthView({
|
|
3074
3095
|
cursor,
|
|
3075
3096
|
weekStartsOn,
|
|
@@ -3078,12 +3099,13 @@ function MonthView({
|
|
|
3078
3099
|
onSelectEvent
|
|
3079
3100
|
}) {
|
|
3080
3101
|
const grid = React28.useMemo(() => buildMonthGrid(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3102
|
+
const eventsByDay = React28.useMemo(() => bucketByDay(events), [events]);
|
|
3081
3103
|
const labels = weekdayLabels(weekStartsOn);
|
|
3082
3104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
3083
3105
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-7 border-b border-border", children: labels.map((l) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5 text-center text-[11px] font-medium uppercase tracking-wide text-foreground-muted", children: l }, l)) }),
|
|
3084
3106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid flex-1 grid-cols-7 grid-rows-6", children: grid.map((day, i) => {
|
|
3085
3107
|
const inMonth = isSameMonth(day, cursor);
|
|
3086
|
-
const dayEvents =
|
|
3108
|
+
const dayEvents = eventsByDay.get(dayKey(day)) ?? NO_EVENTS;
|
|
3087
3109
|
const today = isToday(day);
|
|
3088
3110
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3089
3111
|
"button",
|
|
@@ -3152,6 +3174,7 @@ function WeekView({
|
|
|
3152
3174
|
onSelectEvent
|
|
3153
3175
|
}) {
|
|
3154
3176
|
const days = React28.useMemo(() => getWeekDays(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3177
|
+
const eventsByDay = React28.useMemo(() => bucketByDay(events), [events]);
|
|
3155
3178
|
const labels = React28.useMemo(() => weekdayLabels(weekStartsOn), [weekStartsOn]);
|
|
3156
3179
|
const dow = (d) => labels[(d.getDay() - weekStartsOn + 7) % 7];
|
|
3157
3180
|
const [startHour, endHour] = dayHours;
|
|
@@ -3172,7 +3195,7 @@ function WeekView({
|
|
|
3172
3195
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid", style: { gridTemplateColumns: `3.5rem repeat(7, 1fr)`, height: gridHeight }, children: [
|
|
3173
3196
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative border-r border-border", children: hours.map((h, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-1 -translate-y-1/2 text-[10px] tabular-nums text-foreground-muted", style: { top: i * hourHeight }, children: i === 0 ? "" : hourLabel(h) }, h)) }),
|
|
3174
3197
|
days.map((day) => {
|
|
3175
|
-
const dayEvents =
|
|
3198
|
+
const dayEvents = (eventsByDay.get(dayKey(day)) ?? NO_EVENTS).filter((e) => !e.allDay);
|
|
3176
3199
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative border-r border-border last:border-r-0", children: [
|
|
3177
3200
|
hours.map((h, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3178
3201
|
"button",
|
|
@@ -3260,7 +3283,7 @@ function EmptyCart({
|
|
|
3260
3283
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3261
3284
|
"div",
|
|
3262
3285
|
{
|
|
3263
|
-
className:
|
|
3286
|
+
className: cx("flex flex-col items-center justify-center px-6 py-10 text-center", className),
|
|
3264
3287
|
style,
|
|
3265
3288
|
children: [
|
|
3266
3289
|
art && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: art }),
|
|
@@ -3279,9 +3302,9 @@ var Stepper2 = ({
|
|
|
3279
3302
|
}) => {
|
|
3280
3303
|
const btn = "flex h-7 w-7 items-center justify-center text-foreground-secondary hover:bg-surface-raised disabled:opacity-40 disabled:hover:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset transition-colors";
|
|
3281
3304
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center rounded-md border border-border overflow-hidden", children: [
|
|
3282
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Decrease quantity", disabled: quantity <= 1, onClick: () => onChange?.(quantity - 1), className: btn, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", d: "M5 12h14" }) }) }),
|
|
3305
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Decrease quantity", disabled: quantity <= 1, onClick: () => onChange?.(quantity - 1), className: btn, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", d: "M5 12h14" }) }) }),
|
|
3283
3306
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-8 text-center text-sm tabular-nums text-foreground select-none", children: quantity }),
|
|
3284
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Increase quantity", disabled: max != null && quantity >= max, onClick: () => onChange?.(quantity + 1), className: btn, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", d: "M12 5v14M5 12h14" }) }) })
|
|
3307
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Increase quantity", disabled: max != null && quantity >= max, onClick: () => onChange?.(quantity + 1), className: btn, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", d: "M12 5v14M5 12h14" }) }) })
|
|
3285
3308
|
] });
|
|
3286
3309
|
};
|
|
3287
3310
|
function Cart({
|
|
@@ -3298,7 +3321,7 @@ function Cart({
|
|
|
3298
3321
|
}) {
|
|
3299
3322
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
3300
3323
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
3301
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3324
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("flex flex-col rounded-xl border border-border bg-surface", className), style, children: [
|
|
3302
3325
|
items.length === 0 ? emptyState ?? /* @__PURE__ */ jsxRuntime.jsx(EmptyCart, {}) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y divide-border", children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-3 p-3", children: [
|
|
3303
3326
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-14 w-14 flex-shrink-0 overflow-hidden rounded-md bg-surface-raised", children: it.image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: it.image, alt: "", className: "h-full w-full object-cover" }) }),
|
|
3304
3327
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -4142,7 +4165,7 @@ function Checkout({
|
|
|
4142
4165
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
4143
4166
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
4144
4167
|
const isEmpty2 = items.length === 0;
|
|
4145
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4168
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("mx-auto w-full max-w-5xl", className), children: [
|
|
4146
4169
|
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-6 text-2xl font-semibold tracking-tight text-foreground", children: title }),
|
|
4147
4170
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
|
|
4148
4171
|
/* @__PURE__ */ jsxRuntime.jsx("section", { "aria-label": "Order summary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4613,14 +4636,14 @@ function ScalableContainer({
|
|
|
4613
4636
|
width: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] },
|
|
4614
4637
|
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
4615
4638
|
},
|
|
4616
|
-
className:
|
|
4639
|
+
className: cx(
|
|
4617
4640
|
"relative rounded-lg overflow-hidden",
|
|
4618
4641
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow
|
|
4619
4642
|
// when expanded. No background colour change.
|
|
4620
4643
|
isScaled ? "shadow-2xl" : "shadow-md",
|
|
4621
4644
|
"transition-shadow duration-300",
|
|
4622
4645
|
className
|
|
4623
|
-
|
|
4646
|
+
),
|
|
4624
4647
|
children: [
|
|
4625
4648
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip, { placement: "bottom", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4626
4649
|
"button",
|
|
@@ -4768,7 +4791,7 @@ function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
|
4768
4791
|
onClick: previousApp,
|
|
4769
4792
|
"aria-label": "Previous",
|
|
4770
4793
|
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rotate-180",
|
|
4771
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: chunkOAV4TA4B_cjs.colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4794
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: chunkOAV4TA4B_cjs.colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4772
4795
|
}
|
|
4773
4796
|
),
|
|
4774
4797
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: indexPool.map((index, id) => {
|
|
@@ -4805,7 +4828,7 @@ function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
|
4805
4828
|
onClick: nextApp,
|
|
4806
4829
|
"aria-label": "Next",
|
|
4807
4830
|
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence",
|
|
4808
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: chunkOAV4TA4B_cjs.colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4831
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: chunkOAV4TA4B_cjs.colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4809
4832
|
}
|
|
4810
4833
|
)
|
|
4811
4834
|
] }) });
|
|
@@ -5412,8 +5435,8 @@ function Pagination({
|
|
|
5412
5435
|
const currentPerPageLabel = currentOpt?.label ?? currentOpt?.value ?? options.perPage ?? "";
|
|
5413
5436
|
const FOCUS = "focus-visible:!ring-0 focus-visible:!border-accent";
|
|
5414
5437
|
const navBtn = (icon, disabled, onClick, title) => /* @__PURE__ */ jsxRuntime.jsx(Button_default, { variant: "outline", size: "sm", disabled, onClick, icon, className: `w-7 !px-0 ${FOCUS}`, "aria-label": title, title });
|
|
5415
|
-
const chevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" }) });
|
|
5416
|
-
const doubleChevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l6 6-6 6M12 6l6 6-6 6" }) });
|
|
5438
|
+
const chevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" }) });
|
|
5439
|
+
const doubleChevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l6 6-6 6M12 6l6 6-6 6" }) });
|
|
5417
5440
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-3", children: [
|
|
5418
5441
|
options.withPicker && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mr-auto flex items-center gap-2", children: [
|
|
5419
5442
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "whitespace-nowrap text-xs text-foreground-muted", children: "Rows per page" }),
|
|
@@ -5789,11 +5812,11 @@ function MegaMenu({
|
|
|
5789
5812
|
{
|
|
5790
5813
|
delayDuration,
|
|
5791
5814
|
"aria-label": ariaLabel,
|
|
5792
|
-
className:
|
|
5815
|
+
className: cx(
|
|
5793
5816
|
"relative z-10 w-full",
|
|
5794
5817
|
responsive ? "hidden md:flex" : "flex",
|
|
5795
5818
|
className
|
|
5796
|
-
|
|
5819
|
+
),
|
|
5797
5820
|
style,
|
|
5798
5821
|
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.List, { className: "flex items-center gap-1", children })
|
|
5799
5822
|
}
|
|
@@ -5806,13 +5829,13 @@ function MegaMenuItem({ label, icon, href, children, className = "" }) {
|
|
|
5806
5829
|
const { align } = React28.useContext(MegaMenuContext);
|
|
5807
5830
|
const pos = align === "center" ? "left-1/2 -translate-x-1/2" : align === "end" ? "right-0" : "left-0";
|
|
5808
5831
|
if (!children) {
|
|
5809
|
-
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Link, { href, className:
|
|
5832
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Link, { href, className: cx(TOP_ITEM, className), children: [
|
|
5810
5833
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5811
5834
|
label
|
|
5812
5835
|
] }) });
|
|
5813
5836
|
}
|
|
5814
5837
|
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Item, { children: [
|
|
5815
|
-
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Trigger, { className:
|
|
5838
|
+
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Trigger, { className: cx(TOP_ITEM, className), children: [
|
|
5816
5839
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5817
5840
|
label,
|
|
5818
5841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5850,14 +5873,14 @@ function MegaMenuPanel({ children, columns, className = "", style }) {
|
|
|
5850
5873
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5851
5874
|
"div",
|
|
5852
5875
|
{
|
|
5853
|
-
className:
|
|
5876
|
+
className: cx("grid gap-6 p-6", className),
|
|
5854
5877
|
style: { ...layout, maxWidth: "min(92vw, 960px)", ...style },
|
|
5855
5878
|
children
|
|
5856
5879
|
}
|
|
5857
5880
|
);
|
|
5858
5881
|
}
|
|
5859
5882
|
function MegaMenuSection({ title, children, className = "" }) {
|
|
5860
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
5883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("min-w-0 flex flex-col", className), children: [
|
|
5861
5884
|
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1.5 text-[11px] font-semibold uppercase tracking-widest text-foreground-muted select-none", children: title }),
|
|
5862
5885
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children })
|
|
5863
5886
|
] });
|
|
@@ -5869,12 +5892,12 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
5869
5892
|
active,
|
|
5870
5893
|
href,
|
|
5871
5894
|
onClick,
|
|
5872
|
-
className:
|
|
5895
|
+
className: cx(
|
|
5873
5896
|
"group/link flex items-start gap-3 rounded-md p-3 transition-colors select-none",
|
|
5874
5897
|
"hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
5875
5898
|
"data-[active]:bg-surface-raised",
|
|
5876
5899
|
className
|
|
5877
|
-
|
|
5900
|
+
),
|
|
5878
5901
|
children: [
|
|
5879
5902
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-md bg-surface-raised text-accent group-hover/link:bg-surface group-data-[active]/link:bg-surface transition-colors", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[18px] w-[18px] inline-flex items-center justify-center", children: icon }) }),
|
|
5880
5903
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col min-w-0", children: [
|
|
@@ -5886,7 +5909,7 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
5886
5909
|
);
|
|
5887
5910
|
}
|
|
5888
5911
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
5889
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
5912
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className), children });
|
|
5890
5913
|
}
|
|
5891
5914
|
var elementsOfType = (children, type) => React28__default.default.Children.toArray(children).filter(
|
|
5892
5915
|
(c) => React28__default.default.isValidElement(c) && c.type === type
|
|
@@ -5976,7 +5999,7 @@ function MegaMenuMobile({
|
|
|
5976
5999
|
{
|
|
5977
6000
|
href,
|
|
5978
6001
|
onClick: () => setOpen(false),
|
|
5979
|
-
className:
|
|
6002
|
+
className: cx(rowBase, divider),
|
|
5980
6003
|
children: [
|
|
5981
6004
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5982
6005
|
itemLabel
|
|
@@ -5992,7 +6015,7 @@ function MegaMenuMobile({
|
|
|
5992
6015
|
type: "button",
|
|
5993
6016
|
onClick: () => setExpanded(isOpen ? null : i),
|
|
5994
6017
|
"aria-expanded": isOpen,
|
|
5995
|
-
className:
|
|
6018
|
+
className: cx(rowBase, isOpen ? "text-accent" : ""),
|
|
5996
6019
|
children: [
|
|
5997
6020
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5998
6021
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: itemLabel }),
|
|
@@ -6214,7 +6237,7 @@ function SecureLayout({
|
|
|
6214
6237
|
]);
|
|
6215
6238
|
if (state === "checking") {
|
|
6216
6239
|
if (loadingFallback === null) return null;
|
|
6217
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
6240
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("flex min-h-[8rem] items-center justify-center", className), children: loadingFallback !== void 0 ? loadingFallback : /* @__PURE__ */ jsxRuntime.jsx(Spinner3, {}) });
|
|
6218
6241
|
}
|
|
6219
6242
|
if (state === "denied") {
|
|
6220
6243
|
if (fallback === null) return null;
|
|
@@ -6822,11 +6845,11 @@ function Switch({
|
|
|
6822
6845
|
if (!isControlled) setInternal(c);
|
|
6823
6846
|
onChange?.({ target: { checked: c, name } });
|
|
6824
6847
|
};
|
|
6825
|
-
const stateLabel = (active) =>
|
|
6848
|
+
const stateLabel = (active) => cx(
|
|
6826
6849
|
"text-sm select-none transition-colors",
|
|
6827
6850
|
active ? "text-foreground font-medium" : "text-foreground-muted",
|
|
6828
6851
|
disabled ? "opacity-50" : "cursor-pointer"
|
|
6829
|
-
|
|
6852
|
+
);
|
|
6830
6853
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6831
6854
|
Field,
|
|
6832
6855
|
{
|
|
@@ -7091,7 +7114,7 @@ function Dropdown({
|
|
|
7091
7114
|
children: labelFor(value)
|
|
7092
7115
|
}
|
|
7093
7116
|
) }),
|
|
7094
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-shrink-0 text-foreground-muted transition-transform duration-200 ${open ? "rotate-180" : "rotate-0"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
7117
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex-shrink-0 text-foreground-muted transition-transform duration-200 ${open ? "rotate-180" : "rotate-0"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
7095
7118
|
]
|
|
7096
7119
|
}
|
|
7097
7120
|
) }),
|
|
@@ -8914,7 +8937,7 @@ function DateRangePicker({
|
|
|
8914
8937
|
onClick: () => setLeftMonth(addMonths3(leftMonth, -1)),
|
|
8915
8938
|
"aria-label": "Previous month",
|
|
8916
8939
|
className: "absolute -top-1 left-0 w-7 h-7 inline-flex items-center justify-center rounded-md hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
8917
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
8940
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
8918
8941
|
}
|
|
8919
8942
|
),
|
|
8920
8943
|
renderMonth(leftMonth)
|
|
@@ -8927,7 +8950,7 @@ function DateRangePicker({
|
|
|
8927
8950
|
onClick: () => setLeftMonth(addMonths3(leftMonth, 1)),
|
|
8928
8951
|
"aria-label": "Next month",
|
|
8929
8952
|
className: "absolute -top-1 right-0 w-7 h-7 inline-flex items-center justify-center rounded-md hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
8930
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
8953
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
8931
8954
|
}
|
|
8932
8955
|
),
|
|
8933
8956
|
renderMonth(addMonths3(leftMonth, 1))
|
|
@@ -9191,7 +9214,7 @@ function Jumbotron({
|
|
|
9191
9214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9192
9215
|
"section",
|
|
9193
9216
|
{
|
|
9194
|
-
className:
|
|
9217
|
+
className: cx("relative overflow-hidden rounded-2xl px-6 py-16 sm:px-10 sm:py-24", bgClass, className),
|
|
9195
9218
|
style: { ...background === "gradient" ? { backgroundImage: GRADIENT } : null, ...style },
|
|
9196
9219
|
children: split ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto grid max-w-6xl items-center gap-10 lg:grid-cols-2", children: [
|
|
9197
9220
|
copy,
|
|
@@ -9219,7 +9242,7 @@ function FeatureGrid({
|
|
|
9219
9242
|
style
|
|
9220
9243
|
}) {
|
|
9221
9244
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9222
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9223
9246
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: ["mb-10 flex flex-col gap-3", centeredHeader ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9224
9247
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9225
9248
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9242,7 +9265,7 @@ function FeatureGrid({
|
|
|
9242
9265
|
var Check3 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true", className: "mt-0.5 h-4 w-4 flex-shrink-0 text-accent", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 6 9 17l-5-5" }) });
|
|
9243
9266
|
function PricingPlans({ plans, eyebrow, title, description, className = "", style }) {
|
|
9244
9267
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9245
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9268
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9246
9269
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9247
9270
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9248
9271
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9293,7 +9316,7 @@ function Stars({ value }) {
|
|
|
9293
9316
|
}
|
|
9294
9317
|
function Testimonials({ testimonials, eyebrow, title, description, columns = 3, className = "", style }) {
|
|
9295
9318
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9296
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9319
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9297
9320
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9298
9321
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9299
9322
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9352,7 +9375,7 @@ function SlideShow({
|
|
|
9352
9375
|
{
|
|
9353
9376
|
"aria-label": ariaLabel,
|
|
9354
9377
|
"aria-roledescription": "carousel",
|
|
9355
|
-
className:
|
|
9378
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9356
9379
|
style: { height, ...style },
|
|
9357
9380
|
onMouseEnter: () => setPaused(true),
|
|
9358
9381
|
onMouseLeave: () => setPaused(false),
|
|
@@ -9413,7 +9436,7 @@ function Video({
|
|
|
9413
9436
|
style
|
|
9414
9437
|
}) {
|
|
9415
9438
|
const [playing, setPlaying] = React28.useState(autoPlay);
|
|
9416
|
-
const frame =
|
|
9439
|
+
const frame = cx("relative w-full overflow-hidden bg-backdrop", framed ? "rounded-2xl border border-border shadow-sm" : "", className);
|
|
9417
9440
|
const ratio = aspect.replace("/", " / ");
|
|
9418
9441
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: frame, style: { aspectRatio: ratio, ...style }, children: embedUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9419
9442
|
"iframe",
|
|
@@ -9475,7 +9498,7 @@ function Parallax({
|
|
|
9475
9498
|
"div",
|
|
9476
9499
|
{
|
|
9477
9500
|
ref,
|
|
9478
|
-
className:
|
|
9501
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9479
9502
|
style: { height, ...style },
|
|
9480
9503
|
children: [
|
|
9481
9504
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9518,7 +9541,7 @@ function Blog({
|
|
|
9518
9541
|
style
|
|
9519
9542
|
}) {
|
|
9520
9543
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9521
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9544
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("w-full", className), style, children: [
|
|
9522
9545
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: ["mb-10 flex flex-col gap-3", centeredHeader ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9523
9546
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9524
9547
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9580,7 +9603,7 @@ function Socials({
|
|
|
9580
9603
|
className = "",
|
|
9581
9604
|
style
|
|
9582
9605
|
}) {
|
|
9583
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className:
|
|
9606
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: cx("flex flex-wrap items-center gap-2", className), style, children: links.map((link, i) => {
|
|
9584
9607
|
const label = link.label ?? (link.platform ? link.platform[0].toUpperCase() + link.platform.slice(1) : "Link");
|
|
9585
9608
|
const icon = link.icon ?? (link.platform ? ICONS[link.platform] : null);
|
|
9586
9609
|
const ext = newTab && !link.href.startsWith("mailto:");
|
|
@@ -9631,7 +9654,7 @@ function CookieConsent({
|
|
|
9631
9654
|
role: "dialog",
|
|
9632
9655
|
"aria-label": "Cookie consent",
|
|
9633
9656
|
"aria-live": "polite",
|
|
9634
|
-
className:
|
|
9657
|
+
className: cx("fixed z-[60]", POS2[position], className),
|
|
9635
9658
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 border-t border-border bg-surface p-5 shadow-lg sm:flex-row sm:items-center sm:rounded-xl sm:border", children: [
|
|
9636
9659
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-sm leading-relaxed text-foreground-secondary", children: [
|
|
9637
9660
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 font-semibold text-foreground", children: title }),
|
|
@@ -9677,7 +9700,7 @@ function LeadCapture({
|
|
|
9677
9700
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9678
9701
|
"section",
|
|
9679
9702
|
{
|
|
9680
|
-
className:
|
|
9703
|
+
className: cx("w-full overflow-hidden rounded-2xl border border-border bg-surface px-6 py-12 sm:px-12 sm:py-16", className),
|
|
9681
9704
|
style: { ...isGradient ? { backgroundImage: GRADIENT2 } : {}, ...style },
|
|
9682
9705
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["mx-auto flex max-w-2xl flex-col gap-4", centered ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9683
9706
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9833,6 +9856,7 @@ exports.Video = Video;
|
|
|
9833
9856
|
exports.Wizard = Wizard;
|
|
9834
9857
|
exports.cardNumberError = cardNumberError;
|
|
9835
9858
|
exports.cvvError = cvvError;
|
|
9859
|
+
exports.cx = cx;
|
|
9836
9860
|
exports.detectBrand = detectBrand;
|
|
9837
9861
|
exports.expiryError = expiryError;
|
|
9838
9862
|
exports.fieldShell = fieldShell;
|