@umami/react-zen 0.10.0 → 0.11.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.css +199 -0
- package/dist/index.d.ts +26 -1
- package/dist/index.js +1371 -260
- package/dist/index.mjs +1294 -183
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -113,7 +113,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
113
113
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
114
114
|
}
|
|
115
115
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
116
|
-
var
|
|
116
|
+
var useState15 = React19.useState, useEffect11 = React19.useEffect, useLayoutEffect3 = React19.useLayoutEffect, useDebugValue2 = React19.useDebugValue;
|
|
117
117
|
var didWarnOld18Alpha = false;
|
|
118
118
|
var didWarnUncachedGetSnapshot = false;
|
|
119
119
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -135,7 +135,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
var _useState =
|
|
138
|
+
var _useState = useState15({
|
|
139
139
|
inst: {
|
|
140
140
|
value,
|
|
141
141
|
getSnapshot
|
|
@@ -213,7 +213,7 @@ var require_classnames = __commonJS({
|
|
|
213
213
|
(function() {
|
|
214
214
|
"use strict";
|
|
215
215
|
var hasOwn = {}.hasOwnProperty;
|
|
216
|
-
function
|
|
216
|
+
function classNames50() {
|
|
217
217
|
var classes = "";
|
|
218
218
|
for (var i = 0; i < arguments.length; i++) {
|
|
219
219
|
var arg = arguments[i];
|
|
@@ -231,7 +231,7 @@ var require_classnames = __commonJS({
|
|
|
231
231
|
return "";
|
|
232
232
|
}
|
|
233
233
|
if (Array.isArray(arg)) {
|
|
234
|
-
return
|
|
234
|
+
return classNames50.apply(null, arg);
|
|
235
235
|
}
|
|
236
236
|
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
237
237
|
return arg.toString();
|
|
@@ -254,14 +254,14 @@ var require_classnames = __commonJS({
|
|
|
254
254
|
return value + newClass;
|
|
255
255
|
}
|
|
256
256
|
if (typeof module !== "undefined" && module.exports) {
|
|
257
|
-
|
|
258
|
-
module.exports =
|
|
257
|
+
classNames50.default = classNames50;
|
|
258
|
+
module.exports = classNames50;
|
|
259
259
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
260
260
|
define("classnames", [], function() {
|
|
261
|
-
return
|
|
261
|
+
return classNames50;
|
|
262
262
|
});
|
|
263
263
|
} else {
|
|
264
|
-
window.classNames =
|
|
264
|
+
window.classNames = classNames50;
|
|
265
265
|
}
|
|
266
266
|
})();
|
|
267
267
|
}
|
|
@@ -344,9 +344,9 @@ var require_with_selector_development = __commonJS({
|
|
|
344
344
|
}
|
|
345
345
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
346
346
|
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
347
|
-
var
|
|
347
|
+
var useRef8 = React19.useRef, useEffect11 = React19.useEffect, useMemo4 = React19.useMemo, useDebugValue2 = React19.useDebugValue;
|
|
348
348
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
349
|
-
var instRef =
|
|
349
|
+
var instRef = useRef8(null);
|
|
350
350
|
var inst;
|
|
351
351
|
if (instRef.current === null) {
|
|
352
352
|
inst = {
|
|
@@ -25849,6 +25849,11 @@ var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.redu
|
|
|
25849
25849
|
[node]: Node2
|
|
25850
25850
|
};
|
|
25851
25851
|
}, {});
|
|
25852
|
+
function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
25853
|
+
if (target) $4q5Fq$flushSync(
|
|
25854
|
+
() => target.dispatchEvent(event)
|
|
25855
|
+
);
|
|
25856
|
+
}
|
|
25852
25857
|
|
|
25853
25858
|
// node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
25854
25859
|
import { forwardRef as $73KQ4$forwardRef, createElement as $73KQ4$createElement, useCallback as $73KQ4$useCallback, useState as $73KQ4$useState, useRef as $73KQ4$useRef, useEffect as $73KQ4$useEffect } from "react";
|
|
@@ -26959,9 +26964,57 @@ function Heading({ size = 5, className, children, asChild, ...props }) {
|
|
|
26959
26964
|
);
|
|
26960
26965
|
}
|
|
26961
26966
|
|
|
26967
|
+
// src/components/HoverTrigger.tsx
|
|
26968
|
+
import { cloneElement as cloneElement3, useRef as useRef2, useState as useState6 } from "react";
|
|
26969
|
+
|
|
26970
|
+
// src/components/HoverTrigger.module.css
|
|
26971
|
+
var HoverTrigger_default = {
|
|
26972
|
+
wrapper: "HoverTrigger_wrapper"
|
|
26973
|
+
};
|
|
26974
|
+
|
|
26975
|
+
// src/components/HoverTrigger.tsx
|
|
26976
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
26977
|
+
var CLOSE_DELAY = 500;
|
|
26978
|
+
function HoverTrigger({ closeDelay = CLOSE_DELAY, children }) {
|
|
26979
|
+
const [triggerElement, popupElement] = children;
|
|
26980
|
+
const [show, setShow] = useState6(false);
|
|
26981
|
+
const overMenu = useRef2(false);
|
|
26982
|
+
const handleHoverStart = () => {
|
|
26983
|
+
overMenu.current = false;
|
|
26984
|
+
setShow(true);
|
|
26985
|
+
};
|
|
26986
|
+
const handleHoverEnd = () => {
|
|
26987
|
+
setTimeout(() => {
|
|
26988
|
+
if (!overMenu.current) {
|
|
26989
|
+
setShow(false);
|
|
26990
|
+
overMenu.current = false;
|
|
26991
|
+
}
|
|
26992
|
+
}, closeDelay);
|
|
26993
|
+
};
|
|
26994
|
+
const handleMenuEnter = () => {
|
|
26995
|
+
overMenu.current = true;
|
|
26996
|
+
};
|
|
26997
|
+
const handleMenuLeave = () => {
|
|
26998
|
+
overMenu.current = false;
|
|
26999
|
+
setShow(false);
|
|
27000
|
+
};
|
|
27001
|
+
return /* @__PURE__ */ jsxs18($de32f1b87079253c$export$2e1e1122cf0cba88, { children: [
|
|
27002
|
+
cloneElement3(triggerElement, { onHoverStart: handleHoverStart, onHoverEnd: handleHoverEnd }),
|
|
27003
|
+
/* @__PURE__ */ jsx33(Popover, { isOpen: show, isNonModal: true, children: /* @__PURE__ */ jsx33(
|
|
27004
|
+
"div",
|
|
27005
|
+
{
|
|
27006
|
+
className: HoverTrigger_default.wrapper,
|
|
27007
|
+
onMouseEnter: handleMenuEnter,
|
|
27008
|
+
onMouseLeave: handleMenuLeave,
|
|
27009
|
+
children: /* @__PURE__ */ jsx33(Dialog, { children: cloneElement3(popupElement) })
|
|
27010
|
+
}
|
|
27011
|
+
) })
|
|
27012
|
+
] });
|
|
27013
|
+
}
|
|
27014
|
+
|
|
26962
27015
|
// src/components/InlineEditField.tsx
|
|
26963
27016
|
var import_classnames28 = __toESM(require_classnames());
|
|
26964
|
-
import { useState as
|
|
27017
|
+
import { useState as useState7, useCallback } from "react";
|
|
26965
27018
|
|
|
26966
27019
|
// src/components/InlineEditField.module.css
|
|
26967
27020
|
var InlineEditField_default = {
|
|
@@ -26970,7 +27023,7 @@ var InlineEditField_default = {
|
|
|
26970
27023
|
};
|
|
26971
27024
|
|
|
26972
27025
|
// src/components/InlineEditField.tsx
|
|
26973
|
-
import { jsx as
|
|
27026
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
26974
27027
|
function InlineEditField({
|
|
26975
27028
|
value: defaultValue = "",
|
|
26976
27029
|
defaultEdit,
|
|
@@ -26981,8 +27034,8 @@ function InlineEditField({
|
|
|
26981
27034
|
onCancel,
|
|
26982
27035
|
...props
|
|
26983
27036
|
}) {
|
|
26984
|
-
const [value, setValue] =
|
|
26985
|
-
const [edit, setEdit] =
|
|
27037
|
+
const [value, setValue] = useState7(defaultValue);
|
|
27038
|
+
const [edit, setEdit] = useState7(defaultEdit);
|
|
26986
27039
|
const handleEdit = () => setEdit(true);
|
|
26987
27040
|
const handleChange = (e) => {
|
|
26988
27041
|
const val = e.target.value;
|
|
@@ -27005,7 +27058,7 @@ function InlineEditField({
|
|
|
27005
27058
|
handleCancel();
|
|
27006
27059
|
}
|
|
27007
27060
|
};
|
|
27008
|
-
return /* @__PURE__ */
|
|
27061
|
+
return /* @__PURE__ */ jsxs19(
|
|
27009
27062
|
"div",
|
|
27010
27063
|
{
|
|
27011
27064
|
"aria-label": "Edit",
|
|
@@ -27014,8 +27067,8 @@ function InlineEditField({
|
|
|
27014
27067
|
onClick: handleEdit,
|
|
27015
27068
|
children: [
|
|
27016
27069
|
!edit && children,
|
|
27017
|
-
!edit && /* @__PURE__ */
|
|
27018
|
-
edit && /* @__PURE__ */
|
|
27070
|
+
!edit && /* @__PURE__ */ jsx34(Icon, { className: InlineEditField_default.icon, children: /* @__PURE__ */ jsx34(Icons.Edit, {}) }),
|
|
27071
|
+
edit && /* @__PURE__ */ jsx34(
|
|
27019
27072
|
TextField,
|
|
27020
27073
|
{
|
|
27021
27074
|
value,
|
|
@@ -27042,12 +27095,12 @@ var Loading_default = {
|
|
|
27042
27095
|
};
|
|
27043
27096
|
|
|
27044
27097
|
// src/components/Loading.tsx
|
|
27045
|
-
import { jsx as
|
|
27098
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
27046
27099
|
function Loading(props) {
|
|
27047
27100
|
const { size, position = "inline", icon = "spinner", className, ...domProps } = props;
|
|
27048
|
-
return /* @__PURE__ */
|
|
27049
|
-
icon === "dots" && /* @__PURE__ */
|
|
27050
|
-
icon === "spinner" && /* @__PURE__ */
|
|
27101
|
+
return /* @__PURE__ */ jsxs20("div", { ...domProps, className: (0, import_classnames29.default)(Loading_default.loading, className, Loading_default[position]), children: [
|
|
27102
|
+
icon === "dots" && /* @__PURE__ */ jsx35(Dots, {}),
|
|
27103
|
+
icon === "spinner" && /* @__PURE__ */ jsx35(Spinner, { size })
|
|
27051
27104
|
] });
|
|
27052
27105
|
}
|
|
27053
27106
|
|
|
@@ -27064,11 +27117,11 @@ var MenuItem_default = {
|
|
|
27064
27117
|
};
|
|
27065
27118
|
|
|
27066
27119
|
// src/components/MenuItem.tsx
|
|
27067
|
-
import { jsx as
|
|
27120
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
27068
27121
|
function MenuItem2({ children, className, ...props }) {
|
|
27069
|
-
return /* @__PURE__ */
|
|
27122
|
+
return /* @__PURE__ */ jsxs21($3674c52c6b3c5bce$export$2ce376c2cc3355c8, { ...props, className: (0, import_classnames30.default)(MenuItem_default.item, className), children: [
|
|
27070
27123
|
children,
|
|
27071
|
-
/* @__PURE__ */
|
|
27124
|
+
/* @__PURE__ */ jsx36("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx36(Icon, { className: MenuItem_default.check, children: /* @__PURE__ */ jsx36(Icons.Check, {}) }) })
|
|
27072
27125
|
] });
|
|
27073
27126
|
}
|
|
27074
27127
|
|
|
@@ -27079,13 +27132,13 @@ var Menu_default = {
|
|
|
27079
27132
|
};
|
|
27080
27133
|
|
|
27081
27134
|
// src/components/Menu.tsx
|
|
27082
|
-
import { jsx as
|
|
27135
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
27083
27136
|
function Menu({ items, className, children, ...props }) {
|
|
27084
|
-
return /* @__PURE__ */
|
|
27137
|
+
return /* @__PURE__ */ jsx37($3674c52c6b3c5bce$export$d9b273488cd8ce6f, { ...props, className: (0, import_classnames31.default)(Menu_default.menu, className), children: children || items?.map((item, index) => {
|
|
27085
27138
|
if (item === null) {
|
|
27086
|
-
return /* @__PURE__ */
|
|
27139
|
+
return /* @__PURE__ */ jsx37($431f98aba6844401$export$1ff3c3f08ae963c0, { className: Menu_default.separator }, index);
|
|
27087
27140
|
}
|
|
27088
|
-
return /* @__PURE__ */
|
|
27141
|
+
return /* @__PURE__ */ jsx37(MenuItem2, { id: item, children: item }, index);
|
|
27089
27142
|
}) });
|
|
27090
27143
|
}
|
|
27091
27144
|
|
|
@@ -27101,9 +27154,9 @@ var Modal_default = {
|
|
|
27101
27154
|
};
|
|
27102
27155
|
|
|
27103
27156
|
// src/components/Modal.tsx
|
|
27104
|
-
import { jsx as
|
|
27157
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
27105
27158
|
function Modal({ children, className, ...props }) {
|
|
27106
|
-
return /* @__PURE__ */
|
|
27159
|
+
return /* @__PURE__ */ jsx38($f3f84453ead64de5$export$8948f78d83984c69, { ...props, className: Modal_default.overlay, children: /* @__PURE__ */ jsx38(
|
|
27107
27160
|
$f3f84453ead64de5$export$2b77a92f1a5ad772,
|
|
27108
27161
|
{
|
|
27109
27162
|
className: (0, import_classnames32.default)(Modal_default.modal, className),
|
|
@@ -27114,34 +27167,1086 @@ function Modal({ children, className, ...props }) {
|
|
|
27114
27167
|
) });
|
|
27115
27168
|
}
|
|
27116
27169
|
|
|
27117
|
-
//
|
|
27118
|
-
import { useState as
|
|
27170
|
+
// node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
27171
|
+
import { forwardRef as $yHMN2$forwardRef, useState as $yHMN2$useState, useRef as $yHMN2$useRef, useCallback as $yHMN2$useCallback, useEffect as $yHMN2$useEffect, createElement as $yHMN2$createElement, Fragment as $yHMN2$Fragment, useMemo as $yHMN2$useMemo } from "react";
|
|
27172
|
+
import $yHMN2$reactdom from "react-dom";
|
|
27173
|
+
|
|
27174
|
+
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
27175
|
+
import { createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef } from "react";
|
|
27176
|
+
|
|
27177
|
+
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
27178
|
+
import { useEffect as $hPSQ5$useEffect } from "react";
|
|
27179
|
+
function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27180
|
+
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
27181
|
+
$hPSQ5$useEffect(() => {
|
|
27182
|
+
const handleKeyDown = (event) => {
|
|
27183
|
+
if (event.key === "Escape") onEscapeKeyDown(event);
|
|
27184
|
+
};
|
|
27185
|
+
ownerDocument.addEventListener("keydown", handleKeyDown);
|
|
27186
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
|
|
27187
|
+
}, [
|
|
27188
|
+
onEscapeKeyDown,
|
|
27189
|
+
ownerDocument
|
|
27190
|
+
]);
|
|
27191
|
+
}
|
|
27192
|
+
|
|
27193
|
+
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
27194
|
+
var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
|
|
27195
|
+
var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
27196
|
+
var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
27197
|
+
var $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
27198
|
+
var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ $kqwpH$createContext({
|
|
27199
|
+
layers: /* @__PURE__ */ new Set(),
|
|
27200
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
27201
|
+
branches: /* @__PURE__ */ new Set()
|
|
27202
|
+
});
|
|
27203
|
+
var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ $kqwpH$forwardRef((props, forwardedRef) => {
|
|
27204
|
+
var _node$ownerDocument;
|
|
27205
|
+
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
27206
|
+
const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
|
|
27207
|
+
const [node1, setNode] = $kqwpH$useState(null);
|
|
27208
|
+
const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
27209
|
+
const [, force] = $kqwpH$useState({});
|
|
27210
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
27211
|
+
forwardedRef,
|
|
27212
|
+
(node) => setNode(node)
|
|
27213
|
+
);
|
|
27214
|
+
const layers = Array.from(context.layers);
|
|
27215
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
27216
|
+
...context.layersWithOutsidePointerEventsDisabled
|
|
27217
|
+
].slice(-1);
|
|
27218
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
27219
|
+
const index = node1 ? layers.indexOf(node1) : -1;
|
|
27220
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
27221
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
27222
|
+
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
|
|
27223
|
+
const target = event.target;
|
|
27224
|
+
const isPointerDownOnBranch = [
|
|
27225
|
+
...context.branches
|
|
27226
|
+
].some(
|
|
27227
|
+
(branch) => branch.contains(target)
|
|
27228
|
+
);
|
|
27229
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
27230
|
+
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
27231
|
+
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
27232
|
+
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
27233
|
+
}, ownerDocument);
|
|
27234
|
+
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
|
|
27235
|
+
const target = event.target;
|
|
27236
|
+
const isFocusInBranch = [
|
|
27237
|
+
...context.branches
|
|
27238
|
+
].some(
|
|
27239
|
+
(branch) => branch.contains(target)
|
|
27240
|
+
);
|
|
27241
|
+
if (isFocusInBranch) return;
|
|
27242
|
+
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
|
|
27243
|
+
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
27244
|
+
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
27245
|
+
}, ownerDocument);
|
|
27246
|
+
$addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
|
|
27247
|
+
const isHighestLayer = index === context.layers.size - 1;
|
|
27248
|
+
if (!isHighestLayer) return;
|
|
27249
|
+
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
27250
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
27251
|
+
event.preventDefault();
|
|
27252
|
+
onDismiss();
|
|
27253
|
+
}
|
|
27254
|
+
}, ownerDocument);
|
|
27255
|
+
$kqwpH$useEffect(() => {
|
|
27256
|
+
if (!node1) return;
|
|
27257
|
+
if (disableOutsidePointerEvents) {
|
|
27258
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
27259
|
+
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
27260
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
27261
|
+
}
|
|
27262
|
+
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
27263
|
+
}
|
|
27264
|
+
context.layers.add(node1);
|
|
27265
|
+
$5cb92bef7577960e$var$dispatchUpdate();
|
|
27266
|
+
return () => {
|
|
27267
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
27268
|
+
};
|
|
27269
|
+
}, [
|
|
27270
|
+
node1,
|
|
27271
|
+
ownerDocument,
|
|
27272
|
+
disableOutsidePointerEvents,
|
|
27273
|
+
context
|
|
27274
|
+
]);
|
|
27275
|
+
$kqwpH$useEffect(() => {
|
|
27276
|
+
return () => {
|
|
27277
|
+
if (!node1) return;
|
|
27278
|
+
context.layers.delete(node1);
|
|
27279
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
27280
|
+
$5cb92bef7577960e$var$dispatchUpdate();
|
|
27281
|
+
};
|
|
27282
|
+
}, [
|
|
27283
|
+
node1,
|
|
27284
|
+
context
|
|
27285
|
+
]);
|
|
27286
|
+
$kqwpH$useEffect(() => {
|
|
27287
|
+
const handleUpdate = () => force({});
|
|
27288
|
+
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
27289
|
+
return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
27290
|
+
}, []);
|
|
27291
|
+
return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
27292
|
+
ref: composedRefs,
|
|
27293
|
+
style: {
|
|
27294
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
27295
|
+
...props.style
|
|
27296
|
+
},
|
|
27297
|
+
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
27298
|
+
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
27299
|
+
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
27300
|
+
}));
|
|
27301
|
+
});
|
|
27302
|
+
function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27303
|
+
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
27304
|
+
const isPointerInsideReactTreeRef = $kqwpH$useRef(false);
|
|
27305
|
+
const handleClickRef = $kqwpH$useRef(() => {
|
|
27306
|
+
});
|
|
27307
|
+
$kqwpH$useEffect(() => {
|
|
27308
|
+
const handlePointerDown = (event) => {
|
|
27309
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
27310
|
+
let handleAndDispatchPointerDownOutsideEvent = function() {
|
|
27311
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
27312
|
+
discrete: true
|
|
27313
|
+
});
|
|
27314
|
+
};
|
|
27315
|
+
const eventDetail = {
|
|
27316
|
+
originalEvent: event
|
|
27317
|
+
};
|
|
27318
|
+
if (event.pointerType === "touch") {
|
|
27319
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27320
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
|
|
27321
|
+
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
27322
|
+
once: true
|
|
27323
|
+
});
|
|
27324
|
+
} else handleAndDispatchPointerDownOutsideEvent();
|
|
27325
|
+
} else
|
|
27326
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27327
|
+
isPointerInsideReactTreeRef.current = false;
|
|
27328
|
+
};
|
|
27329
|
+
const timerId = window.setTimeout(() => {
|
|
27330
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
27331
|
+
}, 0);
|
|
27332
|
+
return () => {
|
|
27333
|
+
window.clearTimeout(timerId);
|
|
27334
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
27335
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27336
|
+
};
|
|
27337
|
+
}, [
|
|
27338
|
+
ownerDocument,
|
|
27339
|
+
handlePointerDownOutside
|
|
27340
|
+
]);
|
|
27341
|
+
return {
|
|
27342
|
+
// ensures we check React component tree (not just DOM tree)
|
|
27343
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
27344
|
+
};
|
|
27345
|
+
}
|
|
27346
|
+
function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27347
|
+
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
27348
|
+
const isFocusInsideReactTreeRef = $kqwpH$useRef(false);
|
|
27349
|
+
$kqwpH$useEffect(() => {
|
|
27350
|
+
const handleFocus = (event) => {
|
|
27351
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
27352
|
+
const eventDetail = {
|
|
27353
|
+
originalEvent: event
|
|
27354
|
+
};
|
|
27355
|
+
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
27356
|
+
discrete: false
|
|
27357
|
+
});
|
|
27358
|
+
}
|
|
27359
|
+
};
|
|
27360
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
27361
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
27362
|
+
}, [
|
|
27363
|
+
ownerDocument,
|
|
27364
|
+
handleFocusOutside
|
|
27365
|
+
]);
|
|
27366
|
+
return {
|
|
27367
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
27368
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
27369
|
+
};
|
|
27370
|
+
}
|
|
27371
|
+
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
27372
|
+
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
27373
|
+
document.dispatchEvent(event);
|
|
27374
|
+
}
|
|
27375
|
+
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
27376
|
+
const target = detail.originalEvent.target;
|
|
27377
|
+
const event = new CustomEvent(name, {
|
|
27378
|
+
bubbles: false,
|
|
27379
|
+
cancelable: true,
|
|
27380
|
+
detail
|
|
27381
|
+
});
|
|
27382
|
+
if (handler) target.addEventListener(name, handler, {
|
|
27383
|
+
once: true
|
|
27384
|
+
});
|
|
27385
|
+
if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
27386
|
+
else target.dispatchEvent(event);
|
|
27387
|
+
}
|
|
27388
|
+
|
|
27389
|
+
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
27390
|
+
import { useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo } from "react";
|
|
27391
|
+
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
27392
|
+
const ref = $8LvvK$useRef({
|
|
27393
|
+
value,
|
|
27394
|
+
previous: value
|
|
27395
|
+
});
|
|
27396
|
+
return $8LvvK$useMemo(() => {
|
|
27397
|
+
if (ref.current.value !== value) {
|
|
27398
|
+
ref.current.previous = ref.current.value;
|
|
27399
|
+
ref.current.value = value;
|
|
27400
|
+
}
|
|
27401
|
+
return ref.current.previous;
|
|
27402
|
+
}, [
|
|
27403
|
+
value
|
|
27404
|
+
]);
|
|
27405
|
+
}
|
|
27406
|
+
|
|
27407
|
+
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
27408
|
+
import { forwardRef as $kVwnw$forwardRef, createElement as $kVwnw$createElement } from "react";
|
|
27409
|
+
var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ $kVwnw$forwardRef((props, forwardedRef) => {
|
|
27410
|
+
return /* @__PURE__ */ $kVwnw$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
27411
|
+
ref: forwardedRef,
|
|
27412
|
+
style: {
|
|
27413
|
+
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
27414
|
+
position: "absolute",
|
|
27415
|
+
border: 0,
|
|
27416
|
+
width: 1,
|
|
27417
|
+
height: 1,
|
|
27418
|
+
padding: 0,
|
|
27419
|
+
margin: -1,
|
|
27420
|
+
overflow: "hidden",
|
|
27421
|
+
clip: "rect(0, 0, 0, 0)",
|
|
27422
|
+
whiteSpace: "nowrap",
|
|
27423
|
+
wordWrap: "normal",
|
|
27424
|
+
...props.style
|
|
27425
|
+
}
|
|
27426
|
+
}));
|
|
27427
|
+
});
|
|
27428
|
+
var $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164;
|
|
27429
|
+
|
|
27430
|
+
// node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
27431
|
+
var $322c88a641701f3b$var$NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
27432
|
+
var [$322c88a641701f3b$var$Collection, $322c88a641701f3b$var$useCollection, $322c88a641701f3b$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27433
|
+
var [$322c88a641701f3b$var$FocusGroupCollection, $322c88a641701f3b$var$useFocusGroupCollection, $322c88a641701f3b$var$createFocusGroupCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27434
|
+
var [$322c88a641701f3b$var$createNavigationMenuContext, $322c88a641701f3b$export$fb8ea5af8c9fcdf0] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($322c88a641701f3b$var$NAVIGATION_MENU_NAME, [
|
|
27435
|
+
$322c88a641701f3b$var$createCollectionScope,
|
|
27436
|
+
$322c88a641701f3b$var$createFocusGroupCollectionScope
|
|
27437
|
+
]);
|
|
27438
|
+
var [$322c88a641701f3b$var$NavigationMenuProviderImpl, $322c88a641701f3b$var$useNavigationMenuContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27439
|
+
var [$322c88a641701f3b$var$ViewportContentProvider, $322c88a641701f3b$var$useViewportContentContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27440
|
+
var $322c88a641701f3b$export$5b2278cf1e8bcae2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27441
|
+
const { __scopeNavigationMenu, value: valueProp, onValueChange, defaultValue, delayDuration = 200, skipDelayDuration = 300, orientation = "horizontal", dir, ...NavigationMenuProps } = props;
|
|
27442
|
+
const [navigationMenu, setNavigationMenu] = $yHMN2$useState(null);
|
|
27443
|
+
const composedRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
27444
|
+
forwardedRef,
|
|
27445
|
+
(node) => setNavigationMenu(node)
|
|
27446
|
+
);
|
|
27447
|
+
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
27448
|
+
const openTimerRef = $yHMN2$useRef(0);
|
|
27449
|
+
const closeTimerRef = $yHMN2$useRef(0);
|
|
27450
|
+
const skipDelayTimerRef = $yHMN2$useRef(0);
|
|
27451
|
+
const [isOpenDelayed, setIsOpenDelayed] = $yHMN2$useState(true);
|
|
27452
|
+
const [value1 = "", setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
27453
|
+
prop: valueProp,
|
|
27454
|
+
onChange: (value) => {
|
|
27455
|
+
const isOpen = value !== "";
|
|
27456
|
+
const hasSkipDelayDuration = skipDelayDuration > 0;
|
|
27457
|
+
if (isOpen) {
|
|
27458
|
+
window.clearTimeout(skipDelayTimerRef.current);
|
|
27459
|
+
if (hasSkipDelayDuration) setIsOpenDelayed(false);
|
|
27460
|
+
} else {
|
|
27461
|
+
window.clearTimeout(skipDelayTimerRef.current);
|
|
27462
|
+
skipDelayTimerRef.current = window.setTimeout(
|
|
27463
|
+
() => setIsOpenDelayed(true),
|
|
27464
|
+
skipDelayDuration
|
|
27465
|
+
);
|
|
27466
|
+
}
|
|
27467
|
+
onValueChange === null || onValueChange === void 0 || onValueChange(value);
|
|
27468
|
+
},
|
|
27469
|
+
defaultProp: defaultValue
|
|
27470
|
+
});
|
|
27471
|
+
const startCloseTimer = $yHMN2$useCallback(() => {
|
|
27472
|
+
window.clearTimeout(closeTimerRef.current);
|
|
27473
|
+
closeTimerRef.current = window.setTimeout(
|
|
27474
|
+
() => setValue(""),
|
|
27475
|
+
150
|
|
27476
|
+
);
|
|
27477
|
+
}, [
|
|
27478
|
+
setValue
|
|
27479
|
+
]);
|
|
27480
|
+
const handleOpen = $yHMN2$useCallback((itemValue) => {
|
|
27481
|
+
window.clearTimeout(closeTimerRef.current);
|
|
27482
|
+
setValue(itemValue);
|
|
27483
|
+
}, [
|
|
27484
|
+
setValue
|
|
27485
|
+
]);
|
|
27486
|
+
const handleDelayedOpen = $yHMN2$useCallback((itemValue) => {
|
|
27487
|
+
const isOpenItem = value1 === itemValue;
|
|
27488
|
+
if (isOpenItem)
|
|
27489
|
+
window.clearTimeout(closeTimerRef.current);
|
|
27490
|
+
else openTimerRef.current = window.setTimeout(() => {
|
|
27491
|
+
window.clearTimeout(closeTimerRef.current);
|
|
27492
|
+
setValue(itemValue);
|
|
27493
|
+
}, delayDuration);
|
|
27494
|
+
}, [
|
|
27495
|
+
value1,
|
|
27496
|
+
setValue,
|
|
27497
|
+
delayDuration
|
|
27498
|
+
]);
|
|
27499
|
+
$yHMN2$useEffect(() => {
|
|
27500
|
+
return () => {
|
|
27501
|
+
window.clearTimeout(openTimerRef.current);
|
|
27502
|
+
window.clearTimeout(closeTimerRef.current);
|
|
27503
|
+
window.clearTimeout(skipDelayTimerRef.current);
|
|
27504
|
+
};
|
|
27505
|
+
}, []);
|
|
27506
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProvider, {
|
|
27507
|
+
scope: __scopeNavigationMenu,
|
|
27508
|
+
isRootMenu: true,
|
|
27509
|
+
value: value1,
|
|
27510
|
+
dir: direction,
|
|
27511
|
+
orientation,
|
|
27512
|
+
rootNavigationMenu: navigationMenu,
|
|
27513
|
+
onTriggerEnter: (itemValue) => {
|
|
27514
|
+
window.clearTimeout(openTimerRef.current);
|
|
27515
|
+
if (isOpenDelayed) handleDelayedOpen(itemValue);
|
|
27516
|
+
else handleOpen(itemValue);
|
|
27517
|
+
},
|
|
27518
|
+
onTriggerLeave: () => {
|
|
27519
|
+
window.clearTimeout(openTimerRef.current);
|
|
27520
|
+
startCloseTimer();
|
|
27521
|
+
},
|
|
27522
|
+
onContentEnter: () => window.clearTimeout(closeTimerRef.current),
|
|
27523
|
+
onContentLeave: startCloseTimer,
|
|
27524
|
+
onItemSelect: (itemValue) => {
|
|
27525
|
+
setValue(
|
|
27526
|
+
(prevValue) => prevValue === itemValue ? "" : itemValue
|
|
27527
|
+
);
|
|
27528
|
+
},
|
|
27529
|
+
onItemDismiss: () => setValue("")
|
|
27530
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.nav, _extends({
|
|
27531
|
+
"aria-label": "Main",
|
|
27532
|
+
"data-orientation": orientation,
|
|
27533
|
+
dir: direction
|
|
27534
|
+
}, NavigationMenuProps, {
|
|
27535
|
+
ref: composedRef
|
|
27536
|
+
})));
|
|
27537
|
+
});
|
|
27538
|
+
var $322c88a641701f3b$var$NavigationMenuProvider = (props) => {
|
|
27539
|
+
const { scope, isRootMenu, rootNavigationMenu, dir, orientation, children, value, onItemSelect, onItemDismiss, onTriggerEnter, onTriggerLeave, onContentEnter, onContentLeave } = props;
|
|
27540
|
+
const [viewport, setViewport] = $yHMN2$useState(null);
|
|
27541
|
+
const [viewportContent, setViewportContent] = $yHMN2$useState(/* @__PURE__ */ new Map());
|
|
27542
|
+
const [indicatorTrack, setIndicatorTrack] = $yHMN2$useState(null);
|
|
27543
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProviderImpl, {
|
|
27544
|
+
scope,
|
|
27545
|
+
isRootMenu,
|
|
27546
|
+
rootNavigationMenu,
|
|
27547
|
+
value,
|
|
27548
|
+
previousValue: $010c2913dbd2fe3d$export$5cae361ad82dce8b(value),
|
|
27549
|
+
baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
27550
|
+
dir,
|
|
27551
|
+
orientation,
|
|
27552
|
+
viewport,
|
|
27553
|
+
onViewportChange: setViewport,
|
|
27554
|
+
indicatorTrack,
|
|
27555
|
+
onIndicatorTrackChange: setIndicatorTrack,
|
|
27556
|
+
onTriggerEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerEnter),
|
|
27557
|
+
onTriggerLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerLeave),
|
|
27558
|
+
onContentEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentEnter),
|
|
27559
|
+
onContentLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentLeave),
|
|
27560
|
+
onItemSelect: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemSelect),
|
|
27561
|
+
onItemDismiss: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemDismiss),
|
|
27562
|
+
onViewportContentChange: $yHMN2$useCallback((contentValue, contentData) => {
|
|
27563
|
+
setViewportContent((prevContent) => {
|
|
27564
|
+
prevContent.set(contentValue, contentData);
|
|
27565
|
+
return new Map(prevContent);
|
|
27566
|
+
});
|
|
27567
|
+
}, []),
|
|
27568
|
+
onViewportContentRemove: $yHMN2$useCallback((contentValue) => {
|
|
27569
|
+
setViewportContent((prevContent) => {
|
|
27570
|
+
if (!prevContent.has(contentValue)) return prevContent;
|
|
27571
|
+
prevContent.delete(contentValue);
|
|
27572
|
+
return new Map(prevContent);
|
|
27573
|
+
});
|
|
27574
|
+
}, [])
|
|
27575
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Provider, {
|
|
27576
|
+
scope
|
|
27577
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentProvider, {
|
|
27578
|
+
scope,
|
|
27579
|
+
items: viewportContent
|
|
27580
|
+
}, children)));
|
|
27581
|
+
};
|
|
27582
|
+
var $322c88a641701f3b$var$LIST_NAME = "NavigationMenuList";
|
|
27583
|
+
var $322c88a641701f3b$export$c361068a95fd2286 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27584
|
+
const { __scopeNavigationMenu, ...listProps } = props;
|
|
27585
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$LIST_NAME, __scopeNavigationMenu);
|
|
27586
|
+
const list = /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.ul, _extends({
|
|
27587
|
+
"data-orientation": context.orientation
|
|
27588
|
+
}, listProps, {
|
|
27589
|
+
ref: forwardedRef
|
|
27590
|
+
}));
|
|
27591
|
+
return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, {
|
|
27592
|
+
style: {
|
|
27593
|
+
position: "relative"
|
|
27594
|
+
},
|
|
27595
|
+
ref: context.onIndicatorTrackChange
|
|
27596
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Slot, {
|
|
27597
|
+
scope: __scopeNavigationMenu
|
|
27598
|
+
}, context.isRootMenu ? /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
|
|
27599
|
+
asChild: true
|
|
27600
|
+
}, list) : list));
|
|
27601
|
+
});
|
|
27602
|
+
var $322c88a641701f3b$var$ITEM_NAME = "NavigationMenuItem";
|
|
27603
|
+
var [$322c88a641701f3b$var$NavigationMenuItemContextProvider, $322c88a641701f3b$var$useNavigationMenuItemContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$ITEM_NAME);
|
|
27604
|
+
var $322c88a641701f3b$export$ffdbb83a2de845c2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27605
|
+
const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
|
|
27606
|
+
const autoValue = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
27607
|
+
const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
|
|
27608
|
+
const contentRef = $yHMN2$useRef(null);
|
|
27609
|
+
const triggerRef = $yHMN2$useRef(null);
|
|
27610
|
+
const focusProxyRef = $yHMN2$useRef(null);
|
|
27611
|
+
const restoreContentTabOrderRef = $yHMN2$useRef(() => {
|
|
27612
|
+
});
|
|
27613
|
+
const wasEscapeCloseRef = $yHMN2$useRef(false);
|
|
27614
|
+
const handleContentEntry = $yHMN2$useCallback((side = "start") => {
|
|
27615
|
+
if (contentRef.current) {
|
|
27616
|
+
restoreContentTabOrderRef.current();
|
|
27617
|
+
const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
|
|
27618
|
+
if (candidates.length) $322c88a641701f3b$var$focusFirst(side === "start" ? candidates : candidates.reverse());
|
|
27619
|
+
}
|
|
27620
|
+
}, []);
|
|
27621
|
+
const handleContentExit = $yHMN2$useCallback(() => {
|
|
27622
|
+
if (contentRef.current) {
|
|
27623
|
+
const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
|
|
27624
|
+
if (candidates.length) restoreContentTabOrderRef.current = $322c88a641701f3b$var$removeFromTabOrder(candidates);
|
|
27625
|
+
}
|
|
27626
|
+
}, []);
|
|
27627
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuItemContextProvider, {
|
|
27628
|
+
scope: __scopeNavigationMenu,
|
|
27629
|
+
value,
|
|
27630
|
+
triggerRef,
|
|
27631
|
+
contentRef,
|
|
27632
|
+
focusProxyRef,
|
|
27633
|
+
wasEscapeCloseRef,
|
|
27634
|
+
onEntryKeyDown: handleContentEntry,
|
|
27635
|
+
onFocusProxyEnter: handleContentEntry,
|
|
27636
|
+
onRootContentClose: handleContentExit,
|
|
27637
|
+
onContentFocusOutside: handleContentExit
|
|
27638
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.li, _extends({}, itemProps, {
|
|
27639
|
+
ref: forwardedRef
|
|
27640
|
+
})));
|
|
27641
|
+
});
|
|
27642
|
+
var $322c88a641701f3b$var$TRIGGER_NAME = "NavigationMenuTrigger";
|
|
27643
|
+
var $322c88a641701f3b$export$37fe8002734d8f2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27644
|
+
const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
|
|
27645
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
|
|
27646
|
+
const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
|
|
27647
|
+
const ref = $yHMN2$useRef(null);
|
|
27648
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, itemContext.triggerRef, forwardedRef);
|
|
27649
|
+
const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, itemContext.value);
|
|
27650
|
+
const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, itemContext.value);
|
|
27651
|
+
const hasPointerMoveOpenedRef = $yHMN2$useRef(false);
|
|
27652
|
+
const wasClickCloseRef = $yHMN2$useRef(false);
|
|
27653
|
+
const open = itemContext.value === context.value;
|
|
27654
|
+
return /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.ItemSlot, {
|
|
27655
|
+
scope: __scopeNavigationMenu,
|
|
27656
|
+
value: itemContext.value
|
|
27657
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
|
|
27658
|
+
asChild: true
|
|
27659
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
27660
|
+
id: triggerId,
|
|
27661
|
+
disabled,
|
|
27662
|
+
"data-disabled": disabled ? "" : void 0,
|
|
27663
|
+
"data-state": $322c88a641701f3b$var$getOpenState(open),
|
|
27664
|
+
"aria-expanded": open,
|
|
27665
|
+
"aria-controls": contentId
|
|
27666
|
+
}, triggerProps, {
|
|
27667
|
+
ref: composedRefs,
|
|
27668
|
+
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, () => {
|
|
27669
|
+
wasClickCloseRef.current = false;
|
|
27670
|
+
itemContext.wasEscapeCloseRef.current = false;
|
|
27671
|
+
}),
|
|
27672
|
+
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $322c88a641701f3b$var$whenMouse(() => {
|
|
27673
|
+
if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) return;
|
|
27674
|
+
context.onTriggerEnter(itemContext.value);
|
|
27675
|
+
hasPointerMoveOpenedRef.current = true;
|
|
27676
|
+
})),
|
|
27677
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(() => {
|
|
27678
|
+
if (disabled) return;
|
|
27679
|
+
context.onTriggerLeave();
|
|
27680
|
+
hasPointerMoveOpenedRef.current = false;
|
|
27681
|
+
})),
|
|
27682
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, () => {
|
|
27683
|
+
context.onItemSelect(itemContext.value);
|
|
27684
|
+
wasClickCloseRef.current = open;
|
|
27685
|
+
}),
|
|
27686
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
27687
|
+
const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
27688
|
+
const entryKey = {
|
|
27689
|
+
horizontal: "ArrowDown",
|
|
27690
|
+
vertical: verticalEntryKey
|
|
27691
|
+
}[context.orientation];
|
|
27692
|
+
if (open && event.key === entryKey) {
|
|
27693
|
+
itemContext.onEntryKeyDown();
|
|
27694
|
+
event.preventDefault();
|
|
27695
|
+
}
|
|
27696
|
+
})
|
|
27697
|
+
})))), open && /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
|
|
27698
|
+
"aria-hidden": true,
|
|
27699
|
+
tabIndex: 0,
|
|
27700
|
+
ref: itemContext.focusProxyRef,
|
|
27701
|
+
onFocus: (event) => {
|
|
27702
|
+
const content = itemContext.contentRef.current;
|
|
27703
|
+
const prevFocusedElement = event.relatedTarget;
|
|
27704
|
+
const wasTriggerFocused = prevFocusedElement === ref.current;
|
|
27705
|
+
const wasFocusFromContent = content === null || content === void 0 ? void 0 : content.contains(prevFocusedElement);
|
|
27706
|
+
if (wasTriggerFocused || !wasFocusFromContent) itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end");
|
|
27707
|
+
}
|
|
27708
|
+
}), context.viewport && /* @__PURE__ */ $yHMN2$createElement("span", {
|
|
27709
|
+
"aria-owns": contentId
|
|
27710
|
+
})));
|
|
27711
|
+
});
|
|
27712
|
+
var $322c88a641701f3b$var$LINK_SELECT = "navigationMenu.linkSelect";
|
|
27713
|
+
var $322c88a641701f3b$export$6893bf21536567da = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27714
|
+
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
|
|
27715
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
|
|
27716
|
+
asChild: true
|
|
27717
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.a, _extends({
|
|
27718
|
+
"data-active": active ? "" : void 0,
|
|
27719
|
+
"aria-current": active ? "page" : void 0
|
|
27720
|
+
}, linkProps, {
|
|
27721
|
+
ref: forwardedRef,
|
|
27722
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event1) => {
|
|
27723
|
+
const target = event1.target;
|
|
27724
|
+
const linkSelectEvent = new CustomEvent($322c88a641701f3b$var$LINK_SELECT, {
|
|
27725
|
+
bubbles: true,
|
|
27726
|
+
cancelable: true
|
|
27727
|
+
});
|
|
27728
|
+
target.addEventListener(
|
|
27729
|
+
$322c88a641701f3b$var$LINK_SELECT,
|
|
27730
|
+
(event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
|
|
27731
|
+
{
|
|
27732
|
+
once: true
|
|
27733
|
+
}
|
|
27734
|
+
);
|
|
27735
|
+
$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, linkSelectEvent);
|
|
27736
|
+
if (!linkSelectEvent.defaultPrevented && !event1.metaKey) {
|
|
27737
|
+
const rootContentDismissEvent = new CustomEvent($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
|
|
27738
|
+
bubbles: true,
|
|
27739
|
+
cancelable: true
|
|
27740
|
+
});
|
|
27741
|
+
$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, rootContentDismissEvent);
|
|
27742
|
+
}
|
|
27743
|
+
}, {
|
|
27744
|
+
checkForDefaultPrevented: false
|
|
27745
|
+
})
|
|
27746
|
+
})));
|
|
27747
|
+
});
|
|
27748
|
+
var $322c88a641701f3b$var$INDICATOR_NAME = "NavigationMenuIndicator";
|
|
27749
|
+
var $322c88a641701f3b$export$8ddb526647c0d8fb = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27750
|
+
const { forceMount, ...indicatorProps } = props;
|
|
27751
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, props.__scopeNavigationMenu);
|
|
27752
|
+
const isVisible = Boolean(context.value);
|
|
27753
|
+
return context.indicatorTrack ? /* @__PURE__ */ $yHMN2$reactdom.createPortal(/* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27754
|
+
present: forceMount || isVisible
|
|
27755
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuIndicatorImpl, _extends({}, indicatorProps, {
|
|
27756
|
+
ref: forwardedRef
|
|
27757
|
+
}))), context.indicatorTrack) : null;
|
|
27758
|
+
});
|
|
27759
|
+
var $322c88a641701f3b$var$NavigationMenuIndicatorImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27760
|
+
const { __scopeNavigationMenu, ...indicatorProps } = props;
|
|
27761
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, __scopeNavigationMenu);
|
|
27762
|
+
const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
|
|
27763
|
+
const [activeTrigger, setActiveTrigger] = $yHMN2$useState(null);
|
|
27764
|
+
const [position, setPosition] = $yHMN2$useState(null);
|
|
27765
|
+
const isHorizontal = context.orientation === "horizontal";
|
|
27766
|
+
const isVisible = Boolean(context.value);
|
|
27767
|
+
$yHMN2$useEffect(() => {
|
|
27768
|
+
var _items$find;
|
|
27769
|
+
const items = getItems();
|
|
27770
|
+
const triggerNode = (_items$find = items.find(
|
|
27771
|
+
(item) => item.value === context.value
|
|
27772
|
+
)) === null || _items$find === void 0 ? void 0 : _items$find.ref.current;
|
|
27773
|
+
if (triggerNode) setActiveTrigger(triggerNode);
|
|
27774
|
+
}, [
|
|
27775
|
+
getItems,
|
|
27776
|
+
context.value
|
|
27777
|
+
]);
|
|
27778
|
+
const handlePositionChange = () => {
|
|
27779
|
+
if (activeTrigger) setPosition({
|
|
27780
|
+
size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,
|
|
27781
|
+
offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop
|
|
27782
|
+
});
|
|
27783
|
+
};
|
|
27784
|
+
$322c88a641701f3b$var$useResizeObserver(activeTrigger, handlePositionChange);
|
|
27785
|
+
$322c88a641701f3b$var$useResizeObserver(context.indicatorTrack, handlePositionChange);
|
|
27786
|
+
return position ? /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
27787
|
+
"aria-hidden": true,
|
|
27788
|
+
"data-state": isVisible ? "visible" : "hidden",
|
|
27789
|
+
"data-orientation": context.orientation
|
|
27790
|
+
}, indicatorProps, {
|
|
27791
|
+
ref: forwardedRef,
|
|
27792
|
+
style: {
|
|
27793
|
+
position: "absolute",
|
|
27794
|
+
...isHorizontal ? {
|
|
27795
|
+
left: 0,
|
|
27796
|
+
width: position.size + "px",
|
|
27797
|
+
transform: `translateX(${position.offset}px)`
|
|
27798
|
+
} : {
|
|
27799
|
+
top: 0,
|
|
27800
|
+
height: position.size + "px",
|
|
27801
|
+
transform: `translateY(${position.offset}px)`
|
|
27802
|
+
},
|
|
27803
|
+
...indicatorProps.style
|
|
27804
|
+
}
|
|
27805
|
+
})) : null;
|
|
27806
|
+
});
|
|
27807
|
+
var $322c88a641701f3b$var$CONTENT_NAME = "NavigationMenuContent";
|
|
27808
|
+
var $322c88a641701f3b$export$38e00e996c2f93f7 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27809
|
+
const { forceMount, ...contentProps } = props;
|
|
27810
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27811
|
+
const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27812
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(itemContext.contentRef, forwardedRef);
|
|
27813
|
+
const open = itemContext.value === context.value;
|
|
27814
|
+
const commonProps = {
|
|
27815
|
+
value: itemContext.value,
|
|
27816
|
+
triggerRef: itemContext.triggerRef,
|
|
27817
|
+
focusProxyRef: itemContext.focusProxyRef,
|
|
27818
|
+
wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
|
|
27819
|
+
onContentFocusOutside: itemContext.onContentFocusOutside,
|
|
27820
|
+
onRootContentClose: itemContext.onRootContentClose,
|
|
27821
|
+
...contentProps
|
|
27822
|
+
};
|
|
27823
|
+
return !context.viewport ? /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27824
|
+
present: forceMount || open
|
|
27825
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({
|
|
27826
|
+
"data-state": $322c88a641701f3b$var$getOpenState(open)
|
|
27827
|
+
}, commonProps, {
|
|
27828
|
+
ref: composedRefs,
|
|
27829
|
+
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, context.onContentEnter),
|
|
27830
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave)),
|
|
27831
|
+
style: {
|
|
27832
|
+
// Prevent interaction when animating out
|
|
27833
|
+
pointerEvents: !open && context.isRootMenu ? "none" : void 0,
|
|
27834
|
+
...commonProps.style
|
|
27835
|
+
}
|
|
27836
|
+
}))) : /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentMounter, _extends({
|
|
27837
|
+
forceMount
|
|
27838
|
+
}, commonProps, {
|
|
27839
|
+
ref: composedRefs
|
|
27840
|
+
}));
|
|
27841
|
+
});
|
|
27842
|
+
var $322c88a641701f3b$var$ViewportContentMounter = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27843
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27844
|
+
const { onViewportContentChange, onViewportContentRemove } = context;
|
|
27845
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
27846
|
+
onViewportContentChange(props.value, {
|
|
27847
|
+
ref: forwardedRef,
|
|
27848
|
+
...props
|
|
27849
|
+
});
|
|
27850
|
+
}, [
|
|
27851
|
+
props,
|
|
27852
|
+
forwardedRef,
|
|
27853
|
+
onViewportContentChange
|
|
27854
|
+
]);
|
|
27855
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
27856
|
+
return () => onViewportContentRemove(props.value);
|
|
27857
|
+
}, [
|
|
27858
|
+
props.value,
|
|
27859
|
+
onViewportContentRemove
|
|
27860
|
+
]);
|
|
27861
|
+
return null;
|
|
27862
|
+
});
|
|
27863
|
+
var $322c88a641701f3b$var$ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
|
|
27864
|
+
var $322c88a641701f3b$var$NavigationMenuContentImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27865
|
+
const { __scopeNavigationMenu, value, triggerRef, focusProxyRef, wasEscapeCloseRef, onRootContentClose, onContentFocusOutside, ...contentProps } = props;
|
|
27866
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, __scopeNavigationMenu);
|
|
27867
|
+
const ref = $yHMN2$useRef(null);
|
|
27868
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, forwardedRef);
|
|
27869
|
+
const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, value);
|
|
27870
|
+
const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, value);
|
|
27871
|
+
const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
|
|
27872
|
+
const prevMotionAttributeRef = $yHMN2$useRef(null);
|
|
27873
|
+
const { onItemDismiss } = context;
|
|
27874
|
+
$yHMN2$useEffect(() => {
|
|
27875
|
+
const content = ref.current;
|
|
27876
|
+
if (context.isRootMenu && content) {
|
|
27877
|
+
const handleClose = () => {
|
|
27878
|
+
var _triggerRef$current;
|
|
27879
|
+
onItemDismiss();
|
|
27880
|
+
onRootContentClose();
|
|
27881
|
+
if (content.contains(document.activeElement)) (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
27882
|
+
};
|
|
27883
|
+
content.addEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
|
|
27884
|
+
return () => content.removeEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
|
|
27885
|
+
}
|
|
27886
|
+
}, [
|
|
27887
|
+
context.isRootMenu,
|
|
27888
|
+
props.value,
|
|
27889
|
+
triggerRef,
|
|
27890
|
+
onItemDismiss,
|
|
27891
|
+
onRootContentClose
|
|
27892
|
+
]);
|
|
27893
|
+
const motionAttribute = $yHMN2$useMemo(() => {
|
|
27894
|
+
const items = getItems();
|
|
27895
|
+
const values = items.map(
|
|
27896
|
+
(item) => item.value
|
|
27897
|
+
);
|
|
27898
|
+
if (context.dir === "rtl") values.reverse();
|
|
27899
|
+
const index = values.indexOf(context.value);
|
|
27900
|
+
const prevIndex = values.indexOf(context.previousValue);
|
|
27901
|
+
const isSelected = value === context.value;
|
|
27902
|
+
const wasSelected = prevIndex === values.indexOf(value);
|
|
27903
|
+
if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;
|
|
27904
|
+
const attribute = (() => {
|
|
27905
|
+
if (index !== prevIndex) {
|
|
27906
|
+
if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start";
|
|
27907
|
+
if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end";
|
|
27908
|
+
}
|
|
27909
|
+
return null;
|
|
27910
|
+
})();
|
|
27911
|
+
prevMotionAttributeRef.current = attribute;
|
|
27912
|
+
return attribute;
|
|
27913
|
+
}, [
|
|
27914
|
+
context.previousValue,
|
|
27915
|
+
context.value,
|
|
27916
|
+
context.dir,
|
|
27917
|
+
getItems,
|
|
27918
|
+
value
|
|
27919
|
+
]);
|
|
27920
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
|
|
27921
|
+
asChild: true
|
|
27922
|
+
}, /* @__PURE__ */ $yHMN2$createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
|
|
27923
|
+
id: contentId,
|
|
27924
|
+
"aria-labelledby": triggerId,
|
|
27925
|
+
"data-motion": motionAttribute,
|
|
27926
|
+
"data-orientation": context.orientation
|
|
27927
|
+
}, contentProps, {
|
|
27928
|
+
ref: composedRefs,
|
|
27929
|
+
onDismiss: () => {
|
|
27930
|
+
var _ref$current;
|
|
27931
|
+
const rootContentDismissEvent = new Event($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
|
|
27932
|
+
bubbles: true,
|
|
27933
|
+
cancelable: true
|
|
27934
|
+
});
|
|
27935
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.dispatchEvent(rootContentDismissEvent);
|
|
27936
|
+
},
|
|
27937
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event) => {
|
|
27938
|
+
var _context$rootNavigati;
|
|
27939
|
+
onContentFocusOutside();
|
|
27940
|
+
const target = event.target;
|
|
27941
|
+
if ((_context$rootNavigati = context.rootNavigationMenu) !== null && _context$rootNavigati !== void 0 && _context$rootNavigati.contains(target)) event.preventDefault();
|
|
27942
|
+
}),
|
|
27943
|
+
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event) => {
|
|
27944
|
+
var _context$viewport;
|
|
27945
|
+
const target = event.target;
|
|
27946
|
+
const isTrigger = getItems().some((item) => {
|
|
27947
|
+
var _item$ref$current;
|
|
27948
|
+
return (_item$ref$current = item.ref.current) === null || _item$ref$current === void 0 ? void 0 : _item$ref$current.contains(target);
|
|
27949
|
+
});
|
|
27950
|
+
const isRootViewport = context.isRootMenu && ((_context$viewport = context.viewport) === null || _context$viewport === void 0 ? void 0 : _context$viewport.contains(target));
|
|
27951
|
+
if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();
|
|
27952
|
+
}),
|
|
27953
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
27954
|
+
const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
|
|
27955
|
+
const isTabKey = event.key === "Tab" && !isMetaKey;
|
|
27956
|
+
if (isTabKey) {
|
|
27957
|
+
const candidates = $322c88a641701f3b$var$getTabbableCandidates(event.currentTarget);
|
|
27958
|
+
const focusedElement = document.activeElement;
|
|
27959
|
+
const index = candidates.findIndex(
|
|
27960
|
+
(candidate) => candidate === focusedElement
|
|
27961
|
+
);
|
|
27962
|
+
const isMovingBackwards = event.shiftKey;
|
|
27963
|
+
const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);
|
|
27964
|
+
if ($322c88a641701f3b$var$focusFirst(nextCandidates))
|
|
27965
|
+
event.preventDefault();
|
|
27966
|
+
else {
|
|
27967
|
+
var _focusProxyRef$curren;
|
|
27968
|
+
(_focusProxyRef$curren = focusProxyRef.current) === null || _focusProxyRef$curren === void 0 || _focusProxyRef$curren.focus();
|
|
27969
|
+
}
|
|
27970
|
+
}
|
|
27971
|
+
}),
|
|
27972
|
+
onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onEscapeKeyDown, (event) => {
|
|
27973
|
+
wasEscapeCloseRef.current = true;
|
|
27974
|
+
})
|
|
27975
|
+
})));
|
|
27976
|
+
});
|
|
27977
|
+
var $322c88a641701f3b$var$VIEWPORT_NAME = "NavigationMenuViewport";
|
|
27978
|
+
var $322c88a641701f3b$export$ee880b97cc6d44a5 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
27979
|
+
const { forceMount, ...viewportProps } = props;
|
|
27980
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, props.__scopeNavigationMenu);
|
|
27981
|
+
const open = Boolean(context.value);
|
|
27982
|
+
return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27983
|
+
present: forceMount || open
|
|
27984
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuViewportImpl, _extends({}, viewportProps, {
|
|
27985
|
+
ref: forwardedRef
|
|
27986
|
+
})));
|
|
27987
|
+
});
|
|
27988
|
+
var $322c88a641701f3b$var$NavigationMenuViewportImpl = /* @__PURE__ */ $yHMN2$forwardRef((props1, forwardedRef) => {
|
|
27989
|
+
const { __scopeNavigationMenu, children, ...viewportImplProps } = props1;
|
|
27990
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, __scopeNavigationMenu);
|
|
27991
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onViewportChange);
|
|
27992
|
+
const viewportContentContext = $322c88a641701f3b$var$useViewportContentContext($322c88a641701f3b$var$CONTENT_NAME, props1.__scopeNavigationMenu);
|
|
27993
|
+
const [size, setSize] = $yHMN2$useState(null);
|
|
27994
|
+
const [content, setContent] = $yHMN2$useState(null);
|
|
27995
|
+
const viewportWidth = size ? (size === null || size === void 0 ? void 0 : size.width) + "px" : void 0;
|
|
27996
|
+
const viewportHeight = size ? (size === null || size === void 0 ? void 0 : size.height) + "px" : void 0;
|
|
27997
|
+
const open = Boolean(context.value);
|
|
27998
|
+
const activeContentValue = open ? context.value : context.previousValue;
|
|
27999
|
+
const handleSizeChange = () => {
|
|
28000
|
+
if (content) setSize({
|
|
28001
|
+
width: content.offsetWidth,
|
|
28002
|
+
height: content.offsetHeight
|
|
28003
|
+
});
|
|
28004
|
+
};
|
|
28005
|
+
$322c88a641701f3b$var$useResizeObserver(content, handleSizeChange);
|
|
28006
|
+
return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
28007
|
+
"data-state": $322c88a641701f3b$var$getOpenState(open),
|
|
28008
|
+
"data-orientation": context.orientation
|
|
28009
|
+
}, viewportImplProps, {
|
|
28010
|
+
ref: composedRefs,
|
|
28011
|
+
style: {
|
|
28012
|
+
// Prevent interaction when animating out
|
|
28013
|
+
pointerEvents: !open && context.isRootMenu ? "none" : void 0,
|
|
28014
|
+
["--radix-navigation-menu-viewport-width"]: viewportWidth,
|
|
28015
|
+
["--radix-navigation-menu-viewport-height"]: viewportHeight,
|
|
28016
|
+
...viewportImplProps.style
|
|
28017
|
+
},
|
|
28018
|
+
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerEnter, context.onContentEnter),
|
|
28019
|
+
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave))
|
|
28020
|
+
}), Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {
|
|
28021
|
+
const isActive = activeContentValue === value;
|
|
28022
|
+
return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
28023
|
+
key: value,
|
|
28024
|
+
present: forceMount || isActive
|
|
28025
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({}, props, {
|
|
28026
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(ref, (node) => {
|
|
28027
|
+
if (isActive && node) setContent(node);
|
|
28028
|
+
})
|
|
28029
|
+
})));
|
|
28030
|
+
}));
|
|
28031
|
+
});
|
|
28032
|
+
var $322c88a641701f3b$var$FOCUS_GROUP_NAME = "FocusGroup";
|
|
28033
|
+
var $322c88a641701f3b$var$FocusGroup = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
28034
|
+
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
28035
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
28036
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Provider, {
|
|
28037
|
+
scope: __scopeNavigationMenu
|
|
28038
|
+
}, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Slot, {
|
|
28039
|
+
scope: __scopeNavigationMenu
|
|
28040
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
28041
|
+
dir: context.dir
|
|
28042
|
+
}, groupProps, {
|
|
28043
|
+
ref: forwardedRef
|
|
28044
|
+
}))));
|
|
28045
|
+
});
|
|
28046
|
+
var $322c88a641701f3b$var$ARROW_KEYS = [
|
|
28047
|
+
"ArrowRight",
|
|
28048
|
+
"ArrowLeft",
|
|
28049
|
+
"ArrowUp",
|
|
28050
|
+
"ArrowDown"
|
|
28051
|
+
];
|
|
28052
|
+
var $322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
|
|
28053
|
+
var $322c88a641701f3b$var$FocusGroupItem = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
|
|
28054
|
+
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
28055
|
+
const getItems = $322c88a641701f3b$var$useFocusGroupCollection(__scopeNavigationMenu);
|
|
28056
|
+
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
|
|
28057
|
+
return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.ItemSlot, {
|
|
28058
|
+
scope: __scopeNavigationMenu
|
|
28059
|
+
}, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({}, groupProps, {
|
|
28060
|
+
ref: forwardedRef,
|
|
28061
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
28062
|
+
const isFocusNavigationKey = [
|
|
28063
|
+
"Home",
|
|
28064
|
+
"End",
|
|
28065
|
+
...$322c88a641701f3b$var$ARROW_KEYS
|
|
28066
|
+
].includes(event.key);
|
|
28067
|
+
if (isFocusNavigationKey) {
|
|
28068
|
+
let candidateNodes = getItems().map(
|
|
28069
|
+
(item) => item.ref.current
|
|
28070
|
+
);
|
|
28071
|
+
const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
28072
|
+
const prevKeys = [
|
|
28073
|
+
prevItemKey,
|
|
28074
|
+
"ArrowUp",
|
|
28075
|
+
"End"
|
|
28076
|
+
];
|
|
28077
|
+
if (prevKeys.includes(event.key)) candidateNodes.reverse();
|
|
28078
|
+
if ($322c88a641701f3b$var$ARROW_KEYS.includes(event.key)) {
|
|
28079
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
28080
|
+
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
28081
|
+
}
|
|
28082
|
+
setTimeout(
|
|
28083
|
+
() => $322c88a641701f3b$var$focusFirst(candidateNodes)
|
|
28084
|
+
);
|
|
28085
|
+
event.preventDefault();
|
|
28086
|
+
}
|
|
28087
|
+
})
|
|
28088
|
+
})));
|
|
28089
|
+
});
|
|
28090
|
+
function $322c88a641701f3b$var$getTabbableCandidates(container) {
|
|
28091
|
+
const nodes = [];
|
|
28092
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
28093
|
+
acceptNode: (node) => {
|
|
28094
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
28095
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
28096
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
28097
|
+
}
|
|
28098
|
+
});
|
|
28099
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
28100
|
+
return nodes;
|
|
28101
|
+
}
|
|
28102
|
+
function $322c88a641701f3b$var$focusFirst(candidates) {
|
|
28103
|
+
const previouslyFocusedElement = document.activeElement;
|
|
28104
|
+
return candidates.some((candidate) => {
|
|
28105
|
+
if (candidate === previouslyFocusedElement) return true;
|
|
28106
|
+
candidate.focus();
|
|
28107
|
+
return document.activeElement !== previouslyFocusedElement;
|
|
28108
|
+
});
|
|
28109
|
+
}
|
|
28110
|
+
function $322c88a641701f3b$var$removeFromTabOrder(candidates) {
|
|
28111
|
+
candidates.forEach((candidate) => {
|
|
28112
|
+
candidate.dataset.tabindex = candidate.getAttribute("tabindex") || "";
|
|
28113
|
+
candidate.setAttribute("tabindex", "-1");
|
|
28114
|
+
});
|
|
28115
|
+
return () => {
|
|
28116
|
+
candidates.forEach((candidate) => {
|
|
28117
|
+
const prevTabIndex = candidate.dataset.tabindex;
|
|
28118
|
+
candidate.setAttribute("tabindex", prevTabIndex);
|
|
28119
|
+
});
|
|
28120
|
+
};
|
|
28121
|
+
}
|
|
28122
|
+
function $322c88a641701f3b$var$useResizeObserver(element, onResize) {
|
|
28123
|
+
const handleResize = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onResize);
|
|
28124
|
+
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
28125
|
+
let rAF = 0;
|
|
28126
|
+
if (element) {
|
|
28127
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
28128
|
+
cancelAnimationFrame(rAF);
|
|
28129
|
+
rAF = window.requestAnimationFrame(handleResize);
|
|
28130
|
+
});
|
|
28131
|
+
resizeObserver.observe(element);
|
|
28132
|
+
return () => {
|
|
28133
|
+
window.cancelAnimationFrame(rAF);
|
|
28134
|
+
resizeObserver.unobserve(element);
|
|
28135
|
+
};
|
|
28136
|
+
}
|
|
28137
|
+
}, [
|
|
28138
|
+
element,
|
|
28139
|
+
handleResize
|
|
28140
|
+
]);
|
|
28141
|
+
}
|
|
28142
|
+
function $322c88a641701f3b$var$getOpenState(open) {
|
|
28143
|
+
return open ? "open" : "closed";
|
|
28144
|
+
}
|
|
28145
|
+
function $322c88a641701f3b$var$makeTriggerId(baseId, value) {
|
|
28146
|
+
return `${baseId}-trigger-${value}`;
|
|
28147
|
+
}
|
|
28148
|
+
function $322c88a641701f3b$var$makeContentId(baseId, value) {
|
|
28149
|
+
return `${baseId}-content-${value}`;
|
|
28150
|
+
}
|
|
28151
|
+
function $322c88a641701f3b$var$whenMouse(handler) {
|
|
28152
|
+
return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
28153
|
+
}
|
|
28154
|
+
var $322c88a641701f3b$export$be92b6f5f03c0fe9 = $322c88a641701f3b$export$5b2278cf1e8bcae2;
|
|
28155
|
+
var $322c88a641701f3b$export$54c2e3dc7acea9f5 = $322c88a641701f3b$export$c361068a95fd2286;
|
|
28156
|
+
var $322c88a641701f3b$export$6d08773d2e66f8f2 = $322c88a641701f3b$export$ffdbb83a2de845c2;
|
|
28157
|
+
var $322c88a641701f3b$export$41fb9f06171c75f4 = $322c88a641701f3b$export$37fe8002734d8f2;
|
|
28158
|
+
var $322c88a641701f3b$export$a6c7ac8248d6e38a = $322c88a641701f3b$export$6893bf21536567da;
|
|
28159
|
+
var $322c88a641701f3b$export$adb584737d712b70 = $322c88a641701f3b$export$8ddb526647c0d8fb;
|
|
28160
|
+
var $322c88a641701f3b$export$7c6e2c02157bb7d2 = $322c88a641701f3b$export$38e00e996c2f93f7;
|
|
28161
|
+
var $322c88a641701f3b$export$d5c6c08dc2d3ca7 = $322c88a641701f3b$export$ee880b97cc6d44a5;
|
|
28162
|
+
|
|
28163
|
+
// src/components/NavigationMenu.tsx
|
|
27119
28164
|
var import_classnames33 = __toESM(require_classnames());
|
|
27120
28165
|
|
|
28166
|
+
// src/components/NavigationMenu.module.css
|
|
28167
|
+
var NavigationMenu_default = {
|
|
28168
|
+
root: "NavigationMenu_root",
|
|
28169
|
+
list: "NavigationMenu_list",
|
|
28170
|
+
trigger: "NavigationMenu_trigger",
|
|
28171
|
+
link: "NavigationMenu_link",
|
|
28172
|
+
content: "NavigationMenu_content",
|
|
28173
|
+
enterFromLeft: "NavigationMenu_enterFromLeft",
|
|
28174
|
+
enterFromRight: "NavigationMenu_enterFromRight",
|
|
28175
|
+
exitToLeft: "NavigationMenu_exitToLeft",
|
|
28176
|
+
exitToRight: "NavigationMenu_exitToRight",
|
|
28177
|
+
indicator: "NavigationMenu_indicator",
|
|
28178
|
+
fadeIn: "NavigationMenu_fadeIn",
|
|
28179
|
+
fadeOut: "NavigationMenu_fadeOut",
|
|
28180
|
+
viewport: "NavigationMenu_viewport",
|
|
28181
|
+
scaleIn: "NavigationMenu_scaleIn",
|
|
28182
|
+
scaleOut: "NavigationMenu_scaleOut",
|
|
28183
|
+
wrapper: "NavigationMenu_wrapper",
|
|
28184
|
+
arrow: "NavigationMenu_arrow"
|
|
28185
|
+
};
|
|
28186
|
+
|
|
28187
|
+
// src/components/NavigationMenu.tsx
|
|
28188
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
28189
|
+
function NavigationMenu({ showArrow = true, children, ...props }) {
|
|
28190
|
+
return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$be92b6f5f03c0fe9, { ...props, className: NavigationMenu_default.root, children: [
|
|
28191
|
+
/* @__PURE__ */ jsxs22($322c88a641701f3b$export$54c2e3dc7acea9f5, { className: NavigationMenu_default.list, children: [
|
|
28192
|
+
children,
|
|
28193
|
+
showArrow && /* @__PURE__ */ jsx39($322c88a641701f3b$export$adb584737d712b70, { className: NavigationMenu_default.indicator, children: /* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.arrow }) })
|
|
28194
|
+
] }),
|
|
28195
|
+
/* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.wrapper, children: /* @__PURE__ */ jsx39($322c88a641701f3b$export$d5c6c08dc2d3ca7, { className: NavigationMenu_default.viewport }) })
|
|
28196
|
+
] });
|
|
28197
|
+
}
|
|
28198
|
+
function NavigationMenuItem({ children, className, ...props }) {
|
|
28199
|
+
return /* @__PURE__ */ jsx39($322c88a641701f3b$export$6d08773d2e66f8f2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
|
|
28200
|
+
}
|
|
28201
|
+
function NavigationMenuTrigger({
|
|
28202
|
+
children,
|
|
28203
|
+
className,
|
|
28204
|
+
...props
|
|
28205
|
+
}) {
|
|
28206
|
+
return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$41fb9f06171c75f4, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.trigger, className), children: [
|
|
28207
|
+
children,
|
|
28208
|
+
/* @__PURE__ */ jsx39(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx39(Icons.Chevron, {}) })
|
|
28209
|
+
] });
|
|
28210
|
+
}
|
|
28211
|
+
function NavigationMenuContent({
|
|
28212
|
+
children,
|
|
28213
|
+
className,
|
|
28214
|
+
...props
|
|
28215
|
+
}) {
|
|
28216
|
+
return /* @__PURE__ */ jsx39($322c88a641701f3b$export$7c6e2c02157bb7d2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.content, className), children });
|
|
28217
|
+
}
|
|
28218
|
+
function NavigationMenuLink({ children, className, ...props }) {
|
|
28219
|
+
return /* @__PURE__ */ jsx39($322c88a641701f3b$export$a6c7ac8248d6e38a, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.link, className), children });
|
|
28220
|
+
}
|
|
28221
|
+
|
|
28222
|
+
// src/components/PasswordField.tsx
|
|
28223
|
+
import { useState as useState8, forwardRef as forwardRef4 } from "react";
|
|
28224
|
+
var import_classnames34 = __toESM(require_classnames());
|
|
28225
|
+
|
|
27121
28226
|
// src/components/PasswordField.module.css
|
|
27122
28227
|
var PasswordField_default = {
|
|
27123
28228
|
icon: "PasswordField_icon"
|
|
27124
28229
|
};
|
|
27125
28230
|
|
|
27126
28231
|
// src/components/PasswordField.tsx
|
|
27127
|
-
import { jsx as
|
|
28232
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
27128
28233
|
var PasswordField = forwardRef4(
|
|
27129
28234
|
({ label, className, ...props }, ref) => {
|
|
27130
|
-
const [show, setShow] =
|
|
28235
|
+
const [show, setShow] = useState8(false);
|
|
27131
28236
|
const type = show ? "text" : "password";
|
|
27132
28237
|
const handleShowPassword = () => setShow((state) => !state);
|
|
27133
|
-
return /* @__PURE__ */
|
|
27134
|
-
label && /* @__PURE__ */
|
|
27135
|
-
/* @__PURE__ */
|
|
27136
|
-
/* @__PURE__ */
|
|
27137
|
-
/* @__PURE__ */
|
|
28238
|
+
return /* @__PURE__ */ jsxs23($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames34.default)(Input_default.field, className), children: [
|
|
28239
|
+
label && /* @__PURE__ */ jsx40(Label, { children: label }),
|
|
28240
|
+
/* @__PURE__ */ jsxs23("div", { className: Input_default.row, children: [
|
|
28241
|
+
/* @__PURE__ */ jsx40($3985021b0ad6602f$export$f5b8910cec6cf069, { type, className: Input_default.input }),
|
|
28242
|
+
/* @__PURE__ */ jsx40(Icon, { onClick: handleShowPassword, className: (0, import_classnames34.default)(PasswordField_default.icon, Input_default.icon), children: show ? /* @__PURE__ */ jsx40(Icons.EyeSlash, {}) : /* @__PURE__ */ jsx40(Icons.Eye, {}) })
|
|
27138
28243
|
] })
|
|
27139
28244
|
] });
|
|
27140
28245
|
}
|
|
27141
28246
|
);
|
|
27142
28247
|
|
|
27143
28248
|
// src/components/Page.tsx
|
|
27144
|
-
var
|
|
28249
|
+
var import_classnames35 = __toESM(require_classnames());
|
|
27145
28250
|
|
|
27146
28251
|
// src/components/Page.module.css
|
|
27147
28252
|
var Page_default = {
|
|
@@ -27149,13 +28254,13 @@ var Page_default = {
|
|
|
27149
28254
|
};
|
|
27150
28255
|
|
|
27151
28256
|
// src/components/Page.tsx
|
|
27152
|
-
import { jsx as
|
|
28257
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
27153
28258
|
function Page({ className, children, ...props }) {
|
|
27154
|
-
return /* @__PURE__ */
|
|
28259
|
+
return /* @__PURE__ */ jsx41("div", { ...props, className: (0, import_classnames35.default)(Page_default.page, className), children });
|
|
27155
28260
|
}
|
|
27156
28261
|
|
|
27157
28262
|
// src/components/ProgressBar.tsx
|
|
27158
|
-
var
|
|
28263
|
+
var import_classnames36 = __toESM(require_classnames());
|
|
27159
28264
|
|
|
27160
28265
|
// src/components/ProgressBar.module.css
|
|
27161
28266
|
var ProgressBar_default = {
|
|
@@ -27166,18 +28271,18 @@ var ProgressBar_default = {
|
|
|
27166
28271
|
};
|
|
27167
28272
|
|
|
27168
28273
|
// src/components/ProgressBar.tsx
|
|
27169
|
-
import { Fragment as Fragment5, jsx as
|
|
28274
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
27170
28275
|
function ProgressBar({ className, showValue, ...props }) {
|
|
27171
|
-
return /* @__PURE__ */
|
|
27172
|
-
return /* @__PURE__ */
|
|
27173
|
-
/* @__PURE__ */
|
|
27174
|
-
showValue && /* @__PURE__ */
|
|
28276
|
+
return /* @__PURE__ */ jsx42($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames36.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
|
|
28277
|
+
return /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
28278
|
+
/* @__PURE__ */ jsx42("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
|
|
28279
|
+
showValue && /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.value, children: valueText })
|
|
27175
28280
|
] });
|
|
27176
28281
|
} });
|
|
27177
28282
|
}
|
|
27178
28283
|
|
|
27179
28284
|
// src/components/ProgressCircle.tsx
|
|
27180
|
-
var
|
|
28285
|
+
var import_classnames37 = __toESM(require_classnames());
|
|
27181
28286
|
|
|
27182
28287
|
// src/components/ProgressCircle.module.css
|
|
27183
28288
|
var ProgressCircle_default = {
|
|
@@ -27188,16 +28293,16 @@ var ProgressCircle_default = {
|
|
|
27188
28293
|
};
|
|
27189
28294
|
|
|
27190
28295
|
// src/components/ProgressCircle.tsx
|
|
27191
|
-
import { Fragment as Fragment6, jsx as
|
|
28296
|
+
import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
27192
28297
|
function ProgressCircle({ className, showValue, ...props }) {
|
|
27193
|
-
return /* @__PURE__ */
|
|
28298
|
+
return /* @__PURE__ */ jsx43($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames37.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
|
|
27194
28299
|
const radius = 45;
|
|
27195
28300
|
const circumference = radius * 2 * Math.PI;
|
|
27196
28301
|
const offset = circumference - percentage / 100 * circumference;
|
|
27197
|
-
return /* @__PURE__ */
|
|
27198
|
-
/* @__PURE__ */
|
|
27199
|
-
/* @__PURE__ */
|
|
27200
|
-
/* @__PURE__ */
|
|
28302
|
+
return /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
28303
|
+
/* @__PURE__ */ jsxs25("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
28304
|
+
/* @__PURE__ */ jsx43("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
|
|
28305
|
+
/* @__PURE__ */ jsx43(
|
|
27201
28306
|
"circle",
|
|
27202
28307
|
{
|
|
27203
28308
|
className: ProgressCircle_default.fill,
|
|
@@ -27209,14 +28314,14 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
27209
28314
|
}
|
|
27210
28315
|
)
|
|
27211
28316
|
] }),
|
|
27212
|
-
showValue && /* @__PURE__ */
|
|
28317
|
+
showValue && /* @__PURE__ */ jsx43("label", { className: ProgressCircle_default.value, children: valueText })
|
|
27213
28318
|
] });
|
|
27214
28319
|
} });
|
|
27215
28320
|
}
|
|
27216
28321
|
|
|
27217
28322
|
// src/components/RadioGroup.tsx
|
|
27218
28323
|
import { forwardRef as forwardRef5 } from "react";
|
|
27219
|
-
var
|
|
28324
|
+
var import_classnames38 = __toESM(require_classnames());
|
|
27220
28325
|
|
|
27221
28326
|
// src/components/RadioGroup.module.css
|
|
27222
28327
|
var RadioGroup_default = {
|
|
@@ -27225,22 +28330,22 @@ var RadioGroup_default = {
|
|
|
27225
28330
|
};
|
|
27226
28331
|
|
|
27227
28332
|
// src/components/RadioGroup.tsx
|
|
27228
|
-
import { jsx as
|
|
28333
|
+
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
27229
28334
|
var RadioGroup = forwardRef5(
|
|
27230
28335
|
({ label, children, className, ...props }, ref) => {
|
|
27231
|
-
return /* @__PURE__ */
|
|
27232
|
-
label && /* @__PURE__ */
|
|
28336
|
+
return /* @__PURE__ */ jsxs26($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames38.default)(RadioGroup_default.radiogroup, className), children: [
|
|
28337
|
+
label && /* @__PURE__ */ jsx44(Label, { children: label }),
|
|
27233
28338
|
children
|
|
27234
28339
|
] });
|
|
27235
28340
|
}
|
|
27236
28341
|
);
|
|
27237
28342
|
function Radio({ children, className, ...props }) {
|
|
27238
|
-
return /* @__PURE__ */
|
|
28343
|
+
return /* @__PURE__ */ jsx44($b6c3ddc6086f204d$export$d7b12c4107be0d61, { ...props, className: (0, import_classnames38.default)(RadioGroup_default.radio, className), children });
|
|
27239
28344
|
}
|
|
27240
28345
|
|
|
27241
28346
|
// src/components/SearchField.tsx
|
|
27242
|
-
import { useState as
|
|
27243
|
-
var
|
|
28347
|
+
import { useState as useState9, useEffect as useEffect4, forwardRef as forwardRef6 } from "react";
|
|
28348
|
+
var import_classnames39 = __toESM(require_classnames());
|
|
27244
28349
|
|
|
27245
28350
|
// src/components/SearchField.module.css
|
|
27246
28351
|
var SearchField_default = {
|
|
@@ -27250,10 +28355,10 @@ var SearchField_default = {
|
|
|
27250
28355
|
};
|
|
27251
28356
|
|
|
27252
28357
|
// src/components/SearchField.tsx
|
|
27253
|
-
import { Fragment as Fragment7, jsx as
|
|
28358
|
+
import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
27254
28359
|
var SearchField = forwardRef6(
|
|
27255
28360
|
({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
27256
|
-
const [search, setSearch] =
|
|
28361
|
+
const [search, setSearch] = useState9(value ?? "");
|
|
27257
28362
|
const searchValue = useDebounce(search, delay);
|
|
27258
28363
|
const handleChange = (e) => {
|
|
27259
28364
|
const { value: value2 } = e.target;
|
|
@@ -27271,24 +28376,24 @@ var SearchField = forwardRef6(
|
|
|
27271
28376
|
onSearch?.(searchValue);
|
|
27272
28377
|
}
|
|
27273
28378
|
}, [searchValue, delay, onSearch]);
|
|
27274
|
-
return /* @__PURE__ */
|
|
27275
|
-
return /* @__PURE__ */
|
|
27276
|
-
label && /* @__PURE__ */
|
|
27277
|
-
/* @__PURE__ */
|
|
27278
|
-
/* @__PURE__ */
|
|
27279
|
-
/* @__PURE__ */
|
|
28379
|
+
return /* @__PURE__ */ jsx45($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames39.default)(Input_default.field, className), children: ({ state }) => {
|
|
28380
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
28381
|
+
label && /* @__PURE__ */ jsx45(Label, { children: label }),
|
|
28382
|
+
/* @__PURE__ */ jsxs27("div", { className: Input_default.row, children: [
|
|
28383
|
+
/* @__PURE__ */ jsx45(Icons.MagnifyingGlass, { className: (0, import_classnames39.default)(SearchField_default.search, Input_default.icon) }),
|
|
28384
|
+
/* @__PURE__ */ jsx45(
|
|
27280
28385
|
$3985021b0ad6602f$export$f5b8910cec6cf069,
|
|
27281
28386
|
{
|
|
27282
|
-
className: (0,
|
|
28387
|
+
className: (0, import_classnames39.default)(SearchField_default.input, Input_default.input),
|
|
27283
28388
|
onChange: handleChange
|
|
27284
28389
|
}
|
|
27285
28390
|
),
|
|
27286
|
-
state.value && /* @__PURE__ */
|
|
28391
|
+
state.value && /* @__PURE__ */ jsx45(
|
|
27287
28392
|
$d2b4bc8c273e7be6$export$353f5b6fc5456de1,
|
|
27288
28393
|
{
|
|
27289
|
-
className: (0,
|
|
28394
|
+
className: (0, import_classnames39.default)(SearchField_default.close, Input_default.icon),
|
|
27290
28395
|
onPress: resetSearch,
|
|
27291
|
-
children: /* @__PURE__ */
|
|
28396
|
+
children: /* @__PURE__ */ jsx45(Icon, { children: /* @__PURE__ */ jsx45(Icons.Close, {}) })
|
|
27292
28397
|
}
|
|
27293
28398
|
)
|
|
27294
28399
|
] })
|
|
@@ -27298,7 +28403,7 @@ var SearchField = forwardRef6(
|
|
|
27298
28403
|
);
|
|
27299
28404
|
|
|
27300
28405
|
// src/components/Select.tsx
|
|
27301
|
-
var
|
|
28406
|
+
var import_classnames40 = __toESM(require_classnames());
|
|
27302
28407
|
import { forwardRef as forwardRef7 } from "react";
|
|
27303
28408
|
|
|
27304
28409
|
// src/components/Select.module.css
|
|
@@ -27310,7 +28415,7 @@ var Select_default = {
|
|
|
27310
28415
|
};
|
|
27311
28416
|
|
|
27312
28417
|
// src/components/Select.tsx
|
|
27313
|
-
import { jsx as
|
|
28418
|
+
import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
27314
28419
|
var Select = forwardRef7(
|
|
27315
28420
|
({
|
|
27316
28421
|
children,
|
|
@@ -27326,20 +28431,20 @@ var Select = forwardRef7(
|
|
|
27326
28431
|
onSelectionChange?.(e);
|
|
27327
28432
|
onChange?.(e);
|
|
27328
28433
|
};
|
|
27329
|
-
return /* @__PURE__ */
|
|
28434
|
+
return /* @__PURE__ */ jsxs28(
|
|
27330
28435
|
$82d7e5349645de74$export$ef9b1a59e592288f,
|
|
27331
28436
|
{
|
|
27332
28437
|
...props,
|
|
27333
28438
|
ref,
|
|
27334
|
-
className: (0,
|
|
28439
|
+
className: (0, import_classnames40.default)(Input_default.field, className),
|
|
27335
28440
|
onSelectionChange: handleChange,
|
|
27336
28441
|
children: [
|
|
27337
|
-
label && /* @__PURE__ */
|
|
27338
|
-
/* @__PURE__ */
|
|
27339
|
-
/* @__PURE__ */
|
|
27340
|
-
/* @__PURE__ */
|
|
28442
|
+
label && /* @__PURE__ */ jsx46(Label, { children: label }),
|
|
28443
|
+
/* @__PURE__ */ jsx46($d2b4bc8c273e7be6$export$353f5b6fc5456de1, { className: (0, import_classnames40.default)(Input_default.input, className), children: /* @__PURE__ */ jsxs28(Row, { justifyContent: "space-between", gap: "md", children: [
|
|
28444
|
+
/* @__PURE__ */ jsx46($82d7e5349645de74$export$e288731fd71264f0, {}),
|
|
28445
|
+
/* @__PURE__ */ jsx46("span", { "aria-hidden": "true", children: /* @__PURE__ */ jsx46(Icon, { rotate: 90, size: "xs", className: Input_default.icon, children: /* @__PURE__ */ jsx46(Icons.Chevron, {}) }) })
|
|
27341
28446
|
] }) }),
|
|
27342
|
-
/* @__PURE__ */
|
|
28447
|
+
/* @__PURE__ */ jsx46(Popover, { children: /* @__PURE__ */ jsx46(List, { items, className: Select_default.list, children }) })
|
|
27343
28448
|
]
|
|
27344
28449
|
}
|
|
27345
28450
|
);
|
|
@@ -27348,7 +28453,7 @@ var Select = forwardRef7(
|
|
|
27348
28453
|
|
|
27349
28454
|
// src/components/Slider.tsx
|
|
27350
28455
|
import { forwardRef as forwardRef8 } from "react";
|
|
27351
|
-
var
|
|
28456
|
+
var import_classnames41 = __toESM(require_classnames());
|
|
27352
28457
|
|
|
27353
28458
|
// src/components/Slider.module.css
|
|
27354
28459
|
var Slider_default = {
|
|
@@ -27360,18 +28465,18 @@ var Slider_default = {
|
|
|
27360
28465
|
};
|
|
27361
28466
|
|
|
27362
28467
|
// src/components/Slider.tsx
|
|
27363
|
-
import { Fragment as Fragment8, jsx as
|
|
28468
|
+
import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
27364
28469
|
var Slider = forwardRef8(
|
|
27365
28470
|
({ className, showValue = true, label, ...props }, ref) => {
|
|
27366
|
-
return /* @__PURE__ */
|
|
27367
|
-
/* @__PURE__ */
|
|
27368
|
-
label && /* @__PURE__ */
|
|
27369
|
-
showValue && /* @__PURE__ */
|
|
28471
|
+
return /* @__PURE__ */ jsxs29($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames41.default)(Slider_default.slider, className), children: [
|
|
28472
|
+
/* @__PURE__ */ jsxs29("div", { className: Slider_default.header, children: [
|
|
28473
|
+
label && /* @__PURE__ */ jsx47(Label, { className: Slider_default.label, children: label }),
|
|
28474
|
+
showValue && /* @__PURE__ */ jsx47($6f909507e6374d18$export$a590f758a961cb5b, { className: Slider_default.output })
|
|
27370
28475
|
] }),
|
|
27371
|
-
/* @__PURE__ */
|
|
28476
|
+
/* @__PURE__ */ jsx47($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
|
|
27372
28477
|
const isHorizontal = state.orientation === "horizontal";
|
|
27373
|
-
return /* @__PURE__ */
|
|
27374
|
-
/* @__PURE__ */
|
|
28478
|
+
return /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
28479
|
+
/* @__PURE__ */ jsx47(
|
|
27375
28480
|
"div",
|
|
27376
28481
|
{
|
|
27377
28482
|
className: Slider_default.fill,
|
|
@@ -27380,7 +28485,7 @@ var Slider = forwardRef8(
|
|
|
27380
28485
|
}
|
|
27381
28486
|
}
|
|
27382
28487
|
),
|
|
27383
|
-
/* @__PURE__ */
|
|
28488
|
+
/* @__PURE__ */ jsx47($6f909507e6374d18$export$2c1b491743890dec, { className: Slider_default.thumb })
|
|
27384
28489
|
] });
|
|
27385
28490
|
} })
|
|
27386
28491
|
] });
|
|
@@ -27388,7 +28493,7 @@ var Slider = forwardRef8(
|
|
|
27388
28493
|
);
|
|
27389
28494
|
|
|
27390
28495
|
// src/components/StatusLight.tsx
|
|
27391
|
-
var
|
|
28496
|
+
var import_classnames42 = __toESM(require_classnames());
|
|
27392
28497
|
|
|
27393
28498
|
// src/components/StatusLight.module.css
|
|
27394
28499
|
var StatusLight_default = {
|
|
@@ -27403,14 +28508,14 @@ var StatusLight_default = {
|
|
|
27403
28508
|
};
|
|
27404
28509
|
|
|
27405
28510
|
// src/components/StatusLight.tsx
|
|
27406
|
-
import { jsx as
|
|
28511
|
+
import { jsx as jsx48, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
27407
28512
|
function StatusLight(props) {
|
|
27408
28513
|
const { color, variant = "inactive", children, className, ...domProps } = props;
|
|
27409
|
-
return /* @__PURE__ */
|
|
27410
|
-
/* @__PURE__ */
|
|
28514
|
+
return /* @__PURE__ */ jsxs30("div", { ...domProps, className: (0, import_classnames42.default)(StatusLight_default.statuslight, className), children: [
|
|
28515
|
+
/* @__PURE__ */ jsx48("div", { className: StatusLight_default.bg, children: /* @__PURE__ */ jsx48(
|
|
27411
28516
|
"div",
|
|
27412
28517
|
{
|
|
27413
|
-
className: (0,
|
|
28518
|
+
className: (0, import_classnames42.default)(StatusLight_default.status, StatusLight_default[variant]),
|
|
27414
28519
|
style: { backgroundColor: color }
|
|
27415
28520
|
}
|
|
27416
28521
|
) }),
|
|
@@ -27420,7 +28525,7 @@ function StatusLight(props) {
|
|
|
27420
28525
|
|
|
27421
28526
|
// src/components/Switch.tsx
|
|
27422
28527
|
import { forwardRef as forwardRef9 } from "react";
|
|
27423
|
-
var
|
|
28528
|
+
var import_classnames43 = __toESM(require_classnames());
|
|
27424
28529
|
|
|
27425
28530
|
// src/components/Switch.module.css
|
|
27426
28531
|
var Switch_default = {
|
|
@@ -27430,21 +28535,21 @@ var Switch_default = {
|
|
|
27430
28535
|
};
|
|
27431
28536
|
|
|
27432
28537
|
// src/components/Switch.tsx
|
|
27433
|
-
import { Fragment as Fragment9, jsx as
|
|
28538
|
+
import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
27434
28539
|
var Switch = forwardRef9(
|
|
27435
28540
|
({ label, children, className, ...props }, ref) => {
|
|
27436
28541
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
27437
|
-
return /* @__PURE__ */
|
|
27438
|
-
label && /* @__PURE__ */
|
|
27439
|
-
/* @__PURE__ */
|
|
28542
|
+
return /* @__PURE__ */ jsxs31(Fragment9, { children: [
|
|
28543
|
+
label && /* @__PURE__ */ jsx49(Label, { children: label }),
|
|
28544
|
+
/* @__PURE__ */ jsxs31(
|
|
27440
28545
|
$8e59e948500a8fe1$export$b5d5cf8927ab7262,
|
|
27441
28546
|
{
|
|
27442
28547
|
...props,
|
|
27443
28548
|
isSelected,
|
|
27444
28549
|
ref,
|
|
27445
|
-
className: (0,
|
|
28550
|
+
className: (0, import_classnames43.default)(Switch_default.switch, className),
|
|
27446
28551
|
children: [
|
|
27447
|
-
/* @__PURE__ */
|
|
28552
|
+
/* @__PURE__ */ jsx49("div", { className: Switch_default.track, children: /* @__PURE__ */ jsx49("div", { className: Switch_default.knob }) }),
|
|
27448
28553
|
children
|
|
27449
28554
|
]
|
|
27450
28555
|
}
|
|
@@ -27462,22 +28567,22 @@ var Tabs_default = {
|
|
|
27462
28567
|
};
|
|
27463
28568
|
|
|
27464
28569
|
// src/components/Tabs.tsx
|
|
27465
|
-
import { jsx as
|
|
28570
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
27466
28571
|
function Tabs({ children, ...props }) {
|
|
27467
|
-
return /* @__PURE__ */
|
|
28572
|
+
return /* @__PURE__ */ jsx50($5e8ad37a45e1c704$export$b2539bed5023c21c, { ...props, className: Tabs_default.tabs, children });
|
|
27468
28573
|
}
|
|
27469
28574
|
function TabList({ children, ...props }) {
|
|
27470
|
-
return /* @__PURE__ */
|
|
28575
|
+
return /* @__PURE__ */ jsx50($5e8ad37a45e1c704$export$e51a686c67fdaa2d, { ...props, className: Tabs_default.list, children });
|
|
27471
28576
|
}
|
|
27472
28577
|
function Tab({ children, ...props }) {
|
|
27473
|
-
return /* @__PURE__ */
|
|
28578
|
+
return /* @__PURE__ */ jsx50($5e8ad37a45e1c704$export$3e41faf802a29e71, { ...props, className: Tabs_default.tab, children });
|
|
27474
28579
|
}
|
|
27475
28580
|
function TabPanel({ children, ...props }) {
|
|
27476
|
-
return /* @__PURE__ */
|
|
28581
|
+
return /* @__PURE__ */ jsx50($5e8ad37a45e1c704$export$3d96ec278d3efce4, { ...props, className: Tabs_default.panel, children });
|
|
27477
28582
|
}
|
|
27478
28583
|
|
|
27479
28584
|
// src/components/TextOverflow.tsx
|
|
27480
|
-
var
|
|
28585
|
+
var import_classnames44 = __toESM(require_classnames());
|
|
27481
28586
|
|
|
27482
28587
|
// src/components/TextOverflow.module.css
|
|
27483
28588
|
var TextOverflow_default = {
|
|
@@ -27486,14 +28591,14 @@ var TextOverflow_default = {
|
|
|
27486
28591
|
};
|
|
27487
28592
|
|
|
27488
28593
|
// src/components/TextOverflow.tsx
|
|
27489
|
-
import { jsx as
|
|
28594
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
27490
28595
|
function TextOverflow({ asChild, children, className, ...props }) {
|
|
27491
28596
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "div";
|
|
27492
|
-
return /* @__PURE__ */
|
|
28597
|
+
return /* @__PURE__ */ jsx51("div", { ...props, className: (0, import_classnames44.default)(TextOverflow_default.wrapper, className), children: /* @__PURE__ */ jsx51(Component, { className: TextOverflow_default.overflow, children }) });
|
|
27493
28598
|
}
|
|
27494
28599
|
|
|
27495
28600
|
// src/components/TextArea.tsx
|
|
27496
|
-
var
|
|
28601
|
+
var import_classnames45 = __toESM(require_classnames());
|
|
27497
28602
|
import { forwardRef as forwardRef10 } from "react";
|
|
27498
28603
|
|
|
27499
28604
|
// src/components/TextArea.module.css
|
|
@@ -27505,21 +28610,21 @@ var TextArea_default = {
|
|
|
27505
28610
|
};
|
|
27506
28611
|
|
|
27507
28612
|
// src/components/TextArea.tsx
|
|
27508
|
-
import { jsx as
|
|
28613
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
27509
28614
|
var TextArea = forwardRef10(({ resize, className, ...props }, ref) => {
|
|
27510
|
-
return /* @__PURE__ */
|
|
28615
|
+
return /* @__PURE__ */ jsx52(
|
|
27511
28616
|
TextField,
|
|
27512
28617
|
{
|
|
27513
28618
|
...props,
|
|
27514
28619
|
ref,
|
|
27515
|
-
className: (0,
|
|
28620
|
+
className: (0, import_classnames45.default)(resize && TextArea_default[`resize-${resize}`]),
|
|
27516
28621
|
asTextArea: true
|
|
27517
28622
|
}
|
|
27518
28623
|
);
|
|
27519
28624
|
});
|
|
27520
28625
|
|
|
27521
28626
|
// src/components/Toast.tsx
|
|
27522
|
-
var
|
|
28627
|
+
var import_classnames46 = __toESM(require_classnames());
|
|
27523
28628
|
import { createElement as createElement3 } from "react";
|
|
27524
28629
|
|
|
27525
28630
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
@@ -27557,7 +28662,7 @@ import React8 from "react";
|
|
|
27557
28662
|
|
|
27558
28663
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
27559
28664
|
import * as React6 from "react";
|
|
27560
|
-
import { jsx as
|
|
28665
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
27561
28666
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
27562
28667
|
let defaultContexts = [];
|
|
27563
28668
|
function createContext3(rootComponentName, defaultContext) {
|
|
@@ -27568,7 +28673,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
27568
28673
|
const { scope, children, ...context } = props;
|
|
27569
28674
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
27570
28675
|
const value = React6.useMemo(() => context, Object.values(context));
|
|
27571
|
-
return /* @__PURE__ */
|
|
28676
|
+
return /* @__PURE__ */ jsx53(Context.Provider, { value, children });
|
|
27572
28677
|
}
|
|
27573
28678
|
function useContext22(consumerName, scope) {
|
|
27574
28679
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
@@ -27618,7 +28723,7 @@ function composeContextScopes(...scopes) {
|
|
|
27618
28723
|
|
|
27619
28724
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
27620
28725
|
import * as React7 from "react";
|
|
27621
|
-
import { Fragment as Fragment10, jsx as
|
|
28726
|
+
import { Fragment as Fragment10, jsx as jsx54 } from "react/jsx-runtime";
|
|
27622
28727
|
var Slot = React7.forwardRef((props, forwardedRef) => {
|
|
27623
28728
|
const { children, ...slotProps } = props;
|
|
27624
28729
|
const childrenArray = React7.Children.toArray(children);
|
|
@@ -27633,9 +28738,9 @@ var Slot = React7.forwardRef((props, forwardedRef) => {
|
|
|
27633
28738
|
return child;
|
|
27634
28739
|
}
|
|
27635
28740
|
});
|
|
27636
|
-
return /* @__PURE__ */
|
|
28741
|
+
return /* @__PURE__ */ jsx54(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
|
|
27637
28742
|
}
|
|
27638
|
-
return /* @__PURE__ */
|
|
28743
|
+
return /* @__PURE__ */ jsx54(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
27639
28744
|
});
|
|
27640
28745
|
Slot.displayName = "Slot";
|
|
27641
28746
|
var SlotClone = React7.forwardRef((props, forwardedRef) => {
|
|
@@ -27652,7 +28757,7 @@ var SlotClone = React7.forwardRef((props, forwardedRef) => {
|
|
|
27652
28757
|
});
|
|
27653
28758
|
SlotClone.displayName = "SlotClone";
|
|
27654
28759
|
var Slottable = ({ children }) => {
|
|
27655
|
-
return /* @__PURE__ */
|
|
28760
|
+
return /* @__PURE__ */ jsx54(Fragment10, { children });
|
|
27656
28761
|
};
|
|
27657
28762
|
function isSlottable(child) {
|
|
27658
28763
|
return React7.isValidElement(child) && child.type === Slottable;
|
|
@@ -27695,7 +28800,7 @@ function getElementRef(element) {
|
|
|
27695
28800
|
}
|
|
27696
28801
|
|
|
27697
28802
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
27698
|
-
import { jsx as
|
|
28803
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
27699
28804
|
function createCollection(name) {
|
|
27700
28805
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
27701
28806
|
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME2);
|
|
@@ -27707,7 +28812,7 @@ function createCollection(name) {
|
|
|
27707
28812
|
const { scope, children } = props;
|
|
27708
28813
|
const ref = React8.useRef(null);
|
|
27709
28814
|
const itemMap = React8.useRef(/* @__PURE__ */ new Map()).current;
|
|
27710
|
-
return /* @__PURE__ */
|
|
28815
|
+
return /* @__PURE__ */ jsx55(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
27711
28816
|
};
|
|
27712
28817
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
27713
28818
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -27716,7 +28821,7 @@ function createCollection(name) {
|
|
|
27716
28821
|
const { scope, children } = props;
|
|
27717
28822
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
27718
28823
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
27719
|
-
return /* @__PURE__ */
|
|
28824
|
+
return /* @__PURE__ */ jsx55(Slot, { ref: composedRefs, children });
|
|
27720
28825
|
}
|
|
27721
28826
|
);
|
|
27722
28827
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -27732,7 +28837,7 @@ function createCollection(name) {
|
|
|
27732
28837
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
27733
28838
|
return () => void context.itemMap.delete(ref);
|
|
27734
28839
|
});
|
|
27735
|
-
return /* @__PURE__ */
|
|
28840
|
+
return /* @__PURE__ */ jsx55(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
27736
28841
|
}
|
|
27737
28842
|
);
|
|
27738
28843
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -27763,7 +28868,7 @@ import * as React12 from "react";
|
|
|
27763
28868
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
27764
28869
|
import * as React9 from "react";
|
|
27765
28870
|
import * as ReactDOM from "react-dom";
|
|
27766
|
-
import { jsx as
|
|
28871
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
27767
28872
|
var NODES = [
|
|
27768
28873
|
"a",
|
|
27769
28874
|
"button",
|
|
@@ -27789,7 +28894,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
27789
28894
|
if (typeof window !== "undefined") {
|
|
27790
28895
|
window[Symbol.for("radix-ui")] = true;
|
|
27791
28896
|
}
|
|
27792
|
-
return /* @__PURE__ */
|
|
28897
|
+
return /* @__PURE__ */ jsx56(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
27793
28898
|
});
|
|
27794
28899
|
Node2.displayName = `Primitive.${node}`;
|
|
27795
28900
|
return { ...primitive, [node]: Node2 };
|
|
@@ -27824,7 +28929,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
27824
28929
|
}
|
|
27825
28930
|
|
|
27826
28931
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
27827
|
-
import { jsx as
|
|
28932
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
27828
28933
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
27829
28934
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
27830
28935
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -27912,7 +29017,7 @@ var DismissableLayer = React12.forwardRef(
|
|
|
27912
29017
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
27913
29018
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
27914
29019
|
}, []);
|
|
27915
|
-
return /* @__PURE__ */
|
|
29020
|
+
return /* @__PURE__ */ jsx57(
|
|
27916
29021
|
Primitive.div,
|
|
27917
29022
|
{
|
|
27918
29023
|
...layerProps,
|
|
@@ -27946,7 +29051,7 @@ var DismissableLayerBranch = React12.forwardRef((props, forwardedRef) => {
|
|
|
27946
29051
|
};
|
|
27947
29052
|
}
|
|
27948
29053
|
}, [context.branches]);
|
|
27949
|
-
return /* @__PURE__ */
|
|
29054
|
+
return /* @__PURE__ */ jsx57(Primitive.div, { ...props, ref: composedRefs });
|
|
27950
29055
|
});
|
|
27951
29056
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
27952
29057
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -28040,14 +29145,14 @@ var useLayoutEffect2 = Boolean(globalThis?.document) ? React13.useLayoutEffect :
|
|
|
28040
29145
|
};
|
|
28041
29146
|
|
|
28042
29147
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
28043
|
-
import { jsx as
|
|
29148
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
28044
29149
|
var PORTAL_NAME = "Portal";
|
|
28045
29150
|
var Portal = React14.forwardRef((props, forwardedRef) => {
|
|
28046
29151
|
const { container: containerProp, ...portalProps } = props;
|
|
28047
29152
|
const [mounted, setMounted] = React14.useState(false);
|
|
28048
29153
|
useLayoutEffect2(() => setMounted(true), []);
|
|
28049
29154
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
28050
|
-
return container ? ReactDOM2.createPortal(/* @__PURE__ */
|
|
29155
|
+
return container ? ReactDOM2.createPortal(/* @__PURE__ */ jsx58(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
28051
29156
|
});
|
|
28052
29157
|
Portal.displayName = PORTAL_NAME;
|
|
28053
29158
|
|
|
@@ -28211,11 +29316,11 @@ function useUncontrolledState({
|
|
|
28211
29316
|
|
|
28212
29317
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
28213
29318
|
import * as React17 from "react";
|
|
28214
|
-
import { jsx as
|
|
29319
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
28215
29320
|
var NAME = "VisuallyHidden";
|
|
28216
29321
|
var VisuallyHidden = React17.forwardRef(
|
|
28217
29322
|
(props, forwardedRef) => {
|
|
28218
|
-
return /* @__PURE__ */
|
|
29323
|
+
return /* @__PURE__ */ jsx59(
|
|
28219
29324
|
Primitive.span,
|
|
28220
29325
|
{
|
|
28221
29326
|
...props,
|
|
@@ -28241,7 +29346,7 @@ var VisuallyHidden = React17.forwardRef(
|
|
|
28241
29346
|
VisuallyHidden.displayName = NAME;
|
|
28242
29347
|
|
|
28243
29348
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
28244
|
-
import { Fragment as Fragment11, jsx as
|
|
29349
|
+
import { Fragment as Fragment11, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
28245
29350
|
var PROVIDER_NAME = "ToastProvider";
|
|
28246
29351
|
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
|
28247
29352
|
var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
|
|
@@ -28264,7 +29369,7 @@ var ToastProvider = (props) => {
|
|
|
28264
29369
|
`Invalid prop \`label\` supplied to \`${PROVIDER_NAME}\`. Expected non-empty \`string\`.`
|
|
28265
29370
|
);
|
|
28266
29371
|
}
|
|
28267
|
-
return /* @__PURE__ */
|
|
29372
|
+
return /* @__PURE__ */ jsx60(Collection.Provider, { scope: __scopeToast, children: /* @__PURE__ */ jsx60(
|
|
28268
29373
|
ToastProviderProvider,
|
|
28269
29374
|
{
|
|
28270
29375
|
scope: __scopeToast,
|
|
@@ -28395,7 +29500,7 @@ var ToastViewport = React18.forwardRef(
|
|
|
28395
29500
|
return () => viewport.removeEventListener("keydown", handleKeyDown);
|
|
28396
29501
|
}
|
|
28397
29502
|
}, [getItems, getSortedTabbableCandidates]);
|
|
28398
|
-
return /* @__PURE__ */
|
|
29503
|
+
return /* @__PURE__ */ jsxs32(
|
|
28399
29504
|
Branch,
|
|
28400
29505
|
{
|
|
28401
29506
|
ref: wrapperRef,
|
|
@@ -28404,7 +29509,7 @@ var ToastViewport = React18.forwardRef(
|
|
|
28404
29509
|
tabIndex: -1,
|
|
28405
29510
|
style: { pointerEvents: hasToasts ? void 0 : "none" },
|
|
28406
29511
|
children: [
|
|
28407
|
-
hasToasts && /* @__PURE__ */
|
|
29512
|
+
hasToasts && /* @__PURE__ */ jsx60(
|
|
28408
29513
|
FocusProxy,
|
|
28409
29514
|
{
|
|
28410
29515
|
ref: headFocusProxyRef,
|
|
@@ -28416,8 +29521,8 @@ var ToastViewport = React18.forwardRef(
|
|
|
28416
29521
|
}
|
|
28417
29522
|
}
|
|
28418
29523
|
),
|
|
28419
|
-
/* @__PURE__ */
|
|
28420
|
-
hasToasts && /* @__PURE__ */
|
|
29524
|
+
/* @__PURE__ */ jsx60(Collection.Slot, { scope: __scopeToast, children: /* @__PURE__ */ jsx60(Primitive.ol, { tabIndex: -1, ...viewportProps, ref: composedRefs }) }),
|
|
29525
|
+
hasToasts && /* @__PURE__ */ jsx60(
|
|
28421
29526
|
FocusProxy,
|
|
28422
29527
|
{
|
|
28423
29528
|
ref: tailFocusProxyRef,
|
|
@@ -28440,7 +29545,7 @@ var FocusProxy = React18.forwardRef(
|
|
|
28440
29545
|
(props, forwardedRef) => {
|
|
28441
29546
|
const { __scopeToast, onFocusFromOutsideViewport, ...proxyProps } = props;
|
|
28442
29547
|
const context = useToastProviderContext(FOCUS_PROXY_NAME, __scopeToast);
|
|
28443
|
-
return /* @__PURE__ */
|
|
29548
|
+
return /* @__PURE__ */ jsx60(
|
|
28444
29549
|
VisuallyHidden,
|
|
28445
29550
|
{
|
|
28446
29551
|
"aria-hidden": true,
|
|
@@ -28471,7 +29576,7 @@ var Toast = React18.forwardRef(
|
|
|
28471
29576
|
defaultProp: defaultOpen,
|
|
28472
29577
|
onChange: onOpenChange
|
|
28473
29578
|
});
|
|
28474
|
-
return /* @__PURE__ */
|
|
29579
|
+
return /* @__PURE__ */ jsx60(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx60(
|
|
28475
29580
|
ToastImpl,
|
|
28476
29581
|
{
|
|
28477
29582
|
open,
|
|
@@ -28587,8 +29692,8 @@ var ToastImpl = React18.forwardRef(
|
|
|
28587
29692
|
return node ? getAnnounceTextContent(node) : null;
|
|
28588
29693
|
}, [node]);
|
|
28589
29694
|
if (!context.viewport) return null;
|
|
28590
|
-
return /* @__PURE__ */
|
|
28591
|
-
announceTextContent && /* @__PURE__ */
|
|
29695
|
+
return /* @__PURE__ */ jsxs32(Fragment11, { children: [
|
|
29696
|
+
announceTextContent && /* @__PURE__ */ jsx60(
|
|
28592
29697
|
ToastAnnounce,
|
|
28593
29698
|
{
|
|
28594
29699
|
__scopeToast,
|
|
@@ -28598,8 +29703,8 @@ var ToastImpl = React18.forwardRef(
|
|
|
28598
29703
|
children: announceTextContent
|
|
28599
29704
|
}
|
|
28600
29705
|
),
|
|
28601
|
-
/* @__PURE__ */
|
|
28602
|
-
/* @__PURE__ */
|
|
29706
|
+
/* @__PURE__ */ jsx60(ToastInteractiveProvider, { scope: __scopeToast, onClose: handleClose, children: ReactDOM4.createPortal(
|
|
29707
|
+
/* @__PURE__ */ jsx60(Collection.ItemSlot, { scope: __scopeToast, children: /* @__PURE__ */ jsx60(
|
|
28603
29708
|
Root,
|
|
28604
29709
|
{
|
|
28605
29710
|
asChild: true,
|
|
@@ -28607,7 +29712,7 @@ var ToastImpl = React18.forwardRef(
|
|
|
28607
29712
|
if (!context.isFocusedToastEscapeKeyDownRef.current) handleClose();
|
|
28608
29713
|
context.isFocusedToastEscapeKeyDownRef.current = false;
|
|
28609
29714
|
}),
|
|
28610
|
-
children: /* @__PURE__ */
|
|
29715
|
+
children: /* @__PURE__ */ jsx60(
|
|
28611
29716
|
Primitive.li,
|
|
28612
29717
|
{
|
|
28613
29718
|
role: "status",
|
|
@@ -28707,7 +29812,7 @@ var ToastAnnounce = (props) => {
|
|
|
28707
29812
|
const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
|
|
28708
29813
|
return () => window.clearTimeout(timer);
|
|
28709
29814
|
}, []);
|
|
28710
|
-
return isAnnounced ? null : /* @__PURE__ */
|
|
29815
|
+
return isAnnounced ? null : /* @__PURE__ */ jsx60(Portal, { asChild: true, children: /* @__PURE__ */ jsx60(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs32(Fragment11, { children: [
|
|
28711
29816
|
context.label,
|
|
28712
29817
|
" ",
|
|
28713
29818
|
children
|
|
@@ -28717,7 +29822,7 @@ var TITLE_NAME = "ToastTitle";
|
|
|
28717
29822
|
var ToastTitle = React18.forwardRef(
|
|
28718
29823
|
(props, forwardedRef) => {
|
|
28719
29824
|
const { __scopeToast, ...titleProps } = props;
|
|
28720
|
-
return /* @__PURE__ */
|
|
29825
|
+
return /* @__PURE__ */ jsx60(Primitive.div, { ...titleProps, ref: forwardedRef });
|
|
28721
29826
|
}
|
|
28722
29827
|
);
|
|
28723
29828
|
ToastTitle.displayName = TITLE_NAME;
|
|
@@ -28725,7 +29830,7 @@ var DESCRIPTION_NAME = "ToastDescription";
|
|
|
28725
29830
|
var ToastDescription = React18.forwardRef(
|
|
28726
29831
|
(props, forwardedRef) => {
|
|
28727
29832
|
const { __scopeToast, ...descriptionProps } = props;
|
|
28728
|
-
return /* @__PURE__ */
|
|
29833
|
+
return /* @__PURE__ */ jsx60(Primitive.div, { ...descriptionProps, ref: forwardedRef });
|
|
28729
29834
|
}
|
|
28730
29835
|
);
|
|
28731
29836
|
ToastDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -28739,7 +29844,7 @@ var ToastAction = React18.forwardRef(
|
|
|
28739
29844
|
);
|
|
28740
29845
|
return null;
|
|
28741
29846
|
}
|
|
28742
|
-
return /* @__PURE__ */
|
|
29847
|
+
return /* @__PURE__ */ jsx60(ToastAnnounceExclude, { altText, asChild: true, children: /* @__PURE__ */ jsx60(ToastClose, { ...actionProps, ref: forwardedRef }) });
|
|
28743
29848
|
}
|
|
28744
29849
|
);
|
|
28745
29850
|
ToastAction.displayName = ACTION_NAME;
|
|
@@ -28748,7 +29853,7 @@ var ToastClose = React18.forwardRef(
|
|
|
28748
29853
|
(props, forwardedRef) => {
|
|
28749
29854
|
const { __scopeToast, ...closeProps } = props;
|
|
28750
29855
|
const interactiveContext = useToastInteractiveContext(CLOSE_NAME, __scopeToast);
|
|
28751
|
-
return /* @__PURE__ */
|
|
29856
|
+
return /* @__PURE__ */ jsx60(ToastAnnounceExclude, { asChild: true, children: /* @__PURE__ */ jsx60(
|
|
28752
29857
|
Primitive.button,
|
|
28753
29858
|
{
|
|
28754
29859
|
type: "button",
|
|
@@ -28762,7 +29867,7 @@ var ToastClose = React18.forwardRef(
|
|
|
28762
29867
|
ToastClose.displayName = CLOSE_NAME;
|
|
28763
29868
|
var ToastAnnounceExclude = React18.forwardRef((props, forwardedRef) => {
|
|
28764
29869
|
const { __scopeToast, altText, ...announceExcludeProps } = props;
|
|
28765
|
-
return /* @__PURE__ */
|
|
29870
|
+
return /* @__PURE__ */ jsx60(
|
|
28766
29871
|
Primitive.div,
|
|
28767
29872
|
{
|
|
28768
29873
|
"data-radix-toast-announce-exclude": "",
|
|
@@ -28868,7 +29973,7 @@ var Toast_default = {
|
|
|
28868
29973
|
};
|
|
28869
29974
|
|
|
28870
29975
|
// src/components/Toast.tsx
|
|
28871
|
-
import { Fragment as Fragment12, jsx as
|
|
29976
|
+
import { Fragment as Fragment12, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
28872
29977
|
import { createElement as createElement4 } from "react";
|
|
28873
29978
|
var icons = {
|
|
28874
29979
|
info: Icons.Info,
|
|
@@ -28884,27 +29989,27 @@ function Toast2({
|
|
|
28884
29989
|
children,
|
|
28885
29990
|
...props
|
|
28886
29991
|
}) {
|
|
28887
|
-
return /* @__PURE__ */
|
|
28888
|
-
/* @__PURE__ */
|
|
28889
|
-
title && /* @__PURE__ */
|
|
28890
|
-
description && /* @__PURE__ */
|
|
28891
|
-
children && /* @__PURE__ */
|
|
28892
|
-
!children && allowClose && /* @__PURE__ */
|
|
29992
|
+
return /* @__PURE__ */ jsxs33(Root2, { ...props, className: (0, import_classnames46.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
29993
|
+
/* @__PURE__ */ jsx61(Icon, { className: Toast_default.icon, size: "md", children: variant && createElement3(icons[variant]) }),
|
|
29994
|
+
title && /* @__PURE__ */ jsx61(ToastTitle, { className: Toast_default.title, children: title }),
|
|
29995
|
+
description && /* @__PURE__ */ jsx61(ToastDescription, { className: Toast_default.description, children: description }),
|
|
29996
|
+
children && /* @__PURE__ */ jsx61(ToastAction, { className: Toast_default.action, altText: actionText || "Action", asChild: true, children }),
|
|
29997
|
+
!children && allowClose && /* @__PURE__ */ jsx61(ToastClose, { className: Toast_default.close, "aria-label": "Close", children: /* @__PURE__ */ jsx61(Icon, { size: "sm", "aria-hidden": true, children: /* @__PURE__ */ jsx61(Icons.Close, {}) }) })
|
|
28893
29998
|
] });
|
|
28894
29999
|
}
|
|
28895
30000
|
function Toaster(props) {
|
|
28896
30001
|
const { toasts } = useToast();
|
|
28897
|
-
return /* @__PURE__ */
|
|
30002
|
+
return /* @__PURE__ */ jsxs33(Fragment12, { children: [
|
|
28898
30003
|
toasts.map(({ id, message, props: props2 }) => {
|
|
28899
30004
|
return /* @__PURE__ */ createElement4(Toast2, { ...props2, key: id, description: message });
|
|
28900
30005
|
}),
|
|
28901
|
-
/* @__PURE__ */
|
|
30006
|
+
/* @__PURE__ */ jsx61(Viewport, { className: Toast_default.viewport, ...props })
|
|
28902
30007
|
] });
|
|
28903
30008
|
}
|
|
28904
30009
|
|
|
28905
30010
|
// src/components/Toggle.tsx
|
|
28906
30011
|
import { forwardRef as forwardRef17 } from "react";
|
|
28907
|
-
var
|
|
30012
|
+
var import_classnames47 = __toESM(require_classnames());
|
|
28908
30013
|
|
|
28909
30014
|
// src/components/Toggle.module.css
|
|
28910
30015
|
var Toggle_default = {
|
|
@@ -28912,19 +30017,19 @@ var Toggle_default = {
|
|
|
28912
30017
|
};
|
|
28913
30018
|
|
|
28914
30019
|
// src/components/Toggle.tsx
|
|
28915
|
-
import { Fragment as Fragment13, jsx as
|
|
30020
|
+
import { Fragment as Fragment13, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
28916
30021
|
var Toggle = forwardRef17(
|
|
28917
30022
|
({ label, children, className, ...props }, ref) => {
|
|
28918
30023
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
28919
|
-
return /* @__PURE__ */
|
|
28920
|
-
label && /* @__PURE__ */
|
|
28921
|
-
/* @__PURE__ */
|
|
30024
|
+
return /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
30025
|
+
label && /* @__PURE__ */ jsx62(Label, { children: label }),
|
|
30026
|
+
/* @__PURE__ */ jsx62(
|
|
28922
30027
|
$efde0372d7a700fe$export$d2b052e7b4be1756,
|
|
28923
30028
|
{
|
|
28924
30029
|
...props,
|
|
28925
30030
|
ref,
|
|
28926
30031
|
isSelected,
|
|
28927
|
-
className: (0,
|
|
30032
|
+
className: (0, import_classnames47.default)(Toggle_default.toggle, className),
|
|
28928
30033
|
children
|
|
28929
30034
|
}
|
|
28930
30035
|
)
|
|
@@ -28933,7 +30038,7 @@ var Toggle = forwardRef17(
|
|
|
28933
30038
|
);
|
|
28934
30039
|
|
|
28935
30040
|
// src/components/ToggleGroup.tsx
|
|
28936
|
-
var
|
|
30041
|
+
var import_classnames48 = __toESM(require_classnames());
|
|
28937
30042
|
|
|
28938
30043
|
// node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
28939
30044
|
import $jFibJ$react from "react";
|
|
@@ -29350,16 +30455,16 @@ var ToggleGroup_default = {
|
|
|
29350
30455
|
};
|
|
29351
30456
|
|
|
29352
30457
|
// src/components/ToggleGroup.tsx
|
|
29353
|
-
import { jsx as
|
|
30458
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
29354
30459
|
function ToggleGroup({ className, children, ...props }) {
|
|
29355
|
-
return /* @__PURE__ */
|
|
30460
|
+
return /* @__PURE__ */ jsx63($6c1fd9e6a8969628$export$af3ec21f6cfb5e30, { ...props, className: (0, import_classnames48.default)(ToggleGroup_default.group, className), children });
|
|
29356
30461
|
}
|
|
29357
30462
|
function ToggleGroupItem({ className, children, ...props }) {
|
|
29358
|
-
return /* @__PURE__ */
|
|
30463
|
+
return /* @__PURE__ */ jsx63($6c1fd9e6a8969628$export$b453109e13abe10b, { ...props, className: (0, import_classnames48.default)(ToggleGroup_default.item, className), children });
|
|
29359
30464
|
}
|
|
29360
30465
|
|
|
29361
30466
|
// src/components/Tooltip.tsx
|
|
29362
|
-
var
|
|
30467
|
+
var import_classnames49 = __toESM(require_classnames());
|
|
29363
30468
|
|
|
29364
30469
|
// src/components/Tooltip.module.css
|
|
29365
30470
|
var Tooltip_default = {
|
|
@@ -29369,21 +30474,21 @@ var Tooltip_default = {
|
|
|
29369
30474
|
};
|
|
29370
30475
|
|
|
29371
30476
|
// src/components/Tooltip.tsx
|
|
29372
|
-
import { jsx as
|
|
30477
|
+
import { jsx as jsx64, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
29373
30478
|
function Tooltip({ children, className, ...props }) {
|
|
29374
|
-
return /* @__PURE__ */
|
|
29375
|
-
/* @__PURE__ */
|
|
30479
|
+
return /* @__PURE__ */ jsxs35($4e3b923658d69c60$export$28c660c63b792dea, { ...props, className: (0, import_classnames49.default)(Tooltip_default.tooltip, className), children: [
|
|
30480
|
+
/* @__PURE__ */ jsx64($44f671af83e7d9e0$export$746d02f47f4d381, { className: Tooltip_default.arrow, children: /* @__PURE__ */ jsx64("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx64("path", { d: "M0 0 L4 4 L8 0" }) }) }),
|
|
29376
30481
|
children
|
|
29377
30482
|
] });
|
|
29378
30483
|
}
|
|
29379
30484
|
|
|
29380
30485
|
// src/components/ZenProvider.tsx
|
|
29381
|
-
import { jsx as
|
|
30486
|
+
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
29382
30487
|
function ZenProvider({ config = {}, children }) {
|
|
29383
30488
|
const { toast: toast2 } = config;
|
|
29384
|
-
return /* @__PURE__ */
|
|
30489
|
+
return /* @__PURE__ */ jsxs36(ToastProvider, { ...toast2, children: [
|
|
29385
30490
|
children,
|
|
29386
|
-
/* @__PURE__ */
|
|
30491
|
+
/* @__PURE__ */ jsx65(Toaster, {})
|
|
29387
30492
|
] });
|
|
29388
30493
|
}
|
|
29389
30494
|
export {
|
|
@@ -29414,6 +30519,7 @@ export {
|
|
|
29414
30519
|
FormResetButton,
|
|
29415
30520
|
FormSubmitButton,
|
|
29416
30521
|
Heading,
|
|
30522
|
+
HoverTrigger,
|
|
29417
30523
|
Icon,
|
|
29418
30524
|
Icons,
|
|
29419
30525
|
InlineEditField,
|
|
@@ -29426,6 +30532,11 @@ export {
|
|
|
29426
30532
|
MenuItem2 as MenuItem,
|
|
29427
30533
|
$3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger,
|
|
29428
30534
|
Modal,
|
|
30535
|
+
NavigationMenu,
|
|
30536
|
+
NavigationMenuContent,
|
|
30537
|
+
NavigationMenuItem,
|
|
30538
|
+
NavigationMenuLink,
|
|
30539
|
+
NavigationMenuTrigger,
|
|
29429
30540
|
Page,
|
|
29430
30541
|
PasswordField,
|
|
29431
30542
|
Popover,
|