@syscore/ui-library 1.25.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/components/ui/app-bar.tsx +299 -0
- package/client/components/ui/banner.tsx +108 -0
- package/client/components/ui/bottom-navigation.tsx +223 -0
- package/client/components/ui/card.tsx +108 -26
- package/client/components/ui/date-picker.tsx +188 -0
- package/client/components/ui/empty-state.tsx +197 -0
- package/client/components/ui/file-upload.tsx +214 -0
- package/client/components/ui/footer.tsx +179 -0
- package/client/components/ui/layout.tsx +381 -0
- package/client/components/ui/sidebar.tsx +11 -5
- package/client/components/ui/stepper.tsx +148 -0
- package/client/components/ui/system-bar.tsx +119 -0
- package/client/components/ui/timeline.tsx +181 -0
- package/client/global.css +2304 -41
- package/client/ui/AppBar/app-bar.stories.tsx +280 -0
- package/client/ui/Banner/banner.stories.tsx +238 -0
- package/client/ui/BottomNavigation/bottom-navigation.stories.tsx +285 -0
- package/client/ui/Card.stories.tsx +285 -168
- package/client/ui/DatePicker/DatePicker.stories.tsx +293 -0
- package/client/ui/EmptyState/empty-state.stories.tsx +251 -0
- package/client/ui/FileUpload/FileUpload.stories.tsx +218 -0
- package/client/ui/Footer/footer.stories.tsx +194 -0
- package/client/ui/Layout.stories.tsx +1481 -0
- package/client/ui/Stepper/Stepper.stories.tsx +344 -0
- package/client/ui/SystemBar/system-bar.stories.tsx +179 -0
- package/client/ui/Timeline/timeline.stories.tsx +404 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +219 -0
- package/dist/index.es.js +1504 -99
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useState, useEffect, useCallback, useRef, useLayoutEffect, createContext, Children, isValidElement, cloneElement, useContext, useMemo } from "react";
|
|
4
|
-
import { motion, AnimatePresence, animate, useMotionValue } from "motion/react";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { twMerge } from "tailwind-merge";
|
|
6
|
+
import { motion, AnimatePresence, animate, useMotionValue } from "motion/react";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
9
9
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
@@ -38,6 +38,7 @@ import useEmblaCarousel from "embla-carousel-react";
|
|
|
38
38
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
39
39
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
40
40
|
import * as RechartsPrimitive from "recharts";
|
|
41
|
+
import { format } from "date-fns";
|
|
41
42
|
import { useTheme } from "next-themes";
|
|
42
43
|
import { Toaster as Toaster$2 } from "sonner";
|
|
43
44
|
function cn(...inputs) {
|
|
@@ -47,6 +48,656 @@ function capitalize(str) {
|
|
|
47
48
|
if (!str) return str;
|
|
48
49
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
49
50
|
}
|
|
51
|
+
const DENSITY_HEIGHT = {
|
|
52
|
+
default: 64,
|
|
53
|
+
comfortable: 56,
|
|
54
|
+
compact: 48,
|
|
55
|
+
prominent: 128
|
|
56
|
+
};
|
|
57
|
+
const AppBar = React.forwardRef(
|
|
58
|
+
({
|
|
59
|
+
className,
|
|
60
|
+
children,
|
|
61
|
+
collapse = false,
|
|
62
|
+
rounded = false,
|
|
63
|
+
elevated = false,
|
|
64
|
+
flat = false,
|
|
65
|
+
position = "fixed",
|
|
66
|
+
color = "default",
|
|
67
|
+
density = "default",
|
|
68
|
+
image,
|
|
69
|
+
imageOverlay,
|
|
70
|
+
style,
|
|
71
|
+
...props
|
|
72
|
+
}, ref) => {
|
|
73
|
+
const height = DENSITY_HEIGHT[density];
|
|
74
|
+
const isProminent = density === "prominent";
|
|
75
|
+
return /* @__PURE__ */ jsxs(
|
|
76
|
+
"header",
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
role: "banner",
|
|
80
|
+
style: {
|
|
81
|
+
height: collapse ? void 0 : height,
|
|
82
|
+
...style
|
|
83
|
+
},
|
|
84
|
+
className: cn(
|
|
85
|
+
"app-bar",
|
|
86
|
+
// position
|
|
87
|
+
position === "fixed" && "app-bar--fixed",
|
|
88
|
+
position === "sticky" && "app-bar--sticky",
|
|
89
|
+
position === "relative" && "app-bar--relative",
|
|
90
|
+
position === "static" && "app-bar--static",
|
|
91
|
+
// color variants
|
|
92
|
+
color === "primary" && "app-bar--primary",
|
|
93
|
+
color === "transparent" && "app-bar--transparent",
|
|
94
|
+
// density
|
|
95
|
+
density === "comfortable" && "app-bar--comfortable",
|
|
96
|
+
density === "compact" && "app-bar--compact",
|
|
97
|
+
isProminent && "app-bar--prominent",
|
|
98
|
+
// modifiers
|
|
99
|
+
rounded && "app-bar--rounded",
|
|
100
|
+
elevated && "app-bar--elevated",
|
|
101
|
+
flat && "app-bar--flat",
|
|
102
|
+
collapse && "app-bar--collapse",
|
|
103
|
+
// image
|
|
104
|
+
image && "app-bar--image",
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
...props,
|
|
108
|
+
children: [
|
|
109
|
+
image && /* @__PURE__ */ jsx(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: "app-bar-image-layer",
|
|
113
|
+
style: { backgroundImage: `url(${image})` },
|
|
114
|
+
"aria-hidden": "true",
|
|
115
|
+
children: imageOverlay && /* @__PURE__ */ jsx(
|
|
116
|
+
"span",
|
|
117
|
+
{
|
|
118
|
+
className: "app-bar-image-overlay",
|
|
119
|
+
style: {
|
|
120
|
+
background: `linear-gradient(${imageOverlay})`
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
isProminent ? /* @__PURE__ */ jsx(ProminentLayout, { children }) : children
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
AppBar.displayName = "AppBar";
|
|
133
|
+
const AppBarNavIcon = React.forwardRef(
|
|
134
|
+
({ className, icon, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
ref,
|
|
138
|
+
type: "button",
|
|
139
|
+
"aria-label": "Open navigation menu",
|
|
140
|
+
className: cn("app-bar-nav-icon", className),
|
|
141
|
+
...props,
|
|
142
|
+
children: children ?? icon ?? /* @__PURE__ */ jsx(HamburgerIcon, {})
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
);
|
|
146
|
+
AppBarNavIcon.displayName = "AppBarNavIcon";
|
|
147
|
+
const AppBarTitle = React.forwardRef(
|
|
148
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
149
|
+
"div",
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
className: cn("app-bar-title", className),
|
|
153
|
+
...props
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
);
|
|
157
|
+
AppBarTitle.displayName = "AppBarTitle";
|
|
158
|
+
const AppBarPrepend = React.forwardRef(
|
|
159
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
ref,
|
|
163
|
+
className: cn("app-bar-prepend", className),
|
|
164
|
+
...props
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
);
|
|
168
|
+
AppBarPrepend.displayName = "AppBarPrepend";
|
|
169
|
+
const AppBarAppend = React.forwardRef(
|
|
170
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
ref,
|
|
174
|
+
className: cn("app-bar-append", className),
|
|
175
|
+
...props
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
);
|
|
179
|
+
AppBarAppend.displayName = "AppBarAppend";
|
|
180
|
+
const AppBarContent = React.forwardRef(
|
|
181
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref,
|
|
185
|
+
className: cn("app-bar-content", className),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
);
|
|
190
|
+
AppBarContent.displayName = "AppBarContent";
|
|
191
|
+
function ProminentLayout({ children }) {
|
|
192
|
+
const kids = React.Children.toArray(children);
|
|
193
|
+
const topKids = kids.filter((child) => {
|
|
194
|
+
if (!React.isValidElement(child)) return false;
|
|
195
|
+
const name = child.type.displayName ?? "";
|
|
196
|
+
return name === "AppBarPrepend" || name === "AppBarAppend";
|
|
197
|
+
});
|
|
198
|
+
const bottomKids = kids.filter((child) => {
|
|
199
|
+
if (!React.isValidElement(child)) return false;
|
|
200
|
+
const name = child.type.displayName ?? "";
|
|
201
|
+
return name === "AppBarTitle" || name === "AppBarContent";
|
|
202
|
+
});
|
|
203
|
+
const otherKids = kids.filter((child) => {
|
|
204
|
+
if (!React.isValidElement(child)) return true;
|
|
205
|
+
const name = child.type.displayName ?? "";
|
|
206
|
+
return ![
|
|
207
|
+
"AppBarPrepend",
|
|
208
|
+
"AppBarAppend",
|
|
209
|
+
"AppBarTitle",
|
|
210
|
+
"AppBarContent"
|
|
211
|
+
].includes(name);
|
|
212
|
+
});
|
|
213
|
+
return /* @__PURE__ */ jsxs("span", { className: "app-bar-prominent-inner", children: [
|
|
214
|
+
/* @__PURE__ */ jsxs("span", { className: "app-bar-prominent-top", children: [
|
|
215
|
+
topKids,
|
|
216
|
+
otherKids
|
|
217
|
+
] }),
|
|
218
|
+
/* @__PURE__ */ jsx("span", { className: "app-bar-prominent-bottom", children: bottomKids })
|
|
219
|
+
] });
|
|
220
|
+
}
|
|
221
|
+
function HamburgerIcon() {
|
|
222
|
+
return /* @__PURE__ */ jsxs(
|
|
223
|
+
"svg",
|
|
224
|
+
{
|
|
225
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
226
|
+
width: "24",
|
|
227
|
+
height: "24",
|
|
228
|
+
viewBox: "0 0 24 24",
|
|
229
|
+
fill: "none",
|
|
230
|
+
stroke: "currentColor",
|
|
231
|
+
strokeWidth: "2",
|
|
232
|
+
strokeLinecap: "round",
|
|
233
|
+
strokeLinejoin: "round",
|
|
234
|
+
"aria-hidden": "true",
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ jsx("line", { x1: "4", y1: "6", x2: "20", y2: "6" }),
|
|
237
|
+
/* @__PURE__ */ jsx("line", { x1: "4", y1: "12", x2: "20", y2: "12" }),
|
|
238
|
+
/* @__PURE__ */ jsx("line", { x1: "4", y1: "18", x2: "20", y2: "18" })
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
const BottomNavContext = React.createContext({
|
|
244
|
+
value: null,
|
|
245
|
+
onChange: () => {
|
|
246
|
+
},
|
|
247
|
+
grow: false,
|
|
248
|
+
horizontal: false,
|
|
249
|
+
shift: false,
|
|
250
|
+
activeColor: void 0
|
|
251
|
+
});
|
|
252
|
+
const BottomNavigation = React.forwardRef(
|
|
253
|
+
({
|
|
254
|
+
className,
|
|
255
|
+
children,
|
|
256
|
+
value: valueProp,
|
|
257
|
+
defaultValue,
|
|
258
|
+
onChange,
|
|
259
|
+
color,
|
|
260
|
+
grow = false,
|
|
261
|
+
horizontal = false,
|
|
262
|
+
shift = false,
|
|
263
|
+
active = true,
|
|
264
|
+
elevated = false,
|
|
265
|
+
...props
|
|
266
|
+
}, ref) => {
|
|
267
|
+
const [internalValue, setInternalValue] = React.useState(defaultValue ?? null);
|
|
268
|
+
const isControlled = valueProp !== void 0;
|
|
269
|
+
const currentValue = isControlled ? valueProp : internalValue;
|
|
270
|
+
const handleChange = React.useCallback(
|
|
271
|
+
(val) => {
|
|
272
|
+
if (!isControlled) setInternalValue(val);
|
|
273
|
+
onChange == null ? void 0 : onChange(val);
|
|
274
|
+
},
|
|
275
|
+
[isControlled, onChange]
|
|
276
|
+
);
|
|
277
|
+
return /* @__PURE__ */ jsx(
|
|
278
|
+
BottomNavContext.Provider,
|
|
279
|
+
{
|
|
280
|
+
value: {
|
|
281
|
+
value: currentValue ?? null,
|
|
282
|
+
onChange: handleChange,
|
|
283
|
+
grow,
|
|
284
|
+
horizontal,
|
|
285
|
+
shift,
|
|
286
|
+
activeColor: color
|
|
287
|
+
},
|
|
288
|
+
children: /* @__PURE__ */ jsx(
|
|
289
|
+
"nav",
|
|
290
|
+
{
|
|
291
|
+
ref,
|
|
292
|
+
role: "navigation",
|
|
293
|
+
"aria-label": "Bottom navigation",
|
|
294
|
+
className: cn(
|
|
295
|
+
"bottom-nav",
|
|
296
|
+
grow && "bottom-nav--grow",
|
|
297
|
+
horizontal && "bottom-nav--horizontal",
|
|
298
|
+
shift && "bottom-nav--shift",
|
|
299
|
+
!active && "bottom-nav--hidden",
|
|
300
|
+
elevated && "bottom-nav--elevated",
|
|
301
|
+
className
|
|
302
|
+
),
|
|
303
|
+
...props,
|
|
304
|
+
children
|
|
305
|
+
}
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
);
|
|
311
|
+
BottomNavigation.displayName = "BottomNavigation";
|
|
312
|
+
const BottomNavigationItem = React.forwardRef(({ className, children, value: valueProp, _index, style, ...props }, ref) => {
|
|
313
|
+
const { value, onChange, grow, horizontal, shift, activeColor } = React.useContext(BottomNavContext);
|
|
314
|
+
const itemValue = valueProp ?? _index ?? 0;
|
|
315
|
+
const isActive = value === itemValue;
|
|
316
|
+
const activeStyle = isActive && activeColor ? { "--bottom-nav-active-color": activeColor } : {};
|
|
317
|
+
return /* @__PURE__ */ jsx(
|
|
318
|
+
"button",
|
|
319
|
+
{
|
|
320
|
+
ref,
|
|
321
|
+
type: "button",
|
|
322
|
+
role: "tab",
|
|
323
|
+
"aria-selected": isActive,
|
|
324
|
+
"aria-current": isActive ? "page" : void 0,
|
|
325
|
+
onClick: () => onChange(itemValue),
|
|
326
|
+
style: { ...activeStyle, ...style },
|
|
327
|
+
className: cn(
|
|
328
|
+
"bottom-nav-item",
|
|
329
|
+
isActive && "bottom-nav-item--active",
|
|
330
|
+
grow && "bottom-nav-item--grow",
|
|
331
|
+
horizontal && "bottom-nav-item--horizontal",
|
|
332
|
+
shift && "bottom-nav-item--shift",
|
|
333
|
+
className
|
|
334
|
+
),
|
|
335
|
+
...props,
|
|
336
|
+
children
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
});
|
|
340
|
+
BottomNavigationItem.displayName = "BottomNavigationItem";
|
|
341
|
+
const BottomNavigationGroup = React.forwardRef(({ children, className, ...props }, ref) => {
|
|
342
|
+
const indexedChildren = React.Children.map(children, (child, index) => {
|
|
343
|
+
if (!React.isValidElement(child)) return child;
|
|
344
|
+
const el = child;
|
|
345
|
+
if (el.type.displayName === "BottomNavigationItem") {
|
|
346
|
+
return React.cloneElement(el, { _index: index });
|
|
347
|
+
}
|
|
348
|
+
return child;
|
|
349
|
+
});
|
|
350
|
+
return /* @__PURE__ */ jsx(
|
|
351
|
+
"div",
|
|
352
|
+
{
|
|
353
|
+
ref,
|
|
354
|
+
role: "tablist",
|
|
355
|
+
className: cn("bottom-nav-group", className),
|
|
356
|
+
...props,
|
|
357
|
+
children: indexedChildren
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
BottomNavigationGroup.displayName = "BottomNavigationGroup";
|
|
362
|
+
const Footer = React.forwardRef(
|
|
363
|
+
({
|
|
364
|
+
className,
|
|
365
|
+
children,
|
|
366
|
+
bordered = false,
|
|
367
|
+
rounded = false,
|
|
368
|
+
elevated = false,
|
|
369
|
+
color,
|
|
370
|
+
style,
|
|
371
|
+
...props
|
|
372
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
373
|
+
"footer",
|
|
374
|
+
{
|
|
375
|
+
ref,
|
|
376
|
+
style: { backgroundColor: color, ...style },
|
|
377
|
+
className: cn(
|
|
378
|
+
"footer",
|
|
379
|
+
bordered && "footer--bordered",
|
|
380
|
+
rounded && "footer--rounded",
|
|
381
|
+
elevated && "footer--elevated",
|
|
382
|
+
className
|
|
383
|
+
),
|
|
384
|
+
...props,
|
|
385
|
+
children
|
|
386
|
+
}
|
|
387
|
+
)
|
|
388
|
+
);
|
|
389
|
+
Footer.displayName = "Footer";
|
|
390
|
+
const FooterRow = React.forwardRef(
|
|
391
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("footer-row", className), ...props })
|
|
392
|
+
);
|
|
393
|
+
FooterRow.displayName = "FooterRow";
|
|
394
|
+
const FooterLinks = React.forwardRef(
|
|
395
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("footer-links", className), ...props })
|
|
396
|
+
);
|
|
397
|
+
FooterLinks.displayName = "FooterLinks";
|
|
398
|
+
const FooterLink = React.forwardRef(
|
|
399
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("a", { ref, className: cn("footer-link", className), ...props })
|
|
400
|
+
);
|
|
401
|
+
FooterLink.displayName = "FooterLink";
|
|
402
|
+
const FooterIconButton = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
403
|
+
"button",
|
|
404
|
+
{
|
|
405
|
+
ref,
|
|
406
|
+
type: "button",
|
|
407
|
+
className: cn("footer-icon-btn", className),
|
|
408
|
+
...props,
|
|
409
|
+
children
|
|
410
|
+
}
|
|
411
|
+
));
|
|
412
|
+
FooterIconButton.displayName = "FooterIconButton";
|
|
413
|
+
const FooterDivider = React.forwardRef(
|
|
414
|
+
({ className, width, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
415
|
+
"hr",
|
|
416
|
+
{
|
|
417
|
+
ref,
|
|
418
|
+
style: { width, ...style },
|
|
419
|
+
className: cn("footer-divider", className),
|
|
420
|
+
...props
|
|
421
|
+
}
|
|
422
|
+
)
|
|
423
|
+
);
|
|
424
|
+
FooterDivider.displayName = "FooterDivider";
|
|
425
|
+
const FooterCopyright = React.forwardRef(
|
|
426
|
+
({
|
|
427
|
+
className,
|
|
428
|
+
company = "International WELL Building Institute",
|
|
429
|
+
year,
|
|
430
|
+
...props
|
|
431
|
+
}, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("footer-copyright", className), ...props, children: [
|
|
432
|
+
year ?? (/* @__PURE__ */ new Date()).getFullYear(),
|
|
433
|
+
" —",
|
|
434
|
+
" ",
|
|
435
|
+
/* @__PURE__ */ jsxs("strong", { children: [
|
|
436
|
+
"© ",
|
|
437
|
+
company
|
|
438
|
+
] })
|
|
439
|
+
] })
|
|
440
|
+
);
|
|
441
|
+
FooterCopyright.displayName = "FooterCopyright";
|
|
442
|
+
const FooterBand = React.forwardRef(
|
|
443
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("footer-band", className), ...props })
|
|
444
|
+
);
|
|
445
|
+
FooterBand.displayName = "FooterBand";
|
|
446
|
+
const HeroSection = ({ backgroundSlot, contentSlot }) => {
|
|
447
|
+
return /* @__PURE__ */ jsxs("section", { className: "relative flex flex-col sm:pt-[169px] pt-24 items-center min-h-[454px] bg-cyan-900 overflow-hidden", children: [
|
|
448
|
+
backgroundSlot,
|
|
449
|
+
/* @__PURE__ */ jsxs("header", { className: "relative z-10 flex flex-col items-center text-center overflow-visible", children: [
|
|
450
|
+
/* @__PURE__ */ jsx(
|
|
451
|
+
motion.h2,
|
|
452
|
+
{
|
|
453
|
+
className: "heading-small mb-6",
|
|
454
|
+
initial: { opacity: 0, y: 20 },
|
|
455
|
+
animate: { opacity: 1, y: 0 },
|
|
456
|
+
transition: { duration: 0.6, delay: 0.3 },
|
|
457
|
+
children: /* @__PURE__ */ jsx(
|
|
458
|
+
"span",
|
|
459
|
+
{
|
|
460
|
+
style: {
|
|
461
|
+
background: "linear-gradient(90deg, #084654 0.08%, #2D718A 50.08%, #084654 100.08%)",
|
|
462
|
+
backgroundClip: "text",
|
|
463
|
+
WebkitBackgroundClip: "text",
|
|
464
|
+
WebkitTextFillColor: "transparent"
|
|
465
|
+
},
|
|
466
|
+
children: "One unified, harmonized standard"
|
|
467
|
+
}
|
|
468
|
+
)
|
|
469
|
+
}
|
|
470
|
+
),
|
|
471
|
+
/* @__PURE__ */ jsx(
|
|
472
|
+
motion.h1,
|
|
473
|
+
{
|
|
474
|
+
className: "text-white heading-large mb-[70px]",
|
|
475
|
+
initial: { opacity: 0, y: 20 },
|
|
476
|
+
animate: { opacity: 1, y: 0 },
|
|
477
|
+
transition: { duration: 0.6, delay: 0.4 },
|
|
478
|
+
children: "One WELL"
|
|
479
|
+
}
|
|
480
|
+
),
|
|
481
|
+
contentSlot
|
|
482
|
+
] })
|
|
483
|
+
] });
|
|
484
|
+
};
|
|
485
|
+
const SystemBar = React.forwardRef(
|
|
486
|
+
({
|
|
487
|
+
className,
|
|
488
|
+
children,
|
|
489
|
+
color,
|
|
490
|
+
window: isWindow = false,
|
|
491
|
+
height,
|
|
492
|
+
style,
|
|
493
|
+
...props
|
|
494
|
+
}, ref) => {
|
|
495
|
+
const barHeight = height ?? (isWindow ? 32 : 24);
|
|
496
|
+
return /* @__PURE__ */ jsx(
|
|
497
|
+
"header",
|
|
498
|
+
{
|
|
499
|
+
ref,
|
|
500
|
+
role: "banner",
|
|
501
|
+
style: {
|
|
502
|
+
height: barHeight,
|
|
503
|
+
backgroundColor: color,
|
|
504
|
+
...style
|
|
505
|
+
},
|
|
506
|
+
className: cn(
|
|
507
|
+
"system-bar",
|
|
508
|
+
isWindow && "system-bar--window",
|
|
509
|
+
color && "system-bar--colored",
|
|
510
|
+
className
|
|
511
|
+
),
|
|
512
|
+
...props,
|
|
513
|
+
children
|
|
514
|
+
}
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
SystemBar.displayName = "SystemBar";
|
|
519
|
+
const SystemBarSpacer = React.forwardRef(
|
|
520
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
521
|
+
"span",
|
|
522
|
+
{
|
|
523
|
+
ref,
|
|
524
|
+
className: cn("system-bar-spacer", className),
|
|
525
|
+
...props
|
|
526
|
+
}
|
|
527
|
+
)
|
|
528
|
+
);
|
|
529
|
+
SystemBarSpacer.displayName = "SystemBarSpacer";
|
|
530
|
+
const SystemBarIcon = React.forwardRef(
|
|
531
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
532
|
+
"span",
|
|
533
|
+
{
|
|
534
|
+
ref,
|
|
535
|
+
className: cn("system-bar-icon", className),
|
|
536
|
+
...props
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
);
|
|
540
|
+
SystemBarIcon.displayName = "SystemBarIcon";
|
|
541
|
+
const SystemBarAction = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
542
|
+
"button",
|
|
543
|
+
{
|
|
544
|
+
ref,
|
|
545
|
+
type: "button",
|
|
546
|
+
className: cn("system-bar-action", className),
|
|
547
|
+
...props,
|
|
548
|
+
children
|
|
549
|
+
}
|
|
550
|
+
));
|
|
551
|
+
SystemBarAction.displayName = "SystemBarAction";
|
|
552
|
+
const TimelineContext = React.createContext({
|
|
553
|
+
direction: "vertical",
|
|
554
|
+
side: "alternate",
|
|
555
|
+
align: "center",
|
|
556
|
+
density: "default"
|
|
557
|
+
});
|
|
558
|
+
const Timeline = React.forwardRef(
|
|
559
|
+
({
|
|
560
|
+
className,
|
|
561
|
+
children,
|
|
562
|
+
direction = "vertical",
|
|
563
|
+
side = "alternate",
|
|
564
|
+
align = "center",
|
|
565
|
+
density = "default",
|
|
566
|
+
...props
|
|
567
|
+
}, ref) => /* @__PURE__ */ jsx(TimelineContext.Provider, { value: { direction, side, align, density }, children: /* @__PURE__ */ jsx(
|
|
568
|
+
"div",
|
|
569
|
+
{
|
|
570
|
+
ref,
|
|
571
|
+
className: cn(
|
|
572
|
+
"timeline",
|
|
573
|
+
direction === "horizontal" && "timeline--horizontal",
|
|
574
|
+
`timeline--side-${side}`,
|
|
575
|
+
`timeline--align-${align}`,
|
|
576
|
+
density === "compact" && "timeline--compact",
|
|
577
|
+
className
|
|
578
|
+
),
|
|
579
|
+
...props,
|
|
580
|
+
children
|
|
581
|
+
}
|
|
582
|
+
) })
|
|
583
|
+
);
|
|
584
|
+
Timeline.displayName = "Timeline";
|
|
585
|
+
const TimelineItem = React.forwardRef(
|
|
586
|
+
({
|
|
587
|
+
className,
|
|
588
|
+
children,
|
|
589
|
+
dotColor,
|
|
590
|
+
size = "small",
|
|
591
|
+
fillDot = false,
|
|
592
|
+
hideDot = false,
|
|
593
|
+
icon,
|
|
594
|
+
opposite,
|
|
595
|
+
...props
|
|
596
|
+
}, ref) => {
|
|
597
|
+
const { align } = React.useContext(TimelineContext);
|
|
598
|
+
return /* @__PURE__ */ jsxs(
|
|
599
|
+
"div",
|
|
600
|
+
{
|
|
601
|
+
ref,
|
|
602
|
+
className: cn(
|
|
603
|
+
"timeline-item",
|
|
604
|
+
`timeline-item--size-${size}`,
|
|
605
|
+
fillDot && "timeline-item--fill-dot",
|
|
606
|
+
hideDot && "timeline-item--hide-dot",
|
|
607
|
+
align === "start" && "timeline-item--align-start",
|
|
608
|
+
className
|
|
609
|
+
),
|
|
610
|
+
...props,
|
|
611
|
+
children: [
|
|
612
|
+
/* @__PURE__ */ jsx("div", { className: "timeline-item-opposite", children: opposite }),
|
|
613
|
+
/* @__PURE__ */ jsxs("div", { className: "timeline-item-stem", children: [
|
|
614
|
+
/* @__PURE__ */ jsx("div", { className: "timeline-item-stem-line timeline-item-stem-line--before" }),
|
|
615
|
+
!hideDot && /* @__PURE__ */ jsx(
|
|
616
|
+
"div",
|
|
617
|
+
{
|
|
618
|
+
className: "timeline-item-dot",
|
|
619
|
+
style: dotColor ? { backgroundColor: dotColor, borderColor: dotColor } : void 0,
|
|
620
|
+
children: icon && /* @__PURE__ */ jsx("span", { className: "timeline-item-dot-icon", children: icon })
|
|
621
|
+
}
|
|
622
|
+
),
|
|
623
|
+
/* @__PURE__ */ jsx("div", { className: "timeline-item-stem-line timeline-item-stem-line--after" })
|
|
624
|
+
] }),
|
|
625
|
+
/* @__PURE__ */ jsx("div", { className: "timeline-item-body", children })
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
TimelineItem.displayName = "TimelineItem";
|
|
632
|
+
const EmptyState = React.forwardRef(
|
|
633
|
+
({
|
|
634
|
+
className,
|
|
635
|
+
children,
|
|
636
|
+
headline,
|
|
637
|
+
title,
|
|
638
|
+
subtitle,
|
|
639
|
+
text,
|
|
640
|
+
image,
|
|
641
|
+
imageAlt = "",
|
|
642
|
+
icon,
|
|
643
|
+
actionText,
|
|
644
|
+
onClickAction,
|
|
645
|
+
mediaSlot,
|
|
646
|
+
headlineSlot,
|
|
647
|
+
titleSlot,
|
|
648
|
+
subtitleSlot,
|
|
649
|
+
textSlot,
|
|
650
|
+
actionsSlot,
|
|
651
|
+
...props
|
|
652
|
+
}, ref) => {
|
|
653
|
+
const hasMedia = mediaSlot || image || icon;
|
|
654
|
+
const hasHeadline = headlineSlot || headline;
|
|
655
|
+
const hasTitle = titleSlot || title;
|
|
656
|
+
const hasSubtitle = subtitleSlot || subtitle;
|
|
657
|
+
const hasText = textSlot || text;
|
|
658
|
+
const hasActions = actionsSlot || actionText;
|
|
659
|
+
return /* @__PURE__ */ jsxs(
|
|
660
|
+
"div",
|
|
661
|
+
{
|
|
662
|
+
ref,
|
|
663
|
+
className: cn("empty-state", className),
|
|
664
|
+
...props,
|
|
665
|
+
children: [
|
|
666
|
+
hasMedia && /* @__PURE__ */ jsx("div", { className: "empty-state-media", children: mediaSlot ?? (image ? /* @__PURE__ */ jsx(
|
|
667
|
+
"img",
|
|
668
|
+
{
|
|
669
|
+
src: image,
|
|
670
|
+
alt: imageAlt,
|
|
671
|
+
className: "empty-state-image"
|
|
672
|
+
}
|
|
673
|
+
) : /* @__PURE__ */ jsx("span", { className: "empty-state-icon", children: icon })) }),
|
|
674
|
+
hasHeadline && /* @__PURE__ */ jsx("div", { className: "empty-state-headline", children: headlineSlot ?? headline }),
|
|
675
|
+
hasTitle && /* @__PURE__ */ jsx("div", { className: "empty-state-title", children: titleSlot ?? title }),
|
|
676
|
+
hasSubtitle && /* @__PURE__ */ jsx("div", { className: "empty-state-subtitle", children: subtitleSlot ?? subtitle }),
|
|
677
|
+
hasText && /* @__PURE__ */ jsx("div", { className: "empty-state-text", children: textSlot ?? text }),
|
|
678
|
+
children && /* @__PURE__ */ jsx("div", { className: "empty-state-default", children }),
|
|
679
|
+
hasActions && /* @__PURE__ */ jsx("div", { className: "empty-state-actions", children: actionsSlot ?? /* @__PURE__ */ jsx(EmptyStateAction, { onClick: onClickAction, children: actionText }) })
|
|
680
|
+
]
|
|
681
|
+
}
|
|
682
|
+
);
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
EmptyState.displayName = "EmptyState";
|
|
686
|
+
const EmptyStateAction = React.forwardRef(({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
687
|
+
"button",
|
|
688
|
+
{
|
|
689
|
+
ref,
|
|
690
|
+
type: "button",
|
|
691
|
+
className: cn(
|
|
692
|
+
"empty-state-action-btn",
|
|
693
|
+
variant === "primary" && "empty-state-action-btn--primary",
|
|
694
|
+
variant === "outline" && "empty-state-action-btn--outline",
|
|
695
|
+
className
|
|
696
|
+
),
|
|
697
|
+
...props
|
|
698
|
+
}
|
|
699
|
+
));
|
|
700
|
+
EmptyStateAction.displayName = "EmptyStateAction";
|
|
50
701
|
const buttonVariants = cva(
|
|
51
702
|
"button",
|
|
52
703
|
{
|
|
@@ -87,13 +738,13 @@ const sizeTextClasses = {
|
|
|
87
738
|
icon: ""
|
|
88
739
|
};
|
|
89
740
|
const Button = React.forwardRef(
|
|
90
|
-
({ className, variant
|
|
741
|
+
({ className, variant, size, ftMadeFont, mazzardSoftFont, children, style, ...props }, ref) => {
|
|
91
742
|
const textClass = sizeTextClasses[size || "large"];
|
|
92
743
|
return /* @__PURE__ */ jsx(
|
|
93
744
|
"button",
|
|
94
745
|
{
|
|
95
746
|
className: cn(
|
|
96
|
-
buttonVariants({ variant
|
|
747
|
+
buttonVariants({ variant, size }),
|
|
97
748
|
ftMadeFont && "font-ftMade",
|
|
98
749
|
mazzardSoftFont && "font-mazzardSoft",
|
|
99
750
|
className
|
|
@@ -431,7 +1082,7 @@ const AccordionListRow = React.forwardRef(
|
|
|
431
1082
|
rightContent,
|
|
432
1083
|
onClick,
|
|
433
1084
|
className,
|
|
434
|
-
variant
|
|
1085
|
+
variant = "default",
|
|
435
1086
|
...props
|
|
436
1087
|
}, ref) => {
|
|
437
1088
|
return /* @__PURE__ */ jsxs("div", { ref, onClick, className: cn(className), ...props, children: [
|
|
@@ -488,13 +1139,13 @@ const defaultElementMap = {
|
|
|
488
1139
|
"number-base": "span"
|
|
489
1140
|
};
|
|
490
1141
|
const Text = React.forwardRef(
|
|
491
|
-
({ className, variant
|
|
492
|
-
const Component = as || defaultElementMap[
|
|
1142
|
+
({ className, variant = "body-base", as, ...props }, ref) => {
|
|
1143
|
+
const Component = as || defaultElementMap[variant];
|
|
493
1144
|
return /* @__PURE__ */ jsx(
|
|
494
1145
|
Component,
|
|
495
1146
|
{
|
|
496
1147
|
ref,
|
|
497
|
-
className: cn(typographyVariants({ variant
|
|
1148
|
+
className: cn(typographyVariants({ variant }), className),
|
|
498
1149
|
...props
|
|
499
1150
|
}
|
|
500
1151
|
);
|
|
@@ -508,7 +1159,7 @@ const List = React.forwardRef(
|
|
|
508
1159
|
);
|
|
509
1160
|
List.displayName = "List";
|
|
510
1161
|
const ListItem = React.forwardRef(
|
|
511
|
-
({ className, variant
|
|
1162
|
+
({ className, variant = "body-base", children, ...props }, ref) => {
|
|
512
1163
|
return /* @__PURE__ */ jsxs(
|
|
513
1164
|
"li",
|
|
514
1165
|
{
|
|
@@ -529,21 +1180,37 @@ const ListItem = React.forwardRef(
|
|
|
529
1180
|
children: /* @__PURE__ */ jsx("circle", { cx: "2", cy: "2", r: "2", fill: "#71747D" })
|
|
530
1181
|
}
|
|
531
1182
|
),
|
|
532
|
-
/* @__PURE__ */ jsx("span", { className: cn(typographyVariants({ variant
|
|
1183
|
+
/* @__PURE__ */ jsx("span", { className: cn(typographyVariants({ variant })), children })
|
|
533
1184
|
]
|
|
534
1185
|
}
|
|
535
1186
|
);
|
|
536
1187
|
}
|
|
537
1188
|
);
|
|
538
1189
|
ListItem.displayName = "ListItem";
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
1190
|
+
const cardVariants = cva("card", {
|
|
1191
|
+
variants: {
|
|
1192
|
+
variant: {
|
|
1193
|
+
default: "card--default",
|
|
1194
|
+
outlined: "card--outlined",
|
|
1195
|
+
elevated: "card--elevated",
|
|
1196
|
+
filled: "card--filled",
|
|
1197
|
+
interactive: "card--interactive"
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
defaultVariants: {
|
|
1201
|
+
variant: "default"
|
|
545
1202
|
}
|
|
546
|
-
)
|
|
1203
|
+
});
|
|
1204
|
+
const Card = React.forwardRef(
|
|
1205
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1206
|
+
"div",
|
|
1207
|
+
{
|
|
1208
|
+
ref,
|
|
1209
|
+
className: cn(cardVariants({ variant }), className),
|
|
1210
|
+
...props
|
|
1211
|
+
}
|
|
1212
|
+
)
|
|
1213
|
+
);
|
|
547
1214
|
Card.displayName = "Card";
|
|
548
1215
|
const CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("card-header", className), ...props }));
|
|
549
1216
|
CardHeader.displayName = "CardHeader";
|
|
@@ -583,21 +1250,51 @@ const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
583
1250
|
}
|
|
584
1251
|
));
|
|
585
1252
|
CardFooter.displayName = "CardFooter";
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
1253
|
+
const CardMedia = React.forwardRef(({ className, src, alt = "", height = 200, children, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("card-media", className), style: { height }, ...props, children: src ? /* @__PURE__ */ jsx("img", { src, alt, className: "card-media__img" }) : children }));
|
|
1254
|
+
CardMedia.displayName = "CardMedia";
|
|
1255
|
+
const CardBadge = React.forwardRef(
|
|
1256
|
+
({ className, color = "default", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1257
|
+
"span",
|
|
1258
|
+
{
|
|
1259
|
+
ref,
|
|
1260
|
+
className: cn("card-badge", `card-badge--${color}`, className),
|
|
1261
|
+
...props
|
|
1262
|
+
}
|
|
1263
|
+
)
|
|
1264
|
+
);
|
|
1265
|
+
CardBadge.displayName = "CardBadge";
|
|
1266
|
+
const CardActions = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("card-actions", className), ...props }));
|
|
1267
|
+
CardActions.displayName = "CardActions";
|
|
1268
|
+
const CardMetric = React.forwardRef(
|
|
1269
|
+
({ className, value, label, trend, trendValue, ...props }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: cn("card-metric", className), ...props, children: [
|
|
1270
|
+
/* @__PURE__ */ jsx("span", { className: "card-metric__value", children: value }),
|
|
1271
|
+
/* @__PURE__ */ jsx("span", { className: "card-metric__label", children: label }),
|
|
1272
|
+
trend && trendValue && /* @__PURE__ */ jsxs("span", { className: cn("card-metric__trend", `card-metric__trend--${trend}`), children: [
|
|
1273
|
+
trend === "up" ? "↑" : trend === "down" ? "↓" : "→",
|
|
1274
|
+
" ",
|
|
1275
|
+
trendValue
|
|
1276
|
+
] })
|
|
1277
|
+
] })
|
|
1278
|
+
);
|
|
1279
|
+
CardMetric.displayName = "CardMetric";
|
|
1280
|
+
const CardWithIcon = React.forwardRef(
|
|
1281
|
+
({ icon: Icon, title, description, onClick }, ref) => /* @__PURE__ */ jsxs(
|
|
1282
|
+
Card,
|
|
1283
|
+
{
|
|
1284
|
+
ref,
|
|
1285
|
+
variant: "interactive",
|
|
1286
|
+
className: "card-with-icon",
|
|
1287
|
+
onClick,
|
|
1288
|
+
children: [
|
|
1289
|
+
/* @__PURE__ */ jsxs("div", { className: "card-with-icon__header", children: [
|
|
1290
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "card-with-icon__icon" }),
|
|
1291
|
+
/* @__PURE__ */ jsx(Text, { as: "h3", variant: "overline-large", children: title })
|
|
1292
|
+
] }),
|
|
1293
|
+
/* @__PURE__ */ jsx(Text, { as: "p", variant: "body-base", children: description })
|
|
1294
|
+
]
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1297
|
+
);
|
|
601
1298
|
CardWithIcon.displayName = "CardWithIcon";
|
|
602
1299
|
const Separator = React.forwardRef(
|
|
603
1300
|
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
@@ -809,13 +1506,13 @@ const sheetVariants = cva(
|
|
|
809
1506
|
}
|
|
810
1507
|
}
|
|
811
1508
|
);
|
|
812
|
-
const SheetContent = React.forwardRef(({ side
|
|
1509
|
+
const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
813
1510
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
814
1511
|
/* @__PURE__ */ jsxs(
|
|
815
1512
|
SheetPrimitive.Content,
|
|
816
1513
|
{
|
|
817
1514
|
ref,
|
|
818
|
-
className: cn(sheetVariants({ side
|
|
1515
|
+
className: cn(sheetVariants({ side }), className),
|
|
819
1516
|
...props,
|
|
820
1517
|
children: [
|
|
821
1518
|
children,
|
|
@@ -1027,9 +1724,9 @@ function TooltipTrigger({
|
|
|
1027
1724
|
}
|
|
1028
1725
|
function TooltipContent({
|
|
1029
1726
|
className,
|
|
1030
|
-
variant
|
|
1727
|
+
variant,
|
|
1031
1728
|
sideOffset = 0,
|
|
1032
|
-
side
|
|
1729
|
+
side = "bottom",
|
|
1033
1730
|
children,
|
|
1034
1731
|
alignOffset = 0,
|
|
1035
1732
|
hideClose = false,
|
|
@@ -1062,11 +1759,11 @@ function TooltipContent({
|
|
|
1062
1759
|
"data-slot": "tooltip-content",
|
|
1063
1760
|
sideOffset,
|
|
1064
1761
|
alignOffset,
|
|
1065
|
-
side
|
|
1066
|
-
className: cn(tooltipContentVariants({ variant
|
|
1762
|
+
side,
|
|
1763
|
+
className: cn(tooltipContentVariants({ variant }), className),
|
|
1067
1764
|
...props,
|
|
1068
1765
|
children: [
|
|
1069
|
-
|
|
1766
|
+
variant !== "simple" && /* @__PURE__ */ jsx("div", { className: "tooltip-arrow", children: /* @__PURE__ */ jsx(
|
|
1070
1767
|
"svg",
|
|
1071
1768
|
{
|
|
1072
1769
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1083,7 +1780,7 @@ function TooltipContent({
|
|
|
1083
1780
|
)
|
|
1084
1781
|
}
|
|
1085
1782
|
) }),
|
|
1086
|
-
|
|
1783
|
+
variant !== "simple" && !hideClose && /* @__PURE__ */ jsx(ToggleClose, {}),
|
|
1087
1784
|
children
|
|
1088
1785
|
]
|
|
1089
1786
|
}
|
|
@@ -1154,10 +1851,10 @@ const SidebarProvider = React.forwardRef(
|
|
|
1154
1851
|
window.addEventListener("keydown", handleKeyDown);
|
|
1155
1852
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1156
1853
|
}, [toggleSidebar]);
|
|
1157
|
-
const
|
|
1854
|
+
const state = open ? "expanded" : "collapsed";
|
|
1158
1855
|
const contextValue = React.useMemo(
|
|
1159
1856
|
() => ({
|
|
1160
|
-
state
|
|
1857
|
+
state,
|
|
1161
1858
|
open,
|
|
1162
1859
|
setOpen,
|
|
1163
1860
|
isMobile,
|
|
@@ -1166,7 +1863,7 @@ const SidebarProvider = React.forwardRef(
|
|
|
1166
1863
|
toggleSidebar
|
|
1167
1864
|
}),
|
|
1168
1865
|
[
|
|
1169
|
-
|
|
1866
|
+
state,
|
|
1170
1867
|
open,
|
|
1171
1868
|
setOpen,
|
|
1172
1869
|
isMobile,
|
|
@@ -1197,15 +1894,15 @@ const SidebarProvider = React.forwardRef(
|
|
|
1197
1894
|
SidebarProvider.displayName = "SidebarProvider";
|
|
1198
1895
|
const Sidebar = React.forwardRef(
|
|
1199
1896
|
({
|
|
1200
|
-
side
|
|
1201
|
-
variant
|
|
1202
|
-
collapsible
|
|
1897
|
+
side = "left",
|
|
1898
|
+
variant = "sidebar",
|
|
1899
|
+
collapsible = "offcanvas",
|
|
1203
1900
|
className,
|
|
1204
1901
|
children,
|
|
1205
1902
|
...props
|
|
1206
1903
|
}, ref) => {
|
|
1207
|
-
const { isMobile, state
|
|
1208
|
-
if (
|
|
1904
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1905
|
+
if (collapsible === "none") {
|
|
1209
1906
|
return /* @__PURE__ */ jsx(
|
|
1210
1907
|
"div",
|
|
1211
1908
|
{
|
|
@@ -1229,7 +1926,7 @@ const Sidebar = React.forwardRef(
|
|
|
1229
1926
|
style: {
|
|
1230
1927
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1231
1928
|
},
|
|
1232
|
-
side
|
|
1929
|
+
side,
|
|
1233
1930
|
children: /* @__PURE__ */ jsx("div", { className: "sidebar-mobile-content", children })
|
|
1234
1931
|
}
|
|
1235
1932
|
) });
|
|
@@ -1239,10 +1936,10 @@ const Sidebar = React.forwardRef(
|
|
|
1239
1936
|
{
|
|
1240
1937
|
ref,
|
|
1241
1938
|
className: "sidebar-base peer",
|
|
1242
|
-
"data-state":
|
|
1243
|
-
"data-collapsible":
|
|
1244
|
-
"data-variant":
|
|
1245
|
-
"data-side":
|
|
1939
|
+
"data-state": state,
|
|
1940
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1941
|
+
"data-variant": variant,
|
|
1942
|
+
"data-side": side,
|
|
1246
1943
|
children: [
|
|
1247
1944
|
/* @__PURE__ */ jsx("div", { className: "sidebar-base" }),
|
|
1248
1945
|
/* @__PURE__ */ jsx(
|
|
@@ -1252,16 +1949,16 @@ const Sidebar = React.forwardRef(
|
|
|
1252
1949
|
"sidebar-container",
|
|
1253
1950
|
className
|
|
1254
1951
|
),
|
|
1255
|
-
"data-side":
|
|
1256
|
-
"data-collapsible":
|
|
1257
|
-
"data-variant":
|
|
1952
|
+
"data-side": side,
|
|
1953
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
1954
|
+
"data-variant": variant,
|
|
1258
1955
|
...props,
|
|
1259
1956
|
children: /* @__PURE__ */ jsx(
|
|
1260
1957
|
"div",
|
|
1261
1958
|
{
|
|
1262
1959
|
"data-sidebar": "sidebar",
|
|
1263
1960
|
className: "sidebar-inner",
|
|
1264
|
-
"data-variant":
|
|
1961
|
+
"data-variant": variant,
|
|
1265
1962
|
children
|
|
1266
1963
|
}
|
|
1267
1964
|
)
|
|
@@ -1296,7 +1993,7 @@ const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
1296
1993
|
);
|
|
1297
1994
|
});
|
|
1298
1995
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
1299
|
-
const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
|
|
1996
|
+
const SidebarRail = React.forwardRef(({ className, side, state, collapsible, ...props }, ref) => {
|
|
1300
1997
|
const { toggleSidebar } = useSidebar();
|
|
1301
1998
|
return /* @__PURE__ */ jsx(
|
|
1302
1999
|
"button",
|
|
@@ -1319,7 +2016,7 @@ const SidebarRail = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
1319
2016
|
);
|
|
1320
2017
|
});
|
|
1321
2018
|
SidebarRail.displayName = "SidebarRail";
|
|
1322
|
-
const SidebarInset = React.forwardRef(({ className, ...props }, ref) => {
|
|
2019
|
+
const SidebarInset = React.forwardRef(({ className, state, variant, ...props }, ref) => {
|
|
1323
2020
|
return /* @__PURE__ */ jsx(
|
|
1324
2021
|
"main",
|
|
1325
2022
|
{
|
|
@@ -1499,14 +2196,14 @@ const SidebarMenuButton = React.forwardRef(
|
|
|
1499
2196
|
({
|
|
1500
2197
|
asChild = false,
|
|
1501
2198
|
isActive = false,
|
|
1502
|
-
variant
|
|
2199
|
+
variant = "default",
|
|
1503
2200
|
size = "default",
|
|
1504
2201
|
tooltip,
|
|
1505
2202
|
className,
|
|
1506
2203
|
...props
|
|
1507
2204
|
}, ref) => {
|
|
1508
2205
|
const Comp = asChild ? Slot : "button";
|
|
1509
|
-
const { isMobile, state
|
|
2206
|
+
const { isMobile, state } = useSidebar();
|
|
1510
2207
|
const button = /* @__PURE__ */ jsx(
|
|
1511
2208
|
Comp,
|
|
1512
2209
|
{
|
|
@@ -1514,7 +2211,7 @@ const SidebarMenuButton = React.forwardRef(
|
|
|
1514
2211
|
"data-sidebar": "menu-button",
|
|
1515
2212
|
"data-size": size,
|
|
1516
2213
|
"data-active": isActive,
|
|
1517
|
-
className: cn(sidebarMenuButtonVariants({ variant
|
|
2214
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
1518
2215
|
...props
|
|
1519
2216
|
}
|
|
1520
2217
|
);
|
|
@@ -1533,7 +2230,7 @@ const SidebarMenuButton = React.forwardRef(
|
|
|
1533
2230
|
{
|
|
1534
2231
|
side: "right",
|
|
1535
2232
|
align: "center",
|
|
1536
|
-
hidden:
|
|
2233
|
+
hidden: state !== "collapsed" || isMobile,
|
|
1537
2234
|
...tooltip
|
|
1538
2235
|
}
|
|
1539
2236
|
)
|
|
@@ -1543,7 +2240,7 @@ const SidebarMenuButton = React.forwardRef(
|
|
|
1543
2240
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1544
2241
|
const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
1545
2242
|
const Comp = asChild ? Slot : "button";
|
|
1546
|
-
const { state
|
|
2243
|
+
const { state } = useSidebar();
|
|
1547
2244
|
return /* @__PURE__ */ jsx(
|
|
1548
2245
|
Comp,
|
|
1549
2246
|
{
|
|
@@ -1638,7 +2335,6 @@ const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = "md", i
|
|
|
1638
2335
|
size === "md" && "sidebar-menu-sub-button--size-md",
|
|
1639
2336
|
className
|
|
1640
2337
|
),
|
|
1641
|
-
"data-size": size,
|
|
1642
2338
|
...props
|
|
1643
2339
|
}
|
|
1644
2340
|
);
|
|
@@ -1978,17 +2674,17 @@ const ToggleGroupContext = React.createContext({
|
|
|
1978
2674
|
size: "default",
|
|
1979
2675
|
variant: "default"
|
|
1980
2676
|
});
|
|
1981
|
-
const ToggleGroup = React.forwardRef(({ className, variant
|
|
2677
|
+
const ToggleGroup = React.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1982
2678
|
ToggleGroupPrimitive.Root,
|
|
1983
2679
|
{
|
|
1984
2680
|
ref,
|
|
1985
2681
|
className: cn("toggle-group", className),
|
|
1986
2682
|
...props,
|
|
1987
|
-
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant
|
|
2683
|
+
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
1988
2684
|
}
|
|
1989
2685
|
));
|
|
1990
2686
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
1991
|
-
const ToggleGroupItem = React.forwardRef(({ className, children, variant
|
|
2687
|
+
const ToggleGroupItem = React.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
1992
2688
|
const context = React.useContext(ToggleGroupContext);
|
|
1993
2689
|
return /* @__PURE__ */ jsx(
|
|
1994
2690
|
ToggleGroupPrimitive.Item,
|
|
@@ -1996,7 +2692,7 @@ const ToggleGroupItem = React.forwardRef(({ className, children, variant: varian
|
|
|
1996
2692
|
ref,
|
|
1997
2693
|
className: cn(
|
|
1998
2694
|
toggleVariants({
|
|
1999
|
-
variant: context.variant ||
|
|
2695
|
+
variant: context.variant || variant,
|
|
2000
2696
|
size: context.size || size
|
|
2001
2697
|
}),
|
|
2002
2698
|
className
|
|
@@ -2098,8 +2794,8 @@ const badgeVariants = cva(
|
|
|
2098
2794
|
}
|
|
2099
2795
|
}
|
|
2100
2796
|
);
|
|
2101
|
-
function Badge({ className, variant
|
|
2102
|
-
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant
|
|
2797
|
+
function Badge({ className, variant, ...props }) {
|
|
2798
|
+
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
2103
2799
|
}
|
|
2104
2800
|
const alertVariants = cva(
|
|
2105
2801
|
"alert",
|
|
@@ -2115,12 +2811,12 @@ const alertVariants = cva(
|
|
|
2115
2811
|
}
|
|
2116
2812
|
}
|
|
2117
2813
|
);
|
|
2118
|
-
const Alert = React.forwardRef(({ className, variant
|
|
2814
|
+
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2119
2815
|
"div",
|
|
2120
2816
|
{
|
|
2121
2817
|
ref,
|
|
2122
2818
|
role: "alert",
|
|
2123
|
-
className: cn(alertVariants({ variant
|
|
2819
|
+
className: cn(alertVariants({ variant }), className),
|
|
2124
2820
|
...props
|
|
2125
2821
|
}
|
|
2126
2822
|
));
|
|
@@ -2143,6 +2839,68 @@ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2143
2839
|
}
|
|
2144
2840
|
));
|
|
2145
2841
|
AlertDescription.displayName = "AlertDescription";
|
|
2842
|
+
const bannerVariants = cva("banner", {
|
|
2843
|
+
variants: {
|
|
2844
|
+
variant: {
|
|
2845
|
+
default: "banner--default",
|
|
2846
|
+
info: "banner--info",
|
|
2847
|
+
success: "banner--success",
|
|
2848
|
+
warning: "banner--warning",
|
|
2849
|
+
destructive: "banner--destructive"
|
|
2850
|
+
}
|
|
2851
|
+
},
|
|
2852
|
+
defaultVariants: {
|
|
2853
|
+
variant: "default"
|
|
2854
|
+
}
|
|
2855
|
+
});
|
|
2856
|
+
const Banner = React.forwardRef(
|
|
2857
|
+
({ className, variant, sticky = false, onClose, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
2858
|
+
"div",
|
|
2859
|
+
{
|
|
2860
|
+
ref,
|
|
2861
|
+
role: "banner",
|
|
2862
|
+
className: cn(bannerVariants({ variant }), sticky && "banner--sticky", className),
|
|
2863
|
+
...props,
|
|
2864
|
+
children: [
|
|
2865
|
+
/* @__PURE__ */ jsx("div", { className: "banner-content", children }),
|
|
2866
|
+
onClose && /* @__PURE__ */ jsx(
|
|
2867
|
+
"button",
|
|
2868
|
+
{
|
|
2869
|
+
type: "button",
|
|
2870
|
+
className: "banner-close",
|
|
2871
|
+
"aria-label": "Dismiss banner",
|
|
2872
|
+
onClick: onClose,
|
|
2873
|
+
children: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
2874
|
+
/* @__PURE__ */ jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2875
|
+
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2876
|
+
] })
|
|
2877
|
+
}
|
|
2878
|
+
)
|
|
2879
|
+
]
|
|
2880
|
+
}
|
|
2881
|
+
)
|
|
2882
|
+
);
|
|
2883
|
+
Banner.displayName = "Banner";
|
|
2884
|
+
const BannerIcon = React.forwardRef(
|
|
2885
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", { ref, className: cn("banner-icon", className), "aria-hidden": "true", ...props })
|
|
2886
|
+
);
|
|
2887
|
+
BannerIcon.displayName = "BannerIcon";
|
|
2888
|
+
const BannerTitle = React.forwardRef(
|
|
2889
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("banner-title", className), ...props })
|
|
2890
|
+
);
|
|
2891
|
+
BannerTitle.displayName = "BannerTitle";
|
|
2892
|
+
const BannerDescription = React.forwardRef(
|
|
2893
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("banner-description", className), ...props })
|
|
2894
|
+
);
|
|
2895
|
+
BannerDescription.displayName = "BannerDescription";
|
|
2896
|
+
const BannerText = React.forwardRef(
|
|
2897
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("banner-text", className), ...props })
|
|
2898
|
+
);
|
|
2899
|
+
BannerText.displayName = "BannerText";
|
|
2900
|
+
const BannerAction = React.forwardRef(
|
|
2901
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("button", { ref, type: "button", className: cn("banner-action", className), ...props })
|
|
2902
|
+
);
|
|
2903
|
+
BannerAction.displayName = "BannerAction";
|
|
2146
2904
|
const AlertDialog = AlertDialogPrimitive.Root;
|
|
2147
2905
|
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
2148
2906
|
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
@@ -2706,7 +3464,7 @@ const getStatusClass = (status, colorScheme = "light") => {
|
|
|
2706
3464
|
const Tag = React.forwardRef(
|
|
2707
3465
|
({
|
|
2708
3466
|
children,
|
|
2709
|
-
variant
|
|
3467
|
+
variant = "text",
|
|
2710
3468
|
active = false,
|
|
2711
3469
|
status,
|
|
2712
3470
|
colorScheme = "light",
|
|
@@ -2736,7 +3494,7 @@ const Tag = React.forwardRef(
|
|
|
2736
3494
|
}
|
|
2737
3495
|
);
|
|
2738
3496
|
}
|
|
2739
|
-
if (
|
|
3497
|
+
if (variant === "code") {
|
|
2740
3498
|
return /* @__PURE__ */ jsx(
|
|
2741
3499
|
"button",
|
|
2742
3500
|
{
|
|
@@ -2801,6 +3559,204 @@ function HeightContainer({
|
|
|
2801
3559
|
}, [stateKey]);
|
|
2802
3560
|
return /* @__PURE__ */ jsx("div", { ref: containerRef, className: cn("overflow-clip", className), children: /* @__PURE__ */ jsx("div", { ref: innerRef, children }) });
|
|
2803
3561
|
}
|
|
3562
|
+
const spacing = (n) => `${n * 0.25}rem`;
|
|
3563
|
+
const Stack = React.forwardRef(
|
|
3564
|
+
({ as: Component = "div", direction = "vertical", gap = 4, align, justify, wrap = false, className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3565
|
+
Component,
|
|
3566
|
+
{
|
|
3567
|
+
ref,
|
|
3568
|
+
className: cn(
|
|
3569
|
+
"stack",
|
|
3570
|
+
direction === "horizontal" && "stack--horizontal",
|
|
3571
|
+
align && `stack--align-${align}`,
|
|
3572
|
+
justify && `stack--justify-${justify}`,
|
|
3573
|
+
wrap && "stack--wrap",
|
|
3574
|
+
className
|
|
3575
|
+
),
|
|
3576
|
+
style: { gap: spacing(gap), ...style },
|
|
3577
|
+
...props
|
|
3578
|
+
}
|
|
3579
|
+
)
|
|
3580
|
+
);
|
|
3581
|
+
Stack.displayName = "Stack";
|
|
3582
|
+
const Grid = React.forwardRef(
|
|
3583
|
+
({ as: Component = "div", cols = 1, colsSm, colsMd, colsLg, gap = 4, rowGap, colGap, className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3584
|
+
Component,
|
|
3585
|
+
{
|
|
3586
|
+
ref,
|
|
3587
|
+
className: cn(
|
|
3588
|
+
"grid-layout",
|
|
3589
|
+
`grid-layout--cols-${cols}`,
|
|
3590
|
+
colsSm && `grid-layout--sm-cols-${colsSm}`,
|
|
3591
|
+
colsMd && `grid-layout--md-cols-${colsMd}`,
|
|
3592
|
+
colsLg && `grid-layout--lg-cols-${colsLg}`,
|
|
3593
|
+
className
|
|
3594
|
+
),
|
|
3595
|
+
style: {
|
|
3596
|
+
gap: rowGap === void 0 && colGap === void 0 ? spacing(gap) : void 0,
|
|
3597
|
+
rowGap: rowGap !== void 0 ? spacing(rowGap) : void 0,
|
|
3598
|
+
columnGap: colGap !== void 0 ? spacing(colGap) : void 0,
|
|
3599
|
+
...style
|
|
3600
|
+
},
|
|
3601
|
+
...props
|
|
3602
|
+
}
|
|
3603
|
+
)
|
|
3604
|
+
);
|
|
3605
|
+
Grid.displayName = "Grid";
|
|
3606
|
+
const ColumnsPresetMap = {
|
|
3607
|
+
"sidebar": "280px 1fr",
|
|
3608
|
+
"sidebar-right": "1fr 280px",
|
|
3609
|
+
"wide-sidebar": "360px 1fr",
|
|
3610
|
+
"narrow-sidebar": "200px 1fr",
|
|
3611
|
+
"split": "1fr 1fr",
|
|
3612
|
+
"1-2": "1fr 2fr",
|
|
3613
|
+
"2-1": "2fr 1fr",
|
|
3614
|
+
"1-3": "1fr 3fr",
|
|
3615
|
+
"3-1": "3fr 1fr"
|
|
3616
|
+
};
|
|
3617
|
+
const Columns = React.forwardRef(
|
|
3618
|
+
({ as: Component = "div", preset = "split", template, gap = 6, colGap, rowGap, collapse, className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3619
|
+
Component,
|
|
3620
|
+
{
|
|
3621
|
+
ref,
|
|
3622
|
+
className: cn(
|
|
3623
|
+
"columns-layout",
|
|
3624
|
+
collapse && `columns-layout--collapse-${collapse}`,
|
|
3625
|
+
className
|
|
3626
|
+
),
|
|
3627
|
+
style: {
|
|
3628
|
+
gridTemplateColumns: template ?? ColumnsPresetMap[preset],
|
|
3629
|
+
gap: rowGap === void 0 && colGap === void 0 ? spacing(gap) : void 0,
|
|
3630
|
+
rowGap: rowGap !== void 0 ? spacing(rowGap) : void 0,
|
|
3631
|
+
columnGap: colGap !== void 0 ? spacing(colGap) : void 0,
|
|
3632
|
+
...style
|
|
3633
|
+
},
|
|
3634
|
+
...props
|
|
3635
|
+
}
|
|
3636
|
+
)
|
|
3637
|
+
);
|
|
3638
|
+
Columns.displayName = "Columns";
|
|
3639
|
+
const Container = React.forwardRef(
|
|
3640
|
+
({ as: Component = "div", size = "xl", center = true, padded = true, className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3641
|
+
Component,
|
|
3642
|
+
{
|
|
3643
|
+
ref,
|
|
3644
|
+
className: cn(
|
|
3645
|
+
"container-layout",
|
|
3646
|
+
`container-layout--${size}`,
|
|
3647
|
+
center && "container-layout--center",
|
|
3648
|
+
padded && "container-layout--padded",
|
|
3649
|
+
className
|
|
3650
|
+
),
|
|
3651
|
+
...props
|
|
3652
|
+
}
|
|
3653
|
+
)
|
|
3654
|
+
);
|
|
3655
|
+
Container.displayName = "Container";
|
|
3656
|
+
const Section = React.forwardRef(
|
|
3657
|
+
({ as: Component = "section", padding = "lg", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3658
|
+
Component,
|
|
3659
|
+
{
|
|
3660
|
+
ref,
|
|
3661
|
+
className: cn("section-layout", padding !== "none" && `section-layout--${padding}`, className),
|
|
3662
|
+
...props
|
|
3663
|
+
}
|
|
3664
|
+
)
|
|
3665
|
+
);
|
|
3666
|
+
Section.displayName = "Section";
|
|
3667
|
+
const AppShell = React.forwardRef(
|
|
3668
|
+
({ sidebarWidth = "17.5rem", headerHeight = "4rem", className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3669
|
+
"div",
|
|
3670
|
+
{
|
|
3671
|
+
ref,
|
|
3672
|
+
className: cn("app-shell", className),
|
|
3673
|
+
style: {
|
|
3674
|
+
"--app-shell-header-height": typeof headerHeight === "number" ? `${headerHeight}px` : headerHeight,
|
|
3675
|
+
"--app-shell-sidebar-width": typeof sidebarWidth === "number" ? `${sidebarWidth}px` : sidebarWidth,
|
|
3676
|
+
...style
|
|
3677
|
+
},
|
|
3678
|
+
...props
|
|
3679
|
+
}
|
|
3680
|
+
)
|
|
3681
|
+
);
|
|
3682
|
+
AppShell.displayName = "AppShell";
|
|
3683
|
+
const AppShellHeader = React.forwardRef(
|
|
3684
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("header", { ref, className: cn("app-shell-header", className), ...props })
|
|
3685
|
+
);
|
|
3686
|
+
AppShellHeader.displayName = "AppShellHeader";
|
|
3687
|
+
const AppShellSidebar = React.forwardRef(
|
|
3688
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn("app-shell-sidebar", className), ...props })
|
|
3689
|
+
);
|
|
3690
|
+
AppShellSidebar.displayName = "AppShellSidebar";
|
|
3691
|
+
const AppShellMain = React.forwardRef(
|
|
3692
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("main", { ref, className: cn("app-shell-main", className), ...props })
|
|
3693
|
+
);
|
|
3694
|
+
AppShellMain.displayName = "AppShellMain";
|
|
3695
|
+
const AppShellFooter = React.forwardRef(
|
|
3696
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx("footer", { ref, className: cn("app-shell-footer", className), ...props })
|
|
3697
|
+
);
|
|
3698
|
+
AppShellFooter.displayName = "AppShellFooter";
|
|
3699
|
+
const Show = React.forwardRef(
|
|
3700
|
+
({ above, below, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3701
|
+
Component,
|
|
3702
|
+
{
|
|
3703
|
+
ref,
|
|
3704
|
+
className: cn(
|
|
3705
|
+
above && `show-above-${above}`,
|
|
3706
|
+
below && `show-below-${below}`,
|
|
3707
|
+
className
|
|
3708
|
+
),
|
|
3709
|
+
...props
|
|
3710
|
+
}
|
|
3711
|
+
)
|
|
3712
|
+
);
|
|
3713
|
+
Show.displayName = "Show";
|
|
3714
|
+
const Hide = React.forwardRef(
|
|
3715
|
+
({ above, below, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3716
|
+
Component,
|
|
3717
|
+
{
|
|
3718
|
+
ref,
|
|
3719
|
+
className: cn(
|
|
3720
|
+
above && `hide-above-${above}`,
|
|
3721
|
+
below && `hide-below-${below}`,
|
|
3722
|
+
className
|
|
3723
|
+
),
|
|
3724
|
+
...props
|
|
3725
|
+
}
|
|
3726
|
+
)
|
|
3727
|
+
);
|
|
3728
|
+
Hide.displayName = "Hide";
|
|
3729
|
+
const Positioned = React.forwardRef(
|
|
3730
|
+
({ as: Component = "div", position = "relative", top, right, bottom, left, inset, zIndex, fill = false, className, style, ...props }, ref) => {
|
|
3731
|
+
const resolveValue = (v) => v === void 0 ? void 0 : typeof v === "number" ? spacing(v) : v;
|
|
3732
|
+
return /* @__PURE__ */ jsx(
|
|
3733
|
+
Component,
|
|
3734
|
+
{
|
|
3735
|
+
ref,
|
|
3736
|
+
className: cn(`positioned--${position}`, className),
|
|
3737
|
+
style: {
|
|
3738
|
+
top: resolveValue(top),
|
|
3739
|
+
right: resolveValue(right),
|
|
3740
|
+
bottom: resolveValue(bottom),
|
|
3741
|
+
left: resolveValue(left),
|
|
3742
|
+
inset: fill ? 0 : resolveValue(inset),
|
|
3743
|
+
zIndex,
|
|
3744
|
+
...style
|
|
3745
|
+
},
|
|
3746
|
+
...props
|
|
3747
|
+
}
|
|
3748
|
+
);
|
|
3749
|
+
}
|
|
3750
|
+
);
|
|
3751
|
+
Positioned.displayName = "Positioned";
|
|
3752
|
+
const Spacer = ({ size = 4, axis = "vertical" }) => /* @__PURE__ */ jsx(
|
|
3753
|
+
"div",
|
|
3754
|
+
{
|
|
3755
|
+
"aria-hidden": "true",
|
|
3756
|
+
style: axis === "vertical" ? { height: spacing(size), minHeight: spacing(size) } : { width: spacing(size), minWidth: spacing(size) }
|
|
3757
|
+
}
|
|
3758
|
+
);
|
|
3759
|
+
Spacer.displayName = "Spacer";
|
|
2804
3760
|
const TabsContext = createContext(null);
|
|
2805
3761
|
function useTabsContext() {
|
|
2806
3762
|
const ctx = useContext(TabsContext);
|
|
@@ -2988,7 +3944,7 @@ function TabsTrigger({
|
|
|
2988
3944
|
value,
|
|
2989
3945
|
children,
|
|
2990
3946
|
className,
|
|
2991
|
-
variant
|
|
3947
|
+
variant = "default"
|
|
2992
3948
|
}) {
|
|
2993
3949
|
const { selectedValue, setSelectedValue, registerValue } = useTabsContext();
|
|
2994
3950
|
const { registerRef } = useTabsNavContext();
|
|
@@ -3008,7 +3964,7 @@ function TabsTrigger({
|
|
|
3008
3964
|
"button",
|
|
3009
3965
|
{
|
|
3010
3966
|
className: cn("tabs-nav-button", className),
|
|
3011
|
-
"data-variant":
|
|
3967
|
+
"data-variant": variant,
|
|
3012
3968
|
onClick: handleClick,
|
|
3013
3969
|
ref: refCallback,
|
|
3014
3970
|
children: /* @__PURE__ */ jsx(
|
|
@@ -3814,13 +4770,13 @@ const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
3814
4770
|
});
|
|
3815
4771
|
CarouselItem.displayName = "CarouselItem";
|
|
3816
4772
|
const CarouselPrevious = React.forwardRef(
|
|
3817
|
-
({ className, variant
|
|
4773
|
+
({ className, variant = "general-secondary", size = "icon", ...props }, ref) => {
|
|
3818
4774
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
3819
4775
|
return /* @__PURE__ */ jsxs(
|
|
3820
4776
|
Button,
|
|
3821
4777
|
{
|
|
3822
4778
|
ref,
|
|
3823
|
-
variant
|
|
4779
|
+
variant,
|
|
3824
4780
|
size,
|
|
3825
4781
|
className: cn(
|
|
3826
4782
|
"carousel-button carousel-button--previous",
|
|
@@ -3840,13 +4796,13 @@ const CarouselPrevious = React.forwardRef(
|
|
|
3840
4796
|
);
|
|
3841
4797
|
CarouselPrevious.displayName = "CarouselPrevious";
|
|
3842
4798
|
const CarouselNext = React.forwardRef(
|
|
3843
|
-
({ className, variant
|
|
4799
|
+
({ className, variant = "general-secondary", size = "icon", ...props }, ref) => {
|
|
3844
4800
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
3845
4801
|
return /* @__PURE__ */ jsxs(
|
|
3846
4802
|
Button,
|
|
3847
4803
|
{
|
|
3848
4804
|
ref,
|
|
3849
|
-
variant
|
|
4805
|
+
variant,
|
|
3850
4806
|
size,
|
|
3851
4807
|
className: cn(
|
|
3852
4808
|
"carousel-button carousel-button--next",
|
|
@@ -3892,12 +4848,12 @@ const toastVariants = cva(
|
|
|
3892
4848
|
}
|
|
3893
4849
|
}
|
|
3894
4850
|
);
|
|
3895
|
-
const Toast = React.forwardRef(({ className, variant
|
|
4851
|
+
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
|
3896
4852
|
return /* @__PURE__ */ jsx(
|
|
3897
4853
|
ToastPrimitives.Root,
|
|
3898
4854
|
{
|
|
3899
4855
|
ref,
|
|
3900
|
-
className: cn(toastVariants({ variant
|
|
4856
|
+
className: cn(toastVariants({ variant }), className),
|
|
3901
4857
|
...props
|
|
3902
4858
|
}
|
|
3903
4859
|
);
|
|
@@ -3962,17 +4918,17 @@ const addToRemoveQueue = (toastId) => {
|
|
|
3962
4918
|
}, TOAST_REMOVE_DELAY);
|
|
3963
4919
|
toastTimeouts.set(toastId, timeout);
|
|
3964
4920
|
};
|
|
3965
|
-
const reducer = (
|
|
4921
|
+
const reducer = (state, action) => {
|
|
3966
4922
|
switch (action.type) {
|
|
3967
4923
|
case "ADD_TOAST":
|
|
3968
4924
|
return {
|
|
3969
|
-
...
|
|
3970
|
-
toasts: [action.toast, ...
|
|
4925
|
+
...state,
|
|
4926
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
3971
4927
|
};
|
|
3972
4928
|
case "UPDATE_TOAST":
|
|
3973
4929
|
return {
|
|
3974
|
-
...
|
|
3975
|
-
toasts:
|
|
4930
|
+
...state,
|
|
4931
|
+
toasts: state.toasts.map(
|
|
3976
4932
|
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
3977
4933
|
)
|
|
3978
4934
|
};
|
|
@@ -3981,13 +4937,13 @@ const reducer = (state2, action) => {
|
|
|
3981
4937
|
if (toastId) {
|
|
3982
4938
|
addToRemoveQueue(toastId);
|
|
3983
4939
|
} else {
|
|
3984
|
-
|
|
4940
|
+
state.toasts.forEach((toast2) => {
|
|
3985
4941
|
addToRemoveQueue(toast2.id);
|
|
3986
4942
|
});
|
|
3987
4943
|
}
|
|
3988
4944
|
return {
|
|
3989
|
-
...
|
|
3990
|
-
toasts:
|
|
4945
|
+
...state,
|
|
4946
|
+
toasts: state.toasts.map(
|
|
3991
4947
|
(t) => t.id === toastId || toastId === void 0 ? {
|
|
3992
4948
|
...t,
|
|
3993
4949
|
open: false
|
|
@@ -3998,13 +4954,13 @@ const reducer = (state2, action) => {
|
|
|
3998
4954
|
case "REMOVE_TOAST":
|
|
3999
4955
|
if (action.toastId === void 0) {
|
|
4000
4956
|
return {
|
|
4001
|
-
...
|
|
4957
|
+
...state,
|
|
4002
4958
|
toasts: []
|
|
4003
4959
|
};
|
|
4004
4960
|
}
|
|
4005
4961
|
return {
|
|
4006
|
-
...
|
|
4007
|
-
toasts:
|
|
4962
|
+
...state,
|
|
4963
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
4008
4964
|
};
|
|
4009
4965
|
}
|
|
4010
4966
|
};
|
|
@@ -4041,7 +4997,7 @@ function toast({ ...props }) {
|
|
|
4041
4997
|
};
|
|
4042
4998
|
}
|
|
4043
4999
|
function useToast() {
|
|
4044
|
-
const [
|
|
5000
|
+
const [state, setState] = React.useState(memoryState);
|
|
4045
5001
|
React.useEffect(() => {
|
|
4046
5002
|
listeners.push(setState);
|
|
4047
5003
|
return () => {
|
|
@@ -4050,9 +5006,9 @@ function useToast() {
|
|
|
4050
5006
|
listeners.splice(index, 1);
|
|
4051
5007
|
}
|
|
4052
5008
|
};
|
|
4053
|
-
}, [
|
|
5009
|
+
}, [state]);
|
|
4054
5010
|
return {
|
|
4055
|
-
...
|
|
5011
|
+
...state,
|
|
4056
5012
|
toast,
|
|
4057
5013
|
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
4058
5014
|
};
|
|
@@ -4915,6 +5871,398 @@ const NavigationAccount = React.forwardRef(({ className, asChild, children, ...p
|
|
|
4915
5871
|
);
|
|
4916
5872
|
});
|
|
4917
5873
|
NavigationAccount.displayName = "NavigationAccount";
|
|
5874
|
+
function formatBytes(bytes) {
|
|
5875
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
5876
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
5877
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
5878
|
+
}
|
|
5879
|
+
function getFileIcon(type) {
|
|
5880
|
+
if (type.startsWith("image/")) return "🖼";
|
|
5881
|
+
if (type === "application/pdf") return "📄";
|
|
5882
|
+
if (type.includes("spreadsheet") || type.includes("excel") || type.includes("csv")) return "📊";
|
|
5883
|
+
if (type.includes("word") || type.includes("document")) return "📝";
|
|
5884
|
+
if (type.includes("zip") || type.includes("compressed")) return "🗜";
|
|
5885
|
+
return "📎";
|
|
5886
|
+
}
|
|
5887
|
+
const FileUpload = React.forwardRef(
|
|
5888
|
+
({
|
|
5889
|
+
accept,
|
|
5890
|
+
multiple = false,
|
|
5891
|
+
maxSize,
|
|
5892
|
+
maxFiles,
|
|
5893
|
+
disabled = false,
|
|
5894
|
+
variant = "default",
|
|
5895
|
+
onFilesChange,
|
|
5896
|
+
className
|
|
5897
|
+
}, ref) => {
|
|
5898
|
+
const [files, setFiles] = React.useState([]);
|
|
5899
|
+
const [isDragging, setIsDragging] = React.useState(false);
|
|
5900
|
+
const inputRef = React.useRef(null);
|
|
5901
|
+
const validateFile = (file) => {
|
|
5902
|
+
if (maxSize && file.size > maxSize) {
|
|
5903
|
+
return `File exceeds ${formatBytes(maxSize)} limit`;
|
|
5904
|
+
}
|
|
5905
|
+
return void 0;
|
|
5906
|
+
};
|
|
5907
|
+
const addFiles = (incoming) => {
|
|
5908
|
+
const incomingArray = Array.from(incoming);
|
|
5909
|
+
const next = multiple ? [...files] : [];
|
|
5910
|
+
for (const file of incomingArray) {
|
|
5911
|
+
if (maxFiles && next.filter((f) => !f.error).length >= maxFiles) break;
|
|
5912
|
+
const error = validateFile(file);
|
|
5913
|
+
next.push({ file, id: `${file.name}-${Date.now()}-${Math.random()}`, error });
|
|
5914
|
+
}
|
|
5915
|
+
setFiles(next);
|
|
5916
|
+
onFilesChange == null ? void 0 : onFilesChange(next.filter((f) => !f.error).map((f) => f.file));
|
|
5917
|
+
};
|
|
5918
|
+
const removeFile = (id) => {
|
|
5919
|
+
const next = files.filter((f) => f.id !== id);
|
|
5920
|
+
setFiles(next);
|
|
5921
|
+
onFilesChange == null ? void 0 : onFilesChange(next.filter((f) => !f.error).map((f) => f.file));
|
|
5922
|
+
};
|
|
5923
|
+
const onDragOver = (e) => {
|
|
5924
|
+
e.preventDefault();
|
|
5925
|
+
if (!disabled) setIsDragging(true);
|
|
5926
|
+
};
|
|
5927
|
+
const onDragLeave = (e) => {
|
|
5928
|
+
e.preventDefault();
|
|
5929
|
+
setIsDragging(false);
|
|
5930
|
+
};
|
|
5931
|
+
const onDrop = (e) => {
|
|
5932
|
+
e.preventDefault();
|
|
5933
|
+
setIsDragging(false);
|
|
5934
|
+
if (disabled) return;
|
|
5935
|
+
if (e.dataTransfer.files.length > 0) addFiles(e.dataTransfer.files);
|
|
5936
|
+
};
|
|
5937
|
+
const onInputChange = (e) => {
|
|
5938
|
+
if (e.target.files && e.target.files.length > 0) {
|
|
5939
|
+
addFiles(e.target.files);
|
|
5940
|
+
e.target.value = "";
|
|
5941
|
+
}
|
|
5942
|
+
};
|
|
5943
|
+
const openPicker = () => {
|
|
5944
|
+
var _a;
|
|
5945
|
+
if (!disabled) (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
5946
|
+
};
|
|
5947
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("file-upload", className), children: [
|
|
5948
|
+
/* @__PURE__ */ jsxs(
|
|
5949
|
+
"div",
|
|
5950
|
+
{
|
|
5951
|
+
role: "button",
|
|
5952
|
+
tabIndex: disabled ? -1 : 0,
|
|
5953
|
+
"aria-label": "Upload files",
|
|
5954
|
+
onClick: openPicker,
|
|
5955
|
+
onKeyDown: (e) => e.key === "Enter" && openPicker(),
|
|
5956
|
+
onDragOver,
|
|
5957
|
+
onDragLeave,
|
|
5958
|
+
onDrop,
|
|
5959
|
+
className: cn(
|
|
5960
|
+
"file-upload-zone",
|
|
5961
|
+
variant === "compact" && "file-upload-zone--compact",
|
|
5962
|
+
isDragging && "file-upload-zone--dragging",
|
|
5963
|
+
disabled && "file-upload-zone--disabled"
|
|
5964
|
+
),
|
|
5965
|
+
children: [
|
|
5966
|
+
/* @__PURE__ */ jsx(
|
|
5967
|
+
"input",
|
|
5968
|
+
{
|
|
5969
|
+
ref: inputRef,
|
|
5970
|
+
type: "file",
|
|
5971
|
+
accept,
|
|
5972
|
+
multiple,
|
|
5973
|
+
disabled,
|
|
5974
|
+
onChange: onInputChange,
|
|
5975
|
+
className: "file-upload-input",
|
|
5976
|
+
tabIndex: -1
|
|
5977
|
+
}
|
|
5978
|
+
),
|
|
5979
|
+
variant === "compact" ? /* @__PURE__ */ jsxs("div", { className: "file-upload-compact-inner", children: [
|
|
5980
|
+
/* @__PURE__ */ jsx("span", { className: "file-upload-icon", children: "↑" }),
|
|
5981
|
+
/* @__PURE__ */ jsxs("span", { className: "file-upload-zone-text", children: [
|
|
5982
|
+
/* @__PURE__ */ jsx("span", { className: "file-upload-zone-link", children: "Click to upload" }),
|
|
5983
|
+
" ",
|
|
5984
|
+
"or drag and drop"
|
|
5985
|
+
] }),
|
|
5986
|
+
accept && /* @__PURE__ */ jsx("span", { className: "file-upload-hint", children: accept.split(",").join(", ") }),
|
|
5987
|
+
maxSize && /* @__PURE__ */ jsxs("span", { className: "file-upload-hint", children: [
|
|
5988
|
+
"Max ",
|
|
5989
|
+
formatBytes(maxSize)
|
|
5990
|
+
] })
|
|
5991
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "file-upload-default-inner", children: [
|
|
5992
|
+
/* @__PURE__ */ jsx("div", { className: "file-upload-icon-circle", children: /* @__PURE__ */ jsx("span", { className: "file-upload-icon", children: "↑" }) }),
|
|
5993
|
+
/* @__PURE__ */ jsxs("div", { className: "file-upload-zone-body", children: [
|
|
5994
|
+
/* @__PURE__ */ jsxs("span", { className: "file-upload-zone-text", children: [
|
|
5995
|
+
/* @__PURE__ */ jsx("span", { className: "file-upload-zone-link", children: "Click to upload" }),
|
|
5996
|
+
" ",
|
|
5997
|
+
"or drag and drop"
|
|
5998
|
+
] }),
|
|
5999
|
+
(accept || maxSize) && /* @__PURE__ */ jsx("span", { className: "file-upload-hint", children: [
|
|
6000
|
+
accept && accept.split(",").join(", "),
|
|
6001
|
+
maxSize && `Max ${formatBytes(maxSize)}`
|
|
6002
|
+
].filter(Boolean).join(" · ") })
|
|
6003
|
+
] })
|
|
6004
|
+
] })
|
|
6005
|
+
]
|
|
6006
|
+
}
|
|
6007
|
+
),
|
|
6008
|
+
files.length > 0 && /* @__PURE__ */ jsx("ul", { className: "file-upload-list", children: files.map(({ file, id, error }) => /* @__PURE__ */ jsxs(
|
|
6009
|
+
"li",
|
|
6010
|
+
{
|
|
6011
|
+
className: cn("file-upload-item", error && "file-upload-item--error"),
|
|
6012
|
+
children: [
|
|
6013
|
+
/* @__PURE__ */ jsx("span", { className: "file-upload-item-icon", children: getFileIcon(file.type) }),
|
|
6014
|
+
/* @__PURE__ */ jsxs("div", { className: "file-upload-item-info", children: [
|
|
6015
|
+
/* @__PURE__ */ jsx("span", { className: "file-upload-item-name", children: file.name }),
|
|
6016
|
+
error ? /* @__PURE__ */ jsx("span", { className: "file-upload-item-error", children: error }) : /* @__PURE__ */ jsx("span", { className: "file-upload-item-size", children: formatBytes(file.size) })
|
|
6017
|
+
] }),
|
|
6018
|
+
/* @__PURE__ */ jsx(
|
|
6019
|
+
"button",
|
|
6020
|
+
{
|
|
6021
|
+
type: "button",
|
|
6022
|
+
"aria-label": `Remove ${file.name}`,
|
|
6023
|
+
onClick: (e) => {
|
|
6024
|
+
e.stopPropagation();
|
|
6025
|
+
removeFile(id);
|
|
6026
|
+
},
|
|
6027
|
+
className: "file-upload-item-remove",
|
|
6028
|
+
children: "✕"
|
|
6029
|
+
}
|
|
6030
|
+
)
|
|
6031
|
+
]
|
|
6032
|
+
},
|
|
6033
|
+
id
|
|
6034
|
+
)) })
|
|
6035
|
+
] });
|
|
6036
|
+
}
|
|
6037
|
+
);
|
|
6038
|
+
FileUpload.displayName = "FileUpload";
|
|
6039
|
+
function getStatus(index, currentStep) {
|
|
6040
|
+
if (index < currentStep) return "complete";
|
|
6041
|
+
if (index === currentStep) return "current";
|
|
6042
|
+
return "upcoming";
|
|
6043
|
+
}
|
|
6044
|
+
const CheckIcon = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
6045
|
+
"path",
|
|
6046
|
+
{
|
|
6047
|
+
d: "M2.5 7L5.5 10L11.5 4",
|
|
6048
|
+
stroke: "currentColor",
|
|
6049
|
+
strokeWidth: "2",
|
|
6050
|
+
strokeLinecap: "round",
|
|
6051
|
+
strokeLinejoin: "round"
|
|
6052
|
+
}
|
|
6053
|
+
) });
|
|
6054
|
+
const Stepper = React.forwardRef(
|
|
6055
|
+
({
|
|
6056
|
+
steps,
|
|
6057
|
+
currentStep,
|
|
6058
|
+
orientation = "horizontal",
|
|
6059
|
+
variant = "default",
|
|
6060
|
+
size = "md",
|
|
6061
|
+
onStepClick,
|
|
6062
|
+
className
|
|
6063
|
+
}, ref) => {
|
|
6064
|
+
return /* @__PURE__ */ jsx(
|
|
6065
|
+
"div",
|
|
6066
|
+
{
|
|
6067
|
+
ref,
|
|
6068
|
+
role: "list",
|
|
6069
|
+
"aria-label": "Progress steps",
|
|
6070
|
+
className: cn(
|
|
6071
|
+
"stepper",
|
|
6072
|
+
`stepper--${orientation}`,
|
|
6073
|
+
`stepper--${size}`,
|
|
6074
|
+
className
|
|
6075
|
+
),
|
|
6076
|
+
children: steps.map((step, index) => {
|
|
6077
|
+
const status = getStatus(index, currentStep);
|
|
6078
|
+
const isClickable = !!onStepClick && status === "complete";
|
|
6079
|
+
const isLast = index === steps.length - 1;
|
|
6080
|
+
return /* @__PURE__ */ jsxs(
|
|
6081
|
+
"div",
|
|
6082
|
+
{
|
|
6083
|
+
role: "listitem",
|
|
6084
|
+
"aria-current": status === "current" ? "step" : void 0,
|
|
6085
|
+
className: cn(
|
|
6086
|
+
"stepper-item",
|
|
6087
|
+
`stepper-item--${status}`,
|
|
6088
|
+
orientation === "horizontal" && !isLast && "stepper-item--with-connector"
|
|
6089
|
+
),
|
|
6090
|
+
children: [
|
|
6091
|
+
/* @__PURE__ */ jsxs("div", { className: "stepper-indicator-row", children: [
|
|
6092
|
+
/* @__PURE__ */ jsx(
|
|
6093
|
+
"button",
|
|
6094
|
+
{
|
|
6095
|
+
type: "button",
|
|
6096
|
+
disabled: !isClickable,
|
|
6097
|
+
onClick: () => isClickable && onStepClick(index),
|
|
6098
|
+
className: cn(
|
|
6099
|
+
"stepper-indicator",
|
|
6100
|
+
`stepper-indicator--${status}`,
|
|
6101
|
+
`stepper-indicator--${variant}`,
|
|
6102
|
+
isClickable && "stepper-indicator--clickable"
|
|
6103
|
+
),
|
|
6104
|
+
"aria-label": `Step ${index + 1}: ${step.title} (${status})`,
|
|
6105
|
+
children: status === "complete" ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx("span", { className: "stepper-indicator-number", children: index + 1 })
|
|
6106
|
+
}
|
|
6107
|
+
),
|
|
6108
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
6109
|
+
"div",
|
|
6110
|
+
{
|
|
6111
|
+
className: cn(
|
|
6112
|
+
"stepper-connector",
|
|
6113
|
+
`stepper-connector--${orientation}`,
|
|
6114
|
+
index < currentStep && "stepper-connector--complete"
|
|
6115
|
+
),
|
|
6116
|
+
"aria-hidden": "true"
|
|
6117
|
+
}
|
|
6118
|
+
)
|
|
6119
|
+
] }),
|
|
6120
|
+
/* @__PURE__ */ jsxs("div", { className: "stepper-label", children: [
|
|
6121
|
+
/* @__PURE__ */ jsx("span", { className: cn("stepper-title", `stepper-title--${status}`), children: step.title }),
|
|
6122
|
+
step.description && /* @__PURE__ */ jsx("span", { className: cn("stepper-description", `stepper-description--${status}`), children: step.description })
|
|
6123
|
+
] })
|
|
6124
|
+
]
|
|
6125
|
+
},
|
|
6126
|
+
index
|
|
6127
|
+
);
|
|
6128
|
+
})
|
|
6129
|
+
}
|
|
6130
|
+
);
|
|
6131
|
+
}
|
|
6132
|
+
);
|
|
6133
|
+
Stepper.displayName = "Stepper";
|
|
6134
|
+
const DatePicker = React.forwardRef(
|
|
6135
|
+
({
|
|
6136
|
+
value,
|
|
6137
|
+
onChange,
|
|
6138
|
+
placeholder = "Select date",
|
|
6139
|
+
disabled = false,
|
|
6140
|
+
disabledDates,
|
|
6141
|
+
fromDate,
|
|
6142
|
+
toDate,
|
|
6143
|
+
dateFormat = "MMM d, yyyy",
|
|
6144
|
+
className,
|
|
6145
|
+
align = "start"
|
|
6146
|
+
}, ref) => {
|
|
6147
|
+
const [open, setOpen] = React.useState(false);
|
|
6148
|
+
const handleSelect = (date) => {
|
|
6149
|
+
onChange == null ? void 0 : onChange(date);
|
|
6150
|
+
setOpen(false);
|
|
6151
|
+
};
|
|
6152
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
6153
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
6154
|
+
"button",
|
|
6155
|
+
{
|
|
6156
|
+
ref,
|
|
6157
|
+
type: "button",
|
|
6158
|
+
disabled,
|
|
6159
|
+
"aria-haspopup": "dialog",
|
|
6160
|
+
"aria-expanded": open,
|
|
6161
|
+
className: cn(
|
|
6162
|
+
"date-picker-trigger",
|
|
6163
|
+
!value && "date-picker-trigger--placeholder",
|
|
6164
|
+
disabled && "date-picker-trigger--disabled",
|
|
6165
|
+
className
|
|
6166
|
+
),
|
|
6167
|
+
children: [
|
|
6168
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
6169
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "3", width: "14", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6170
|
+
/* @__PURE__ */ jsx("path", { d: "M1 7h14", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6171
|
+
/* @__PURE__ */ jsx("path", { d: "M5 1v4M11 1v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
6172
|
+
] }) }),
|
|
6173
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-value", children: value ? format(value, dateFormat) : placeholder }),
|
|
6174
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2 4l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
6175
|
+
]
|
|
6176
|
+
}
|
|
6177
|
+
) }),
|
|
6178
|
+
/* @__PURE__ */ jsx(
|
|
6179
|
+
PopoverContent,
|
|
6180
|
+
{
|
|
6181
|
+
className: "date-picker-popover",
|
|
6182
|
+
align,
|
|
6183
|
+
sideOffset: 6,
|
|
6184
|
+
children: /* @__PURE__ */ jsx(
|
|
6185
|
+
Calendar,
|
|
6186
|
+
{
|
|
6187
|
+
mode: "single",
|
|
6188
|
+
selected: value,
|
|
6189
|
+
onSelect: handleSelect,
|
|
6190
|
+
disabled: disabledDates,
|
|
6191
|
+
fromDate,
|
|
6192
|
+
toDate,
|
|
6193
|
+
initialFocus: true
|
|
6194
|
+
}
|
|
6195
|
+
)
|
|
6196
|
+
}
|
|
6197
|
+
)
|
|
6198
|
+
] });
|
|
6199
|
+
}
|
|
6200
|
+
);
|
|
6201
|
+
DatePicker.displayName = "DatePicker";
|
|
6202
|
+
const DateRangePicker = React.forwardRef(
|
|
6203
|
+
({
|
|
6204
|
+
value,
|
|
6205
|
+
onChange,
|
|
6206
|
+
placeholder = "Select date range",
|
|
6207
|
+
disabled = false,
|
|
6208
|
+
dateFormat = "MMM d, yyyy",
|
|
6209
|
+
className,
|
|
6210
|
+
align = "start"
|
|
6211
|
+
}, ref) => {
|
|
6212
|
+
const [open, setOpen] = React.useState(false);
|
|
6213
|
+
const label = React.useMemo(() => {
|
|
6214
|
+
if (!(value == null ? void 0 : value.from)) return null;
|
|
6215
|
+
if (!value.to) return format(value.from, dateFormat);
|
|
6216
|
+
return `${format(value.from, dateFormat)} — ${format(value.to, dateFormat)}`;
|
|
6217
|
+
}, [value, dateFormat]);
|
|
6218
|
+
return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
6219
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
6220
|
+
"button",
|
|
6221
|
+
{
|
|
6222
|
+
ref,
|
|
6223
|
+
type: "button",
|
|
6224
|
+
disabled,
|
|
6225
|
+
"aria-haspopup": "dialog",
|
|
6226
|
+
"aria-expanded": open,
|
|
6227
|
+
className: cn(
|
|
6228
|
+
"date-picker-trigger",
|
|
6229
|
+
!label && "date-picker-trigger--placeholder",
|
|
6230
|
+
disabled && "date-picker-trigger--disabled",
|
|
6231
|
+
className
|
|
6232
|
+
),
|
|
6233
|
+
children: [
|
|
6234
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
6235
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "3", width: "14", height: "12", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6236
|
+
/* @__PURE__ */ jsx("path", { d: "M1 7h14", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6237
|
+
/* @__PURE__ */ jsx("path", { d: "M5 1v4M11 1v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
6238
|
+
] }) }),
|
|
6239
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-value", children: label ?? placeholder }),
|
|
6240
|
+
/* @__PURE__ */ jsx("span", { className: "date-picker-chevron", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2 4l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
6241
|
+
]
|
|
6242
|
+
}
|
|
6243
|
+
) }),
|
|
6244
|
+
/* @__PURE__ */ jsx(
|
|
6245
|
+
PopoverContent,
|
|
6246
|
+
{
|
|
6247
|
+
className: "date-picker-popover",
|
|
6248
|
+
align,
|
|
6249
|
+
sideOffset: 6,
|
|
6250
|
+
children: /* @__PURE__ */ jsx(
|
|
6251
|
+
Calendar,
|
|
6252
|
+
{
|
|
6253
|
+
mode: "range",
|
|
6254
|
+
selected: value,
|
|
6255
|
+
onSelect: onChange,
|
|
6256
|
+
numberOfMonths: 2,
|
|
6257
|
+
initialFocus: true
|
|
6258
|
+
}
|
|
6259
|
+
)
|
|
6260
|
+
}
|
|
6261
|
+
)
|
|
6262
|
+
] });
|
|
6263
|
+
}
|
|
6264
|
+
);
|
|
6265
|
+
DateRangePicker.displayName = "DateRangePicker";
|
|
4918
6266
|
const Toaster = ({ ...props }) => {
|
|
4919
6267
|
const { theme = "system" } = useTheme();
|
|
4920
6268
|
return /* @__PURE__ */ jsx(
|
|
@@ -7095,9 +8443,9 @@ const VARIANT_COLORS = {
|
|
|
7095
8443
|
};
|
|
7096
8444
|
const UtilityTriangleInfo = ({
|
|
7097
8445
|
className,
|
|
7098
|
-
variant
|
|
8446
|
+
variant = "low"
|
|
7099
8447
|
}) => {
|
|
7100
|
-
const { fill, stroke } = VARIANT_COLORS[
|
|
8448
|
+
const { fill, stroke } = VARIANT_COLORS[variant];
|
|
7101
8449
|
return /* @__PURE__ */ jsx(
|
|
7102
8450
|
"svg",
|
|
7103
8451
|
{
|
|
@@ -13511,6 +14859,17 @@ export {
|
|
|
13511
14859
|
AlertDialogTrigger,
|
|
13512
14860
|
AlertTitle,
|
|
13513
14861
|
AlphaIcon,
|
|
14862
|
+
AppBar,
|
|
14863
|
+
AppBarAppend,
|
|
14864
|
+
AppBarContent,
|
|
14865
|
+
AppBarNavIcon,
|
|
14866
|
+
AppBarPrepend,
|
|
14867
|
+
AppBarTitle,
|
|
14868
|
+
AppShell,
|
|
14869
|
+
AppShellFooter,
|
|
14870
|
+
AppShellHeader,
|
|
14871
|
+
AppShellMain,
|
|
14872
|
+
AppShellSidebar,
|
|
13514
14873
|
AspectRatio,
|
|
13515
14874
|
Avatar,
|
|
13516
14875
|
AvatarFallback,
|
|
@@ -13535,6 +14894,15 @@ export {
|
|
|
13535
14894
|
BadgeRatingResidential,
|
|
13536
14895
|
BadgeRatingWorkforce,
|
|
13537
14896
|
BadgeSurveyProvider,
|
|
14897
|
+
Banner,
|
|
14898
|
+
BannerAction,
|
|
14899
|
+
BannerDescription,
|
|
14900
|
+
BannerIcon,
|
|
14901
|
+
BannerText,
|
|
14902
|
+
BannerTitle,
|
|
14903
|
+
BottomNavigation,
|
|
14904
|
+
BottomNavigationGroup,
|
|
14905
|
+
BottomNavigationItem,
|
|
13538
14906
|
Breadcrumb,
|
|
13539
14907
|
BreadcrumbItem,
|
|
13540
14908
|
BreadcrumbLink,
|
|
@@ -13545,10 +14913,14 @@ export {
|
|
|
13545
14913
|
CONCEPT_ICONS,
|
|
13546
14914
|
Calendar,
|
|
13547
14915
|
Card,
|
|
14916
|
+
CardActions,
|
|
14917
|
+
CardBadge,
|
|
13548
14918
|
CardContent,
|
|
13549
14919
|
CardDescription,
|
|
13550
14920
|
CardFooter,
|
|
13551
14921
|
CardHeader,
|
|
14922
|
+
CardMedia,
|
|
14923
|
+
CardMetric,
|
|
13552
14924
|
CardTitle,
|
|
13553
14925
|
CardWithIcon,
|
|
13554
14926
|
Carousel,
|
|
@@ -13565,6 +14937,7 @@ export {
|
|
|
13565
14937
|
Collapsible,
|
|
13566
14938
|
CollapsibleContent,
|
|
13567
14939
|
CollapsibleTrigger,
|
|
14940
|
+
Columns,
|
|
13568
14941
|
Command,
|
|
13569
14942
|
CommandDialog,
|
|
13570
14943
|
CommandEmpty,
|
|
@@ -13574,6 +14947,7 @@ export {
|
|
|
13574
14947
|
CommandList,
|
|
13575
14948
|
CommandSeparator,
|
|
13576
14949
|
CommandShortcut,
|
|
14950
|
+
Container,
|
|
13577
14951
|
ContextMenu,
|
|
13578
14952
|
ContextMenuCheckboxItem,
|
|
13579
14953
|
ContextMenuContent,
|
|
@@ -13589,6 +14963,8 @@ export {
|
|
|
13589
14963
|
ContextMenuSubContent,
|
|
13590
14964
|
ContextMenuSubTrigger,
|
|
13591
14965
|
ContextMenuTrigger,
|
|
14966
|
+
DatePicker,
|
|
14967
|
+
DateRangePicker,
|
|
13592
14968
|
Dialog,
|
|
13593
14969
|
DialogClose,
|
|
13594
14970
|
DialogContent,
|
|
@@ -13622,6 +14998,17 @@ export {
|
|
|
13622
14998
|
DropdownMenuSubContent,
|
|
13623
14999
|
DropdownMenuSubTrigger,
|
|
13624
15000
|
DropdownMenuTrigger,
|
|
15001
|
+
EmptyState,
|
|
15002
|
+
EmptyStateAction,
|
|
15003
|
+
FileUpload,
|
|
15004
|
+
Footer,
|
|
15005
|
+
FooterBand,
|
|
15006
|
+
FooterCopyright,
|
|
15007
|
+
FooterDivider,
|
|
15008
|
+
FooterIconButton,
|
|
15009
|
+
FooterLink,
|
|
15010
|
+
FooterLinks,
|
|
15011
|
+
FooterRow,
|
|
13625
15012
|
Form,
|
|
13626
15013
|
FormControl,
|
|
13627
15014
|
FormDescription,
|
|
@@ -13629,7 +15016,10 @@ export {
|
|
|
13629
15016
|
FormItem,
|
|
13630
15017
|
FormLabel,
|
|
13631
15018
|
FormMessage,
|
|
15019
|
+
Grid,
|
|
13632
15020
|
HeightContainer,
|
|
15021
|
+
HeroSection,
|
|
15022
|
+
Hide,
|
|
13633
15023
|
HoverCard,
|
|
13634
15024
|
HoverCardContent,
|
|
13635
15025
|
HoverCardTrigger,
|
|
@@ -13651,6 +15041,8 @@ export {
|
|
|
13651
15041
|
InputOTPSeparator,
|
|
13652
15042
|
InputOTPSlot,
|
|
13653
15043
|
Label,
|
|
15044
|
+
List,
|
|
15045
|
+
ListItem,
|
|
13654
15046
|
Menubar,
|
|
13655
15047
|
MenubarCheckboxItem,
|
|
13656
15048
|
MenubarContent,
|
|
@@ -13704,6 +15096,7 @@ export {
|
|
|
13704
15096
|
Popover,
|
|
13705
15097
|
PopoverContent,
|
|
13706
15098
|
PopoverTrigger,
|
|
15099
|
+
Positioned,
|
|
13707
15100
|
Progress,
|
|
13708
15101
|
RadioGroup,
|
|
13709
15102
|
RadioGroupItem,
|
|
@@ -13738,6 +15131,7 @@ export {
|
|
|
13738
15131
|
SealWellResidence,
|
|
13739
15132
|
SealWorksWithWell,
|
|
13740
15133
|
SearchField,
|
|
15134
|
+
Section,
|
|
13741
15135
|
SectionBadge,
|
|
13742
15136
|
Select,
|
|
13743
15137
|
SelectContent,
|
|
@@ -13758,6 +15152,7 @@ export {
|
|
|
13758
15152
|
SheetHeader,
|
|
13759
15153
|
SheetTitle,
|
|
13760
15154
|
SheetTrigger,
|
|
15155
|
+
Show,
|
|
13761
15156
|
Sidebar,
|
|
13762
15157
|
SidebarContent,
|
|
13763
15158
|
SidebarFooter,
|
|
@@ -13774,9 +15169,16 @@ export {
|
|
|
13774
15169
|
Skeleton,
|
|
13775
15170
|
Slider,
|
|
13776
15171
|
Toaster as Sonner,
|
|
15172
|
+
Spacer,
|
|
15173
|
+
Stack,
|
|
13777
15174
|
StandardLogo,
|
|
13778
15175
|
StandardNavigation,
|
|
15176
|
+
Stepper,
|
|
13779
15177
|
Switch,
|
|
15178
|
+
SystemBar,
|
|
15179
|
+
SystemBarAction,
|
|
15180
|
+
SystemBarIcon,
|
|
15181
|
+
SystemBarSpacer,
|
|
13780
15182
|
Table,
|
|
13781
15183
|
TableBody,
|
|
13782
15184
|
TableCaption,
|
|
@@ -13792,6 +15194,8 @@ export {
|
|
|
13792
15194
|
Tag,
|
|
13793
15195
|
Text,
|
|
13794
15196
|
Textarea,
|
|
15197
|
+
Timeline,
|
|
15198
|
+
TimelineItem,
|
|
13795
15199
|
Toast,
|
|
13796
15200
|
ToastAction,
|
|
13797
15201
|
ToastClose,
|
|
@@ -13839,6 +15243,7 @@ export {
|
|
|
13839
15243
|
WatermarkMemberOrg,
|
|
13840
15244
|
X,
|
|
13841
15245
|
badgeVariants,
|
|
15246
|
+
bannerVariants,
|
|
13842
15247
|
buttonVariants,
|
|
13843
15248
|
capitalize,
|
|
13844
15249
|
cn,
|