@umami/react-zen 0.3.0 → 0.4.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.d.ts +675 -624
- package/dist/index.js +623 -445
- package/dist/index.mjs +582 -404
- package/package.json +7 -4
- /package/dist/{styles.css → index.css} +0 -0
package/dist/index.js
CHANGED
|
@@ -41,8 +41,8 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
41
41
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
42
42
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
43
43
|
}
|
|
44
|
-
var
|
|
45
|
-
var ReactSharedInternals =
|
|
44
|
+
var React18 = require("react");
|
|
45
|
+
var ReactSharedInternals = React18.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
46
46
|
function error(format) {
|
|
47
47
|
{
|
|
48
48
|
{
|
|
@@ -72,13 +72,13 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
72
72
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
73
73
|
}
|
|
74
74
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
75
|
-
var useState14 =
|
|
75
|
+
var useState14 = React18.useState, useEffect9 = React18.useEffect, useLayoutEffect3 = React18.useLayoutEffect, useDebugValue2 = React18.useDebugValue;
|
|
76
76
|
var didWarnOld18Alpha = false;
|
|
77
77
|
var didWarnUncachedGetSnapshot = false;
|
|
78
78
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
79
79
|
{
|
|
80
80
|
if (!didWarnOld18Alpha) {
|
|
81
|
-
if (
|
|
81
|
+
if (React18.startTransition !== void 0) {
|
|
82
82
|
didWarnOld18Alpha = true;
|
|
83
83
|
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
84
84
|
}
|
|
@@ -143,7 +143,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
143
143
|
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
144
144
|
var isServerEnvironment = !canUseDOM;
|
|
145
145
|
var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
146
|
-
var useSyncExternalStore$2 =
|
|
146
|
+
var useSyncExternalStore$2 = React18.useSyncExternalStore !== void 0 ? React18.useSyncExternalStore : shim;
|
|
147
147
|
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
148
148
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
149
149
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
@@ -175,8 +175,8 @@ var require_use_sync_external_store_shim_development2 = __commonJS({
|
|
|
175
175
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
176
176
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
177
177
|
}
|
|
178
|
-
var
|
|
179
|
-
var ReactSharedInternals =
|
|
178
|
+
var React18 = require("react");
|
|
179
|
+
var ReactSharedInternals = React18.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
180
180
|
function error(format) {
|
|
181
181
|
{
|
|
182
182
|
{
|
|
@@ -206,13 +206,13 @@ var require_use_sync_external_store_shim_development2 = __commonJS({
|
|
|
206
206
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
207
207
|
}
|
|
208
208
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
209
|
-
var useState14 =
|
|
209
|
+
var useState14 = React18.useState, useEffect9 = React18.useEffect, useLayoutEffect3 = React18.useLayoutEffect, useDebugValue2 = React18.useDebugValue;
|
|
210
210
|
var didWarnOld18Alpha = false;
|
|
211
211
|
var didWarnUncachedGetSnapshot = false;
|
|
212
212
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
213
213
|
{
|
|
214
214
|
if (!didWarnOld18Alpha) {
|
|
215
|
-
if (
|
|
215
|
+
if (React18.startTransition !== void 0) {
|
|
216
216
|
didWarnOld18Alpha = true;
|
|
217
217
|
error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.");
|
|
218
218
|
}
|
|
@@ -277,7 +277,7 @@ var require_use_sync_external_store_shim_development2 = __commonJS({
|
|
|
277
277
|
var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
|
|
278
278
|
var isServerEnvironment = !canUseDOM;
|
|
279
279
|
var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;
|
|
280
|
-
var useSyncExternalStore$2 =
|
|
280
|
+
var useSyncExternalStore$2 = React18.useSyncExternalStore !== void 0 ? React18.useSyncExternalStore : shim;
|
|
281
281
|
exports.useSyncExternalStore = useSyncExternalStore$2;
|
|
282
282
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
|
|
283
283
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
@@ -309,14 +309,14 @@ var require_with_selector_development = __commonJS({
|
|
|
309
309
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
|
|
310
310
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
311
311
|
}
|
|
312
|
-
var
|
|
312
|
+
var React18 = require("react");
|
|
313
313
|
var shim = require_shim2();
|
|
314
314
|
function is(x, y) {
|
|
315
315
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
316
316
|
}
|
|
317
317
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
318
318
|
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
319
|
-
var useRef7 =
|
|
319
|
+
var useRef7 = React18.useRef, useEffect9 = React18.useEffect, useMemo4 = React18.useMemo, useDebugValue2 = React18.useDebugValue;
|
|
320
320
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
321
321
|
var instRef = useRef7(null);
|
|
322
322
|
var inst;
|
|
@@ -470,17 +470,17 @@ __export(components_exports, {
|
|
|
470
470
|
AccordionItem: () => AccordionItem,
|
|
471
471
|
AlertBanner: () => AlertBanner,
|
|
472
472
|
AlertDialog: () => AlertDialog,
|
|
473
|
-
Breadcrumb: () =>
|
|
474
|
-
Breadcrumbs: () =>
|
|
475
|
-
Button: () =>
|
|
476
|
-
Calendar: () =>
|
|
477
|
-
Checkbox: () =>
|
|
473
|
+
Breadcrumb: () => Breadcrumb2,
|
|
474
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
475
|
+
Button: () => Button,
|
|
476
|
+
Calendar: () => Calendar,
|
|
477
|
+
Checkbox: () => Checkbox,
|
|
478
478
|
Column: () => Column,
|
|
479
479
|
Combobox: () => Combobox,
|
|
480
480
|
ConfirmationDialog: () => ConfirmationDialog,
|
|
481
481
|
DataColumn: () => DataColumn,
|
|
482
482
|
DataTable: () => DataTable,
|
|
483
|
-
Dialog: () =>
|
|
483
|
+
Dialog: () => Dialog,
|
|
484
484
|
DialogTrigger: () => $de32f1b87079253c$export$2e1e1122cf0cba88,
|
|
485
485
|
Dots: () => Dots,
|
|
486
486
|
FileTrigger: () => $1e2864c73f66a4da$export$6fb4a10d2c950550,
|
|
@@ -489,50 +489,50 @@ __export(components_exports, {
|
|
|
489
489
|
Icon: () => Icon,
|
|
490
490
|
Icons: () => Icons,
|
|
491
491
|
InlineEditField: () => InlineEditField,
|
|
492
|
-
Label: () =>
|
|
492
|
+
Label: () => Label,
|
|
493
493
|
List: () => List,
|
|
494
494
|
ListItem: () => ListItem,
|
|
495
495
|
Loading: () => Loading,
|
|
496
496
|
LoadingButton: () => LoadingButton,
|
|
497
|
-
Menu: () =>
|
|
498
|
-
MenuItem: () =>
|
|
497
|
+
Menu: () => Menu,
|
|
498
|
+
MenuItem: () => MenuItem2,
|
|
499
499
|
MenuTrigger: () => $3674c52c6b3c5bce$export$27d2ad3c5815583e,
|
|
500
|
-
Modal: () =>
|
|
500
|
+
Modal: () => Modal,
|
|
501
501
|
Page: () => Page,
|
|
502
502
|
PasswordField: () => PasswordField,
|
|
503
|
-
Popover: () =>
|
|
504
|
-
ProgressBar: () =>
|
|
503
|
+
Popover: () => Popover,
|
|
504
|
+
ProgressBar: () => ProgressBar,
|
|
505
505
|
ProgressCircle: () => ProgressCircle,
|
|
506
|
-
Radio: () =>
|
|
507
|
-
RadioGroup: () =>
|
|
506
|
+
Radio: () => Radio,
|
|
507
|
+
RadioGroup: () => RadioGroup,
|
|
508
508
|
Row: () => Row,
|
|
509
|
-
SearchField: () =>
|
|
510
|
-
Select: () =>
|
|
511
|
-
Slider: () =>
|
|
509
|
+
SearchField: () => SearchField,
|
|
510
|
+
Select: () => Select,
|
|
511
|
+
Slider: () => Slider,
|
|
512
512
|
Spinner: () => Spinner,
|
|
513
513
|
StatusLight: () => StatusLight,
|
|
514
|
-
Switch: () =>
|
|
515
|
-
Tab: () =>
|
|
516
|
-
TabList: () =>
|
|
517
|
-
TabPanel: () =>
|
|
518
|
-
Table: () =>
|
|
519
|
-
TableBody: () =>
|
|
514
|
+
Switch: () => Switch,
|
|
515
|
+
Tab: () => Tab,
|
|
516
|
+
TabList: () => TabList,
|
|
517
|
+
TabPanel: () => TabPanel,
|
|
518
|
+
Table: () => Table,
|
|
519
|
+
TableBody: () => TableBody,
|
|
520
520
|
TableCell: () => TableCell,
|
|
521
521
|
TableColumn: () => TableColumn,
|
|
522
|
-
TableHeader: () =>
|
|
522
|
+
TableHeader: () => TableHeader,
|
|
523
523
|
TableRow: () => TableRow,
|
|
524
|
-
Tabs: () =>
|
|
524
|
+
Tabs: () => Tabs,
|
|
525
525
|
Text: () => Text,
|
|
526
526
|
TextArea: () => TextArea,
|
|
527
|
-
TextField: () =>
|
|
527
|
+
TextField: () => TextField,
|
|
528
528
|
TextOverflow: () => TextOverflow,
|
|
529
529
|
Toast: () => Toast2,
|
|
530
530
|
ToastProvider: () => ToastProvider,
|
|
531
531
|
Toaster: () => Toaster,
|
|
532
532
|
Toggle: () => Toggle,
|
|
533
|
-
ToggleGroup: () =>
|
|
534
|
-
ToggleGroupItem: () =>
|
|
535
|
-
Tooltip: () =>
|
|
533
|
+
ToggleGroup: () => ToggleGroup,
|
|
534
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
535
|
+
Tooltip: () => Tooltip,
|
|
536
536
|
TooltipTrigger: () => $4e3b923658d69c60$export$8c610744efcf8a1d,
|
|
537
537
|
ZenProvider: () => ZenProvider,
|
|
538
538
|
useDebounce: () => useDebounce,
|
|
@@ -23605,6 +23605,7 @@ var Icon_default = {
|
|
|
23605
23605
|
};
|
|
23606
23606
|
|
|
23607
23607
|
// src/components/Icon.tsx
|
|
23608
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
23608
23609
|
function Icon({
|
|
23609
23610
|
size = "sm",
|
|
23610
23611
|
variant,
|
|
@@ -23614,14 +23615,14 @@ function Icon({
|
|
|
23614
23615
|
children,
|
|
23615
23616
|
...props
|
|
23616
23617
|
}) {
|
|
23617
|
-
return /* @__PURE__ */
|
|
23618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
23618
23619
|
$5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
23619
23620
|
{
|
|
23620
23621
|
...props,
|
|
23621
23622
|
className: (0, import_classnames.default)(Icon_default.icon, className, size && Icon_default[size]),
|
|
23622
|
-
style: { ...style, transform: rotate ? `rotate(${rotate}deg)` : void 0 }
|
|
23623
|
-
|
|
23624
|
-
|
|
23623
|
+
style: { ...style, transform: rotate ? `rotate(${rotate}deg)` : void 0 },
|
|
23624
|
+
children
|
|
23625
|
+
}
|
|
23625
23626
|
);
|
|
23626
23627
|
}
|
|
23627
23628
|
|
|
@@ -23874,21 +23875,25 @@ var Accordion_default = {
|
|
|
23874
23875
|
};
|
|
23875
23876
|
|
|
23876
23877
|
// src/components/Accordion.tsx
|
|
23878
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
23877
23879
|
function Accordion({ className, children, ...props }) {
|
|
23878
|
-
return /* @__PURE__ */
|
|
23880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)($1bf158f521e1b1b4$export$be92b6f5f03c0fe9, { ...props, className: (0, import_classnames2.default)(Accordion_default.accordion, className), children });
|
|
23879
23881
|
}
|
|
23880
23882
|
function AccordionItem({ className, children, ...props }) {
|
|
23881
|
-
return /* @__PURE__ */
|
|
23883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)($1bf158f521e1b1b4$export$6d08773d2e66f8f2, { ...props, className: (0, import_classnames2.default)(Accordion_default.item, className), children });
|
|
23882
23884
|
}
|
|
23883
23885
|
function AccordionHeader({ children, className, ...props }) {
|
|
23884
|
-
return /* @__PURE__ */
|
|
23886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)($1bf158f521e1b1b4$export$8b251419efc915eb, { ...props, className: (0, import_classnames2.default)(Accordion_default.header, className), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)($1bf158f521e1b1b4$export$41fb9f06171c75f4, { className: Accordion_default.trigger, children: [
|
|
23887
|
+
children,
|
|
23888
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: Accordion_default.icon, size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icons.Chevron, {}) })
|
|
23889
|
+
] }) });
|
|
23885
23890
|
}
|
|
23886
23891
|
function AccordionContent({ children, className, ...props }) {
|
|
23887
|
-
return /* @__PURE__ */
|
|
23892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)($1bf158f521e1b1b4$export$7c6e2c02157bb7d2, { ...props, className: (0, import_classnames2.default)(Accordion_default.content, className), children });
|
|
23888
23893
|
}
|
|
23889
23894
|
|
|
23890
23895
|
// src/components/AlertBanner.tsx
|
|
23891
|
-
var import_react150 =
|
|
23896
|
+
var import_react150 = require("react");
|
|
23892
23897
|
var import_classnames3 = __toESM(require_classnames());
|
|
23893
23898
|
|
|
23894
23899
|
// src/components/AlertBanner.module.css
|
|
@@ -23902,6 +23907,7 @@ var AlertBanner_default = {
|
|
|
23902
23907
|
};
|
|
23903
23908
|
|
|
23904
23909
|
// src/components/AlertBanner.tsx
|
|
23910
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
23905
23911
|
function AlertBanner({
|
|
23906
23912
|
title,
|
|
23907
23913
|
description,
|
|
@@ -23913,7 +23919,15 @@ function AlertBanner({
|
|
|
23913
23919
|
className,
|
|
23914
23920
|
...props
|
|
23915
23921
|
}) {
|
|
23916
|
-
return /* @__PURE__ */
|
|
23922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ...props, className: (0, import_classnames3.default)(AlertBanner_default.banner, className, variant && AlertBanner_default[variant]), children: [
|
|
23923
|
+
(icon || variant) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { size: "md", children: variant ? (0, import_react150.createElement)(AlertIcons[variant]) : icon }),
|
|
23924
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: AlertBanner_default.message, children: [
|
|
23925
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: AlertBanner_default.title, children: title }),
|
|
23926
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: AlertBanner_default.description, children: description })
|
|
23927
|
+
] }),
|
|
23928
|
+
children,
|
|
23929
|
+
allowClose && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { className: AlertBanner_default.close, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icons.Close, {}) })
|
|
23930
|
+
] });
|
|
23917
23931
|
}
|
|
23918
23932
|
var AlertIcons = {
|
|
23919
23933
|
error: Icons.Alert,
|
|
@@ -23933,10 +23947,14 @@ var Dialog_default = {
|
|
|
23933
23947
|
};
|
|
23934
23948
|
|
|
23935
23949
|
// src/components/Dialog.tsx
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
|
|
23939
|
-
|
|
23950
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
23951
|
+
function Dialog({ title, children, className, ...props }) {
|
|
23952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)($de32f1b87079253c$export$3ddf2d174ce01153, { ...props, className: (0, import_classnames4.default)(Dialog_default.dialog, className), children: ({ close }) => {
|
|
23953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
23954
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: Dialog_default.title, children: title }),
|
|
23955
|
+
typeof children === "function" ? children({ close }) : children
|
|
23956
|
+
] });
|
|
23957
|
+
} });
|
|
23940
23958
|
}
|
|
23941
23959
|
|
|
23942
23960
|
// src/components/Flexbox.tsx
|
|
@@ -24036,6 +24054,7 @@ var Flexbox_default = {
|
|
|
24036
24054
|
};
|
|
24037
24055
|
|
|
24038
24056
|
// src/components/Flexbox.tsx
|
|
24057
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
24039
24058
|
function Flexbox({
|
|
24040
24059
|
inline,
|
|
24041
24060
|
direction,
|
|
@@ -24056,7 +24075,7 @@ function Flexbox({
|
|
|
24056
24075
|
children,
|
|
24057
24076
|
...attributes
|
|
24058
24077
|
}) {
|
|
24059
|
-
return /* @__PURE__ */
|
|
24078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
24060
24079
|
"div",
|
|
24061
24080
|
{
|
|
24062
24081
|
...attributes,
|
|
@@ -24073,9 +24092,9 @@ function Flexbox({
|
|
|
24073
24092
|
inline && Flexbox_default.inline,
|
|
24074
24093
|
spacing && Flexbox_default[`spacing${spacing}`]
|
|
24075
24094
|
),
|
|
24076
|
-
style: { order, gap, flexBasis: basis, flexGrow: grow, flexShrink: shrink, ...style }
|
|
24077
|
-
|
|
24078
|
-
|
|
24095
|
+
style: { order, gap, flexBasis: basis, flexGrow: grow, flexShrink: shrink, ...style },
|
|
24096
|
+
children
|
|
24097
|
+
}
|
|
24079
24098
|
);
|
|
24080
24099
|
}
|
|
24081
24100
|
function replace(s) {
|
|
@@ -24083,17 +24102,18 @@ function replace(s) {
|
|
|
24083
24102
|
}
|
|
24084
24103
|
|
|
24085
24104
|
// src/components/Column.tsx
|
|
24105
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
24086
24106
|
function Column({ reverse, children, ...props }) {
|
|
24087
|
-
return /* @__PURE__ */
|
|
24107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Flexbox, { ...props, direction: reverse ? "column-reverse" : "column", children });
|
|
24088
24108
|
}
|
|
24089
24109
|
|
|
24090
24110
|
// src/components/Row.tsx
|
|
24111
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
24091
24112
|
function Row({ reverse, children, ...props }) {
|
|
24092
|
-
return /* @__PURE__ */
|
|
24113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Flexbox, { ...props, direction: reverse ? "row-reverse" : "row", children });
|
|
24093
24114
|
}
|
|
24094
24115
|
|
|
24095
24116
|
// src/components/Button.tsx
|
|
24096
|
-
var import_react151 = __toESM(require("react"));
|
|
24097
24117
|
var import_classnames6 = __toESM(require_classnames());
|
|
24098
24118
|
|
|
24099
24119
|
// src/components/Button.module.css
|
|
@@ -24111,7 +24131,8 @@ var Button_default = {
|
|
|
24111
24131
|
};
|
|
24112
24132
|
|
|
24113
24133
|
// src/components/Button.tsx
|
|
24114
|
-
|
|
24134
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
24135
|
+
function Button({
|
|
24115
24136
|
variant = "secondary",
|
|
24116
24137
|
size = "md",
|
|
24117
24138
|
preventFocusOnPress = true,
|
|
@@ -24121,19 +24142,19 @@ function _Button({
|
|
|
24121
24142
|
...props
|
|
24122
24143
|
}) {
|
|
24123
24144
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
|
|
24124
|
-
return /* @__PURE__ */
|
|
24145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
24125
24146
|
Component,
|
|
24126
24147
|
{
|
|
24127
24148
|
...props,
|
|
24128
|
-
preventFocusOnPress,
|
|
24149
|
+
preventFocusOnPress: Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? preventFocusOnPress : void 0,
|
|
24129
24150
|
className: (0, import_classnames6.default)(
|
|
24130
24151
|
Button_default.button,
|
|
24131
24152
|
className,
|
|
24132
24153
|
variant && Button_default[variant],
|
|
24133
24154
|
size && Button_default[size]
|
|
24134
|
-
)
|
|
24135
|
-
|
|
24136
|
-
|
|
24155
|
+
),
|
|
24156
|
+
children
|
|
24157
|
+
}
|
|
24137
24158
|
);
|
|
24138
24159
|
}
|
|
24139
24160
|
|
|
@@ -24144,6 +24165,7 @@ var AlertDialog_default = {
|
|
|
24144
24165
|
};
|
|
24145
24166
|
|
|
24146
24167
|
// src/components/AlertDialog.tsx
|
|
24168
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
24147
24169
|
function AlertDialog({
|
|
24148
24170
|
title,
|
|
24149
24171
|
description,
|
|
@@ -24165,17 +24187,23 @@ function AlertDialog({
|
|
|
24165
24187
|
onCancel?.();
|
|
24166
24188
|
close();
|
|
24167
24189
|
};
|
|
24168
|
-
return /* @__PURE__ */
|
|
24169
|
-
return /* @__PURE__ */
|
|
24170
|
-
|
|
24171
|
-
{
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Dialog, { ...props, title, className: (0, import_classnames7.default)(AlertDialog_default.dialog, className), children: ({ close }) => {
|
|
24191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Column, { spacing: 6, children: [
|
|
24192
|
+
typeof children === "function" ? children({ close }) : children,
|
|
24193
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Row, { spacing: 3, justifyContent: "end", children: [
|
|
24194
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { onPress: () => handleClose(close), children: cancelLabel }),
|
|
24195
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
24196
|
+
Button,
|
|
24197
|
+
{
|
|
24198
|
+
variant: isDanger ? "danger" : "primary",
|
|
24199
|
+
isDisabled: isConfirmDisabled,
|
|
24200
|
+
onPress: () => handleConfirm(close),
|
|
24201
|
+
children: confirmLabel
|
|
24202
|
+
}
|
|
24203
|
+
)
|
|
24204
|
+
] })
|
|
24205
|
+
] });
|
|
24206
|
+
} });
|
|
24179
24207
|
}
|
|
24180
24208
|
|
|
24181
24209
|
// src/components/Breadcrumbs.tsx
|
|
@@ -24189,11 +24217,15 @@ var Breadcrumbs_default = {
|
|
|
24189
24217
|
};
|
|
24190
24218
|
|
|
24191
24219
|
// src/components/Breadcrumbs.tsx
|
|
24192
|
-
|
|
24193
|
-
|
|
24220
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
24221
|
+
function Breadcrumbs({ children, className, ...props }) {
|
|
24222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)($778035c5624f61e7$export$2dc68d50d56fbbd, { ...props, className: (0, import_classnames8.default)(Breadcrumbs_default.breadcrumbs, className), children });
|
|
24194
24223
|
}
|
|
24195
|
-
function
|
|
24196
|
-
return /* @__PURE__ */
|
|
24224
|
+
function Breadcrumb2({ children, className, ...props }) {
|
|
24225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)($778035c5624f61e7$export$dabcc1ec9dd9d1cc, { ...props, className: (0, import_classnames8.default)(Breadcrumbs_default.breadcrumb, className), children: [
|
|
24226
|
+
children,
|
|
24227
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: Breadcrumbs_default.icon, size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icons.Chevron, {}) })
|
|
24228
|
+
] });
|
|
24197
24229
|
}
|
|
24198
24230
|
|
|
24199
24231
|
// src/components/Calendar.tsx
|
|
@@ -24210,8 +24242,19 @@ var Calendar_default = {
|
|
|
24210
24242
|
};
|
|
24211
24243
|
|
|
24212
24244
|
// src/components/Calendar.tsx
|
|
24213
|
-
|
|
24214
|
-
|
|
24245
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
24246
|
+
function Calendar({ className, ...props }) {
|
|
24247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)($dfd62f934fc76fed$export$e1aef45b828286de, { ...props, className: (0, import_classnames9.default)(Calendar_default.calendar, className), children: [
|
|
24248
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: Calendar_default.header, children: [
|
|
24249
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { slot: "previous", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { rotate: 180, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icons.Chevron, {}) }) }),
|
|
24250
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)($5cb03073d3f54797$export$a8a3e93435678ff9, { className: Calendar_default.heading }),
|
|
24251
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Button, { slot: "next", className: Calendar_default.button, variant: "quiet", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icons.Chevron, {}) }) })
|
|
24252
|
+
] }),
|
|
24253
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)($dfd62f934fc76fed$export$5bd780d491cfc46c, { children: [
|
|
24254
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)($dfd62f934fc76fed$export$22e2d15eaa4d2377, { children: (day) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)($dfd62f934fc76fed$export$ad2135cac3a11b3d, { className: Calendar_default.headerCell, children: day }) }),
|
|
24255
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)($dfd62f934fc76fed$export$e11f8ba65d857bff, { className: Calendar_default.body, children: (date) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)($dfd62f934fc76fed$export$5d847498420df57b, { className: Calendar_default.cell, date }) })
|
|
24256
|
+
] })
|
|
24257
|
+
] });
|
|
24215
24258
|
}
|
|
24216
24259
|
|
|
24217
24260
|
// src/components/Checkbox.tsx
|
|
@@ -24225,10 +24268,14 @@ var Checkbox_default = {
|
|
|
24225
24268
|
};
|
|
24226
24269
|
|
|
24227
24270
|
// src/components/Checkbox.tsx
|
|
24228
|
-
|
|
24229
|
-
|
|
24230
|
-
|
|
24231
|
-
|
|
24271
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
24272
|
+
function Checkbox({ className, children, ...props }) {
|
|
24273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)($bc237834342dbd75$export$48513f6b9f8ce62d, { ...props, className: (0, import_classnames10.default)(Checkbox_default.checkbox, className), children: ({ isIndeterminate, isSelected }) => {
|
|
24274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
24275
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: Checkbox_default.box, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icon, { className: Checkbox_default.icon, size: "xs", children: isIndeterminate ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icons.Minus, {}) : isSelected ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Icons.Check, {}) : null }) }),
|
|
24276
|
+
children
|
|
24277
|
+
] });
|
|
24278
|
+
} });
|
|
24232
24279
|
}
|
|
24233
24280
|
|
|
24234
24281
|
// src/components/Combobox.tsx
|
|
@@ -24247,8 +24294,12 @@ var ListItem_default = {
|
|
|
24247
24294
|
};
|
|
24248
24295
|
|
|
24249
24296
|
// src/components/ListItem.tsx
|
|
24297
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
24250
24298
|
function ListItem({ children, className, ...props }) {
|
|
24251
|
-
return /* @__PURE__ */
|
|
24299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)($eed445e0843c11d0$export$a11e76429ed99b4, { ...props, className: (0, import_classnames11.default)(ListItem_default.item, className), children: [
|
|
24300
|
+
children,
|
|
24301
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icon, { size: "sm", className: ListItem_default.check, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Icons.Check, {}) }) })
|
|
24302
|
+
] });
|
|
24252
24303
|
}
|
|
24253
24304
|
var ListItem_default2 = ListItem;
|
|
24254
24305
|
|
|
@@ -24259,13 +24310,14 @@ var List_default = {
|
|
|
24259
24310
|
};
|
|
24260
24311
|
|
|
24261
24312
|
// src/components/List.tsx
|
|
24313
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
24262
24314
|
function List({ items, className, children, ...props }) {
|
|
24263
|
-
return /* @__PURE__ */
|
|
24315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)($eed445e0843c11d0$export$41f133550aa26f48, { ...props, items, className: (0, import_classnames12.default)(List_default.list, className), children: children || items?.map((item, index) => {
|
|
24264
24316
|
if (item === null) {
|
|
24265
|
-
return /* @__PURE__ */
|
|
24317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)($431f98aba6844401$export$1ff3c3f08ae963c0, { className: List_default.separator }, index);
|
|
24266
24318
|
}
|
|
24267
|
-
return /* @__PURE__ */
|
|
24268
|
-
}));
|
|
24319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ListItem_default2, { id: item, children: item }, index);
|
|
24320
|
+
}) });
|
|
24269
24321
|
}
|
|
24270
24322
|
|
|
24271
24323
|
// src/components/Popover.tsx
|
|
@@ -24278,8 +24330,9 @@ var Popover_default = {
|
|
|
24278
24330
|
};
|
|
24279
24331
|
|
|
24280
24332
|
// src/components/Popover.tsx
|
|
24281
|
-
|
|
24282
|
-
|
|
24333
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
24334
|
+
function Popover({ children, className, ...props }) {
|
|
24335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)($07b14b47974efb58$export$5b6b19405a83ff9d, { ...props, className: (0, import_classnames13.default)(Popover_default.popover, className), children });
|
|
24283
24336
|
}
|
|
24284
24337
|
|
|
24285
24338
|
// src/components/Combobox.module.css
|
|
@@ -24293,20 +24346,27 @@ var Combobox_default = {
|
|
|
24293
24346
|
};
|
|
24294
24347
|
|
|
24295
24348
|
// src/components/Combobox.tsx
|
|
24349
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
24296
24350
|
function Combobox({ items, className, ...props }) {
|
|
24297
|
-
return /* @__PURE__ */
|
|
24351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)($d01f2c01039c0eec$export$72b9695b8216309a, { ...props, className: (0, import_classnames14.default)(Combobox_default.combobox, className), children: [
|
|
24352
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: Combobox_default.field, children: [
|
|
24353
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)($3985021b0ad6602f$export$f5b8910cec6cf069, { className: Combobox_default.input }),
|
|
24354
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: Combobox_default.button, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, { rotate: 90, size: "xs", className: Combobox_default.icon, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icons.Chevron, {}) }) })
|
|
24355
|
+
] }),
|
|
24356
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(List, { items, className: Combobox_default.list, children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ListItem, { textValue: item, children: item }, item)) }) })
|
|
24357
|
+
] });
|
|
24298
24358
|
}
|
|
24299
24359
|
|
|
24300
24360
|
// src/components/ConfirmationDialog.tsx
|
|
24301
|
-
var
|
|
24361
|
+
var import_react153 = require("react");
|
|
24302
24362
|
var import_classnames18 = __toESM(require_classnames());
|
|
24303
24363
|
|
|
24304
24364
|
// src/components/TextField.tsx
|
|
24305
|
-
var
|
|
24365
|
+
var import_react152 = require("react");
|
|
24306
24366
|
var import_classnames16 = __toESM(require_classnames());
|
|
24307
24367
|
|
|
24308
24368
|
// src/components/CopyButton.tsx
|
|
24309
|
-
var
|
|
24369
|
+
var import_react151 = require("react");
|
|
24310
24370
|
var import_classnames15 = __toESM(require_classnames());
|
|
24311
24371
|
|
|
24312
24372
|
// src/components/CopyButton.module.css
|
|
@@ -24316,10 +24376,11 @@ var CopyButton_default = {
|
|
|
24316
24376
|
};
|
|
24317
24377
|
|
|
24318
24378
|
// src/components/CopyButton.tsx
|
|
24379
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
24319
24380
|
var TIMEOUT = 2e3;
|
|
24320
24381
|
function CopyButton({ value, className, children, ...props }) {
|
|
24321
|
-
const [copied, setCopied] = (0,
|
|
24322
|
-
const timeout = (0,
|
|
24382
|
+
const [copied, setCopied] = (0, import_react151.useState)(false);
|
|
24383
|
+
const timeout = (0, import_react151.useRef)(0);
|
|
24323
24384
|
const handleCopy = async () => {
|
|
24324
24385
|
if (value) {
|
|
24325
24386
|
await navigator.clipboard.writeText(value);
|
|
@@ -24328,7 +24389,7 @@ function CopyButton({ value, className, children, ...props }) {
|
|
|
24328
24389
|
timeout.current = +setTimeout(() => setCopied(false), TIMEOUT);
|
|
24329
24390
|
}
|
|
24330
24391
|
};
|
|
24331
|
-
return /* @__PURE__ */
|
|
24392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon, { ...props, className: (0, import_classnames15.default)(CopyButton_default.icon, className), onClick: handleCopy, children: copied ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icons.Check, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icons.Copy, {}) });
|
|
24332
24393
|
}
|
|
24333
24394
|
|
|
24334
24395
|
// src/components/Field.module.css
|
|
@@ -24345,7 +24406,8 @@ var TextField_default = {
|
|
|
24345
24406
|
};
|
|
24346
24407
|
|
|
24347
24408
|
// src/components/TextField.tsx
|
|
24348
|
-
|
|
24409
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
24410
|
+
function TextField({
|
|
24349
24411
|
value,
|
|
24350
24412
|
defaultValue,
|
|
24351
24413
|
asTextArea,
|
|
@@ -24354,20 +24416,23 @@ function _TextField({
|
|
|
24354
24416
|
onChange,
|
|
24355
24417
|
...props
|
|
24356
24418
|
}) {
|
|
24357
|
-
const [inputValue, setInputValue] = (0,
|
|
24419
|
+
const [inputValue, setInputValue] = (0, import_react152.useState)(defaultValue || value);
|
|
24358
24420
|
const Component = asTextArea ? $216918bed6669f72$export$f5c9f3c2c4054eec : $3985021b0ad6602f$export$f5b8910cec6cf069;
|
|
24359
24421
|
const handleChange = (e) => {
|
|
24360
24422
|
setInputValue(e.target.value);
|
|
24361
24423
|
return onChange?.(e);
|
|
24362
24424
|
};
|
|
24363
|
-
return /* @__PURE__ */
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24369
|
-
|
|
24370
|
-
|
|
24425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, className: (0, import_classnames16.default)(Field_default.field, className), children: [
|
|
24426
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
24427
|
+
Component,
|
|
24428
|
+
{
|
|
24429
|
+
value: inputValue,
|
|
24430
|
+
className: (0, import_classnames16.default)(Field_default.input, asTextArea && TextField_default.textarea),
|
|
24431
|
+
onChange: handleChange
|
|
24432
|
+
}
|
|
24433
|
+
),
|
|
24434
|
+
allowCopy && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CopyButton, { className: TextField_default.copy, value: inputValue })
|
|
24435
|
+
] });
|
|
24371
24436
|
}
|
|
24372
24437
|
|
|
24373
24438
|
// src/components/Text.tsx
|
|
@@ -24394,9 +24459,10 @@ var Text_default = {
|
|
|
24394
24459
|
};
|
|
24395
24460
|
|
|
24396
24461
|
// src/components/Text.tsx
|
|
24462
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
24397
24463
|
function Text({ children, type, size, spacing, weight, asChild, className, ...props }) {
|
|
24398
24464
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "span";
|
|
24399
|
-
return /* @__PURE__ */
|
|
24465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
24400
24466
|
Component,
|
|
24401
24467
|
{
|
|
24402
24468
|
...props,
|
|
@@ -24407,9 +24473,9 @@ function Text({ children, type, size, spacing, weight, asChild, className, ...pr
|
|
|
24407
24473
|
spacing && Text_default[spacing],
|
|
24408
24474
|
type && Text_default[type],
|
|
24409
24475
|
weight && Text_default[weight]
|
|
24410
|
-
)
|
|
24411
|
-
|
|
24412
|
-
|
|
24476
|
+
),
|
|
24477
|
+
children
|
|
24478
|
+
}
|
|
24413
24479
|
);
|
|
24414
24480
|
}
|
|
24415
24481
|
|
|
@@ -24420,6 +24486,7 @@ var ConfirmationDialog_default = {
|
|
|
24420
24486
|
};
|
|
24421
24487
|
|
|
24422
24488
|
// src/components/ConfirmationDialog.tsx
|
|
24489
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
24423
24490
|
function ConfirmationDialog({
|
|
24424
24491
|
value,
|
|
24425
24492
|
confirmMessage,
|
|
@@ -24427,26 +24494,34 @@ function ConfirmationDialog({
|
|
|
24427
24494
|
children,
|
|
24428
24495
|
...props
|
|
24429
24496
|
}) {
|
|
24430
|
-
const [canSave, setCanSave] = (0,
|
|
24497
|
+
const [canSave, setCanSave] = (0, import_react153.useState)(false);
|
|
24431
24498
|
const handleChange = (e) => {
|
|
24432
24499
|
setCanSave(e.target.value === value);
|
|
24433
24500
|
};
|
|
24434
|
-
return /* @__PURE__ */
|
|
24501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
24435
24502
|
AlertDialog,
|
|
24436
24503
|
{
|
|
24437
24504
|
...props,
|
|
24438
24505
|
className: (0, import_classnames18.default)(ConfirmationDialog_default.dialog, className),
|
|
24439
|
-
isConfirmDisabled: !canSave
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24506
|
+
isConfirmDisabled: !canSave,
|
|
24507
|
+
children: ({ close }) => {
|
|
24508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
24509
|
+
typeof children === "function" ? children({ close }) : children,
|
|
24510
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text, { children: [
|
|
24511
|
+
confirmMessage || "Type the following value to confirm",
|
|
24512
|
+
":"
|
|
24513
|
+
] }),
|
|
24514
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: ConfirmationDialog_default.value, children: value }),
|
|
24515
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TextField, { autoFocus: true, "aria-label": "Confirmation", onChange: handleChange })
|
|
24516
|
+
] });
|
|
24517
|
+
}
|
|
24443
24518
|
}
|
|
24444
24519
|
);
|
|
24445
24520
|
}
|
|
24446
24521
|
|
|
24447
24522
|
// src/components/DataTable.tsx
|
|
24448
24523
|
var import_classnames20 = __toESM(require_classnames());
|
|
24449
|
-
var
|
|
24524
|
+
var import_react154 = require("react");
|
|
24450
24525
|
|
|
24451
24526
|
// src/components/Table.tsx
|
|
24452
24527
|
var import_classnames19 = __toESM(require_classnames());
|
|
@@ -24465,31 +24540,32 @@ var Table_default = {
|
|
|
24465
24540
|
};
|
|
24466
24541
|
|
|
24467
24542
|
// src/components/Table.tsx
|
|
24468
|
-
|
|
24469
|
-
|
|
24543
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
24544
|
+
function Table({ children, className, ...props }) {
|
|
24545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)($1910c06f0ca9905e$export$54ec01a60f47d33d, { ...props, className: (0, import_classnames19.default)(Table_default.table, className), "aria-label": "Table", children });
|
|
24470
24546
|
}
|
|
24471
|
-
function
|
|
24472
|
-
return /* @__PURE__ */
|
|
24547
|
+
function TableHeader({ children, className, ...props }) {
|
|
24548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)($1910c06f0ca9905e$export$f850895b287ef28e, { ...props, className: (0, import_classnames19.default)(Table_default.header, className), children });
|
|
24473
24549
|
}
|
|
24474
|
-
function
|
|
24475
|
-
return /* @__PURE__ */
|
|
24550
|
+
function TableBody({ children, className, ...props }) {
|
|
24551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)($1910c06f0ca9905e$export$76ccd210b9029917, { ...props, className: (0, import_classnames19.default)(Table_default.body, className), children });
|
|
24476
24552
|
}
|
|
24477
24553
|
function TableRow({ children, className, ...props }) {
|
|
24478
|
-
return /* @__PURE__ */
|
|
24554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)($1910c06f0ca9905e$export$b59bdbef9ce70de2, { ...props, className: (0, import_classnames19.default)(Table_default.row, className), children });
|
|
24479
24555
|
}
|
|
24480
24556
|
function TableColumn({ children, className, alignment, ...props }) {
|
|
24481
|
-
return /* @__PURE__ */
|
|
24557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
24482
24558
|
$1910c06f0ca9905e$export$816b5d811295e6bc,
|
|
24483
24559
|
{
|
|
24484
24560
|
...props,
|
|
24485
24561
|
className: (0, import_classnames19.default)(Table_default.column, className, alignment && Table_default[alignment]),
|
|
24486
|
-
isRowHeader: true
|
|
24487
|
-
|
|
24488
|
-
|
|
24562
|
+
isRowHeader: true,
|
|
24563
|
+
children
|
|
24564
|
+
}
|
|
24489
24565
|
);
|
|
24490
24566
|
}
|
|
24491
24567
|
function TableCell({ children, className, alignment, ...props }) {
|
|
24492
|
-
return /* @__PURE__ */
|
|
24568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)($1910c06f0ca9905e$export$f6f0c3fe4ec306ea, { ...props, className: (0, import_classnames19.default)(Table_default.cell, className, alignment && Table_default[alignment]), children });
|
|
24493
24569
|
}
|
|
24494
24570
|
|
|
24495
24571
|
// src/components/DataTable.module.css
|
|
@@ -24499,20 +24575,25 @@ var DataTable_default = {
|
|
|
24499
24575
|
};
|
|
24500
24576
|
|
|
24501
24577
|
// src/components/DataTable.tsx
|
|
24578
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
24579
|
+
var import_react155 = require("react");
|
|
24502
24580
|
function DataTable({ data = [], className, children, ...props }) {
|
|
24503
|
-
const columns =
|
|
24581
|
+
const columns = import_react154.Children.map(children, (child) => {
|
|
24504
24582
|
return { ...child.props, value: child.props.children };
|
|
24505
24583
|
});
|
|
24506
|
-
return /* @__PURE__ */
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24513
|
-
|
|
24514
|
-
|
|
24515
|
-
|
|
24584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Table, { ...props, className: (0, import_classnames20.default)(DataTable_default.datatable, className), children: [
|
|
24585
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableHeader, { children: columns.map(({ id, label, hidden, ...columnProps }) => {
|
|
24586
|
+
if (hidden) {
|
|
24587
|
+
return null;
|
|
24588
|
+
}
|
|
24589
|
+
return /* @__PURE__ */ (0, import_react155.createElement)(TableColumn, { ...columnProps, key: id, id }, label);
|
|
24590
|
+
}) }),
|
|
24591
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableBody, { items: data, children: (row) => {
|
|
24592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TableRow, { children: columns.map(({ id, value, className: className2, ...cellProps }) => {
|
|
24593
|
+
return /* @__PURE__ */ (0, import_react155.createElement)(TableCell, { ...cellProps, key: id, className: (0, import_classnames20.default)(DataTable_default.cell, className2) }, !value && row[id], typeof value === "function" ? value(row, id) : value);
|
|
24594
|
+
}) });
|
|
24595
|
+
} })
|
|
24596
|
+
] });
|
|
24516
24597
|
}
|
|
24517
24598
|
function DataColumn(props) {
|
|
24518
24599
|
return null;
|
|
@@ -24529,8 +24610,13 @@ var Dots_default = {
|
|
|
24529
24610
|
};
|
|
24530
24611
|
|
|
24531
24612
|
// src/components/Dots.tsx
|
|
24613
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
24532
24614
|
function Dots({ className, ...props }) {
|
|
24533
|
-
return /* @__PURE__ */
|
|
24615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ...props, className: (0, import_classnames21.default)(Dots_default.dots, className), children: [
|
|
24616
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: Dots_default.dot }),
|
|
24617
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: Dots_default.dot }),
|
|
24618
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: Dots_default.dot })
|
|
24619
|
+
] });
|
|
24534
24620
|
}
|
|
24535
24621
|
|
|
24536
24622
|
// src/components/Heading.tsx
|
|
@@ -24551,15 +24637,16 @@ var Heading_default = {
|
|
|
24551
24637
|
};
|
|
24552
24638
|
|
|
24553
24639
|
// src/components/Heading.tsx
|
|
24640
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
24554
24641
|
function Heading({ size = 5, className, children, asChild, ...props }) {
|
|
24555
24642
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "h1";
|
|
24556
|
-
return /* @__PURE__ */
|
|
24643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
24557
24644
|
Component,
|
|
24558
24645
|
{
|
|
24559
24646
|
...props,
|
|
24560
|
-
className: (0, import_classnames22.default)(Heading_default.heading, className, size && Heading_default[`size${size}`])
|
|
24561
|
-
|
|
24562
|
-
|
|
24647
|
+
className: (0, import_classnames22.default)(Heading_default.heading, className, size && Heading_default[`size${size}`]),
|
|
24648
|
+
children
|
|
24649
|
+
}
|
|
24563
24650
|
);
|
|
24564
24651
|
}
|
|
24565
24652
|
|
|
@@ -24574,6 +24661,7 @@ var InlineEditField_default = {
|
|
|
24574
24661
|
};
|
|
24575
24662
|
|
|
24576
24663
|
// src/components/InlineEditField.tsx
|
|
24664
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
24577
24665
|
function InlineEditField({
|
|
24578
24666
|
value: defaultValue = "",
|
|
24579
24667
|
defaultEdit,
|
|
@@ -24608,26 +24696,28 @@ function InlineEditField({
|
|
|
24608
24696
|
handleCancel();
|
|
24609
24697
|
}
|
|
24610
24698
|
};
|
|
24611
|
-
return /* @__PURE__ */
|
|
24699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
24612
24700
|
"div",
|
|
24613
24701
|
{
|
|
24614
24702
|
"aria-label": "Edit",
|
|
24615
24703
|
...props,
|
|
24616
24704
|
className: (0, import_classnames23.default)(InlineEditField_default.edit, className),
|
|
24617
|
-
onClick: handleEdit
|
|
24618
|
-
|
|
24619
|
-
|
|
24620
|
-
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24624
|
-
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
|
|
24628
|
-
|
|
24629
|
-
|
|
24630
|
-
|
|
24705
|
+
onClick: handleEdit,
|
|
24706
|
+
children: [
|
|
24707
|
+
!edit && children,
|
|
24708
|
+
!edit && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { className: InlineEditField_default.icon, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icons.Edit, {}) }),
|
|
24709
|
+
edit && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
24710
|
+
TextField,
|
|
24711
|
+
{
|
|
24712
|
+
value,
|
|
24713
|
+
onKeyDown: handleKeyDown,
|
|
24714
|
+
onBlur: handleCommit,
|
|
24715
|
+
onChange: handleChange,
|
|
24716
|
+
autoFocus: true
|
|
24717
|
+
}
|
|
24718
|
+
)
|
|
24719
|
+
]
|
|
24720
|
+
}
|
|
24631
24721
|
);
|
|
24632
24722
|
}
|
|
24633
24723
|
|
|
@@ -24640,8 +24730,9 @@ var Label_default = {
|
|
|
24640
24730
|
};
|
|
24641
24731
|
|
|
24642
24732
|
// src/components/Label.tsx
|
|
24643
|
-
|
|
24644
|
-
|
|
24733
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
24734
|
+
function Label({ asChild, className, ...props }) {
|
|
24735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)($01b77f81d0f07f68$export$b04be29aa201d4f5, { ...props, className: (0, import_classnames24.default)(Label_default.label, className) });
|
|
24645
24736
|
}
|
|
24646
24737
|
|
|
24647
24738
|
// src/components/Loading.tsx
|
|
@@ -24665,17 +24756,21 @@ var Spinner_default = {
|
|
|
24665
24756
|
};
|
|
24666
24757
|
|
|
24667
24758
|
// src/components/Spinner.tsx
|
|
24759
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
24668
24760
|
function Spinner(props) {
|
|
24669
24761
|
const { size = "lg", quiet, className, ...domProps } = props;
|
|
24670
|
-
return /* @__PURE__ */
|
|
24762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
24671
24763
|
"div",
|
|
24672
24764
|
{
|
|
24673
24765
|
...domProps,
|
|
24674
24766
|
className: (0, import_classnames25.default)(Spinner_default.spinner, className, Spinner_default[`size-${size}`], {
|
|
24675
24767
|
[Spinner_default.quiet]: quiet
|
|
24676
|
-
})
|
|
24677
|
-
|
|
24678
|
-
|
|
24768
|
+
}),
|
|
24769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { viewBox: "25 25 50 50", children: [
|
|
24770
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { className: Spinner_default.track, cx: "50", cy: "50", r: "20" }),
|
|
24771
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { className: Spinner_default.fill, cx: "50", cy: "50", r: "20" })
|
|
24772
|
+
] })
|
|
24773
|
+
}
|
|
24679
24774
|
);
|
|
24680
24775
|
}
|
|
24681
24776
|
|
|
@@ -24688,14 +24783,22 @@ var Loading_default = {
|
|
|
24688
24783
|
};
|
|
24689
24784
|
|
|
24690
24785
|
// src/components/Loading.tsx
|
|
24786
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
24691
24787
|
function Loading(props) {
|
|
24692
24788
|
const { size, position = "inline", icon = "spinner", className, ...domProps } = props;
|
|
24693
|
-
return /* @__PURE__ */
|
|
24789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ...domProps, className: (0, import_classnames26.default)(Loading_default.loading, className, Loading_default[position]), children: [
|
|
24790
|
+
icon === "dots" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dots, {}),
|
|
24791
|
+
icon === "spinner" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Spinner, { size })
|
|
24792
|
+
] });
|
|
24694
24793
|
}
|
|
24695
24794
|
|
|
24696
24795
|
// src/components/LoadingButton.tsx
|
|
24796
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
24697
24797
|
function LoadingButton({ isLoading, children, ...props }) {
|
|
24698
|
-
return /* @__PURE__ */
|
|
24798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Button, { ...props, children: [
|
|
24799
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Spinner, {}) }),
|
|
24800
|
+
children
|
|
24801
|
+
] });
|
|
24699
24802
|
}
|
|
24700
24803
|
|
|
24701
24804
|
// src/components/Menu.tsx
|
|
@@ -24711,8 +24814,12 @@ var MenuItem_default = {
|
|
|
24711
24814
|
};
|
|
24712
24815
|
|
|
24713
24816
|
// src/components/MenuItem.tsx
|
|
24714
|
-
|
|
24715
|
-
|
|
24817
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
24818
|
+
function MenuItem2({ children, className, ...props }) {
|
|
24819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)($3674c52c6b3c5bce$export$2ce376c2cc3355c8, { ...props, className: (0, import_classnames27.default)(MenuItem_default.item, className), children: [
|
|
24820
|
+
children,
|
|
24821
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { className: MenuItem_default.check, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icons.Check, {}) }) })
|
|
24822
|
+
] });
|
|
24716
24823
|
}
|
|
24717
24824
|
|
|
24718
24825
|
// src/components/Menu.module.css
|
|
@@ -24722,13 +24829,14 @@ var Menu_default = {
|
|
|
24722
24829
|
};
|
|
24723
24830
|
|
|
24724
24831
|
// src/components/Menu.tsx
|
|
24725
|
-
|
|
24726
|
-
|
|
24832
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
24833
|
+
function Menu({ items, className, children, ...props }) {
|
|
24834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames28.default)(Menu_default.menu, className), children: children || items?.map((item, index) => {
|
|
24727
24835
|
if (item === null) {
|
|
24728
|
-
return /* @__PURE__ */
|
|
24836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)($431f98aba6844401$export$1ff3c3f08ae963c0, { className: Menu_default.separator }, index);
|
|
24729
24837
|
}
|
|
24730
|
-
return /* @__PURE__ */
|
|
24731
|
-
}));
|
|
24838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MenuItem2, { id: item, children: item }, index);
|
|
24839
|
+
}) });
|
|
24732
24840
|
}
|
|
24733
24841
|
|
|
24734
24842
|
// src/components/Modal.tsx
|
|
@@ -24743,16 +24851,17 @@ var Modal_default = {
|
|
|
24743
24851
|
};
|
|
24744
24852
|
|
|
24745
24853
|
// src/components/Modal.tsx
|
|
24746
|
-
|
|
24747
|
-
|
|
24854
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
24855
|
+
function Modal({ children, className, ...props }) {
|
|
24856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)($f3f84453ead64de5$export$8948f78d83984c69, { ...props, className: Modal_default.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
24748
24857
|
$f3f84453ead64de5$export$2b77a92f1a5ad772,
|
|
24749
24858
|
{
|
|
24750
24859
|
className: (0, import_classnames29.default)(Modal_default.modal, className),
|
|
24751
24860
|
isDismissable: true,
|
|
24752
|
-
isKeyboardDismissDisabled: true
|
|
24753
|
-
|
|
24754
|
-
|
|
24755
|
-
));
|
|
24861
|
+
isKeyboardDismissDisabled: true,
|
|
24862
|
+
children
|
|
24863
|
+
}
|
|
24864
|
+
) });
|
|
24756
24865
|
}
|
|
24757
24866
|
|
|
24758
24867
|
// src/components/PasswordField.tsx
|
|
@@ -24766,11 +24875,15 @@ var PasswordField_default = {
|
|
|
24766
24875
|
};
|
|
24767
24876
|
|
|
24768
24877
|
// src/components/PasswordField.tsx
|
|
24878
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
24769
24879
|
function PasswordField({ ...props }) {
|
|
24770
24880
|
const [show, setShow] = (0, import_react157.useState)(false);
|
|
24771
24881
|
const type = show ? "text" : "password";
|
|
24772
24882
|
const handleShowPassword = () => setShow((state) => !state);
|
|
24773
|
-
return /* @__PURE__ */
|
|
24883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, className: PasswordField_default.field, children: [
|
|
24884
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: PasswordField_default.input }),
|
|
24885
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { onClick: handleShowPassword, className: PasswordField_default.icon, children: show ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icons.EyeSlash, {}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icons.Eye, {}) })
|
|
24886
|
+
] });
|
|
24774
24887
|
}
|
|
24775
24888
|
|
|
24776
24889
|
// src/components/Page.tsx
|
|
@@ -24782,8 +24895,9 @@ var Page_default = {
|
|
|
24782
24895
|
};
|
|
24783
24896
|
|
|
24784
24897
|
// src/components/Page.tsx
|
|
24898
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
24785
24899
|
function Page({ className, children, ...props }) {
|
|
24786
|
-
return /* @__PURE__ */
|
|
24900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ...props, className: (0, import_classnames30.default)(Page_default.page, className), children });
|
|
24787
24901
|
}
|
|
24788
24902
|
|
|
24789
24903
|
// src/components/ProgressBar.tsx
|
|
@@ -24798,10 +24912,14 @@ var ProgressBar_default = {
|
|
|
24798
24912
|
};
|
|
24799
24913
|
|
|
24800
24914
|
// src/components/ProgressBar.tsx
|
|
24801
|
-
|
|
24802
|
-
|
|
24803
|
-
|
|
24804
|
-
|
|
24915
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
24916
|
+
function ProgressBar({ className, showValue, ...props }) {
|
|
24917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames31.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
|
|
24918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
24919
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
|
|
24920
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: ProgressBar_default.value, children: valueText })
|
|
24921
|
+
] });
|
|
24922
|
+
} });
|
|
24805
24923
|
}
|
|
24806
24924
|
|
|
24807
24925
|
// src/components/ProgressCircle.tsx
|
|
@@ -24816,23 +24934,30 @@ var ProgressCircle_default = {
|
|
|
24816
24934
|
};
|
|
24817
24935
|
|
|
24818
24936
|
// src/components/ProgressCircle.tsx
|
|
24937
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
24819
24938
|
function ProgressCircle({ className, showValue, ...props }) {
|
|
24820
|
-
return /* @__PURE__ */
|
|
24939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames32.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
|
|
24821
24940
|
const radius = 45;
|
|
24822
24941
|
const circumference = radius * 2 * Math.PI;
|
|
24823
24942
|
const offset = circumference - percentage / 100 * circumference;
|
|
24824
|
-
return /* @__PURE__ */
|
|
24825
|
-
"
|
|
24826
|
-
|
|
24827
|
-
|
|
24828
|
-
|
|
24829
|
-
|
|
24830
|
-
|
|
24831
|
-
|
|
24832
|
-
|
|
24833
|
-
|
|
24834
|
-
|
|
24835
|
-
|
|
24943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
24944
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
24945
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
|
|
24946
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
24947
|
+
"circle",
|
|
24948
|
+
{
|
|
24949
|
+
className: ProgressCircle_default.fill,
|
|
24950
|
+
cx: "50",
|
|
24951
|
+
cy: "50",
|
|
24952
|
+
r: "45",
|
|
24953
|
+
strokeDasharray: `${circumference} ${circumference}`,
|
|
24954
|
+
strokeDashoffset: offset
|
|
24955
|
+
}
|
|
24956
|
+
)
|
|
24957
|
+
] }),
|
|
24958
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { className: ProgressCircle_default.value, children: valueText })
|
|
24959
|
+
] });
|
|
24960
|
+
} });
|
|
24836
24961
|
}
|
|
24837
24962
|
|
|
24838
24963
|
// src/components/RadioGroup.tsx
|
|
@@ -24845,11 +24970,12 @@ var RadioGroup_default = {
|
|
|
24845
24970
|
};
|
|
24846
24971
|
|
|
24847
24972
|
// src/components/RadioGroup.tsx
|
|
24848
|
-
|
|
24849
|
-
|
|
24973
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
24974
|
+
function RadioGroup({ children, className, ...props }) {
|
|
24975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, className: (0, import_classnames33.default)(RadioGroup_default.radiogroup, className), children });
|
|
24850
24976
|
}
|
|
24851
|
-
function
|
|
24852
|
-
return /* @__PURE__ */
|
|
24977
|
+
function Radio({ children, className, ...props }) {
|
|
24978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames33.default)(RadioGroup_default.radio, className), children });
|
|
24853
24979
|
}
|
|
24854
24980
|
|
|
24855
24981
|
// src/components/SearchField.tsx
|
|
@@ -24863,7 +24989,8 @@ var SearchField_default = {
|
|
|
24863
24989
|
};
|
|
24864
24990
|
|
|
24865
24991
|
// src/components/SearchField.tsx
|
|
24866
|
-
|
|
24992
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
24993
|
+
function SearchField({ value, delay = 0, onSearch, className, ...props }) {
|
|
24867
24994
|
const [search, setSearch] = (0, import_react158.useState)(value ?? "");
|
|
24868
24995
|
const searchValue = useDebounce(search, delay);
|
|
24869
24996
|
const handleChange = (e) => {
|
|
@@ -24882,9 +25009,13 @@ function _SearchField({ value, delay = 0, onSearch, className, ...props }) {
|
|
|
24882
25009
|
onSearch?.(searchValue);
|
|
24883
25010
|
}
|
|
24884
25011
|
}, [searchValue, delay, onSearch]);
|
|
24885
|
-
return /* @__PURE__ */
|
|
24886
|
-
return /* @__PURE__ */
|
|
24887
|
-
|
|
25012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)($440f4836bcb56932$export$b94867ecbd698f21, { ...props, className: (0, import_classnames34.default)(Field_default.field, className), children: ({ state }) => {
|
|
25013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
25014
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icons.MagnifyingGlass, { className: (0, import_classnames34.default)(Field_default.icon, SearchField_default.icon) }),
|
|
25015
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)($3985021b0ad6602f$export$f5b8910cec6cf069, { className: Field_default.input, onChange: handleChange }),
|
|
25016
|
+
state.value && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: SearchField_default.button, onPress: resetSearch, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icons.Close, {}) }) })
|
|
25017
|
+
] });
|
|
25018
|
+
} });
|
|
24888
25019
|
}
|
|
24889
25020
|
|
|
24890
25021
|
// src/components/Select.tsx
|
|
@@ -24899,8 +25030,15 @@ var Select_default = {
|
|
|
24899
25030
|
};
|
|
24900
25031
|
|
|
24901
25032
|
// src/components/Select.tsx
|
|
24902
|
-
|
|
24903
|
-
|
|
25033
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
25034
|
+
function Select({ children, items = [], value, className, ...props }) {
|
|
25035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)($82d7e5349645de74$export$ef9b1a59e592288f, { ...props, className: (0, import_classnames35.default)(Select_default.select, className), children: [
|
|
25036
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: Select_default.button, children: [
|
|
25037
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
25038
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { rotate: 90, size: "xs", className: Select_default.icon, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icons.Chevron, {}) }) })
|
|
25039
|
+
] }),
|
|
25040
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Popover, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(List, { items, className: Select_default.list, children: children || items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ListItem_default2, { id: item, className: Select_default.item, children: item }, item)) }) })
|
|
25041
|
+
] });
|
|
24904
25042
|
}
|
|
24905
25043
|
|
|
24906
25044
|
// src/components/Slider.tsx
|
|
@@ -24917,19 +25055,27 @@ var Slider_default = {
|
|
|
24917
25055
|
};
|
|
24918
25056
|
|
|
24919
25057
|
// src/components/Slider.tsx
|
|
24920
|
-
|
|
24921
|
-
|
|
24922
|
-
|
|
24923
|
-
|
|
24924
|
-
|
|
24925
|
-
|
|
24926
|
-
|
|
24927
|
-
|
|
24928
|
-
|
|
24929
|
-
|
|
24930
|
-
|
|
24931
|
-
|
|
24932
|
-
|
|
25058
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
25059
|
+
function Slider({ className, showValue = true, label, ...props }) {
|
|
25060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)($6f909507e6374d18$export$472062a354075cee, { ...props, className: (0, import_classnames36.default)(Slider_default.slider, className), children: [
|
|
25061
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { className: Slider_default.label, children: label }),
|
|
25062
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output }),
|
|
25063
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
25064
|
+
const isHorizontal = state.orientation === "horizontal";
|
|
25065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
25066
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
25067
|
+
"div",
|
|
25068
|
+
{
|
|
25069
|
+
className: Slider_default.fill,
|
|
25070
|
+
style: {
|
|
25071
|
+
[isHorizontal ? "width" : "height"]: (isHorizontal ? state.getThumbPercent(0) : 1 - state.getThumbPercent(0)) * 100 + "%"
|
|
25072
|
+
}
|
|
25073
|
+
}
|
|
25074
|
+
),
|
|
25075
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
|
|
25076
|
+
] });
|
|
25077
|
+
} })
|
|
25078
|
+
] });
|
|
24933
25079
|
}
|
|
24934
25080
|
|
|
24935
25081
|
// src/components/StatusLight.tsx
|
|
@@ -24948,15 +25094,19 @@ var StatusLight_default = {
|
|
|
24948
25094
|
};
|
|
24949
25095
|
|
|
24950
25096
|
// src/components/StatusLight.tsx
|
|
25097
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
24951
25098
|
function StatusLight(props) {
|
|
24952
25099
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
24953
|
-
return /* @__PURE__ */
|
|
24954
|
-
"div",
|
|
24955
|
-
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
25100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { ...domProps, className: (0, import_classnames37.default)(StatusLight_default.statuslight, className), children: [
|
|
25101
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: StatusLight_default.bg, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
25102
|
+
"div",
|
|
25103
|
+
{
|
|
25104
|
+
className: (0, import_classnames37.default)(StatusLight_default.status, StatusLight_default[variant]),
|
|
25105
|
+
style: { backgroundColor: color }
|
|
25106
|
+
}
|
|
25107
|
+
) }),
|
|
25108
|
+
children
|
|
25109
|
+
] });
|
|
24960
25110
|
}
|
|
24961
25111
|
|
|
24962
25112
|
// src/components/Switch.tsx
|
|
@@ -24970,8 +25120,12 @@ var Switch_default = {
|
|
|
24970
25120
|
};
|
|
24971
25121
|
|
|
24972
25122
|
// src/components/Switch.tsx
|
|
24973
|
-
|
|
24974
|
-
|
|
25123
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
25124
|
+
function Switch({ children, className, ...props }) {
|
|
25125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)($8e59e948500a8fe1$export$b5d5cf8927ab7262, { ...props, className: (0, import_classnames38.default)(Switch_default.switch, className), children: [
|
|
25126
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: Switch_default.track, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: Switch_default.knob }) }),
|
|
25127
|
+
children
|
|
25128
|
+
] });
|
|
24975
25129
|
}
|
|
24976
25130
|
|
|
24977
25131
|
// src/components/Tabs.module.css
|
|
@@ -24983,17 +25137,18 @@ var Tabs_default = {
|
|
|
24983
25137
|
};
|
|
24984
25138
|
|
|
24985
25139
|
// src/components/Tabs.tsx
|
|
24986
|
-
|
|
24987
|
-
|
|
25140
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
25141
|
+
function Tabs({ children, ...props }) {
|
|
25142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)($5e8ad37a45e1c704$export$b2539bed5023c21c, { ...props, className: Tabs_default.tabs, children });
|
|
24988
25143
|
}
|
|
24989
|
-
function
|
|
24990
|
-
return /* @__PURE__ */
|
|
25144
|
+
function TabList({ children, ...props }) {
|
|
25145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)($5e8ad37a45e1c704$export$e51a686c67fdaa2d, { ...props, className: Tabs_default.list, children });
|
|
24991
25146
|
}
|
|
24992
|
-
function
|
|
24993
|
-
return /* @__PURE__ */
|
|
25147
|
+
function Tab({ children, ...props }) {
|
|
25148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)($5e8ad37a45e1c704$export$3e41faf802a29e71, { ...props, className: Tabs_default.tab, children });
|
|
24994
25149
|
}
|
|
24995
|
-
function
|
|
24996
|
-
return /* @__PURE__ */
|
|
25150
|
+
function TabPanel({ children, ...props }) {
|
|
25151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)($5e8ad37a45e1c704$export$3d96ec278d3efce4, { ...props, className: Tabs_default.panel, children });
|
|
24997
25152
|
}
|
|
24998
25153
|
|
|
24999
25154
|
// src/components/TextOverflow.tsx
|
|
@@ -25006,9 +25161,10 @@ var TextOverflow_default = {
|
|
|
25006
25161
|
};
|
|
25007
25162
|
|
|
25008
25163
|
// src/components/TextOverflow.tsx
|
|
25164
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
25009
25165
|
function TextOverflow({ asChild, children, className, ...props }) {
|
|
25010
25166
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "div";
|
|
25011
|
-
return /* @__PURE__ */
|
|
25167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { ...props, className: (0, import_classnames39.default)(TextOverflow_default.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Component, { className: TextOverflow_default.overflow, children }) });
|
|
25012
25168
|
}
|
|
25013
25169
|
|
|
25014
25170
|
// src/components/TextArea.tsx
|
|
@@ -25022,8 +25178,9 @@ var TextArea_default = {
|
|
|
25022
25178
|
};
|
|
25023
25179
|
|
|
25024
25180
|
// src/components/TextArea.tsx
|
|
25181
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
25025
25182
|
function TextArea({ resize, className, ...props }) {
|
|
25026
|
-
return /* @__PURE__ */
|
|
25183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TextField, { ...props, className: (0, import_classnames40.default)(resize && TextArea_default[resize]), asTextArea: true });
|
|
25027
25184
|
}
|
|
25028
25185
|
|
|
25029
25186
|
// src/components/Toast.tsx
|
|
@@ -25031,7 +25188,7 @@ var import_classnames41 = __toESM(require_classnames());
|
|
|
25031
25188
|
var import_react160 = require("react");
|
|
25032
25189
|
|
|
25033
25190
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
25034
|
-
var
|
|
25191
|
+
var React17 = __toESM(require("react"), 1);
|
|
25035
25192
|
var ReactDOM4 = __toESM(require("react-dom"), 1);
|
|
25036
25193
|
|
|
25037
25194
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
@@ -25045,7 +25202,7 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
25045
25202
|
}
|
|
25046
25203
|
|
|
25047
25204
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
25048
|
-
var
|
|
25205
|
+
var React4 = __toESM(require("react"), 1);
|
|
25049
25206
|
function setRef(ref, value) {
|
|
25050
25207
|
if (typeof ref === "function") {
|
|
25051
25208
|
ref(value);
|
|
@@ -25057,30 +25214,30 @@ function composeRefs(...refs) {
|
|
|
25057
25214
|
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
25058
25215
|
}
|
|
25059
25216
|
function useComposedRefs(...refs) {
|
|
25060
|
-
return
|
|
25217
|
+
return React4.useCallback(composeRefs(...refs), refs);
|
|
25061
25218
|
}
|
|
25062
25219
|
|
|
25063
25220
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
25064
25221
|
var import_react159 = __toESM(require("react"), 1);
|
|
25065
25222
|
|
|
25066
25223
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
25067
|
-
var
|
|
25068
|
-
var
|
|
25224
|
+
var React5 = __toESM(require("react"), 1);
|
|
25225
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
25069
25226
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
25070
25227
|
let defaultContexts = [];
|
|
25071
25228
|
function createContext3(rootComponentName, defaultContext) {
|
|
25072
|
-
const BaseContext =
|
|
25229
|
+
const BaseContext = React5.createContext(defaultContext);
|
|
25073
25230
|
const index = defaultContexts.length;
|
|
25074
25231
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
25075
25232
|
function Provider(props) {
|
|
25076
25233
|
const { scope, children, ...context } = props;
|
|
25077
25234
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
25078
|
-
const value =
|
|
25079
|
-
return /* @__PURE__ */ (0,
|
|
25235
|
+
const value = React5.useMemo(() => context, Object.values(context));
|
|
25236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Context.Provider, { value, children });
|
|
25080
25237
|
}
|
|
25081
25238
|
function useContext22(consumerName, scope) {
|
|
25082
25239
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
25083
|
-
const context =
|
|
25240
|
+
const context = React5.useContext(Context);
|
|
25084
25241
|
if (context) return context;
|
|
25085
25242
|
if (defaultContext !== void 0) return defaultContext;
|
|
25086
25243
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -25090,11 +25247,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
25090
25247
|
}
|
|
25091
25248
|
const createScope = () => {
|
|
25092
25249
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
25093
|
-
return
|
|
25250
|
+
return React5.createContext(defaultContext);
|
|
25094
25251
|
});
|
|
25095
25252
|
return function useScope(scope) {
|
|
25096
25253
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
25097
|
-
return
|
|
25254
|
+
return React5.useMemo(
|
|
25098
25255
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
25099
25256
|
[scope, contexts]
|
|
25100
25257
|
);
|
|
@@ -25117,7 +25274,7 @@ function composeContextScopes(...scopes) {
|
|
|
25117
25274
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
25118
25275
|
return { ...nextScopes2, ...currentScope };
|
|
25119
25276
|
}, {});
|
|
25120
|
-
return
|
|
25277
|
+
return React5.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
25121
25278
|
};
|
|
25122
25279
|
};
|
|
25123
25280
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -25125,45 +25282,45 @@ function composeContextScopes(...scopes) {
|
|
|
25125
25282
|
}
|
|
25126
25283
|
|
|
25127
25284
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
25128
|
-
var
|
|
25129
|
-
var
|
|
25130
|
-
var Slot =
|
|
25285
|
+
var React6 = __toESM(require("react"), 1);
|
|
25286
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
25287
|
+
var Slot = React6.forwardRef((props, forwardedRef) => {
|
|
25131
25288
|
const { children, ...slotProps } = props;
|
|
25132
|
-
const childrenArray =
|
|
25289
|
+
const childrenArray = React6.Children.toArray(children);
|
|
25133
25290
|
const slottable = childrenArray.find(isSlottable);
|
|
25134
25291
|
if (slottable) {
|
|
25135
25292
|
const newElement = slottable.props.children;
|
|
25136
25293
|
const newChildren = childrenArray.map((child) => {
|
|
25137
25294
|
if (child === slottable) {
|
|
25138
|
-
if (
|
|
25139
|
-
return
|
|
25295
|
+
if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
|
|
25296
|
+
return React6.isValidElement(newElement) ? newElement.props.children : null;
|
|
25140
25297
|
} else {
|
|
25141
25298
|
return child;
|
|
25142
25299
|
}
|
|
25143
25300
|
});
|
|
25144
|
-
return /* @__PURE__ */ (0,
|
|
25301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
|
|
25145
25302
|
}
|
|
25146
|
-
return /* @__PURE__ */ (0,
|
|
25303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
25147
25304
|
});
|
|
25148
25305
|
Slot.displayName = "Slot";
|
|
25149
|
-
var SlotClone =
|
|
25306
|
+
var SlotClone = React6.forwardRef((props, forwardedRef) => {
|
|
25150
25307
|
const { children, ...slotProps } = props;
|
|
25151
|
-
if (
|
|
25308
|
+
if (React6.isValidElement(children)) {
|
|
25152
25309
|
const childrenRef = getElementRef(children);
|
|
25153
|
-
return
|
|
25310
|
+
return React6.cloneElement(children, {
|
|
25154
25311
|
...mergeProps(slotProps, children.props),
|
|
25155
25312
|
// @ts-ignore
|
|
25156
25313
|
ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
|
|
25157
25314
|
});
|
|
25158
25315
|
}
|
|
25159
|
-
return
|
|
25316
|
+
return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
|
|
25160
25317
|
});
|
|
25161
25318
|
SlotClone.displayName = "SlotClone";
|
|
25162
25319
|
var Slottable = ({ children }) => {
|
|
25163
|
-
return /* @__PURE__ */ (0,
|
|
25320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
25164
25321
|
};
|
|
25165
25322
|
function isSlottable(child) {
|
|
25166
|
-
return
|
|
25323
|
+
return React6.isValidElement(child) && child.type === Slottable;
|
|
25167
25324
|
}
|
|
25168
25325
|
function mergeProps(slotProps, childProps) {
|
|
25169
25326
|
const overrideProps = { ...childProps };
|
|
@@ -25203,7 +25360,7 @@ function getElementRef(element) {
|
|
|
25203
25360
|
}
|
|
25204
25361
|
|
|
25205
25362
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
25206
|
-
var
|
|
25363
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
25207
25364
|
function createCollection(name) {
|
|
25208
25365
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
25209
25366
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
|
|
@@ -25215,7 +25372,7 @@ function createCollection(name) {
|
|
|
25215
25372
|
const { scope, children } = props;
|
|
25216
25373
|
const ref = import_react159.default.useRef(null);
|
|
25217
25374
|
const itemMap = import_react159.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
25218
|
-
return /* @__PURE__ */ (0,
|
|
25375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
25219
25376
|
};
|
|
25220
25377
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
25221
25378
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -25224,7 +25381,7 @@ function createCollection(name) {
|
|
|
25224
25381
|
const { scope, children } = props;
|
|
25225
25382
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
25226
25383
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
25227
|
-
return /* @__PURE__ */ (0,
|
|
25384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Slot, { ref: composedRefs, children });
|
|
25228
25385
|
}
|
|
25229
25386
|
);
|
|
25230
25387
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -25240,7 +25397,7 @@ function createCollection(name) {
|
|
|
25240
25397
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
25241
25398
|
return () => void context.itemMap.delete(ref);
|
|
25242
25399
|
});
|
|
25243
|
-
return /* @__PURE__ */ (0,
|
|
25400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
25244
25401
|
}
|
|
25245
25402
|
);
|
|
25246
25403
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -25266,12 +25423,12 @@ function createCollection(name) {
|
|
|
25266
25423
|
}
|
|
25267
25424
|
|
|
25268
25425
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
25269
|
-
var
|
|
25426
|
+
var React11 = __toESM(require("react"), 1);
|
|
25270
25427
|
|
|
25271
25428
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
25272
|
-
var
|
|
25429
|
+
var React8 = __toESM(require("react"), 1);
|
|
25273
25430
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
25274
|
-
var
|
|
25431
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
25275
25432
|
var NODES = [
|
|
25276
25433
|
"a",
|
|
25277
25434
|
"button",
|
|
@@ -25291,13 +25448,13 @@ var NODES = [
|
|
|
25291
25448
|
"ul"
|
|
25292
25449
|
];
|
|
25293
25450
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
25294
|
-
const Node2 =
|
|
25451
|
+
const Node2 = React8.forwardRef((props, forwardedRef) => {
|
|
25295
25452
|
const { asChild, ...primitiveProps } = props;
|
|
25296
25453
|
const Comp = asChild ? Slot : node;
|
|
25297
25454
|
if (typeof window !== "undefined") {
|
|
25298
25455
|
window[Symbol.for("radix-ui")] = true;
|
|
25299
25456
|
}
|
|
25300
|
-
return /* @__PURE__ */ (0,
|
|
25457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
25301
25458
|
});
|
|
25302
25459
|
Node2.displayName = `Primitive.${node}`;
|
|
25303
25460
|
return { ...primitive, [node]: Node2 };
|
|
@@ -25307,20 +25464,20 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
25307
25464
|
}
|
|
25308
25465
|
|
|
25309
25466
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
25310
|
-
var
|
|
25467
|
+
var React9 = __toESM(require("react"), 1);
|
|
25311
25468
|
function useCallbackRef(callback) {
|
|
25312
|
-
const callbackRef =
|
|
25313
|
-
|
|
25469
|
+
const callbackRef = React9.useRef(callback);
|
|
25470
|
+
React9.useEffect(() => {
|
|
25314
25471
|
callbackRef.current = callback;
|
|
25315
25472
|
});
|
|
25316
|
-
return
|
|
25473
|
+
return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
25317
25474
|
}
|
|
25318
25475
|
|
|
25319
25476
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
25320
|
-
var
|
|
25477
|
+
var React10 = __toESM(require("react"), 1);
|
|
25321
25478
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
25322
25479
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
25323
|
-
|
|
25480
|
+
React10.useEffect(() => {
|
|
25324
25481
|
const handleKeyDown = (event) => {
|
|
25325
25482
|
if (event.key === "Escape") {
|
|
25326
25483
|
onEscapeKeyDown(event);
|
|
@@ -25332,18 +25489,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
25332
25489
|
}
|
|
25333
25490
|
|
|
25334
25491
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
25335
|
-
var
|
|
25492
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
25336
25493
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
25337
25494
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
25338
25495
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
25339
25496
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
25340
25497
|
var originalBodyPointerEvents;
|
|
25341
|
-
var DismissableLayerContext =
|
|
25498
|
+
var DismissableLayerContext = React11.createContext({
|
|
25342
25499
|
layers: /* @__PURE__ */ new Set(),
|
|
25343
25500
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
25344
25501
|
branches: /* @__PURE__ */ new Set()
|
|
25345
25502
|
});
|
|
25346
|
-
var DismissableLayer =
|
|
25503
|
+
var DismissableLayer = React11.forwardRef(
|
|
25347
25504
|
(props, forwardedRef) => {
|
|
25348
25505
|
const {
|
|
25349
25506
|
disableOutsidePointerEvents = false,
|
|
@@ -25354,10 +25511,10 @@ var DismissableLayer = React13.forwardRef(
|
|
|
25354
25511
|
onDismiss,
|
|
25355
25512
|
...layerProps
|
|
25356
25513
|
} = props;
|
|
25357
|
-
const context =
|
|
25358
|
-
const [node, setNode] =
|
|
25514
|
+
const context = React11.useContext(DismissableLayerContext);
|
|
25515
|
+
const [node, setNode] = React11.useState(null);
|
|
25359
25516
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
25360
|
-
const [, force] =
|
|
25517
|
+
const [, force] = React11.useState({});
|
|
25361
25518
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
25362
25519
|
const layers = Array.from(context.layers);
|
|
25363
25520
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -25390,7 +25547,7 @@ var DismissableLayer = React13.forwardRef(
|
|
|
25390
25547
|
onDismiss();
|
|
25391
25548
|
}
|
|
25392
25549
|
}, ownerDocument);
|
|
25393
|
-
|
|
25550
|
+
React11.useEffect(() => {
|
|
25394
25551
|
if (!node) return;
|
|
25395
25552
|
if (disableOutsidePointerEvents) {
|
|
25396
25553
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -25407,7 +25564,7 @@ var DismissableLayer = React13.forwardRef(
|
|
|
25407
25564
|
}
|
|
25408
25565
|
};
|
|
25409
25566
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
25410
|
-
|
|
25567
|
+
React11.useEffect(() => {
|
|
25411
25568
|
return () => {
|
|
25412
25569
|
if (!node) return;
|
|
25413
25570
|
context.layers.delete(node);
|
|
@@ -25415,12 +25572,12 @@ var DismissableLayer = React13.forwardRef(
|
|
|
25415
25572
|
dispatchUpdate();
|
|
25416
25573
|
};
|
|
25417
25574
|
}, [node, context]);
|
|
25418
|
-
|
|
25575
|
+
React11.useEffect(() => {
|
|
25419
25576
|
const handleUpdate = () => force({});
|
|
25420
25577
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
25421
25578
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
25422
25579
|
}, []);
|
|
25423
|
-
return /* @__PURE__ */ (0,
|
|
25580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
25424
25581
|
Primitive.div,
|
|
25425
25582
|
{
|
|
25426
25583
|
...layerProps,
|
|
@@ -25441,11 +25598,11 @@ var DismissableLayer = React13.forwardRef(
|
|
|
25441
25598
|
);
|
|
25442
25599
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
25443
25600
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
25444
|
-
var DismissableLayerBranch =
|
|
25445
|
-
const context =
|
|
25446
|
-
const ref =
|
|
25601
|
+
var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
|
|
25602
|
+
const context = React11.useContext(DismissableLayerContext);
|
|
25603
|
+
const ref = React11.useRef(null);
|
|
25447
25604
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
25448
|
-
|
|
25605
|
+
React11.useEffect(() => {
|
|
25449
25606
|
const node = ref.current;
|
|
25450
25607
|
if (node) {
|
|
25451
25608
|
context.branches.add(node);
|
|
@@ -25454,15 +25611,15 @@ var DismissableLayerBranch = React13.forwardRef((props, forwardedRef) => {
|
|
|
25454
25611
|
};
|
|
25455
25612
|
}
|
|
25456
25613
|
}, [context.branches]);
|
|
25457
|
-
return /* @__PURE__ */ (0,
|
|
25614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
|
25458
25615
|
});
|
|
25459
25616
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
25460
25617
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
25461
25618
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
25462
|
-
const isPointerInsideReactTreeRef =
|
|
25463
|
-
const handleClickRef =
|
|
25619
|
+
const isPointerInsideReactTreeRef = React11.useRef(false);
|
|
25620
|
+
const handleClickRef = React11.useRef(() => {
|
|
25464
25621
|
});
|
|
25465
|
-
|
|
25622
|
+
React11.useEffect(() => {
|
|
25466
25623
|
const handlePointerDown = (event) => {
|
|
25467
25624
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
25468
25625
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -25503,8 +25660,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
25503
25660
|
}
|
|
25504
25661
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
25505
25662
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
25506
|
-
const isFocusInsideReactTreeRef =
|
|
25507
|
-
|
|
25663
|
+
const isFocusInsideReactTreeRef = React11.useRef(false);
|
|
25664
|
+
React11.useEffect(() => {
|
|
25508
25665
|
const handleFocus = (event) => {
|
|
25509
25666
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
25510
25667
|
const eventDetail = { originalEvent: event };
|
|
@@ -25539,32 +25696,32 @@ var Root = DismissableLayer;
|
|
|
25539
25696
|
var Branch = DismissableLayerBranch;
|
|
25540
25697
|
|
|
25541
25698
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
25542
|
-
var
|
|
25699
|
+
var React13 = __toESM(require("react"), 1);
|
|
25543
25700
|
var import_react_dom10 = __toESM(require("react-dom"), 1);
|
|
25544
25701
|
|
|
25545
25702
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
25546
|
-
var
|
|
25547
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ?
|
|
25703
|
+
var React12 = __toESM(require("react"), 1);
|
|
25704
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React12.useLayoutEffect : () => {
|
|
25548
25705
|
};
|
|
25549
25706
|
|
|
25550
25707
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
25551
|
-
var
|
|
25708
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
25552
25709
|
var PORTAL_NAME = "Portal";
|
|
25553
|
-
var Portal =
|
|
25710
|
+
var Portal = React13.forwardRef((props, forwardedRef) => {
|
|
25554
25711
|
const { container: containerProp, ...portalProps } = props;
|
|
25555
|
-
const [mounted, setMounted] =
|
|
25712
|
+
const [mounted, setMounted] = React13.useState(false);
|
|
25556
25713
|
useLayoutEffect2(() => setMounted(true), []);
|
|
25557
25714
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
25558
|
-
return container ? import_react_dom10.default.createPortal(/* @__PURE__ */ (0,
|
|
25715
|
+
return container ? import_react_dom10.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
25559
25716
|
});
|
|
25560
25717
|
Portal.displayName = PORTAL_NAME;
|
|
25561
25718
|
|
|
25562
25719
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
25563
25720
|
var React22 = __toESM(require("react"), 1);
|
|
25564
25721
|
var ReactDOM3 = __toESM(require("react-dom"), 1);
|
|
25565
|
-
var
|
|
25722
|
+
var React14 = __toESM(require("react"), 1);
|
|
25566
25723
|
function useStateMachine(initialState3, machine) {
|
|
25567
|
-
return
|
|
25724
|
+
return React14.useReducer((state, event) => {
|
|
25568
25725
|
const nextState = machine[state][event];
|
|
25569
25726
|
return nextState ?? state;
|
|
25570
25727
|
}, initialState3);
|
|
@@ -25675,7 +25832,7 @@ function getElementRef2(element) {
|
|
|
25675
25832
|
}
|
|
25676
25833
|
|
|
25677
25834
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
25678
|
-
var
|
|
25835
|
+
var React15 = __toESM(require("react"), 1);
|
|
25679
25836
|
function useControllableState({
|
|
25680
25837
|
prop,
|
|
25681
25838
|
defaultProp,
|
|
@@ -25686,7 +25843,7 @@ function useControllableState({
|
|
|
25686
25843
|
const isControlled = prop !== void 0;
|
|
25687
25844
|
const value = isControlled ? prop : uncontrolledProp;
|
|
25688
25845
|
const handleChange = useCallbackRef(onChange);
|
|
25689
|
-
const setValue =
|
|
25846
|
+
const setValue = React15.useCallback(
|
|
25690
25847
|
(nextValue) => {
|
|
25691
25848
|
if (isControlled) {
|
|
25692
25849
|
const setter = nextValue;
|
|
@@ -25704,11 +25861,11 @@ function useUncontrolledState({
|
|
|
25704
25861
|
defaultProp,
|
|
25705
25862
|
onChange
|
|
25706
25863
|
}) {
|
|
25707
|
-
const uncontrolledState =
|
|
25864
|
+
const uncontrolledState = React15.useState(defaultProp);
|
|
25708
25865
|
const [value] = uncontrolledState;
|
|
25709
|
-
const prevValueRef =
|
|
25866
|
+
const prevValueRef = React15.useRef(value);
|
|
25710
25867
|
const handleChange = useCallbackRef(onChange);
|
|
25711
|
-
|
|
25868
|
+
React15.useEffect(() => {
|
|
25712
25869
|
if (prevValueRef.current !== value) {
|
|
25713
25870
|
handleChange(value);
|
|
25714
25871
|
prevValueRef.current = value;
|
|
@@ -25718,12 +25875,12 @@ function useUncontrolledState({
|
|
|
25718
25875
|
}
|
|
25719
25876
|
|
|
25720
25877
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
25721
|
-
var
|
|
25722
|
-
var
|
|
25878
|
+
var React16 = __toESM(require("react"), 1);
|
|
25879
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
25723
25880
|
var NAME = "VisuallyHidden";
|
|
25724
|
-
var VisuallyHidden =
|
|
25881
|
+
var VisuallyHidden = React16.forwardRef(
|
|
25725
25882
|
(props, forwardedRef) => {
|
|
25726
|
-
return /* @__PURE__ */ (0,
|
|
25883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
25727
25884
|
Primitive.span,
|
|
25728
25885
|
{
|
|
25729
25886
|
...props,
|
|
@@ -25749,7 +25906,7 @@ var VisuallyHidden = React18.forwardRef(
|
|
|
25749
25906
|
VisuallyHidden.displayName = NAME;
|
|
25750
25907
|
|
|
25751
25908
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
25752
|
-
var
|
|
25909
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
25753
25910
|
var PROVIDER_NAME = "ToastProvider";
|
|
25754
25911
|
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
|
25755
25912
|
var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
|
|
@@ -25763,16 +25920,16 @@ var ToastProvider = (props) => {
|
|
|
25763
25920
|
swipeThreshold = 50,
|
|
25764
25921
|
children
|
|
25765
25922
|
} = props;
|
|
25766
|
-
const [viewport, setViewport] =
|
|
25767
|
-
const [toastCount, setToastCount] =
|
|
25768
|
-
const isFocusedToastEscapeKeyDownRef =
|
|
25769
|
-
const isClosePausedRef =
|
|
25923
|
+
const [viewport, setViewport] = React17.useState(null);
|
|
25924
|
+
const [toastCount, setToastCount] = React17.useState(0);
|
|
25925
|
+
const isFocusedToastEscapeKeyDownRef = React17.useRef(false);
|
|
25926
|
+
const isClosePausedRef = React17.useRef(false);
|
|
25770
25927
|
if (!label.trim()) {
|
|
25771
25928
|
console.error(
|
|
25772
25929
|
`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`
|
|
25773
25930
|
);
|
|
25774
25931
|
}
|
|
25775
|
-
return /* @__PURE__ */ (0,
|
|
25932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Collection.Provider, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25776
25933
|
ToastProviderProvider,
|
|
25777
25934
|
{
|
|
25778
25935
|
scope: __scopeToast,
|
|
@@ -25783,8 +25940,8 @@ var ToastProvider = (props) => {
|
|
|
25783
25940
|
toastCount,
|
|
25784
25941
|
viewport,
|
|
25785
25942
|
onViewportChange: setViewport,
|
|
25786
|
-
onToastAdd:
|
|
25787
|
-
onToastRemove:
|
|
25943
|
+
onToastAdd: React17.useCallback(() => setToastCount((prevCount) => prevCount + 1), []),
|
|
25944
|
+
onToastRemove: React17.useCallback(() => setToastCount((prevCount) => prevCount - 1), []),
|
|
25788
25945
|
isFocusedToastEscapeKeyDownRef,
|
|
25789
25946
|
isClosePausedRef,
|
|
25790
25947
|
children
|
|
@@ -25796,7 +25953,7 @@ var VIEWPORT_NAME = "ToastViewport";
|
|
|
25796
25953
|
var VIEWPORT_DEFAULT_HOTKEY = ["F8"];
|
|
25797
25954
|
var VIEWPORT_PAUSE = "toast.viewportPause";
|
|
25798
25955
|
var VIEWPORT_RESUME = "toast.viewportResume";
|
|
25799
|
-
var ToastViewport =
|
|
25956
|
+
var ToastViewport = React17.forwardRef(
|
|
25800
25957
|
(props, forwardedRef) => {
|
|
25801
25958
|
const {
|
|
25802
25959
|
__scopeToast,
|
|
@@ -25806,14 +25963,14 @@ var ToastViewport = React19.forwardRef(
|
|
|
25806
25963
|
} = props;
|
|
25807
25964
|
const context = useToastProviderContext(VIEWPORT_NAME, __scopeToast);
|
|
25808
25965
|
const getItems = useCollection(__scopeToast);
|
|
25809
|
-
const wrapperRef =
|
|
25810
|
-
const headFocusProxyRef =
|
|
25811
|
-
const tailFocusProxyRef =
|
|
25812
|
-
const ref =
|
|
25966
|
+
const wrapperRef = React17.useRef(null);
|
|
25967
|
+
const headFocusProxyRef = React17.useRef(null);
|
|
25968
|
+
const tailFocusProxyRef = React17.useRef(null);
|
|
25969
|
+
const ref = React17.useRef(null);
|
|
25813
25970
|
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
25814
25971
|
const hotkeyLabel = hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
|
|
25815
25972
|
const hasToasts = context.toastCount > 0;
|
|
25816
|
-
|
|
25973
|
+
React17.useEffect(() => {
|
|
25817
25974
|
const handleKeyDown = (event) => {
|
|
25818
25975
|
const isHotkeyPressed = hotkey.every((key) => event[key] || event.code === key);
|
|
25819
25976
|
if (isHotkeyPressed) ref.current?.focus();
|
|
@@ -25821,7 +25978,7 @@ var ToastViewport = React19.forwardRef(
|
|
|
25821
25978
|
document.addEventListener("keydown", handleKeyDown);
|
|
25822
25979
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
25823
25980
|
}, [hotkey]);
|
|
25824
|
-
|
|
25981
|
+
React17.useEffect(() => {
|
|
25825
25982
|
const wrapper = wrapperRef.current;
|
|
25826
25983
|
const viewport = ref.current;
|
|
25827
25984
|
if (hasToasts && wrapper && viewport) {
|
|
@@ -25863,7 +26020,7 @@ var ToastViewport = React19.forwardRef(
|
|
|
25863
26020
|
};
|
|
25864
26021
|
}
|
|
25865
26022
|
}, [hasToasts, context.isClosePausedRef]);
|
|
25866
|
-
const getSortedTabbableCandidates =
|
|
26023
|
+
const getSortedTabbableCandidates = React17.useCallback(
|
|
25867
26024
|
({ tabbingDirection }) => {
|
|
25868
26025
|
const toastItems = getItems();
|
|
25869
26026
|
const tabbableCandidates = toastItems.map((toastItem) => {
|
|
@@ -25875,7 +26032,7 @@ var ToastViewport = React19.forwardRef(
|
|
|
25875
26032
|
},
|
|
25876
26033
|
[getItems]
|
|
25877
26034
|
);
|
|
25878
|
-
|
|
26035
|
+
React17.useEffect(() => {
|
|
25879
26036
|
const viewport = ref.current;
|
|
25880
26037
|
if (viewport) {
|
|
25881
26038
|
const handleKeyDown = (event) => {
|
|
@@ -25903,7 +26060,7 @@ var ToastViewport = React19.forwardRef(
|
|
|
25903
26060
|
return () => viewport.removeEventListener("keydown", handleKeyDown);
|
|
25904
26061
|
}
|
|
25905
26062
|
}, [getItems, getSortedTabbableCandidates]);
|
|
25906
|
-
return /* @__PURE__ */ (0,
|
|
26063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
25907
26064
|
Branch,
|
|
25908
26065
|
{
|
|
25909
26066
|
ref: wrapperRef,
|
|
@@ -25912,7 +26069,7 @@ var ToastViewport = React19.forwardRef(
|
|
|
25912
26069
|
tabIndex: -1,
|
|
25913
26070
|
style: { pointerEvents: hasToasts ? void 0 : "none" },
|
|
25914
26071
|
children: [
|
|
25915
|
-
hasToasts && /* @__PURE__ */ (0,
|
|
26072
|
+
hasToasts && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25916
26073
|
FocusProxy,
|
|
25917
26074
|
{
|
|
25918
26075
|
ref: headFocusProxyRef,
|
|
@@ -25924,8 +26081,8 @@ var ToastViewport = React19.forwardRef(
|
|
|
25924
26081
|
}
|
|
25925
26082
|
}
|
|
25926
26083
|
),
|
|
25927
|
-
/* @__PURE__ */ (0,
|
|
25928
|
-
hasToasts && /* @__PURE__ */ (0,
|
|
26084
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Collection.Slot, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }),
|
|
26085
|
+
hasToasts && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25929
26086
|
FocusProxy,
|
|
25930
26087
|
{
|
|
25931
26088
|
ref: tailFocusProxyRef,
|
|
@@ -25944,11 +26101,11 @@ var ToastViewport = React19.forwardRef(
|
|
|
25944
26101
|
);
|
|
25945
26102
|
ToastViewport.displayName = VIEWPORT_NAME;
|
|
25946
26103
|
var FOCUS_PROXY_NAME = "ToastFocusProxy";
|
|
25947
|
-
var FocusProxy =
|
|
26104
|
+
var FocusProxy = React17.forwardRef(
|
|
25948
26105
|
(props, forwardedRef) => {
|
|
25949
26106
|
const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
|
|
25950
26107
|
const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
|
|
25951
|
-
return /* @__PURE__ */ (0,
|
|
26108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25952
26109
|
VisuallyHidden,
|
|
25953
26110
|
{
|
|
25954
26111
|
"aria-hidden": true,
|
|
@@ -25971,7 +26128,7 @@ var TOAST_SWIPE_START = "toast.swipeStart";
|
|
|
25971
26128
|
var TOAST_SWIPE_MOVE = "toast.swipeMove";
|
|
25972
26129
|
var TOAST_SWIPE_CANCEL = "toast.swipeCancel";
|
|
25973
26130
|
var TOAST_SWIPE_END = "toast.swipeEnd";
|
|
25974
|
-
var Toast =
|
|
26131
|
+
var Toast = React17.forwardRef(
|
|
25975
26132
|
(props, forwardedRef) => {
|
|
25976
26133
|
const { forceMount, open: openProp, defaultOpen, onOpenChange, ...toastProps } = props;
|
|
25977
26134
|
const [open = true, setOpen] = useControllableState({
|
|
@@ -25979,7 +26136,7 @@ var Toast = React19.forwardRef(
|
|
|
25979
26136
|
defaultProp: defaultOpen,
|
|
25980
26137
|
onChange: onOpenChange
|
|
25981
26138
|
});
|
|
25982
|
-
return /* @__PURE__ */ (0,
|
|
26139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Presence, { present: forceMount || open, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25983
26140
|
ToastImpl,
|
|
25984
26141
|
{
|
|
25985
26142
|
open,
|
|
@@ -26022,7 +26179,7 @@ var [ToastInteractiveProvider, useToastInteractiveContext] = createToastContext(
|
|
|
26022
26179
|
onClose() {
|
|
26023
26180
|
}
|
|
26024
26181
|
});
|
|
26025
|
-
var ToastImpl =
|
|
26182
|
+
var ToastImpl = React17.forwardRef(
|
|
26026
26183
|
(props, forwardedRef) => {
|
|
26027
26184
|
const {
|
|
26028
26185
|
__scopeToast,
|
|
@@ -26040,21 +26197,21 @@ var ToastImpl = React19.forwardRef(
|
|
|
26040
26197
|
...toastProps
|
|
26041
26198
|
} = props;
|
|
26042
26199
|
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
|
26043
|
-
const [node, setNode] =
|
|
26200
|
+
const [node, setNode] = React17.useState(null);
|
|
26044
26201
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
26045
|
-
const pointerStartRef =
|
|
26046
|
-
const swipeDeltaRef =
|
|
26202
|
+
const pointerStartRef = React17.useRef(null);
|
|
26203
|
+
const swipeDeltaRef = React17.useRef(null);
|
|
26047
26204
|
const duration = durationProp || context.duration;
|
|
26048
|
-
const closeTimerStartTimeRef =
|
|
26049
|
-
const closeTimerRemainingTimeRef =
|
|
26050
|
-
const closeTimerRef =
|
|
26205
|
+
const closeTimerStartTimeRef = React17.useRef(0);
|
|
26206
|
+
const closeTimerRemainingTimeRef = React17.useRef(duration);
|
|
26207
|
+
const closeTimerRef = React17.useRef(0);
|
|
26051
26208
|
const { onToastAdd, onToastRemove } = context;
|
|
26052
26209
|
const handleClose = useCallbackRef(() => {
|
|
26053
26210
|
const isFocusInToast = node?.contains(document.activeElement);
|
|
26054
26211
|
if (isFocusInToast) context.viewport?.focus();
|
|
26055
26212
|
onClose();
|
|
26056
26213
|
});
|
|
26057
|
-
const startTimer =
|
|
26214
|
+
const startTimer = React17.useCallback(
|
|
26058
26215
|
(duration2) => {
|
|
26059
26216
|
if (!duration2 || duration2 === Infinity) return;
|
|
26060
26217
|
window.clearTimeout(closeTimerRef.current);
|
|
@@ -26063,7 +26220,7 @@ var ToastImpl = React19.forwardRef(
|
|
|
26063
26220
|
},
|
|
26064
26221
|
[handleClose]
|
|
26065
26222
|
);
|
|
26066
|
-
|
|
26223
|
+
React17.useEffect(() => {
|
|
26067
26224
|
const viewport = context.viewport;
|
|
26068
26225
|
if (viewport) {
|
|
26069
26226
|
const handleResume = () => {
|
|
@@ -26084,19 +26241,19 @@ var ToastImpl = React19.forwardRef(
|
|
|
26084
26241
|
};
|
|
26085
26242
|
}
|
|
26086
26243
|
}, [context.viewport, duration, onPause, onResume, startTimer]);
|
|
26087
|
-
|
|
26244
|
+
React17.useEffect(() => {
|
|
26088
26245
|
if (open && !context.isClosePausedRef.current) startTimer(duration);
|
|
26089
26246
|
}, [open, duration, context.isClosePausedRef, startTimer]);
|
|
26090
|
-
|
|
26247
|
+
React17.useEffect(() => {
|
|
26091
26248
|
onToastAdd();
|
|
26092
26249
|
return () => onToastRemove();
|
|
26093
26250
|
}, [onToastAdd, onToastRemove]);
|
|
26094
|
-
const announceTextContent =
|
|
26251
|
+
const announceTextContent = React17.useMemo(() => {
|
|
26095
26252
|
return node ? getAnnounceTextContent(node) : null;
|
|
26096
26253
|
}, [node]);
|
|
26097
26254
|
if (!context.viewport) return null;
|
|
26098
|
-
return /* @__PURE__ */ (0,
|
|
26099
|
-
announceTextContent && /* @__PURE__ */ (0,
|
|
26255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
26256
|
+
announceTextContent && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
26100
26257
|
ToastAnnounce,
|
|
26101
26258
|
{
|
|
26102
26259
|
__scopeToast,
|
|
@@ -26106,8 +26263,8 @@ var ToastImpl = React19.forwardRef(
|
|
|
26106
26263
|
children: announceTextContent
|
|
26107
26264
|
}
|
|
26108
26265
|
),
|
|
26109
|
-
/* @__PURE__ */ (0,
|
|
26110
|
-
/* @__PURE__ */ (0,
|
|
26266
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM4.createPortal(
|
|
26267
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Collection.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
26111
26268
|
Root,
|
|
26112
26269
|
{
|
|
26113
26270
|
asChild: true,
|
|
@@ -26115,7 +26272,7 @@ var ToastImpl = React19.forwardRef(
|
|
|
26115
26272
|
if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
|
|
26116
26273
|
context.isFocusedToastEscapeKeyDownRef.current = false;
|
|
26117
26274
|
}),
|
|
26118
|
-
children: /* @__PURE__ */ (0,
|
|
26275
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
26119
26276
|
Primitive.li,
|
|
26120
26277
|
{
|
|
26121
26278
|
role: "status",
|
|
@@ -26208,37 +26365,37 @@ var ToastImpl = React19.forwardRef(
|
|
|
26208
26365
|
var ToastAnnounce = (props) => {
|
|
26209
26366
|
const { __scopeToast, children, ...announceProps } = props;
|
|
26210
26367
|
const context = useToastProviderContext(TOAST_NAME, __scopeToast);
|
|
26211
|
-
const [renderAnnounceText, setRenderAnnounceText] =
|
|
26212
|
-
const [isAnnounced, setIsAnnounced] =
|
|
26368
|
+
const [renderAnnounceText, setRenderAnnounceText] = React17.useState(false);
|
|
26369
|
+
const [isAnnounced, setIsAnnounced] = React17.useState(false);
|
|
26213
26370
|
useNextFrame(() => setRenderAnnounceText(true));
|
|
26214
|
-
|
|
26371
|
+
React17.useEffect(() => {
|
|
26215
26372
|
const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
|
|
26216
26373
|
return () => window.clearTimeout(timer);
|
|
26217
26374
|
}, []);
|
|
26218
|
-
return isAnnounced ? null : /* @__PURE__ */ (0,
|
|
26375
|
+
return isAnnounced ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Portal, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
26219
26376
|
context.label,
|
|
26220
26377
|
" ",
|
|
26221
26378
|
children
|
|
26222
26379
|
] }) }) });
|
|
26223
26380
|
};
|
|
26224
26381
|
var TITLE_NAME = "ToastTitle";
|
|
26225
|
-
var ToastTitle =
|
|
26382
|
+
var ToastTitle = React17.forwardRef(
|
|
26226
26383
|
(props, forwardedRef) => {
|
|
26227
26384
|
const { __scopeToast, ...titleProps } = props;
|
|
26228
|
-
return /* @__PURE__ */ (0,
|
|
26385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Primitive.div, { ...titleProps, ref: forwardedRef });
|
|
26229
26386
|
}
|
|
26230
26387
|
);
|
|
26231
26388
|
ToastTitle.displayName = TITLE_NAME;
|
|
26232
26389
|
var DESCRIPTION_NAME = "ToastDescription";
|
|
26233
|
-
var ToastDescription =
|
|
26390
|
+
var ToastDescription = React17.forwardRef(
|
|
26234
26391
|
(props, forwardedRef) => {
|
|
26235
26392
|
const { __scopeToast, ...descriptionProps } = props;
|
|
26236
|
-
return /* @__PURE__ */ (0,
|
|
26393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Primitive.div, { ...descriptionProps, ref: forwardedRef });
|
|
26237
26394
|
}
|
|
26238
26395
|
);
|
|
26239
26396
|
ToastDescription.displayName = DESCRIPTION_NAME;
|
|
26240
26397
|
var ACTION_NAME = "ToastAction";
|
|
26241
|
-
var ToastAction =
|
|
26398
|
+
var ToastAction = React17.forwardRef(
|
|
26242
26399
|
(props, forwardedRef) => {
|
|
26243
26400
|
const { altText, ...actionProps } = props;
|
|
26244
26401
|
if (!altText.trim()) {
|
|
@@ -26247,16 +26404,16 @@ var ToastAction = React19.forwardRef(
|
|
|
26247
26404
|
);
|
|
26248
26405
|
return null;
|
|
26249
26406
|
}
|
|
26250
|
-
return /* @__PURE__ */ (0,
|
|
26407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ToastAnnounceExclude, { altText, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ToastClose, { ...actionProps, ref: forwardedRef }) });
|
|
26251
26408
|
}
|
|
26252
26409
|
);
|
|
26253
26410
|
ToastAction.displayName = ACTION_NAME;
|
|
26254
26411
|
var CLOSE_NAME = "ToastClose";
|
|
26255
|
-
var ToastClose =
|
|
26412
|
+
var ToastClose = React17.forwardRef(
|
|
26256
26413
|
(props, forwardedRef) => {
|
|
26257
26414
|
const { __scopeToast, ...closeProps } = props;
|
|
26258
26415
|
const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
|
|
26259
|
-
return /* @__PURE__ */ (0,
|
|
26416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ToastAnnounceExclude, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
26260
26417
|
Primitive.button,
|
|
26261
26418
|
{
|
|
26262
26419
|
type: "button",
|
|
@@ -26268,9 +26425,9 @@ var ToastClose = React19.forwardRef(
|
|
|
26268
26425
|
}
|
|
26269
26426
|
);
|
|
26270
26427
|
ToastClose.displayName = CLOSE_NAME;
|
|
26271
|
-
var ToastAnnounceExclude =
|
|
26428
|
+
var ToastAnnounceExclude = React17.forwardRef((props, forwardedRef) => {
|
|
26272
26429
|
const { __scopeToast, altText, ...announceExcludeProps } = props;
|
|
26273
|
-
return /* @__PURE__ */ (0,
|
|
26430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
26274
26431
|
Primitive.div,
|
|
26275
26432
|
{
|
|
26276
26433
|
"data-radix-toast-announce-exclude": "",
|
|
@@ -26376,6 +26533,8 @@ var Toast_default = {
|
|
|
26376
26533
|
};
|
|
26377
26534
|
|
|
26378
26535
|
// src/components/Toast.tsx
|
|
26536
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
26537
|
+
var import_react161 = require("react");
|
|
26379
26538
|
var icons = {
|
|
26380
26539
|
info: Icons.Info,
|
|
26381
26540
|
error: Icons.Alert
|
|
@@ -26390,13 +26549,22 @@ function Toast2({
|
|
|
26390
26549
|
children,
|
|
26391
26550
|
...props
|
|
26392
26551
|
}) {
|
|
26393
|
-
return /* @__PURE__ */
|
|
26552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Root2, { ...props, className: (0, import_classnames41.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
26553
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { className: Toast_default.icon, size: "md", children: variant && (0, import_react160.createElement)(icons[variant]) }),
|
|
26554
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToastTitle, { className: Toast_default.title, children: title }),
|
|
26555
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToastDescription, { className: Toast_default.description, children: description }),
|
|
26556
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToastAction, { className: Toast_default.action, altText: actionText || "Action", asChild: true, children }),
|
|
26557
|
+
!children && allowClose && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToastClose, { className: Toast_default.close, "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { size: "sm", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icons.Close, {}) }) })
|
|
26558
|
+
] });
|
|
26394
26559
|
}
|
|
26395
26560
|
function Toaster(props) {
|
|
26396
26561
|
const { toasts } = useToast();
|
|
26397
|
-
return /* @__PURE__ */
|
|
26398
|
-
|
|
26399
|
-
|
|
26562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
26563
|
+
toasts.map(({ id, message, props: props2 }) => {
|
|
26564
|
+
return /* @__PURE__ */ (0, import_react161.createElement)(Toast2, { ...props2, key: id, description: message });
|
|
26565
|
+
}),
|
|
26566
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Viewport, { className: Toast_default.viewport, ...props })
|
|
26567
|
+
] });
|
|
26400
26568
|
}
|
|
26401
26569
|
|
|
26402
26570
|
// src/components/Toggle.tsx
|
|
@@ -26408,18 +26576,19 @@ var Toggle_default = {
|
|
|
26408
26576
|
};
|
|
26409
26577
|
|
|
26410
26578
|
// src/components/Toggle.tsx
|
|
26579
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
26411
26580
|
function Toggle({ children, className, ...props }) {
|
|
26412
|
-
return /* @__PURE__ */
|
|
26581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)($efde0372d7a700fe$export$d2b052e7b4be1756, { ...props, className: (0, import_classnames42.default)(Toggle_default.toggle, className), children });
|
|
26413
26582
|
}
|
|
26414
26583
|
|
|
26415
26584
|
// src/components/ToggleGroup.tsx
|
|
26416
26585
|
var import_classnames43 = __toESM(require_classnames());
|
|
26417
26586
|
|
|
26418
26587
|
// node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
26419
|
-
var
|
|
26588
|
+
var import_react164 = __toESM(require("react"), 1);
|
|
26420
26589
|
|
|
26421
26590
|
// node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
26422
|
-
var
|
|
26591
|
+
var import_react162 = require("react");
|
|
26423
26592
|
var $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
26424
26593
|
var $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
26425
26594
|
bubbles: false,
|
|
@@ -26431,18 +26600,18 @@ var [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$expo
|
|
|
26431
26600
|
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
26432
26601
|
]);
|
|
26433
26602
|
var [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
26434
|
-
var $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ (0,
|
|
26435
|
-
return /* @__PURE__ */ (0,
|
|
26603
|
+
var $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ (0, import_react162.forwardRef)((props, forwardedRef) => {
|
|
26604
|
+
return /* @__PURE__ */ (0, import_react162.createElement)($d7bdfb9eb0fdf311$var$Collection.Provider, {
|
|
26436
26605
|
scope: props.__scopeRovingFocusGroup
|
|
26437
|
-
}, /* @__PURE__ */ (0,
|
|
26606
|
+
}, /* @__PURE__ */ (0, import_react162.createElement)($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
26438
26607
|
scope: props.__scopeRovingFocusGroup
|
|
26439
|
-
}, /* @__PURE__ */ (0,
|
|
26608
|
+
}, /* @__PURE__ */ (0, import_react162.createElement)($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
26440
26609
|
ref: forwardedRef
|
|
26441
26610
|
}))));
|
|
26442
26611
|
});
|
|
26443
|
-
var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0,
|
|
26612
|
+
var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_react162.forwardRef)((props, forwardedRef) => {
|
|
26444
26613
|
const { __scopeRovingFocusGroup, orientation, loop = false, dir, currentTabStopId: currentTabStopIdProp, defaultCurrentTabStopId, onCurrentTabStopIdChange, onEntryFocus, ...groupProps } = props;
|
|
26445
|
-
const ref = (0,
|
|
26614
|
+
const ref = (0, import_react162.useRef)(null);
|
|
26446
26615
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
26447
26616
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
26448
26617
|
const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -26450,12 +26619,12 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
26450
26619
|
defaultProp: defaultCurrentTabStopId,
|
|
26451
26620
|
onChange: onCurrentTabStopIdChange
|
|
26452
26621
|
});
|
|
26453
|
-
const [isTabbingBackOut, setIsTabbingBackOut] = (0,
|
|
26622
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = (0, import_react162.useState)(false);
|
|
26454
26623
|
const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus);
|
|
26455
26624
|
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
26456
|
-
const isClickFocusRef = (0,
|
|
26457
|
-
const [focusableItemsCount, setFocusableItemsCount] = (0,
|
|
26458
|
-
(0,
|
|
26625
|
+
const isClickFocusRef = (0, import_react162.useRef)(false);
|
|
26626
|
+
const [focusableItemsCount, setFocusableItemsCount] = (0, import_react162.useState)(0);
|
|
26627
|
+
(0, import_react162.useEffect)(() => {
|
|
26459
26628
|
const node = ref.current;
|
|
26460
26629
|
if (node) {
|
|
26461
26630
|
node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -26464,35 +26633,35 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
26464
26633
|
}, [
|
|
26465
26634
|
handleEntryFocus
|
|
26466
26635
|
]);
|
|
26467
|
-
return /* @__PURE__ */ (0,
|
|
26636
|
+
return /* @__PURE__ */ (0, import_react162.createElement)($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
|
|
26468
26637
|
scope: __scopeRovingFocusGroup,
|
|
26469
26638
|
orientation,
|
|
26470
26639
|
dir: direction,
|
|
26471
26640
|
loop,
|
|
26472
26641
|
currentTabStopId,
|
|
26473
|
-
onItemFocus: (0,
|
|
26642
|
+
onItemFocus: (0, import_react162.useCallback)(
|
|
26474
26643
|
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
26475
26644
|
[
|
|
26476
26645
|
setCurrentTabStopId
|
|
26477
26646
|
]
|
|
26478
26647
|
),
|
|
26479
|
-
onItemShiftTab: (0,
|
|
26648
|
+
onItemShiftTab: (0, import_react162.useCallback)(
|
|
26480
26649
|
() => setIsTabbingBackOut(true),
|
|
26481
26650
|
[]
|
|
26482
26651
|
),
|
|
26483
|
-
onFocusableItemAdd: (0,
|
|
26652
|
+
onFocusableItemAdd: (0, import_react162.useCallback)(
|
|
26484
26653
|
() => setFocusableItemsCount(
|
|
26485
26654
|
(prevCount) => prevCount + 1
|
|
26486
26655
|
),
|
|
26487
26656
|
[]
|
|
26488
26657
|
),
|
|
26489
|
-
onFocusableItemRemove: (0,
|
|
26658
|
+
onFocusableItemRemove: (0, import_react162.useCallback)(
|
|
26490
26659
|
() => setFocusableItemsCount(
|
|
26491
26660
|
(prevCount) => prevCount - 1
|
|
26492
26661
|
),
|
|
26493
26662
|
[]
|
|
26494
26663
|
)
|
|
26495
|
-
}, /* @__PURE__ */ (0,
|
|
26664
|
+
}, /* @__PURE__ */ (0, import_react162.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
26496
26665
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
26497
26666
|
"data-orientation": orientation
|
|
26498
26667
|
}, groupProps, {
|
|
@@ -26539,7 +26708,7 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
26539
26708
|
})));
|
|
26540
26709
|
});
|
|
26541
26710
|
var $d7bdfb9eb0fdf311$var$ITEM_NAME = "RovingFocusGroupItem";
|
|
26542
|
-
var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0,
|
|
26711
|
+
var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react162.forwardRef)((props, forwardedRef) => {
|
|
26543
26712
|
const { __scopeRovingFocusGroup, focusable = true, active = false, tabStopId, ...itemProps } = props;
|
|
26544
26713
|
const autoId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
26545
26714
|
const id = tabStopId || autoId;
|
|
@@ -26547,7 +26716,7 @@ var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react1
|
|
|
26547
26716
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
26548
26717
|
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
26549
26718
|
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
26550
|
-
(0,
|
|
26719
|
+
(0, import_react162.useEffect)(() => {
|
|
26551
26720
|
if (focusable) {
|
|
26552
26721
|
onFocusableItemAdd();
|
|
26553
26722
|
return () => onFocusableItemRemove();
|
|
@@ -26557,12 +26726,12 @@ var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react1
|
|
|
26557
26726
|
onFocusableItemAdd,
|
|
26558
26727
|
onFocusableItemRemove
|
|
26559
26728
|
]);
|
|
26560
|
-
return /* @__PURE__ */ (0,
|
|
26729
|
+
return /* @__PURE__ */ (0, import_react162.createElement)($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
|
|
26561
26730
|
scope: __scopeRovingFocusGroup,
|
|
26562
26731
|
id,
|
|
26563
26732
|
focusable,
|
|
26564
26733
|
active
|
|
26565
|
-
}, /* @__PURE__ */ (0,
|
|
26734
|
+
}, /* @__PURE__ */ (0, import_react162.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
26566
26735
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
26567
26736
|
"data-orientation": context.orientation
|
|
26568
26737
|
}, itemProps, {
|
|
@@ -26646,15 +26815,15 @@ var $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c
|
|
|
26646
26815
|
var $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
|
|
26647
26816
|
|
|
26648
26817
|
// node_modules/@radix-ui/react-toggle/dist/index.mjs
|
|
26649
|
-
var
|
|
26650
|
-
var $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ (0,
|
|
26818
|
+
var import_react163 = require("react");
|
|
26819
|
+
var $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ (0, import_react163.forwardRef)((props, forwardedRef) => {
|
|
26651
26820
|
const { pressed: pressedProp, defaultPressed = false, onPressedChange, ...buttonProps } = props;
|
|
26652
26821
|
const [pressed = false, setPressed] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
26653
26822
|
prop: pressedProp,
|
|
26654
26823
|
onChange: onPressedChange,
|
|
26655
26824
|
defaultProp: defaultPressed
|
|
26656
26825
|
});
|
|
26657
|
-
return /* @__PURE__ */ (0,
|
|
26826
|
+
return /* @__PURE__ */ (0, import_react163.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
26658
26827
|
type: "button",
|
|
26659
26828
|
"aria-pressed": pressed,
|
|
26660
26829
|
"data-state": pressed ? "on" : "off",
|
|
@@ -26673,24 +26842,24 @@ var [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1
|
|
|
26673
26842
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
26674
26843
|
]);
|
|
26675
26844
|
var $6c1fd9e6a8969628$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
26676
|
-
var $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */
|
|
26845
|
+
var $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26677
26846
|
const { type, ...toggleGroupProps } = props;
|
|
26678
26847
|
if (type === "single") {
|
|
26679
26848
|
const singleProps = toggleGroupProps;
|
|
26680
|
-
return /* @__PURE__ */
|
|
26849
|
+
return /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle, _extends({}, singleProps, {
|
|
26681
26850
|
ref: forwardedRef
|
|
26682
26851
|
}));
|
|
26683
26852
|
}
|
|
26684
26853
|
if (type === "multiple") {
|
|
26685
26854
|
const multipleProps = toggleGroupProps;
|
|
26686
|
-
return /* @__PURE__ */
|
|
26855
|
+
return /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple, _extends({}, multipleProps, {
|
|
26687
26856
|
ref: forwardedRef
|
|
26688
26857
|
}));
|
|
26689
26858
|
}
|
|
26690
26859
|
throw new Error(`Missing prop \`type\` expected on \`${$6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME}\``);
|
|
26691
26860
|
});
|
|
26692
26861
|
var [$6c1fd9e6a8969628$var$ToggleGroupValueProvider, $6c1fd9e6a8969628$var$useToggleGroupValueContext] = $6c1fd9e6a8969628$var$createToggleGroupContext($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME);
|
|
26693
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */
|
|
26862
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26694
26863
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
26695
26864
|
}, ...toggleGroupSingleProps } = props;
|
|
26696
26865
|
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -26698,24 +26867,24 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ import_react16
|
|
|
26698
26867
|
defaultProp: defaultValue,
|
|
26699
26868
|
onChange: onValueChange
|
|
26700
26869
|
});
|
|
26701
|
-
return /* @__PURE__ */
|
|
26870
|
+
return /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupValueProvider, {
|
|
26702
26871
|
scope: props.__scopeToggleGroup,
|
|
26703
26872
|
type: "single",
|
|
26704
26873
|
value: value ? [
|
|
26705
26874
|
value
|
|
26706
26875
|
] : [],
|
|
26707
26876
|
onItemActivate: setValue,
|
|
26708
|
-
onItemDeactivate:
|
|
26877
|
+
onItemDeactivate: import_react164.default.useCallback(
|
|
26709
26878
|
() => setValue(""),
|
|
26710
26879
|
[
|
|
26711
26880
|
setValue
|
|
26712
26881
|
]
|
|
26713
26882
|
)
|
|
26714
|
-
}, /* @__PURE__ */
|
|
26883
|
+
}, /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, _extends({}, toggleGroupSingleProps, {
|
|
26715
26884
|
ref: forwardedRef
|
|
26716
26885
|
})));
|
|
26717
26886
|
});
|
|
26718
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */
|
|
26887
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26719
26888
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
26720
26889
|
}, ...toggleGroupMultipleProps } = props;
|
|
26721
26890
|
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -26723,7 +26892,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
26723
26892
|
defaultProp: defaultValue,
|
|
26724
26893
|
onChange: onValueChange
|
|
26725
26894
|
});
|
|
26726
|
-
const handleButtonActivate =
|
|
26895
|
+
const handleButtonActivate = import_react164.default.useCallback(
|
|
26727
26896
|
(itemValue) => setValue(
|
|
26728
26897
|
(prevValue = []) => [
|
|
26729
26898
|
...prevValue,
|
|
@@ -26734,7 +26903,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
26734
26903
|
setValue
|
|
26735
26904
|
]
|
|
26736
26905
|
);
|
|
26737
|
-
const handleButtonDeactivate =
|
|
26906
|
+
const handleButtonDeactivate = import_react164.default.useCallback(
|
|
26738
26907
|
(itemValue) => setValue(
|
|
26739
26908
|
(prevValue = []) => prevValue.filter(
|
|
26740
26909
|
(value) => value !== itemValue
|
|
@@ -26744,18 +26913,18 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
26744
26913
|
setValue
|
|
26745
26914
|
]
|
|
26746
26915
|
);
|
|
26747
|
-
return /* @__PURE__ */
|
|
26916
|
+
return /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupValueProvider, {
|
|
26748
26917
|
scope: props.__scopeToggleGroup,
|
|
26749
26918
|
type: "multiple",
|
|
26750
26919
|
value: value1,
|
|
26751
26920
|
onItemActivate: handleButtonActivate,
|
|
26752
26921
|
onItemDeactivate: handleButtonDeactivate
|
|
26753
|
-
}, /* @__PURE__ */
|
|
26922
|
+
}, /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, _extends({}, toggleGroupMultipleProps, {
|
|
26754
26923
|
ref: forwardedRef
|
|
26755
26924
|
})));
|
|
26756
26925
|
});
|
|
26757
26926
|
var [$6c1fd9e6a8969628$var$ToggleGroupContext, $6c1fd9e6a8969628$var$useToggleGroupContext] = $6c1fd9e6a8969628$var$createToggleGroupContext($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME);
|
|
26758
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */
|
|
26927
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26759
26928
|
const { __scopeToggleGroup, disabled = false, rovingFocus = true, orientation, dir, loop = true, ...toggleGroupProps } = props;
|
|
26760
26929
|
const rovingFocusGroupScope = $6c1fd9e6a8969628$var$useRovingFocusGroupScope(__scopeToggleGroup);
|
|
26761
26930
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
@@ -26764,24 +26933,24 @@ var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ import_react163.defa
|
|
|
26764
26933
|
dir: direction,
|
|
26765
26934
|
...toggleGroupProps
|
|
26766
26935
|
};
|
|
26767
|
-
return /* @__PURE__ */
|
|
26936
|
+
return /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupContext, {
|
|
26768
26937
|
scope: __scopeToggleGroup,
|
|
26769
26938
|
rovingFocus,
|
|
26770
26939
|
disabled
|
|
26771
|
-
}, rovingFocus ? /* @__PURE__ */
|
|
26940
|
+
}, rovingFocus ? /* @__PURE__ */ import_react164.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
|
|
26772
26941
|
asChild: true
|
|
26773
26942
|
}, rovingFocusGroupScope, {
|
|
26774
26943
|
orientation,
|
|
26775
26944
|
dir: direction,
|
|
26776
26945
|
loop
|
|
26777
|
-
}), /* @__PURE__ */
|
|
26946
|
+
}), /* @__PURE__ */ import_react164.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, commonProps, {
|
|
26778
26947
|
ref: forwardedRef
|
|
26779
|
-
}))) : /* @__PURE__ */
|
|
26948
|
+
}))) : /* @__PURE__ */ import_react164.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, commonProps, {
|
|
26780
26949
|
ref: forwardedRef
|
|
26781
26950
|
})));
|
|
26782
26951
|
});
|
|
26783
26952
|
var $6c1fd9e6a8969628$var$ITEM_NAME = "ToggleGroupItem";
|
|
26784
|
-
var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */
|
|
26953
|
+
var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26785
26954
|
const valueContext = $6c1fd9e6a8969628$var$useToggleGroupValueContext($6c1fd9e6a8969628$var$ITEM_NAME, props.__scopeToggleGroup);
|
|
26786
26955
|
const context = $6c1fd9e6a8969628$var$useToggleGroupContext($6c1fd9e6a8969628$var$ITEM_NAME, props.__scopeToggleGroup);
|
|
26787
26956
|
const rovingFocusGroupScope = $6c1fd9e6a8969628$var$useRovingFocusGroupScope(props.__scopeToggleGroup);
|
|
@@ -26792,20 +26961,20 @@ var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ import_react163.
|
|
|
26792
26961
|
pressed,
|
|
26793
26962
|
disabled
|
|
26794
26963
|
};
|
|
26795
|
-
const ref =
|
|
26796
|
-
return context.rovingFocus ? /* @__PURE__ */
|
|
26964
|
+
const ref = import_react164.default.useRef(null);
|
|
26965
|
+
return context.rovingFocus ? /* @__PURE__ */ import_react164.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
|
|
26797
26966
|
asChild: true
|
|
26798
26967
|
}, rovingFocusGroupScope, {
|
|
26799
26968
|
focusable: !disabled,
|
|
26800
26969
|
active: pressed,
|
|
26801
26970
|
ref
|
|
26802
|
-
}), /* @__PURE__ */
|
|
26971
|
+
}), /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, _extends({}, commonProps, {
|
|
26803
26972
|
ref: forwardedRef
|
|
26804
|
-
}))) : /* @__PURE__ */
|
|
26973
|
+
}))) : /* @__PURE__ */ import_react164.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, _extends({}, commonProps, {
|
|
26805
26974
|
ref: forwardedRef
|
|
26806
26975
|
}));
|
|
26807
26976
|
});
|
|
26808
|
-
var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */
|
|
26977
|
+
var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ import_react164.default.forwardRef((props, forwardedRef) => {
|
|
26809
26978
|
const { __scopeToggleGroup, value, ...itemProps } = props;
|
|
26810
26979
|
const valueContext = $6c1fd9e6a8969628$var$useToggleGroupValueContext($6c1fd9e6a8969628$var$ITEM_NAME, __scopeToggleGroup);
|
|
26811
26980
|
const singleProps = {
|
|
@@ -26814,7 +26983,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ import_react163.
|
|
|
26814
26983
|
"aria-pressed": void 0
|
|
26815
26984
|
};
|
|
26816
26985
|
const typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
26817
|
-
return /* @__PURE__ */
|
|
26986
|
+
return /* @__PURE__ */ import_react164.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813, _extends({}, typeProps, itemProps, {
|
|
26818
26987
|
ref: forwardedRef,
|
|
26819
26988
|
onPressedChange: (pressed) => {
|
|
26820
26989
|
if (pressed) valueContext.onItemActivate(value);
|
|
@@ -26830,11 +26999,12 @@ var ToggleGroup_default = {
|
|
|
26830
26999
|
};
|
|
26831
27000
|
|
|
26832
27001
|
// src/components/ToggleGroup.tsx
|
|
26833
|
-
|
|
26834
|
-
|
|
27002
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
27003
|
+
function ToggleGroup({ className, children, ...props }) {
|
|
27004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)($6c1fd9e6a8969628$export$af3ec21f6cfb5e30, { ...props, className: (0, import_classnames43.default)(ToggleGroup_default.group, className), children });
|
|
26835
27005
|
}
|
|
26836
|
-
function
|
|
26837
|
-
return /* @__PURE__ */
|
|
27006
|
+
function ToggleGroupItem({ className, children, ...props }) {
|
|
27007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)($6c1fd9e6a8969628$export$b453109e13abe10b, { ...props, className: (0, import_classnames43.default)(ToggleGroup_default.item, className), children });
|
|
26838
27008
|
}
|
|
26839
27009
|
|
|
26840
27010
|
// src/components/Tooltip.tsx
|
|
@@ -26848,14 +27018,22 @@ var Tooltip_default = {
|
|
|
26848
27018
|
};
|
|
26849
27019
|
|
|
26850
27020
|
// src/components/Tooltip.tsx
|
|
26851
|
-
|
|
26852
|
-
|
|
27021
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
27022
|
+
function Tooltip({ children, className, ...props }) {
|
|
27023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: (0, import_classnames44.default)(Tooltip_default.tooltip, className), children: [
|
|
27024
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)($44f671af83e7d9e0$export$746d02f47f4d381, { className: Tooltip_default.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
27025
|
+
children
|
|
27026
|
+
] });
|
|
26853
27027
|
}
|
|
26854
27028
|
|
|
26855
27029
|
// src/components/ZenProvider.tsx
|
|
27030
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
26856
27031
|
function ZenProvider({ config = {}, children }) {
|
|
26857
27032
|
const { toast: toast2 } = config;
|
|
26858
|
-
return /* @__PURE__ */
|
|
27033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ToastProvider, { ...toast2, children: [
|
|
27034
|
+
children,
|
|
27035
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Toaster, {})
|
|
27036
|
+
] });
|
|
26859
27037
|
}
|
|
26860
27038
|
/*! Bundled license information:
|
|
26861
27039
|
|