@geomak/ui 6.32.0 → 6.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +600 -481
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +529 -620
- package/dist/index.d.ts +529 -620
- package/dist/index.js +323 -205
- package/dist/index.js.map +1 -1
- package/dist/styles.css +25 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkOAV4TA4B_cjs = require('./chunk-OAV4TA4B.cjs');
|
|
4
|
+
var React29 = require('react');
|
|
4
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var React28 = require('react');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
7
7
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
8
8
|
var DropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
@@ -40,7 +40,7 @@ function _interopNamespace(e) {
|
|
|
40
40
|
return Object.freeze(n);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var React29__default = /*#__PURE__*/_interopDefault(React29);
|
|
44
44
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
45
45
|
var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
|
|
46
46
|
var Dialog__namespace = /*#__PURE__*/_interopNamespace(Dialog);
|
|
@@ -56,168 +56,286 @@ var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimit
|
|
|
56
56
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
57
57
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
111
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
112
|
-
] });
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var
|
|
134
|
-
var
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
var
|
|
140
|
-
var
|
|
141
|
-
var
|
|
142
|
-
var
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
var
|
|
147
|
-
var
|
|
148
|
-
var
|
|
149
|
-
var
|
|
150
|
-
var
|
|
151
|
-
var
|
|
152
|
-
var
|
|
153
|
-
var
|
|
154
|
-
var
|
|
155
|
-
var
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
Icon
|
|
59
|
+
function createIcon(displayName, content, options = {}) {
|
|
60
|
+
const { viewBox = "0 0 24 24", solid = false } = options;
|
|
61
|
+
const Component = React29.forwardRef(function Icon2({ size = 24, title, strokeWidth = 1.5, ...rest }, ref) {
|
|
62
|
+
const a11y = title ? { role: "img", "aria-label": title } : { "aria-hidden": true, focusable: false };
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
64
|
+
"svg",
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
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
|
+
};
|
|
217
335
|
var icons_default = Icon;
|
|
218
336
|
function Portal({ children, target }) {
|
|
219
|
-
const [resolved, setResolved] =
|
|
220
|
-
|
|
337
|
+
const [resolved, setResolved] = React29.useState(null);
|
|
338
|
+
React29.useEffect(() => {
|
|
221
339
|
if (target === null) {
|
|
222
340
|
setResolved(null);
|
|
223
341
|
return;
|
|
@@ -651,7 +769,7 @@ function IconButton({
|
|
|
651
769
|
className = "",
|
|
652
770
|
style
|
|
653
771
|
}) {
|
|
654
|
-
const colorScheme =
|
|
772
|
+
const colorScheme = React29.useMemo(() => {
|
|
655
773
|
if (type === "primary") {
|
|
656
774
|
return "bg-accent text-accent-fg hover:bg-accent-hover";
|
|
657
775
|
}
|
|
@@ -741,7 +859,7 @@ var SIZE_CLASSES = {
|
|
|
741
859
|
md: "h-9 px-4 text-sm gap-1.5 rounded-lg",
|
|
742
860
|
lg: "h-11 px-5 text-sm gap-2 rounded-xl"
|
|
743
861
|
};
|
|
744
|
-
var Button =
|
|
862
|
+
var Button = React29__default.default.forwardRef(function Button2({
|
|
745
863
|
content,
|
|
746
864
|
variant = "primary",
|
|
747
865
|
size = "md",
|
|
@@ -849,7 +967,7 @@ function MenuButton({
|
|
|
849
967
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
850
968
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
851
969
|
].join(" "),
|
|
852
|
-
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
970
|
+
children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(React29__default.default.Fragment, { children: [
|
|
853
971
|
item.separatorBefore && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { className: "my-1 h-px bg-border" }),
|
|
854
972
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
855
973
|
DropdownMenu__namespace.Item,
|
|
@@ -1092,9 +1210,9 @@ function Tooltip({
|
|
|
1092
1210
|
] }) });
|
|
1093
1211
|
}
|
|
1094
1212
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
1095
|
-
var TabsContext =
|
|
1213
|
+
var TabsContext = React29.createContext(null);
|
|
1096
1214
|
function useTabsContext() {
|
|
1097
|
-
const ctx =
|
|
1215
|
+
const ctx = React29.useContext(TabsContext);
|
|
1098
1216
|
if (!ctx) throw new Error("Tabs.List / Tabs.Trigger / Tabs.Panel must be rendered inside <Tabs>.");
|
|
1099
1217
|
return ctx;
|
|
1100
1218
|
}
|
|
@@ -1116,26 +1234,26 @@ function Tabs({
|
|
|
1116
1234
|
children
|
|
1117
1235
|
}) {
|
|
1118
1236
|
const isControlled = value !== void 0;
|
|
1119
|
-
const [internal, setInternal] =
|
|
1237
|
+
const [internal, setInternal] = React29.useState(defaultValue);
|
|
1120
1238
|
const current = isControlled ? value : internal;
|
|
1121
1239
|
const reduced = !!framerMotion.useReducedMotion();
|
|
1122
|
-
const indicatorId =
|
|
1123
|
-
const select =
|
|
1240
|
+
const indicatorId = React29.useId();
|
|
1241
|
+
const select = React29.useCallback((next) => {
|
|
1124
1242
|
if (!isControlled) setInternal(next);
|
|
1125
1243
|
onValueChange?.(next);
|
|
1126
1244
|
}, [isControlled, onValueChange]);
|
|
1127
|
-
const registry =
|
|
1128
|
-
const orderRef =
|
|
1129
|
-
const [, bump] =
|
|
1130
|
-
const registerTab =
|
|
1245
|
+
const registry = React29.useRef(/* @__PURE__ */ new Map());
|
|
1246
|
+
const orderRef = React29.useRef(0);
|
|
1247
|
+
const [, bump] = React29.useState(0);
|
|
1248
|
+
const registerTab = React29.useCallback((val, meta) => {
|
|
1131
1249
|
const existing = registry.current.get(val);
|
|
1132
1250
|
registry.current.set(val, { ...meta, order: existing?.order ?? orderRef.current++ });
|
|
1133
1251
|
if (!existing) bump((v) => v + 1);
|
|
1134
1252
|
}, []);
|
|
1135
|
-
const unregisterTab =
|
|
1253
|
+
const unregisterTab = React29.useCallback((val) => {
|
|
1136
1254
|
if (registry.current.delete(val)) bump((v) => v + 1);
|
|
1137
1255
|
}, []);
|
|
1138
|
-
const getTabs =
|
|
1256
|
+
const getTabs = React29.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 })), []);
|
|
1139
1257
|
return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { value: current, variant, size, orientation, indicatorId, reduced, select, registerTab, unregisterTab, getTabs }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1140
1258
|
TabsPrimitive__namespace.Root,
|
|
1141
1259
|
{
|
|
@@ -1155,10 +1273,10 @@ function Tabs({
|
|
|
1155
1273
|
function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
1156
1274
|
const { variant, orientation, reduced, value } = useTabsContext();
|
|
1157
1275
|
const horizontal = orientation === "horizontal";
|
|
1158
|
-
const scrollRef =
|
|
1159
|
-
const [edges, setEdges] =
|
|
1276
|
+
const scrollRef = React29.useRef(null);
|
|
1277
|
+
const [edges, setEdges] = React29.useState({ start: false, end: false });
|
|
1160
1278
|
const scrollable = variant !== "segmented";
|
|
1161
|
-
|
|
1279
|
+
React29.useLayoutEffect(() => {
|
|
1162
1280
|
const el = scrollRef.current;
|
|
1163
1281
|
if (!el || !scrollable) return;
|
|
1164
1282
|
const update = () => {
|
|
@@ -1183,13 +1301,13 @@ function TabsList({ children, "aria-label": ariaLabel, className = "" }) {
|
|
|
1183
1301
|
ro.disconnect();
|
|
1184
1302
|
};
|
|
1185
1303
|
}, [horizontal, scrollable, children]);
|
|
1186
|
-
const nudge =
|
|
1304
|
+
const nudge = React29.useCallback((dir) => {
|
|
1187
1305
|
const el = scrollRef.current;
|
|
1188
1306
|
if (!el) return;
|
|
1189
1307
|
const amount = (horizontal ? el.clientWidth : el.clientHeight) * 0.7 * dir;
|
|
1190
1308
|
el.scrollBy({ [horizontal ? "left" : "top"]: amount, behavior: reduced ? "auto" : "smooth" });
|
|
1191
1309
|
}, [horizontal, reduced]);
|
|
1192
|
-
|
|
1310
|
+
React29.useLayoutEffect(() => {
|
|
1193
1311
|
const el = scrollRef.current;
|
|
1194
1312
|
if (!el || !scrollable) return;
|
|
1195
1313
|
const active = el.querySelector("[role=tab][data-state=active]");
|
|
@@ -1247,9 +1365,9 @@ function Chevron2({ side, orientation, onClick }) {
|
|
|
1247
1365
|
function OverflowMenu() {
|
|
1248
1366
|
const { getTabs, value, select, orientation } = useTabsContext();
|
|
1249
1367
|
const horizontal = orientation === "horizontal";
|
|
1250
|
-
const [open, setOpen] =
|
|
1251
|
-
const wrapRef =
|
|
1252
|
-
const timer =
|
|
1368
|
+
const [open, setOpen] = React29.useState(false);
|
|
1369
|
+
const wrapRef = React29.useRef(null);
|
|
1370
|
+
const timer = React29.useRef(null);
|
|
1253
1371
|
const openNow = () => {
|
|
1254
1372
|
if (timer.current) clearTimeout(timer.current);
|
|
1255
1373
|
setOpen(true);
|
|
@@ -1257,7 +1375,7 @@ function OverflowMenu() {
|
|
|
1257
1375
|
const closeSoon = () => {
|
|
1258
1376
|
timer.current = setTimeout(() => setOpen(false), 160);
|
|
1259
1377
|
};
|
|
1260
|
-
|
|
1378
|
+
React29.useLayoutEffect(() => {
|
|
1261
1379
|
if (!open) return;
|
|
1262
1380
|
const onDoc = (e) => {
|
|
1263
1381
|
if (wrapRef.current && !wrapRef.current.contains(e.target)) setOpen(false);
|
|
@@ -1338,7 +1456,7 @@ function TabsTrigger({ value, icon, badge, closeable, onClose, disabled, classNa
|
|
|
1338
1456
|
const isActive = active === value;
|
|
1339
1457
|
const horizontal = orientation === "horizontal";
|
|
1340
1458
|
const sz = SIZE[size];
|
|
1341
|
-
|
|
1459
|
+
React29.useLayoutEffect(() => {
|
|
1342
1460
|
registerTab(value, { label: children, icon, disabled });
|
|
1343
1461
|
return () => unregisterTab(value);
|
|
1344
1462
|
}, [value, children, icon, disabled, registerTab, unregisterTab]);
|
|
@@ -1536,7 +1654,7 @@ function Tree({
|
|
|
1536
1654
|
item.key
|
|
1537
1655
|
)) });
|
|
1538
1656
|
}
|
|
1539
|
-
var AccordionCtx =
|
|
1657
|
+
var AccordionCtx = React29.createContext({ variant: "separated" });
|
|
1540
1658
|
function Accordion2({
|
|
1541
1659
|
children,
|
|
1542
1660
|
type = "single",
|
|
@@ -1595,7 +1713,7 @@ var Chevron3 = /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
1595
1713
|
}
|
|
1596
1714
|
);
|
|
1597
1715
|
function AccordionItem({ value, title, icon, children, disabled, className = "" }) {
|
|
1598
|
-
const { variant } =
|
|
1716
|
+
const { variant } = React29.useContext(AccordionCtx);
|
|
1599
1717
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1600
1718
|
AccordionPrimitive__namespace.Item,
|
|
1601
1719
|
{
|
|
@@ -1654,7 +1772,7 @@ function Breadcrumbs({
|
|
|
1654
1772
|
className = "",
|
|
1655
1773
|
style
|
|
1656
1774
|
}) {
|
|
1657
|
-
const [expanded, setExpanded] =
|
|
1775
|
+
const [expanded, setExpanded] = React29.useState(false);
|
|
1658
1776
|
const shouldCollapse = maxItems > 0 && items.length > maxItems && !expanded;
|
|
1659
1777
|
const visible = [];
|
|
1660
1778
|
if (shouldCollapse) {
|
|
@@ -1788,9 +1906,9 @@ var SIZES = {
|
|
|
1788
1906
|
sm: { box: "h-7 w-7 text-xs", center: 14, title: "text-xs", desc: "text-[11px]" },
|
|
1789
1907
|
md: { box: "h-9 w-9 text-sm", center: 18, title: "text-sm", desc: "text-xs" }
|
|
1790
1908
|
};
|
|
1791
|
-
var
|
|
1909
|
+
var Check2 = () => /* @__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" }) });
|
|
1792
1910
|
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" }) });
|
|
1793
|
-
var
|
|
1911
|
+
var Spinner2 = () => /* @__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" }) });
|
|
1794
1912
|
function Indicator({ state, index, step, sizeKey }) {
|
|
1795
1913
|
const reduced = framerMotion.useReducedMotion();
|
|
1796
1914
|
const s = SIZES[sizeKey];
|
|
@@ -1802,7 +1920,7 @@ function Indicator({ state, index, step, sizeKey }) {
|
|
|
1802
1920
|
error: "bg-status-error text-white",
|
|
1803
1921
|
pending: "border border-border bg-surface text-foreground-muted"
|
|
1804
1922
|
};
|
|
1805
|
-
const content = step.icon ?? (state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1923
|
+
const content = step.icon ?? (state === "completed" ? /* @__PURE__ */ jsxRuntime.jsx(Check2, {}) : state === "error" ? /* @__PURE__ */ jsxRuntime.jsx(Cross, {}) : state === "loading" ? /* @__PURE__ */ jsxRuntime.jsx(Spinner2, {}) : index + 1);
|
|
1806
1924
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1807
1925
|
framerMotion.motion.span,
|
|
1808
1926
|
{
|
|
@@ -1838,8 +1956,8 @@ function Stepper({
|
|
|
1838
1956
|
className = ""
|
|
1839
1957
|
}) {
|
|
1840
1958
|
const reduced = framerMotion.useReducedMotion();
|
|
1841
|
-
const [forcedVertical, setForcedVertical] =
|
|
1842
|
-
|
|
1959
|
+
const [forcedVertical, setForcedVertical] = React29.useState(false);
|
|
1960
|
+
React29.useEffect(() => {
|
|
1843
1961
|
if (!responsive || orientation === "vertical") return;
|
|
1844
1962
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
1845
1963
|
const mq = window.matchMedia("(max-width: 767px)");
|
|
@@ -1891,7 +2009,7 @@ function Stepper({
|
|
|
1891
2009
|
] }, step.key);
|
|
1892
2010
|
}) });
|
|
1893
2011
|
}
|
|
1894
|
-
var
|
|
2012
|
+
var Check3 = () => /* @__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" }) });
|
|
1895
2013
|
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" }) });
|
|
1896
2014
|
var NODE = {
|
|
1897
2015
|
complete: "bg-accent text-accent-fg border-accent",
|
|
@@ -1920,7 +2038,7 @@ function Timeline({ events, current, className = "" }) {
|
|
|
1920
2038
|
].join(" "),
|
|
1921
2039
|
children: [
|
|
1922
2040
|
status === "current" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 animate-breathe rounded-full ring-2 ring-accent/40", "aria-hidden": "true" }),
|
|
1923
|
-
event.icon ?? (status === "complete" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2041
|
+
event.icon ?? (status === "complete" ? /* @__PURE__ */ jsxRuntime.jsx(Check3, {}) : status === "error" ? /* @__PURE__ */ jsxRuntime.jsx(Cross2, {}) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${status === "current" ? "bg-accent" : "bg-border"}` }))
|
|
1924
2042
|
]
|
|
1925
2043
|
}
|
|
1926
2044
|
),
|
|
@@ -1948,7 +2066,7 @@ function Kbd({
|
|
|
1948
2066
|
style
|
|
1949
2067
|
}) {
|
|
1950
2068
|
if (keys && keys.length > 0) {
|
|
1951
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2069
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: ["inline-flex items-center gap-1", className].filter(Boolean).join(" "), style, children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(React29__default.default.Fragment, { children: [
|
|
1952
2070
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-xs select-none", children: separator }),
|
|
1953
2071
|
/* @__PURE__ */ jsxRuntime.jsx("kbd", { className: [cap, SIZE3[size]].join(" "), children: k })
|
|
1954
2072
|
] }, `${k}-${i}`)) });
|
|
@@ -2039,13 +2157,13 @@ function FlatCarousel({
|
|
|
2039
2157
|
className = "",
|
|
2040
2158
|
style
|
|
2041
2159
|
}) {
|
|
2042
|
-
const scrollerRef =
|
|
2043
|
-
const slides =
|
|
2044
|
-
const [active, setActive] =
|
|
2045
|
-
const [atStart, setAtStart] =
|
|
2046
|
-
const [atEnd, setAtEnd] =
|
|
2160
|
+
const scrollerRef = React29.useRef(null);
|
|
2161
|
+
const slides = React29__default.default.Children.toArray(children);
|
|
2162
|
+
const [active, setActive] = React29.useState(0);
|
|
2163
|
+
const [atStart, setAtStart] = React29.useState(true);
|
|
2164
|
+
const [atEnd, setAtEnd] = React29.useState(false);
|
|
2047
2165
|
const width = typeof itemWidth === "number" ? `${itemWidth}px` : itemWidth;
|
|
2048
|
-
const update =
|
|
2166
|
+
const update = React29.useCallback(() => {
|
|
2049
2167
|
const el = scrollerRef.current;
|
|
2050
2168
|
if (!el) return;
|
|
2051
2169
|
setAtStart(el.scrollLeft <= 1);
|
|
@@ -2054,7 +2172,7 @@ function FlatCarousel({
|
|
|
2054
2172
|
const slideW = first ? first.getBoundingClientRect().width + gap : el.clientWidth;
|
|
2055
2173
|
setActive(Math.round(el.scrollLeft / slideW));
|
|
2056
2174
|
}, [gap]);
|
|
2057
|
-
|
|
2175
|
+
React29.useEffect(() => {
|
|
2058
2176
|
update();
|
|
2059
2177
|
const el = scrollerRef.current;
|
|
2060
2178
|
if (!el) return;
|
|
@@ -2095,9 +2213,9 @@ function RotatingCarousel({
|
|
|
2095
2213
|
className = "",
|
|
2096
2214
|
style
|
|
2097
2215
|
}) {
|
|
2098
|
-
const slides =
|
|
2216
|
+
const slides = React29__default.default.Children.toArray(children);
|
|
2099
2217
|
const count = slides.length;
|
|
2100
|
-
const [active, setActive] =
|
|
2218
|
+
const [active, setActive] = React29.useState(0);
|
|
2101
2219
|
const reduced = framerMotion.useReducedMotion();
|
|
2102
2220
|
const wrap = (n) => count > 0 ? (n % count + count) % count : 0;
|
|
2103
2221
|
const idx = wrap(active);
|
|
@@ -2300,7 +2418,7 @@ var toDate = (d) => d instanceof Date ? d : new Date(d);
|
|
|
2300
2418
|
var timeLabel = (d) => `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
2301
2419
|
var initials = (name) => (name ?? "").trim().split(/\s+/).slice(0, 2).map((w) => w[0]?.toUpperCase() ?? "").join("") || void 0;
|
|
2302
2420
|
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" }) });
|
|
2303
|
-
var
|
|
2421
|
+
var ArrowDown2 = () => /* @__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" }) });
|
|
2304
2422
|
function TypingDots() {
|
|
2305
2423
|
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)) });
|
|
2306
2424
|
}
|
|
@@ -2317,7 +2435,7 @@ function ChatSkeleton() {
|
|
|
2317
2435
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-8 animate-pulse rounded-2xl bg-surface", style: { width: r.w } })
|
|
2318
2436
|
] }, i)) });
|
|
2319
2437
|
}
|
|
2320
|
-
function
|
|
2438
|
+
function Chat2({
|
|
2321
2439
|
messages,
|
|
2322
2440
|
currentUserId,
|
|
2323
2441
|
onSend,
|
|
@@ -2335,13 +2453,13 @@ function Chat({
|
|
|
2335
2453
|
className = "",
|
|
2336
2454
|
style
|
|
2337
2455
|
}) {
|
|
2338
|
-
const listRef =
|
|
2339
|
-
const atBottomRef =
|
|
2340
|
-
const [showJump, setShowJump] =
|
|
2341
|
-
const [draft, setDraft] =
|
|
2456
|
+
const listRef = React29.useRef(null);
|
|
2457
|
+
const atBottomRef = React29.useRef(true);
|
|
2458
|
+
const [showJump, setShowJump] = React29.useState(false);
|
|
2459
|
+
const [draft, setDraft] = React29.useState("");
|
|
2342
2460
|
const hasHeader = title != null || subtitle != null || avatar != null || headerActions != null;
|
|
2343
2461
|
const isTyping = typingNames.length > 0;
|
|
2344
|
-
const scrollToBottom =
|
|
2462
|
+
const scrollToBottom = React29.useCallback((smooth = true) => {
|
|
2345
2463
|
const el = listRef.current;
|
|
2346
2464
|
if (!el) return;
|
|
2347
2465
|
if (typeof el.scrollTo === "function") el.scrollTo({ top: el.scrollHeight, behavior: smooth ? "smooth" : "auto" });
|
|
@@ -2354,10 +2472,10 @@ function Chat({
|
|
|
2354
2472
|
atBottomRef.current = near;
|
|
2355
2473
|
setShowJump(!near);
|
|
2356
2474
|
};
|
|
2357
|
-
|
|
2475
|
+
React29.useEffect(() => {
|
|
2358
2476
|
if (atBottomRef.current) scrollToBottom(messages.length > 0);
|
|
2359
2477
|
}, [messages.length, isTyping]);
|
|
2360
|
-
|
|
2478
|
+
React29.useEffect(() => {
|
|
2361
2479
|
scrollToBottom(false);
|
|
2362
2480
|
}, [scrollToBottom]);
|
|
2363
2481
|
const send = () => {
|
|
@@ -2435,7 +2553,7 @@ function Chat({
|
|
|
2435
2553
|
onClick: () => scrollToBottom(true),
|
|
2436
2554
|
"aria-label": "Jump to latest",
|
|
2437
2555
|
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",
|
|
2438
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ArrowDown2, {})
|
|
2439
2557
|
}
|
|
2440
2558
|
)
|
|
2441
2559
|
] }),
|
|
@@ -2478,8 +2596,8 @@ var TONE2 = {
|
|
|
2478
2596
|
bad: "text-status-error",
|
|
2479
2597
|
neutral: "text-foreground-muted"
|
|
2480
2598
|
};
|
|
2481
|
-
var
|
|
2482
|
-
var
|
|
2599
|
+
var ArrowUp2 = /* @__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" }) });
|
|
2600
|
+
var ArrowDown3 = /* @__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" }) });
|
|
2483
2601
|
function Statistic({
|
|
2484
2602
|
label,
|
|
2485
2603
|
value,
|
|
@@ -2511,7 +2629,7 @@ function Statistic({
|
|
|
2511
2629
|
suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted text-[0.5em] font-medium self-center", children: suffix })
|
|
2512
2630
|
] }),
|
|
2513
2631
|
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: [
|
|
2514
|
-
dir === "up" ?
|
|
2632
|
+
dir === "up" ? ArrowUp2 : dir === "down" ? ArrowDown3 : null,
|
|
2515
2633
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: delta.value }),
|
|
2516
2634
|
delta.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-muted font-normal", children: delta.label })
|
|
2517
2635
|
] }),
|
|
@@ -2547,7 +2665,7 @@ function FAB({
|
|
|
2547
2665
|
className = "",
|
|
2548
2666
|
style
|
|
2549
2667
|
}) {
|
|
2550
|
-
const [open, setOpen] =
|
|
2668
|
+
const [open, setOpen] = React29.useState(false);
|
|
2551
2669
|
const reduced = framerMotion.useReducedMotion();
|
|
2552
2670
|
const hasDial = !!actions && actions.length > 0;
|
|
2553
2671
|
const bottom = position.startsWith("bottom");
|
|
@@ -2649,8 +2767,8 @@ function PopConfirm({
|
|
|
2649
2767
|
onOpenChange,
|
|
2650
2768
|
className = ""
|
|
2651
2769
|
}) {
|
|
2652
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2653
|
-
const [loading, setLoading] =
|
|
2770
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React29.useState(false);
|
|
2771
|
+
const [loading, setLoading] = React29.useState(false);
|
|
2654
2772
|
const isOpen = open ?? uncontrolledOpen;
|
|
2655
2773
|
const setOpen = (next) => {
|
|
2656
2774
|
onOpenChange?.(next);
|
|
@@ -2737,16 +2855,16 @@ function LogoutTimer({
|
|
|
2737
2855
|
logoutLabel = "Sign out now"
|
|
2738
2856
|
}) {
|
|
2739
2857
|
const reduced = framerMotion.useReducedMotion();
|
|
2740
|
-
const [warning, setWarning] =
|
|
2741
|
-
const [remaining, setRemaining] =
|
|
2742
|
-
const idleTimer =
|
|
2743
|
-
const tick =
|
|
2744
|
-
const deadline =
|
|
2745
|
-
const warningRef =
|
|
2746
|
-
const lastReset =
|
|
2747
|
-
const cbs =
|
|
2858
|
+
const [warning, setWarning] = React29.useState(false);
|
|
2859
|
+
const [remaining, setRemaining] = React29.useState(countdown);
|
|
2860
|
+
const idleTimer = React29.useRef(null);
|
|
2861
|
+
const tick = React29.useRef(null);
|
|
2862
|
+
const deadline = React29.useRef(0);
|
|
2863
|
+
const warningRef = React29.useRef(false);
|
|
2864
|
+
const lastReset = React29.useRef(0);
|
|
2865
|
+
const cbs = React29.useRef({ onLogout, onContinue, onWarning });
|
|
2748
2866
|
cbs.current = { onLogout, onContinue, onWarning };
|
|
2749
|
-
const clearTimers =
|
|
2867
|
+
const clearTimers = React29.useCallback(() => {
|
|
2750
2868
|
if (idleTimer.current) {
|
|
2751
2869
|
clearTimeout(idleTimer.current);
|
|
2752
2870
|
idleTimer.current = null;
|
|
@@ -2756,13 +2874,13 @@ function LogoutTimer({
|
|
|
2756
2874
|
tick.current = null;
|
|
2757
2875
|
}
|
|
2758
2876
|
}, []);
|
|
2759
|
-
const logout =
|
|
2877
|
+
const logout = React29.useCallback(() => {
|
|
2760
2878
|
clearTimers();
|
|
2761
2879
|
warningRef.current = false;
|
|
2762
2880
|
setWarning(false);
|
|
2763
2881
|
cbs.current.onLogout();
|
|
2764
2882
|
}, [clearTimers]);
|
|
2765
|
-
const startIdle =
|
|
2883
|
+
const startIdle = React29.useCallback(() => {
|
|
2766
2884
|
if (idleTimer.current) clearTimeout(idleTimer.current);
|
|
2767
2885
|
idleTimer.current = setTimeout(() => {
|
|
2768
2886
|
warningRef.current = true;
|
|
@@ -2777,7 +2895,7 @@ function LogoutTimer({
|
|
|
2777
2895
|
}, 250);
|
|
2778
2896
|
}, timeout);
|
|
2779
2897
|
}, [timeout, countdown, logout]);
|
|
2780
|
-
const stay =
|
|
2898
|
+
const stay = React29.useCallback(() => {
|
|
2781
2899
|
if (tick.current) {
|
|
2782
2900
|
clearInterval(tick.current);
|
|
2783
2901
|
tick.current = null;
|
|
@@ -2787,7 +2905,7 @@ function LogoutTimer({
|
|
|
2787
2905
|
cbs.current.onContinue?.();
|
|
2788
2906
|
startIdle();
|
|
2789
2907
|
}, [startIdle]);
|
|
2790
|
-
|
|
2908
|
+
React29.useEffect(() => {
|
|
2791
2909
|
if (!enabled) {
|
|
2792
2910
|
clearTimers();
|
|
2793
2911
|
warningRef.current = false;
|
|
@@ -2852,11 +2970,11 @@ function SegmentedControl({
|
|
|
2852
2970
|
"aria-label": ariaLabel
|
|
2853
2971
|
}) {
|
|
2854
2972
|
const sz = SIZE5[size];
|
|
2855
|
-
const groupId =
|
|
2856
|
-
const errorId =
|
|
2973
|
+
const groupId = React29.useId();
|
|
2974
|
+
const errorId = React29.useId();
|
|
2857
2975
|
const hasError = errorMessage != null;
|
|
2858
2976
|
const isControlled = value !== void 0;
|
|
2859
|
-
const [internal, setInternal] =
|
|
2977
|
+
const [internal, setInternal] = React29.useState(defaultValue);
|
|
2860
2978
|
const current = isControlled ? value : internal;
|
|
2861
2979
|
const handle = (v) => {
|
|
2862
2980
|
if (!v) return;
|
|
@@ -2997,8 +3115,8 @@ var normalize = (e) => {
|
|
|
2997
3115
|
const end = e.end ? toDate2(e.end) : new Date(start.getTime() + 36e5);
|
|
2998
3116
|
return { ...e, start, end };
|
|
2999
3117
|
};
|
|
3000
|
-
var
|
|
3001
|
-
var
|
|
3118
|
+
var Spinner3 = () => /* @__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" }) });
|
|
3119
|
+
var Plus2 = () => /* @__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" }) });
|
|
3002
3120
|
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" }) });
|
|
3003
3121
|
function Scheduler({
|
|
3004
3122
|
events: controlledEvents,
|
|
@@ -3016,22 +3134,22 @@ function Scheduler({
|
|
|
3016
3134
|
style
|
|
3017
3135
|
}) {
|
|
3018
3136
|
const reduced = framerMotion.useReducedMotion();
|
|
3019
|
-
const [view, setView] =
|
|
3020
|
-
const [cursor, setCursor] =
|
|
3021
|
-
const [loaded, setLoaded] =
|
|
3022
|
-
const [loading, setLoading] =
|
|
3023
|
-
const [error, setError] =
|
|
3024
|
-
const [reloadKey, setReloadKey] =
|
|
3025
|
-
const [dir, setDir] =
|
|
3026
|
-
const cbRef =
|
|
3137
|
+
const [view, setView] = React29.useState(defaultView);
|
|
3138
|
+
const [cursor, setCursor] = React29.useState(() => defaultDate ?? /* @__PURE__ */ new Date());
|
|
3139
|
+
const [loaded, setLoaded] = React29.useState([]);
|
|
3140
|
+
const [loading, setLoading] = React29.useState(false);
|
|
3141
|
+
const [error, setError] = React29.useState(null);
|
|
3142
|
+
const [reloadKey, setReloadKey] = React29.useState(0);
|
|
3143
|
+
const [dir, setDir] = React29.useState(0);
|
|
3144
|
+
const cbRef = React29.useRef({ loadEvents, onError });
|
|
3027
3145
|
cbRef.current = { loadEvents, onError };
|
|
3028
|
-
const range =
|
|
3146
|
+
const range = React29.useMemo(
|
|
3029
3147
|
() => view === "month" ? monthRange(cursor) : weekRange(cursor, weekStartsOn),
|
|
3030
3148
|
[view, cursor, weekStartsOn]
|
|
3031
3149
|
);
|
|
3032
3150
|
const fromKey = range.from.getTime();
|
|
3033
3151
|
const toKey = range.to.getTime();
|
|
3034
|
-
|
|
3152
|
+
React29.useEffect(() => {
|
|
3035
3153
|
const { loadEvents: loader, onError: onErr } = cbRef.current;
|
|
3036
3154
|
if (!loader) return;
|
|
3037
3155
|
let cancelled = false;
|
|
@@ -3051,16 +3169,16 @@ function Scheduler({
|
|
|
3051
3169
|
cancelled = true;
|
|
3052
3170
|
};
|
|
3053
3171
|
}, [fromKey, toKey, view, reloadKey]);
|
|
3054
|
-
const retry =
|
|
3055
|
-
const events =
|
|
3172
|
+
const retry = React29.useCallback(() => setReloadKey((k) => k + 1), []);
|
|
3173
|
+
const events = React29.useMemo(
|
|
3056
3174
|
() => (controlledEvents ?? loaded).map(normalize),
|
|
3057
3175
|
[controlledEvents, loaded]
|
|
3058
3176
|
);
|
|
3059
|
-
const go =
|
|
3177
|
+
const go = React29.useCallback((delta) => {
|
|
3060
3178
|
setDir(delta);
|
|
3061
3179
|
setCursor((c) => view === "month" ? addMonths(c, delta) : addDays(c, delta * 7));
|
|
3062
3180
|
}, [view]);
|
|
3063
|
-
const goToday =
|
|
3181
|
+
const goToday = React29.useCallback(() => {
|
|
3064
3182
|
setDir(0);
|
|
3065
3183
|
setCursor(/* @__PURE__ */ new Date());
|
|
3066
3184
|
}, []);
|
|
@@ -3088,7 +3206,7 @@ function Scheduler({
|
|
|
3088
3206
|
}
|
|
3089
3207
|
}
|
|
3090
3208
|
),
|
|
3091
|
-
loading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3209
|
+
loading && /* @__PURE__ */ jsxRuntime.jsx(Spinner3, {})
|
|
3092
3210
|
] }),
|
|
3093
3211
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3094
3212
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3101,7 +3219,7 @@ function Scheduler({
|
|
|
3101
3219
|
options: [{ value: "month", label: "Month" }, { value: "week", label: "Week" }]
|
|
3102
3220
|
}
|
|
3103
3221
|
),
|
|
3104
|
-
onNewEvent && /* @__PURE__ */ jsxRuntime.jsx(Button_default, { size: "sm", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3222
|
+
onNewEvent && /* @__PURE__ */ jsxRuntime.jsx(Button_default, { size: "sm", icon: /* @__PURE__ */ jsxRuntime.jsx(Plus2, {}), content: "New event", onClick: onNewEvent })
|
|
3105
3223
|
] })
|
|
3106
3224
|
] }),
|
|
3107
3225
|
/* @__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(
|
|
@@ -3170,9 +3288,9 @@ function SchedulerError({ onRetry }) {
|
|
|
3170
3288
|
] });
|
|
3171
3289
|
}
|
|
3172
3290
|
function MonthYearPicker({ label, cursor, onPick }) {
|
|
3173
|
-
const [open, setOpen] =
|
|
3174
|
-
const [viewYear, setViewYear] =
|
|
3175
|
-
|
|
3291
|
+
const [open, setOpen] = React29.useState(false);
|
|
3292
|
+
const [viewYear, setViewYear] = React29.useState(cursor.getFullYear());
|
|
3293
|
+
React29.useEffect(() => {
|
|
3176
3294
|
if (open) setViewYear(cursor.getFullYear());
|
|
3177
3295
|
}, [open, cursor]);
|
|
3178
3296
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open, onOpenChange: setOpen, children: [
|
|
@@ -3235,7 +3353,7 @@ function MonthView({
|
|
|
3235
3353
|
onSelectSlot,
|
|
3236
3354
|
onSelectEvent
|
|
3237
3355
|
}) {
|
|
3238
|
-
const grid =
|
|
3356
|
+
const grid = React29.useMemo(() => buildMonthGrid(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3239
3357
|
const labels = weekdayLabels(weekStartsOn);
|
|
3240
3358
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
3241
3359
|
/* @__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)) }),
|
|
@@ -3309,11 +3427,11 @@ function WeekView({
|
|
|
3309
3427
|
onSelectSlot,
|
|
3310
3428
|
onSelectEvent
|
|
3311
3429
|
}) {
|
|
3312
|
-
const days =
|
|
3313
|
-
const labels =
|
|
3430
|
+
const days = React29.useMemo(() => getWeekDays(cursor, weekStartsOn), [cursor, weekStartsOn]);
|
|
3431
|
+
const labels = React29.useMemo(() => weekdayLabels(weekStartsOn), [weekStartsOn]);
|
|
3314
3432
|
const dow = (d) => labels[(d.getDay() - weekStartsOn + 7) % 7];
|
|
3315
3433
|
const [startHour, endHour] = dayHours;
|
|
3316
|
-
const hours =
|
|
3434
|
+
const hours = React29.useMemo(
|
|
3317
3435
|
() => Array.from({ length: endHour - startHour }, (_, i) => startHour + i),
|
|
3318
3436
|
[startHour, endHour]
|
|
3319
3437
|
);
|
|
@@ -3504,17 +3622,17 @@ function Cart({
|
|
|
3504
3622
|
] })
|
|
3505
3623
|
] });
|
|
3506
3624
|
}
|
|
3507
|
-
var CartContext =
|
|
3625
|
+
var CartContext = React29.createContext(null);
|
|
3508
3626
|
var clampQty = (qty, max) => {
|
|
3509
3627
|
const lower = Math.max(1, Math.round(qty));
|
|
3510
3628
|
return max != null ? Math.min(lower, max) : lower;
|
|
3511
3629
|
};
|
|
3512
3630
|
function CartProvider({ children, initialItems = [], onChange }) {
|
|
3513
|
-
const [items, setItems] =
|
|
3514
|
-
|
|
3631
|
+
const [items, setItems] = React29.useState(initialItems);
|
|
3632
|
+
React29.useEffect(() => {
|
|
3515
3633
|
onChange?.(items);
|
|
3516
3634
|
}, [items]);
|
|
3517
|
-
const addToCart =
|
|
3635
|
+
const addToCart = React29.useCallback((item, quantity) => {
|
|
3518
3636
|
const addQty = quantity ?? item.quantity ?? 1;
|
|
3519
3637
|
setItems((prev) => {
|
|
3520
3638
|
const existing = prev.find((it) => it.id === item.id);
|
|
@@ -3527,29 +3645,29 @@ function CartProvider({ children, initialItems = [], onChange }) {
|
|
|
3527
3645
|
return [...prev, { ...rest, quantity: clampQty(addQty, item.max) }];
|
|
3528
3646
|
});
|
|
3529
3647
|
}, []);
|
|
3530
|
-
const removeFromCart =
|
|
3648
|
+
const removeFromCart = React29.useCallback((id) => {
|
|
3531
3649
|
setItems((prev) => prev.filter((it) => it.id !== id));
|
|
3532
3650
|
}, []);
|
|
3533
|
-
const updateQuantity =
|
|
3651
|
+
const updateQuantity = React29.useCallback((id, quantity) => {
|
|
3534
3652
|
setItems(
|
|
3535
3653
|
(prev) => prev.map((it) => it.id === id ? { ...it, quantity: clampQty(quantity, it.max) } : it)
|
|
3536
3654
|
);
|
|
3537
3655
|
}, []);
|
|
3538
|
-
const clearCart =
|
|
3539
|
-
const isInCart =
|
|
3540
|
-
const getItemCount =
|
|
3541
|
-
const getCartTotal =
|
|
3656
|
+
const clearCart = React29.useCallback(() => setItems([]), []);
|
|
3657
|
+
const isInCart = React29.useCallback((id) => items.some((it) => it.id === id), [items]);
|
|
3658
|
+
const getItemCount = React29.useCallback(() => items.reduce((sum, it) => sum + it.quantity, 0), [items]);
|
|
3659
|
+
const getCartTotal = React29.useCallback(
|
|
3542
3660
|
() => items.reduce((sum, it) => sum + it.price * it.quantity, 0),
|
|
3543
3661
|
[items]
|
|
3544
3662
|
);
|
|
3545
|
-
const value =
|
|
3663
|
+
const value = React29.useMemo(
|
|
3546
3664
|
() => ({ items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal }),
|
|
3547
3665
|
[items, addToCart, removeFromCart, updateQuantity, clearCart, isInCart, getItemCount, getCartTotal]
|
|
3548
3666
|
);
|
|
3549
3667
|
return /* @__PURE__ */ jsxRuntime.jsx(CartContext.Provider, { value, children });
|
|
3550
3668
|
}
|
|
3551
3669
|
function useCart() {
|
|
3552
|
-
const ctx =
|
|
3670
|
+
const ctx = React29.useContext(CartContext);
|
|
3553
3671
|
if (!ctx) {
|
|
3554
3672
|
throw new Error("useCart must be used within a <CartProvider>.");
|
|
3555
3673
|
}
|
|
@@ -3883,11 +4001,11 @@ function buildBindings(store, name, kind, snap) {
|
|
|
3883
4001
|
|
|
3884
4002
|
// src/form/useForm.ts
|
|
3885
4003
|
function useForm(options = {}) {
|
|
3886
|
-
const ref =
|
|
4004
|
+
const ref = React29.useRef(null);
|
|
3887
4005
|
if (ref.current === null) ref.current = new FormStore(options);
|
|
3888
4006
|
const store = ref.current;
|
|
3889
|
-
|
|
3890
|
-
const make =
|
|
4007
|
+
React29.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
|
|
4008
|
+
const make = React29.useCallback(
|
|
3891
4009
|
(kind) => (name, rules) => {
|
|
3892
4010
|
if (rules !== void 0) store.setRule(name, rules);
|
|
3893
4011
|
return buildBindings(store, name, kind, store.getFieldSnapshot(name));
|
|
@@ -3916,9 +4034,9 @@ function useForm(options = {}) {
|
|
|
3916
4034
|
fieldTarget: make("target")
|
|
3917
4035
|
};
|
|
3918
4036
|
}
|
|
3919
|
-
var FormContext =
|
|
4037
|
+
var FormContext = React29.createContext(null);
|
|
3920
4038
|
function useFormStore() {
|
|
3921
|
-
const store =
|
|
4039
|
+
const store = React29.useContext(FormContext);
|
|
3922
4040
|
if (!store) {
|
|
3923
4041
|
throw new Error("useFormStore must be used within a <Form>. Did you forget to wrap your fields?");
|
|
3924
4042
|
}
|
|
@@ -3932,8 +4050,8 @@ function Form({
|
|
|
3932
4050
|
children,
|
|
3933
4051
|
...rest
|
|
3934
4052
|
}) {
|
|
3935
|
-
const ref =
|
|
3936
|
-
const bypass =
|
|
4053
|
+
const ref = React29.useRef(null);
|
|
4054
|
+
const bypass = React29.useRef(false);
|
|
3937
4055
|
const handleSubmit = async (e) => {
|
|
3938
4056
|
if (bypass.current) {
|
|
3939
4057
|
bypass.current = false;
|
|
@@ -3985,12 +4103,12 @@ function useFormField(name, options = {}) {
|
|
|
3985
4103
|
const store = useFormStore();
|
|
3986
4104
|
const { kind = "value", rules } = options;
|
|
3987
4105
|
if (rules !== void 0 && store.getRule(name) !== rules) store.setRule(name, rules);
|
|
3988
|
-
|
|
4106
|
+
React29.useEffect(() => {
|
|
3989
4107
|
return () => {
|
|
3990
4108
|
if (rules !== void 0) store.removeRule(name);
|
|
3991
4109
|
};
|
|
3992
4110
|
}, [store, name]);
|
|
3993
|
-
const snap =
|
|
4111
|
+
const snap = React29.useSyncExternalStore(
|
|
3994
4112
|
store.subscribe,
|
|
3995
4113
|
() => store.getFieldSnapshot(name)
|
|
3996
4114
|
);
|
|
@@ -4002,7 +4120,7 @@ function FormField({ name, kind, rules, children }) {
|
|
|
4002
4120
|
}
|
|
4003
4121
|
function useFieldArray(name) {
|
|
4004
4122
|
const store = useFormStore();
|
|
4005
|
-
|
|
4123
|
+
React29.useSyncExternalStore(store.subscribe, store.getRootSnapshot, store.getRootSnapshot);
|
|
4006
4124
|
const arr = store.getValue(name) ?? [];
|
|
4007
4125
|
const keys = store.getKeys(name);
|
|
4008
4126
|
return {
|
|
@@ -4035,7 +4153,7 @@ function TextInput({
|
|
|
4035
4153
|
suffix,
|
|
4036
4154
|
id
|
|
4037
4155
|
}) {
|
|
4038
|
-
const errorId =
|
|
4156
|
+
const errorId = React29.useId();
|
|
4039
4157
|
const hasError = errorMessage != null;
|
|
4040
4158
|
const hasAdornment = prefix != null || suffix != null;
|
|
4041
4159
|
const inputId = htmlFor ?? id;
|
|
@@ -4196,7 +4314,7 @@ function CreditCardForm({
|
|
|
4196
4314
|
className = "",
|
|
4197
4315
|
style
|
|
4198
4316
|
}) {
|
|
4199
|
-
const initial =
|
|
4317
|
+
const initial = React29.useRef({
|
|
4200
4318
|
number: formatCardNumber(defaultValue?.number ?? ""),
|
|
4201
4319
|
name: defaultValue?.name ?? "",
|
|
4202
4320
|
expiry: formatExpiry(defaultValue?.expiry ?? ""),
|
|
@@ -4205,7 +4323,7 @@ function CreditCardForm({
|
|
|
4205
4323
|
const form = useForm({ initialValues: initial });
|
|
4206
4324
|
const numberStr = String(form.values.number ?? "");
|
|
4207
4325
|
const brand = detectBrand(numberStr);
|
|
4208
|
-
|
|
4326
|
+
React29.useEffect(() => {
|
|
4209
4327
|
onChange?.(toCard(form.values));
|
|
4210
4328
|
}, [form.values.number, form.values.name, form.values.expiry, form.values.cvv]);
|
|
4211
4329
|
const numberBind = form.fieldNative("number", {
|
|
@@ -4328,7 +4446,7 @@ function Checkout({
|
|
|
4328
4446
|
] })
|
|
4329
4447
|
] });
|
|
4330
4448
|
}
|
|
4331
|
-
var NotificationContext =
|
|
4449
|
+
var NotificationContext = React29.createContext({
|
|
4332
4450
|
open: () => void 0,
|
|
4333
4451
|
close: () => void 0
|
|
4334
4452
|
});
|
|
@@ -4386,26 +4504,26 @@ function NotificationItem({
|
|
|
4386
4504
|
onClose,
|
|
4387
4505
|
reduced
|
|
4388
4506
|
}) {
|
|
4389
|
-
const [paused, setPaused] =
|
|
4507
|
+
const [paused, setPaused] = React29.useState(false);
|
|
4390
4508
|
const duration = n.duration ?? 4e3;
|
|
4391
4509
|
const isAutoDismissing = isFinite(duration) && duration > 0;
|
|
4392
4510
|
const showProgress = !reduced && isAutoDismissing;
|
|
4393
|
-
const timerRef =
|
|
4394
|
-
const startTimeRef =
|
|
4395
|
-
const remainingRef =
|
|
4396
|
-
const clearTimer =
|
|
4511
|
+
const timerRef = React29.useRef(null);
|
|
4512
|
+
const startTimeRef = React29.useRef(0);
|
|
4513
|
+
const remainingRef = React29.useRef(duration);
|
|
4514
|
+
const clearTimer = React29.useCallback(() => {
|
|
4397
4515
|
if (timerRef.current !== null) {
|
|
4398
4516
|
clearTimeout(timerRef.current);
|
|
4399
4517
|
timerRef.current = null;
|
|
4400
4518
|
}
|
|
4401
4519
|
}, []);
|
|
4402
|
-
const scheduleDismiss =
|
|
4520
|
+
const scheduleDismiss = React29.useCallback((ms) => {
|
|
4403
4521
|
clearTimer();
|
|
4404
4522
|
if (!isAutoDismissing) return;
|
|
4405
4523
|
startTimeRef.current = Date.now();
|
|
4406
4524
|
timerRef.current = setTimeout(() => onClose(n.id), ms);
|
|
4407
4525
|
}, [clearTimer, isAutoDismissing, n.id, onClose]);
|
|
4408
|
-
|
|
4526
|
+
React29.useEffect(() => {
|
|
4409
4527
|
if (paused || !isAutoDismissing) return;
|
|
4410
4528
|
scheduleDismiss(remainingRef.current);
|
|
4411
4529
|
return clearTimer;
|
|
@@ -4488,15 +4606,15 @@ function NotificationProvider({
|
|
|
4488
4606
|
children,
|
|
4489
4607
|
position = "top-right"
|
|
4490
4608
|
}) {
|
|
4491
|
-
const [notifications, setNotifications] =
|
|
4609
|
+
const [notifications, setNotifications] = React29.useState([]);
|
|
4492
4610
|
const reduced = framerMotion.useReducedMotion();
|
|
4493
|
-
const open =
|
|
4611
|
+
const open = React29.useCallback((payload) => {
|
|
4494
4612
|
setNotifications((prev) => [
|
|
4495
4613
|
...prev,
|
|
4496
4614
|
{ duration: 4e3, ...payload, id: Date.now() + Math.random() }
|
|
4497
4615
|
]);
|
|
4498
4616
|
}, []);
|
|
4499
|
-
const close =
|
|
4617
|
+
const close = React29.useCallback((id) => {
|
|
4500
4618
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
4501
4619
|
}, []);
|
|
4502
4620
|
return /* @__PURE__ */ jsxRuntime.jsxs(NotificationContext.Provider, { value: { open, close }, children: [
|
|
@@ -4525,7 +4643,7 @@ function NotificationProvider({
|
|
|
4525
4643
|
] });
|
|
4526
4644
|
}
|
|
4527
4645
|
function useNotification() {
|
|
4528
|
-
const { open } =
|
|
4646
|
+
const { open } = React29.useContext(NotificationContext);
|
|
4529
4647
|
return {
|
|
4530
4648
|
info: (props) => open({ type: "info", ...props }),
|
|
4531
4649
|
success: (props) => open({ type: "success", ...props }),
|
|
@@ -4642,10 +4760,10 @@ function FadingBase({
|
|
|
4642
4760
|
isMounted = false,
|
|
4643
4761
|
children
|
|
4644
4762
|
}) {
|
|
4645
|
-
const [shouldRender, setShouldRender] =
|
|
4646
|
-
const [visible, setVisible] =
|
|
4647
|
-
const timerRef =
|
|
4648
|
-
|
|
4763
|
+
const [shouldRender, setShouldRender] = React29.useState(isMounted);
|
|
4764
|
+
const [visible, setVisible] = React29.useState(false);
|
|
4765
|
+
const timerRef = React29.useRef(null);
|
|
4766
|
+
React29.useEffect(() => {
|
|
4649
4767
|
if (isMounted) {
|
|
4650
4768
|
setShouldRender(true);
|
|
4651
4769
|
const rafId = requestAnimationFrame(() => setVisible(true));
|
|
@@ -4678,7 +4796,7 @@ var DENSITY_PADDING = {
|
|
|
4678
4796
|
"comfortable": "py-2.5 px-3",
|
|
4679
4797
|
"spacious": "py-3.5 px-4"
|
|
4680
4798
|
};
|
|
4681
|
-
function
|
|
4799
|
+
function List3({
|
|
4682
4800
|
items,
|
|
4683
4801
|
onItemClick,
|
|
4684
4802
|
activeKey,
|
|
@@ -4743,8 +4861,8 @@ function ScalableContainer({
|
|
|
4743
4861
|
togglePosition = "top-right",
|
|
4744
4862
|
className = ""
|
|
4745
4863
|
}) {
|
|
4746
|
-
const containerRef =
|
|
4747
|
-
const [internalScaled, setInternalScaled] =
|
|
4864
|
+
const containerRef = React29.useRef(null);
|
|
4865
|
+
const [internalScaled, setInternalScaled] = React29.useState(false);
|
|
4748
4866
|
const isScaled = expanded ?? internalScaled;
|
|
4749
4867
|
const reduced = framerMotion.useReducedMotion();
|
|
4750
4868
|
const onToggle = () => {
|
|
@@ -4882,17 +5000,17 @@ function CatalogGrid({ items, buttonText, onOpen, className = "" }) {
|
|
|
4882
5000
|
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)) });
|
|
4883
5001
|
}
|
|
4884
5002
|
function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
4885
|
-
const [activeIndex, setActiveIndex] =
|
|
4886
|
-
const [indexPool, setIndexPool] =
|
|
4887
|
-
const cardRefs =
|
|
4888
|
-
const getIndexes =
|
|
5003
|
+
const [activeIndex, setActiveIndex] = React29.useState(0);
|
|
5004
|
+
const [indexPool, setIndexPool] = React29.useState([]);
|
|
5005
|
+
const cardRefs = React29.useRef([]);
|
|
5006
|
+
const getIndexes = React29.useMemo(() => {
|
|
4889
5007
|
let nextIndex = activeIndex + 1;
|
|
4890
5008
|
let previousIndex = activeIndex - 1;
|
|
4891
5009
|
if (activeIndex === 0) previousIndex = items.length - 1;
|
|
4892
5010
|
if (activeIndex === items.length - 1) nextIndex = 0;
|
|
4893
5011
|
return { previousIndex, nextIndex };
|
|
4894
5012
|
}, [activeIndex, items.length]);
|
|
4895
|
-
|
|
5013
|
+
React29.useEffect(() => {
|
|
4896
5014
|
const { nextIndex, previousIndex } = getIndexes;
|
|
4897
5015
|
let indexes = [previousIndex, activeIndex, nextIndex];
|
|
4898
5016
|
if (activeIndex !== 0 && activeIndex !== items.length - 1) {
|
|
@@ -5065,8 +5183,8 @@ function writeDismissed(key) {
|
|
|
5065
5183
|
}
|
|
5066
5184
|
}
|
|
5067
5185
|
function useTargetBbox(ref) {
|
|
5068
|
-
const [bbox, setBbox] =
|
|
5069
|
-
|
|
5186
|
+
const [bbox, setBbox] = React29.useState(null);
|
|
5187
|
+
React29.useLayoutEffect(() => {
|
|
5070
5188
|
const el = ref?.current;
|
|
5071
5189
|
if (!el) {
|
|
5072
5190
|
setBbox(null);
|
|
@@ -5096,7 +5214,7 @@ function tooltipStyleFor(bbox, placement) {
|
|
|
5096
5214
|
return { left: bbox.left + bbox.width / 2, top: bbox.top - TOOLTIP_GAP, transform: "translate(-50%, -100%)", width: TOOLTIP_WIDTH };
|
|
5097
5215
|
}
|
|
5098
5216
|
function useFocusTrap(containerRef, active) {
|
|
5099
|
-
|
|
5217
|
+
React29.useEffect(() => {
|
|
5100
5218
|
if (!active) return;
|
|
5101
5219
|
const el = containerRef.current;
|
|
5102
5220
|
if (!el) return;
|
|
@@ -5135,16 +5253,16 @@ function Wizard({
|
|
|
5135
5253
|
onComplete,
|
|
5136
5254
|
onSkip
|
|
5137
5255
|
}) {
|
|
5138
|
-
const tooltipRef =
|
|
5139
|
-
const tooltipTitleId =
|
|
5140
|
-
const tooltipBodyId =
|
|
5256
|
+
const tooltipRef = React29.useRef(null);
|
|
5257
|
+
const tooltipTitleId = React29.useId();
|
|
5258
|
+
const tooltipBodyId = React29.useId();
|
|
5141
5259
|
const reduced = framerMotion.useReducedMotion();
|
|
5142
|
-
const [open, setOpen] =
|
|
5143
|
-
const [activeIndex, setActiveIndex] =
|
|
5260
|
+
const [open, setOpen] = React29.useState(() => steps.length > 0 && !readDismissed(storageKey));
|
|
5261
|
+
const [activeIndex, setActiveIndex] = React29.useState(0);
|
|
5144
5262
|
const step = steps[activeIndex];
|
|
5145
5263
|
const bbox = useTargetBbox(step?.stepRef);
|
|
5146
5264
|
useFocusTrap(tooltipRef, open);
|
|
5147
|
-
|
|
5265
|
+
React29.useEffect(() => {
|
|
5148
5266
|
if (!open || !dismissible) return;
|
|
5149
5267
|
const onKey = (e) => {
|
|
5150
5268
|
if (e.key === "Escape") {
|
|
@@ -5155,12 +5273,12 @@ function Wizard({
|
|
|
5155
5273
|
document.addEventListener("keydown", onKey);
|
|
5156
5274
|
return () => document.removeEventListener("keydown", onKey);
|
|
5157
5275
|
}, [open, dismissible]);
|
|
5158
|
-
const handleSkip =
|
|
5276
|
+
const handleSkip = React29.useCallback(() => {
|
|
5159
5277
|
writeDismissed(storageKey);
|
|
5160
5278
|
setOpen(false);
|
|
5161
5279
|
onSkip?.();
|
|
5162
5280
|
}, [storageKey, onSkip]);
|
|
5163
|
-
const handleComplete =
|
|
5281
|
+
const handleComplete = React29.useCallback(() => {
|
|
5164
5282
|
writeDismissed(storageKey);
|
|
5165
5283
|
setOpen(false);
|
|
5166
5284
|
onComplete?.();
|
|
@@ -5303,7 +5421,7 @@ function Wizard({
|
|
|
5303
5421
|
] });
|
|
5304
5422
|
}
|
|
5305
5423
|
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" }) });
|
|
5306
|
-
var SearchInput =
|
|
5424
|
+
var SearchInput = React29__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
|
|
5307
5425
|
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5308
5426
|
"div",
|
|
5309
5427
|
{
|
|
@@ -5487,7 +5605,7 @@ function TableBody({
|
|
|
5487
5605
|
expandRow,
|
|
5488
5606
|
getRowKey
|
|
5489
5607
|
}) {
|
|
5490
|
-
const [expanded, setExpanded] =
|
|
5608
|
+
const [expanded, setExpanded] = React29.useState(() => /* @__PURE__ */ new Set());
|
|
5491
5609
|
const reduced = framerMotion.useReducedMotion();
|
|
5492
5610
|
const toggleRow = (rowKey) => {
|
|
5493
5611
|
setExpanded((prev) => {
|
|
@@ -5502,7 +5620,7 @@ function TableBody({
|
|
|
5502
5620
|
return /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, i) => {
|
|
5503
5621
|
const rowKey = getRowKey(row, i);
|
|
5504
5622
|
const isExpanded = expanded.has(rowKey);
|
|
5505
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5623
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React29__default.default.Fragment, { children: [
|
|
5506
5624
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5507
5625
|
"tr",
|
|
5508
5626
|
{
|
|
@@ -5558,9 +5676,9 @@ function Pagination({
|
|
|
5558
5676
|
const matchedOption = picker.find(
|
|
5559
5677
|
(o) => o.label === options.perPage || o.value === options.perPage
|
|
5560
5678
|
);
|
|
5561
|
-
const [perPageKey, setPerPageKey] =
|
|
5679
|
+
const [perPageKey, setPerPageKey] = React29.useState(() => matchedOption?.key ?? picker[0]?.key);
|
|
5562
5680
|
const displayPerPageKey = serverSide ? matchedOption?.key ?? perPageKey : perPageKey;
|
|
5563
|
-
|
|
5681
|
+
React29.useEffect(() => {
|
|
5564
5682
|
if (serverSide && options.perPage != null) {
|
|
5565
5683
|
const next = picker.find((o) => o.label === options.perPage || o.value === options.perPage);
|
|
5566
5684
|
if (next) setPerPageKey(next.key);
|
|
@@ -5610,7 +5728,7 @@ function Pagination({
|
|
|
5610
5728
|
] })
|
|
5611
5729
|
] });
|
|
5612
5730
|
}
|
|
5613
|
-
function
|
|
5731
|
+
function Table2({
|
|
5614
5732
|
columns = [],
|
|
5615
5733
|
rows = [],
|
|
5616
5734
|
getRowKey = defaultGetRowKey,
|
|
@@ -5624,14 +5742,14 @@ function Table({
|
|
|
5624
5742
|
className = "",
|
|
5625
5743
|
style
|
|
5626
5744
|
}) {
|
|
5627
|
-
const searchRef =
|
|
5628
|
-
const [searchTerm, setSearchTerm] =
|
|
5629
|
-
const [perPage, setPerPage] =
|
|
5745
|
+
const searchRef = React29.useRef(null);
|
|
5746
|
+
const [searchTerm, setSearchTerm] = React29.useState("");
|
|
5747
|
+
const [perPage, setPerPage] = React29.useState(
|
|
5630
5748
|
typeof pagination.perPage === "number" ? pagination.perPage : 15
|
|
5631
5749
|
);
|
|
5632
|
-
const [activePage, setActivePage] =
|
|
5750
|
+
const [activePage, setActivePage] = React29.useState(0);
|
|
5633
5751
|
const isServerSide = !!(pagination.enabled && pagination.serverSide);
|
|
5634
|
-
const filteredRows =
|
|
5752
|
+
const filteredRows = React29.useMemo(() => {
|
|
5635
5753
|
if (isServerSide || !searchTerm) return rows;
|
|
5636
5754
|
const term = searchTerm.toLowerCase();
|
|
5637
5755
|
return rows.filter(
|
|
@@ -5640,29 +5758,29 @@ function Table({
|
|
|
5640
5758
|
)
|
|
5641
5759
|
);
|
|
5642
5760
|
}, [rows, searchTerm, isServerSide]);
|
|
5643
|
-
const datasets =
|
|
5761
|
+
const datasets = React29.useMemo(() => {
|
|
5644
5762
|
if (isServerSide) return [rows];
|
|
5645
5763
|
return createDatasets(filteredRows, pagination.enabled ? perPage : null);
|
|
5646
5764
|
}, [filteredRows, perPage, pagination.enabled, isServerSide, rows]);
|
|
5647
|
-
const MAX_PAGE =
|
|
5765
|
+
const MAX_PAGE = React29.useMemo(() => {
|
|
5648
5766
|
if (isServerSide && typeof pagination.maxPage === "number") return Math.max(0, pagination.maxPage);
|
|
5649
5767
|
if (isServerSide && typeof pagination.totalCount === "number")
|
|
5650
5768
|
return Math.max(0, Math.ceil(pagination.totalCount / perPage) - 1);
|
|
5651
5769
|
return datasets.length ? datasets.length - 1 : 0;
|
|
5652
5770
|
}, [isServerSide, pagination.maxPage, pagination.totalCount, perPage, datasets.length]);
|
|
5653
|
-
const currentPageRows =
|
|
5771
|
+
const currentPageRows = React29.useMemo(() => {
|
|
5654
5772
|
if (isServerSide) return rows;
|
|
5655
5773
|
return datasets[activePage] ?? [];
|
|
5656
5774
|
}, [isServerSide, rows, datasets, activePage]);
|
|
5657
|
-
|
|
5775
|
+
React29.useEffect(() => {
|
|
5658
5776
|
if (pagination.enabled && !isServerSide && typeof pagination.perPage === "number") {
|
|
5659
5777
|
setPerPage(pagination.perPage);
|
|
5660
5778
|
}
|
|
5661
5779
|
}, [pagination.enabled, pagination.perPage, isServerSide]);
|
|
5662
|
-
|
|
5780
|
+
React29.useEffect(() => {
|
|
5663
5781
|
if (isServerSide && typeof pagination.perPage === "number") setPerPage(pagination.perPage);
|
|
5664
5782
|
}, [isServerSide, pagination.perPage]);
|
|
5665
|
-
|
|
5783
|
+
React29.useEffect(() => {
|
|
5666
5784
|
if (isServerSide && typeof pagination.page === "number" && pagination.page >= 1)
|
|
5667
5785
|
setActivePage(pagination.page - 1);
|
|
5668
5786
|
}, [isServerSide, pagination.page]);
|
|
@@ -5746,7 +5864,7 @@ function TableSkeletonBody({
|
|
|
5746
5864
|
)) });
|
|
5747
5865
|
}
|
|
5748
5866
|
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
|
|
5749
|
-
const id =
|
|
5867
|
+
const id = React29.useId();
|
|
5750
5868
|
return /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: `flex items-center gap-2 cursor-pointer select-none ${className}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5751
5869
|
SwitchPrimitive__namespace.Root,
|
|
5752
5870
|
{
|
|
@@ -5930,7 +6048,7 @@ function Sidebar({
|
|
|
5930
6048
|
}
|
|
5931
6049
|
) });
|
|
5932
6050
|
}
|
|
5933
|
-
var MegaMenuContext =
|
|
6051
|
+
var MegaMenuContext = React29.createContext({ align: "start" });
|
|
5934
6052
|
function MegaMenu({
|
|
5935
6053
|
children,
|
|
5936
6054
|
align = "start",
|
|
@@ -5961,7 +6079,7 @@ function MegaMenu({
|
|
|
5961
6079
|
}
|
|
5962
6080
|
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";
|
|
5963
6081
|
function MegaMenuItem({ label, icon, href, children, className = "" }) {
|
|
5964
|
-
const { align } =
|
|
6082
|
+
const { align } = React29.useContext(MegaMenuContext);
|
|
5965
6083
|
const pos = align === "center" ? "left-1/2 -translate-x-1/2" : align === "end" ? "right-0" : "left-0";
|
|
5966
6084
|
if (!children) {
|
|
5967
6085
|
return /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu__namespace.Item, { children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu__namespace.Link, { href, className: [TOP_ITEM, className].filter(Boolean).join(" "), children: [
|
|
@@ -6046,8 +6164,8 @@ function MegaMenuLink({ href, icon, description, active, onClick, children, clas
|
|
|
6046
6164
|
function MegaMenuFeatured({ children, className = "" }) {
|
|
6047
6165
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["min-w-0 rounded-lg bg-surface-raised border border-border p-4 flex flex-col", className].filter(Boolean).join(" "), children });
|
|
6048
6166
|
}
|
|
6049
|
-
var elementsOfType = (children, type) =>
|
|
6050
|
-
(c) =>
|
|
6167
|
+
var elementsOfType = (children, type) => React29__default.default.Children.toArray(children).filter(
|
|
6168
|
+
(c) => React29__default.default.isValidElement(c) && c.type === type
|
|
6051
6169
|
);
|
|
6052
6170
|
var MOBILE_CHEVRON = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6053
6171
|
"svg",
|
|
@@ -6084,9 +6202,9 @@ function MobileLinkRow({ link, onNavigate }) {
|
|
|
6084
6202
|
);
|
|
6085
6203
|
}
|
|
6086
6204
|
function MobilePanel({ panel, onNavigate }) {
|
|
6087
|
-
const nodes =
|
|
6205
|
+
const nodes = React29__default.default.Children.toArray(panel.props.children);
|
|
6088
6206
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 px-2 pb-3 pt-1", children: nodes.map((node, i) => {
|
|
6089
|
-
if (!
|
|
6207
|
+
if (!React29__default.default.isValidElement(node)) return null;
|
|
6090
6208
|
const el = node;
|
|
6091
6209
|
if (el.type === MegaMenuSection) {
|
|
6092
6210
|
const { title, children } = el.props;
|
|
@@ -6105,8 +6223,8 @@ function MegaMenuMobile({
|
|
|
6105
6223
|
children,
|
|
6106
6224
|
label
|
|
6107
6225
|
}) {
|
|
6108
|
-
const [open, setOpen] =
|
|
6109
|
-
const [expanded, setExpanded] =
|
|
6226
|
+
const [open, setOpen] = React29.useState(false);
|
|
6227
|
+
const [expanded, setExpanded] = React29.useState(null);
|
|
6110
6228
|
const items = elementsOfType(children, MegaMenuItem);
|
|
6111
6229
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden w-full", children: [
|
|
6112
6230
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6179,17 +6297,17 @@ function AppShell({
|
|
|
6179
6297
|
children,
|
|
6180
6298
|
className = ""
|
|
6181
6299
|
}) {
|
|
6182
|
-
const [expanded, setExpanded] =
|
|
6183
|
-
const [isMobile, setIsMobile] =
|
|
6184
|
-
const [mobileOpen, setMobileOpen] =
|
|
6185
|
-
|
|
6300
|
+
const [expanded, setExpanded] = React29.useState(sidebarDefaultExpanded);
|
|
6301
|
+
const [isMobile, setIsMobile] = React29.useState(false);
|
|
6302
|
+
const [mobileOpen, setMobileOpen] = React29.useState(false);
|
|
6303
|
+
React29.useEffect(() => {
|
|
6186
6304
|
const mq = window.matchMedia("(max-width: 767px)");
|
|
6187
6305
|
const update = (e) => setIsMobile(e.matches);
|
|
6188
6306
|
update(mq);
|
|
6189
6307
|
mq.addEventListener("change", update);
|
|
6190
6308
|
return () => mq.removeEventListener("change", update);
|
|
6191
6309
|
}, []);
|
|
6192
|
-
|
|
6310
|
+
React29.useEffect(() => {
|
|
6193
6311
|
if (!isMobile) setMobileOpen(false);
|
|
6194
6312
|
}, [isMobile]);
|
|
6195
6313
|
const hasSidebar = sidebarSections.length > 0;
|
|
@@ -6296,7 +6414,7 @@ function tokenValid(token) {
|
|
|
6296
6414
|
return exp * 1e3 > Date.now();
|
|
6297
6415
|
}
|
|
6298
6416
|
var has = (have, need, all) => all ? need.every((n) => have?.includes(n)) : need.some((n) => have?.includes(n));
|
|
6299
|
-
var
|
|
6417
|
+
var Spinner4 = () => /* @__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" }) });
|
|
6300
6418
|
function SecureLayout({
|
|
6301
6419
|
children,
|
|
6302
6420
|
isAuthenticated,
|
|
@@ -6316,7 +6434,7 @@ function SecureLayout({
|
|
|
6316
6434
|
className = ""
|
|
6317
6435
|
}) {
|
|
6318
6436
|
const reduced = framerMotion.useReducedMotion();
|
|
6319
|
-
const cbs =
|
|
6437
|
+
const cbs = React29.useRef({ canAccess, onGranted, onDeny });
|
|
6320
6438
|
cbs.current = { canAccess, onGranted, onDeny };
|
|
6321
6439
|
const rolesKey = JSON.stringify(roles);
|
|
6322
6440
|
const requiredRolesKey = JSON.stringify(requiredRoles);
|
|
@@ -6331,10 +6449,10 @@ function SecureLayout({
|
|
|
6331
6449
|
if (requiredPermissions?.length && !has(permissions, requiredPermissions, requireAllPermissions)) return false;
|
|
6332
6450
|
return true;
|
|
6333
6451
|
};
|
|
6334
|
-
const [state, setState] =
|
|
6452
|
+
const [state, setState] = React29.useState(
|
|
6335
6453
|
() => !passesSync() ? "denied" : canAccess ? "checking" : "granted"
|
|
6336
6454
|
);
|
|
6337
|
-
|
|
6455
|
+
React29.useEffect(() => {
|
|
6338
6456
|
let cancelled = false;
|
|
6339
6457
|
const { canAccess: check, onGranted: granted, onDeny: deny } = cbs.current;
|
|
6340
6458
|
const finish = (ok) => {
|
|
@@ -6372,7 +6490,7 @@ function SecureLayout({
|
|
|
6372
6490
|
]);
|
|
6373
6491
|
if (state === "checking") {
|
|
6374
6492
|
if (loadingFallback === null) return null;
|
|
6375
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["flex min-h-[8rem] items-center justify-center", className].filter(Boolean).join(" "), children: loadingFallback !== void 0 ? loadingFallback : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6493
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: ["flex min-h-[8rem] items-center justify-center", className].filter(Boolean).join(" "), children: loadingFallback !== void 0 ? loadingFallback : /* @__PURE__ */ jsxRuntime.jsx(Spinner4, {}) });
|
|
6376
6494
|
}
|
|
6377
6495
|
if (state === "denied") {
|
|
6378
6496
|
if (fallback === null) return null;
|
|
@@ -6495,10 +6613,10 @@ function ThemeProvider({
|
|
|
6495
6613
|
className = "",
|
|
6496
6614
|
style
|
|
6497
6615
|
}) {
|
|
6498
|
-
const id =
|
|
6616
|
+
const id = React29__default.default.useId().replace(/:/g, "");
|
|
6499
6617
|
const scopeClass = `geo-th-${id}`;
|
|
6500
|
-
const divRef =
|
|
6501
|
-
|
|
6618
|
+
const divRef = React29.useRef(null);
|
|
6619
|
+
React29.useEffect(() => {
|
|
6502
6620
|
const el = divRef.current;
|
|
6503
6621
|
if (!el) return;
|
|
6504
6622
|
if (colorScheme === "auto") return;
|
|
@@ -6513,8 +6631,8 @@ function ThemeProvider({
|
|
|
6513
6631
|
}
|
|
6514
6632
|
el.classList.toggle("dark", colorScheme === "dark");
|
|
6515
6633
|
}, [colorScheme]);
|
|
6516
|
-
const lightVars =
|
|
6517
|
-
const darkVarStr =
|
|
6634
|
+
const lightVars = React29.useMemo(() => toCssVars(theme), [theme]);
|
|
6635
|
+
const darkVarStr = React29.useMemo(() => {
|
|
6518
6636
|
if (!darkTheme) return "";
|
|
6519
6637
|
const dvars = toCssVars(darkTheme);
|
|
6520
6638
|
if (!Object.keys(dvars).length) return "";
|
|
@@ -6556,7 +6674,7 @@ function NumberInput({
|
|
|
6556
6674
|
readOnly = false,
|
|
6557
6675
|
precision
|
|
6558
6676
|
}) {
|
|
6559
|
-
const errorId =
|
|
6677
|
+
const errorId = React29.useId();
|
|
6560
6678
|
const hasError = errorMessage != null;
|
|
6561
6679
|
const inferredPrecision = precision ?? (Number.isInteger(step) ? 0 : String(step).split(".")[1]?.length ?? 0);
|
|
6562
6680
|
const round = (n) => {
|
|
@@ -6687,8 +6805,8 @@ function Password({
|
|
|
6687
6805
|
showIcon,
|
|
6688
6806
|
hideIcon
|
|
6689
6807
|
}) {
|
|
6690
|
-
const [visible, setVisible] =
|
|
6691
|
-
const errorId =
|
|
6808
|
+
const [visible, setVisible] = React29.useState(false);
|
|
6809
|
+
const errorId = React29.useId();
|
|
6692
6810
|
const hasError = errorMessage != null;
|
|
6693
6811
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6694
6812
|
Field,
|
|
@@ -6761,7 +6879,7 @@ function Checkbox({
|
|
|
6761
6879
|
}) {
|
|
6762
6880
|
const isChecked = checked ?? value ?? false;
|
|
6763
6881
|
const labelFirst = labelPosition === "left";
|
|
6764
|
-
const errorId =
|
|
6882
|
+
const errorId = React29.useId();
|
|
6765
6883
|
const hasError = errorMessage != null;
|
|
6766
6884
|
const box = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6767
6885
|
CheckboxPrimitive__namespace.Root,
|
|
@@ -6869,8 +6987,8 @@ function RadioGroup({
|
|
|
6869
6987
|
className,
|
|
6870
6988
|
errorMessage
|
|
6871
6989
|
}) {
|
|
6872
|
-
const errorId =
|
|
6873
|
-
const groupId =
|
|
6990
|
+
const errorId = React29.useId();
|
|
6991
|
+
const groupId = React29.useId();
|
|
6874
6992
|
const hasError = errorMessage != null;
|
|
6875
6993
|
const labelFirst = labelPosition === "left";
|
|
6876
6994
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6970,11 +7088,11 @@ function Switch({
|
|
|
6970
7088
|
disabled,
|
|
6971
7089
|
errorMessage
|
|
6972
7090
|
}) {
|
|
6973
|
-
const id =
|
|
6974
|
-
const errorId =
|
|
7091
|
+
const id = React29.useId();
|
|
7092
|
+
const errorId = React29.useId();
|
|
6975
7093
|
const hasError = errorMessage != null;
|
|
6976
7094
|
const isControlled = checked !== void 0;
|
|
6977
|
-
const [internal, setInternal] =
|
|
7095
|
+
const [internal, setInternal] = React29.useState(defaultChecked);
|
|
6978
7096
|
const isOn = isControlled ? checked : internal;
|
|
6979
7097
|
const handle = (c) => {
|
|
6980
7098
|
if (!isControlled) setInternal(c);
|
|
@@ -7025,7 +7143,7 @@ function Switch({
|
|
|
7025
7143
|
}
|
|
7026
7144
|
);
|
|
7027
7145
|
}
|
|
7028
|
-
function
|
|
7146
|
+
function Tag2({ children, onRemove, removeLabel, disabled }) {
|
|
7029
7147
|
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: [
|
|
7030
7148
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }),
|
|
7031
7149
|
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7050,11 +7168,11 @@ function MultiTagRow({
|
|
|
7050
7168
|
labelFor,
|
|
7051
7169
|
onRemove
|
|
7052
7170
|
}) {
|
|
7053
|
-
const wrapRef =
|
|
7054
|
-
const measureRef =
|
|
7055
|
-
const [visibleCount, setVisibleCount] =
|
|
7171
|
+
const wrapRef = React29.useRef(null);
|
|
7172
|
+
const measureRef = React29.useRef(null);
|
|
7173
|
+
const [visibleCount, setVisibleCount] = React29.useState(values.length);
|
|
7056
7174
|
const key = values.map(String).join("|");
|
|
7057
|
-
|
|
7175
|
+
React29.useLayoutEffect(() => {
|
|
7058
7176
|
const wrap = wrapRef.current;
|
|
7059
7177
|
const measure = measureRef.current;
|
|
7060
7178
|
if (!wrap || !measure) return;
|
|
@@ -7109,14 +7227,14 @@ function MultiTagRow({
|
|
|
7109
7227
|
className: "absolute invisible pointer-events-none flex flex-nowrap items-center gap-1.5",
|
|
7110
7228
|
style: { left: -9999, top: -9999 },
|
|
7111
7229
|
children: [
|
|
7112
|
-
values.map((val) => /* @__PURE__ */ jsxRuntime.jsx("span", { "data-mt": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7230
|
+
values.map((val) => /* @__PURE__ */ jsxRuntime.jsx("span", { "data-mt": true, children: /* @__PURE__ */ jsxRuntime.jsx(Tag2, { removeLabel: "x", onRemove: () => {
|
|
7113
7231
|
}, children: labelFor(val) }) }, `m-${val}`)),
|
|
7114
7232
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-mm": true, children: moreChip(values.length) })
|
|
7115
7233
|
]
|
|
7116
7234
|
}
|
|
7117
7235
|
),
|
|
7118
7236
|
values.slice(0, visibleCount).map((val) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7119
|
-
|
|
7237
|
+
Tag2,
|
|
7120
7238
|
{
|
|
7121
7239
|
disabled,
|
|
7122
7240
|
removeLabel: `Remove ${labelFor(val)}`,
|
|
@@ -7148,16 +7266,16 @@ function Dropdown({
|
|
|
7148
7266
|
size = "md",
|
|
7149
7267
|
className = ""
|
|
7150
7268
|
}) {
|
|
7151
|
-
const [open, setOpen] =
|
|
7152
|
-
const [selectedItems, setSelectedItems] =
|
|
7153
|
-
const [searchTerm, setSearchTerm] =
|
|
7154
|
-
const [innerItems, setInnerItems] =
|
|
7155
|
-
const errorId =
|
|
7269
|
+
const [open, setOpen] = React29.useState(false);
|
|
7270
|
+
const [selectedItems, setSelectedItems] = React29.useState([]);
|
|
7271
|
+
const [searchTerm, setSearchTerm] = React29.useState("");
|
|
7272
|
+
const [innerItems, setInnerItems] = React29.useState([]);
|
|
7273
|
+
const errorId = React29.useId();
|
|
7156
7274
|
const hasError = errorMessage != null;
|
|
7157
|
-
|
|
7275
|
+
React29.useEffect(() => {
|
|
7158
7276
|
setInnerItems(items);
|
|
7159
7277
|
}, [items]);
|
|
7160
|
-
|
|
7278
|
+
React29.useEffect(() => {
|
|
7161
7279
|
if (isMultiselect && Array.isArray(value)) {
|
|
7162
7280
|
setSelectedItems(value);
|
|
7163
7281
|
}
|
|
@@ -7241,7 +7359,7 @@ function Dropdown({
|
|
|
7241
7359
|
onRemove: removeSelected
|
|
7242
7360
|
}
|
|
7243
7361
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0 flex items-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7244
|
-
|
|
7362
|
+
Tag2,
|
|
7245
7363
|
{
|
|
7246
7364
|
disabled,
|
|
7247
7365
|
removeLabel: `Remove ${labelFor(value)}`,
|
|
@@ -7349,19 +7467,19 @@ function AutoComplete({
|
|
|
7349
7467
|
required,
|
|
7350
7468
|
htmlFor
|
|
7351
7469
|
}) {
|
|
7352
|
-
const errorId =
|
|
7470
|
+
const errorId = React29.useId();
|
|
7353
7471
|
const hasError = errorMessage != null;
|
|
7354
|
-
const [term, setTerm] =
|
|
7355
|
-
const [open, setOpen] =
|
|
7356
|
-
const [asyncItems, setAsyncItems] =
|
|
7357
|
-
const [loading, setLoading] =
|
|
7472
|
+
const [term, setTerm] = React29.useState("");
|
|
7473
|
+
const [open, setOpen] = React29.useState(false);
|
|
7474
|
+
const [asyncItems, setAsyncItems] = React29.useState([]);
|
|
7475
|
+
const [loading, setLoading] = React29.useState(false);
|
|
7358
7476
|
const isAsync = typeof onSearch === "function";
|
|
7359
|
-
const debounceRef =
|
|
7360
|
-
const requestIdRef =
|
|
7477
|
+
const debounceRef = React29.useRef(null);
|
|
7478
|
+
const requestIdRef = React29.useRef(0);
|
|
7361
7479
|
const staticFiltered = isAsync || !items ? [] : term.trim() ? items.filter(
|
|
7362
7480
|
({ key, label: label2 }) => label2.toLowerCase().includes(term.toLowerCase()) || key.toLowerCase().includes(term.toLowerCase())
|
|
7363
7481
|
) : [];
|
|
7364
|
-
|
|
7482
|
+
React29.useEffect(() => {
|
|
7365
7483
|
if (!isAsync) return;
|
|
7366
7484
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
7367
7485
|
if (!term.trim()) {
|
|
@@ -7517,15 +7635,15 @@ function TreeSelect({
|
|
|
7517
7635
|
defaultExpandedKeys = [],
|
|
7518
7636
|
size = "md"
|
|
7519
7637
|
}) {
|
|
7520
|
-
const errorId =
|
|
7638
|
+
const errorId = React29.useId();
|
|
7521
7639
|
const hasError = errorMessage != null;
|
|
7522
|
-
const [open, setOpen] =
|
|
7523
|
-
const [expanded, setExpanded] =
|
|
7524
|
-
const [activeIndex, setActiveIndex] =
|
|
7525
|
-
const listRef =
|
|
7526
|
-
const visible =
|
|
7527
|
-
const didSyncOnOpenRef =
|
|
7528
|
-
|
|
7640
|
+
const [open, setOpen] = React29.useState(false);
|
|
7641
|
+
const [expanded, setExpanded] = React29.useState(() => new Set(defaultExpandedKeys));
|
|
7642
|
+
const [activeIndex, setActiveIndex] = React29.useState(0);
|
|
7643
|
+
const listRef = React29.useRef(null);
|
|
7644
|
+
const visible = React29.useMemo(() => flattenVisible(items, expanded), [items, expanded]);
|
|
7645
|
+
const didSyncOnOpenRef = React29.useRef(false);
|
|
7646
|
+
React29.useEffect(() => {
|
|
7529
7647
|
if (!open) {
|
|
7530
7648
|
didSyncOnOpenRef.current = false;
|
|
7531
7649
|
return;
|
|
@@ -7535,7 +7653,7 @@ function TreeSelect({
|
|
|
7535
7653
|
setActiveIndex(selectedIdx >= 0 ? selectedIdx : 0);
|
|
7536
7654
|
didSyncOnOpenRef.current = true;
|
|
7537
7655
|
}, [open, value]);
|
|
7538
|
-
const selectedNode =
|
|
7656
|
+
const selectedNode = React29.useMemo(
|
|
7539
7657
|
() => value != null ? findNodeByKey(items, value) : null,
|
|
7540
7658
|
[items, value]
|
|
7541
7659
|
);
|
|
@@ -7766,11 +7884,11 @@ function FileInput({
|
|
|
7766
7884
|
required,
|
|
7767
7885
|
icon
|
|
7768
7886
|
}) {
|
|
7769
|
-
const inputRef =
|
|
7770
|
-
const errorId =
|
|
7771
|
-
const [files, setFiles] =
|
|
7772
|
-
const [dragging, setDragging] =
|
|
7773
|
-
const [sizeError, setSizeError] =
|
|
7887
|
+
const inputRef = React29.useRef(null);
|
|
7888
|
+
const errorId = React29.useId();
|
|
7889
|
+
const [files, setFiles] = React29.useState([]);
|
|
7890
|
+
const [dragging, setDragging] = React29.useState(false);
|
|
7891
|
+
const [sizeError, setSizeError] = React29.useState(null);
|
|
7774
7892
|
const effectiveError = errorMessage ?? sizeError ?? void 0;
|
|
7775
7893
|
const openPicker = () => {
|
|
7776
7894
|
if (!disabled) inputRef.current?.click();
|
|
@@ -7961,30 +8079,30 @@ function DatePicker({
|
|
|
7961
8079
|
size = "md",
|
|
7962
8080
|
className = ""
|
|
7963
8081
|
}) {
|
|
7964
|
-
const errorId =
|
|
8082
|
+
const errorId = React29.useId();
|
|
7965
8083
|
const hasError = errorMessage != null;
|
|
7966
|
-
const [open, setOpen] =
|
|
7967
|
-
const [viewMonth, setViewMonth] =
|
|
7968
|
-
const [focusDate, setFocusDate] =
|
|
7969
|
-
const [view, setView] =
|
|
7970
|
-
const gridRef =
|
|
7971
|
-
|
|
8084
|
+
const [open, setOpen] = React29.useState(false);
|
|
8085
|
+
const [viewMonth, setViewMonth] = React29.useState(() => startOfMonth2(value ?? /* @__PURE__ */ new Date()));
|
|
8086
|
+
const [focusDate, setFocusDate] = React29.useState(() => value ?? /* @__PURE__ */ new Date());
|
|
8087
|
+
const [view, setView] = React29.useState("days");
|
|
8088
|
+
const gridRef = React29.useRef(null);
|
|
8089
|
+
React29.useEffect(() => {
|
|
7972
8090
|
if (!open) return;
|
|
7973
8091
|
const target = value ?? /* @__PURE__ */ new Date();
|
|
7974
8092
|
setViewMonth(startOfMonth2(target));
|
|
7975
8093
|
setFocusDate(target);
|
|
7976
8094
|
setView("days");
|
|
7977
8095
|
}, [open, value]);
|
|
7978
|
-
|
|
8096
|
+
React29.useEffect(() => {
|
|
7979
8097
|
if (!open) return;
|
|
7980
8098
|
const cell = gridRef.current?.querySelector(`[data-day="${defaultFormat3(focusDate)}"]`);
|
|
7981
8099
|
cell?.focus();
|
|
7982
8100
|
}, [open, focusDate]);
|
|
7983
|
-
const weekdays =
|
|
8101
|
+
const weekdays = React29.useMemo(() => {
|
|
7984
8102
|
const ordered = WEEKDAY_SHORT.slice(weekStartsOn).concat(WEEKDAY_SHORT.slice(0, weekStartsOn));
|
|
7985
8103
|
return ordered;
|
|
7986
8104
|
}, [weekStartsOn]);
|
|
7987
|
-
const grid =
|
|
8105
|
+
const grid = React29.useMemo(() => buildGrid(viewMonth, weekStartsOn), [viewMonth, weekStartsOn]);
|
|
7988
8106
|
const isDisabled = (d) => {
|
|
7989
8107
|
if (min && d < min) return true;
|
|
7990
8108
|
if (max && d > max) return true;
|
|
@@ -8093,7 +8211,7 @@ function DatePicker({
|
|
|
8093
8211
|
},
|
|
8094
8212
|
"aria-label": view === "days" ? "Previous month" : view === "months" ? "Previous year" : "Previous decade",
|
|
8095
8213
|
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",
|
|
8096
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8214
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeft2, {})
|
|
8097
8215
|
}
|
|
8098
8216
|
),
|
|
8099
8217
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -8243,7 +8361,7 @@ function CalendarIcon() {
|
|
|
8243
8361
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 9h18M8 3v4M16 3v4", strokeLinecap: "round" })
|
|
8244
8362
|
] });
|
|
8245
8363
|
}
|
|
8246
|
-
function
|
|
8364
|
+
function ChevronLeft2() {
|
|
8247
8365
|
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" }) });
|
|
8248
8366
|
}
|
|
8249
8367
|
function ChevronRight3() {
|
|
@@ -8274,10 +8392,10 @@ function TextArea({
|
|
|
8274
8392
|
style,
|
|
8275
8393
|
inputStyle
|
|
8276
8394
|
}) {
|
|
8277
|
-
const errorId =
|
|
8395
|
+
const errorId = React29.useId();
|
|
8278
8396
|
const hasError = errorMessage != null;
|
|
8279
|
-
const ref =
|
|
8280
|
-
|
|
8397
|
+
const ref = React29.useRef(null);
|
|
8398
|
+
React29.useLayoutEffect(() => {
|
|
8281
8399
|
if (!autoGrow) return;
|
|
8282
8400
|
const el = ref.current;
|
|
8283
8401
|
if (!el) return;
|
|
@@ -8349,14 +8467,14 @@ function Slider({
|
|
|
8349
8467
|
name,
|
|
8350
8468
|
htmlFor
|
|
8351
8469
|
}) {
|
|
8352
|
-
const errorId =
|
|
8470
|
+
const errorId = React29.useId();
|
|
8353
8471
|
const hasError = errorMessage != null;
|
|
8354
8472
|
const isRange = Array.isArray(value ?? defaultValue);
|
|
8355
|
-
const [internal, setInternal] =
|
|
8473
|
+
const [internal, setInternal] = React29.useState(
|
|
8356
8474
|
() => toArray(value) ?? toArray(defaultValue) ?? [min]
|
|
8357
8475
|
);
|
|
8358
8476
|
const current = toArray(value) ?? internal;
|
|
8359
|
-
const [dragging, setDragging] =
|
|
8477
|
+
const [dragging, setDragging] = React29.useState(false);
|
|
8360
8478
|
const emit = (arr) => {
|
|
8361
8479
|
setInternal(arr);
|
|
8362
8480
|
const next = isRange ? [arr[0], arr[1]] : arr[0];
|
|
@@ -8451,11 +8569,11 @@ function TagsInput({
|
|
|
8451
8569
|
validate,
|
|
8452
8570
|
separators = ["Enter", ","]
|
|
8453
8571
|
}) {
|
|
8454
|
-
const errorId =
|
|
8455
|
-
const inputRef =
|
|
8456
|
-
const [internal, setInternal] =
|
|
8457
|
-
const [draft, setDraft] =
|
|
8458
|
-
const [localError, setLocalError] =
|
|
8572
|
+
const errorId = React29.useId();
|
|
8573
|
+
const inputRef = React29.useRef(null);
|
|
8574
|
+
const [internal, setInternal] = React29.useState(defaultValue ?? []);
|
|
8575
|
+
const [draft, setDraft] = React29.useState("");
|
|
8576
|
+
const [localError, setLocalError] = React29.useState(null);
|
|
8459
8577
|
const tags = value ?? internal;
|
|
8460
8578
|
const hasError = errorMessage != null || localError != null;
|
|
8461
8579
|
const errorText = errorMessage ?? localError ?? void 0;
|
|
@@ -8523,7 +8641,7 @@ function TagsInput({
|
|
|
8523
8641
|
onClick: () => inputRef.current?.focus(),
|
|
8524
8642
|
children: [
|
|
8525
8643
|
tags.map((tag, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8526
|
-
|
|
8644
|
+
Tag2,
|
|
8527
8645
|
{
|
|
8528
8646
|
disabled,
|
|
8529
8647
|
removeLabel: `Remove ${tag}`,
|
|
@@ -8586,9 +8704,9 @@ function OtpInput({
|
|
|
8586
8704
|
className,
|
|
8587
8705
|
groupAfter
|
|
8588
8706
|
}) {
|
|
8589
|
-
const errorId =
|
|
8707
|
+
const errorId = React29.useId();
|
|
8590
8708
|
const hasError = errorMessage != null;
|
|
8591
|
-
const refs =
|
|
8709
|
+
const refs = React29.useRef([]);
|
|
8592
8710
|
const chars = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
8593
8711
|
const pattern = mode === "numeric" ? /[0-9]/ : /[a-zA-Z0-9]/;
|
|
8594
8712
|
const emit = (next) => {
|
|
@@ -8637,7 +8755,7 @@ function OtpInput({
|
|
|
8637
8755
|
emit(valid.join(""));
|
|
8638
8756
|
focusBox(valid.length);
|
|
8639
8757
|
};
|
|
8640
|
-
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(
|
|
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(React29__default.default.Fragment, { children: [
|
|
8641
8759
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8642
8760
|
"input",
|
|
8643
8761
|
{
|
|
@@ -8675,7 +8793,7 @@ function OtpInput({
|
|
|
8675
8793
|
] }, idx)) }) });
|
|
8676
8794
|
}
|
|
8677
8795
|
var ICON_SIZE = { sm: "w-4 h-4", md: "w-5 h-5", lg: "w-7 h-7" };
|
|
8678
|
-
var
|
|
8796
|
+
var Star2 = (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" }) });
|
|
8679
8797
|
function Rating({
|
|
8680
8798
|
value,
|
|
8681
8799
|
defaultValue = 0,
|
|
@@ -8687,7 +8805,7 @@ function Rating({
|
|
|
8687
8805
|
label,
|
|
8688
8806
|
size = "md",
|
|
8689
8807
|
disabled,
|
|
8690
|
-
icon =
|
|
8808
|
+
icon = Star2,
|
|
8691
8809
|
errorMessage,
|
|
8692
8810
|
name,
|
|
8693
8811
|
layout = "vertical",
|
|
@@ -8695,9 +8813,9 @@ function Rating({
|
|
|
8695
8813
|
className,
|
|
8696
8814
|
required
|
|
8697
8815
|
}) {
|
|
8698
|
-
const errorId =
|
|
8699
|
-
const [internal, setInternal] =
|
|
8700
|
-
const [hover, setHover] =
|
|
8816
|
+
const errorId = React29.useId();
|
|
8817
|
+
const [internal, setInternal] = React29.useState(defaultValue);
|
|
8818
|
+
const [hover, setHover] = React29.useState(null);
|
|
8701
8819
|
const current = value ?? internal;
|
|
8702
8820
|
const display2 = hover ?? current;
|
|
8703
8821
|
const interactive = !readOnly && !disabled;
|
|
@@ -8820,9 +8938,9 @@ function TimePicker({
|
|
|
8820
8938
|
required,
|
|
8821
8939
|
style
|
|
8822
8940
|
}) {
|
|
8823
|
-
const errorId =
|
|
8941
|
+
const errorId = React29.useId();
|
|
8824
8942
|
const hasError = errorMessage != null;
|
|
8825
|
-
const [open, setOpen] =
|
|
8943
|
+
const [open, setOpen] = React29.useState(false);
|
|
8826
8944
|
const parsed = parse(value) ?? { h: 0, m: 0, s: 0 };
|
|
8827
8945
|
const update = (next) => {
|
|
8828
8946
|
const merged = { ...parsed, ...next };
|
|
@@ -8946,13 +9064,13 @@ function DateRangePicker({
|
|
|
8946
9064
|
required,
|
|
8947
9065
|
style
|
|
8948
9066
|
}) {
|
|
8949
|
-
const errorId =
|
|
9067
|
+
const errorId = React29.useId();
|
|
8950
9068
|
const hasError = errorMessage != null;
|
|
8951
|
-
const [open, setOpen] =
|
|
8952
|
-
const [leftMonth, setLeftMonth] =
|
|
8953
|
-
const [pendingStart, setPendingStart] =
|
|
8954
|
-
const [hoverDate, setHoverDate] =
|
|
8955
|
-
const weekdays =
|
|
9069
|
+
const [open, setOpen] = React29.useState(false);
|
|
9070
|
+
const [leftMonth, setLeftMonth] = React29.useState(() => startOfMonth3(value.start ?? /* @__PURE__ */ new Date()));
|
|
9071
|
+
const [pendingStart, setPendingStart] = React29.useState(null);
|
|
9072
|
+
const [hoverDate, setHoverDate] = React29.useState(null);
|
|
9073
|
+
const weekdays = React29.useMemo(
|
|
8956
9074
|
() => WEEKDAY.slice(weekStartsOn).concat(WEEKDAY.slice(0, weekStartsOn)),
|
|
8957
9075
|
[weekStartsOn]
|
|
8958
9076
|
);
|
|
@@ -9128,10 +9246,10 @@ function ColorPicker({
|
|
|
9128
9246
|
required,
|
|
9129
9247
|
placeholder = "Pick a colour\u2026"
|
|
9130
9248
|
}) {
|
|
9131
|
-
const errorId =
|
|
9249
|
+
const errorId = React29.useId();
|
|
9132
9250
|
const hasError = errorMessage != null;
|
|
9133
|
-
const [open, setOpen] =
|
|
9134
|
-
const [draft, setDraft] =
|
|
9251
|
+
const [open, setOpen] = React29.useState(false);
|
|
9252
|
+
const [draft, setDraft] = React29.useState(value);
|
|
9135
9253
|
const valid = HEX_RE.test(value);
|
|
9136
9254
|
const pick = (hex) => {
|
|
9137
9255
|
onChange?.(hex);
|
|
@@ -9218,7 +9336,7 @@ function ColorPicker({
|
|
|
9218
9336
|
}
|
|
9219
9337
|
var CUSTOM_EVENT = "oxy-local-storage";
|
|
9220
9338
|
function useLocalStorage(key, initialValue) {
|
|
9221
|
-
const read =
|
|
9339
|
+
const read = React29.useCallback(() => {
|
|
9222
9340
|
if (typeof window === "undefined") return initialValue;
|
|
9223
9341
|
try {
|
|
9224
9342
|
const item = window.localStorage.getItem(key);
|
|
@@ -9227,8 +9345,8 @@ function useLocalStorage(key, initialValue) {
|
|
|
9227
9345
|
return initialValue;
|
|
9228
9346
|
}
|
|
9229
9347
|
}, [key]);
|
|
9230
|
-
const [stored, setStored] =
|
|
9231
|
-
const setValue =
|
|
9348
|
+
const [stored, setStored] = React29.useState(read);
|
|
9349
|
+
const setValue = React29.useCallback((value) => {
|
|
9232
9350
|
setStored((prev) => {
|
|
9233
9351
|
const next = value instanceof Function ? value(prev) : value;
|
|
9234
9352
|
try {
|
|
@@ -9241,7 +9359,7 @@ function useLocalStorage(key, initialValue) {
|
|
|
9241
9359
|
return next;
|
|
9242
9360
|
});
|
|
9243
9361
|
}, [key]);
|
|
9244
|
-
const remove =
|
|
9362
|
+
const remove = React29.useCallback(() => {
|
|
9245
9363
|
try {
|
|
9246
9364
|
if (typeof window !== "undefined") {
|
|
9247
9365
|
window.localStorage.removeItem(key);
|
|
@@ -9251,10 +9369,10 @@ function useLocalStorage(key, initialValue) {
|
|
|
9251
9369
|
}
|
|
9252
9370
|
setStored(initialValue);
|
|
9253
9371
|
}, [key]);
|
|
9254
|
-
|
|
9372
|
+
React29.useEffect(() => {
|
|
9255
9373
|
setStored(read());
|
|
9256
9374
|
}, [key, read]);
|
|
9257
|
-
|
|
9375
|
+
React29.useEffect(() => {
|
|
9258
9376
|
if (typeof window === "undefined") return;
|
|
9259
9377
|
const onStorage = (e) => {
|
|
9260
9378
|
if (e.key === null || e.key === key) setStored(read());
|
|
@@ -9273,8 +9391,8 @@ function useLocalStorage(key, initialValue) {
|
|
|
9273
9391
|
}
|
|
9274
9392
|
function useMediaQuery(query) {
|
|
9275
9393
|
const get = () => typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia(query).matches : false;
|
|
9276
|
-
const [matches, setMatches] =
|
|
9277
|
-
|
|
9394
|
+
const [matches, setMatches] = React29.useState(get);
|
|
9395
|
+
React29.useEffect(() => {
|
|
9278
9396
|
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
9279
9397
|
const mql = window.matchMedia(query);
|
|
9280
9398
|
const onChange = () => setMatches(mql.matches);
|
|
@@ -9305,8 +9423,8 @@ function decodeSegment(seg) {
|
|
|
9305
9423
|
}
|
|
9306
9424
|
}
|
|
9307
9425
|
function useJwt(token) {
|
|
9308
|
-
const [, tick] =
|
|
9309
|
-
const decoded =
|
|
9426
|
+
const [, tick] = React29.useState(0);
|
|
9427
|
+
const decoded = React29.useMemo(() => {
|
|
9310
9428
|
if (!token) return { payload: null, header: null, exp: null };
|
|
9311
9429
|
const [h, p] = token.split(".");
|
|
9312
9430
|
const header = decodeSegment(h);
|
|
@@ -9314,7 +9432,7 @@ function useJwt(token) {
|
|
|
9314
9432
|
const exp = payload && typeof payload.exp === "number" ? payload.exp : null;
|
|
9315
9433
|
return { payload, header, exp };
|
|
9316
9434
|
}, [token]);
|
|
9317
|
-
|
|
9435
|
+
React29.useEffect(() => {
|
|
9318
9436
|
if (decoded.exp == null) return;
|
|
9319
9437
|
const ms = decoded.exp * 1e3 - Date.now();
|
|
9320
9438
|
if (ms <= 0) return;
|
|
@@ -9397,7 +9515,7 @@ function FeatureGrid({
|
|
|
9397
9515
|
] }, f.key ?? i)) })
|
|
9398
9516
|
] });
|
|
9399
9517
|
}
|
|
9400
|
-
var
|
|
9518
|
+
var Check4 = () => /* @__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" }) });
|
|
9401
9519
|
function PricingPlans({ plans, eyebrow, title, description, className = "", style }) {
|
|
9402
9520
|
const hasHeader = eyebrow != null || title != null || description != null;
|
|
9403
9521
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: ["px-2", className].filter(Boolean).join(" "), style, children: [
|
|
@@ -9422,7 +9540,7 @@ function PricingPlans({ plans, eyebrow, title, description, className = "", styl
|
|
|
9422
9540
|
] }),
|
|
9423
9541
|
p.description != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm leading-relaxed text-foreground-secondary", children: p.description }),
|
|
9424
9542
|
/* @__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: [
|
|
9425
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9543
|
+
/* @__PURE__ */ jsxRuntime.jsx(Check4, {}),
|
|
9426
9544
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: f })
|
|
9427
9545
|
] }, fi)) }),
|
|
9428
9546
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9488,13 +9606,13 @@ function SlideShow({
|
|
|
9488
9606
|
style
|
|
9489
9607
|
}) {
|
|
9490
9608
|
const reduced = framerMotion.useReducedMotion();
|
|
9491
|
-
const [index, setIndex] =
|
|
9492
|
-
const [paused, setPaused] =
|
|
9609
|
+
const [index, setIndex] = React29.useState(0);
|
|
9610
|
+
const [paused, setPaused] = React29.useState(false);
|
|
9493
9611
|
const count = slides.length;
|
|
9494
9612
|
const idx = count ? (index % count + count) % count : 0;
|
|
9495
|
-
const go =
|
|
9496
|
-
const timer =
|
|
9497
|
-
|
|
9613
|
+
const go = React29.useCallback((d) => setIndex((i) => i + d), []);
|
|
9614
|
+
const timer = React29.useRef(null);
|
|
9615
|
+
React29.useEffect(() => {
|
|
9498
9616
|
if (!autoPlay || paused || count <= 1) return;
|
|
9499
9617
|
timer.current = setInterval(() => setIndex((i) => i + 1), interval);
|
|
9500
9618
|
return () => {
|
|
@@ -9556,7 +9674,7 @@ function SlideShow({
|
|
|
9556
9674
|
);
|
|
9557
9675
|
}
|
|
9558
9676
|
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" }) });
|
|
9559
|
-
function
|
|
9677
|
+
function Video2({
|
|
9560
9678
|
src,
|
|
9561
9679
|
embedUrl,
|
|
9562
9680
|
poster,
|
|
@@ -9570,7 +9688,7 @@ function Video({
|
|
|
9570
9688
|
className = "",
|
|
9571
9689
|
style
|
|
9572
9690
|
}) {
|
|
9573
|
-
const [playing, setPlaying] =
|
|
9691
|
+
const [playing, setPlaying] = React29.useState(autoPlay);
|
|
9574
9692
|
const frame = ["relative w-full overflow-hidden bg-backdrop", framed ? "rounded-2xl border border-border shadow-sm" : "", className].filter(Boolean).join(" ");
|
|
9575
9693
|
const ratio = aspect.replace("/", " / ");
|
|
9576
9694
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: frame, style: { aspectRatio: ratio, ...style }, children: embedUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9625,7 +9743,7 @@ function Parallax({
|
|
|
9625
9743
|
style
|
|
9626
9744
|
}) {
|
|
9627
9745
|
const reduced = framerMotion.useReducedMotion();
|
|
9628
|
-
const ref =
|
|
9746
|
+
const ref = React29.useRef(null);
|
|
9629
9747
|
const { scrollYProgress } = framerMotion.useScroll({ target: ref, offset: ["start end", "end start"] });
|
|
9630
9748
|
const shift = Math.max(0, Math.min(1, speed)) * 100;
|
|
9631
9749
|
const y = framerMotion.useTransform(scrollYProgress, [0, 1], reduced ? ["0%", "0%"] : [`-${shift / 2}%`, `${shift / 2}%`]);
|
|
@@ -9693,7 +9811,7 @@ function Blog({
|
|
|
9693
9811
|
post.tag != null && !post.image && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { tone: "accent", variant: "soft", size: "sm", children: post.tag }) }),
|
|
9694
9812
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold leading-snug text-foreground transition-colors group-hover:text-accent", children: post.title }),
|
|
9695
9813
|
post.excerpt != null && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-3 text-sm leading-relaxed text-foreground-secondary", children: post.excerpt }),
|
|
9696
|
-
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(
|
|
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(React29__default.default.Fragment, { children: [
|
|
9697
9815
|
j > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\xB7" }),
|
|
9698
9816
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: m })
|
|
9699
9817
|
] }, j)) })
|
|
@@ -9822,8 +9940,8 @@ function LeadCapture({
|
|
|
9822
9940
|
className = "",
|
|
9823
9941
|
style
|
|
9824
9942
|
}) {
|
|
9825
|
-
const [email, setEmail] =
|
|
9826
|
-
const [done, setDone] =
|
|
9943
|
+
const [email, setEmail] = React29.useState("");
|
|
9944
|
+
const [done, setDone] = React29.useState(false);
|
|
9827
9945
|
const submit = (e) => {
|
|
9828
9946
|
e.preventDefault();
|
|
9829
9947
|
const value = email.trim();
|
|
@@ -9900,7 +10018,7 @@ exports.CartProvider = CartProvider;
|
|
|
9900
10018
|
exports.Catalog = Catalog;
|
|
9901
10019
|
exports.CatalogCarousel = CatalogCarousel;
|
|
9902
10020
|
exports.CatalogGrid = CatalogGrid;
|
|
9903
|
-
exports.Chat =
|
|
10021
|
+
exports.Chat = Chat2;
|
|
9904
10022
|
exports.Checkbox = Checkbox;
|
|
9905
10023
|
exports.Checkout = Checkout;
|
|
9906
10024
|
exports.ColorPicker = ColorPicker;
|
|
@@ -9930,7 +10048,7 @@ exports.IconButton = IconButton;
|
|
|
9930
10048
|
exports.Jumbotron = Jumbotron;
|
|
9931
10049
|
exports.Kbd = Kbd;
|
|
9932
10050
|
exports.LeadCapture = LeadCapture;
|
|
9933
|
-
exports.List =
|
|
10051
|
+
exports.List = List3;
|
|
9934
10052
|
exports.LoadingSpinner = LoadingSpinner;
|
|
9935
10053
|
exports.LogoutTimer = LogoutTimer;
|
|
9936
10054
|
exports.MegaMenu = MegaMenu_default;
|
|
@@ -9963,7 +10081,7 @@ exports.Socials = Socials;
|
|
|
9963
10081
|
exports.Statistic = Statistic;
|
|
9964
10082
|
exports.Stepper = Stepper;
|
|
9965
10083
|
exports.Switch = Switch;
|
|
9966
|
-
exports.Table =
|
|
10084
|
+
exports.Table = Table2;
|
|
9967
10085
|
exports.Tabs = Tabs_default;
|
|
9968
10086
|
exports.TagsInput = TagsInput;
|
|
9969
10087
|
exports.Temporal = DatePicker;
|
|
@@ -9980,9 +10098,10 @@ exports.TopBar = TopBar;
|
|
|
9980
10098
|
exports.Tree = Tree;
|
|
9981
10099
|
exports.TreeSelect = TreeSelect;
|
|
9982
10100
|
exports.Typography = Typography;
|
|
9983
|
-
exports.Video =
|
|
10101
|
+
exports.Video = Video2;
|
|
9984
10102
|
exports.Wizard = Wizard;
|
|
9985
10103
|
exports.cardNumberError = cardNumberError;
|
|
10104
|
+
exports.createIcon = createIcon;
|
|
9986
10105
|
exports.cvvError = cvvError;
|
|
9987
10106
|
exports.detectBrand = detectBrand;
|
|
9988
10107
|
exports.expiryError = expiryError;
|