@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.js
CHANGED
|
@@ -20,6 +20,15 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
20
20
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
21
21
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
22
22
|
|
|
23
|
+
// src/utils/cx.ts
|
|
24
|
+
function cx(...values) {
|
|
25
|
+
let out = "";
|
|
26
|
+
for (const value of values) {
|
|
27
|
+
if (!value) continue;
|
|
28
|
+
out += (out && " ") + value;
|
|
29
|
+
}
|
|
30
|
+
return out;
|
|
31
|
+
}
|
|
23
32
|
function Portal({ children, target }) {
|
|
24
33
|
const [resolved, setResolved] = useState(null);
|
|
25
34
|
useEffect(() => {
|
|
@@ -105,7 +114,7 @@ function Box({
|
|
|
105
114
|
Element,
|
|
106
115
|
{
|
|
107
116
|
onClick,
|
|
108
|
-
className:
|
|
117
|
+
className: cx(
|
|
109
118
|
padding(p, "p"),
|
|
110
119
|
padding(px2, "px"),
|
|
111
120
|
padding(py, "py"),
|
|
@@ -125,7 +134,7 @@ function Box({
|
|
|
125
134
|
radius ? RADIUS_MAP[radius] : "",
|
|
126
135
|
SHADOW_MAP[shadow],
|
|
127
136
|
className
|
|
128
|
-
|
|
137
|
+
),
|
|
129
138
|
style: {
|
|
130
139
|
width: typeof width === "number" ? `${width}px` : width,
|
|
131
140
|
height: typeof height === "number" ? `${height}px` : height,
|
|
@@ -184,7 +193,7 @@ function Flex({
|
|
|
184
193
|
Box,
|
|
185
194
|
{
|
|
186
195
|
...boxProps,
|
|
187
|
-
className:
|
|
196
|
+
className: cx(
|
|
188
197
|
inline ? "inline-flex" : "flex",
|
|
189
198
|
DIRECTION_CLASS[direction],
|
|
190
199
|
align ? ALIGN_CLASS[align] : "",
|
|
@@ -192,7 +201,7 @@ function Flex({
|
|
|
192
201
|
wrap ? WRAP_CLASS[wrap] : "",
|
|
193
202
|
gap ? GAP_MAP[gap] : "",
|
|
194
203
|
className
|
|
195
|
-
|
|
204
|
+
)
|
|
196
205
|
}
|
|
197
206
|
);
|
|
198
207
|
}
|
|
@@ -259,7 +268,7 @@ function Grid({
|
|
|
259
268
|
Box,
|
|
260
269
|
{
|
|
261
270
|
...boxProps,
|
|
262
|
-
className:
|
|
271
|
+
className: cx(
|
|
263
272
|
"grid",
|
|
264
273
|
colClass,
|
|
265
274
|
rowClass,
|
|
@@ -269,7 +278,7 @@ function Grid({
|
|
|
269
278
|
align ? ALIGN_CLASS2[align] : "",
|
|
270
279
|
justify ? JUSTIFY_CLASS2[justify] : "",
|
|
271
280
|
className
|
|
272
|
-
|
|
281
|
+
),
|
|
273
282
|
style: {
|
|
274
283
|
gridTemplateColumns: inlineCols,
|
|
275
284
|
gridTemplateRows: inlineRows,
|
|
@@ -429,7 +438,7 @@ function Typography({
|
|
|
429
438
|
return /* @__PURE__ */ jsx(
|
|
430
439
|
Element,
|
|
431
440
|
{
|
|
432
|
-
className:
|
|
441
|
+
className: cx(
|
|
433
442
|
VARIANT_CLASS[variant],
|
|
434
443
|
COLOR_CLASS[color],
|
|
435
444
|
weight ? WEIGHT_CLASS[weight] : "",
|
|
@@ -437,7 +446,7 @@ function Typography({
|
|
|
437
446
|
truncate ? "truncate" : "",
|
|
438
447
|
muted ? "opacity-60" : "",
|
|
439
448
|
className
|
|
440
|
-
|
|
449
|
+
),
|
|
441
450
|
style,
|
|
442
451
|
children
|
|
443
452
|
}
|
|
@@ -449,7 +458,7 @@ function IconButton({
|
|
|
449
458
|
type = "primary",
|
|
450
459
|
buttonType = "button",
|
|
451
460
|
disabled = false,
|
|
452
|
-
size = "
|
|
461
|
+
size = "md",
|
|
453
462
|
loading = false,
|
|
454
463
|
loadingIcon,
|
|
455
464
|
title,
|
|
@@ -474,7 +483,7 @@ function IconButton({
|
|
|
474
483
|
title,
|
|
475
484
|
"aria-label": title,
|
|
476
485
|
style,
|
|
477
|
-
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(),
|
|
486
|
+
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(),
|
|
478
487
|
children: loading ? loadingIcon : icon
|
|
479
488
|
}
|
|
480
489
|
);
|
|
@@ -570,14 +579,14 @@ var Button = React28.forwardRef(function Button2({
|
|
|
570
579
|
disabled: disabled || loading,
|
|
571
580
|
type: buttonType,
|
|
572
581
|
style,
|
|
573
|
-
className:
|
|
582
|
+
className: cx(
|
|
574
583
|
"inline-flex items-center justify-center font-medium",
|
|
575
584
|
"outline-none transition-colors duration-150 select-none",
|
|
576
585
|
"whitespace-nowrap",
|
|
577
586
|
SIZE_CLASSES[size],
|
|
578
587
|
VARIANT_CLASSES[variant],
|
|
579
588
|
className
|
|
580
|
-
|
|
589
|
+
),
|
|
581
590
|
children: [
|
|
582
591
|
loading ? /* @__PURE__ */ jsx(
|
|
583
592
|
"svg",
|
|
@@ -687,7 +696,7 @@ var SIZE_MAP = {
|
|
|
687
696
|
function Modal({
|
|
688
697
|
width,
|
|
689
698
|
size = "md",
|
|
690
|
-
|
|
699
|
+
open = false,
|
|
691
700
|
onClose,
|
|
692
701
|
onOk,
|
|
693
702
|
onCancel,
|
|
@@ -700,10 +709,10 @@ function Modal({
|
|
|
700
709
|
}) {
|
|
701
710
|
const reduced = useReducedMotion();
|
|
702
711
|
const maxWidth = width ?? SIZE_MAP[size];
|
|
703
|
-
return /* @__PURE__ */ jsx(Dialog.Root, { open
|
|
704
|
-
if (!
|
|
712
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange: (next) => {
|
|
713
|
+
if (!next) onClose?.();
|
|
705
714
|
}, children: /* @__PURE__ */ jsxs(Dialog.Portal, { forceMount: true, children: [
|
|
706
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
715
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
707
716
|
motion.div,
|
|
708
717
|
{
|
|
709
718
|
className: "fixed inset-0 bg-backdrop z-overlay",
|
|
@@ -713,7 +722,7 @@ function Modal({
|
|
|
713
722
|
transition: { duration: reduced ? 0 : 0.18, ease: "easeOut" }
|
|
714
723
|
}
|
|
715
724
|
) }) }),
|
|
716
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
725
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(Dialog.Content, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
717
726
|
motion.div,
|
|
718
727
|
{
|
|
719
728
|
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(),
|
|
@@ -739,7 +748,7 @@ function Modal({
|
|
|
739
748
|
{
|
|
740
749
|
"aria-label": "Close",
|
|
741
750
|
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",
|
|
742
|
-
children: /* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ 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" }) })
|
|
751
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ 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" }) })
|
|
743
752
|
}
|
|
744
753
|
) })
|
|
745
754
|
] }),
|
|
@@ -775,7 +784,7 @@ var SIZE_MAP2 = {
|
|
|
775
784
|
full: "calc(100vw - 1rem)"
|
|
776
785
|
};
|
|
777
786
|
function Drawer({
|
|
778
|
-
|
|
787
|
+
open = false,
|
|
779
788
|
onClose,
|
|
780
789
|
hasFooter = true,
|
|
781
790
|
placement = "right",
|
|
@@ -794,10 +803,10 @@ function Drawer({
|
|
|
794
803
|
const hiddenX = isRight ? "100%" : "-100%";
|
|
795
804
|
const resolvedWidth = width ?? SIZE_MAP2[size];
|
|
796
805
|
const widthCss = typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth;
|
|
797
|
-
return /* @__PURE__ */ jsx(Dialog.Root, { open
|
|
798
|
-
if (!
|
|
806
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { open, onOpenChange: (next) => {
|
|
807
|
+
if (!next) onClose?.();
|
|
799
808
|
}, children: /* @__PURE__ */ jsxs(Dialog.Portal, { forceMount: true, children: [
|
|
800
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
809
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
801
810
|
motion.div,
|
|
802
811
|
{
|
|
803
812
|
className: "fixed inset-0 bg-backdrop z-overlay",
|
|
@@ -807,7 +816,7 @@ function Drawer({
|
|
|
807
816
|
transition: { duration: reduced ? 0 : 0.2, ease: "easeOut" }
|
|
808
817
|
}
|
|
809
818
|
) }) }),
|
|
810
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children:
|
|
819
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(Dialog.Content, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
811
820
|
motion.div,
|
|
812
821
|
{
|
|
813
822
|
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(),
|
|
@@ -832,7 +841,7 @@ function Drawer({
|
|
|
832
841
|
{
|
|
833
842
|
"aria-label": "Close drawer",
|
|
834
843
|
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",
|
|
835
|
-
children: /* @__PURE__ */ jsx("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ 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" }) })
|
|
844
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", children: /* @__PURE__ */ 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" }) })
|
|
836
845
|
}
|
|
837
846
|
) })
|
|
838
847
|
] }),
|
|
@@ -867,7 +876,7 @@ function Tooltip({
|
|
|
867
876
|
{
|
|
868
877
|
side: placement,
|
|
869
878
|
sideOffset,
|
|
870
|
-
className:
|
|
879
|
+
className: cx(
|
|
871
880
|
// Layout + typography
|
|
872
881
|
"pointer-events-none z-[500000] max-w-[220px] px-2.5 py-1.5",
|
|
873
882
|
// Inverted surface: dark on light, light on dark — both readable
|
|
@@ -880,7 +889,7 @@ function Tooltip({
|
|
|
880
889
|
// In animation — direction-aware
|
|
881
890
|
ANIMATION[placement],
|
|
882
891
|
className
|
|
883
|
-
|
|
892
|
+
),
|
|
884
893
|
children: [
|
|
885
894
|
title,
|
|
886
895
|
/* @__PURE__ */ jsx(
|
|
@@ -912,7 +921,7 @@ var MARKER_TRANSITION = { duration: 0.26, ease: [0.16, 1, 0.3, 1] };
|
|
|
912
921
|
function Tabs({
|
|
913
922
|
value,
|
|
914
923
|
defaultValue,
|
|
915
|
-
|
|
924
|
+
onChange,
|
|
916
925
|
variant = "underline",
|
|
917
926
|
size = "md",
|
|
918
927
|
orientation = "horizontal",
|
|
@@ -927,8 +936,8 @@ function Tabs({
|
|
|
927
936
|
const indicatorId = useId();
|
|
928
937
|
const select = useCallback((next) => {
|
|
929
938
|
if (!isControlled) setInternal(next);
|
|
930
|
-
|
|
931
|
-
}, [isControlled,
|
|
939
|
+
onChange?.(next);
|
|
940
|
+
}, [isControlled, onChange]);
|
|
932
941
|
const registry = useRef(/* @__PURE__ */ new Map());
|
|
933
942
|
const orderRef = useRef(0);
|
|
934
943
|
const [, bump] = useState(0);
|
|
@@ -947,11 +956,11 @@ function Tabs({
|
|
|
947
956
|
value: current,
|
|
948
957
|
onValueChange: select,
|
|
949
958
|
orientation,
|
|
950
|
-
className:
|
|
959
|
+
className: cx(
|
|
951
960
|
"flex min-w-0",
|
|
952
961
|
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-3",
|
|
953
962
|
className
|
|
954
|
-
|
|
963
|
+
),
|
|
955
964
|
style,
|
|
956
965
|
children
|
|
957
966
|
}
|
|
@@ -1019,14 +1028,14 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
|
1019
1028
|
})();
|
|
1020
1029
|
const scrollClass = scrollable ? horizontal ? "overflow-x-auto overflow-y-hidden hidden-scrollbar" : "overflow-y-auto overflow-x-hidden hidden-scrollbar" : "";
|
|
1021
1030
|
const overflowing = scrollable && (edges.start || edges.end);
|
|
1022
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1031
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("relative flex min-w-0 gap-1", horizontal ? "flex-row items-stretch" : "flex-col items-stretch", className), children: [
|
|
1023
1032
|
scrollable && edges.start && /* @__PURE__ */ jsx(Chevron2, { side: "start", orientation, onClick: () => nudge(-1) }),
|
|
1024
1033
|
/* @__PURE__ */ jsx(
|
|
1025
1034
|
TabsPrimitive.List,
|
|
1026
1035
|
{
|
|
1027
1036
|
ref: scrollRef,
|
|
1028
1037
|
"aria-label": ariaLabel,
|
|
1029
|
-
className:
|
|
1038
|
+
className: cx(scrollClass, trackClass, "min-w-0 flex-1"),
|
|
1030
1039
|
style: maskStyle,
|
|
1031
1040
|
children
|
|
1032
1041
|
}
|
|
@@ -1155,7 +1164,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
|
|
|
1155
1164
|
{
|
|
1156
1165
|
value,
|
|
1157
1166
|
disabled,
|
|
1158
|
-
className:
|
|
1167
|
+
className: cx(base, sz.trigger, layoutCls, closeable ? "pr-8" : "", variantCls, className),
|
|
1159
1168
|
children: [
|
|
1160
1169
|
variant === "segmented" && isActive && /* @__PURE__ */ jsx(
|
|
1161
1170
|
motion.span,
|
|
@@ -1224,7 +1233,7 @@ function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
|
1224
1233
|
{
|
|
1225
1234
|
value,
|
|
1226
1235
|
forceMount: keepMounted || void 0,
|
|
1227
|
-
className:
|
|
1236
|
+
className: cx("min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className),
|
|
1228
1237
|
style,
|
|
1229
1238
|
children
|
|
1230
1239
|
}
|
|
@@ -1347,17 +1356,17 @@ function Accordion2({
|
|
|
1347
1356
|
type = "single",
|
|
1348
1357
|
defaultValue,
|
|
1349
1358
|
value,
|
|
1350
|
-
|
|
1359
|
+
onChange,
|
|
1351
1360
|
collapsible = true,
|
|
1352
1361
|
variant = "separated",
|
|
1353
1362
|
className = "",
|
|
1354
1363
|
style
|
|
1355
1364
|
}) {
|
|
1356
1365
|
const common = {
|
|
1357
|
-
className:
|
|
1366
|
+
className: cx(
|
|
1358
1367
|
variant === "contained" ? "rounded-lg border border-border bg-surface overflow-hidden divide-y divide-border" : "flex flex-col gap-2",
|
|
1359
1368
|
className
|
|
1360
|
-
|
|
1369
|
+
),
|
|
1361
1370
|
style
|
|
1362
1371
|
};
|
|
1363
1372
|
const inner = /* @__PURE__ */ jsx(AccordionCtx.Provider, { value: { variant }, children });
|
|
@@ -1368,7 +1377,7 @@ function Accordion2({
|
|
|
1368
1377
|
type: "multiple",
|
|
1369
1378
|
defaultValue,
|
|
1370
1379
|
value,
|
|
1371
|
-
onValueChange,
|
|
1380
|
+
onValueChange: onChange,
|
|
1372
1381
|
...common,
|
|
1373
1382
|
children: inner
|
|
1374
1383
|
}
|
|
@@ -1381,7 +1390,7 @@ function Accordion2({
|
|
|
1381
1390
|
collapsible,
|
|
1382
1391
|
defaultValue,
|
|
1383
1392
|
value,
|
|
1384
|
-
onValueChange,
|
|
1393
|
+
onValueChange: onChange,
|
|
1385
1394
|
...common,
|
|
1386
1395
|
children: inner
|
|
1387
1396
|
}
|
|
@@ -1406,11 +1415,11 @@ function AccordionItem({ value, title, icon, children, disabled, className = ""
|
|
|
1406
1415
|
{
|
|
1407
1416
|
value,
|
|
1408
1417
|
disabled,
|
|
1409
|
-
className:
|
|
1418
|
+
className: cx(
|
|
1410
1419
|
variant === "separated" ? "rounded-lg border border-border bg-surface overflow-hidden" : "",
|
|
1411
1420
|
"data-[disabled]:opacity-60",
|
|
1412
1421
|
className
|
|
1413
|
-
|
|
1422
|
+
),
|
|
1414
1423
|
children: [
|
|
1415
1424
|
/* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "m-0", children: /* @__PURE__ */ jsxs(
|
|
1416
1425
|
AccordionPrimitive.Trigger,
|
|
@@ -1470,7 +1479,7 @@ function Breadcrumbs({
|
|
|
1470
1479
|
} else {
|
|
1471
1480
|
items.forEach((item, index) => visible.push({ item, index }));
|
|
1472
1481
|
}
|
|
1473
|
-
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className:
|
|
1482
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cx("min-w-0", className), style, children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-1.5 flex-nowrap min-w-0", children: visible.map((entry, i) => {
|
|
1474
1483
|
const isLast = i === visible.length - 1;
|
|
1475
1484
|
return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
1476
1485
|
entry === "ellipsis" ? /* @__PURE__ */ jsx(
|
|
@@ -1549,12 +1558,12 @@ function Badge({
|
|
|
1549
1558
|
return /* @__PURE__ */ jsxs(
|
|
1550
1559
|
"span",
|
|
1551
1560
|
{
|
|
1552
|
-
className:
|
|
1561
|
+
className: cx(
|
|
1553
1562
|
"inline-flex items-center font-medium select-none whitespace-nowrap leading-none",
|
|
1554
1563
|
SIZE2[size],
|
|
1555
1564
|
TONE[tone][variant],
|
|
1556
1565
|
className
|
|
1557
|
-
|
|
1566
|
+
),
|
|
1558
1567
|
style,
|
|
1559
1568
|
children: [
|
|
1560
1569
|
icon && /* @__PURE__ */ jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center", children: icon }),
|
|
@@ -1566,19 +1575,19 @@ function Badge({
|
|
|
1566
1575
|
const indicator = dot ? /* @__PURE__ */ jsx(
|
|
1567
1576
|
"span",
|
|
1568
1577
|
{
|
|
1569
|
-
className:
|
|
1578
|
+
className: cx("inline-block rounded-full", size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5", TONE[tone].dot, className),
|
|
1570
1579
|
style: children ? void 0 : style,
|
|
1571
1580
|
"aria-hidden": children ? true : void 0
|
|
1572
1581
|
}
|
|
1573
1582
|
) : /* @__PURE__ */ jsx(
|
|
1574
1583
|
"span",
|
|
1575
1584
|
{
|
|
1576
|
-
className:
|
|
1585
|
+
className: cx(
|
|
1577
1586
|
"inline-flex items-center justify-center rounded-full font-semibold leading-none tabular-nums",
|
|
1578
1587
|
size === "sm" ? "h-4 min-w-4 px-1 text-[10px]" : "h-[18px] min-w-[18px] px-1.5 text-[11px]",
|
|
1579
1588
|
TONE[tone].solid,
|
|
1580
1589
|
className
|
|
1581
|
-
|
|
1590
|
+
),
|
|
1582
1591
|
style: children ? void 0 : style,
|
|
1583
1592
|
children: display2
|
|
1584
1593
|
}
|
|
@@ -1664,7 +1673,7 @@ function Stepper({
|
|
|
1664
1673
|
const clickable = (i) => Boolean(onStepClick) && i <= current;
|
|
1665
1674
|
const stepButton = (i, node) => clickable(i) ? /* @__PURE__ */ 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;
|
|
1666
1675
|
if (vertical) {
|
|
1667
|
-
return /* @__PURE__ */ jsx("ol", { className:
|
|
1676
|
+
return /* @__PURE__ */ jsx("ol", { className: cx("flex flex-col", className), children: steps.map((step, i) => {
|
|
1668
1677
|
const state = stateOf(i);
|
|
1669
1678
|
const last = i === steps.length - 1;
|
|
1670
1679
|
return /* @__PURE__ */ jsxs("li", { className: "flex gap-3", children: [
|
|
@@ -1676,7 +1685,7 @@ function Stepper({
|
|
|
1676
1685
|
] }, step.key);
|
|
1677
1686
|
}) });
|
|
1678
1687
|
}
|
|
1679
|
-
return /* @__PURE__ */ jsx("ol", { className:
|
|
1688
|
+
return /* @__PURE__ */ jsx("ol", { className: cx("flex items-start", className), children: steps.map((step, i) => {
|
|
1680
1689
|
const state = stateOf(i);
|
|
1681
1690
|
return /* @__PURE__ */ jsxs("li", { className: "relative flex flex-1 flex-col items-center", children: [
|
|
1682
1691
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "absolute right-1/2 h-0.5 w-full bg-border", style: { top: s.center - 1 }, children: /* @__PURE__ */ jsx(
|
|
@@ -1710,7 +1719,7 @@ function Timeline({ events, current, className = "" }) {
|
|
|
1710
1719
|
if (current == null) return "upcoming";
|
|
1711
1720
|
return i < current ? "complete" : i === current ? "current" : "upcoming";
|
|
1712
1721
|
};
|
|
1713
|
-
return /* @__PURE__ */ jsx("ol", { className:
|
|
1722
|
+
return /* @__PURE__ */ jsx("ol", { className: cx("flex flex-col", className), children: events.map((event, i) => {
|
|
1714
1723
|
const status = statusOf(event, i);
|
|
1715
1724
|
const last = i === events.length - 1;
|
|
1716
1725
|
const railFilled = status === "complete";
|
|
@@ -1753,22 +1762,22 @@ function Kbd({
|
|
|
1753
1762
|
style
|
|
1754
1763
|
}) {
|
|
1755
1764
|
if (keys && keys.length > 0) {
|
|
1756
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
1765
|
+
return /* @__PURE__ */ jsx("span", { className: cx("inline-flex items-center gap-1", className), style, children: keys.map((k, i) => /* @__PURE__ */ jsxs(React28.Fragment, { children: [
|
|
1757
1766
|
i > 0 && /* @__PURE__ */ jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
1758
1767
|
/* @__PURE__ */ jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
1759
1768
|
] }, `${k}-${i}`)) });
|
|
1760
1769
|
}
|
|
1761
|
-
return /* @__PURE__ */ jsx("kbd", { className:
|
|
1770
|
+
return /* @__PURE__ */ jsx("kbd", { className: cx(cap, SIZE3[size], className), style, children });
|
|
1762
1771
|
}
|
|
1763
1772
|
var PAD = { none: "", sm: "p-3", md: "p-5", lg: "p-6" };
|
|
1764
1773
|
function Card({ children, interactive, onClick, padding: padding2 = "none", flush, className = "", style }) {
|
|
1765
|
-
const base =
|
|
1774
|
+
const base = cx(
|
|
1766
1775
|
"rounded-xl overflow-hidden bg-surface",
|
|
1767
1776
|
flush ? "" : "border border-border shadow-sm",
|
|
1768
1777
|
PAD[padding2],
|
|
1769
1778
|
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" : "",
|
|
1770
1779
|
className
|
|
1771
|
-
|
|
1780
|
+
);
|
|
1772
1781
|
if (interactive && onClick) {
|
|
1773
1782
|
return /* @__PURE__ */ jsx(
|
|
1774
1783
|
"div",
|
|
@@ -1791,10 +1800,10 @@ function Card({ children, interactive, onClick, padding: padding2 = "none", flus
|
|
|
1791
1800
|
return /* @__PURE__ */ jsx("div", { onClick, className: base, style, children });
|
|
1792
1801
|
}
|
|
1793
1802
|
function CardMedia({ children, className = "" }) {
|
|
1794
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1803
|
+
return /* @__PURE__ */ jsx("div", { className: cx("[&>img]:block [&>img]:w-full [&>img]:object-cover", className), children });
|
|
1795
1804
|
}
|
|
1796
1805
|
function CardHeader({ title, subtitle, action, avatar, children, className = "" }) {
|
|
1797
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1806
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex items-start gap-3 px-5 pt-5", children ? "pb-0" : "pb-3", className), children: [
|
|
1798
1807
|
avatar && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: avatar }),
|
|
1799
1808
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1800
1809
|
title && /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-foreground leading-snug", children: title }),
|
|
@@ -1805,10 +1814,10 @@ function CardHeader({ title, subtitle, action, avatar, children, className = ""
|
|
|
1805
1814
|
] });
|
|
1806
1815
|
}
|
|
1807
1816
|
function CardBody({ children, className = "" }) {
|
|
1808
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1817
|
+
return /* @__PURE__ */ jsx("div", { className: cx("px-5 py-4 text-sm text-foreground-secondary leading-relaxed", className), children });
|
|
1809
1818
|
}
|
|
1810
1819
|
function CardFooter({ children, noDivider, className = "" }) {
|
|
1811
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
1820
|
+
return /* @__PURE__ */ jsx("div", { className: cx("flex items-center gap-2 px-5 py-3", noDivider ? "" : "border-t border-border", className), children });
|
|
1812
1821
|
}
|
|
1813
1822
|
Card.Media = CardMedia;
|
|
1814
1823
|
Card.Header = CardHeader;
|
|
@@ -1884,7 +1893,7 @@ function FlatCarousel({
|
|
|
1884
1893
|
const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
|
|
1885
1894
|
el.scrollTo({ left: i * slideW, behavior: "smooth" });
|
|
1886
1895
|
};
|
|
1887
|
-
return /* @__PURE__ */ jsxs("section", { "aria-label": ariaLabel, "aria-roledescription": "carousel", className:
|
|
1896
|
+
return /* @__PURE__ */ jsxs("section", { "aria-label": ariaLabel, "aria-roledescription": "carousel", className: cx("relative", className), style, children: [
|
|
1888
1897
|
showArrows && /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Previous", onClick: () => slideStep(-1), disabled: atStart, className: `${arrowBtn} left-1`, children: /* @__PURE__ */ jsx(Arrow2, { dir: "left" }) }),
|
|
1889
1898
|
/* @__PURE__ */ 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__ */ jsx("div", { className: "snap-start flex-shrink-0", style: { width }, children: slide }, i)) }),
|
|
1890
1899
|
showArrows && /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Next", onClick: () => slideStep(1), disabled: atEnd, className: `${arrowBtn} right-1`, children: /* @__PURE__ */ jsx(Arrow2, { dir: "right" }) }),
|
|
@@ -1927,7 +1936,7 @@ function RotatingCarousel({
|
|
|
1927
1936
|
{
|
|
1928
1937
|
"aria-label": ariaLabel,
|
|
1929
1938
|
"aria-roledescription": "carousel",
|
|
1930
|
-
className:
|
|
1939
|
+
className: cx("relative", className),
|
|
1931
1940
|
style,
|
|
1932
1941
|
onKeyDown,
|
|
1933
1942
|
children: [
|
|
@@ -1990,7 +1999,7 @@ function fieldShell({
|
|
|
1990
1999
|
sized = true
|
|
1991
2000
|
} = {}) {
|
|
1992
2001
|
const s = FIELD_SIZE[size];
|
|
1993
|
-
return
|
|
2002
|
+
return cx(
|
|
1994
2003
|
"w-full rounded-lg border bg-surface text-foreground",
|
|
1995
2004
|
"transition-[color,box-shadow,border-color] duration-150",
|
|
1996
2005
|
s.text,
|
|
@@ -2004,7 +2013,7 @@ function fieldShell({
|
|
|
2004
2013
|
hasError ? focusWithin ? FOCUS_WITHIN_ERROR : FOCUS_ELEMENT_ERROR : "",
|
|
2005
2014
|
// placeholder colour for native inputs
|
|
2006
2015
|
"placeholder:text-foreground-muted"
|
|
2007
|
-
|
|
2016
|
+
);
|
|
2008
2017
|
}
|
|
2009
2018
|
function FieldHelpIcon({ text }) {
|
|
2010
2019
|
return /* @__PURE__ */ jsx(Tooltip, { title: text, placement: "top", children: /* @__PURE__ */ jsx(
|
|
@@ -2037,14 +2046,14 @@ function FieldLabel({
|
|
|
2037
2046
|
"div",
|
|
2038
2047
|
{
|
|
2039
2048
|
style: { width: horizontal ? width : void 0, ...style },
|
|
2040
|
-
className:
|
|
2049
|
+
className: cx(
|
|
2041
2050
|
"flex items-center gap-1",
|
|
2042
2051
|
horizontal ? "flex-shrink-0 whitespace-nowrap" : "",
|
|
2043
2052
|
// Only the 'start' alignment needs the top nudge; 'center' relies
|
|
2044
2053
|
// on the row's items-center to line up with a short control.
|
|
2045
2054
|
horizontal && align === "start" ? "mt-2" : "",
|
|
2046
2055
|
className
|
|
2047
|
-
|
|
2056
|
+
),
|
|
2048
2057
|
children: [
|
|
2049
2058
|
label != null && /* @__PURE__ */ jsxs("label", { htmlFor, className: "text-sm font-medium text-foreground select-none", children: [
|
|
2050
2059
|
label,
|
|
@@ -2074,11 +2083,11 @@ function Field({
|
|
|
2074
2083
|
return /* @__PURE__ */ jsxs(
|
|
2075
2084
|
"div",
|
|
2076
2085
|
{
|
|
2077
|
-
className:
|
|
2086
|
+
className: cx(
|
|
2078
2087
|
"flex",
|
|
2079
2088
|
horizontal ? `flex-row gap-3 ${labelAlign === "center" ? "items-center" : "items-start"}` : "flex-col gap-1.5",
|
|
2080
2089
|
className
|
|
2081
|
-
|
|
2090
|
+
),
|
|
2082
2091
|
children: [
|
|
2083
2092
|
/* @__PURE__ */ jsx(
|
|
2084
2093
|
FieldLabel,
|
|
@@ -2117,7 +2126,7 @@ var SKELETON_ROWS = [
|
|
|
2117
2126
|
{ own: true, w: 90 }
|
|
2118
2127
|
];
|
|
2119
2128
|
function ChatSkeleton() {
|
|
2120
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", "aria-hidden": "true", children: SKELETON_ROWS.map((r, i) => /* @__PURE__ */ jsxs("div", { className:
|
|
2129
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", "aria-hidden": "true", children: SKELETON_ROWS.map((r, i) => /* @__PURE__ */ jsxs("div", { className: cx("flex items-end gap-2", r.own ? "flex-row-reverse" : ""), children: [
|
|
2121
2130
|
!r.own && /* @__PURE__ */ jsx("span", { className: "h-6 w-6 flex-shrink-0 animate-pulse rounded-full bg-surface" }),
|
|
2122
2131
|
/* @__PURE__ */ jsx("span", { className: "h-8 animate-pulse rounded-2xl bg-surface", style: { width: r.w } })
|
|
2123
2132
|
] }, i)) });
|
|
@@ -2180,7 +2189,7 @@ function Chat({
|
|
|
2180
2189
|
return /* @__PURE__ */ jsxs(
|
|
2181
2190
|
"div",
|
|
2182
2191
|
{
|
|
2183
|
-
className:
|
|
2192
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
2184
2193
|
style: { height, ...style },
|
|
2185
2194
|
children: [
|
|
2186
2195
|
hasHeader && /* @__PURE__ */ jsxs("div", { className: "flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -2200,18 +2209,18 @@ function Chat({
|
|
|
2200
2209
|
const firstOfGroup = !prev || prev.authorId !== m.authorId;
|
|
2201
2210
|
const lastOfGroup = !next || next.authorId !== m.authorId;
|
|
2202
2211
|
const ts = m.timestamp ? toDate(m.timestamp) : null;
|
|
2203
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2212
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex items-end gap-2", own ? "flex-row-reverse" : "", firstOfGroup ? "mt-2 first:mt-0" : ""), children: [
|
|
2204
2213
|
!own && /* @__PURE__ */ jsx("div", { className: "w-7 flex-shrink-0", children: lastOfGroup && /* @__PURE__ */ jsx(Avatar, { src: m.avatar, alt: m.authorName ?? "User", fallback: initials(m.authorName), size: "xs" }) }),
|
|
2205
2214
|
/* @__PURE__ */ jsxs("div", { className: ["flex max-w-[78%] flex-col", own ? "items-end" : "items-start"].join(" "), children: [
|
|
2206
2215
|
firstOfGroup && !own && m.authorName && /* @__PURE__ */ jsx("span", { className: "mb-0.5 px-1 text-[11px] font-medium text-foreground-muted", children: m.authorName }),
|
|
2207
2216
|
/* @__PURE__ */ jsx(
|
|
2208
2217
|
"div",
|
|
2209
2218
|
{
|
|
2210
|
-
className:
|
|
2219
|
+
className: cx(
|
|
2211
2220
|
"whitespace-pre-wrap break-words px-3 py-1.5 text-sm leading-snug",
|
|
2212
2221
|
own ? "rounded-2xl bg-accent text-accent-fg" : "rounded-2xl border border-border bg-surface text-foreground",
|
|
2213
2222
|
lastOfGroup ? own ? "rounded-br-md" : "rounded-bl-md" : ""
|
|
2214
|
-
|
|
2223
|
+
),
|
|
2215
2224
|
children: m.text
|
|
2216
2225
|
}
|
|
2217
2226
|
),
|
|
@@ -2304,7 +2313,7 @@ function Statistic({
|
|
|
2304
2313
|
return /* @__PURE__ */ jsxs(
|
|
2305
2314
|
"div",
|
|
2306
2315
|
{
|
|
2307
|
-
className:
|
|
2316
|
+
className: cx("flex gap-3", align === "center" ? "flex-col items-center text-center" : "items-start", className),
|
|
2308
2317
|
style,
|
|
2309
2318
|
children: [
|
|
2310
2319
|
icon && align === "left" && /* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent", children: /* @__PURE__ */ jsx("span", { className: "h-5 w-5 inline-flex items-center justify-center", children: icon }) }),
|
|
@@ -2397,7 +2406,7 @@ function FAB({
|
|
|
2397
2406
|
return /* @__PURE__ */ jsxs(
|
|
2398
2407
|
"div",
|
|
2399
2408
|
{
|
|
2400
|
-
className:
|
|
2409
|
+
className: cx(fixed ? "fixed" : "absolute", "z-40 flex flex-col", POS[position], className),
|
|
2401
2410
|
style,
|
|
2402
2411
|
children: [
|
|
2403
2412
|
bottom && dial,
|
|
@@ -2408,13 +2417,13 @@ function FAB({
|
|
|
2408
2417
|
"aria-label": label,
|
|
2409
2418
|
"aria-expanded": hasDial ? open : void 0,
|
|
2410
2419
|
onClick: (e) => hasDial ? setOpen((o) => !o) : onClick?.(e),
|
|
2411
|
-
className:
|
|
2420
|
+
className: cx(
|
|
2412
2421
|
"flex items-center justify-center rounded-full shadow-lg transition-[background-color,transform] duration-200",
|
|
2413
2422
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",
|
|
2414
2423
|
SIZE4[size],
|
|
2415
2424
|
TONE3[tone],
|
|
2416
2425
|
hasDial && open ? "rotate-45" : ""
|
|
2417
|
-
|
|
2426
|
+
),
|
|
2418
2427
|
children: /* @__PURE__ */ jsx("span", { className: "h-6 w-6 inline-flex items-center justify-center", children: icon })
|
|
2419
2428
|
}
|
|
2420
2429
|
),
|
|
@@ -2482,7 +2491,7 @@ function PopConfirm({
|
|
|
2482
2491
|
side,
|
|
2483
2492
|
sideOffset: 8,
|
|
2484
2493
|
collisionPadding: 12,
|
|
2485
|
-
className:
|
|
2494
|
+
className: cx("z-[400] focus:outline-none", className),
|
|
2486
2495
|
children: [
|
|
2487
2496
|
/* @__PURE__ */ jsxs(
|
|
2488
2497
|
motion.div,
|
|
@@ -2613,7 +2622,7 @@ function LogoutTimer({
|
|
|
2613
2622
|
clearTimers();
|
|
2614
2623
|
};
|
|
2615
2624
|
}, [enabled, timeout, countdown, events.join(","), startIdle, clearTimers]);
|
|
2616
|
-
return /* @__PURE__ */ jsx(Modal, {
|
|
2625
|
+
return /* @__PURE__ */ jsx(Modal, { open: warning, onClose: stay, hasFooter: false, title, size: "sm", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
2617
2626
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-foreground-secondary", children: description }),
|
|
2618
2627
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
2619
2628
|
/* @__PURE__ */ jsx("div", { className: "text-3xl font-semibold tabular-nums text-foreground", "aria-live": "polite", children: formatTime(remaining) }),
|
|
@@ -2692,19 +2701,19 @@ function SegmentedControl({
|
|
|
2692
2701
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
2693
2702
|
"aria-invalid": hasError || void 0,
|
|
2694
2703
|
"aria-describedby": hasError ? errorId : void 0,
|
|
2695
|
-
className:
|
|
2704
|
+
className: cx(
|
|
2696
2705
|
"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1",
|
|
2697
2706
|
hasError ? "border-status-error" : "border-border",
|
|
2698
2707
|
sz.h,
|
|
2699
2708
|
fullWidth ? "flex w-full" : "w-fit",
|
|
2700
2709
|
disabled ? "opacity-60 cursor-not-allowed" : ""
|
|
2701
|
-
|
|
2710
|
+
),
|
|
2702
2711
|
children: options.map((opt) => /* @__PURE__ */ jsxs(
|
|
2703
2712
|
ToggleGroup.Item,
|
|
2704
2713
|
{
|
|
2705
2714
|
value: opt.value,
|
|
2706
2715
|
disabled: opt.disabled,
|
|
2707
|
-
className:
|
|
2716
|
+
className: cx(
|
|
2708
2717
|
"inline-flex items-center justify-center gap-1.5 rounded-md select-none whitespace-nowrap",
|
|
2709
2718
|
"transition-colors duration-150 h-full",
|
|
2710
2719
|
sz.text,
|
|
@@ -2716,7 +2725,7 @@ function SegmentedControl({
|
|
|
2716
2725
|
"data-[state=on]:bg-surface data-[state=on]:text-accent data-[state=on]:shadow-sm",
|
|
2717
2726
|
"focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring",
|
|
2718
2727
|
"disabled:opacity-40 disabled:cursor-not-allowed"
|
|
2719
|
-
|
|
2728
|
+
),
|
|
2720
2729
|
children: [
|
|
2721
2730
|
opt.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: opt.icon }),
|
|
2722
2731
|
opt.label
|
|
@@ -2758,6 +2767,7 @@ var addDays = (d, n) => {
|
|
|
2758
2767
|
var addMonths = (d, n) => new Date(d.getFullYear(), d.getMonth() + n, 1);
|
|
2759
2768
|
var sameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
2760
2769
|
var isToday = (d) => sameDay(d, /* @__PURE__ */ new Date());
|
|
2770
|
+
var dayKey = (d) => `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
|
|
2761
2771
|
var isSameMonth = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
2762
2772
|
var startOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
|
|
2763
2773
|
var endOfMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0);
|
|
@@ -2874,7 +2884,7 @@ function Scheduler({
|
|
|
2874
2884
|
return /* @__PURE__ */ jsxs(
|
|
2875
2885
|
"div",
|
|
2876
2886
|
{
|
|
2877
|
-
className:
|
|
2887
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
2878
2888
|
style,
|
|
2879
2889
|
children: [
|
|
2880
2890
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -3033,6 +3043,17 @@ function MonthYearPicker({ label, cursor, onPick }) {
|
|
|
3033
3043
|
] });
|
|
3034
3044
|
}
|
|
3035
3045
|
var MAX_CHIPS = 3;
|
|
3046
|
+
var NO_EVENTS = [];
|
|
3047
|
+
function bucketByDay(events) {
|
|
3048
|
+
const map = /* @__PURE__ */ new Map();
|
|
3049
|
+
for (const e of events) {
|
|
3050
|
+
const key = dayKey(e.start);
|
|
3051
|
+
const bucket = map.get(key);
|
|
3052
|
+
if (bucket) bucket.push(e);
|
|
3053
|
+
else map.set(key, [e]);
|
|
3054
|
+
}
|
|
3055
|
+
return map;
|
|
3056
|
+
}
|
|
3036
3057
|
function MonthView({
|
|
3037
3058
|
cursor,
|
|
3038
3059
|
weekStartsOn,
|
|
@@ -3041,12 +3062,13 @@ function MonthView({
|
|
|
3041
3062
|
onSelectEvent
|
|
3042
3063
|
}) {
|
|
3043
3064
|
const grid = useMemo(() => buildMonthGrid(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3065
|
+
const eventsByDay = useMemo(() => bucketByDay(events), [events]);
|
|
3044
3066
|
const labels = weekdayLabels(weekStartsOn);
|
|
3045
3067
|
return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", children: [
|
|
3046
3068
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 border-b border-border", children: labels.map((l) => /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-center text-[11px] font-medium uppercase tracking-wide text-foreground-muted", children: l }, l)) }),
|
|
3047
3069
|
/* @__PURE__ */ jsx("div", { className: "grid flex-1 grid-cols-7 grid-rows-6", children: grid.map((day, i) => {
|
|
3048
3070
|
const inMonth = isSameMonth(day, cursor);
|
|
3049
|
-
const dayEvents =
|
|
3071
|
+
const dayEvents = eventsByDay.get(dayKey(day)) ?? NO_EVENTS;
|
|
3050
3072
|
const today = isToday(day);
|
|
3051
3073
|
return /* @__PURE__ */ jsxs(
|
|
3052
3074
|
"button",
|
|
@@ -3115,6 +3137,7 @@ function WeekView({
|
|
|
3115
3137
|
onSelectEvent
|
|
3116
3138
|
}) {
|
|
3117
3139
|
const days = useMemo(() => getWeekDays(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3140
|
+
const eventsByDay = useMemo(() => bucketByDay(events), [events]);
|
|
3118
3141
|
const labels = useMemo(() => weekdayLabels(weekStartsOn), [weekStartsOn]);
|
|
3119
3142
|
const dow = (d) => labels[(d.getDay() - weekStartsOn + 7) % 7];
|
|
3120
3143
|
const [startHour, endHour] = dayHours;
|
|
@@ -3135,7 +3158,7 @@ function WeekView({
|
|
|
3135
3158
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "grid", style: { gridTemplateColumns: `3.5rem repeat(7, 1fr)`, height: gridHeight }, children: [
|
|
3136
3159
|
/* @__PURE__ */ jsx("div", { className: "relative border-r border-border", children: hours.map((h, i) => /* @__PURE__ */ 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)) }),
|
|
3137
3160
|
days.map((day) => {
|
|
3138
|
-
const dayEvents =
|
|
3161
|
+
const dayEvents = (eventsByDay.get(dayKey(day)) ?? NO_EVENTS).filter((e) => !e.allDay);
|
|
3139
3162
|
return /* @__PURE__ */ jsxs("div", { className: "relative border-r border-border last:border-r-0", children: [
|
|
3140
3163
|
hours.map((h, i) => /* @__PURE__ */ jsx(
|
|
3141
3164
|
"button",
|
|
@@ -3223,7 +3246,7 @@ function EmptyCart({
|
|
|
3223
3246
|
return /* @__PURE__ */ jsxs(
|
|
3224
3247
|
"div",
|
|
3225
3248
|
{
|
|
3226
|
-
className:
|
|
3249
|
+
className: cx("flex flex-col items-center justify-center px-6 py-10 text-center", className),
|
|
3227
3250
|
style,
|
|
3228
3251
|
children: [
|
|
3229
3252
|
art && /* @__PURE__ */ jsx("div", { className: "mb-4", children: art }),
|
|
@@ -3242,9 +3265,9 @@ var Stepper2 = ({
|
|
|
3242
3265
|
}) => {
|
|
3243
3266
|
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";
|
|
3244
3267
|
return /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center rounded-md border border-border overflow-hidden", children: [
|
|
3245
|
-
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Decrease quantity", disabled: quantity <= 1, onClick: () => onChange?.(quantity - 1), className: btn, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", d: "M5 12h14" }) }) }),
|
|
3268
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Decrease quantity", disabled: quantity <= 1, onClick: () => onChange?.(quantity - 1), className: btn, children: /* @__PURE__ */ 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__ */ jsx("path", { strokeLinecap: "round", d: "M5 12h14" }) }) }),
|
|
3246
3269
|
/* @__PURE__ */ jsx("span", { className: "w-8 text-center text-sm tabular-nums text-foreground select-none", children: quantity }),
|
|
3247
|
-
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Increase quantity", disabled: max != null && quantity >= max, onClick: () => onChange?.(quantity + 1), className: btn, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", d: "M12 5v14M5 12h14" }) }) })
|
|
3270
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Increase quantity", disabled: max != null && quantity >= max, onClick: () => onChange?.(quantity + 1), className: btn, children: /* @__PURE__ */ 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__ */ jsx("path", { strokeLinecap: "round", d: "M12 5v14M5 12h14" }) }) })
|
|
3248
3271
|
] });
|
|
3249
3272
|
};
|
|
3250
3273
|
function Cart({
|
|
@@ -3261,7 +3284,7 @@ function Cart({
|
|
|
3261
3284
|
}) {
|
|
3262
3285
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
3263
3286
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
3264
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
3287
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex flex-col rounded-xl border border-border bg-surface", className), style, children: [
|
|
3265
3288
|
items.length === 0 ? emptyState ?? /* @__PURE__ */ jsx(EmptyCart, {}) : /* @__PURE__ */ jsx("ul", { className: "divide-y divide-border", children: items.map((it) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-3 p-3", children: [
|
|
3266
3289
|
/* @__PURE__ */ jsx("div", { className: "h-14 w-14 flex-shrink-0 overflow-hidden rounded-md bg-surface-raised", children: it.image && /* @__PURE__ */ jsx("img", { src: it.image, alt: "", className: "h-full w-full object-cover" }) }),
|
|
3267
3290
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -4105,7 +4128,7 @@ function Checkout({
|
|
|
4105
4128
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
4106
4129
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
4107
4130
|
const isEmpty2 = items.length === 0;
|
|
4108
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
4131
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("mx-auto w-full max-w-5xl", className), children: [
|
|
4109
4132
|
title && /* @__PURE__ */ jsx("h1", { className: "mb-6 text-2xl font-semibold tracking-tight text-foreground", children: title }),
|
|
4110
4133
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
|
|
4111
4134
|
/* @__PURE__ */ jsx("section", { "aria-label": "Order summary", children: /* @__PURE__ */ jsx(
|
|
@@ -4576,14 +4599,14 @@ function ScalableContainer({
|
|
|
4576
4599
|
width: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] },
|
|
4577
4600
|
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
4578
4601
|
},
|
|
4579
|
-
className:
|
|
4602
|
+
className: cx(
|
|
4580
4603
|
"relative rounded-lg overflow-hidden",
|
|
4581
4604
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow
|
|
4582
4605
|
// when expanded. No background colour change.
|
|
4583
4606
|
isScaled ? "shadow-2xl" : "shadow-md",
|
|
4584
4607
|
"transition-shadow duration-300",
|
|
4585
4608
|
className
|
|
4586
|
-
|
|
4609
|
+
),
|
|
4587
4610
|
children: [
|
|
4588
4611
|
/* @__PURE__ */ jsx(Tooltip, { placement: "bottom", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
|
|
4589
4612
|
"button",
|
|
@@ -4731,7 +4754,7 @@ function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
|
4731
4754
|
onClick: previousApp,
|
|
4732
4755
|
"aria-label": "Previous",
|
|
4733
4756
|
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence rotate-180",
|
|
4734
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4757
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4735
4758
|
}
|
|
4736
4759
|
),
|
|
4737
4760
|
/* @__PURE__ */ jsx("div", { className: "flex", children: indexPool.map((index, id) => {
|
|
@@ -4768,7 +4791,7 @@ function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
|
4768
4791
|
onClick: nextApp,
|
|
4769
4792
|
"aria-label": "Next",
|
|
4770
4793
|
className: "cursor-pointer rounded-lg transition-all duration-300 hover:bg-ice-dark dark:hover:bg-independence",
|
|
4771
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4794
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: colors_default.PALETTE["prussian-blue"], strokeWidth: 2, className: "h-10 w-10 dark:stroke-white", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
4772
4795
|
}
|
|
4773
4796
|
)
|
|
4774
4797
|
] }) });
|
|
@@ -5375,8 +5398,8 @@ function Pagination({
|
|
|
5375
5398
|
const currentPerPageLabel = currentOpt?.label ?? currentOpt?.value ?? options.perPage ?? "";
|
|
5376
5399
|
const FOCUS = "focus-visible:!ring-0 focus-visible:!border-accent";
|
|
5377
5400
|
const navBtn = (icon, disabled, onClick, title) => /* @__PURE__ */ jsx(Button_default, { variant: "outline", size: "sm", disabled, onClick, icon, className: `w-7 !px-0 ${FOCUS}`, "aria-label": title, title });
|
|
5378
|
-
const chevronRight = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" }) });
|
|
5379
|
-
const doubleChevronRight = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l6 6-6 6M12 6l6 6-6 6" }) });
|
|
5401
|
+
const chevronRight = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 6l6 6-6 6" }) });
|
|
5402
|
+
const doubleChevronRight = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l6 6-6 6M12 6l6 6-6 6" }) });
|
|
5380
5403
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-3", children: [
|
|
5381
5404
|
options.withPicker && /* @__PURE__ */ jsxs("div", { className: "mr-auto flex items-center gap-2", children: [
|
|
5382
5405
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-xs text-foreground-muted", children: "Rows per page" }),
|
|
@@ -5752,11 +5775,11 @@ function MegaMenu({
|
|
|
5752
5775
|
{
|
|
5753
5776
|
delayDuration,
|
|
5754
5777
|
"aria-label": ariaLabel,
|
|
5755
|
-
className:
|
|
5778
|
+
className: cx(
|
|
5756
5779
|
"relative z-10 w-full",
|
|
5757
5780
|
responsive ? "hidden md:flex" : "flex",
|
|
5758
5781
|
className
|
|
5759
|
-
|
|
5782
|
+
),
|
|
5760
5783
|
style,
|
|
5761
5784
|
children: /* @__PURE__ */ jsx(NavigationMenu.List, { className: "flex items-center gap-1", children })
|
|
5762
5785
|
}
|
|
@@ -5769,13 +5792,13 @@ function MegaMenuItem({ label, icon, href, children, className = "" }) {
|
|
|
5769
5792
|
const { align } = useContext(MegaMenuContext);
|
|
5770
5793
|
const pos = align === "center" ? "left-1/2 -translate-x-1/2" : align === "end" ? "right-0" : "left-0";
|
|
5771
5794
|
if (!children) {
|
|
5772
|
-
return /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxs(NavigationMenu.Link, { href, className:
|
|
5795
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxs(NavigationMenu.Link, { href, className: cx(TOP_ITEM, className), children: [
|
|
5773
5796
|
icon && /* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5774
5797
|
label
|
|
5775
5798
|
] }) });
|
|
5776
5799
|
}
|
|
5777
5800
|
return /* @__PURE__ */ jsxs(NavigationMenu.Item, { children: [
|
|
5778
|
-
/* @__PURE__ */ jsxs(NavigationMenu.Trigger, { className:
|
|
5801
|
+
/* @__PURE__ */ jsxs(NavigationMenu.Trigger, { className: cx(TOP_ITEM, className), children: [
|
|
5779
5802
|
icon && /* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5780
5803
|
label,
|
|
5781
5804
|
/* @__PURE__ */ jsx(
|
|
@@ -5813,14 +5836,14 @@ function MegaMenuPanel({ children, columns, className = "", style }) {
|
|
|
5813
5836
|
return /* @__PURE__ */ jsx(
|
|
5814
5837
|
"div",
|
|
5815
5838
|
{
|
|
5816
|
-
className:
|
|
5839
|
+
className: cx("grid gap-6 p-6", className),
|
|
5817
5840
|
style: { ...layout, maxWidth: "min(92vw, 960px)", ...style },
|
|
5818
5841
|
children
|
|
5819
5842
|
}
|
|
5820
5843
|
);
|
|
5821
5844
|
}
|
|
5822
5845
|
function MegaMenuSection({ title, children, className = "" }) {
|
|
5823
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
5846
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("min-w-0 flex flex-col", className), children: [
|
|
5824
5847
|
title && /* @__PURE__ */ jsx("p", { className: "px-3 pb-1.5 text-[11px] font-semibold uppercase tracking-widest text-foreground-muted select-none", children: title }),
|
|
5825
5848
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children })
|
|
5826
5849
|
] });
|
|
@@ -5832,12 +5855,12 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
5832
5855
|
active,
|
|
5833
5856
|
href,
|
|
5834
5857
|
onClick,
|
|
5835
|
-
className:
|
|
5858
|
+
className: cx(
|
|
5836
5859
|
"group/link flex items-start gap-3 rounded-md p-3 transition-colors select-none",
|
|
5837
5860
|
"hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
5838
5861
|
"data-[active]:bg-surface-raised",
|
|
5839
5862
|
className
|
|
5840
|
-
|
|
5863
|
+
),
|
|
5841
5864
|
children: [
|
|
5842
5865
|
icon && /* @__PURE__ */ 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__ */ jsx("span", { className: "h-[18px] w-[18px] inline-flex items-center justify-center", children: icon }) }),
|
|
5843
5866
|
/* @__PURE__ */ jsxs("span", { className: "flex flex-col min-w-0", children: [
|
|
@@ -5849,7 +5872,7 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
5849
5872
|
);
|
|
5850
5873
|
}
|
|
5851
5874
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
5852
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
5875
|
+
return /* @__PURE__ */ jsx("div", { className: cx("min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className), children });
|
|
5853
5876
|
}
|
|
5854
5877
|
var elementsOfType = (children, type) => React28.Children.toArray(children).filter(
|
|
5855
5878
|
(c) => React28.isValidElement(c) && c.type === type
|
|
@@ -5939,7 +5962,7 @@ function MegaMenuMobile({
|
|
|
5939
5962
|
{
|
|
5940
5963
|
href,
|
|
5941
5964
|
onClick: () => setOpen(false),
|
|
5942
|
-
className:
|
|
5965
|
+
className: cx(rowBase, divider),
|
|
5943
5966
|
children: [
|
|
5944
5967
|
icon && /* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5945
5968
|
itemLabel
|
|
@@ -5955,7 +5978,7 @@ function MegaMenuMobile({
|
|
|
5955
5978
|
type: "button",
|
|
5956
5979
|
onClick: () => setExpanded(isOpen ? null : i),
|
|
5957
5980
|
"aria-expanded": isOpen,
|
|
5958
|
-
className:
|
|
5981
|
+
className: cx(rowBase, isOpen ? "text-accent" : ""),
|
|
5959
5982
|
children: [
|
|
5960
5983
|
icon && /* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
5961
5984
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left", children: itemLabel }),
|
|
@@ -6177,7 +6200,7 @@ function SecureLayout({
|
|
|
6177
6200
|
]);
|
|
6178
6201
|
if (state === "checking") {
|
|
6179
6202
|
if (loadingFallback === null) return null;
|
|
6180
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
6203
|
+
return /* @__PURE__ */ jsx("div", { className: cx("flex min-h-[8rem] items-center justify-center", className), children: loadingFallback !== void 0 ? loadingFallback : /* @__PURE__ */ jsx(Spinner3, {}) });
|
|
6181
6204
|
}
|
|
6182
6205
|
if (state === "denied") {
|
|
6183
6206
|
if (fallback === null) return null;
|
|
@@ -6785,11 +6808,11 @@ function Switch({
|
|
|
6785
6808
|
if (!isControlled) setInternal(c);
|
|
6786
6809
|
onChange?.({ target: { checked: c, name } });
|
|
6787
6810
|
};
|
|
6788
|
-
const stateLabel = (active) =>
|
|
6811
|
+
const stateLabel = (active) => cx(
|
|
6789
6812
|
"text-sm select-none transition-colors",
|
|
6790
6813
|
active ? "text-foreground font-medium" : "text-foreground-muted",
|
|
6791
6814
|
disabled ? "opacity-50" : "cursor-pointer"
|
|
6792
|
-
|
|
6815
|
+
);
|
|
6793
6816
|
return /* @__PURE__ */ jsx(
|
|
6794
6817
|
Field,
|
|
6795
6818
|
{
|
|
@@ -7054,7 +7077,7 @@ function Dropdown({
|
|
|
7054
7077
|
children: labelFor(value)
|
|
7055
7078
|
}
|
|
7056
7079
|
) }),
|
|
7057
|
-
/* @__PURE__ */ jsx("div", { className: `flex-shrink-0 text-foreground-muted transition-transform duration-200 ${open ? "rotate-180" : "rotate-0"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
7080
|
+
/* @__PURE__ */ jsx("div", { className: `flex-shrink-0 text-foreground-muted transition-transform duration-200 ${open ? "rotate-180" : "rotate-0"}`, "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
|
|
7058
7081
|
]
|
|
7059
7082
|
}
|
|
7060
7083
|
) }),
|
|
@@ -8877,7 +8900,7 @@ function DateRangePicker({
|
|
|
8877
8900
|
onClick: () => setLeftMonth(addMonths3(leftMonth, -1)),
|
|
8878
8901
|
"aria-label": "Previous month",
|
|
8879
8902
|
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",
|
|
8880
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
8903
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
|
|
8881
8904
|
}
|
|
8882
8905
|
),
|
|
8883
8906
|
renderMonth(leftMonth)
|
|
@@ -8890,7 +8913,7 @@ function DateRangePicker({
|
|
|
8890
8913
|
onClick: () => setLeftMonth(addMonths3(leftMonth, 1)),
|
|
8891
8914
|
"aria-label": "Next month",
|
|
8892
8915
|
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",
|
|
8893
|
-
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
8916
|
+
children: /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
|
|
8894
8917
|
}
|
|
8895
8918
|
),
|
|
8896
8919
|
renderMonth(addMonths3(leftMonth, 1))
|
|
@@ -9154,7 +9177,7 @@ function Jumbotron({
|
|
|
9154
9177
|
return /* @__PURE__ */ jsx(
|
|
9155
9178
|
"section",
|
|
9156
9179
|
{
|
|
9157
|
-
className:
|
|
9180
|
+
className: cx("relative overflow-hidden rounded-2xl px-6 py-16 sm:px-10 sm:py-24", bgClass, className),
|
|
9158
9181
|
style: { ...background === "gradient" ? { backgroundImage: GRADIENT } : null, ...style },
|
|
9159
9182
|
children: split ? /* @__PURE__ */ jsxs("div", { className: "mx-auto grid max-w-6xl items-center gap-10 lg:grid-cols-2", children: [
|
|
9160
9183
|
copy,
|
|
@@ -9182,7 +9205,7 @@ function FeatureGrid({
|
|
|
9182
9205
|
style
|
|
9183
9206
|
}) {
|
|
9184
9207
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9185
|
-
return /* @__PURE__ */ jsxs("section", { className:
|
|
9208
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9186
9209
|
hasHeader && /* @__PURE__ */ jsxs("header", { className: ["mb-10 flex flex-col gap-3", centeredHeader ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9187
9210
|
eyebrow != null && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9188
9211
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9205,7 +9228,7 @@ function FeatureGrid({
|
|
|
9205
9228
|
var Check3 = () => /* @__PURE__ */ 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__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 6 9 17l-5-5" }) });
|
|
9206
9229
|
function PricingPlans({ plans, eyebrow, title, description, className = "", style }) {
|
|
9207
9230
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9208
|
-
return /* @__PURE__ */ jsxs("section", { className:
|
|
9231
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9209
9232
|
hasHeader && /* @__PURE__ */ jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9210
9233
|
eyebrow != null && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9211
9234
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9256,7 +9279,7 @@ function Stars({ value }) {
|
|
|
9256
9279
|
}
|
|
9257
9280
|
function Testimonials({ testimonials, eyebrow, title, description, columns = 3, className = "", style }) {
|
|
9258
9281
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9259
|
-
return /* @__PURE__ */ jsxs("section", { className:
|
|
9282
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9260
9283
|
hasHeader && /* @__PURE__ */ jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9261
9284
|
eyebrow != null && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9262
9285
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9315,7 +9338,7 @@ function SlideShow({
|
|
|
9315
9338
|
{
|
|
9316
9339
|
"aria-label": ariaLabel,
|
|
9317
9340
|
"aria-roledescription": "carousel",
|
|
9318
|
-
className:
|
|
9341
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9319
9342
|
style: { height, ...style },
|
|
9320
9343
|
onMouseEnter: () => setPaused(true),
|
|
9321
9344
|
onMouseLeave: () => setPaused(false),
|
|
@@ -9376,7 +9399,7 @@ function Video({
|
|
|
9376
9399
|
style
|
|
9377
9400
|
}) {
|
|
9378
9401
|
const [playing, setPlaying] = useState(autoPlay);
|
|
9379
|
-
const frame =
|
|
9402
|
+
const frame = cx("relative w-full overflow-hidden bg-backdrop", framed ? "rounded-2xl border border-border shadow-sm" : "", className);
|
|
9380
9403
|
const ratio = aspect.replace("/", " / ");
|
|
9381
9404
|
return /* @__PURE__ */ jsx("div", { className: frame, style: { aspectRatio: ratio, ...style }, children: embedUrl ? /* @__PURE__ */ jsx(
|
|
9382
9405
|
"iframe",
|
|
@@ -9438,7 +9461,7 @@ function Parallax({
|
|
|
9438
9461
|
"div",
|
|
9439
9462
|
{
|
|
9440
9463
|
ref,
|
|
9441
|
-
className:
|
|
9464
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9442
9465
|
style: { height, ...style },
|
|
9443
9466
|
children: [
|
|
9444
9467
|
/* @__PURE__ */ jsx(
|
|
@@ -9481,7 +9504,7 @@ function Blog({
|
|
|
9481
9504
|
style
|
|
9482
9505
|
}) {
|
|
9483
9506
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9484
|
-
return /* @__PURE__ */ jsxs("section", { className:
|
|
9507
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("w-full", className), style, children: [
|
|
9485
9508
|
hasHeader && /* @__PURE__ */ jsxs("header", { className: ["mb-10 flex flex-col gap-3", centeredHeader ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9486
9509
|
eyebrow != null && /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9487
9510
|
title != null && /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9543,7 +9566,7 @@ function Socials({
|
|
|
9543
9566
|
className = "",
|
|
9544
9567
|
style
|
|
9545
9568
|
}) {
|
|
9546
|
-
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className:
|
|
9569
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cx("flex flex-wrap items-center gap-2", className), style, children: links.map((link, i) => {
|
|
9547
9570
|
const label = link.label ?? (link.platform ? link.platform[0].toUpperCase() + link.platform.slice(1) : "Link");
|
|
9548
9571
|
const icon = link.icon ?? (link.platform ? ICONS[link.platform] : null);
|
|
9549
9572
|
const ext = newTab && !link.href.startsWith("mailto:");
|
|
@@ -9594,7 +9617,7 @@ function CookieConsent({
|
|
|
9594
9617
|
role: "dialog",
|
|
9595
9618
|
"aria-label": "Cookie consent",
|
|
9596
9619
|
"aria-live": "polite",
|
|
9597
|
-
className:
|
|
9620
|
+
className: cx("fixed z-[60]", POS2[position], className),
|
|
9598
9621
|
children: /* @__PURE__ */ 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: [
|
|
9599
9622
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 text-sm leading-relaxed text-foreground-secondary", children: [
|
|
9600
9623
|
title != null && /* @__PURE__ */ jsx("p", { className: "mb-1 font-semibold text-foreground", children: title }),
|
|
@@ -9640,7 +9663,7 @@ function LeadCapture({
|
|
|
9640
9663
|
return /* @__PURE__ */ jsx(
|
|
9641
9664
|
"section",
|
|
9642
9665
|
{
|
|
9643
|
-
className:
|
|
9666
|
+
className: cx("w-full overflow-hidden rounded-2xl border border-border bg-surface px-6 py-12 sm:px-12 sm:py-16", className),
|
|
9644
9667
|
style: { ...isGradient ? { backgroundImage: GRADIENT2 } : {}, ...style },
|
|
9645
9668
|
children: /* @__PURE__ */ jsxs("div", { className: ["mx-auto flex max-w-2xl flex-col gap-4", centered ? "items-center text-center" : "items-start text-left"].join(" "), children: [
|
|
9646
9669
|
/* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9671,6 +9694,6 @@ function LeadCapture({
|
|
|
9671
9694
|
);
|
|
9672
9695
|
}
|
|
9673
9696
|
|
|
9674
|
-
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PopConfirm, Portal, PricingPlans, RadioGroup, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, Wizard, cardNumberError, cvvError, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useBreakpoint, useCart, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification };
|
|
9697
|
+
export { Accordion_default as Accordion, AppShell, AutoComplete, Avatar, Badge, Blog, Box, Breadcrumbs, Button_default as Button, CARD_BRANDS, Card_default as Card, CardCarousel, Cart, CartButton, CartProvider, Catalog, CatalogCarousel, CatalogGrid, Chat, Checkbox, Checkout, ColorPicker, ContextMenu, CookieConsent, CreditCardForm, DateRangePicker, Drawer, Dropdown, EmptyCart, FAB, FadingBase, FeatureGrid, Field, FieldHelpIcon, FieldLabel, FileInput, Flex, Form, FormContext, FormField, FormStore, Grid, GridCard, IconButton, Jumbotron, Kbd, LeadCapture, List2 as List, LoadingSpinner, LogoutTimer, MegaMenu_default as MegaMenu, MenuButton, Modal, NotificationProvider, NumberInput, OpaqueGridCard, OtpInput, Parallax, Password, PopConfirm, Portal, PricingPlans, RadioGroup, Rating, ScalableContainer, Scheduler, SearchInput_default as SearchInput, SecureLayout, SegmentedControl, Sidebar, SkeletonBox, SkeletonCard, SkeletonCircle, SkeletonText, SlideShow, Slider, Socials, Statistic, Stepper, Switch, Table, Tabs_default as Tabs, TagsInput, DatePicker as Temporal, Testimonials, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimePicker, Timeline, Tooltip, TooltipProvider, TopBar, Tree, TreeSelect, Typography, Video, Wizard, cardNumberError, cvvError, cx, detectBrand, expiryError, fieldShell, formatCardNumber, formatExpiry, isRequired, luhnValid, onlyDigits, patterns, runFieldRules, useBreakpoint, useCart, useFieldArray, useForm, useFormField, useFormStore, useJwt, useLocalStorage, useMediaQuery, useNotification };
|
|
9675
9698
|
//# sourceMappingURL=index.js.map
|
|
9676
9699
|
//# sourceMappingURL=index.js.map
|