@geomak/ui 6.33.0 → 6.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-4V4U2W7K.cjs +389 -0
- package/dist/chunk-4V4U2W7K.cjs.map +1 -0
- package/dist/chunk-KAFJJO5O.js +284 -0
- package/dist/chunk-KAFJJO5O.js.map +1 -0
- package/dist/icons/index.cjs +424 -0
- package/dist/icons/index.cjs.map +1 -0
- package/dist/icons/index.d.cts +274 -0
- package/dist/icons/index.d.ts +274 -0
- package/dist/icons/index.js +3 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.cjs +455 -701
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -160
- package/dist/index.d.ts +17 -160
- package/dist/index.js +169 -422
- package/dist/index.js.map +1 -1
- package/package.json +9 -2
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunk4V4U2W7K_cjs = require('./chunk-4V4U2W7K.cjs');
|
|
3
4
|
var chunkOAV4TA4B_cjs = require('./chunk-OAV4TA4B.cjs');
|
|
4
|
-
var
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var React28 = require('react');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
8
9
|
var DropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
9
10
|
var Dialog = require('@radix-ui/react-dialog');
|
|
@@ -40,7 +41,7 @@ function _interopNamespace(e) {
|
|
|
40
41
|
return Object.freeze(n);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
var
|
|
44
|
+
var React28__default = /*#__PURE__*/_interopDefault(React28);
|
|
44
45
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
45
46
|
var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
|
|
46
47
|
var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
|
|
@@ -56,286 +57,18 @@ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimit
|
|
|
56
57
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
57
58
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
58
59
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
width: size,
|
|
69
|
-
height: size,
|
|
70
|
-
viewBox,
|
|
71
|
-
fill: solid ? "currentColor" : "none",
|
|
72
|
-
stroke: solid ? void 0 : "currentColor",
|
|
73
|
-
strokeWidth: solid ? void 0 : strokeWidth,
|
|
74
|
-
strokeLinecap: solid ? void 0 : "round",
|
|
75
|
-
strokeLinejoin: solid ? void 0 : "round",
|
|
76
|
-
...a11y,
|
|
77
|
-
...rest,
|
|
78
|
-
children: [
|
|
79
|
-
title ? /* @__PURE__ */ jsxRuntime.jsx("title", { children: title }) : null,
|
|
80
|
-
content
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
Component.displayName = displayName;
|
|
86
|
-
return Component;
|
|
87
|
-
}
|
|
88
|
-
var ChevronUp = createIcon("ChevronUp", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m4.5 15.75 7.5-7.5 7.5 7.5" }));
|
|
89
|
-
var ChevronDown = createIcon("ChevronDown", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m19.5 8.25-7.5 7.5-7.5-7.5" }));
|
|
90
|
-
var ChevronLeft = createIcon("ChevronLeft", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 19.5 8.25 12l7.5-7.5" }));
|
|
91
|
-
var ChevronRight = createIcon("ChevronRight", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m8.25 4.5 7.5 7.5-7.5 7.5" }));
|
|
92
|
-
var ChevronsLeft = createIcon("ChevronsLeft", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.75 19.5 11.25 12l7.5-7.5m-6 15L5.25 12l7.5-7.5" }));
|
|
93
|
-
var ChevronsRight = createIcon("ChevronsRight", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m5.25 4.5 7.5 7.5-7.5 7.5m6-15 7.5 7.5-7.5 7.5" }));
|
|
94
|
-
var CaretUp = createIcon("CaretUp", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 8l6 8H6z" }), { solid: true });
|
|
95
|
-
var CaretDown = createIcon("CaretDown", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 16 6 8h12z" }), { solid: true });
|
|
96
|
-
var CaretLeft = createIcon("CaretLeft", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 12l8-6v12z" }), { solid: true });
|
|
97
|
-
var CaretRight = createIcon("CaretRight", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 12 8 6v12z" }), { solid: true });
|
|
98
|
-
var ArrowUp = createIcon("ArrowUp", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18" }));
|
|
99
|
-
var ArrowDown = createIcon("ArrowDown", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" }));
|
|
100
|
-
var ArrowLeft = createIcon("ArrowLeft", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" }));
|
|
101
|
-
var ArrowRight = createIcon("ArrowRight", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3" }));
|
|
102
|
-
var Menu = createIcon("Menu", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" }));
|
|
103
|
-
var DotsHorizontal = createIcon("DotsHorizontal", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "12", r: "1.6" }),
|
|
105
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
106
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "19", cy: "12", r: "1.6" })
|
|
107
|
-
] }), { solid: true });
|
|
108
|
-
var DotsVertical = createIcon("DotsVertical", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
109
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "5", r: "1.6" }),
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "1.6" }),
|
|
111
|
-
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "19", r: "1.6" })
|
|
112
|
-
] }), { solid: true });
|
|
113
|
-
var ExternalLink = createIcon("ExternalLink", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25" }));
|
|
114
|
-
var X = createIcon("X", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 18 18 6M6 6l12 12" }));
|
|
115
|
-
var XCircle = createIcon("XCircle", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }));
|
|
116
|
-
var Plus = createIcon("Plus", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 4.5v15m7.5-7.5h-15" }));
|
|
117
|
-
var PlusCircle = createIcon("PlusCircle", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }));
|
|
118
|
-
var Minus = createIcon("Minus", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.5 12h-15" }));
|
|
119
|
-
var MinusCircle = createIcon("MinusCircle", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 12H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }));
|
|
120
|
-
var Check = createIcon("Check", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.5 12.75l6 6 9-13.5" }));
|
|
121
|
-
var CheckCircle = createIcon("CheckCircle", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }));
|
|
122
|
-
var Search = createIcon("Search", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" }));
|
|
123
|
-
var Edit = createIcon("Edit", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10" }));
|
|
124
|
-
var Trash = createIcon("Trash", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" }));
|
|
125
|
-
var Copy = createIcon("Copy", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184" }));
|
|
126
|
-
var Clipboard = createIcon("Clipboard", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25Z" }));
|
|
127
|
-
var Download = createIcon("Download", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" }));
|
|
128
|
-
var Upload = createIcon("Upload", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }));
|
|
129
|
-
var Save = createIcon("Save", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v12A2.25 2.25 0 0 0 6 20.25h12A2.25 2.25 0 0 0 20.25 18V8.31a2.25 2.25 0 0 0-.659-1.591l-2.872-2.872A2.25 2.25 0 0 0 15.129 3.75H15m-7.5 0v3.375c0 .621.504 1.125 1.125 1.125h5.25c.621 0 1.125-.504 1.125-1.125V3.75m-7.5 0H15m-3 11.25a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" }));
|
|
130
|
-
var Filter = createIcon("Filter", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z" }));
|
|
131
|
-
var Sort = createIcon("Sort", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5" }));
|
|
132
|
-
var Refresh = createIcon("Refresh", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" }));
|
|
133
|
-
var Share = createIcon("Share", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z" }));
|
|
134
|
-
var Print = createIcon("Print", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.72 13.829c-.24.03-.48.062-.72.096m.72-.096a42.415 42.415 0 0 1 10.56 0m-10.56 0L6.34 18m10.94-4.171c.24.03.48.062.72.096m-.72-.096L17.66 18m0 0 .229 2.523a1.125 1.125 0 0 1-1.12 1.227H7.231c-.662 0-1.18-.568-1.12-1.227L6.34 18m11.318 0h1.091A2.25 2.25 0 0 0 21 15.75V9.456c0-1.081-.768-2.015-1.837-2.175a48.055 48.055 0 0 0-1.913-.247M6.34 18H5.25A2.25 2.25 0 0 1 3 15.75V9.456c0-1.081.768-2.015 1.837-2.175a48.041 48.041 0 0 1 1.913-.247m10.5 0a48.536 48.536 0 0 0-10.5 0m10.5 0V3.375c0-.621-.504-1.125-1.125-1.125h-8.25c-.621 0-1.125.504-1.125 1.125v3.659M18 10.5h.008v.008H18V10.5Z" }));
|
|
135
|
-
var Settings = createIcon("Settings", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.397-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" }),
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" })
|
|
138
|
-
] }));
|
|
139
|
-
var Sliders = createIcon("Sliders", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75" }));
|
|
140
|
-
var Maximize = createIcon("Maximize", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15" }));
|
|
141
|
-
var Minimize = createIcon("Minimize", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25" }));
|
|
142
|
-
var Info = createIcon("Info", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z" }));
|
|
143
|
-
var Warning = createIcon("Warning", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008Z" }));
|
|
144
|
-
var Error2 = createIcon("Error", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" }));
|
|
145
|
-
var Question = createIcon("Question", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" }));
|
|
146
|
-
var Ban = createIcon("Ban", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636" }));
|
|
147
|
-
var Bell = createIcon("Bell", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" }));
|
|
148
|
-
var Play = createIcon("Play", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 0 1 0 1.971l-11.54 6.347a1.125 1.125 0 0 1-1.667-.985V5.653Z" }));
|
|
149
|
-
var Pause = createIcon("Pause", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 5.25v13.5m-7.5-13.5v13.5" }));
|
|
150
|
-
var Stop = createIcon("Stop", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.25 7.5A2.25 2.25 0 0 1 7.5 5.25h9a2.25 2.25 0 0 1 2.25 2.25v9a2.25 2.25 0 0 1-2.25 2.25h-9a2.25 2.25 0 0 1-2.25-2.25v-9Z" }));
|
|
151
|
-
var VolumeUp = createIcon("VolumeUp", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z" }));
|
|
152
|
-
var VolumeOff = createIcon("VolumeOff", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75Z" }));
|
|
153
|
-
var Image = createIcon("Image", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" }));
|
|
154
|
-
var Video = createIcon("Video", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z" }));
|
|
155
|
-
var Camera = createIcon("Camera", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
156
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.827 6.175A2.31 2.31 0 0 1 5.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 0 0-1.134-.175 2.31 2.31 0 0 1-1.64-1.055l-.822-1.316a2.192 2.192 0 0 0-1.736-1.039 48.774 48.774 0 0 0-5.232 0 2.192 2.192 0 0 0-1.736 1.039l-.821 1.316Z" }),
|
|
157
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.5 12.75a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM18.75 10.5h.008v.008h-.008V10.5Z" })
|
|
158
|
-
] }));
|
|
159
|
-
var Microphone = createIcon("Microphone", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z" }));
|
|
160
|
-
var Mail = createIcon("Mail", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" }));
|
|
161
|
-
var Chat = createIcon("Chat", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.019Z" }));
|
|
162
|
-
var Phone = createIcon("Phone", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z" }));
|
|
163
|
-
var Send = createIcon("Send", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5" }));
|
|
164
|
-
var User = createIcon("User", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" }));
|
|
165
|
-
var Users = createIcon("Users", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z" }));
|
|
166
|
-
var Home = createIcon("Home", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" }));
|
|
167
|
-
var Globe = createIcon("Globe", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" }));
|
|
168
|
-
var MapPin = createIcon("MapPin", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
169
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" }),
|
|
170
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z" })
|
|
171
|
-
] }));
|
|
172
|
-
var Calendar = createIcon("Calendar", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5" }));
|
|
173
|
-
var Clock = createIcon("Clock", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }));
|
|
174
|
-
var Document = createIcon("Document", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" }));
|
|
175
|
-
var File = createIcon("File", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" }));
|
|
176
|
-
var Folder = createIcon("Folder", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" }));
|
|
177
|
-
var Database = createIcon("Database", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" }));
|
|
178
|
-
var Grid = createIcon("Grid", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z" }));
|
|
179
|
-
var List = createIcon("List", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" }));
|
|
180
|
-
var Table = createIcon("Table", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" }));
|
|
181
|
-
var ChartBar = createIcon("ChartBar", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" }));
|
|
182
|
-
var PieChart = createIcon("PieChart", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
183
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z" }),
|
|
184
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z" })
|
|
185
|
-
] }));
|
|
186
|
-
var TrendingUp = createIcon("TrendingUp", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941" }));
|
|
187
|
-
var TrendingDown = createIcon("TrendingDown", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181" }));
|
|
188
|
-
var Calculator = createIcon("Calculator", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z" }));
|
|
189
|
-
var Lock = createIcon("Lock", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" }));
|
|
190
|
-
var Unlock = createIcon("Unlock", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.5 10.5V6.75a4.5 4.5 0 1 1 9 0v3.75M3.75 21.75h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H3.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" }));
|
|
191
|
-
var Key = createIcon("Key", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z" }));
|
|
192
|
-
var Shield = createIcon("Shield", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v3.75m0-10.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75h-.152c-3.196 0-6.1-1.249-8.25-3.286Zm0 13.036h.008v.008H12v-.008Z" }));
|
|
193
|
-
var ShieldCheck = createIcon("ShieldCheck", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" }));
|
|
194
|
-
var Star = createIcon("Star", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" }));
|
|
195
|
-
var StarFilled = createIcon("StarFilled", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.005Z" }), { solid: true });
|
|
196
|
-
var Heart = createIcon("Heart", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z" }));
|
|
197
|
-
var Bookmark = createIcon("Bookmark", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z" }));
|
|
198
|
-
var Tag = createIcon("Tag", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
199
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.568 3H5.25A2.25 2.25 0 0 0 3 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 0 0 5.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 0 0 9.568 3Z" }),
|
|
200
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 6h.008v.008H6V6Z" })
|
|
201
|
-
] }));
|
|
202
|
-
var Link = createIcon("Link", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244" }));
|
|
203
|
-
var Eye = createIcon("Eye", /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
204
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" }),
|
|
205
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" })
|
|
206
|
-
] }));
|
|
207
|
-
var EyeSlash = createIcon("EyeSlash", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" }));
|
|
208
|
-
var Bolt = createIcon("Bolt", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z" }));
|
|
209
|
-
var Sparkles = createIcon("Sparkles", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456Z" }));
|
|
210
|
-
var Sun = createIcon("Sun", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" }));
|
|
211
|
-
var Moon = createIcon("Moon", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" }));
|
|
212
|
-
var Spinner = createIcon("Spinner", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" }));
|
|
213
|
-
var Login = createIcon("Login", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9" }));
|
|
214
|
-
var Logout = createIcon("Logout", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75" }));
|
|
215
|
-
var Power = createIcon("Power", /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.636 5.636a9 9 0 1 0 12.728 0M12 3v9" }));
|
|
216
|
-
var Icon = {
|
|
217
|
-
ChevronUp,
|
|
218
|
-
ChevronDown,
|
|
219
|
-
ChevronLeft,
|
|
220
|
-
ChevronRight,
|
|
221
|
-
ChevronsLeft,
|
|
222
|
-
ChevronsRight,
|
|
223
|
-
CaretUp,
|
|
224
|
-
CaretDown,
|
|
225
|
-
CaretLeft,
|
|
226
|
-
CaretRight,
|
|
227
|
-
ArrowUp,
|
|
228
|
-
ArrowDown,
|
|
229
|
-
ArrowLeft,
|
|
230
|
-
ArrowRight,
|
|
231
|
-
Menu,
|
|
232
|
-
DotsHorizontal,
|
|
233
|
-
DotsVertical,
|
|
234
|
-
ExternalLink,
|
|
235
|
-
X,
|
|
236
|
-
XCircle,
|
|
237
|
-
Plus,
|
|
238
|
-
PlusCircle,
|
|
239
|
-
Minus,
|
|
240
|
-
MinusCircle,
|
|
241
|
-
Check,
|
|
242
|
-
CheckCircle,
|
|
243
|
-
Search,
|
|
244
|
-
Edit,
|
|
245
|
-
Trash,
|
|
246
|
-
Copy,
|
|
247
|
-
Clipboard,
|
|
248
|
-
Download,
|
|
249
|
-
Upload,
|
|
250
|
-
Save,
|
|
251
|
-
Filter,
|
|
252
|
-
Sort,
|
|
253
|
-
Refresh,
|
|
254
|
-
Share,
|
|
255
|
-
Print,
|
|
256
|
-
Settings,
|
|
257
|
-
Sliders,
|
|
258
|
-
Maximize,
|
|
259
|
-
Minimize,
|
|
260
|
-
Info,
|
|
261
|
-
Warning,
|
|
262
|
-
Error: Error2,
|
|
263
|
-
Question,
|
|
264
|
-
Ban,
|
|
265
|
-
Bell,
|
|
266
|
-
Play,
|
|
267
|
-
Pause,
|
|
268
|
-
Stop,
|
|
269
|
-
VolumeUp,
|
|
270
|
-
VolumeOff,
|
|
271
|
-
Image,
|
|
272
|
-
Video,
|
|
273
|
-
Camera,
|
|
274
|
-
Microphone,
|
|
275
|
-
Mail,
|
|
276
|
-
Chat,
|
|
277
|
-
Phone,
|
|
278
|
-
Send,
|
|
279
|
-
User,
|
|
280
|
-
Users,
|
|
281
|
-
Home,
|
|
282
|
-
Globe,
|
|
283
|
-
MapPin,
|
|
284
|
-
Calendar,
|
|
285
|
-
Clock,
|
|
286
|
-
Document,
|
|
287
|
-
File,
|
|
288
|
-
Folder,
|
|
289
|
-
Database,
|
|
290
|
-
Grid,
|
|
291
|
-
List,
|
|
292
|
-
Table,
|
|
293
|
-
ChartBar,
|
|
294
|
-
PieChart,
|
|
295
|
-
TrendingUp,
|
|
296
|
-
TrendingDown,
|
|
297
|
-
Calculator,
|
|
298
|
-
Lock,
|
|
299
|
-
Unlock,
|
|
300
|
-
Key,
|
|
301
|
-
Shield,
|
|
302
|
-
ShieldCheck,
|
|
303
|
-
Star,
|
|
304
|
-
StarFilled,
|
|
305
|
-
Heart,
|
|
306
|
-
Bookmark,
|
|
307
|
-
Tag,
|
|
308
|
-
Link,
|
|
309
|
-
Eye,
|
|
310
|
-
EyeSlash,
|
|
311
|
-
Bolt,
|
|
312
|
-
Sparkles,
|
|
313
|
-
Sun,
|
|
314
|
-
Moon,
|
|
315
|
-
Spinner,
|
|
316
|
-
Login,
|
|
317
|
-
Logout,
|
|
318
|
-
Power,
|
|
319
|
-
// ── Back-compat aliases (legacy names) ──
|
|
320
|
-
XClose: X,
|
|
321
|
-
Checked: Check,
|
|
322
|
-
Cog: Settings,
|
|
323
|
-
Tweak: Sliders,
|
|
324
|
-
Expand: Maximize,
|
|
325
|
-
Collapse: Minimize,
|
|
326
|
-
ShowMore: DotsVertical,
|
|
327
|
-
Delete: Trash,
|
|
328
|
-
Bookmarks: Bookmark,
|
|
329
|
-
CircleStack: Database,
|
|
330
|
-
Data: Database,
|
|
331
|
-
DoubleChevronRight: ChevronsRight,
|
|
332
|
-
Loading: Spinner,
|
|
333
|
-
PowerOff: Power
|
|
334
|
-
};
|
|
335
|
-
var icons_default = Icon;
|
|
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
|
+
}
|
|
336
69
|
function Portal({ children, target }) {
|
|
337
|
-
const [resolved, setResolved] =
|
|
338
|
-
|
|
70
|
+
const [resolved, setResolved] = React28.useState(null);
|
|
71
|
+
React28.useEffect(() => {
|
|
339
72
|
if (target === null) {
|
|
340
73
|
setResolved(null);
|
|
341
74
|
return;
|
|
@@ -418,7 +151,7 @@ function Box({
|
|
|
418
151
|
Element,
|
|
419
152
|
{
|
|
420
153
|
onClick,
|
|
421
|
-
className:
|
|
154
|
+
className: cx(
|
|
422
155
|
padding(p, "p"),
|
|
423
156
|
padding(px2, "px"),
|
|
424
157
|
padding(py, "py"),
|
|
@@ -438,7 +171,7 @@ function Box({
|
|
|
438
171
|
radius ? RADIUS_MAP[radius] : "",
|
|
439
172
|
SHADOW_MAP[shadow],
|
|
440
173
|
className
|
|
441
|
-
|
|
174
|
+
),
|
|
442
175
|
style: {
|
|
443
176
|
width: typeof width === "number" ? `${width}px` : width,
|
|
444
177
|
height: typeof height === "number" ? `${height}px` : height,
|
|
@@ -497,7 +230,7 @@ function Flex({
|
|
|
497
230
|
Box,
|
|
498
231
|
{
|
|
499
232
|
...boxProps,
|
|
500
|
-
className:
|
|
233
|
+
className: cx(
|
|
501
234
|
inline ? "inline-flex" : "flex",
|
|
502
235
|
DIRECTION_CLASS[direction],
|
|
503
236
|
align ? ALIGN_CLASS[align] : "",
|
|
@@ -505,7 +238,7 @@ function Flex({
|
|
|
505
238
|
wrap ? WRAP_CLASS[wrap] : "",
|
|
506
239
|
gap ? GAP_MAP[gap] : "",
|
|
507
240
|
className
|
|
508
|
-
|
|
241
|
+
)
|
|
509
242
|
}
|
|
510
243
|
);
|
|
511
244
|
}
|
|
@@ -552,7 +285,7 @@ var JUSTIFY_CLASS2 = {
|
|
|
552
285
|
end: "justify-items-end",
|
|
553
286
|
stretch: "justify-items-stretch"
|
|
554
287
|
};
|
|
555
|
-
function
|
|
288
|
+
function Grid({
|
|
556
289
|
cols,
|
|
557
290
|
rows,
|
|
558
291
|
gap,
|
|
@@ -572,7 +305,7 @@ function Grid2({
|
|
|
572
305
|
Box,
|
|
573
306
|
{
|
|
574
307
|
...boxProps,
|
|
575
|
-
className:
|
|
308
|
+
className: cx(
|
|
576
309
|
"grid",
|
|
577
310
|
colClass,
|
|
578
311
|
rowClass,
|
|
@@ -582,7 +315,7 @@ function Grid2({
|
|
|
582
315
|
align ? ALIGN_CLASS2[align] : "",
|
|
583
316
|
justify ? JUSTIFY_CLASS2[justify] : "",
|
|
584
317
|
className
|
|
585
|
-
|
|
318
|
+
),
|
|
586
319
|
style: {
|
|
587
320
|
gridTemplateColumns: inlineCols,
|
|
588
321
|
gridTemplateRows: inlineRows,
|
|
@@ -742,7 +475,7 @@ function Typography({
|
|
|
742
475
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
743
476
|
Element,
|
|
744
477
|
{
|
|
745
|
-
className:
|
|
478
|
+
className: cx(
|
|
746
479
|
VARIANT_CLASS[variant],
|
|
747
480
|
COLOR_CLASS[color],
|
|
748
481
|
weight ? WEIGHT_CLASS[weight] : "",
|
|
@@ -750,7 +483,7 @@ function Typography({
|
|
|
750
483
|
truncate ? "truncate" : "",
|
|
751
484
|
muted ? "opacity-60" : "",
|
|
752
485
|
className
|
|
753
|
-
|
|
486
|
+
),
|
|
754
487
|
style,
|
|
755
488
|
children
|
|
756
489
|
}
|
|
@@ -769,7 +502,7 @@ function IconButton({
|
|
|
769
502
|
className = "",
|
|
770
503
|
style
|
|
771
504
|
}) {
|
|
772
|
-
const colorScheme =
|
|
505
|
+
const colorScheme = React28.useMemo(() => {
|
|
773
506
|
if (type === "primary") {
|
|
774
507
|
return "bg-accent text-accent-fg hover:bg-accent-hover";
|
|
775
508
|
}
|
|
@@ -859,7 +592,7 @@ var SIZE_CLASSES = {
|
|
|
859
592
|
md: "h-9 px-4 text-sm gap-1.5 rounded-lg",
|
|
860
593
|
lg: "h-11 px-5 text-sm gap-2 rounded-xl"
|
|
861
594
|
};
|
|
862
|
-
var Button =
|
|
595
|
+
var Button = React28__default.default.forwardRef(function Button2({
|
|
863
596
|
content,
|
|
864
597
|
variant = "primary",
|
|
865
598
|
size = "md",
|
|
@@ -883,14 +616,14 @@ var Button = React29__default.default.forwardRef(function Button2({
|
|
|
883
616
|
disabled: disabled || loading,
|
|
884
617
|
type: buttonType,
|
|
885
618
|
style,
|
|
886
|
-
className:
|
|
619
|
+
className: cx(
|
|
887
620
|
"inline-flex items-center justify-center font-medium",
|
|
888
621
|
"outline-none transition-colors duration-150 select-none",
|
|
889
622
|
"whitespace-nowrap",
|
|
890
623
|
SIZE_CLASSES[size],
|
|
891
624
|
VARIANT_CLASSES[variant],
|
|
892
625
|
className
|
|
893
|
-
|
|
626
|
+
),
|
|
894
627
|
children: [
|
|
895
628
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
896
629
|
"svg",
|
|
@@ -967,7 +700,7 @@ function MenuButton({
|
|
|
967
700
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
968
701
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
969
702
|
].join(" "),
|
|
970
|
-
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
703
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React28__default.default.Fragment, { children: [
|
|
971
704
|
item.separatorBefore && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { className: "my-1 h-px bg-border" }),
|
|
972
705
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
973
706
|
DropdownMenu__namespace.Item,
|
|
@@ -1180,7 +913,7 @@ function Tooltip({
|
|
|
1180
913
|
{
|
|
1181
914
|
side: placement,
|
|
1182
915
|
sideOffset,
|
|
1183
|
-
className:
|
|
916
|
+
className: cx(
|
|
1184
917
|
// Layout + typography
|
|
1185
918
|
"pointer-events-none z-[500000] max-w-[220px] px-2.5 py-1.5",
|
|
1186
919
|
// Inverted surface: dark on light, light on dark — both readable
|
|
@@ -1193,7 +926,7 @@ function Tooltip({
|
|
|
1193
926
|
// In animation — direction-aware
|
|
1194
927
|
ANIMATION[placement],
|
|
1195
928
|
className
|
|
1196
|
-
|
|
929
|
+
),
|
|
1197
930
|
children: [
|
|
1198
931
|
title,
|
|
1199
932
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1210,9 +943,9 @@ function Tooltip({
|
|
|
1210
943
|
] }) });
|
|
1211
944
|
}
|
|
1212
945
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
1213
|
-
var TabsContext =
|
|
946
|
+
var TabsContext = React28.createContext(null);
|
|
1214
947
|
function useTabsContext() {
|
|
1215
|
-
const ctx =
|
|
948
|
+
const ctx = React28.useContext(TabsContext);
|
|
1216
949
|
if (!ctx) throw new Error("Tabs.List / Tabs.Trigger / Tabs.Panel must be rendered inside <Tabs>.");
|
|
1217
950
|
return ctx;
|
|
1218
951
|
}
|
|
@@ -1234,37 +967,37 @@ function Tabs({
|
|
|
1234
967
|
children
|
|
1235
968
|
}) {
|
|
1236
969
|
const isControlled = value !== void 0;
|
|
1237
|
-
const [internal, setInternal] =
|
|
970
|
+
const [internal, setInternal] = React28.useState(defaultValue);
|
|
1238
971
|
const current = isControlled ? value : internal;
|
|
1239
972
|
const reduced = !!framerMotion.useReducedMotion();
|
|
1240
|
-
const indicatorId =
|
|
1241
|
-
const select =
|
|
973
|
+
const indicatorId = React28.useId();
|
|
974
|
+
const select = React28.useCallback((next) => {
|
|
1242
975
|
if (!isControlled) setInternal(next);
|
|
1243
976
|
onValueChange?.(next);
|
|
1244
977
|
}, [isControlled, onValueChange]);
|
|
1245
|
-
const registry =
|
|
1246
|
-
const orderRef =
|
|
1247
|
-
const [, bump] =
|
|
1248
|
-
const registerTab =
|
|
978
|
+
const registry = React28.useRef(/* @__PURE__ */ new Map());
|
|
979
|
+
const orderRef = React28.useRef(0);
|
|
980
|
+
const [, bump] = React28.useState(0);
|
|
981
|
+
const registerTab = React28.useCallback((val, meta) => {
|
|
1249
982
|
const existing = registry.current.get(val);
|
|
1250
983
|
registry.current.set(val, { ...meta, order: existing?.order ?? orderRef.current++ });
|
|
1251
984
|
if (!existing) bump((v) => v + 1);
|
|
1252
985
|
}, []);
|
|
1253
|
-
const unregisterTab =
|
|
986
|
+
const unregisterTab = React28.useCallback((val) => {
|
|
1254
987
|
if (registry.current.delete(val)) bump((v) => v + 1);
|
|
1255
988
|
}, []);
|
|
1256
|
-
const getTabs =
|
|
989
|
+
const getTabs = React28.useCallback(() => [...registry.current.entries()].sort((a, b) => a[1].order - b[1].order).map(([val, m]) => ({ value: val, label: m.label, icon: m.icon, disabled: m.disabled })), []);
|
|
1257
990
|
return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { value: current, variant, size, orientation, indicatorId, reduced, select, registerTab, unregisterTab, getTabs }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1258
991
|
TabsPrimitive__namespace.Root,
|
|
1259
992
|
{
|
|
1260
993
|
value: current,
|
|
1261
994
|
onValueChange: select,
|
|
1262
995
|
orientation,
|
|
1263
|
-
className:
|
|
996
|
+
className: cx(
|
|
1264
997
|
"flex min-w-0",
|
|
1265
998
|
orientation === "vertical" ? "flex-row gap-4" : "flex-col gap-3",
|
|
1266
999
|
className
|
|
1267
|
-
|
|
1000
|
+
),
|
|
1268
1001
|
style,
|
|
1269
1002
|
children
|
|
1270
1003
|
}
|
|
@@ -1273,10 +1006,10 @@ function Tabs({
|
|
|
1273
1006
|
function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
1274
1007
|
const { variant, orientation, reduced, value } = useTabsContext();
|
|
1275
1008
|
const horizontal = orientation === "horizontal";
|
|
1276
|
-
const scrollRef =
|
|
1277
|
-
const [edges, setEdges] =
|
|
1009
|
+
const scrollRef = React28.useRef(null);
|
|
1010
|
+
const [edges, setEdges] = React28.useState({ start: false, end: false });
|
|
1278
1011
|
const scrollable = variant !== "segmented";
|
|
1279
|
-
|
|
1012
|
+
React28.useLayoutEffect(() => {
|
|
1280
1013
|
const el = scrollRef.current;
|
|
1281
1014
|
if (!el || !scrollable) return;
|
|
1282
1015
|
const update = () => {
|
|
@@ -1301,13 +1034,13 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
|
1301
1034
|
ro.disconnect();
|
|
1302
1035
|
};
|
|
1303
1036
|
}, [horizontal, scrollable, children]);
|
|
1304
|
-
const nudge =
|
|
1037
|
+
const nudge = React28.useCallback((dir) => {
|
|
1305
1038
|
const el = scrollRef.current;
|
|
1306
1039
|
if (!el) return;
|
|
1307
1040
|
const amount = (horizontal ? el.clientWidth : el.clientHeight) * 0.7 * dir;
|
|
1308
1041
|
el.scrollBy({ [horizontal ? "left" : "top"]: amount, behavior: reduced ? "auto" : "smooth" });
|
|
1309
1042
|
}, [horizontal, reduced]);
|
|
1310
|
-
|
|
1043
|
+
React28.useLayoutEffect(() => {
|
|
1311
1044
|
const el = scrollRef.current;
|
|
1312
1045
|
if (!el || !scrollable) return;
|
|
1313
1046
|
const active = el.querySelector("[role=tab][data-state=active]");
|
|
@@ -1332,14 +1065,14 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
|
1332
1065
|
})();
|
|
1333
1066
|
const scrollClass = scrollable ? horizontal ? "overflow-x-auto overflow-y-hidden hidden-scrollbar" : "overflow-y-auto overflow-x-hidden hidden-scrollbar" : "";
|
|
1334
1067
|
const overflowing = scrollable && (edges.start || edges.end);
|
|
1335
|
-
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: [
|
|
1336
1069
|
scrollable && edges.start && /* @__PURE__ */ jsxRuntime.jsx(Chevron2, { side: "start", orientation, onClick: () => nudge(-1) }),
|
|
1337
1070
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1338
1071
|
TabsPrimitive__namespace.List,
|
|
1339
1072
|
{
|
|
1340
1073
|
ref: scrollRef,
|
|
1341
1074
|
"aria-label": ariaLabel,
|
|
1342
|
-
className:
|
|
1075
|
+
className: cx(scrollClass, trackClass, "min-w-0 flex-1"),
|
|
1343
1076
|
style: maskStyle,
|
|
1344
1077
|
children
|
|
1345
1078
|
}
|
|
@@ -1365,9 +1098,9 @@ function Chevron2({ side, orientation, onClick }) {
|
|
|
1365
1098
|
function OverflowMenu() {
|
|
1366
1099
|
const { getTabs, value, select, orientation } = useTabsContext();
|
|
1367
1100
|
const horizontal = orientation === "horizontal";
|
|
1368
|
-
const [open, setOpen] =
|
|
1369
|
-
const wrapRef =
|
|
1370
|
-
const timer =
|
|
1101
|
+
const [open, setOpen] = React28.useState(false);
|
|
1102
|
+
const wrapRef = React28.useRef(null);
|
|
1103
|
+
const timer = React28.useRef(null);
|
|
1371
1104
|
const openNow = () => {
|
|
1372
1105
|
if (timer.current) clearTimeout(timer.current);
|
|
1373
1106
|
setOpen(true);
|
|
@@ -1375,7 +1108,7 @@ function OverflowMenu() {
|
|
|
1375
1108
|
const closeSoon = () => {
|
|
1376
1109
|
timer.current = setTimeout(() => setOpen(false), 160);
|
|
1377
1110
|
};
|
|
1378
|
-
|
|
1111
|
+
React28.useLayoutEffect(() => {
|
|
1379
1112
|
if (!open) return;
|
|
1380
1113
|
const onDoc = (e) => {
|
|
1381
1114
|
if (wrapRef.current && !wrapRef.current.contains(e.target)) setOpen(false);
|
|
@@ -1456,7 +1189,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
|
|
|
1456
1189
|
const isActive = active === value;
|
|
1457
1190
|
const horizontal = orientation === "horizontal";
|
|
1458
1191
|
const sz = SIZE[size];
|
|
1459
|
-
|
|
1192
|
+
React28.useLayoutEffect(() => {
|
|
1460
1193
|
registerTab(value, { label: children, icon, disabled });
|
|
1461
1194
|
return () => unregisterTab(value);
|
|
1462
1195
|
}, [value, children, icon, disabled, registerTab, unregisterTab]);
|
|
@@ -1468,7 +1201,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
|
|
|
1468
1201
|
{
|
|
1469
1202
|
value,
|
|
1470
1203
|
disabled,
|
|
1471
|
-
className:
|
|
1204
|
+
className: cx(base, sz.trigger, layoutCls, closeable ? "pr-8" : "", variantCls, className),
|
|
1472
1205
|
children: [
|
|
1473
1206
|
variant === "segmented" && isActive && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1474
1207
|
framerMotion.motion.span,
|
|
@@ -1537,7 +1270,7 @@ function TabsPanel({ value, keepMounted, className = "", style, children }) {
|
|
|
1537
1270
|
{
|
|
1538
1271
|
value,
|
|
1539
1272
|
forceMount: keepMounted || void 0,
|
|
1540
|
-
className:
|
|
1273
|
+
className: cx("min-w-0 flex-1 focus:outline-none data-[state=inactive]:hidden", className),
|
|
1541
1274
|
style,
|
|
1542
1275
|
children
|
|
1543
1276
|
}
|
|
@@ -1654,7 +1387,7 @@ function Tree({
|
|
|
1654
1387
|
item.key
|
|
1655
1388
|
)) });
|
|
1656
1389
|
}
|
|
1657
|
-
var AccordionCtx =
|
|
1390
|
+
var AccordionCtx = React28.createContext({ variant: "separated" });
|
|
1658
1391
|
function Accordion2({
|
|
1659
1392
|
children,
|
|
1660
1393
|
type = "single",
|
|
@@ -1667,10 +1400,10 @@ function Accordion2({
|
|
|
1667
1400
|
style
|
|
1668
1401
|
}) {
|
|
1669
1402
|
const common = {
|
|
1670
|
-
className:
|
|
1403
|
+
className: cx(
|
|
1671
1404
|
variant === "contained" ? "rounded-lg border border-border bg-surface overflow-hidden divide-y divide-border" : "flex flex-col gap-2",
|
|
1672
1405
|
className
|
|
1673
|
-
|
|
1406
|
+
),
|
|
1674
1407
|
style
|
|
1675
1408
|
};
|
|
1676
1409
|
const inner = /* @__PURE__ */ jsxRuntime.jsx(AccordionCtx.Provider, { value: { variant }, children });
|
|
@@ -1713,17 +1446,17 @@ var Chevron3 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
1713
1446
|
}
|
|
1714
1447
|
);
|
|
1715
1448
|
function AccordionItem({ value, title, icon, children, disabled, className = "" }) {
|
|
1716
|
-
const { variant } =
|
|
1449
|
+
const { variant } = React28.useContext(AccordionCtx);
|
|
1717
1450
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1718
1451
|
AccordionPrimitive__namespace.Item,
|
|
1719
1452
|
{
|
|
1720
1453
|
value,
|
|
1721
1454
|
disabled,
|
|
1722
|
-
className:
|
|
1455
|
+
className: cx(
|
|
1723
1456
|
variant === "separated" ? "rounded-lg border border-border bg-surface overflow-hidden" : "",
|
|
1724
1457
|
"data-[disabled]:opacity-60",
|
|
1725
1458
|
className
|
|
1726
|
-
|
|
1459
|
+
),
|
|
1727
1460
|
children: [
|
|
1728
1461
|
/* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "m-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1729
1462
|
AccordionPrimitive__namespace.Trigger,
|
|
@@ -1772,7 +1505,7 @@ function Breadcrumbs({
|
|
|
1772
1505
|
className = "",
|
|
1773
1506
|
style
|
|
1774
1507
|
}) {
|
|
1775
|
-
const [expanded, setExpanded] =
|
|
1508
|
+
const [expanded, setExpanded] = React28.useState(false);
|
|
1776
1509
|
const shouldCollapse = maxItems > 0 && items.length > maxItems && !expanded;
|
|
1777
1510
|
const visible = [];
|
|
1778
1511
|
if (shouldCollapse) {
|
|
@@ -1783,7 +1516,7 @@ function Breadcrumbs({
|
|
|
1783
1516
|
} else {
|
|
1784
1517
|
items.forEach((item, index) => visible.push({ item, index }));
|
|
1785
1518
|
}
|
|
1786
|
-
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) => {
|
|
1787
1520
|
const isLast = i === visible.length - 1;
|
|
1788
1521
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
1789
1522
|
entry === "ellipsis" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1862,12 +1595,12 @@ function Badge({
|
|
|
1862
1595
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1863
1596
|
"span",
|
|
1864
1597
|
{
|
|
1865
|
-
className:
|
|
1598
|
+
className: cx(
|
|
1866
1599
|
"inline-flex items-center font-medium select-none whitespace-nowrap leading-none",
|
|
1867
1600
|
SIZE2[size],
|
|
1868
1601
|
TONE[tone][variant],
|
|
1869
1602
|
className
|
|
1870
|
-
|
|
1603
|
+
),
|
|
1871
1604
|
style,
|
|
1872
1605
|
children: [
|
|
1873
1606
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center", children: icon }),
|
|
@@ -1879,19 +1612,19 @@ function Badge({
|
|
|
1879
1612
|
const indicator = dot ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1880
1613
|
"span",
|
|
1881
1614
|
{
|
|
1882
|
-
className:
|
|
1615
|
+
className: cx("inline-block rounded-full", size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5", TONE[tone].dot, className),
|
|
1883
1616
|
style: children ? void 0 : style,
|
|
1884
1617
|
"aria-hidden": children ? true : void 0
|
|
1885
1618
|
}
|
|
1886
1619
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1887
1620
|
"span",
|
|
1888
1621
|
{
|
|
1889
|
-
className:
|
|
1622
|
+
className: cx(
|
|
1890
1623
|
"inline-flex items-center justify-center rounded-full font-semibold leading-none tabular-nums",
|
|
1891
1624
|
size === "sm" ? "h-4 min-w-4 px-1 text-[10px]" : "h-[18px] min-w-[18px] px-1.5 text-[11px]",
|
|
1892
1625
|
TONE[tone].solid,
|
|
1893
1626
|
className
|
|
1894
|
-
|
|
1627
|
+
),
|
|
1895
1628
|
style: children ? void 0 : style,
|
|
1896
1629
|
children: display2
|
|
1897
1630
|
}
|
|
@@ -1906,9 +1639,9 @@ var SIZES = {
|
|
|
1906
1639
|
sm: { box: "h-7 w-7 text-xs", center: 14, title: "text-xs", desc: "text-[11px]" },
|
|
1907
1640
|
md: { box: "h-9 w-9 text-sm", center: 18, title: "text-sm", desc: "text-xs" }
|
|
1908
1641
|
};
|
|
1909
|
-
var
|
|
1642
|
+
var Check = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true", className: "h-1/2 w-1/2 animate-check-pop", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 6L9 17l-5-5" }) });
|
|
1910
1643
|
var Cross = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true", className: "h-1/2 w-1/2", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6 6 18M6 6l12 12" }) });
|
|
1911
|
-
var
|
|
1644
|
+
var Spinner = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", className: "h-1/2 w-1/2 animate-spin", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z" }) });
|
|
1912
1645
|
function Indicator({ state, index, step, sizeKey }) {
|
|
1913
1646
|
const reduced = framerMotion.useReducedMotion();
|
|
1914
1647
|
const s = SIZES[sizeKey];
|
|
@@ -1920,7 +1653,7 @@ function Indicator({ state, index, step, sizeKey }) {
|
|
|
1920
1653
|
error: "bg-status-error text-white",
|
|
1921
1654
|
pending: "border border-border bg-surface text-foreground-muted"
|
|
1922
1655
|
};
|
|
1923
|
-
const content = step.icon ?? (state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1656
|
+
const content = step.icon ?? (state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(Check, {}) : state === "error" ? /* @__PURE__ */ jsxRuntime.jsx(Cross, {}) : state === "loading" ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : index + 1);
|
|
1924
1657
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1925
1658
|
framerMotion.motion.span,
|
|
1926
1659
|
{
|
|
@@ -1956,8 +1689,8 @@ function Stepper({
|
|
|
1956
1689
|
className = ""
|
|
1957
1690
|
}) {
|
|
1958
1691
|
const reduced = framerMotion.useReducedMotion();
|
|
1959
|
-
const [forcedVertical, setForcedVertical] =
|
|
1960
|
-
|
|
1692
|
+
const [forcedVertical, setForcedVertical] = React28.useState(false);
|
|
1693
|
+
React28.useEffect(() => {
|
|
1961
1694
|
if (!responsive || orientation === "vertical") return;
|
|
1962
1695
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
1963
1696
|
const mq = window.matchMedia("(max-width: 767px)");
|
|
@@ -1977,7 +1710,7 @@ function Stepper({
|
|
|
1977
1710
|
const clickable = (i) => Boolean(onStepClick) && i <= current;
|
|
1978
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;
|
|
1979
1712
|
if (vertical) {
|
|
1980
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1713
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex flex-col", className), children: steps.map((step, i) => {
|
|
1981
1714
|
const state = stateOf(i);
|
|
1982
1715
|
const last = i === steps.length - 1;
|
|
1983
1716
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex gap-3", children: [
|
|
@@ -1989,7 +1722,7 @@ function Stepper({
|
|
|
1989
1722
|
] }, step.key);
|
|
1990
1723
|
}) });
|
|
1991
1724
|
}
|
|
1992
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1725
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex items-start", className), children: steps.map((step, i) => {
|
|
1993
1726
|
const state = stateOf(i);
|
|
1994
1727
|
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "relative flex flex-1 flex-col items-center", children: [
|
|
1995
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(
|
|
@@ -2009,7 +1742,7 @@ function Stepper({
|
|
|
2009
1742
|
] }, step.key);
|
|
2010
1743
|
}) });
|
|
2011
1744
|
}
|
|
2012
|
-
var
|
|
1745
|
+
var Check2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true", className: "h-3 w-3", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 6L9 17l-5-5" }) });
|
|
2013
1746
|
var Cross2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, "aria-hidden": "true", className: "h-3 w-3", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6 6 18M6 6l12 12" }) });
|
|
2014
1747
|
var NODE = {
|
|
2015
1748
|
complete: "bg-accent text-accent-fg border-accent",
|
|
@@ -2023,7 +1756,7 @@ function Timeline({ events, current, className = "" }) {
|
|
|
2023
1756
|
if (current == null) return "upcoming";
|
|
2024
1757
|
return i < current ? "complete" : i === current ? "current" : "upcoming";
|
|
2025
1758
|
};
|
|
2026
|
-
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className:
|
|
1759
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cx("flex flex-col", className), children: events.map((event, i) => {
|
|
2027
1760
|
const status = statusOf(event, i);
|
|
2028
1761
|
const last = i === events.length - 1;
|
|
2029
1762
|
const railFilled = status === "complete";
|
|
@@ -2038,7 +1771,7 @@ function Timeline({ events, current, className = "" }) {
|
|
|
2038
1771
|
].join(" "),
|
|
2039
1772
|
children: [
|
|
2040
1773
|
status === "current" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 animate-breathe rounded-full ring-2 ring-accent/40", "aria-hidden": "true" }),
|
|
2041
|
-
event.icon ?? (status === "complete" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1774
|
+
event.icon ?? (status === "complete" ? /* @__PURE__ */ jsxRuntime.jsx(Check2, {}) : status === "error" ? /* @__PURE__ */ jsxRuntime.jsx(Cross2, {}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${status === "current" ? "bg-accent" : "bg-border"}` }))
|
|
2042
1775
|
]
|
|
2043
1776
|
}
|
|
2044
1777
|
),
|
|
@@ -2066,22 +1799,22 @@ function Kbd({
|
|
|
2066
1799
|
style
|
|
2067
1800
|
}) {
|
|
2068
1801
|
if (keys && keys.length > 0) {
|
|
2069
|
-
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: [
|
|
2070
1803
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
2071
1804
|
/* @__PURE__ */ jsxRuntime.jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
2072
1805
|
] }, `${k}-${i}`)) });
|
|
2073
1806
|
}
|
|
2074
|
-
return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className:
|
|
1807
|
+
return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: cx(cap, SIZE3[size], className), style, children });
|
|
2075
1808
|
}
|
|
2076
1809
|
var PAD = { none: "", sm: "p-3", md: "p-5", lg: "p-6" };
|
|
2077
1810
|
function Card({ children, interactive, onClick, padding: padding2 = "none", flush, className = "", style }) {
|
|
2078
|
-
const base =
|
|
1811
|
+
const base = cx(
|
|
2079
1812
|
"rounded-xl overflow-hidden bg-surface",
|
|
2080
1813
|
flush ? "" : "border border-border shadow-sm",
|
|
2081
1814
|
PAD[padding2],
|
|
2082
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" : "",
|
|
2083
1816
|
className
|
|
2084
|
-
|
|
1817
|
+
);
|
|
2085
1818
|
if (interactive && onClick) {
|
|
2086
1819
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2087
1820
|
"div",
|
|
@@ -2104,10 +1837,10 @@ function Card({ children, interactive, onClick, padding: padding2 = "none", flus
|
|
|
2104
1837
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick, className: base, style, children });
|
|
2105
1838
|
}
|
|
2106
1839
|
function CardMedia({ children, className = "" }) {
|
|
2107
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1840
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("[&>img]:block [&>img]:w-full [&>img]:object-cover", className), children });
|
|
2108
1841
|
}
|
|
2109
1842
|
function CardHeader({ title, subtitle, action, avatar, children, className = "" }) {
|
|
2110
|
-
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: [
|
|
2111
1844
|
avatar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: avatar }),
|
|
2112
1845
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2113
1846
|
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-foreground leading-snug", children: title }),
|
|
@@ -2118,10 +1851,10 @@ function CardHeader({ title, subtitle, action, avatar, children, className = ""
|
|
|
2118
1851
|
] });
|
|
2119
1852
|
}
|
|
2120
1853
|
function CardBody({ children, className = "" }) {
|
|
2121
|
-
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 });
|
|
2122
1855
|
}
|
|
2123
1856
|
function CardFooter({ children, noDivider, className = "" }) {
|
|
2124
|
-
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 });
|
|
2125
1858
|
}
|
|
2126
1859
|
Card.Media = CardMedia;
|
|
2127
1860
|
Card.Header = CardHeader;
|
|
@@ -2157,13 +1890,13 @@ function FlatCarousel({
|
|
|
2157
1890
|
className = "",
|
|
2158
1891
|
style
|
|
2159
1892
|
}) {
|
|
2160
|
-
const scrollerRef =
|
|
2161
|
-
const slides =
|
|
2162
|
-
const [active, setActive] =
|
|
2163
|
-
const [atStart, setAtStart] =
|
|
2164
|
-
const [atEnd, setAtEnd] =
|
|
1893
|
+
const scrollerRef = React28.useRef(null);
|
|
1894
|
+
const slides = React28__default.default.Children.toArray(children);
|
|
1895
|
+
const [active, setActive] = React28.useState(0);
|
|
1896
|
+
const [atStart, setAtStart] = React28.useState(true);
|
|
1897
|
+
const [atEnd, setAtEnd] = React28.useState(false);
|
|
2165
1898
|
const width = typeof itemWidth === "number" ? `${itemWidth}px` : itemWidth;
|
|
2166
|
-
const update =
|
|
1899
|
+
const update = React28.useCallback(() => {
|
|
2167
1900
|
const el = scrollerRef.current;
|
|
2168
1901
|
if (!el) return;
|
|
2169
1902
|
setAtStart(el.scrollLeft <= 1);
|
|
@@ -2172,7 +1905,7 @@ function FlatCarousel({
|
|
|
2172
1905
|
const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
|
|
2173
1906
|
setActive(Math.round(el.scrollLeft / slideW));
|
|
2174
1907
|
}, [gap]);
|
|
2175
|
-
|
|
1908
|
+
React28.useEffect(() => {
|
|
2176
1909
|
update();
|
|
2177
1910
|
const el = scrollerRef.current;
|
|
2178
1911
|
if (!el) return;
|
|
@@ -2197,7 +1930,7 @@ function FlatCarousel({
|
|
|
2197
1930
|
const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
|
|
2198
1931
|
el.scrollTo({ left: i * slideW, behavior: "smooth" });
|
|
2199
1932
|
};
|
|
2200
|
-
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: [
|
|
2201
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" }) }),
|
|
2202
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)) }),
|
|
2203
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" }) }),
|
|
@@ -2213,9 +1946,9 @@ function RotatingCarousel({
|
|
|
2213
1946
|
className = "",
|
|
2214
1947
|
style
|
|
2215
1948
|
}) {
|
|
2216
|
-
const slides =
|
|
1949
|
+
const slides = React28__default.default.Children.toArray(children);
|
|
2217
1950
|
const count = slides.length;
|
|
2218
|
-
const [active, setActive] =
|
|
1951
|
+
const [active, setActive] = React28.useState(0);
|
|
2219
1952
|
const reduced = framerMotion.useReducedMotion();
|
|
2220
1953
|
const wrap = (n) => count > 0 ? (n % count + count) % count : 0;
|
|
2221
1954
|
const idx = wrap(active);
|
|
@@ -2240,7 +1973,7 @@ function RotatingCarousel({
|
|
|
2240
1973
|
{
|
|
2241
1974
|
"aria-label": ariaLabel,
|
|
2242
1975
|
"aria-roledescription": "carousel",
|
|
2243
|
-
className:
|
|
1976
|
+
className: cx("relative", className),
|
|
2244
1977
|
style,
|
|
2245
1978
|
onKeyDown,
|
|
2246
1979
|
children: [
|
|
@@ -2303,7 +2036,7 @@ function fieldShell({
|
|
|
2303
2036
|
sized = true
|
|
2304
2037
|
} = {}) {
|
|
2305
2038
|
const s = FIELD_SIZE[size];
|
|
2306
|
-
return
|
|
2039
|
+
return cx(
|
|
2307
2040
|
"w-full rounded-lg border bg-surface text-foreground",
|
|
2308
2041
|
"transition-[color,box-shadow,border-color] duration-150",
|
|
2309
2042
|
s.text,
|
|
@@ -2317,7 +2050,7 @@ function fieldShell({
|
|
|
2317
2050
|
hasError ? focusWithin ? FOCUS_WITHIN_ERROR : FOCUS_ELEMENT_ERROR : "",
|
|
2318
2051
|
// placeholder colour for native inputs
|
|
2319
2052
|
"placeholder:text-foreground-muted"
|
|
2320
|
-
|
|
2053
|
+
);
|
|
2321
2054
|
}
|
|
2322
2055
|
function FieldHelpIcon({ text }) {
|
|
2323
2056
|
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { title: text, placement: "top", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2350,14 +2083,14 @@ function FieldLabel({
|
|
|
2350
2083
|
"div",
|
|
2351
2084
|
{
|
|
2352
2085
|
style: { width: horizontal ? width : void 0, ...style },
|
|
2353
|
-
className:
|
|
2086
|
+
className: cx(
|
|
2354
2087
|
"flex items-center gap-1",
|
|
2355
2088
|
horizontal ? "flex-shrink-0 whitespace-nowrap" : "",
|
|
2356
2089
|
// Only the 'start' alignment needs the top nudge; 'center' relies
|
|
2357
2090
|
// on the row's items-center to line up with a short control.
|
|
2358
2091
|
horizontal && align === "start" ? "mt-2" : "",
|
|
2359
2092
|
className
|
|
2360
|
-
|
|
2093
|
+
),
|
|
2361
2094
|
children: [
|
|
2362
2095
|
label != null && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor, className: "text-sm font-medium text-foreground select-none", children: [
|
|
2363
2096
|
label,
|
|
@@ -2387,11 +2120,11 @@ function Field({
|
|
|
2387
2120
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2388
2121
|
"div",
|
|
2389
2122
|
{
|
|
2390
|
-
className:
|
|
2123
|
+
className: cx(
|
|
2391
2124
|
"flex",
|
|
2392
2125
|
horizontal ? `flex-row gap-3 ${labelAlign === "center" ? "items-center" : "items-start"}` : "flex-col gap-1.5",
|
|
2393
2126
|
className
|
|
2394
|
-
|
|
2127
|
+
),
|
|
2395
2128
|
children: [
|
|
2396
2129
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2397
2130
|
FieldLabel,
|
|
@@ -2418,7 +2151,7 @@ var toDate = (d) => d instanceof Date ? d : new Date(d);
|
|
|
2418
2151
|
var timeLabel = (d) => `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
2419
2152
|
var initials = (name) => (name ?? "").trim().split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || void 0;
|
|
2420
2153
|
var SendIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z" }) });
|
|
2421
|
-
var
|
|
2154
|
+
var ArrowDown = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12l7 7 7-7" }) });
|
|
2422
2155
|
function TypingDots() {
|
|
2423
2156
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center gap-1", "aria-hidden": "true", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1.5 w-1.5 animate-bounce rounded-full bg-foreground-muted", style: { animationDelay: `${i * 0.15}s` } }, i)) });
|
|
2424
2157
|
}
|
|
@@ -2430,12 +2163,12 @@ var SKELETON_ROWS = [
|
|
|
2430
2163
|
{ own: true, w: 90 }
|
|
2431
2164
|
];
|
|
2432
2165
|
function ChatSkeleton() {
|
|
2433
|
-
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: [
|
|
2434
2167
|
!r.own && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-6 w-6 flex-shrink-0 animate-pulse rounded-full bg-surface" }),
|
|
2435
2168
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-8 animate-pulse rounded-2xl bg-surface", style: { width: r.w } })
|
|
2436
2169
|
] }, i)) });
|
|
2437
2170
|
}
|
|
2438
|
-
function
|
|
2171
|
+
function Chat({
|
|
2439
2172
|
messages,
|
|
2440
2173
|
currentUserId,
|
|
2441
2174
|
onSend,
|
|
@@ -2453,13 +2186,13 @@ function Chat2({
|
|
|
2453
2186
|
className = "",
|
|
2454
2187
|
style
|
|
2455
2188
|
}) {
|
|
2456
|
-
const listRef =
|
|
2457
|
-
const atBottomRef =
|
|
2458
|
-
const [showJump, setShowJump] =
|
|
2459
|
-
const [draft, setDraft] =
|
|
2189
|
+
const listRef = React28.useRef(null);
|
|
2190
|
+
const atBottomRef = React28.useRef(true);
|
|
2191
|
+
const [showJump, setShowJump] = React28.useState(false);
|
|
2192
|
+
const [draft, setDraft] = React28.useState("");
|
|
2460
2193
|
const hasHeader = title != null || subtitle != null || avatar != null || headerActions != null;
|
|
2461
2194
|
const isTyping = typingNames.length > 0;
|
|
2462
|
-
const scrollToBottom =
|
|
2195
|
+
const scrollToBottom = React28.useCallback((smooth = true) => {
|
|
2463
2196
|
const el = listRef.current;
|
|
2464
2197
|
if (!el) return;
|
|
2465
2198
|
if (typeof el.scrollTo === "function") el.scrollTo({ top: el.scrollHeight, behavior: smooth ? "smooth" : "auto" });
|
|
@@ -2472,10 +2205,10 @@ function Chat2({
|
|
|
2472
2205
|
atBottomRef.current = near;
|
|
2473
2206
|
setShowJump(!near);
|
|
2474
2207
|
};
|
|
2475
|
-
|
|
2208
|
+
React28.useEffect(() => {
|
|
2476
2209
|
if (atBottomRef.current) scrollToBottom(messages.length > 0);
|
|
2477
2210
|
}, [messages.length, isTyping]);
|
|
2478
|
-
|
|
2211
|
+
React28.useEffect(() => {
|
|
2479
2212
|
scrollToBottom(false);
|
|
2480
2213
|
}, [scrollToBottom]);
|
|
2481
2214
|
const send = () => {
|
|
@@ -2493,7 +2226,7 @@ function Chat2({
|
|
|
2493
2226
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2494
2227
|
"div",
|
|
2495
2228
|
{
|
|
2496
|
-
className:
|
|
2229
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
2497
2230
|
style: { height, ...style },
|
|
2498
2231
|
children: [
|
|
2499
2232
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -2513,18 +2246,18 @@ function Chat2({
|
|
|
2513
2246
|
const firstOfGroup = !prev || prev.authorId !== m.authorId;
|
|
2514
2247
|
const lastOfGroup = !next || next.authorId !== m.authorId;
|
|
2515
2248
|
const ts = m.timestamp ? toDate(m.timestamp) : null;
|
|
2516
|
-
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: [
|
|
2517
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" }) }),
|
|
2518
2251
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["flex max-w-[78%] flex-col", own ? "items-end" : "items-start"].join(" "), children: [
|
|
2519
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 }),
|
|
2520
2253
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2521
2254
|
"div",
|
|
2522
2255
|
{
|
|
2523
|
-
className:
|
|
2256
|
+
className: cx(
|
|
2524
2257
|
"whitespace-pre-wrap break-words px-3 py-1.5 text-sm leading-snug",
|
|
2525
2258
|
own ? "rounded-2xl bg-accent text-accent-fg" : "rounded-2xl border border-border bg-surface text-foreground",
|
|
2526
2259
|
lastOfGroup ? own ? "rounded-br-md" : "rounded-bl-md" : ""
|
|
2527
|
-
|
|
2260
|
+
),
|
|
2528
2261
|
children: m.text
|
|
2529
2262
|
}
|
|
2530
2263
|
),
|
|
@@ -2553,7 +2286,7 @@ function Chat2({
|
|
|
2553
2286
|
onClick: () => scrollToBottom(true),
|
|
2554
2287
|
"aria-label": "Jump to latest",
|
|
2555
2288
|
className: "absolute bottom-3 left-1/2 flex h-8 w-8 -translate-x-1/2 items-center justify-center rounded-full border border-border bg-surface text-foreground-secondary shadow-md transition-colors hover:bg-surface-raised hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
2556
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2289
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowDown, {})
|
|
2557
2290
|
}
|
|
2558
2291
|
)
|
|
2559
2292
|
] }),
|
|
@@ -2596,8 +2329,8 @@ var TONE2 = {
|
|
|
2596
2329
|
bad: "text-status-error",
|
|
2597
2330
|
neutral: "text-foreground-muted"
|
|
2598
2331
|
};
|
|
2599
|
-
var
|
|
2600
|
-
var
|
|
2332
|
+
var ArrowUp = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.2, "aria-hidden": "true", className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19V5M5 12l7-7 7 7" }) });
|
|
2333
|
+
var ArrowDown2 = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.2, "aria-hidden": "true", className: "h-3.5 w-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12l7 7 7-7" }) });
|
|
2601
2334
|
function Statistic({
|
|
2602
2335
|
label,
|
|
2603
2336
|
value,
|
|
@@ -2617,7 +2350,7 @@ function Statistic({
|
|
|
2617
2350
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2618
2351
|
"div",
|
|
2619
2352
|
{
|
|
2620
|
-
className:
|
|
2353
|
+
className: cx("flex gap-3", align === "center" ? "flex-col items-center text-center" : "items-start", className),
|
|
2621
2354
|
style,
|
|
2622
2355
|
children: [
|
|
2623
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 }) }),
|
|
@@ -2629,7 +2362,7 @@ function Statistic({
|
|
|
2629
2362
|
suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-[0.5em] font-medium self-center", children: suffix })
|
|
2630
2363
|
] }),
|
|
2631
2364
|
delta && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `mt-1.5 flex items-center gap-1 text-sm font-medium ${align === "center" ? "justify-center" : ""} ${TONE2[deltaTone]}`, children: [
|
|
2632
|
-
dir === "up" ?
|
|
2365
|
+
dir === "up" ? ArrowUp : dir === "down" ? ArrowDown2 : null,
|
|
2633
2366
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: delta.value }),
|
|
2634
2367
|
delta.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted font-normal", children: delta.label })
|
|
2635
2368
|
] }),
|
|
@@ -2665,7 +2398,7 @@ function FAB({
|
|
|
2665
2398
|
className = "",
|
|
2666
2399
|
style
|
|
2667
2400
|
}) {
|
|
2668
|
-
const [open, setOpen] =
|
|
2401
|
+
const [open, setOpen] = React28.useState(false);
|
|
2669
2402
|
const reduced = framerMotion.useReducedMotion();
|
|
2670
2403
|
const hasDial = !!actions && actions.length > 0;
|
|
2671
2404
|
const bottom = position.startsWith("bottom");
|
|
@@ -2710,7 +2443,7 @@ function FAB({
|
|
|
2710
2443
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2711
2444
|
"div",
|
|
2712
2445
|
{
|
|
2713
|
-
className:
|
|
2446
|
+
className: cx(fixed ? "fixed" : "absolute", "z-40 flex flex-col", POS[position], className),
|
|
2714
2447
|
style,
|
|
2715
2448
|
children: [
|
|
2716
2449
|
bottom && dial,
|
|
@@ -2721,13 +2454,13 @@ function FAB({
|
|
|
2721
2454
|
"aria-label": label,
|
|
2722
2455
|
"aria-expanded": hasDial ? open : void 0,
|
|
2723
2456
|
onClick: (e) => hasDial ? setOpen((o) => !o) : onClick?.(e),
|
|
2724
|
-
className:
|
|
2457
|
+
className: cx(
|
|
2725
2458
|
"flex items-center justify-center rounded-full shadow-lg transition-[background-color,transform] duration-200",
|
|
2726
2459
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2",
|
|
2727
2460
|
SIZE4[size],
|
|
2728
2461
|
TONE3[tone],
|
|
2729
2462
|
hasDial && open ? "rotate-45" : ""
|
|
2730
|
-
|
|
2463
|
+
),
|
|
2731
2464
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-6 w-6 inline-flex items-center justify-center", children: icon })
|
|
2732
2465
|
}
|
|
2733
2466
|
),
|
|
@@ -2767,8 +2500,8 @@ function PopConfirm({
|
|
|
2767
2500
|
onOpenChange,
|
|
2768
2501
|
className = ""
|
|
2769
2502
|
}) {
|
|
2770
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2771
|
-
const [loading, setLoading] =
|
|
2503
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React28.useState(false);
|
|
2504
|
+
const [loading, setLoading] = React28.useState(false);
|
|
2772
2505
|
const isOpen = open ?? uncontrolledOpen;
|
|
2773
2506
|
const setOpen = (next) => {
|
|
2774
2507
|
onOpenChange?.(next);
|
|
@@ -2795,7 +2528,7 @@ function PopConfirm({
|
|
|
2795
2528
|
side,
|
|
2796
2529
|
sideOffset: 8,
|
|
2797
2530
|
collisionPadding: 12,
|
|
2798
|
-
className:
|
|
2531
|
+
className: cx("z-[400] focus:outline-none", className),
|
|
2799
2532
|
children: [
|
|
2800
2533
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2801
2534
|
framerMotion.motion.div,
|
|
@@ -2855,16 +2588,16 @@ function LogoutTimer({
|
|
|
2855
2588
|
logoutLabel = "Sign out now"
|
|
2856
2589
|
}) {
|
|
2857
2590
|
const reduced = framerMotion.useReducedMotion();
|
|
2858
|
-
const [warning, setWarning] =
|
|
2859
|
-
const [remaining, setRemaining] =
|
|
2860
|
-
const idleTimer =
|
|
2861
|
-
const tick =
|
|
2862
|
-
const deadline =
|
|
2863
|
-
const warningRef =
|
|
2864
|
-
const lastReset =
|
|
2865
|
-
const cbs =
|
|
2591
|
+
const [warning, setWarning] = React28.useState(false);
|
|
2592
|
+
const [remaining, setRemaining] = React28.useState(countdown);
|
|
2593
|
+
const idleTimer = React28.useRef(null);
|
|
2594
|
+
const tick = React28.useRef(null);
|
|
2595
|
+
const deadline = React28.useRef(0);
|
|
2596
|
+
const warningRef = React28.useRef(false);
|
|
2597
|
+
const lastReset = React28.useRef(0);
|
|
2598
|
+
const cbs = React28.useRef({ onLogout, onContinue, onWarning });
|
|
2866
2599
|
cbs.current = { onLogout, onContinue, onWarning };
|
|
2867
|
-
const clearTimers =
|
|
2600
|
+
const clearTimers = React28.useCallback(() => {
|
|
2868
2601
|
if (idleTimer.current) {
|
|
2869
2602
|
clearTimeout(idleTimer.current);
|
|
2870
2603
|
idleTimer.current = null;
|
|
@@ -2874,13 +2607,13 @@ function LogoutTimer({
|
|
|
2874
2607
|
tick.current = null;
|
|
2875
2608
|
}
|
|
2876
2609
|
}, []);
|
|
2877
|
-
const logout =
|
|
2610
|
+
const logout = React28.useCallback(() => {
|
|
2878
2611
|
clearTimers();
|
|
2879
2612
|
warningRef.current = false;
|
|
2880
2613
|
setWarning(false);
|
|
2881
2614
|
cbs.current.onLogout();
|
|
2882
2615
|
}, [clearTimers]);
|
|
2883
|
-
const startIdle =
|
|
2616
|
+
const startIdle = React28.useCallback(() => {
|
|
2884
2617
|
if (idleTimer.current) clearTimeout(idleTimer.current);
|
|
2885
2618
|
idleTimer.current = setTimeout(() => {
|
|
2886
2619
|
warningRef.current = true;
|
|
@@ -2895,7 +2628,7 @@ function LogoutTimer({
|
|
|
2895
2628
|
}, 250);
|
|
2896
2629
|
}, timeout);
|
|
2897
2630
|
}, [timeout, countdown, logout]);
|
|
2898
|
-
const stay =
|
|
2631
|
+
const stay = React28.useCallback(() => {
|
|
2899
2632
|
if (tick.current) {
|
|
2900
2633
|
clearInterval(tick.current);
|
|
2901
2634
|
tick.current = null;
|
|
@@ -2905,7 +2638,7 @@ function LogoutTimer({
|
|
|
2905
2638
|
cbs.current.onContinue?.();
|
|
2906
2639
|
startIdle();
|
|
2907
2640
|
}, [startIdle]);
|
|
2908
|
-
|
|
2641
|
+
React28.useEffect(() => {
|
|
2909
2642
|
if (!enabled) {
|
|
2910
2643
|
clearTimers();
|
|
2911
2644
|
warningRef.current = false;
|
|
@@ -2970,11 +2703,11 @@ function SegmentedControl({
|
|
|
2970
2703
|
"aria-label": ariaLabel
|
|
2971
2704
|
}) {
|
|
2972
2705
|
const sz = SIZE5[size];
|
|
2973
|
-
const groupId =
|
|
2974
|
-
const errorId =
|
|
2706
|
+
const groupId = React28.useId();
|
|
2707
|
+
const errorId = React28.useId();
|
|
2975
2708
|
const hasError = errorMessage != null;
|
|
2976
2709
|
const isControlled = value !== void 0;
|
|
2977
|
-
const [internal, setInternal] =
|
|
2710
|
+
const [internal, setInternal] = React28.useState(defaultValue);
|
|
2978
2711
|
const current = isControlled ? value : internal;
|
|
2979
2712
|
const handle = (v) => {
|
|
2980
2713
|
if (!v) return;
|
|
@@ -3005,19 +2738,19 @@ function SegmentedControl({
|
|
|
3005
2738
|
"aria-label": ariaLabel ?? (typeof label === "string" ? label : void 0),
|
|
3006
2739
|
"aria-invalid": hasError || void 0,
|
|
3007
2740
|
"aria-describedby": hasError ? errorId : void 0,
|
|
3008
|
-
className:
|
|
2741
|
+
className: cx(
|
|
3009
2742
|
"inline-flex items-center gap-1 rounded-lg border bg-surface-raised p-1",
|
|
3010
2743
|
hasError ? "border-status-error" : "border-border",
|
|
3011
2744
|
sz.h,
|
|
3012
2745
|
fullWidth ? "flex w-full" : "w-fit",
|
|
3013
2746
|
disabled ? "opacity-60 cursor-not-allowed" : ""
|
|
3014
|
-
|
|
2747
|
+
),
|
|
3015
2748
|
children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3016
2749
|
ToggleGroup__namespace.Item,
|
|
3017
2750
|
{
|
|
3018
2751
|
value: opt.value,
|
|
3019
2752
|
disabled: opt.disabled,
|
|
3020
|
-
className:
|
|
2753
|
+
className: cx(
|
|
3021
2754
|
"inline-flex items-center justify-center gap-1.5 rounded-md select-none whitespace-nowrap",
|
|
3022
2755
|
"transition-colors duration-150 h-full",
|
|
3023
2756
|
sz.text,
|
|
@@ -3029,7 +2762,7 @@ function SegmentedControl({
|
|
|
3029
2762
|
"data-[state=on]:bg-surface data-[state=on]:text-accent data-[state=on]:shadow-sm",
|
|
3030
2763
|
"focus:outline-none focus-visible:ring-[3px] focus-visible:ring-focus-ring",
|
|
3031
2764
|
"disabled:opacity-40 disabled:cursor-not-allowed"
|
|
3032
|
-
|
|
2765
|
+
),
|
|
3033
2766
|
children: [
|
|
3034
2767
|
opt.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: opt.icon }),
|
|
3035
2768
|
opt.label
|
|
@@ -3071,6 +2804,7 @@ var addDays = (d, n) => {
|
|
|
3071
2804
|
var addMonths = (d, n) => new Date(d.getFullYear(), d.getMonth() + n, 1);
|
|
3072
2805
|
var sameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
3073
2806
|
var isToday = (d) => sameDay(d, /* @__PURE__ */ new Date());
|
|
2807
|
+
var dayKey = (d) => `${d.getFullYear()}-${d.getMonth()}-${d.getDate()}`;
|
|
3074
2808
|
var isSameMonth = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
3075
2809
|
var startOfMonth = (d) => new Date(d.getFullYear(), d.getMonth(), 1);
|
|
3076
2810
|
var endOfMonth = (d) => new Date(d.getFullYear(), d.getMonth() + 1, 0);
|
|
@@ -3115,8 +2849,8 @@ var normalize = (e) => {
|
|
|
3115
2849
|
const end = e.end ? toDate2(e.end) : new Date(start.getTime() + 36e5);
|
|
3116
2850
|
return { ...e, start, end };
|
|
3117
2851
|
};
|
|
3118
|
-
var
|
|
3119
|
-
var
|
|
2852
|
+
var Spinner2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", className: "h-5 w-5 animate-spin text-accent", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z" }) });
|
|
2853
|
+
var Plus = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) });
|
|
3120
2854
|
var Chevron4 = ({ dir }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true", className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: dir === "left" ? "M15 19l-7-7 7-7" : "M9 5l7 7-7 7" }) });
|
|
3121
2855
|
function Scheduler({
|
|
3122
2856
|
events: controlledEvents,
|
|
@@ -3134,22 +2868,22 @@ function Scheduler({
|
|
|
3134
2868
|
style
|
|
3135
2869
|
}) {
|
|
3136
2870
|
const reduced = framerMotion.useReducedMotion();
|
|
3137
|
-
const [view, setView] =
|
|
3138
|
-
const [cursor, setCursor] =
|
|
3139
|
-
const [loaded, setLoaded] =
|
|
3140
|
-
const [loading, setLoading] =
|
|
3141
|
-
const [error, setError] =
|
|
3142
|
-
const [reloadKey, setReloadKey] =
|
|
3143
|
-
const [dir, setDir] =
|
|
3144
|
-
const cbRef =
|
|
2871
|
+
const [view, setView] = React28.useState(defaultView);
|
|
2872
|
+
const [cursor, setCursor] = React28.useState(() => defaultDate ?? /* @__PURE__ */ new Date());
|
|
2873
|
+
const [loaded, setLoaded] = React28.useState([]);
|
|
2874
|
+
const [loading, setLoading] = React28.useState(false);
|
|
2875
|
+
const [error, setError] = React28.useState(null);
|
|
2876
|
+
const [reloadKey, setReloadKey] = React28.useState(0);
|
|
2877
|
+
const [dir, setDir] = React28.useState(0);
|
|
2878
|
+
const cbRef = React28.useRef({ loadEvents, onError });
|
|
3145
2879
|
cbRef.current = { loadEvents, onError };
|
|
3146
|
-
const range =
|
|
2880
|
+
const range = React28.useMemo(
|
|
3147
2881
|
() => view === "month" ? monthRange(cursor) : weekRange(cursor, weekStartsOn),
|
|
3148
2882
|
[view, cursor, weekStartsOn]
|
|
3149
2883
|
);
|
|
3150
2884
|
const fromKey = range.from.getTime();
|
|
3151
2885
|
const toKey = range.to.getTime();
|
|
3152
|
-
|
|
2886
|
+
React28.useEffect(() => {
|
|
3153
2887
|
const { loadEvents: loader, onError: onErr } = cbRef.current;
|
|
3154
2888
|
if (!loader) return;
|
|
3155
2889
|
let cancelled = false;
|
|
@@ -3169,16 +2903,16 @@ function Scheduler({
|
|
|
3169
2903
|
cancelled = true;
|
|
3170
2904
|
};
|
|
3171
2905
|
}, [fromKey, toKey, view, reloadKey]);
|
|
3172
|
-
const retry =
|
|
3173
|
-
const events =
|
|
2906
|
+
const retry = React28.useCallback(() => setReloadKey((k) => k + 1), []);
|
|
2907
|
+
const events = React28.useMemo(
|
|
3174
2908
|
() => (controlledEvents ?? loaded).map(normalize),
|
|
3175
2909
|
[controlledEvents, loaded]
|
|
3176
2910
|
);
|
|
3177
|
-
const go =
|
|
2911
|
+
const go = React28.useCallback((delta) => {
|
|
3178
2912
|
setDir(delta);
|
|
3179
2913
|
setCursor((c) => view === "month" ? addMonths(c, delta) : addDays(c, delta * 7));
|
|
3180
2914
|
}, [view]);
|
|
3181
|
-
const goToday =
|
|
2915
|
+
const goToday = React28.useCallback(() => {
|
|
3182
2916
|
setDir(0);
|
|
3183
2917
|
setCursor(/* @__PURE__ */ new Date());
|
|
3184
2918
|
}, []);
|
|
@@ -3187,7 +2921,7 @@ function Scheduler({
|
|
|
3187
2921
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3188
2922
|
"div",
|
|
3189
2923
|
{
|
|
3190
|
-
className:
|
|
2924
|
+
className: cx("flex flex-col overflow-hidden rounded-xl border border-border bg-surface", className),
|
|
3191
2925
|
style,
|
|
3192
2926
|
children: [
|
|
3193
2927
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3", children: [
|
|
@@ -3206,7 +2940,7 @@ function Scheduler({
|
|
|
3206
2940
|
}
|
|
3207
2941
|
}
|
|
3208
2942
|
),
|
|
3209
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2943
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx(Spinner2, {})
|
|
3210
2944
|
] }),
|
|
3211
2945
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3212
2946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3219,7 +2953,7 @@ function Scheduler({
|
|
|
3219
2953
|
options: [{ value: "month", label: "Month" }, { value: "week", label: "Week" }]
|
|
3220
2954
|
}
|
|
3221
2955
|
),
|
|
3222
|
-
onNewEvent && /* @__PURE__ */ jsxRuntime.jsx(Button_default, { size: "sm", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2956
|
+
onNewEvent && /* @__PURE__ */ jsxRuntime.jsx(Button_default, { size: "sm", icon: /* @__PURE__ */ jsxRuntime.jsx(Plus, {}), content: "New event", onClick: onNewEvent })
|
|
3223
2957
|
] })
|
|
3224
2958
|
] }),
|
|
3225
2959
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex-1 overflow-hidden", children: error ? /* @__PURE__ */ jsxRuntime.jsx(SchedulerError, { onRetry: retry }) : loadEvents && loading && events.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(SchedulerSkeleton, { view }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3288,9 +3022,9 @@ function SchedulerError({ onRetry }) {
|
|
|
3288
3022
|
] });
|
|
3289
3023
|
}
|
|
3290
3024
|
function MonthYearPicker({ label, cursor, onPick }) {
|
|
3291
|
-
const [open, setOpen] =
|
|
3292
|
-
const [viewYear, setViewYear] =
|
|
3293
|
-
|
|
3025
|
+
const [open, setOpen] = React28.useState(false);
|
|
3026
|
+
const [viewYear, setViewYear] = React28.useState(cursor.getFullYear());
|
|
3027
|
+
React28.useEffect(() => {
|
|
3294
3028
|
if (open) setViewYear(cursor.getFullYear());
|
|
3295
3029
|
}, [open, cursor]);
|
|
3296
3030
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
@@ -3346,6 +3080,17 @@ function MonthYearPicker({ label, cursor, onPick }) {
|
|
|
3346
3080
|
] });
|
|
3347
3081
|
}
|
|
3348
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
|
+
}
|
|
3349
3094
|
function MonthView({
|
|
3350
3095
|
cursor,
|
|
3351
3096
|
weekStartsOn,
|
|
@@ -3353,13 +3098,14 @@ function MonthView({
|
|
|
3353
3098
|
onSelectSlot,
|
|
3354
3099
|
onSelectEvent
|
|
3355
3100
|
}) {
|
|
3356
|
-
const grid =
|
|
3101
|
+
const grid = React28.useMemo(() => buildMonthGrid(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3102
|
+
const eventsByDay = React28.useMemo(() => bucketByDay(events), [events]);
|
|
3357
3103
|
const labels = weekdayLabels(weekStartsOn);
|
|
3358
3104
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
3359
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)) }),
|
|
3360
3106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid flex-1 grid-cols-7 grid-rows-6", children: grid.map((day, i) => {
|
|
3361
3107
|
const inMonth = isSameMonth(day, cursor);
|
|
3362
|
-
const dayEvents =
|
|
3108
|
+
const dayEvents = eventsByDay.get(dayKey(day)) ?? NO_EVENTS;
|
|
3363
3109
|
const today = isToday(day);
|
|
3364
3110
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3365
3111
|
"button",
|
|
@@ -3427,11 +3173,12 @@ function WeekView({
|
|
|
3427
3173
|
onSelectSlot,
|
|
3428
3174
|
onSelectEvent
|
|
3429
3175
|
}) {
|
|
3430
|
-
const days =
|
|
3431
|
-
const
|
|
3176
|
+
const days = React28.useMemo(() => getWeekDays(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3177
|
+
const eventsByDay = React28.useMemo(() => bucketByDay(events), [events]);
|
|
3178
|
+
const labels = React28.useMemo(() => weekdayLabels(weekStartsOn), [weekStartsOn]);
|
|
3432
3179
|
const dow = (d) => labels[(d.getDay() - weekStartsOn + 7) % 7];
|
|
3433
3180
|
const [startHour, endHour] = dayHours;
|
|
3434
|
-
const hours =
|
|
3181
|
+
const hours = React28.useMemo(
|
|
3435
3182
|
() => Array.from({ length: endHour - startHour }, (_, i) => startHour + i),
|
|
3436
3183
|
[startHour, endHour]
|
|
3437
3184
|
);
|
|
@@ -3448,7 +3195,7 @@ function WeekView({
|
|
|
3448
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: [
|
|
3449
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)) }),
|
|
3450
3197
|
days.map((day) => {
|
|
3451
|
-
const dayEvents =
|
|
3198
|
+
const dayEvents = (eventsByDay.get(dayKey(day)) ?? NO_EVENTS).filter((e) => !e.allDay);
|
|
3452
3199
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative border-r border-border last:border-r-0", children: [
|
|
3453
3200
|
hours.map((h, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3454
3201
|
"button",
|
|
@@ -3536,7 +3283,7 @@ function EmptyCart({
|
|
|
3536
3283
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3537
3284
|
"div",
|
|
3538
3285
|
{
|
|
3539
|
-
className:
|
|
3286
|
+
className: cx("flex flex-col items-center justify-center px-6 py-10 text-center", className),
|
|
3540
3287
|
style,
|
|
3541
3288
|
children: [
|
|
3542
3289
|
art && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: art }),
|
|
@@ -3574,7 +3321,7 @@ function Cart({
|
|
|
3574
3321
|
}) {
|
|
3575
3322
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
3576
3323
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
3577
|
-
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: [
|
|
3578
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: [
|
|
3579
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" }) }),
|
|
3580
3327
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -3622,17 +3369,17 @@ function Cart({
|
|
|
3622
3369
|
] })
|
|
3623
3370
|
] });
|
|
3624
3371
|
}
|
|
3625
|
-
var CartContext =
|
|
3372
|
+
var CartContext = React28.createContext(null);
|
|
3626
3373
|
var clampQty = (qty, max) => {
|
|
3627
3374
|
const lower = Math.max(1, Math.round(qty));
|
|
3628
3375
|
return max != null ? Math.min(lower, max) : lower;
|
|
3629
3376
|
};
|
|
3630
3377
|
function CartProvider({ children, initialItems = [], onChange }) {
|
|
3631
|
-
const [items, setItems] =
|
|
3632
|
-
|
|
3378
|
+
const [items, setItems] = React28.useState(initialItems);
|
|
3379
|
+
React28.useEffect(() => {
|
|
3633
3380
|
onChange?.(items);
|
|
3634
3381
|
}, [items]);
|
|
3635
|
-
const addToCart =
|
|
3382
|
+
const addToCart = React28.useCallback((item, quantity) => {
|
|
3636
3383
|
const addQty = quantity ?? item.quantity ?? 1;
|
|
3637
3384
|
setItems((prev) => {
|
|
3638
3385
|
const existing = prev.find((it) => it.id === item.id);
|
|
@@ -3645,29 +3392,29 @@ function CartProvider({ children, initialItems = [], onChange }) {
|
|
|
3645
3392
|
return [...prev, { ...rest, quantity: clampQty(addQty, item.max) }];
|
|
3646
3393
|
});
|
|
3647
3394
|
}, []);
|
|
3648
|
-
const removeFromCart =
|
|
3395
|
+
const removeFromCart = React28.useCallback((id) => {
|
|
3649
3396
|
setItems((prev) => prev.filter((it) => it.id !== id));
|
|
3650
3397
|
}, []);
|
|
3651
|
-
const updateQuantity =
|
|
3398
|
+
const updateQuantity = React28.useCallback((id, quantity) => {
|
|
3652
3399
|
setItems(
|
|
3653
3400
|
(prev) => prev.map((it) => it.id === id ? { ...it, quantity: clampQty(quantity, it.max) } : it)
|
|
3654
3401
|
);
|
|
3655
3402
|
}, []);
|
|
3656
|
-
const clearCart =
|
|
3657
|
-
const isInCart =
|
|
3658
|
-
const getItemCount =
|
|
3659
|
-
const getCartTotal =
|
|
3403
|
+
const clearCart = React28.useCallback(() => setItems([]), []);
|
|
3404
|
+
const isInCart = React28.useCallback((id) => items.some((it) => it.id === id), [items]);
|
|
3405
|
+
const getItemCount = React28.useCallback(() => items.reduce((sum, it) => sum + it.quantity, 0), [items]);
|
|
3406
|
+
const getCartTotal = React28.useCallback(
|
|
3660
3407
|
() => items.reduce((sum, it) => sum + it.price * it.quantity, 0),
|
|
3661
3408
|
[items]
|
|
3662
3409
|
);
|
|
3663
|
-
const value =
|
|
3410
|
+
const value = React28.useMemo(
|
|
3664
3411
|
() => ({ items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal }),
|
|
3665
3412
|
[items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal]
|
|
3666
3413
|
);
|
|
3667
3414
|
return /* @__PURE__ */ jsxRuntime.jsx(CartContext.Provider, { value, children });
|
|
3668
3415
|
}
|
|
3669
3416
|
function useCart() {
|
|
3670
|
-
const ctx =
|
|
3417
|
+
const ctx = React28.useContext(CartContext);
|
|
3671
3418
|
if (!ctx) {
|
|
3672
3419
|
throw new Error("useCart must be used within a <CartProvider>.");
|
|
3673
3420
|
}
|
|
@@ -4001,11 +3748,11 @@ function buildBindings(store, name, kind, snap) {
|
|
|
4001
3748
|
|
|
4002
3749
|
// src/form/useForm.ts
|
|
4003
3750
|
function useForm(options = {}) {
|
|
4004
|
-
const ref =
|
|
3751
|
+
const ref = React28.useRef(null);
|
|
4005
3752
|
if (ref.current === null) ref.current = new FormStore(options);
|
|
4006
3753
|
const store = ref.current;
|
|
4007
|
-
|
|
4008
|
-
const make =
|
|
3754
|
+
React28.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
|
|
3755
|
+
const make = React28.useCallback(
|
|
4009
3756
|
(kind) => (name, rules) => {
|
|
4010
3757
|
if (rules !== void 0) store.setRule(name, rules);
|
|
4011
3758
|
return buildBindings(store, name, kind, store.getFieldSnapshot(name));
|
|
@@ -4034,9 +3781,9 @@ function useForm(options = {}) {
|
|
|
4034
3781
|
fieldTarget: make("target")
|
|
4035
3782
|
};
|
|
4036
3783
|
}
|
|
4037
|
-
var FormContext =
|
|
3784
|
+
var FormContext = React28.createContext(null);
|
|
4038
3785
|
function useFormStore() {
|
|
4039
|
-
const store =
|
|
3786
|
+
const store = React28.useContext(FormContext);
|
|
4040
3787
|
if (!store) {
|
|
4041
3788
|
throw new Error("useFormStore must be used within a <Form>. Did you forget to wrap your fields?");
|
|
4042
3789
|
}
|
|
@@ -4050,8 +3797,8 @@ function Form({
|
|
|
4050
3797
|
children,
|
|
4051
3798
|
...rest
|
|
4052
3799
|
}) {
|
|
4053
|
-
const ref =
|
|
4054
|
-
const bypass =
|
|
3800
|
+
const ref = React28.useRef(null);
|
|
3801
|
+
const bypass = React28.useRef(false);
|
|
4055
3802
|
const handleSubmit = async (e) => {
|
|
4056
3803
|
if (bypass.current) {
|
|
4057
3804
|
bypass.current = false;
|
|
@@ -4103,12 +3850,12 @@ function useFormField(name, options = {}) {
|
|
|
4103
3850
|
const store = useFormStore();
|
|
4104
3851
|
const { kind = "value", rules } = options;
|
|
4105
3852
|
if (rules !== void 0 && store.getRule(name) !== rules) store.setRule(name, rules);
|
|
4106
|
-
|
|
3853
|
+
React28.useEffect(() => {
|
|
4107
3854
|
return () => {
|
|
4108
3855
|
if (rules !== void 0) store.removeRule(name);
|
|
4109
3856
|
};
|
|
4110
3857
|
}, [store, name]);
|
|
4111
|
-
const snap =
|
|
3858
|
+
const snap = React28.useSyncExternalStore(
|
|
4112
3859
|
store.subscribe,
|
|
4113
3860
|
() => store.getFieldSnapshot(name)
|
|
4114
3861
|
);
|
|
@@ -4120,7 +3867,7 @@ function FormField({ name, kind, rules, children }) {
|
|
|
4120
3867
|
}
|
|
4121
3868
|
function useFieldArray(name) {
|
|
4122
3869
|
const store = useFormStore();
|
|
4123
|
-
|
|
3870
|
+
React28.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
|
|
4124
3871
|
const arr = store.getValue(name) ?? [];
|
|
4125
3872
|
const keys = store.getKeys(name);
|
|
4126
3873
|
return {
|
|
@@ -4153,7 +3900,7 @@ function TextInput({
|
|
|
4153
3900
|
suffix,
|
|
4154
3901
|
id
|
|
4155
3902
|
}) {
|
|
4156
|
-
const errorId =
|
|
3903
|
+
const errorId = React28.useId();
|
|
4157
3904
|
const hasError = errorMessage != null;
|
|
4158
3905
|
const hasAdornment = prefix != null || suffix != null;
|
|
4159
3906
|
const inputId = htmlFor ?? id;
|
|
@@ -4314,7 +4061,7 @@ function CreditCardForm({
|
|
|
4314
4061
|
className = "",
|
|
4315
4062
|
style
|
|
4316
4063
|
}) {
|
|
4317
|
-
const initial =
|
|
4064
|
+
const initial = React28.useRef({
|
|
4318
4065
|
number: formatCardNumber(defaultValue?.number ?? ""),
|
|
4319
4066
|
name: defaultValue?.name ?? "",
|
|
4320
4067
|
expiry: formatExpiry(defaultValue?.expiry ?? ""),
|
|
@@ -4323,7 +4070,7 @@ function CreditCardForm({
|
|
|
4323
4070
|
const form = useForm({ initialValues: initial });
|
|
4324
4071
|
const numberStr = String(form.values.number ?? "");
|
|
4325
4072
|
const brand = detectBrand(numberStr);
|
|
4326
|
-
|
|
4073
|
+
React28.useEffect(() => {
|
|
4327
4074
|
onChange?.(toCard(form.values));
|
|
4328
4075
|
}, [form.values.number, form.values.name, form.values.expiry, form.values.cvv]);
|
|
4329
4076
|
const numberBind = form.fieldNative("number", {
|
|
@@ -4418,7 +4165,7 @@ function Checkout({
|
|
|
4418
4165
|
const subtotal = items.reduce((sum, it) => sum + it.price * it.quantity, 0);
|
|
4419
4166
|
const total = subtotal + summaryRows.reduce((sum, r) => sum + r.value, 0);
|
|
4420
4167
|
const isEmpty2 = items.length === 0;
|
|
4421
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4168
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("mx-auto w-full max-w-5xl", className), children: [
|
|
4422
4169
|
title && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-6 text-2xl font-semibold tracking-tight text-foreground", children: title }),
|
|
4423
4170
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-6 lg:grid-cols-2", children: [
|
|
4424
4171
|
/* @__PURE__ */ jsxRuntime.jsx("section", { "aria-label": "Order summary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4446,7 +4193,7 @@ function Checkout({
|
|
|
4446
4193
|
] })
|
|
4447
4194
|
] });
|
|
4448
4195
|
}
|
|
4449
|
-
var NotificationContext =
|
|
4196
|
+
var NotificationContext = React28.createContext({
|
|
4450
4197
|
open: () => void 0,
|
|
4451
4198
|
close: () => void 0
|
|
4452
4199
|
});
|
|
@@ -4504,26 +4251,26 @@ function NotificationItem({
|
|
|
4504
4251
|
onClose,
|
|
4505
4252
|
reduced
|
|
4506
4253
|
}) {
|
|
4507
|
-
const [paused, setPaused] =
|
|
4254
|
+
const [paused, setPaused] = React28.useState(false);
|
|
4508
4255
|
const duration = n.duration ?? 4e3;
|
|
4509
4256
|
const isAutoDismissing = isFinite(duration) && duration > 0;
|
|
4510
4257
|
const showProgress = !reduced && isAutoDismissing;
|
|
4511
|
-
const timerRef =
|
|
4512
|
-
const startTimeRef =
|
|
4513
|
-
const remainingRef =
|
|
4514
|
-
const clearTimer =
|
|
4258
|
+
const timerRef = React28.useRef(null);
|
|
4259
|
+
const startTimeRef = React28.useRef(0);
|
|
4260
|
+
const remainingRef = React28.useRef(duration);
|
|
4261
|
+
const clearTimer = React28.useCallback(() => {
|
|
4515
4262
|
if (timerRef.current !== null) {
|
|
4516
4263
|
clearTimeout(timerRef.current);
|
|
4517
4264
|
timerRef.current = null;
|
|
4518
4265
|
}
|
|
4519
4266
|
}, []);
|
|
4520
|
-
const scheduleDismiss =
|
|
4267
|
+
const scheduleDismiss = React28.useCallback((ms) => {
|
|
4521
4268
|
clearTimer();
|
|
4522
4269
|
if (!isAutoDismissing) return;
|
|
4523
4270
|
startTimeRef.current = Date.now();
|
|
4524
4271
|
timerRef.current = setTimeout(() => onClose(n.id), ms);
|
|
4525
4272
|
}, [clearTimer, isAutoDismissing, n.id, onClose]);
|
|
4526
|
-
|
|
4273
|
+
React28.useEffect(() => {
|
|
4527
4274
|
if (paused || !isAutoDismissing) return;
|
|
4528
4275
|
scheduleDismiss(remainingRef.current);
|
|
4529
4276
|
return clearTimer;
|
|
@@ -4606,15 +4353,15 @@ function NotificationProvider({
|
|
|
4606
4353
|
children,
|
|
4607
4354
|
position = "top-right"
|
|
4608
4355
|
}) {
|
|
4609
|
-
const [notifications, setNotifications] =
|
|
4356
|
+
const [notifications, setNotifications] = React28.useState([]);
|
|
4610
4357
|
const reduced = framerMotion.useReducedMotion();
|
|
4611
|
-
const open =
|
|
4358
|
+
const open = React28.useCallback((payload) => {
|
|
4612
4359
|
setNotifications((prev) => [
|
|
4613
4360
|
...prev,
|
|
4614
4361
|
{ duration: 4e3, ...payload, id: Date.now() + Math.random() }
|
|
4615
4362
|
]);
|
|
4616
4363
|
}, []);
|
|
4617
|
-
const close =
|
|
4364
|
+
const close = React28.useCallback((id) => {
|
|
4618
4365
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
4619
4366
|
}, []);
|
|
4620
4367
|
return /* @__PURE__ */ jsxRuntime.jsxs(NotificationContext.Provider, { value: { open, close }, children: [
|
|
@@ -4643,7 +4390,7 @@ function NotificationProvider({
|
|
|
4643
4390
|
] });
|
|
4644
4391
|
}
|
|
4645
4392
|
function useNotification() {
|
|
4646
|
-
const { open } =
|
|
4393
|
+
const { open } = React28.useContext(NotificationContext);
|
|
4647
4394
|
return {
|
|
4648
4395
|
info: (props) => open({ type: "info", ...props }),
|
|
4649
4396
|
success: (props) => open({ type: "success", ...props }),
|
|
@@ -4760,10 +4507,10 @@ function FadingBase({
|
|
|
4760
4507
|
isMounted = false,
|
|
4761
4508
|
children
|
|
4762
4509
|
}) {
|
|
4763
|
-
const [shouldRender, setShouldRender] =
|
|
4764
|
-
const [visible, setVisible] =
|
|
4765
|
-
const timerRef =
|
|
4766
|
-
|
|
4510
|
+
const [shouldRender, setShouldRender] = React28.useState(isMounted);
|
|
4511
|
+
const [visible, setVisible] = React28.useState(false);
|
|
4512
|
+
const timerRef = React28.useRef(null);
|
|
4513
|
+
React28.useEffect(() => {
|
|
4767
4514
|
if (isMounted) {
|
|
4768
4515
|
setShouldRender(true);
|
|
4769
4516
|
const rafId = requestAnimationFrame(() => setVisible(true));
|
|
@@ -4796,7 +4543,7 @@ var DENSITY_PADDING = {
|
|
|
4796
4543
|
"comfortable": "py-2.5 px-3",
|
|
4797
4544
|
"spacious": "py-3.5 px-4"
|
|
4798
4545
|
};
|
|
4799
|
-
function
|
|
4546
|
+
function List2({
|
|
4800
4547
|
items,
|
|
4801
4548
|
onItemClick,
|
|
4802
4549
|
activeKey,
|
|
@@ -4861,8 +4608,8 @@ function ScalableContainer({
|
|
|
4861
4608
|
togglePosition = "top-right",
|
|
4862
4609
|
className = ""
|
|
4863
4610
|
}) {
|
|
4864
|
-
const containerRef =
|
|
4865
|
-
const [internalScaled, setInternalScaled] =
|
|
4611
|
+
const containerRef = React28.useRef(null);
|
|
4612
|
+
const [internalScaled, setInternalScaled] = React28.useState(false);
|
|
4866
4613
|
const isScaled = expanded ?? internalScaled;
|
|
4867
4614
|
const reduced = framerMotion.useReducedMotion();
|
|
4868
4615
|
const onToggle = () => {
|
|
@@ -4889,14 +4636,14 @@ function ScalableContainer({
|
|
|
4889
4636
|
width: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] },
|
|
4890
4637
|
height: { type: "tween", duration: 0.32, ease: [0.16, 1, 0.3, 1] }
|
|
4891
4638
|
},
|
|
4892
|
-
className:
|
|
4639
|
+
className: cx(
|
|
4893
4640
|
"relative rounded-lg overflow-hidden",
|
|
4894
4641
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow
|
|
4895
4642
|
// when expanded. No background colour change.
|
|
4896
4643
|
isScaled ? "shadow-2xl" : "shadow-md",
|
|
4897
4644
|
"transition-shadow duration-300",
|
|
4898
4645
|
className
|
|
4899
|
-
|
|
4646
|
+
),
|
|
4900
4647
|
children: [
|
|
4901
4648
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip, { placement: "bottom", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4902
4649
|
"button",
|
|
@@ -5000,17 +4747,17 @@ function CatalogGrid({ items, buttonText, onOpen, className = "" }) {
|
|
|
5000
4747
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex flex-wrap gap-2 ${className}`.trim(), children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(GridCard, { item, buttonText, onOpen }, item.key)) });
|
|
5001
4748
|
}
|
|
5002
4749
|
function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
5003
|
-
const [activeIndex, setActiveIndex] =
|
|
5004
|
-
const [indexPool, setIndexPool] =
|
|
5005
|
-
const cardRefs =
|
|
5006
|
-
const getIndexes =
|
|
4750
|
+
const [activeIndex, setActiveIndex] = React28.useState(0);
|
|
4751
|
+
const [indexPool, setIndexPool] = React28.useState([]);
|
|
4752
|
+
const cardRefs = React28.useRef([]);
|
|
4753
|
+
const getIndexes = React28.useMemo(() => {
|
|
5007
4754
|
let nextIndex = activeIndex + 1;
|
|
5008
4755
|
let previousIndex = activeIndex - 1;
|
|
5009
4756
|
if (activeIndex === 0) previousIndex = items.length - 1;
|
|
5010
4757
|
if (activeIndex === items.length - 1) nextIndex = 0;
|
|
5011
4758
|
return { previousIndex, nextIndex };
|
|
5012
4759
|
}, [activeIndex, items.length]);
|
|
5013
|
-
|
|
4760
|
+
React28.useEffect(() => {
|
|
5014
4761
|
const { nextIndex, previousIndex } = getIndexes;
|
|
5015
4762
|
let indexes = [previousIndex, activeIndex, nextIndex];
|
|
5016
4763
|
if (activeIndex !== 0 && activeIndex !== items.length - 1) {
|
|
@@ -5129,7 +4876,7 @@ function renderItem(item) {
|
|
|
5129
4876
|
className: ITEM_CLASSNAME,
|
|
5130
4877
|
children: [
|
|
5131
4878
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuLabel, { icon: item.icon, value: item.value }),
|
|
5132
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4879
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChevronRight, {})
|
|
5133
4880
|
]
|
|
5134
4881
|
}
|
|
5135
4882
|
),
|
|
@@ -5162,7 +4909,7 @@ function ContextMenuLabel({ icon, value }) {
|
|
|
5162
4909
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: value })
|
|
5163
4910
|
] });
|
|
5164
4911
|
}
|
|
5165
|
-
function
|
|
4912
|
+
function ChevronRight() {
|
|
5166
4913
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4 flex-shrink-0", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
5167
4914
|
}
|
|
5168
4915
|
function readDismissed(key) {
|
|
@@ -5183,8 +4930,8 @@ function writeDismissed(key) {
|
|
|
5183
4930
|
}
|
|
5184
4931
|
}
|
|
5185
4932
|
function useTargetBbox(ref) {
|
|
5186
|
-
const [bbox, setBbox] =
|
|
5187
|
-
|
|
4933
|
+
const [bbox, setBbox] = React28.useState(null);
|
|
4934
|
+
React28.useLayoutEffect(() => {
|
|
5188
4935
|
const el = ref?.current;
|
|
5189
4936
|
if (!el) {
|
|
5190
4937
|
setBbox(null);
|
|
@@ -5214,7 +4961,7 @@ function tooltipStyleFor(bbox, placement) {
|
|
|
5214
4961
|
return { left: bbox.left + bbox.width / 2, top: bbox.top - TOOLTIP_GAP, transform: "translate(-50%, -100%)", width: TOOLTIP_WIDTH };
|
|
5215
4962
|
}
|
|
5216
4963
|
function useFocusTrap(containerRef, active) {
|
|
5217
|
-
|
|
4964
|
+
React28.useEffect(() => {
|
|
5218
4965
|
if (!active) return;
|
|
5219
4966
|
const el = containerRef.current;
|
|
5220
4967
|
if (!el) return;
|
|
@@ -5253,16 +5000,16 @@ function Wizard({
|
|
|
5253
5000
|
onComplete,
|
|
5254
5001
|
onSkip
|
|
5255
5002
|
}) {
|
|
5256
|
-
const tooltipRef =
|
|
5257
|
-
const tooltipTitleId =
|
|
5258
|
-
const tooltipBodyId =
|
|
5003
|
+
const tooltipRef = React28.useRef(null);
|
|
5004
|
+
const tooltipTitleId = React28.useId();
|
|
5005
|
+
const tooltipBodyId = React28.useId();
|
|
5259
5006
|
const reduced = framerMotion.useReducedMotion();
|
|
5260
|
-
const [open, setOpen] =
|
|
5261
|
-
const [activeIndex, setActiveIndex] =
|
|
5007
|
+
const [open, setOpen] = React28.useState(() => steps.length > 0 && !readDismissed(storageKey));
|
|
5008
|
+
const [activeIndex, setActiveIndex] = React28.useState(0);
|
|
5262
5009
|
const step = steps[activeIndex];
|
|
5263
5010
|
const bbox = useTargetBbox(step?.stepRef);
|
|
5264
5011
|
useFocusTrap(tooltipRef, open);
|
|
5265
|
-
|
|
5012
|
+
React28.useEffect(() => {
|
|
5266
5013
|
if (!open || !dismissible) return;
|
|
5267
5014
|
const onKey = (e) => {
|
|
5268
5015
|
if (e.key === "Escape") {
|
|
@@ -5273,12 +5020,12 @@ function Wizard({
|
|
|
5273
5020
|
document.addEventListener("keydown", onKey);
|
|
5274
5021
|
return () => document.removeEventListener("keydown", onKey);
|
|
5275
5022
|
}, [open, dismissible]);
|
|
5276
|
-
const handleSkip =
|
|
5023
|
+
const handleSkip = React28.useCallback(() => {
|
|
5277
5024
|
writeDismissed(storageKey);
|
|
5278
5025
|
setOpen(false);
|
|
5279
5026
|
onSkip?.();
|
|
5280
5027
|
}, [storageKey, onSkip]);
|
|
5281
|
-
const handleComplete =
|
|
5028
|
+
const handleComplete = React28.useCallback(() => {
|
|
5282
5029
|
writeDismissed(storageKey);
|
|
5283
5030
|
setOpen(false);
|
|
5284
5031
|
onComplete?.();
|
|
@@ -5421,7 +5168,7 @@ function Wizard({
|
|
|
5421
5168
|
] });
|
|
5422
5169
|
}
|
|
5423
5170
|
var SearchIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) });
|
|
5424
|
-
var SearchInput =
|
|
5171
|
+
var SearchInput = React28__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
|
|
5425
5172
|
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5426
5173
|
"div",
|
|
5427
5174
|
{
|
|
@@ -5605,7 +5352,7 @@ function TableBody({
|
|
|
5605
5352
|
expandRow,
|
|
5606
5353
|
getRowKey
|
|
5607
5354
|
}) {
|
|
5608
|
-
const [expanded, setExpanded] =
|
|
5355
|
+
const [expanded, setExpanded] = React28.useState(() => /* @__PURE__ */ new Set());
|
|
5609
5356
|
const reduced = framerMotion.useReducedMotion();
|
|
5610
5357
|
const toggleRow = (rowKey) => {
|
|
5611
5358
|
setExpanded((prev) => {
|
|
@@ -5620,7 +5367,7 @@ function TableBody({
|
|
|
5620
5367
|
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, i) => {
|
|
5621
5368
|
const rowKey = getRowKey(row, i);
|
|
5622
5369
|
const isExpanded = expanded.has(rowKey);
|
|
5623
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5370
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React28__default.default.Fragment, { children: [
|
|
5624
5371
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5625
5372
|
"tr",
|
|
5626
5373
|
{
|
|
@@ -5676,9 +5423,9 @@ function Pagination({
|
|
|
5676
5423
|
const matchedOption = picker.find(
|
|
5677
5424
|
(o) => o.label === options.perPage || o.value === options.perPage
|
|
5678
5425
|
);
|
|
5679
|
-
const [perPageKey, setPerPageKey] =
|
|
5426
|
+
const [perPageKey, setPerPageKey] = React28.useState(() => matchedOption?.key ?? picker[0]?.key);
|
|
5680
5427
|
const displayPerPageKey = serverSide ? matchedOption?.key ?? perPageKey : perPageKey;
|
|
5681
|
-
|
|
5428
|
+
React28.useEffect(() => {
|
|
5682
5429
|
if (serverSide && options.perPage != null) {
|
|
5683
5430
|
const next = picker.find((o) => o.label === options.perPage || o.value === options.perPage);
|
|
5684
5431
|
if (next) setPerPageKey(next.key);
|
|
@@ -5728,7 +5475,7 @@ function Pagination({
|
|
|
5728
5475
|
] })
|
|
5729
5476
|
] });
|
|
5730
5477
|
}
|
|
5731
|
-
function
|
|
5478
|
+
function Table({
|
|
5732
5479
|
columns = [],
|
|
5733
5480
|
rows = [],
|
|
5734
5481
|
getRowKey = defaultGetRowKey,
|
|
@@ -5742,14 +5489,14 @@ function Table2({
|
|
|
5742
5489
|
className = "",
|
|
5743
5490
|
style
|
|
5744
5491
|
}) {
|
|
5745
|
-
const searchRef =
|
|
5746
|
-
const [searchTerm, setSearchTerm] =
|
|
5747
|
-
const [perPage, setPerPage] =
|
|
5492
|
+
const searchRef = React28.useRef(null);
|
|
5493
|
+
const [searchTerm, setSearchTerm] = React28.useState("");
|
|
5494
|
+
const [perPage, setPerPage] = React28.useState(
|
|
5748
5495
|
typeof pagination.perPage === "number" ? pagination.perPage : 15
|
|
5749
5496
|
);
|
|
5750
|
-
const [activePage, setActivePage] =
|
|
5497
|
+
const [activePage, setActivePage] = React28.useState(0);
|
|
5751
5498
|
const isServerSide = !!(pagination.enabled && pagination.serverSide);
|
|
5752
|
-
const filteredRows =
|
|
5499
|
+
const filteredRows = React28.useMemo(() => {
|
|
5753
5500
|
if (isServerSide || !searchTerm) return rows;
|
|
5754
5501
|
const term = searchTerm.toLowerCase();
|
|
5755
5502
|
return rows.filter(
|
|
@@ -5758,29 +5505,29 @@ function Table2({
|
|
|
5758
5505
|
)
|
|
5759
5506
|
);
|
|
5760
5507
|
}, [rows, searchTerm, isServerSide]);
|
|
5761
|
-
const datasets =
|
|
5508
|
+
const datasets = React28.useMemo(() => {
|
|
5762
5509
|
if (isServerSide) return [rows];
|
|
5763
5510
|
return createDatasets(filteredRows, pagination.enabled ? perPage : null);
|
|
5764
5511
|
}, [filteredRows, perPage, pagination.enabled, isServerSide, rows]);
|
|
5765
|
-
const MAX_PAGE =
|
|
5512
|
+
const MAX_PAGE = React28.useMemo(() => {
|
|
5766
5513
|
if (isServerSide && typeof pagination.maxPage === "number") return Math.max(0, pagination.maxPage);
|
|
5767
5514
|
if (isServerSide && typeof pagination.totalCount === "number")
|
|
5768
5515
|
return Math.max(0, Math.ceil(pagination.totalCount / perPage) - 1);
|
|
5769
5516
|
return datasets.length ? datasets.length - 1 : 0;
|
|
5770
5517
|
}, [isServerSide, pagination.maxPage, pagination.totalCount, perPage, datasets.length]);
|
|
5771
|
-
const currentPageRows =
|
|
5518
|
+
const currentPageRows = React28.useMemo(() => {
|
|
5772
5519
|
if (isServerSide) return rows;
|
|
5773
5520
|
return datasets[activePage] ?? [];
|
|
5774
5521
|
}, [isServerSide, rows, datasets, activePage]);
|
|
5775
|
-
|
|
5522
|
+
React28.useEffect(() => {
|
|
5776
5523
|
if (pagination.enabled && !isServerSide && typeof pagination.perPage === "number") {
|
|
5777
5524
|
setPerPage(pagination.perPage);
|
|
5778
5525
|
}
|
|
5779
5526
|
}, [pagination.enabled, pagination.perPage, isServerSide]);
|
|
5780
|
-
|
|
5527
|
+
React28.useEffect(() => {
|
|
5781
5528
|
if (isServerSide && typeof pagination.perPage === "number") setPerPage(pagination.perPage);
|
|
5782
5529
|
}, [isServerSide, pagination.perPage]);
|
|
5783
|
-
|
|
5530
|
+
React28.useEffect(() => {
|
|
5784
5531
|
if (isServerSide && typeof pagination.page === "number" && pagination.page >= 1)
|
|
5785
5532
|
setActivePage(pagination.page - 1);
|
|
5786
5533
|
}, [isServerSide, pagination.page]);
|
|
@@ -5864,7 +5611,7 @@ function TableSkeletonBody({
|
|
|
5864
5611
|
)) });
|
|
5865
5612
|
}
|
|
5866
5613
|
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
|
|
5867
|
-
const id =
|
|
5614
|
+
const id = React28.useId();
|
|
5868
5615
|
return /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: `flex items-center gap-2 cursor-pointer select-none ${className}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5869
5616
|
SwitchPrimitive__namespace.Root,
|
|
5870
5617
|
{
|
|
@@ -6048,7 +5795,7 @@ function Sidebar({
|
|
|
6048
5795
|
}
|
|
6049
5796
|
) });
|
|
6050
5797
|
}
|
|
6051
|
-
var MegaMenuContext =
|
|
5798
|
+
var MegaMenuContext = React28.createContext({ align: "start" });
|
|
6052
5799
|
function MegaMenu({
|
|
6053
5800
|
children,
|
|
6054
5801
|
align = "start",
|
|
@@ -6065,11 +5812,11 @@ function MegaMenu({
|
|
|
6065
5812
|
{
|
|
6066
5813
|
delayDuration,
|
|
6067
5814
|
"aria-label": ariaLabel,
|
|
6068
|
-
className:
|
|
5815
|
+
className: cx(
|
|
6069
5816
|
"relative z-10 w-full",
|
|
6070
5817
|
responsive ? "hidden md:flex" : "flex",
|
|
6071
5818
|
className
|
|
6072
|
-
|
|
5819
|
+
),
|
|
6073
5820
|
style,
|
|
6074
5821
|
children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.List, { className: "flex items-center gap-1", children })
|
|
6075
5822
|
}
|
|
@@ -6079,16 +5826,16 @@ function MegaMenu({
|
|
|
6079
5826
|
}
|
|
6080
5827
|
var TOP_ITEM = "group/top inline-flex items-center gap-1.5 h-10 px-3 rounded-md text-sm font-medium select-none text-foreground-secondary hover:text-foreground hover:bg-surface-raised data-[state=open]:text-accent data-[active]:text-accent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent";
|
|
6081
5828
|
function MegaMenuItem({ label, icon, href, children, className = "" }) {
|
|
6082
|
-
const { align } =
|
|
5829
|
+
const { align } = React28.useContext(MegaMenuContext);
|
|
6083
5830
|
const pos = align === "center" ? "left-1/2 -translate-x-1/2" : align === "end" ? "right-0" : "left-0";
|
|
6084
5831
|
if (!children) {
|
|
6085
|
-
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: [
|
|
6086
5833
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
6087
5834
|
label
|
|
6088
5835
|
] }) });
|
|
6089
5836
|
}
|
|
6090
5837
|
return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Item, { children: [
|
|
6091
|
-
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Trigger, { className:
|
|
5838
|
+
/* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Trigger, { className: cx(TOP_ITEM, className), children: [
|
|
6092
5839
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
6093
5840
|
label,
|
|
6094
5841
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6126,14 +5873,14 @@ function MegaMenuPanel({ children, columns, className = "", style }) {
|
|
|
6126
5873
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6127
5874
|
"div",
|
|
6128
5875
|
{
|
|
6129
|
-
className:
|
|
5876
|
+
className: cx("grid gap-6 p-6", className),
|
|
6130
5877
|
style: { ...layout, maxWidth: "min(92vw, 960px)", ...style },
|
|
6131
5878
|
children
|
|
6132
5879
|
}
|
|
6133
5880
|
);
|
|
6134
5881
|
}
|
|
6135
5882
|
function MegaMenuSection({ title, children, className = "" }) {
|
|
6136
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
5883
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("min-w-0 flex flex-col", className), children: [
|
|
6137
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 }),
|
|
6138
5885
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5", children })
|
|
6139
5886
|
] });
|
|
@@ -6145,12 +5892,12 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
6145
5892
|
active,
|
|
6146
5893
|
href,
|
|
6147
5894
|
onClick,
|
|
6148
|
-
className:
|
|
5895
|
+
className: cx(
|
|
6149
5896
|
"group/link flex items-start gap-3 rounded-md p-3 transition-colors select-none",
|
|
6150
5897
|
"hover:bg-surface-raised focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
6151
5898
|
"data-[active]:bg-surface-raised",
|
|
6152
5899
|
className
|
|
6153
|
-
|
|
5900
|
+
),
|
|
6154
5901
|
children: [
|
|
6155
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 }) }),
|
|
6156
5903
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col min-w-0", children: [
|
|
@@ -6162,10 +5909,10 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
6162
5909
|
);
|
|
6163
5910
|
}
|
|
6164
5911
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
6165
|
-
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 });
|
|
6166
5913
|
}
|
|
6167
|
-
var elementsOfType = (children, type) =>
|
|
6168
|
-
(c) =>
|
|
5914
|
+
var elementsOfType = (children, type) => React28__default.default.Children.toArray(children).filter(
|
|
5915
|
+
(c) => React28__default.default.isValidElement(c) && c.type === type
|
|
6169
5916
|
);
|
|
6170
5917
|
var MOBILE_CHEVRON = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6171
5918
|
"svg",
|
|
@@ -6202,9 +5949,9 @@ function MobileLinkRow({ link, onNavigate }) {
|
|
|
6202
5949
|
);
|
|
6203
5950
|
}
|
|
6204
5951
|
function MobilePanel({ panel, onNavigate }) {
|
|
6205
|
-
const nodes =
|
|
5952
|
+
const nodes = React28__default.default.Children.toArray(panel.props.children);
|
|
6206
5953
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 px-2 pb-3 pt-1", children: nodes.map((node, i) => {
|
|
6207
|
-
if (!
|
|
5954
|
+
if (!React28__default.default.isValidElement(node)) return null;
|
|
6208
5955
|
const el = node;
|
|
6209
5956
|
if (el.type === MegaMenuSection) {
|
|
6210
5957
|
const { title, children } = el.props;
|
|
@@ -6223,8 +5970,8 @@ function MegaMenuMobile({
|
|
|
6223
5970
|
children,
|
|
6224
5971
|
label
|
|
6225
5972
|
}) {
|
|
6226
|
-
const [open, setOpen] =
|
|
6227
|
-
const [expanded, setExpanded] =
|
|
5973
|
+
const [open, setOpen] = React28.useState(false);
|
|
5974
|
+
const [expanded, setExpanded] = React28.useState(null);
|
|
6228
5975
|
const items = elementsOfType(children, MegaMenuItem);
|
|
6229
5976
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden w-full", children: [
|
|
6230
5977
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6252,7 +5999,7 @@ function MegaMenuMobile({
|
|
|
6252
5999
|
{
|
|
6253
6000
|
href,
|
|
6254
6001
|
onClick: () => setOpen(false),
|
|
6255
|
-
className:
|
|
6002
|
+
className: cx(rowBase, divider),
|
|
6256
6003
|
children: [
|
|
6257
6004
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
6258
6005
|
itemLabel
|
|
@@ -6268,7 +6015,7 @@ function MegaMenuMobile({
|
|
|
6268
6015
|
type: "button",
|
|
6269
6016
|
onClick: () => setExpanded(isOpen ? null : i),
|
|
6270
6017
|
"aria-expanded": isOpen,
|
|
6271
|
-
className:
|
|
6018
|
+
className: cx(rowBase, isOpen ? "text-accent" : ""),
|
|
6272
6019
|
children: [
|
|
6273
6020
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-4 w-4 flex-shrink-0 items-center justify-center", children: icon }),
|
|
6274
6021
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: itemLabel }),
|
|
@@ -6297,17 +6044,17 @@ function AppShell({
|
|
|
6297
6044
|
children,
|
|
6298
6045
|
className = ""
|
|
6299
6046
|
}) {
|
|
6300
|
-
const [expanded, setExpanded] =
|
|
6301
|
-
const [isMobile, setIsMobile] =
|
|
6302
|
-
const [mobileOpen, setMobileOpen] =
|
|
6303
|
-
|
|
6047
|
+
const [expanded, setExpanded] = React28.useState(sidebarDefaultExpanded);
|
|
6048
|
+
const [isMobile, setIsMobile] = React28.useState(false);
|
|
6049
|
+
const [mobileOpen, setMobileOpen] = React28.useState(false);
|
|
6050
|
+
React28.useEffect(() => {
|
|
6304
6051
|
const mq = window.matchMedia("(max-width: 767px)");
|
|
6305
6052
|
const update = (e) => setIsMobile(e.matches);
|
|
6306
6053
|
update(mq);
|
|
6307
6054
|
mq.addEventListener("change", update);
|
|
6308
6055
|
return () => mq.removeEventListener("change", update);
|
|
6309
6056
|
}, []);
|
|
6310
|
-
|
|
6057
|
+
React28.useEffect(() => {
|
|
6311
6058
|
if (!isMobile) setMobileOpen(false);
|
|
6312
6059
|
}, [isMobile]);
|
|
6313
6060
|
const hasSidebar = sidebarSections.length > 0;
|
|
@@ -6414,7 +6161,7 @@ function tokenValid(token) {
|
|
|
6414
6161
|
return exp * 1e3 > Date.now();
|
|
6415
6162
|
}
|
|
6416
6163
|
var has = (have, need, all) => all ? need.every((n) => have?.includes(n)) : need.some((n) => have?.includes(n));
|
|
6417
|
-
var
|
|
6164
|
+
var Spinner3 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", className: "h-6 w-6 animate-spin text-accent", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.755 10.059a7.5 7.5 0 0112.548-3.364l1.903 1.903h-3.183a.75.75 0 100 1.5h4.992a.75.75 0 00.75-.75V4.356a.75.75 0 00-1.5 0v3.18l-1.9-1.9A9 9 0 003.306 9.67a.75.75 0 101.45.388zm15.408 3.352a.75.75 0 00-.919.53 7.5 7.5 0 01-12.548 3.364l-1.902-1.903h3.183a.75.75 0 000-1.5H2.984a.75.75 0 00-.75.75v4.992a.75.75 0 001.5 0v-3.18l1.9 1.9a9 9 0 0015.059-4.035.75.75 0 00-.53-.918z" }) });
|
|
6418
6165
|
function SecureLayout({
|
|
6419
6166
|
children,
|
|
6420
6167
|
isAuthenticated,
|
|
@@ -6434,7 +6181,7 @@ function SecureLayout({
|
|
|
6434
6181
|
className = ""
|
|
6435
6182
|
}) {
|
|
6436
6183
|
const reduced = framerMotion.useReducedMotion();
|
|
6437
|
-
const cbs =
|
|
6184
|
+
const cbs = React28.useRef({ canAccess, onGranted, onDeny });
|
|
6438
6185
|
cbs.current = { canAccess, onGranted, onDeny };
|
|
6439
6186
|
const rolesKey = JSON.stringify(roles);
|
|
6440
6187
|
const requiredRolesKey = JSON.stringify(requiredRoles);
|
|
@@ -6449,10 +6196,10 @@ function SecureLayout({
|
|
|
6449
6196
|
if (requiredPermissions?.length && !has(permissions, requiredPermissions, requireAllPermissions)) return false;
|
|
6450
6197
|
return true;
|
|
6451
6198
|
};
|
|
6452
|
-
const [state, setState] =
|
|
6199
|
+
const [state, setState] = React28.useState(
|
|
6453
6200
|
() => !passesSync() ? "denied" : canAccess ? "checking" : "granted"
|
|
6454
6201
|
);
|
|
6455
|
-
|
|
6202
|
+
React28.useEffect(() => {
|
|
6456
6203
|
let cancelled = false;
|
|
6457
6204
|
const { canAccess: check, onGranted: granted, onDeny: deny } = cbs.current;
|
|
6458
6205
|
const finish = (ok) => {
|
|
@@ -6490,7 +6237,7 @@ function SecureLayout({
|
|
|
6490
6237
|
]);
|
|
6491
6238
|
if (state === "checking") {
|
|
6492
6239
|
if (loadingFallback === null) return null;
|
|
6493
|
-
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, {}) });
|
|
6494
6241
|
}
|
|
6495
6242
|
if (state === "denied") {
|
|
6496
6243
|
if (fallback === null) return null;
|
|
@@ -6613,10 +6360,10 @@ function ThemeProvider({
|
|
|
6613
6360
|
className = "",
|
|
6614
6361
|
style
|
|
6615
6362
|
}) {
|
|
6616
|
-
const id =
|
|
6363
|
+
const id = React28__default.default.useId().replace(/:/g, "");
|
|
6617
6364
|
const scopeClass = `geo-th-${id}`;
|
|
6618
|
-
const divRef =
|
|
6619
|
-
|
|
6365
|
+
const divRef = React28.useRef(null);
|
|
6366
|
+
React28.useEffect(() => {
|
|
6620
6367
|
const el = divRef.current;
|
|
6621
6368
|
if (!el) return;
|
|
6622
6369
|
if (colorScheme === "auto") return;
|
|
@@ -6631,8 +6378,8 @@ function ThemeProvider({
|
|
|
6631
6378
|
}
|
|
6632
6379
|
el.classList.toggle("dark", colorScheme === "dark");
|
|
6633
6380
|
}, [colorScheme]);
|
|
6634
|
-
const lightVars =
|
|
6635
|
-
const darkVarStr =
|
|
6381
|
+
const lightVars = React28.useMemo(() => toCssVars(theme), [theme]);
|
|
6382
|
+
const darkVarStr = React28.useMemo(() => {
|
|
6636
6383
|
if (!darkTheme) return "";
|
|
6637
6384
|
const dvars = toCssVars(darkTheme);
|
|
6638
6385
|
if (!Object.keys(dvars).length) return "";
|
|
@@ -6674,7 +6421,7 @@ function NumberInput({
|
|
|
6674
6421
|
readOnly = false,
|
|
6675
6422
|
precision
|
|
6676
6423
|
}) {
|
|
6677
|
-
const errorId =
|
|
6424
|
+
const errorId = React28.useId();
|
|
6678
6425
|
const hasError = errorMessage != null;
|
|
6679
6426
|
const inferredPrecision = precision ?? (Number.isInteger(step) ? 0 : String(step).split(".")[1]?.length ?? 0);
|
|
6680
6427
|
const round = (n) => {
|
|
@@ -6805,8 +6552,8 @@ function Password({
|
|
|
6805
6552
|
showIcon,
|
|
6806
6553
|
hideIcon
|
|
6807
6554
|
}) {
|
|
6808
|
-
const [visible, setVisible] =
|
|
6809
|
-
const errorId =
|
|
6555
|
+
const [visible, setVisible] = React28.useState(false);
|
|
6556
|
+
const errorId = React28.useId();
|
|
6810
6557
|
const hasError = errorMessage != null;
|
|
6811
6558
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6812
6559
|
Field,
|
|
@@ -6879,7 +6626,7 @@ function Checkbox({
|
|
|
6879
6626
|
}) {
|
|
6880
6627
|
const isChecked = checked ?? value ?? false;
|
|
6881
6628
|
const labelFirst = labelPosition === "left";
|
|
6882
|
-
const errorId =
|
|
6629
|
+
const errorId = React28.useId();
|
|
6883
6630
|
const hasError = errorMessage != null;
|
|
6884
6631
|
const box = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6885
6632
|
CheckboxPrimitive__namespace.Root,
|
|
@@ -6987,8 +6734,8 @@ function RadioGroup({
|
|
|
6987
6734
|
className,
|
|
6988
6735
|
errorMessage
|
|
6989
6736
|
}) {
|
|
6990
|
-
const errorId =
|
|
6991
|
-
const groupId =
|
|
6737
|
+
const errorId = React28.useId();
|
|
6738
|
+
const groupId = React28.useId();
|
|
6992
6739
|
const hasError = errorMessage != null;
|
|
6993
6740
|
const labelFirst = labelPosition === "left";
|
|
6994
6741
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7088,21 +6835,21 @@ function Switch({
|
|
|
7088
6835
|
disabled,
|
|
7089
6836
|
errorMessage
|
|
7090
6837
|
}) {
|
|
7091
|
-
const id =
|
|
7092
|
-
const errorId =
|
|
6838
|
+
const id = React28.useId();
|
|
6839
|
+
const errorId = React28.useId();
|
|
7093
6840
|
const hasError = errorMessage != null;
|
|
7094
6841
|
const isControlled = checked !== void 0;
|
|
7095
|
-
const [internal, setInternal] =
|
|
6842
|
+
const [internal, setInternal] = React28.useState(defaultChecked);
|
|
7096
6843
|
const isOn = isControlled ? checked : internal;
|
|
7097
6844
|
const handle = (c) => {
|
|
7098
6845
|
if (!isControlled) setInternal(c);
|
|
7099
6846
|
onChange?.({ target: { checked: c, name } });
|
|
7100
6847
|
};
|
|
7101
|
-
const stateLabel = (active) =>
|
|
6848
|
+
const stateLabel = (active) => cx(
|
|
7102
6849
|
"text-sm select-none transition-colors",
|
|
7103
6850
|
active ? "text-foreground font-medium" : "text-foreground-muted",
|
|
7104
6851
|
disabled ? "opacity-50" : "cursor-pointer"
|
|
7105
|
-
|
|
6852
|
+
);
|
|
7106
6853
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7107
6854
|
Field,
|
|
7108
6855
|
{
|
|
@@ -7143,7 +6890,7 @@ function Switch({
|
|
|
7143
6890
|
}
|
|
7144
6891
|
);
|
|
7145
6892
|
}
|
|
7146
|
-
function
|
|
6893
|
+
function Tag({ children, onRemove, removeLabel, disabled }) {
|
|
7147
6894
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-border bg-surface-raised text-foreground text-xs pl-2 pr-1 py-0.5 max-w-full", children: [
|
|
7148
6895
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
7149
6896
|
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7168,11 +6915,11 @@ function MultiTagRow({
|
|
|
7168
6915
|
labelFor,
|
|
7169
6916
|
onRemove
|
|
7170
6917
|
}) {
|
|
7171
|
-
const wrapRef =
|
|
7172
|
-
const measureRef =
|
|
7173
|
-
const [visibleCount, setVisibleCount] =
|
|
6918
|
+
const wrapRef = React28.useRef(null);
|
|
6919
|
+
const measureRef = React28.useRef(null);
|
|
6920
|
+
const [visibleCount, setVisibleCount] = React28.useState(values.length);
|
|
7174
6921
|
const key = values.map(String).join("|");
|
|
7175
|
-
|
|
6922
|
+
React28.useLayoutEffect(() => {
|
|
7176
6923
|
const wrap = wrapRef.current;
|
|
7177
6924
|
const measure = measureRef.current;
|
|
7178
6925
|
if (!wrap || !measure) return;
|
|
@@ -7227,14 +6974,14 @@ function MultiTagRow({
|
|
|
7227
6974
|
className: "absolute invisible pointer-events-none flex flex-nowrap items-center gap-1.5",
|
|
7228
6975
|
style: { left: -9999, top: -9999 },
|
|
7229
6976
|
children: [
|
|
7230
|
-
values.map((val) => /* @__PURE__ */ jsxRuntime.jsx("span", { "data-mt": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6977
|
+
values.map((val) => /* @__PURE__ */ jsxRuntime.jsx("span", { "data-mt": true, children: /* @__PURE__ */ jsxRuntime.jsx(Tag, { removeLabel: "x", onRemove: () => {
|
|
7231
6978
|
}, children: labelFor(val) }) }, `m-${val}`)),
|
|
7232
6979
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-mm": true, children: moreChip(values.length) })
|
|
7233
6980
|
]
|
|
7234
6981
|
}
|
|
7235
6982
|
),
|
|
7236
6983
|
values.slice(0, visibleCount).map((val) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7237
|
-
|
|
6984
|
+
Tag,
|
|
7238
6985
|
{
|
|
7239
6986
|
disabled,
|
|
7240
6987
|
removeLabel: `Remove ${labelFor(val)}`,
|
|
@@ -7266,16 +7013,16 @@ function Dropdown({
|
|
|
7266
7013
|
size = "md",
|
|
7267
7014
|
className = ""
|
|
7268
7015
|
}) {
|
|
7269
|
-
const [open, setOpen] =
|
|
7270
|
-
const [selectedItems, setSelectedItems] =
|
|
7271
|
-
const [searchTerm, setSearchTerm] =
|
|
7272
|
-
const [innerItems, setInnerItems] =
|
|
7273
|
-
const errorId =
|
|
7016
|
+
const [open, setOpen] = React28.useState(false);
|
|
7017
|
+
const [selectedItems, setSelectedItems] = React28.useState([]);
|
|
7018
|
+
const [searchTerm, setSearchTerm] = React28.useState("");
|
|
7019
|
+
const [innerItems, setInnerItems] = React28.useState([]);
|
|
7020
|
+
const errorId = React28.useId();
|
|
7274
7021
|
const hasError = errorMessage != null;
|
|
7275
|
-
|
|
7022
|
+
React28.useEffect(() => {
|
|
7276
7023
|
setInnerItems(items);
|
|
7277
7024
|
}, [items]);
|
|
7278
|
-
|
|
7025
|
+
React28.useEffect(() => {
|
|
7279
7026
|
if (isMultiselect && Array.isArray(value)) {
|
|
7280
7027
|
setSelectedItems(value);
|
|
7281
7028
|
}
|
|
@@ -7359,7 +7106,7 @@ function Dropdown({
|
|
|
7359
7106
|
onRemove: removeSelected
|
|
7360
7107
|
}
|
|
7361
7108
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0 flex items-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7362
|
-
|
|
7109
|
+
Tag,
|
|
7363
7110
|
{
|
|
7364
7111
|
disabled,
|
|
7365
7112
|
removeLabel: `Remove ${labelFor(value)}`,
|
|
@@ -7467,19 +7214,19 @@ function AutoComplete({
|
|
|
7467
7214
|
required,
|
|
7468
7215
|
htmlFor
|
|
7469
7216
|
}) {
|
|
7470
|
-
const errorId =
|
|
7217
|
+
const errorId = React28.useId();
|
|
7471
7218
|
const hasError = errorMessage != null;
|
|
7472
|
-
const [term, setTerm] =
|
|
7473
|
-
const [open, setOpen] =
|
|
7474
|
-
const [asyncItems, setAsyncItems] =
|
|
7475
|
-
const [loading, setLoading] =
|
|
7219
|
+
const [term, setTerm] = React28.useState("");
|
|
7220
|
+
const [open, setOpen] = React28.useState(false);
|
|
7221
|
+
const [asyncItems, setAsyncItems] = React28.useState([]);
|
|
7222
|
+
const [loading, setLoading] = React28.useState(false);
|
|
7476
7223
|
const isAsync = typeof onSearch === "function";
|
|
7477
|
-
const debounceRef =
|
|
7478
|
-
const requestIdRef =
|
|
7224
|
+
const debounceRef = React28.useRef(null);
|
|
7225
|
+
const requestIdRef = React28.useRef(0);
|
|
7479
7226
|
const staticFiltered = isAsync || !items ? [] : term.trim() ? items.filter(
|
|
7480
7227
|
({ key, label: label2 }) => label2.toLowerCase().includes(term.toLowerCase()) || key.toLowerCase().includes(term.toLowerCase())
|
|
7481
7228
|
) : [];
|
|
7482
|
-
|
|
7229
|
+
React28.useEffect(() => {
|
|
7483
7230
|
if (!isAsync) return;
|
|
7484
7231
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7485
7232
|
if (!term.trim()) {
|
|
@@ -7635,15 +7382,15 @@ function TreeSelect({
|
|
|
7635
7382
|
defaultExpandedKeys = [],
|
|
7636
7383
|
size = "md"
|
|
7637
7384
|
}) {
|
|
7638
|
-
const errorId =
|
|
7385
|
+
const errorId = React28.useId();
|
|
7639
7386
|
const hasError = errorMessage != null;
|
|
7640
|
-
const [open, setOpen] =
|
|
7641
|
-
const [expanded, setExpanded] =
|
|
7642
|
-
const [activeIndex, setActiveIndex] =
|
|
7643
|
-
const listRef =
|
|
7644
|
-
const visible =
|
|
7645
|
-
const didSyncOnOpenRef =
|
|
7646
|
-
|
|
7387
|
+
const [open, setOpen] = React28.useState(false);
|
|
7388
|
+
const [expanded, setExpanded] = React28.useState(() => new Set(defaultExpandedKeys));
|
|
7389
|
+
const [activeIndex, setActiveIndex] = React28.useState(0);
|
|
7390
|
+
const listRef = React28.useRef(null);
|
|
7391
|
+
const visible = React28.useMemo(() => flattenVisible(items, expanded), [items, expanded]);
|
|
7392
|
+
const didSyncOnOpenRef = React28.useRef(false);
|
|
7393
|
+
React28.useEffect(() => {
|
|
7647
7394
|
if (!open) {
|
|
7648
7395
|
didSyncOnOpenRef.current = false;
|
|
7649
7396
|
return;
|
|
@@ -7653,7 +7400,7 @@ function TreeSelect({
|
|
|
7653
7400
|
setActiveIndex(selectedIdx >= 0 ? selectedIdx : 0);
|
|
7654
7401
|
didSyncOnOpenRef.current = true;
|
|
7655
7402
|
}, [open, value]);
|
|
7656
|
-
const selectedNode =
|
|
7403
|
+
const selectedNode = React28.useMemo(
|
|
7657
7404
|
() => value != null ? findNodeByKey(items, value) : null,
|
|
7658
7405
|
[items, value]
|
|
7659
7406
|
);
|
|
@@ -7884,11 +7631,11 @@ function FileInput({
|
|
|
7884
7631
|
required,
|
|
7885
7632
|
icon
|
|
7886
7633
|
}) {
|
|
7887
|
-
const inputRef =
|
|
7888
|
-
const errorId =
|
|
7889
|
-
const [files, setFiles] =
|
|
7890
|
-
const [dragging, setDragging] =
|
|
7891
|
-
const [sizeError, setSizeError] =
|
|
7634
|
+
const inputRef = React28.useRef(null);
|
|
7635
|
+
const errorId = React28.useId();
|
|
7636
|
+
const [files, setFiles] = React28.useState([]);
|
|
7637
|
+
const [dragging, setDragging] = React28.useState(false);
|
|
7638
|
+
const [sizeError, setSizeError] = React28.useState(null);
|
|
7892
7639
|
const effectiveError = errorMessage ?? sizeError ?? void 0;
|
|
7893
7640
|
const openPicker = () => {
|
|
7894
7641
|
if (!disabled) inputRef.current?.click();
|
|
@@ -8079,30 +7826,30 @@ function DatePicker({
|
|
|
8079
7826
|
size = "md",
|
|
8080
7827
|
className = ""
|
|
8081
7828
|
}) {
|
|
8082
|
-
const errorId =
|
|
7829
|
+
const errorId = React28.useId();
|
|
8083
7830
|
const hasError = errorMessage != null;
|
|
8084
|
-
const [open, setOpen] =
|
|
8085
|
-
const [viewMonth, setViewMonth] =
|
|
8086
|
-
const [focusDate, setFocusDate] =
|
|
8087
|
-
const [view, setView] =
|
|
8088
|
-
const gridRef =
|
|
8089
|
-
|
|
7831
|
+
const [open, setOpen] = React28.useState(false);
|
|
7832
|
+
const [viewMonth, setViewMonth] = React28.useState(() => startOfMonth2(value ?? /* @__PURE__ */ new Date()));
|
|
7833
|
+
const [focusDate, setFocusDate] = React28.useState(() => value ?? /* @__PURE__ */ new Date());
|
|
7834
|
+
const [view, setView] = React28.useState("days");
|
|
7835
|
+
const gridRef = React28.useRef(null);
|
|
7836
|
+
React28.useEffect(() => {
|
|
8090
7837
|
if (!open) return;
|
|
8091
7838
|
const target = value ?? /* @__PURE__ */ new Date();
|
|
8092
7839
|
setViewMonth(startOfMonth2(target));
|
|
8093
7840
|
setFocusDate(target);
|
|
8094
7841
|
setView("days");
|
|
8095
7842
|
}, [open, value]);
|
|
8096
|
-
|
|
7843
|
+
React28.useEffect(() => {
|
|
8097
7844
|
if (!open) return;
|
|
8098
7845
|
const cell = gridRef.current?.querySelector(`[data-day="${defaultFormat3(focusDate)}"]`);
|
|
8099
7846
|
cell?.focus();
|
|
8100
7847
|
}, [open, focusDate]);
|
|
8101
|
-
const weekdays =
|
|
7848
|
+
const weekdays = React28.useMemo(() => {
|
|
8102
7849
|
const ordered = WEEKDAY_SHORT.slice(weekStartsOn).concat(WEEKDAY_SHORT.slice(0, weekStartsOn));
|
|
8103
7850
|
return ordered;
|
|
8104
7851
|
}, [weekStartsOn]);
|
|
8105
|
-
const grid =
|
|
7852
|
+
const grid = React28.useMemo(() => buildGrid(viewMonth, weekStartsOn), [viewMonth, weekStartsOn]);
|
|
8106
7853
|
const isDisabled = (d) => {
|
|
8107
7854
|
if (min && d < min) return true;
|
|
8108
7855
|
if (max && d > max) return true;
|
|
@@ -8211,7 +7958,7 @@ function DatePicker({
|
|
|
8211
7958
|
},
|
|
8212
7959
|
"aria-label": view === "days" ? "Previous month" : view === "months" ? "Previous year" : "Previous decade",
|
|
8213
7960
|
className: "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 transition-colors",
|
|
8214
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7961
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft, {})
|
|
8215
7962
|
}
|
|
8216
7963
|
),
|
|
8217
7964
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8246,7 +7993,7 @@ function DatePicker({
|
|
|
8246
7993
|
},
|
|
8247
7994
|
"aria-label": view === "days" ? "Next month" : view === "months" ? "Next year" : "Next decade",
|
|
8248
7995
|
className: "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 transition-colors",
|
|
8249
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7996
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRight2, {})
|
|
8250
7997
|
}
|
|
8251
7998
|
)
|
|
8252
7999
|
] }),
|
|
@@ -8361,10 +8108,10 @@ function CalendarIcon() {
|
|
|
8361
8108
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 9h18M8 3v4M16 3v4", strokeLinecap: "round" })
|
|
8362
8109
|
] });
|
|
8363
8110
|
}
|
|
8364
|
-
function
|
|
8111
|
+
function ChevronLeft() {
|
|
8365
8112
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) });
|
|
8366
8113
|
}
|
|
8367
|
-
function
|
|
8114
|
+
function ChevronRight2() {
|
|
8368
8115
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
8369
8116
|
}
|
|
8370
8117
|
var LINE_HEIGHT_PX = 21;
|
|
@@ -8392,10 +8139,10 @@ function TextArea({
|
|
|
8392
8139
|
style,
|
|
8393
8140
|
inputStyle
|
|
8394
8141
|
}) {
|
|
8395
|
-
const errorId =
|
|
8142
|
+
const errorId = React28.useId();
|
|
8396
8143
|
const hasError = errorMessage != null;
|
|
8397
|
-
const ref =
|
|
8398
|
-
|
|
8144
|
+
const ref = React28.useRef(null);
|
|
8145
|
+
React28.useLayoutEffect(() => {
|
|
8399
8146
|
if (!autoGrow) return;
|
|
8400
8147
|
const el = ref.current;
|
|
8401
8148
|
if (!el) return;
|
|
@@ -8467,14 +8214,14 @@ function Slider({
|
|
|
8467
8214
|
name,
|
|
8468
8215
|
htmlFor
|
|
8469
8216
|
}) {
|
|
8470
|
-
const errorId =
|
|
8217
|
+
const errorId = React28.useId();
|
|
8471
8218
|
const hasError = errorMessage != null;
|
|
8472
8219
|
const isRange = Array.isArray(value ?? defaultValue);
|
|
8473
|
-
const [internal, setInternal] =
|
|
8220
|
+
const [internal, setInternal] = React28.useState(
|
|
8474
8221
|
() => toArray(value) ?? toArray(defaultValue) ?? [min]
|
|
8475
8222
|
);
|
|
8476
8223
|
const current = toArray(value) ?? internal;
|
|
8477
|
-
const [dragging, setDragging] =
|
|
8224
|
+
const [dragging, setDragging] = React28.useState(false);
|
|
8478
8225
|
const emit = (arr) => {
|
|
8479
8226
|
setInternal(arr);
|
|
8480
8227
|
const next = isRange ? [arr[0], arr[1]] : arr[0];
|
|
@@ -8569,11 +8316,11 @@ function TagsInput({
|
|
|
8569
8316
|
validate,
|
|
8570
8317
|
separators = ["Enter", ","]
|
|
8571
8318
|
}) {
|
|
8572
|
-
const errorId =
|
|
8573
|
-
const inputRef =
|
|
8574
|
-
const [internal, setInternal] =
|
|
8575
|
-
const [draft, setDraft] =
|
|
8576
|
-
const [localError, setLocalError] =
|
|
8319
|
+
const errorId = React28.useId();
|
|
8320
|
+
const inputRef = React28.useRef(null);
|
|
8321
|
+
const [internal, setInternal] = React28.useState(defaultValue ?? []);
|
|
8322
|
+
const [draft, setDraft] = React28.useState("");
|
|
8323
|
+
const [localError, setLocalError] = React28.useState(null);
|
|
8577
8324
|
const tags = value ?? internal;
|
|
8578
8325
|
const hasError = errorMessage != null || localError != null;
|
|
8579
8326
|
const errorText = errorMessage ?? localError ?? void 0;
|
|
@@ -8641,7 +8388,7 @@ function TagsInput({
|
|
|
8641
8388
|
onClick: () => inputRef.current?.focus(),
|
|
8642
8389
|
children: [
|
|
8643
8390
|
tags.map((tag, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8644
|
-
|
|
8391
|
+
Tag,
|
|
8645
8392
|
{
|
|
8646
8393
|
disabled,
|
|
8647
8394
|
removeLabel: `Remove ${tag}`,
|
|
@@ -8704,9 +8451,9 @@ function OtpInput({
|
|
|
8704
8451
|
className,
|
|
8705
8452
|
groupAfter
|
|
8706
8453
|
}) {
|
|
8707
|
-
const errorId =
|
|
8454
|
+
const errorId = React28.useId();
|
|
8708
8455
|
const hasError = errorMessage != null;
|
|
8709
|
-
const refs =
|
|
8456
|
+
const refs = React28.useRef([]);
|
|
8710
8457
|
const chars = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
8711
8458
|
const pattern = mode === "numeric" ? /[0-9]/ : /[a-zA-Z0-9]/;
|
|
8712
8459
|
const emit = (next) => {
|
|
@@ -8755,7 +8502,7 @@ function OtpInput({
|
|
|
8755
8502
|
emit(valid.join(""));
|
|
8756
8503
|
focusBox(valid.length);
|
|
8757
8504
|
};
|
|
8758
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8505
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React28__default.default.Fragment, { children: [
|
|
8759
8506
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8760
8507
|
"input",
|
|
8761
8508
|
{
|
|
@@ -8793,7 +8540,7 @@ function OtpInput({
|
|
|
8793
8540
|
] }, idx)) }) });
|
|
8794
8541
|
}
|
|
8795
8542
|
var ICON_SIZE = { sm: "w-4 h-4", md: "w-5 h-5", lg: "w-7 h-7" };
|
|
8796
|
-
var
|
|
8543
|
+
var Star = (filled) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: filled ? "currentColor" : "none", stroke: "currentColor", strokeWidth: filled ? 0 : 1.5, className: "w-full h-full", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11.48 3.5a.56.56 0 011.04 0l2.13 4.77 5.18.5a.56.56 0 01.32.97l-3.9 3.46 1.15 5.1a.56.56 0 01-.83.6L12 16.8l-4.57 2.6a.56.56 0 01-.83-.6l1.15-5.1-3.9-3.46a.56.56 0 01.32-.97l5.18-.5L11.48 3.5z" }) });
|
|
8797
8544
|
function Rating({
|
|
8798
8545
|
value,
|
|
8799
8546
|
defaultValue = 0,
|
|
@@ -8805,7 +8552,7 @@ function Rating({
|
|
|
8805
8552
|
label,
|
|
8806
8553
|
size = "md",
|
|
8807
8554
|
disabled,
|
|
8808
|
-
icon =
|
|
8555
|
+
icon = Star,
|
|
8809
8556
|
errorMessage,
|
|
8810
8557
|
name,
|
|
8811
8558
|
layout = "vertical",
|
|
@@ -8813,9 +8560,9 @@ function Rating({
|
|
|
8813
8560
|
className,
|
|
8814
8561
|
required
|
|
8815
8562
|
}) {
|
|
8816
|
-
const errorId =
|
|
8817
|
-
const [internal, setInternal] =
|
|
8818
|
-
const [hover, setHover] =
|
|
8563
|
+
const errorId = React28.useId();
|
|
8564
|
+
const [internal, setInternal] = React28.useState(defaultValue);
|
|
8565
|
+
const [hover, setHover] = React28.useState(null);
|
|
8819
8566
|
const current = value ?? internal;
|
|
8820
8567
|
const display2 = hover ?? current;
|
|
8821
8568
|
const interactive = !readOnly && !disabled;
|
|
@@ -8938,9 +8685,9 @@ function TimePicker({
|
|
|
8938
8685
|
required,
|
|
8939
8686
|
style
|
|
8940
8687
|
}) {
|
|
8941
|
-
const errorId =
|
|
8688
|
+
const errorId = React28.useId();
|
|
8942
8689
|
const hasError = errorMessage != null;
|
|
8943
|
-
const [open, setOpen] =
|
|
8690
|
+
const [open, setOpen] = React28.useState(false);
|
|
8944
8691
|
const parsed = parse(value) ?? { h: 0, m: 0, s: 0 };
|
|
8945
8692
|
const update = (next) => {
|
|
8946
8693
|
const merged = { ...parsed, ...next };
|
|
@@ -9064,13 +8811,13 @@ function DateRangePicker({
|
|
|
9064
8811
|
required,
|
|
9065
8812
|
style
|
|
9066
8813
|
}) {
|
|
9067
|
-
const errorId =
|
|
8814
|
+
const errorId = React28.useId();
|
|
9068
8815
|
const hasError = errorMessage != null;
|
|
9069
|
-
const [open, setOpen] =
|
|
9070
|
-
const [leftMonth, setLeftMonth] =
|
|
9071
|
-
const [pendingStart, setPendingStart] =
|
|
9072
|
-
const [hoverDate, setHoverDate] =
|
|
9073
|
-
const weekdays =
|
|
8816
|
+
const [open, setOpen] = React28.useState(false);
|
|
8817
|
+
const [leftMonth, setLeftMonth] = React28.useState(() => startOfMonth3(value.start ?? /* @__PURE__ */ new Date()));
|
|
8818
|
+
const [pendingStart, setPendingStart] = React28.useState(null);
|
|
8819
|
+
const [hoverDate, setHoverDate] = React28.useState(null);
|
|
8820
|
+
const weekdays = React28.useMemo(
|
|
9074
8821
|
() => WEEKDAY.slice(weekStartsOn).concat(WEEKDAY.slice(0, weekStartsOn)),
|
|
9075
8822
|
[weekStartsOn]
|
|
9076
8823
|
);
|
|
@@ -9246,10 +8993,10 @@ function ColorPicker({
|
|
|
9246
8993
|
required,
|
|
9247
8994
|
placeholder = "Pick a colour\u2026"
|
|
9248
8995
|
}) {
|
|
9249
|
-
const errorId =
|
|
8996
|
+
const errorId = React28.useId();
|
|
9250
8997
|
const hasError = errorMessage != null;
|
|
9251
|
-
const [open, setOpen] =
|
|
9252
|
-
const [draft, setDraft] =
|
|
8998
|
+
const [open, setOpen] = React28.useState(false);
|
|
8999
|
+
const [draft, setDraft] = React28.useState(value);
|
|
9253
9000
|
const valid = HEX_RE.test(value);
|
|
9254
9001
|
const pick = (hex) => {
|
|
9255
9002
|
onChange?.(hex);
|
|
@@ -9336,7 +9083,7 @@ function ColorPicker({
|
|
|
9336
9083
|
}
|
|
9337
9084
|
var CUSTOM_EVENT = "oxy-local-storage";
|
|
9338
9085
|
function useLocalStorage(key, initialValue) {
|
|
9339
|
-
const read =
|
|
9086
|
+
const read = React28.useCallback(() => {
|
|
9340
9087
|
if (typeof window === "undefined") return initialValue;
|
|
9341
9088
|
try {
|
|
9342
9089
|
const item = window.localStorage.getItem(key);
|
|
@@ -9345,8 +9092,8 @@ function useLocalStorage(key, initialValue) {
|
|
|
9345
9092
|
return initialValue;
|
|
9346
9093
|
}
|
|
9347
9094
|
}, [key]);
|
|
9348
|
-
const [stored, setStored] =
|
|
9349
|
-
const setValue =
|
|
9095
|
+
const [stored, setStored] = React28.useState(read);
|
|
9096
|
+
const setValue = React28.useCallback((value) => {
|
|
9350
9097
|
setStored((prev) => {
|
|
9351
9098
|
const next = value instanceof Function ? value(prev) : value;
|
|
9352
9099
|
try {
|
|
@@ -9359,7 +9106,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
9359
9106
|
return next;
|
|
9360
9107
|
});
|
|
9361
9108
|
}, [key]);
|
|
9362
|
-
const remove =
|
|
9109
|
+
const remove = React28.useCallback(() => {
|
|
9363
9110
|
try {
|
|
9364
9111
|
if (typeof window !== "undefined") {
|
|
9365
9112
|
window.localStorage.removeItem(key);
|
|
@@ -9369,10 +9116,10 @@ function useLocalStorage(key, initialValue) {
|
|
|
9369
9116
|
}
|
|
9370
9117
|
setStored(initialValue);
|
|
9371
9118
|
}, [key]);
|
|
9372
|
-
|
|
9119
|
+
React28.useEffect(() => {
|
|
9373
9120
|
setStored(read());
|
|
9374
9121
|
}, [key, read]);
|
|
9375
|
-
|
|
9122
|
+
React28.useEffect(() => {
|
|
9376
9123
|
if (typeof window === "undefined") return;
|
|
9377
9124
|
const onStorage = (e) => {
|
|
9378
9125
|
if (e.key === null || e.key === key) setStored(read());
|
|
@@ -9391,8 +9138,8 @@ function useLocalStorage(key, initialValue) {
|
|
|
9391
9138
|
}
|
|
9392
9139
|
function useMediaQuery(query) {
|
|
9393
9140
|
const get = () => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false;
|
|
9394
|
-
const [matches, setMatches] =
|
|
9395
|
-
|
|
9141
|
+
const [matches, setMatches] = React28.useState(get);
|
|
9142
|
+
React28.useEffect(() => {
|
|
9396
9143
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
9397
9144
|
const mql = window.matchMedia(query);
|
|
9398
9145
|
const onChange = () => setMatches(mql.matches);
|
|
@@ -9423,8 +9170,8 @@ function decodeSegment(seg) {
|
|
|
9423
9170
|
}
|
|
9424
9171
|
}
|
|
9425
9172
|
function useJwt(token) {
|
|
9426
|
-
const [, tick] =
|
|
9427
|
-
const decoded =
|
|
9173
|
+
const [, tick] = React28.useState(0);
|
|
9174
|
+
const decoded = React28.useMemo(() => {
|
|
9428
9175
|
if (!token) return { payload: null, header: null, exp: null };
|
|
9429
9176
|
const [h, p] = token.split(".");
|
|
9430
9177
|
const header = decodeSegment(h);
|
|
@@ -9432,7 +9179,7 @@ function useJwt(token) {
|
|
|
9432
9179
|
const exp = payload && typeof payload.exp === "number" ? payload.exp : null;
|
|
9433
9180
|
return { payload, header, exp };
|
|
9434
9181
|
}, [token]);
|
|
9435
|
-
|
|
9182
|
+
React28.useEffect(() => {
|
|
9436
9183
|
if (decoded.exp == null) return;
|
|
9437
9184
|
const ms = decoded.exp * 1e3 - Date.now();
|
|
9438
9185
|
if (ms <= 0) return;
|
|
@@ -9467,7 +9214,7 @@ function Jumbotron({
|
|
|
9467
9214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9468
9215
|
"section",
|
|
9469
9216
|
{
|
|
9470
|
-
className:
|
|
9217
|
+
className: cx("relative overflow-hidden rounded-2xl px-6 py-16 sm:px-10 sm:py-24", bgClass, className),
|
|
9471
9218
|
style: { ...background === "gradient" ? { backgroundImage: GRADIENT } : null, ...style },
|
|
9472
9219
|
children: split ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto grid max-w-6xl items-center gap-10 lg:grid-cols-2", children: [
|
|
9473
9220
|
copy,
|
|
@@ -9495,7 +9242,7 @@ function FeatureGrid({
|
|
|
9495
9242
|
style
|
|
9496
9243
|
}) {
|
|
9497
9244
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9498
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9245
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9499
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: [
|
|
9500
9247
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9501
9248
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9515,10 +9262,10 @@ function FeatureGrid({
|
|
|
9515
9262
|
] }, f.key ?? i)) })
|
|
9516
9263
|
] });
|
|
9517
9264
|
}
|
|
9518
|
-
var
|
|
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" }) });
|
|
9519
9266
|
function PricingPlans({ plans, eyebrow, title, description, className = "", style }) {
|
|
9520
9267
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9521
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9268
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9522
9269
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9523
9270
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9524
9271
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9540,7 +9287,7 @@ function PricingPlans({ plans, eyebrow, title, description, className = "", styl
|
|
|
9540
9287
|
] }),
|
|
9541
9288
|
p.description != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm leading-relaxed text-foreground-secondary", children: p.description }),
|
|
9542
9289
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-6 flex flex-1 flex-col gap-2.5", children: p.features.map((f, fi) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex gap-2 text-sm text-foreground-secondary", children: [
|
|
9543
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9290
|
+
/* @__PURE__ */ jsxRuntime.jsx(Check3, {}),
|
|
9544
9291
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: f })
|
|
9545
9292
|
] }, fi)) }),
|
|
9546
9293
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9569,7 +9316,7 @@ function Stars({ value }) {
|
|
|
9569
9316
|
}
|
|
9570
9317
|
function Testimonials({ testimonials, eyebrow, title, description, columns = 3, className = "", style }) {
|
|
9571
9318
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9572
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9319
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("px-2", className), style, children: [
|
|
9573
9320
|
hasHeader && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "mb-10 flex flex-col items-center gap-3 text-center", children: [
|
|
9574
9321
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9575
9322
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
@@ -9606,13 +9353,13 @@ function SlideShow({
|
|
|
9606
9353
|
style
|
|
9607
9354
|
}) {
|
|
9608
9355
|
const reduced = framerMotion.useReducedMotion();
|
|
9609
|
-
const [index, setIndex] =
|
|
9610
|
-
const [paused, setPaused] =
|
|
9356
|
+
const [index, setIndex] = React28.useState(0);
|
|
9357
|
+
const [paused, setPaused] = React28.useState(false);
|
|
9611
9358
|
const count = slides.length;
|
|
9612
9359
|
const idx = count ? (index % count + count) % count : 0;
|
|
9613
|
-
const go =
|
|
9614
|
-
const timer =
|
|
9615
|
-
|
|
9360
|
+
const go = React28.useCallback((d) => setIndex((i) => i + d), []);
|
|
9361
|
+
const timer = React28.useRef(null);
|
|
9362
|
+
React28.useEffect(() => {
|
|
9616
9363
|
if (!autoPlay || paused || count <= 1) return;
|
|
9617
9364
|
timer.current = setInterval(() => setIndex((i) => i + 1), interval);
|
|
9618
9365
|
return () => {
|
|
@@ -9628,7 +9375,7 @@ function SlideShow({
|
|
|
9628
9375
|
{
|
|
9629
9376
|
"aria-label": ariaLabel,
|
|
9630
9377
|
"aria-roledescription": "carousel",
|
|
9631
|
-
className:
|
|
9378
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9632
9379
|
style: { height, ...style },
|
|
9633
9380
|
onMouseEnter: () => setPaused(true),
|
|
9634
9381
|
onMouseLeave: () => setPaused(false),
|
|
@@ -9674,7 +9421,7 @@ function SlideShow({
|
|
|
9674
9421
|
);
|
|
9675
9422
|
}
|
|
9676
9423
|
var PlayGlyph = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", className: "h-7 w-7 translate-x-0.5", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5v14l11-7z" }) });
|
|
9677
|
-
function
|
|
9424
|
+
function Video({
|
|
9678
9425
|
src,
|
|
9679
9426
|
embedUrl,
|
|
9680
9427
|
poster,
|
|
@@ -9688,8 +9435,8 @@ function Video2({
|
|
|
9688
9435
|
className = "",
|
|
9689
9436
|
style
|
|
9690
9437
|
}) {
|
|
9691
|
-
const [playing, setPlaying] =
|
|
9692
|
-
const frame =
|
|
9438
|
+
const [playing, setPlaying] = React28.useState(autoPlay);
|
|
9439
|
+
const frame = cx("relative w-full overflow-hidden bg-backdrop", framed ? "rounded-2xl border border-border shadow-sm" : "", className);
|
|
9693
9440
|
const ratio = aspect.replace("/", " / ");
|
|
9694
9441
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: frame, style: { aspectRatio: ratio, ...style }, children: embedUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9695
9442
|
"iframe",
|
|
@@ -9743,7 +9490,7 @@ function Parallax({
|
|
|
9743
9490
|
style
|
|
9744
9491
|
}) {
|
|
9745
9492
|
const reduced = framerMotion.useReducedMotion();
|
|
9746
|
-
const ref =
|
|
9493
|
+
const ref = React28.useRef(null);
|
|
9747
9494
|
const { scrollYProgress } = framerMotion.useScroll({ target: ref, offset: ["start end", "end start"] });
|
|
9748
9495
|
const shift = Math.max(0, Math.min(1, speed)) * 100;
|
|
9749
9496
|
const y = framerMotion.useTransform(scrollYProgress, [0, 1], reduced ? ["0%", "0%"] : [`-${shift / 2}%`, `${shift / 2}%`]);
|
|
@@ -9751,7 +9498,7 @@ function Parallax({
|
|
|
9751
9498
|
"div",
|
|
9752
9499
|
{
|
|
9753
9500
|
ref,
|
|
9754
|
-
className:
|
|
9501
|
+
className: cx("relative overflow-hidden rounded-2xl", className),
|
|
9755
9502
|
style: { height, ...style },
|
|
9756
9503
|
children: [
|
|
9757
9504
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9794,7 +9541,7 @@ function Blog({
|
|
|
9794
9541
|
style
|
|
9795
9542
|
}) {
|
|
9796
9543
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9797
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className:
|
|
9544
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cx("w-full", className), style, children: [
|
|
9798
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: [
|
|
9799
9546
|
eyebrow != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-accent", children: eyebrow }),
|
|
9800
9547
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9811,7 +9558,7 @@ function Blog({
|
|
|
9811
9558
|
post.tag != null && !post.image && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: "accent", variant: "soft", size: "sm", children: post.tag }) }),
|
|
9812
9559
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold leading-snug text-foreground transition-colors group-hover:text-accent", children: post.title }),
|
|
9813
9560
|
post.excerpt != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-3 text-sm leading-relaxed text-foreground-secondary", children: post.excerpt }),
|
|
9814
|
-
meta.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-wrap items-center gap-x-2 gap-y-1 pt-3 text-xs text-foreground-muted", children: meta.map((m, j) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9561
|
+
meta.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-wrap items-center gap-x-2 gap-y-1 pt-3 text-xs text-foreground-muted", children: meta.map((m, j) => /* @__PURE__ */ jsxRuntime.jsxs(React28__default.default.Fragment, { children: [
|
|
9815
9562
|
j > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
9816
9563
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: m })
|
|
9817
9564
|
] }, j)) })
|
|
@@ -9856,7 +9603,7 @@ function Socials({
|
|
|
9856
9603
|
className = "",
|
|
9857
9604
|
style
|
|
9858
9605
|
}) {
|
|
9859
|
-
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) => {
|
|
9860
9607
|
const label = link.label ?? (link.platform ? link.platform[0].toUpperCase() + link.platform.slice(1) : "Link");
|
|
9861
9608
|
const icon = link.icon ?? (link.platform ? ICONS[link.platform] : null);
|
|
9862
9609
|
const ext = newTab && !link.href.startsWith("mailto:");
|
|
@@ -9907,7 +9654,7 @@ function CookieConsent({
|
|
|
9907
9654
|
role: "dialog",
|
|
9908
9655
|
"aria-label": "Cookie consent",
|
|
9909
9656
|
"aria-live": "polite",
|
|
9910
|
-
className:
|
|
9657
|
+
className: cx("fixed z-[60]", POS2[position], className),
|
|
9911
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: [
|
|
9912
9659
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 text-sm leading-relaxed text-foreground-secondary", children: [
|
|
9913
9660
|
title != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 font-semibold text-foreground", children: title }),
|
|
@@ -9940,8 +9687,8 @@ function LeadCapture({
|
|
|
9940
9687
|
className = "",
|
|
9941
9688
|
style
|
|
9942
9689
|
}) {
|
|
9943
|
-
const [email, setEmail] =
|
|
9944
|
-
const [done, setDone] =
|
|
9690
|
+
const [email, setEmail] = React28.useState("");
|
|
9691
|
+
const [done, setDone] = React28.useState(false);
|
|
9945
9692
|
const submit = (e) => {
|
|
9946
9693
|
e.preventDefault();
|
|
9947
9694
|
const value = email.trim();
|
|
@@ -9953,7 +9700,7 @@ function LeadCapture({
|
|
|
9953
9700
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9954
9701
|
"section",
|
|
9955
9702
|
{
|
|
9956
|
-
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),
|
|
9957
9704
|
style: { ...isGradient ? { backgroundImage: GRADIENT2 } : {}, ...style },
|
|
9958
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: [
|
|
9959
9706
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
@@ -9984,6 +9731,14 @@ function LeadCapture({
|
|
|
9984
9731
|
);
|
|
9985
9732
|
}
|
|
9986
9733
|
|
|
9734
|
+
Object.defineProperty(exports, "Icon", {
|
|
9735
|
+
enumerable: true,
|
|
9736
|
+
get: function () { return chunk4V4U2W7K_cjs.icons_default; }
|
|
9737
|
+
});
|
|
9738
|
+
Object.defineProperty(exports, "createIcon", {
|
|
9739
|
+
enumerable: true,
|
|
9740
|
+
get: function () { return chunk4V4U2W7K_cjs.createIcon; }
|
|
9741
|
+
});
|
|
9987
9742
|
Object.defineProperty(exports, "COLORS", {
|
|
9988
9743
|
enumerable: true,
|
|
9989
9744
|
get: function () { return chunkOAV4TA4B_cjs.colors_default; }
|
|
@@ -10018,7 +9773,7 @@ exports.CartProvider = CartProvider;
|
|
|
10018
9773
|
exports.Catalog = Catalog;
|
|
10019
9774
|
exports.CatalogCarousel = CatalogCarousel;
|
|
10020
9775
|
exports.CatalogGrid = CatalogGrid;
|
|
10021
|
-
exports.Chat =
|
|
9776
|
+
exports.Chat = Chat;
|
|
10022
9777
|
exports.Checkbox = Checkbox;
|
|
10023
9778
|
exports.Checkout = Checkout;
|
|
10024
9779
|
exports.ColorPicker = ColorPicker;
|
|
@@ -10041,14 +9796,13 @@ exports.Form = Form;
|
|
|
10041
9796
|
exports.FormContext = FormContext;
|
|
10042
9797
|
exports.FormField = FormField;
|
|
10043
9798
|
exports.FormStore = FormStore;
|
|
10044
|
-
exports.Grid =
|
|
9799
|
+
exports.Grid = Grid;
|
|
10045
9800
|
exports.GridCard = GridCard;
|
|
10046
|
-
exports.Icon = icons_default;
|
|
10047
9801
|
exports.IconButton = IconButton;
|
|
10048
9802
|
exports.Jumbotron = Jumbotron;
|
|
10049
9803
|
exports.Kbd = Kbd;
|
|
10050
9804
|
exports.LeadCapture = LeadCapture;
|
|
10051
|
-
exports.List =
|
|
9805
|
+
exports.List = List2;
|
|
10052
9806
|
exports.LoadingSpinner = LoadingSpinner;
|
|
10053
9807
|
exports.LogoutTimer = LogoutTimer;
|
|
10054
9808
|
exports.MegaMenu = MegaMenu_default;
|
|
@@ -10081,7 +9835,7 @@ exports.Socials = Socials;
|
|
|
10081
9835
|
exports.Statistic = Statistic;
|
|
10082
9836
|
exports.Stepper = Stepper;
|
|
10083
9837
|
exports.Switch = Switch;
|
|
10084
|
-
exports.Table =
|
|
9838
|
+
exports.Table = Table;
|
|
10085
9839
|
exports.Tabs = Tabs_default;
|
|
10086
9840
|
exports.TagsInput = TagsInput;
|
|
10087
9841
|
exports.Temporal = DatePicker;
|
|
@@ -10098,11 +9852,11 @@ exports.TopBar = TopBar;
|
|
|
10098
9852
|
exports.Tree = Tree;
|
|
10099
9853
|
exports.TreeSelect = TreeSelect;
|
|
10100
9854
|
exports.Typography = Typography;
|
|
10101
|
-
exports.Video =
|
|
9855
|
+
exports.Video = Video;
|
|
10102
9856
|
exports.Wizard = Wizard;
|
|
10103
9857
|
exports.cardNumberError = cardNumberError;
|
|
10104
|
-
exports.createIcon = createIcon;
|
|
10105
9858
|
exports.cvvError = cvvError;
|
|
9859
|
+
exports.cx = cx;
|
|
10106
9860
|
exports.detectBrand = detectBrand;
|
|
10107
9861
|
exports.expiryError = expiryError;
|
|
10108
9862
|
exports.fieldShell = fieldShell;
|