@umami/react-zen 0.11.0 → 0.13.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 +27 -187
- package/dist/index.d.ts +25 -69
- package/dist/index.js +347 -1318
- package/dist/index.mjs +184 -1155
- package/dist/zen.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
72
72
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
73
73
|
}
|
|
74
74
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
75
|
-
var useState15 = React19.useState,
|
|
75
|
+
var useState15 = React19.useState, useEffect12 = React19.useEffect, useLayoutEffect3 = React19.useLayoutEffect, useDebugValue2 = React19.useDebugValue;
|
|
76
76
|
var didWarnOld18Alpha = false;
|
|
77
77
|
var didWarnUncachedGetSnapshot = false;
|
|
78
78
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -109,7 +109,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
|
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
}, [subscribe, value, getSnapshot]);
|
|
112
|
-
|
|
112
|
+
useEffect12(function() {
|
|
113
113
|
if (checkIfSnapshotChanged(inst)) {
|
|
114
114
|
forceUpdate({
|
|
115
115
|
inst
|
|
@@ -242,7 +242,7 @@ var require_with_selector_development = __commonJS({
|
|
|
242
242
|
}
|
|
243
243
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
244
244
|
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
245
|
-
var useRef8 = React19.useRef,
|
|
245
|
+
var useRef8 = React19.useRef, useEffect12 = React19.useEffect, useMemo4 = React19.useMemo, useDebugValue2 = React19.useDebugValue;
|
|
246
246
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
247
247
|
var instRef = useRef8(null);
|
|
248
248
|
var inst;
|
|
@@ -299,7 +299,7 @@ var require_with_selector_development = __commonJS({
|
|
|
299
299
|
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
300
300
|
}, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection = _useMemo[0], getServerSelection = _useMemo[1];
|
|
301
301
|
var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
302
|
-
|
|
302
|
+
useEffect12(function() {
|
|
303
303
|
inst.hasValue = true;
|
|
304
304
|
inst.value = value;
|
|
305
305
|
}, [value]);
|
|
@@ -371,10 +371,7 @@ __export(components_exports, {
|
|
|
371
371
|
MenuTrigger: () => $3674c52c6b3c5bce$export$27d2ad3c5815583e,
|
|
372
372
|
Modal: () => Modal,
|
|
373
373
|
NavigationMenu: () => NavigationMenu,
|
|
374
|
-
NavigationMenuContent: () => NavigationMenuContent,
|
|
375
374
|
NavigationMenuItem: () => NavigationMenuItem,
|
|
376
|
-
NavigationMenuLink: () => NavigationMenuLink,
|
|
377
|
-
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
378
375
|
Page: () => Page,
|
|
379
376
|
PasswordField: () => PasswordField,
|
|
380
377
|
Popover: () => Popover,
|
|
@@ -22865,7 +22862,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
|
22865
22862
|
};
|
|
22866
22863
|
}
|
|
22867
22864
|
|
|
22868
|
-
// src/components/
|
|
22865
|
+
// src/components/forms/Form.tsx
|
|
22869
22866
|
var import_react143 = require("react");
|
|
22870
22867
|
|
|
22871
22868
|
// node_modules/react-hook-form/dist/index.esm.mjs
|
|
@@ -24516,10 +24513,10 @@ function useForm(props = {}) {
|
|
|
24516
24513
|
return _formControl.current;
|
|
24517
24514
|
}
|
|
24518
24515
|
|
|
24519
|
-
// src/components/
|
|
24516
|
+
// src/components/forms/Form.tsx
|
|
24520
24517
|
var import_classnames6 = __toESM(require_classnames());
|
|
24521
24518
|
|
|
24522
|
-
// src/components/
|
|
24519
|
+
// src/components/forms/Form.module.css
|
|
24523
24520
|
var Form_default = {
|
|
24524
24521
|
form: "Form_form",
|
|
24525
24522
|
text: "Form_text",
|
|
@@ -25152,12 +25149,25 @@ var Text_default = {
|
|
|
25152
25149
|
tighter: "Text_tighter",
|
|
25153
25150
|
tight: "Text_tight",
|
|
25154
25151
|
wide: "Text_wide",
|
|
25155
|
-
wider: "Text_wider"
|
|
25152
|
+
wider: "Text_wider",
|
|
25153
|
+
left: "Text_left",
|
|
25154
|
+
center: "Text_center",
|
|
25155
|
+
right: "Text_right"
|
|
25156
25156
|
};
|
|
25157
25157
|
|
|
25158
25158
|
// src/components/Text.tsx
|
|
25159
25159
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
25160
|
-
function Text({
|
|
25160
|
+
function Text({
|
|
25161
|
+
children,
|
|
25162
|
+
type,
|
|
25163
|
+
size,
|
|
25164
|
+
spacing,
|
|
25165
|
+
weight,
|
|
25166
|
+
align,
|
|
25167
|
+
asChild,
|
|
25168
|
+
className,
|
|
25169
|
+
...props
|
|
25170
|
+
}) {
|
|
25161
25171
|
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "span";
|
|
25162
25172
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25163
25173
|
Component,
|
|
@@ -25169,14 +25179,15 @@ function Text({ children, type, size, spacing, weight, asChild, className, ...pr
|
|
|
25169
25179
|
size && Text_default[size],
|
|
25170
25180
|
spacing && Text_default[spacing],
|
|
25171
25181
|
type && Text_default[type],
|
|
25172
|
-
weight && Text_default[weight]
|
|
25182
|
+
weight && Text_default[weight],
|
|
25183
|
+
align && Text_default[align]
|
|
25173
25184
|
),
|
|
25174
25185
|
children
|
|
25175
25186
|
}
|
|
25176
25187
|
);
|
|
25177
25188
|
}
|
|
25178
25189
|
|
|
25179
|
-
// src/components/
|
|
25190
|
+
// src/components/forms/Form.tsx
|
|
25180
25191
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
25181
25192
|
function Form({
|
|
25182
25193
|
gap = "md",
|
|
@@ -25249,7 +25260,7 @@ function Form({
|
|
|
25249
25260
|
] });
|
|
25250
25261
|
}
|
|
25251
25262
|
|
|
25252
|
-
// src/components/
|
|
25263
|
+
// src/components/forms/FormField.tsx
|
|
25253
25264
|
var import_react145 = require("react");
|
|
25254
25265
|
var import_classnames7 = __toESM(require_classnames());
|
|
25255
25266
|
|
|
@@ -25267,14 +25278,14 @@ function mapChildren(children, handler) {
|
|
|
25267
25278
|
});
|
|
25268
25279
|
}
|
|
25269
25280
|
|
|
25270
|
-
// src/components/
|
|
25281
|
+
// src/components/forms/FormField.module.css
|
|
25271
25282
|
var FormField_default = {
|
|
25272
25283
|
field: "FormField_field",
|
|
25273
25284
|
description: "FormField_description",
|
|
25274
25285
|
error: "FormField_error"
|
|
25275
25286
|
};
|
|
25276
25287
|
|
|
25277
|
-
// src/components/
|
|
25288
|
+
// src/components/forms/FormField.tsx
|
|
25278
25289
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
25279
25290
|
var FormField = (0, import_react145.forwardRef)(
|
|
25280
25291
|
({ name, description, label, rules, className, children, ...props }, ref) => {
|
|
@@ -25294,6 +25305,7 @@ var FormField = (0, import_react145.forwardRef)(
|
|
|
25294
25305
|
);
|
|
25295
25306
|
|
|
25296
25307
|
// src/components/Button.tsx
|
|
25308
|
+
var import_react146 = require("react");
|
|
25297
25309
|
var import_classnames8 = __toESM(require_classnames());
|
|
25298
25310
|
|
|
25299
25311
|
// src/components/Button.module.css
|
|
@@ -25313,33 +25325,36 @@ var Button_default = {
|
|
|
25313
25325
|
|
|
25314
25326
|
// src/components/Button.tsx
|
|
25315
25327
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
25316
|
-
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
className,
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
}
|
|
25328
|
+
var Button = (0, import_react146.forwardRef)(
|
|
25329
|
+
({
|
|
25330
|
+
variant = "secondary",
|
|
25331
|
+
size = "md",
|
|
25332
|
+
preventFocusOnPress = true,
|
|
25333
|
+
asChild,
|
|
25334
|
+
className,
|
|
25335
|
+
children,
|
|
25336
|
+
...props
|
|
25337
|
+
}, ref) => {
|
|
25338
|
+
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
|
|
25339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
25340
|
+
Component,
|
|
25341
|
+
{
|
|
25342
|
+
...props,
|
|
25343
|
+
ref,
|
|
25344
|
+
preventFocusOnPress: Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? preventFocusOnPress : void 0,
|
|
25345
|
+
className: (0, import_classnames8.default)(
|
|
25346
|
+
Button_default.button,
|
|
25347
|
+
className,
|
|
25348
|
+
variant && Button_default[variant],
|
|
25349
|
+
size && Button_default[size]
|
|
25350
|
+
),
|
|
25351
|
+
children
|
|
25352
|
+
}
|
|
25353
|
+
);
|
|
25354
|
+
}
|
|
25355
|
+
);
|
|
25341
25356
|
|
|
25342
|
-
// src/components/
|
|
25357
|
+
// src/components/forms/FormResetButton.tsx
|
|
25343
25358
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
25344
25359
|
function FormResetButton({ values = {}, children, onPress, ...props }) {
|
|
25345
25360
|
const { reset } = useFormContext();
|
|
@@ -25395,7 +25410,7 @@ function LoadingButton({ isLoading, children, ...props }) {
|
|
|
25395
25410
|
] });
|
|
25396
25411
|
}
|
|
25397
25412
|
|
|
25398
|
-
// src/components/
|
|
25413
|
+
// src/components/forms/FormSubmitButton.tsx
|
|
25399
25414
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
25400
25415
|
function FormSubmitButton({ children, disabled, isLoading, ...props }) {
|
|
25401
25416
|
const {
|
|
@@ -25414,10 +25429,10 @@ function FormSubmitButton({ children, disabled, isLoading, ...props }) {
|
|
|
25414
25429
|
}
|
|
25415
25430
|
|
|
25416
25431
|
// src/components/hooks/useDebounce.ts
|
|
25417
|
-
var
|
|
25432
|
+
var import_react147 = require("react");
|
|
25418
25433
|
function useDebounce(value, delay) {
|
|
25419
|
-
const [debouncedValue, setValue] = (0,
|
|
25420
|
-
(0,
|
|
25434
|
+
const [debouncedValue, setValue] = (0, import_react147.useState)(value);
|
|
25435
|
+
(0, import_react147.useEffect)(() => {
|
|
25421
25436
|
const timer = setTimeout(() => {
|
|
25422
25437
|
setValue(value);
|
|
25423
25438
|
}, delay);
|
|
@@ -25442,7 +25457,7 @@ var createStoreImpl = (createState) => {
|
|
|
25442
25457
|
}
|
|
25443
25458
|
};
|
|
25444
25459
|
const getState = () => state;
|
|
25445
|
-
const getInitialState = () =>
|
|
25460
|
+
const getInitialState = () => initialState4;
|
|
25446
25461
|
const subscribe = (listener) => {
|
|
25447
25462
|
listeners.add(listener);
|
|
25448
25463
|
return () => listeners.delete(listener);
|
|
@@ -25456,16 +25471,16 @@ var createStoreImpl = (createState) => {
|
|
|
25456
25471
|
listeners.clear();
|
|
25457
25472
|
};
|
|
25458
25473
|
const api = { setState, getState, getInitialState, subscribe, destroy };
|
|
25459
|
-
const
|
|
25474
|
+
const initialState4 = state = createState(setState, getState, api);
|
|
25460
25475
|
return api;
|
|
25461
25476
|
};
|
|
25462
25477
|
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
25463
25478
|
|
|
25464
25479
|
// node_modules/zustand/esm/index.mjs
|
|
25465
|
-
var
|
|
25480
|
+
var import_react148 = __toESM(require("react"), 1);
|
|
25466
25481
|
var import_with_selector = __toESM(require_with_selector(), 1);
|
|
25467
25482
|
var import_meta2 = {};
|
|
25468
|
-
var { useDebugValue } =
|
|
25483
|
+
var { useDebugValue } = import_react148.default;
|
|
25469
25484
|
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
|
|
25470
25485
|
var didWarnAboutEqualityFn = false;
|
|
25471
25486
|
var identity = (arg) => arg;
|
|
@@ -25544,14 +25559,14 @@ function useToast() {
|
|
|
25544
25559
|
}
|
|
25545
25560
|
|
|
25546
25561
|
// node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
25547
|
-
var
|
|
25562
|
+
var import_react158 = __toESM(require("react"), 1);
|
|
25548
25563
|
|
|
25549
25564
|
// node_modules/@radix-ui/react-context/dist/index.mjs
|
|
25550
|
-
var
|
|
25565
|
+
var import_react149 = require("react");
|
|
25551
25566
|
function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
25552
25567
|
let defaultContexts = [];
|
|
25553
25568
|
function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
25554
|
-
const BaseContext = /* @__PURE__ */ (0,
|
|
25569
|
+
const BaseContext = /* @__PURE__ */ (0, import_react149.createContext)(defaultContext);
|
|
25555
25570
|
const index = defaultContexts.length;
|
|
25556
25571
|
defaultContexts = [
|
|
25557
25572
|
...defaultContexts,
|
|
@@ -25560,17 +25575,17 @@ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeD
|
|
|
25560
25575
|
function Provider(props) {
|
|
25561
25576
|
const { scope, children, ...context } = props;
|
|
25562
25577
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
25563
|
-
const value = (0,
|
|
25578
|
+
const value = (0, import_react149.useMemo)(
|
|
25564
25579
|
() => context,
|
|
25565
25580
|
Object.values(context)
|
|
25566
25581
|
);
|
|
25567
|
-
return /* @__PURE__ */ (0,
|
|
25582
|
+
return /* @__PURE__ */ (0, import_react149.createElement)(Context.Provider, {
|
|
25568
25583
|
value
|
|
25569
25584
|
}, children);
|
|
25570
25585
|
}
|
|
25571
25586
|
function useContext3(consumerName, scope) {
|
|
25572
25587
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
25573
|
-
const context = (0,
|
|
25588
|
+
const context = (0, import_react149.useContext)(Context);
|
|
25574
25589
|
if (context) return context;
|
|
25575
25590
|
if (defaultContext !== void 0) return defaultContext;
|
|
25576
25591
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -25583,11 +25598,11 @@ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeD
|
|
|
25583
25598
|
}
|
|
25584
25599
|
const createScope = () => {
|
|
25585
25600
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
25586
|
-
return /* @__PURE__ */ (0,
|
|
25601
|
+
return /* @__PURE__ */ (0, import_react149.createContext)(defaultContext);
|
|
25587
25602
|
});
|
|
25588
25603
|
return function useScope(scope) {
|
|
25589
25604
|
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
25590
|
-
return (0,
|
|
25605
|
+
return (0, import_react149.useMemo)(
|
|
25591
25606
|
() => ({
|
|
25592
25607
|
[`__scope${scopeName}`]: {
|
|
25593
25608
|
...scope,
|
|
@@ -25626,7 +25641,7 @@ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
|
25626
25641
|
...currentScope
|
|
25627
25642
|
};
|
|
25628
25643
|
}, {});
|
|
25629
|
-
return (0,
|
|
25644
|
+
return (0, import_react149.useMemo)(
|
|
25630
25645
|
() => ({
|
|
25631
25646
|
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
25632
25647
|
}),
|
|
@@ -25641,7 +25656,7 @@ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
|
25641
25656
|
}
|
|
25642
25657
|
|
|
25643
25658
|
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
25644
|
-
var
|
|
25659
|
+
var import_react150 = __toESM(require("react"), 1);
|
|
25645
25660
|
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
25646
25661
|
const PROVIDER_NAME2 = name + "CollectionProvider";
|
|
25647
25662
|
const [createCollectionContext, createCollectionScope2] = $c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME2);
|
|
@@ -25653,9 +25668,9 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
25653
25668
|
});
|
|
25654
25669
|
const CollectionProvider = (props) => {
|
|
25655
25670
|
const { scope, children } = props;
|
|
25656
|
-
const ref =
|
|
25657
|
-
const itemMap =
|
|
25658
|
-
return /* @__PURE__ */
|
|
25671
|
+
const ref = import_react150.default.useRef(null);
|
|
25672
|
+
const itemMap = import_react150.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
25673
|
+
return /* @__PURE__ */ import_react150.default.createElement(CollectionProviderImpl, {
|
|
25659
25674
|
scope,
|
|
25660
25675
|
itemMap,
|
|
25661
25676
|
collectionRef: ref
|
|
@@ -25665,11 +25680,11 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
25665
25680
|
displayName: PROVIDER_NAME2
|
|
25666
25681
|
});
|
|
25667
25682
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
25668
|
-
const CollectionSlot = /* @__PURE__ */
|
|
25683
|
+
const CollectionSlot = /* @__PURE__ */ import_react150.default.forwardRef((props, forwardedRef) => {
|
|
25669
25684
|
const { scope, children } = props;
|
|
25670
25685
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
25671
25686
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
|
|
25672
|
-
return /* @__PURE__ */
|
|
25687
|
+
return /* @__PURE__ */ import_react150.default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
|
25673
25688
|
ref: composedRefs
|
|
25674
25689
|
}, children);
|
|
25675
25690
|
});
|
|
@@ -25678,19 +25693,19 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
25678
25693
|
});
|
|
25679
25694
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
25680
25695
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
25681
|
-
const CollectionItemSlot = /* @__PURE__ */
|
|
25696
|
+
const CollectionItemSlot = /* @__PURE__ */ import_react150.default.forwardRef((props, forwardedRef) => {
|
|
25682
25697
|
const { scope, children, ...itemData } = props;
|
|
25683
|
-
const ref =
|
|
25698
|
+
const ref = import_react150.default.useRef(null);
|
|
25684
25699
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
25685
25700
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
25686
|
-
|
|
25701
|
+
import_react150.default.useEffect(() => {
|
|
25687
25702
|
context.itemMap.set(ref, {
|
|
25688
25703
|
ref,
|
|
25689
25704
|
...itemData
|
|
25690
25705
|
});
|
|
25691
25706
|
return () => void context.itemMap.delete(ref);
|
|
25692
25707
|
});
|
|
25693
|
-
return /* @__PURE__ */
|
|
25708
|
+
return /* @__PURE__ */ import_react150.default.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
|
|
25694
25709
|
[ITEM_DATA_ATTR]: "",
|
|
25695
25710
|
ref: composedRefs
|
|
25696
25711
|
}, children);
|
|
@@ -25700,7 +25715,7 @@ function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
|
|
|
25700
25715
|
});
|
|
25701
25716
|
function useCollection2(scope) {
|
|
25702
25717
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
25703
|
-
const getItems =
|
|
25718
|
+
const getItems = import_react150.default.useCallback(() => {
|
|
25704
25719
|
const collectionNode = context.collectionRef.current;
|
|
25705
25720
|
if (!collectionNode) return [];
|
|
25706
25721
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -25735,16 +25750,16 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
25735
25750
|
}
|
|
25736
25751
|
|
|
25737
25752
|
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
25738
|
-
var
|
|
25753
|
+
var import_react152 = require("react");
|
|
25739
25754
|
|
|
25740
25755
|
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
25741
|
-
var
|
|
25756
|
+
var import_react151 = require("react");
|
|
25742
25757
|
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
25743
|
-
const callbackRef = (0,
|
|
25744
|
-
(0,
|
|
25758
|
+
const callbackRef = (0, import_react151.useRef)(callback);
|
|
25759
|
+
(0, import_react151.useEffect)(() => {
|
|
25745
25760
|
callbackRef.current = callback;
|
|
25746
25761
|
});
|
|
25747
|
-
return (0,
|
|
25762
|
+
return (0, import_react151.useMemo)(
|
|
25748
25763
|
() => (...args) => {
|
|
25749
25764
|
var _callbackRef$current;
|
|
25750
25765
|
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
@@ -25763,7 +25778,7 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange
|
|
|
25763
25778
|
const isControlled = prop !== void 0;
|
|
25764
25779
|
const value1 = isControlled ? prop : uncontrolledProp;
|
|
25765
25780
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
25766
|
-
const setValue = (0,
|
|
25781
|
+
const setValue = (0, import_react152.useCallback)((nextValue) => {
|
|
25767
25782
|
if (isControlled) {
|
|
25768
25783
|
const setter = nextValue;
|
|
25769
25784
|
const value = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
@@ -25781,11 +25796,11 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop, defaultProp, onChange
|
|
|
25781
25796
|
];
|
|
25782
25797
|
}
|
|
25783
25798
|
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
|
|
25784
|
-
const uncontrolledState = (0,
|
|
25799
|
+
const uncontrolledState = (0, import_react152.useState)(defaultProp);
|
|
25785
25800
|
const [value] = uncontrolledState;
|
|
25786
|
-
const prevValueRef = (0,
|
|
25801
|
+
const prevValueRef = (0, import_react152.useRef)(value);
|
|
25787
25802
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
25788
|
-
(0,
|
|
25803
|
+
(0, import_react152.useEffect)(() => {
|
|
25789
25804
|
if (prevValueRef.current !== value) {
|
|
25790
25805
|
handleChange(value);
|
|
25791
25806
|
prevValueRef.current = value;
|
|
@@ -25799,7 +25814,7 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp, onChange }) {
|
|
|
25799
25814
|
}
|
|
25800
25815
|
|
|
25801
25816
|
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
25802
|
-
var
|
|
25817
|
+
var import_react153 = require("react");
|
|
25803
25818
|
var import_react_dom8 = require("react-dom");
|
|
25804
25819
|
var $8927f6f2acc4f386$var$NODES = [
|
|
25805
25820
|
"a",
|
|
@@ -25820,13 +25835,13 @@ var $8927f6f2acc4f386$var$NODES = [
|
|
|
25820
25835
|
"ul"
|
|
25821
25836
|
];
|
|
25822
25837
|
var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node) => {
|
|
25823
|
-
const Node2 = /* @__PURE__ */ (0,
|
|
25838
|
+
const Node2 = /* @__PURE__ */ (0, import_react153.forwardRef)((props, forwardedRef) => {
|
|
25824
25839
|
const { asChild, ...primitiveProps } = props;
|
|
25825
25840
|
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
25826
|
-
(0,
|
|
25841
|
+
(0, import_react153.useEffect)(() => {
|
|
25827
25842
|
window[Symbol.for("radix-ui")] = true;
|
|
25828
25843
|
}, []);
|
|
25829
|
-
return /* @__PURE__ */ (0,
|
|
25844
|
+
return /* @__PURE__ */ (0, import_react153.createElement)(Comp, _extends({}, primitiveProps, {
|
|
25830
25845
|
ref: forwardedRef
|
|
25831
25846
|
}));
|
|
25832
25847
|
});
|
|
@@ -25836,49 +25851,44 @@ var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.redu
|
|
|
25836
25851
|
[node]: Node2
|
|
25837
25852
|
};
|
|
25838
25853
|
}, {});
|
|
25839
|
-
function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
25840
|
-
if (target) (0, import_react_dom8.flushSync)(
|
|
25841
|
-
() => target.dispatchEvent(event)
|
|
25842
|
-
);
|
|
25843
|
-
}
|
|
25844
25854
|
|
|
25845
25855
|
// node_modules/@radix-ui/react-collapsible/dist/index.mjs
|
|
25846
|
-
var
|
|
25856
|
+
var import_react156 = require("react");
|
|
25847
25857
|
|
|
25848
25858
|
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
25849
|
-
var
|
|
25850
|
-
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ?
|
|
25859
|
+
var import_react154 = require("react");
|
|
25860
|
+
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? import_react154.useLayoutEffect : () => {
|
|
25851
25861
|
};
|
|
25852
25862
|
|
|
25853
25863
|
// node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
25854
|
-
var
|
|
25864
|
+
var import_react155 = require("react");
|
|
25855
25865
|
var import_react_dom9 = require("react-dom");
|
|
25856
|
-
function $fe963b355347cc68$export$3e6543de14f8614f(
|
|
25857
|
-
return (0,
|
|
25866
|
+
function $fe963b355347cc68$export$3e6543de14f8614f(initialState4, machine) {
|
|
25867
|
+
return (0, import_react155.useReducer)((state, event) => {
|
|
25858
25868
|
const nextState = machine[state][event];
|
|
25859
25869
|
return nextState !== null && nextState !== void 0 ? nextState : state;
|
|
25860
|
-
},
|
|
25870
|
+
}, initialState4);
|
|
25861
25871
|
}
|
|
25862
25872
|
var $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
|
|
25863
25873
|
const { present, children } = props;
|
|
25864
25874
|
const presence = $921a889cee6df7e8$var$usePresence(present);
|
|
25865
25875
|
const child = typeof children === "function" ? children({
|
|
25866
25876
|
present: presence.isPresent
|
|
25867
|
-
}) :
|
|
25877
|
+
}) : import_react155.Children.only(children);
|
|
25868
25878
|
const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
|
|
25869
25879
|
const forceMount = typeof children === "function";
|
|
25870
|
-
return forceMount || presence.isPresent ? /* @__PURE__ */ (0,
|
|
25880
|
+
return forceMount || presence.isPresent ? /* @__PURE__ */ (0, import_react155.cloneElement)(child, {
|
|
25871
25881
|
ref
|
|
25872
25882
|
}) : null;
|
|
25873
25883
|
};
|
|
25874
25884
|
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = "Presence";
|
|
25875
25885
|
function $921a889cee6df7e8$var$usePresence(present) {
|
|
25876
|
-
const [node1, setNode] = (0,
|
|
25877
|
-
const stylesRef = (0,
|
|
25878
|
-
const prevPresentRef = (0,
|
|
25879
|
-
const prevAnimationNameRef = (0,
|
|
25880
|
-
const
|
|
25881
|
-
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(
|
|
25886
|
+
const [node1, setNode] = (0, import_react155.useState)();
|
|
25887
|
+
const stylesRef = (0, import_react155.useRef)({});
|
|
25888
|
+
const prevPresentRef = (0, import_react155.useRef)(present);
|
|
25889
|
+
const prevAnimationNameRef = (0, import_react155.useRef)("none");
|
|
25890
|
+
const initialState4 = present ? "mounted" : "unmounted";
|
|
25891
|
+
const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState4, {
|
|
25882
25892
|
mounted: {
|
|
25883
25893
|
UNMOUNT: "unmounted",
|
|
25884
25894
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -25891,7 +25901,7 @@ function $921a889cee6df7e8$var$usePresence(present) {
|
|
|
25891
25901
|
MOUNT: "mounted"
|
|
25892
25902
|
}
|
|
25893
25903
|
});
|
|
25894
|
-
(0,
|
|
25904
|
+
(0, import_react155.useEffect)(() => {
|
|
25895
25905
|
const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
|
|
25896
25906
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
25897
25907
|
}, [
|
|
@@ -25951,7 +25961,7 @@ function $921a889cee6df7e8$var$usePresence(present) {
|
|
|
25951
25961
|
"mounted",
|
|
25952
25962
|
"unmountSuspended"
|
|
25953
25963
|
].includes(state),
|
|
25954
|
-
ref: (0,
|
|
25964
|
+
ref: (0, import_react155.useCallback)((node) => {
|
|
25955
25965
|
if (node) stylesRef.current = getComputedStyle(node);
|
|
25956
25966
|
setNode(node);
|
|
25957
25967
|
}, [])
|
|
@@ -25981,19 +25991,19 @@ function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
|
25981
25991
|
var $409067139f391064$var$COLLAPSIBLE_NAME = "Collapsible";
|
|
25982
25992
|
var [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
25983
25993
|
var [$409067139f391064$var$CollapsibleProvider, $409067139f391064$var$useCollapsibleContext] = $409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME);
|
|
25984
|
-
var $409067139f391064$export$6eb0f7ddcda6131f = /* @__PURE__ */ (0,
|
|
25994
|
+
var $409067139f391064$export$6eb0f7ddcda6131f = /* @__PURE__ */ (0, import_react156.forwardRef)((props, forwardedRef) => {
|
|
25985
25995
|
const { __scopeCollapsible, open: openProp, defaultOpen, disabled, onOpenChange, ...collapsibleProps } = props;
|
|
25986
25996
|
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
25987
25997
|
prop: openProp,
|
|
25988
25998
|
defaultProp: defaultOpen,
|
|
25989
25999
|
onChange: onOpenChange
|
|
25990
26000
|
});
|
|
25991
|
-
return /* @__PURE__ */ (0,
|
|
26001
|
+
return /* @__PURE__ */ (0, import_react156.createElement)($409067139f391064$var$CollapsibleProvider, {
|
|
25992
26002
|
scope: __scopeCollapsible,
|
|
25993
26003
|
disabled,
|
|
25994
26004
|
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
25995
26005
|
open,
|
|
25996
|
-
onOpenToggle: (0,
|
|
26006
|
+
onOpenToggle: (0, import_react156.useCallback)(
|
|
25997
26007
|
() => setOpen(
|
|
25998
26008
|
(prevOpen) => !prevOpen
|
|
25999
26009
|
),
|
|
@@ -26001,7 +26011,7 @@ var $409067139f391064$export$6eb0f7ddcda6131f = /* @__PURE__ */ (0, import_react
|
|
|
26001
26011
|
setOpen
|
|
26002
26012
|
]
|
|
26003
26013
|
)
|
|
26004
|
-
}, /* @__PURE__ */ (0,
|
|
26014
|
+
}, /* @__PURE__ */ (0, import_react156.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
26005
26015
|
"data-state": $409067139f391064$var$getState(open),
|
|
26006
26016
|
"data-disabled": disabled ? "" : void 0
|
|
26007
26017
|
}, collapsibleProps, {
|
|
@@ -26009,10 +26019,10 @@ var $409067139f391064$export$6eb0f7ddcda6131f = /* @__PURE__ */ (0, import_react
|
|
|
26009
26019
|
})));
|
|
26010
26020
|
});
|
|
26011
26021
|
var $409067139f391064$var$TRIGGER_NAME = "CollapsibleTrigger";
|
|
26012
|
-
var $409067139f391064$export$c135dce7b15bbbdc = /* @__PURE__ */ (0,
|
|
26022
|
+
var $409067139f391064$export$c135dce7b15bbbdc = /* @__PURE__ */ (0, import_react156.forwardRef)((props, forwardedRef) => {
|
|
26013
26023
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
26014
26024
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
|
|
26015
|
-
return /* @__PURE__ */ (0,
|
|
26025
|
+
return /* @__PURE__ */ (0, import_react156.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
26016
26026
|
type: "button",
|
|
26017
26027
|
"aria-controls": context.contentId,
|
|
26018
26028
|
"aria-expanded": context.open || false,
|
|
@@ -26025,34 +26035,34 @@ var $409067139f391064$export$c135dce7b15bbbdc = /* @__PURE__ */ (0, import_react
|
|
|
26025
26035
|
}));
|
|
26026
26036
|
});
|
|
26027
26037
|
var $409067139f391064$var$CONTENT_NAME = "CollapsibleContent";
|
|
26028
|
-
var $409067139f391064$export$aadde00976f34151 = /* @__PURE__ */ (0,
|
|
26038
|
+
var $409067139f391064$export$aadde00976f34151 = /* @__PURE__ */ (0, import_react156.forwardRef)((props, forwardedRef) => {
|
|
26029
26039
|
const { forceMount, ...contentProps } = props;
|
|
26030
26040
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);
|
|
26031
|
-
return /* @__PURE__ */ (0,
|
|
26041
|
+
return /* @__PURE__ */ (0, import_react156.createElement)(
|
|
26032
26042
|
$921a889cee6df7e8$export$99c2b779aa4e8b8b,
|
|
26033
26043
|
{
|
|
26034
26044
|
present: forceMount || context.open
|
|
26035
26045
|
},
|
|
26036
|
-
({ present }) => /* @__PURE__ */ (0,
|
|
26046
|
+
({ present }) => /* @__PURE__ */ (0, import_react156.createElement)($409067139f391064$var$CollapsibleContentImpl, _extends({}, contentProps, {
|
|
26037
26047
|
ref: forwardedRef,
|
|
26038
26048
|
present
|
|
26039
26049
|
}))
|
|
26040
26050
|
);
|
|
26041
26051
|
});
|
|
26042
|
-
var $409067139f391064$var$CollapsibleContentImpl = /* @__PURE__ */ (0,
|
|
26052
|
+
var $409067139f391064$var$CollapsibleContentImpl = /* @__PURE__ */ (0, import_react156.forwardRef)((props, forwardedRef) => {
|
|
26043
26053
|
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
26044
26054
|
const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);
|
|
26045
|
-
const [isPresent, setIsPresent] = (0,
|
|
26046
|
-
const ref = (0,
|
|
26055
|
+
const [isPresent, setIsPresent] = (0, import_react156.useState)(present);
|
|
26056
|
+
const ref = (0, import_react156.useRef)(null);
|
|
26047
26057
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
26048
|
-
const heightRef = (0,
|
|
26058
|
+
const heightRef = (0, import_react156.useRef)(0);
|
|
26049
26059
|
const height = heightRef.current;
|
|
26050
|
-
const widthRef = (0,
|
|
26060
|
+
const widthRef = (0, import_react156.useRef)(0);
|
|
26051
26061
|
const width = widthRef.current;
|
|
26052
26062
|
const isOpen = context.open || isPresent;
|
|
26053
|
-
const isMountAnimationPreventedRef = (0,
|
|
26054
|
-
const originalStylesRef = (0,
|
|
26055
|
-
(0,
|
|
26063
|
+
const isMountAnimationPreventedRef = (0, import_react156.useRef)(isOpen);
|
|
26064
|
+
const originalStylesRef = (0, import_react156.useRef)();
|
|
26065
|
+
(0, import_react156.useEffect)(() => {
|
|
26056
26066
|
const rAF = requestAnimationFrame(
|
|
26057
26067
|
() => isMountAnimationPreventedRef.current = false
|
|
26058
26068
|
);
|
|
@@ -26080,7 +26090,7 @@ var $409067139f391064$var$CollapsibleContentImpl = /* @__PURE__ */ (0, import_re
|
|
|
26080
26090
|
context.open,
|
|
26081
26091
|
present
|
|
26082
26092
|
]);
|
|
26083
|
-
return /* @__PURE__ */ (0,
|
|
26093
|
+
return /* @__PURE__ */ (0, import_react156.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
26084
26094
|
"data-state": $409067139f391064$var$getState(context.open),
|
|
26085
26095
|
"data-disabled": context.disabled ? "" : void 0,
|
|
26086
26096
|
id: context.contentId,
|
|
@@ -26102,10 +26112,10 @@ var $409067139f391064$export$41fb9f06171c75f4 = $409067139f391064$export$c135dce
|
|
|
26102
26112
|
var $409067139f391064$export$7c6e2c02157bb7d2 = $409067139f391064$export$aadde00976f34151;
|
|
26103
26113
|
|
|
26104
26114
|
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
26105
|
-
var
|
|
26106
|
-
var $f631663db3294ace$var$DirectionContext = /* @__PURE__ */ (0,
|
|
26115
|
+
var import_react157 = require("react");
|
|
26116
|
+
var $f631663db3294ace$var$DirectionContext = /* @__PURE__ */ (0, import_react157.createContext)(void 0);
|
|
26107
26117
|
function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
|
|
26108
|
-
const globalDir = (0,
|
|
26118
|
+
const globalDir = (0, import_react157.useContext)($f631663db3294ace$var$DirectionContext);
|
|
26109
26119
|
return localDir || globalDir || "ltr";
|
|
26110
26120
|
}
|
|
26111
26121
|
|
|
@@ -26125,15 +26135,15 @@ var [$1bf158f521e1b1b4$var$createAccordionContext, $1bf158f521e1b1b4$export$9748
|
|
|
26125
26135
|
$409067139f391064$export$952b32dcbe73087a
|
|
26126
26136
|
]);
|
|
26127
26137
|
var $1bf158f521e1b1b4$var$useCollapsibleScope = $409067139f391064$export$952b32dcbe73087a();
|
|
26128
|
-
var $1bf158f521e1b1b4$export$a766cd26d0d69044 = /* @__PURE__ */
|
|
26138
|
+
var $1bf158f521e1b1b4$export$a766cd26d0d69044 = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26129
26139
|
const { type, ...accordionProps } = props;
|
|
26130
26140
|
const singleProps = accordionProps;
|
|
26131
26141
|
const multipleProps = accordionProps;
|
|
26132
|
-
return /* @__PURE__ */
|
|
26142
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$Collection.Provider, {
|
|
26133
26143
|
scope: props.__scopeAccordion
|
|
26134
|
-
}, type === "multiple" ? /* @__PURE__ */
|
|
26144
|
+
}, type === "multiple" ? /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionImplMultiple, _extends({}, multipleProps, {
|
|
26135
26145
|
ref: forwardedRef
|
|
26136
|
-
})) : /* @__PURE__ */
|
|
26146
|
+
})) : /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionImplSingle, _extends({}, singleProps, {
|
|
26137
26147
|
ref: forwardedRef
|
|
26138
26148
|
})));
|
|
26139
26149
|
});
|
|
@@ -26153,7 +26163,7 @@ var [$1bf158f521e1b1b4$var$AccordionValueProvider, $1bf158f521e1b1b4$var$useAcco
|
|
|
26153
26163
|
var [$1bf158f521e1b1b4$var$AccordionCollapsibleProvider, $1bf158f521e1b1b4$var$useAccordionCollapsibleContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, {
|
|
26154
26164
|
collapsible: false
|
|
26155
26165
|
});
|
|
26156
|
-
var $1bf158f521e1b1b4$var$AccordionImplSingle = /* @__PURE__ */
|
|
26166
|
+
var $1bf158f521e1b1b4$var$AccordionImplSingle = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26157
26167
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
26158
26168
|
}, collapsible = false, ...accordionSingleProps } = props;
|
|
26159
26169
|
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -26161,27 +26171,27 @@ var $1bf158f521e1b1b4$var$AccordionImplSingle = /* @__PURE__ */ import_react157.
|
|
|
26161
26171
|
defaultProp: defaultValue,
|
|
26162
26172
|
onChange: onValueChange
|
|
26163
26173
|
});
|
|
26164
|
-
return /* @__PURE__ */
|
|
26174
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
|
|
26165
26175
|
scope: props.__scopeAccordion,
|
|
26166
26176
|
value: value ? [
|
|
26167
26177
|
value
|
|
26168
26178
|
] : [],
|
|
26169
26179
|
onItemOpen: setValue,
|
|
26170
|
-
onItemClose:
|
|
26180
|
+
onItemClose: import_react158.default.useCallback(
|
|
26171
26181
|
() => collapsible && setValue(""),
|
|
26172
26182
|
[
|
|
26173
26183
|
collapsible,
|
|
26174
26184
|
setValue
|
|
26175
26185
|
]
|
|
26176
26186
|
)
|
|
26177
|
-
}, /* @__PURE__ */
|
|
26187
|
+
}, /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
|
|
26178
26188
|
scope: props.__scopeAccordion,
|
|
26179
26189
|
collapsible
|
|
26180
|
-
}, /* @__PURE__ */
|
|
26190
|
+
}, /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionSingleProps, {
|
|
26181
26191
|
ref: forwardedRef
|
|
26182
26192
|
}))));
|
|
26183
26193
|
});
|
|
26184
|
-
var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */
|
|
26194
|
+
var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26185
26195
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
26186
26196
|
}, ...accordionMultipleProps } = props;
|
|
26187
26197
|
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -26189,7 +26199,7 @@ var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */ import_react15
|
|
|
26189
26199
|
defaultProp: defaultValue,
|
|
26190
26200
|
onChange: onValueChange
|
|
26191
26201
|
});
|
|
26192
|
-
const handleItemOpen =
|
|
26202
|
+
const handleItemOpen = import_react158.default.useCallback(
|
|
26193
26203
|
(itemValue) => setValue(
|
|
26194
26204
|
(prevValue = []) => [
|
|
26195
26205
|
...prevValue,
|
|
@@ -26200,7 +26210,7 @@ var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */ import_react15
|
|
|
26200
26210
|
setValue
|
|
26201
26211
|
]
|
|
26202
26212
|
);
|
|
26203
|
-
const handleItemClose =
|
|
26213
|
+
const handleItemClose = import_react158.default.useCallback(
|
|
26204
26214
|
(itemValue) => setValue(
|
|
26205
26215
|
(prevValue = []) => prevValue.filter(
|
|
26206
26216
|
(value) => value !== itemValue
|
|
@@ -26210,22 +26220,22 @@ var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */ import_react15
|
|
|
26210
26220
|
setValue
|
|
26211
26221
|
]
|
|
26212
26222
|
);
|
|
26213
|
-
return /* @__PURE__ */
|
|
26223
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
|
|
26214
26224
|
scope: props.__scopeAccordion,
|
|
26215
26225
|
value: value1,
|
|
26216
26226
|
onItemOpen: handleItemOpen,
|
|
26217
26227
|
onItemClose: handleItemClose
|
|
26218
|
-
}, /* @__PURE__ */
|
|
26228
|
+
}, /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
|
|
26219
26229
|
scope: props.__scopeAccordion,
|
|
26220
26230
|
collapsible: true
|
|
26221
|
-
}, /* @__PURE__ */
|
|
26231
|
+
}, /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionMultipleProps, {
|
|
26222
26232
|
ref: forwardedRef
|
|
26223
26233
|
}))));
|
|
26224
26234
|
});
|
|
26225
26235
|
var [$1bf158f521e1b1b4$var$AccordionImplProvider, $1bf158f521e1b1b4$var$useAccordionContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME);
|
|
26226
|
-
var $1bf158f521e1b1b4$var$AccordionImpl = /* @__PURE__ */
|
|
26236
|
+
var $1bf158f521e1b1b4$var$AccordionImpl = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26227
26237
|
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
|
26228
|
-
const accordionRef =
|
|
26238
|
+
const accordionRef = import_react158.default.useRef(null);
|
|
26229
26239
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(accordionRef, forwardedRef);
|
|
26230
26240
|
const getItems = $1bf158f521e1b1b4$var$useCollection(__scopeAccordion);
|
|
26231
26241
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
@@ -26284,14 +26294,14 @@ var $1bf158f521e1b1b4$var$AccordionImpl = /* @__PURE__ */ import_react157.defaul
|
|
|
26284
26294
|
const clampedIndex = nextIndex % triggerCount;
|
|
26285
26295
|
(_triggerCollection$cl = triggerCollection[clampedIndex].ref.current) === null || _triggerCollection$cl === void 0 || _triggerCollection$cl.focus();
|
|
26286
26296
|
});
|
|
26287
|
-
return /* @__PURE__ */
|
|
26297
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionImplProvider, {
|
|
26288
26298
|
scope: __scopeAccordion,
|
|
26289
26299
|
disabled,
|
|
26290
26300
|
direction: dir,
|
|
26291
26301
|
orientation
|
|
26292
|
-
}, /* @__PURE__ */
|
|
26302
|
+
}, /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$Collection.Slot, {
|
|
26293
26303
|
scope: __scopeAccordion
|
|
26294
|
-
}, /* @__PURE__ */
|
|
26304
|
+
}, /* @__PURE__ */ import_react158.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, accordionProps, {
|
|
26295
26305
|
"data-orientation": orientation,
|
|
26296
26306
|
ref: composedRefs,
|
|
26297
26307
|
onKeyDown: disabled ? void 0 : handleKeyDown
|
|
@@ -26299,7 +26309,7 @@ var $1bf158f521e1b1b4$var$AccordionImpl = /* @__PURE__ */ import_react157.defaul
|
|
|
26299
26309
|
});
|
|
26300
26310
|
var $1bf158f521e1b1b4$var$ITEM_NAME = "AccordionItem";
|
|
26301
26311
|
var [$1bf158f521e1b1b4$var$AccordionItemProvider, $1bf158f521e1b1b4$var$useAccordionItemContext] = $1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME);
|
|
26302
|
-
var $1bf158f521e1b1b4$export$d99097c13d4dac9f = /* @__PURE__ */
|
|
26312
|
+
var $1bf158f521e1b1b4$export$d99097c13d4dac9f = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26303
26313
|
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
|
26304
26314
|
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
|
|
26305
26315
|
const valueContext = $1bf158f521e1b1b4$var$useAccordionValueContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
|
|
@@ -26307,12 +26317,12 @@ var $1bf158f521e1b1b4$export$d99097c13d4dac9f = /* @__PURE__ */ import_react157.
|
|
|
26307
26317
|
const triggerId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
26308
26318
|
const open1 = value && valueContext.value.includes(value) || false;
|
|
26309
26319
|
const disabled = accordionContext.disabled || props.disabled;
|
|
26310
|
-
return /* @__PURE__ */
|
|
26320
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$AccordionItemProvider, {
|
|
26311
26321
|
scope: __scopeAccordion,
|
|
26312
26322
|
open: open1,
|
|
26313
26323
|
disabled,
|
|
26314
26324
|
triggerId
|
|
26315
|
-
}, /* @__PURE__ */
|
|
26325
|
+
}, /* @__PURE__ */ import_react158.default.createElement($409067139f391064$export$be92b6f5f03c0fe9, _extends({
|
|
26316
26326
|
"data-orientation": accordionContext.orientation,
|
|
26317
26327
|
"data-state": $1bf158f521e1b1b4$var$getState(open1)
|
|
26318
26328
|
}, collapsibleScope, accordionItemProps, {
|
|
@@ -26326,11 +26336,11 @@ var $1bf158f521e1b1b4$export$d99097c13d4dac9f = /* @__PURE__ */ import_react157.
|
|
|
26326
26336
|
})));
|
|
26327
26337
|
});
|
|
26328
26338
|
var $1bf158f521e1b1b4$var$HEADER_NAME = "AccordionHeader";
|
|
26329
|
-
var $1bf158f521e1b1b4$export$5e3e5deaaf81ee41 = /* @__PURE__ */
|
|
26339
|
+
var $1bf158f521e1b1b4$export$5e3e5deaaf81ee41 = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26330
26340
|
const { __scopeAccordion, ...headerProps } = props;
|
|
26331
26341
|
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
26332
26342
|
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$HEADER_NAME, __scopeAccordion);
|
|
26333
|
-
return /* @__PURE__ */
|
|
26343
|
+
return /* @__PURE__ */ import_react158.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.h3, _extends({
|
|
26334
26344
|
"data-orientation": accordionContext.orientation,
|
|
26335
26345
|
"data-state": $1bf158f521e1b1b4$var$getState(itemContext.open),
|
|
26336
26346
|
"data-disabled": itemContext.disabled ? "" : void 0
|
|
@@ -26339,15 +26349,15 @@ var $1bf158f521e1b1b4$export$5e3e5deaaf81ee41 = /* @__PURE__ */ import_react157.
|
|
|
26339
26349
|
}));
|
|
26340
26350
|
});
|
|
26341
26351
|
var $1bf158f521e1b1b4$var$TRIGGER_NAME = "AccordionTrigger";
|
|
26342
|
-
var $1bf158f521e1b1b4$export$94e939b1f85bdd73 = /* @__PURE__ */
|
|
26352
|
+
var $1bf158f521e1b1b4$export$94e939b1f85bdd73 = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26343
26353
|
const { __scopeAccordion, ...triggerProps } = props;
|
|
26344
26354
|
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
26345
26355
|
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
|
|
26346
26356
|
const collapsibleContext = $1bf158f521e1b1b4$var$useAccordionCollapsibleContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
|
|
26347
26357
|
const collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
|
|
26348
|
-
return /* @__PURE__ */
|
|
26358
|
+
return /* @__PURE__ */ import_react158.default.createElement($1bf158f521e1b1b4$var$Collection.ItemSlot, {
|
|
26349
26359
|
scope: __scopeAccordion
|
|
26350
|
-
}, /* @__PURE__ */
|
|
26360
|
+
}, /* @__PURE__ */ import_react158.default.createElement($409067139f391064$export$41fb9f06171c75f4, _extends({
|
|
26351
26361
|
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
|
26352
26362
|
"data-orientation": accordionContext.orientation,
|
|
26353
26363
|
id: itemContext.triggerId
|
|
@@ -26356,12 +26366,12 @@ var $1bf158f521e1b1b4$export$94e939b1f85bdd73 = /* @__PURE__ */ import_react157.
|
|
|
26356
26366
|
})));
|
|
26357
26367
|
});
|
|
26358
26368
|
var $1bf158f521e1b1b4$var$CONTENT_NAME = "AccordionContent";
|
|
26359
|
-
var $1bf158f521e1b1b4$export$985b9a77379b54a0 = /* @__PURE__ */
|
|
26369
|
+
var $1bf158f521e1b1b4$export$985b9a77379b54a0 = /* @__PURE__ */ import_react158.default.forwardRef((props, forwardedRef) => {
|
|
26360
26370
|
const { __scopeAccordion, ...contentProps } = props;
|
|
26361
26371
|
const accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
|
|
26362
26372
|
const itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$CONTENT_NAME, __scopeAccordion);
|
|
26363
26373
|
const collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
|
|
26364
|
-
return /* @__PURE__ */
|
|
26374
|
+
return /* @__PURE__ */ import_react158.default.createElement($409067139f391064$export$7c6e2c02157bb7d2, _extends({
|
|
26365
26375
|
role: "region",
|
|
26366
26376
|
"aria-labelledby": itemContext.triggerId,
|
|
26367
26377
|
"data-orientation": accordionContext.orientation
|
|
@@ -26545,7 +26555,7 @@ function Calendar({ className, ...props }) {
|
|
|
26545
26555
|
}
|
|
26546
26556
|
|
|
26547
26557
|
// src/components/Checkbox.tsx
|
|
26548
|
-
var
|
|
26558
|
+
var import_react159 = require("react");
|
|
26549
26559
|
|
|
26550
26560
|
// node_modules/react-icons/im/index.mjs
|
|
26551
26561
|
function ImCheckmark(props) {
|
|
@@ -26564,7 +26574,7 @@ var Checkbox_default = {
|
|
|
26564
26574
|
|
|
26565
26575
|
// src/components/Checkbox.tsx
|
|
26566
26576
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
26567
|
-
var Checkbox = (0,
|
|
26577
|
+
var Checkbox = (0, import_react159.forwardRef)(
|
|
26568
26578
|
({ label, className, children, ...props }, ref) => {
|
|
26569
26579
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
26570
26580
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -26664,11 +26674,11 @@ function Combobox({ items, className, ...props }) {
|
|
|
26664
26674
|
}
|
|
26665
26675
|
|
|
26666
26676
|
// src/components/ConfirmationDialog.tsx
|
|
26667
|
-
var
|
|
26677
|
+
var import_react162 = require("react");
|
|
26668
26678
|
var import_classnames23 = __toESM(require_classnames());
|
|
26669
26679
|
|
|
26670
26680
|
// src/components/TextField.tsx
|
|
26671
|
-
var
|
|
26681
|
+
var import_react161 = require("react");
|
|
26672
26682
|
var import_classnames22 = __toESM(require_classnames());
|
|
26673
26683
|
|
|
26674
26684
|
// src/components/Label.tsx
|
|
@@ -26686,7 +26696,7 @@ function Label({ className, ...props }) {
|
|
|
26686
26696
|
}
|
|
26687
26697
|
|
|
26688
26698
|
// src/components/CopyButton.tsx
|
|
26689
|
-
var
|
|
26699
|
+
var import_react160 = require("react");
|
|
26690
26700
|
var import_classnames21 = __toESM(require_classnames());
|
|
26691
26701
|
|
|
26692
26702
|
// src/components/CopyButton.module.css
|
|
@@ -26699,8 +26709,8 @@ var CopyButton_default = {
|
|
|
26699
26709
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
26700
26710
|
var TIMEOUT = 2e3;
|
|
26701
26711
|
function CopyButton({ value, timeout = TIMEOUT, className, children, ...props }) {
|
|
26702
|
-
const [copied, setCopied] = (0,
|
|
26703
|
-
const ref = (0,
|
|
26712
|
+
const [copied, setCopied] = (0, import_react160.useState)(false);
|
|
26713
|
+
const ref = (0, import_react160.useRef)(timeout);
|
|
26704
26714
|
const handleCopy = async () => {
|
|
26705
26715
|
if (value) {
|
|
26706
26716
|
await navigator.clipboard.writeText(value);
|
|
@@ -26729,7 +26739,7 @@ var TextField_default = {
|
|
|
26729
26739
|
|
|
26730
26740
|
// src/components/TextField.tsx
|
|
26731
26741
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
26732
|
-
var TextField = (0,
|
|
26742
|
+
var TextField = (0, import_react161.forwardRef)(
|
|
26733
26743
|
({
|
|
26734
26744
|
value,
|
|
26735
26745
|
defaultValue,
|
|
@@ -26741,13 +26751,13 @@ var TextField = (0, import_react160.forwardRef)(
|
|
|
26741
26751
|
onChange,
|
|
26742
26752
|
...props
|
|
26743
26753
|
}, ref) => {
|
|
26744
|
-
const [inputValue, setInputValue] = (0,
|
|
26754
|
+
const [inputValue, setInputValue] = (0, import_react161.useState)(defaultValue || value);
|
|
26745
26755
|
const Component = asTextArea ? $216918bed6669f72$export$f5c9f3c2c4054eec : $3985021b0ad6602f$export$f5b8910cec6cf069;
|
|
26746
26756
|
const handleChange = (e) => {
|
|
26747
26757
|
setInputValue(e.target.value);
|
|
26748
26758
|
return onChange?.(e);
|
|
26749
26759
|
};
|
|
26750
|
-
(0,
|
|
26760
|
+
(0, import_react161.useEffect)(() => {
|
|
26751
26761
|
setInputValue(value);
|
|
26752
26762
|
}, [value]);
|
|
26753
26763
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
@@ -26795,7 +26805,7 @@ function ConfirmationDialog({
|
|
|
26795
26805
|
children,
|
|
26796
26806
|
...props
|
|
26797
26807
|
}) {
|
|
26798
|
-
const [canSave, setCanSave] = (0,
|
|
26808
|
+
const [canSave, setCanSave] = (0, import_react162.useState)(false);
|
|
26799
26809
|
const handleChange = (e) => {
|
|
26800
26810
|
setCanSave(e.target.value === value);
|
|
26801
26811
|
};
|
|
@@ -26822,7 +26832,7 @@ function ConfirmationDialog({
|
|
|
26822
26832
|
|
|
26823
26833
|
// src/components/DataTable.tsx
|
|
26824
26834
|
var import_classnames25 = __toESM(require_classnames());
|
|
26825
|
-
var
|
|
26835
|
+
var import_react163 = require("react");
|
|
26826
26836
|
|
|
26827
26837
|
// src/components/Table.tsx
|
|
26828
26838
|
var import_classnames24 = __toESM(require_classnames());
|
|
@@ -26877,9 +26887,9 @@ var DataTable_default = {
|
|
|
26877
26887
|
|
|
26878
26888
|
// src/components/DataTable.tsx
|
|
26879
26889
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
26880
|
-
var
|
|
26890
|
+
var import_react164 = require("react");
|
|
26881
26891
|
function DataTable({ data = [], className, children, ...props }) {
|
|
26882
|
-
const columns =
|
|
26892
|
+
const columns = import_react163.Children.map(children, (child) => {
|
|
26883
26893
|
return { ...child.props, value: child.props.children };
|
|
26884
26894
|
});
|
|
26885
26895
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Table, { ...props, className: (0, import_classnames25.default)(DataTable_default.datatable, className), children: [
|
|
@@ -26887,11 +26897,11 @@ function DataTable({ data = [], className, children, ...props }) {
|
|
|
26887
26897
|
if (hidden) {
|
|
26888
26898
|
return null;
|
|
26889
26899
|
}
|
|
26890
|
-
return /* @__PURE__ */ (0,
|
|
26900
|
+
return /* @__PURE__ */ (0, import_react164.createElement)(TableColumn, { ...columnProps, key: id, id }, label);
|
|
26891
26901
|
}) }),
|
|
26892
26902
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableBody, { items: data, children: (row) => {
|
|
26893
26903
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TableRow, { children: columns.map(({ id, value, className: className2, ...cellProps }) => {
|
|
26894
|
-
return /* @__PURE__ */ (0,
|
|
26904
|
+
return /* @__PURE__ */ (0, import_react164.createElement)(TableCell, { ...cellProps, key: id, className: (0, import_classnames25.default)(DataTable_default.cell, className2) }, !value && row[id], typeof value === "function" ? value(row, id) : value);
|
|
26895
26905
|
}) });
|
|
26896
26906
|
} })
|
|
26897
26907
|
] });
|
|
@@ -26940,7 +26950,7 @@ var Heading_default = {
|
|
|
26940
26950
|
// src/components/Heading.tsx
|
|
26941
26951
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
26942
26952
|
function Heading({ size = 5, className, children, asChild, ...props }) {
|
|
26943
|
-
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "
|
|
26953
|
+
const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "div";
|
|
26944
26954
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
26945
26955
|
Component,
|
|
26946
26956
|
{
|
|
@@ -26952,7 +26962,7 @@ function Heading({ size = 5, className, children, asChild, ...props }) {
|
|
|
26952
26962
|
}
|
|
26953
26963
|
|
|
26954
26964
|
// src/components/HoverTrigger.tsx
|
|
26955
|
-
var
|
|
26965
|
+
var import_react165 = require("react");
|
|
26956
26966
|
|
|
26957
26967
|
// src/components/HoverTrigger.module.css
|
|
26958
26968
|
var HoverTrigger_default = {
|
|
@@ -26962,45 +26972,69 @@ var HoverTrigger_default = {
|
|
|
26962
26972
|
// src/components/HoverTrigger.tsx
|
|
26963
26973
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
26964
26974
|
var CLOSE_DELAY = 500;
|
|
26965
|
-
function HoverTrigger({
|
|
26975
|
+
function HoverTrigger({
|
|
26976
|
+
isOpen,
|
|
26977
|
+
onHoverStart,
|
|
26978
|
+
onHoverEnd,
|
|
26979
|
+
closeDelay = CLOSE_DELAY,
|
|
26980
|
+
children
|
|
26981
|
+
}) {
|
|
26966
26982
|
const [triggerElement, popupElement] = children;
|
|
26967
|
-
const
|
|
26968
|
-
const
|
|
26969
|
-
const
|
|
26970
|
-
|
|
26971
|
-
|
|
26983
|
+
const triggerRef = (0, import_react165.useRef)(null);
|
|
26984
|
+
const [open, setOpen] = (0, import_react165.useState)(isOpen);
|
|
26985
|
+
const isOverMenu = (0, import_react165.useRef)(false);
|
|
26986
|
+
const isOverButton = (0, import_react165.useRef)(false);
|
|
26987
|
+
const timeout = (0, import_react165.useRef)();
|
|
26988
|
+
(0, import_react165.useEffect)(() => {
|
|
26989
|
+
if (isOpen !== open) {
|
|
26990
|
+
setOpen(isOpen);
|
|
26991
|
+
}
|
|
26992
|
+
}, [isOpen]);
|
|
26993
|
+
const close = () => setOpen(false);
|
|
26994
|
+
const handleMouseEnter = () => {
|
|
26995
|
+
isOverMenu.current = false;
|
|
26996
|
+
isOverButton.current = true;
|
|
26997
|
+
setOpen(true);
|
|
26998
|
+
onHoverStart?.();
|
|
26972
26999
|
};
|
|
26973
|
-
const
|
|
26974
|
-
|
|
26975
|
-
|
|
26976
|
-
setShow(false);
|
|
26977
|
-
overMenu.current = false;
|
|
26978
|
-
}
|
|
26979
|
-
}, closeDelay);
|
|
27000
|
+
const handleMouseLeave = () => {
|
|
27001
|
+
isOverButton.current = false;
|
|
27002
|
+
checkHoverState();
|
|
26980
27003
|
};
|
|
26981
27004
|
const handleMenuEnter = () => {
|
|
26982
|
-
|
|
27005
|
+
isOverMenu.current = true;
|
|
26983
27006
|
};
|
|
26984
27007
|
const handleMenuLeave = () => {
|
|
26985
|
-
|
|
26986
|
-
|
|
27008
|
+
isOverMenu.current = false;
|
|
27009
|
+
checkHoverState();
|
|
27010
|
+
};
|
|
27011
|
+
const checkHoverState = () => {
|
|
27012
|
+
clearTimeout(timeout.current);
|
|
27013
|
+
timeout.current = setTimeout(() => {
|
|
27014
|
+
if (!isOverMenu.current && !isOverButton.current) {
|
|
27015
|
+
setOpen(false);
|
|
27016
|
+
onHoverEnd?.();
|
|
27017
|
+
isOverMenu.current = false;
|
|
27018
|
+
isOverButton.current = false;
|
|
27019
|
+
}
|
|
27020
|
+
}, closeDelay);
|
|
26987
27021
|
};
|
|
26988
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
26989
|
-
(0,
|
|
26990
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Popover, { isOpen:
|
|
27022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
27023
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
|
|
27024
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Popover, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
26991
27025
|
"div",
|
|
26992
27026
|
{
|
|
26993
27027
|
className: HoverTrigger_default.wrapper,
|
|
26994
27028
|
onMouseEnter: handleMenuEnter,
|
|
26995
27029
|
onMouseLeave: handleMenuLeave,
|
|
26996
|
-
children:
|
|
27030
|
+
children: popupElement
|
|
26997
27031
|
}
|
|
26998
27032
|
) })
|
|
26999
27033
|
] });
|
|
27000
27034
|
}
|
|
27001
27035
|
|
|
27002
27036
|
// src/components/InlineEditField.tsx
|
|
27003
|
-
var
|
|
27037
|
+
var import_react166 = require("react");
|
|
27004
27038
|
var import_classnames28 = __toESM(require_classnames());
|
|
27005
27039
|
|
|
27006
27040
|
// src/components/InlineEditField.module.css
|
|
@@ -27021,8 +27055,8 @@ function InlineEditField({
|
|
|
27021
27055
|
onCancel,
|
|
27022
27056
|
...props
|
|
27023
27057
|
}) {
|
|
27024
|
-
const [value, setValue] = (0,
|
|
27025
|
-
const [edit, setEdit] = (0,
|
|
27058
|
+
const [value, setValue] = (0, import_react166.useState)(defaultValue);
|
|
27059
|
+
const [edit, setEdit] = (0, import_react166.useState)(defaultEdit);
|
|
27026
27060
|
const handleEdit = () => setEdit(true);
|
|
27027
27061
|
const handleChange = (e) => {
|
|
27028
27062
|
const val = e.target.value;
|
|
@@ -27033,7 +27067,7 @@ function InlineEditField({
|
|
|
27033
27067
|
setEdit(false);
|
|
27034
27068
|
onCommit?.(value);
|
|
27035
27069
|
};
|
|
27036
|
-
const handleCancel = (0,
|
|
27070
|
+
const handleCancel = (0, import_react166.useCallback)(() => {
|
|
27037
27071
|
setEdit(false);
|
|
27038
27072
|
setValue(defaultValue);
|
|
27039
27073
|
onCancel?.();
|
|
@@ -27154,1060 +27188,55 @@ function Modal({ children, className, ...props }) {
|
|
|
27154
27188
|
) });
|
|
27155
27189
|
}
|
|
27156
27190
|
|
|
27157
|
-
// node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
27158
|
-
var import_react170 = require("react");
|
|
27159
|
-
var import_react_dom10 = __toESM(require("react-dom"), 1);
|
|
27160
|
-
|
|
27161
|
-
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
27162
|
-
var import_react167 = require("react");
|
|
27163
|
-
|
|
27164
|
-
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
27165
|
-
var import_react166 = require("react");
|
|
27166
|
-
function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27167
|
-
const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
|
|
27168
|
-
(0, import_react166.useEffect)(() => {
|
|
27169
|
-
const handleKeyDown = (event) => {
|
|
27170
|
-
if (event.key === "Escape") onEscapeKeyDown(event);
|
|
27171
|
-
};
|
|
27172
|
-
ownerDocument.addEventListener("keydown", handleKeyDown);
|
|
27173
|
-
return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
|
|
27174
|
-
}, [
|
|
27175
|
-
onEscapeKeyDown,
|
|
27176
|
-
ownerDocument
|
|
27177
|
-
]);
|
|
27178
|
-
}
|
|
27179
|
-
|
|
27180
|
-
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
27181
|
-
var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
|
|
27182
|
-
var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
27183
|
-
var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
27184
|
-
var $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
27185
|
-
var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ (0, import_react167.createContext)({
|
|
27186
|
-
layers: /* @__PURE__ */ new Set(),
|
|
27187
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
27188
|
-
branches: /* @__PURE__ */ new Set()
|
|
27189
|
-
});
|
|
27190
|
-
var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ (0, import_react167.forwardRef)((props, forwardedRef) => {
|
|
27191
|
-
var _node$ownerDocument;
|
|
27192
|
-
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
27193
|
-
const context = (0, import_react167.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
|
|
27194
|
-
const [node1, setNode] = (0, import_react167.useState)(null);
|
|
27195
|
-
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;
|
|
27196
|
-
const [, force] = (0, import_react167.useState)({});
|
|
27197
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
27198
|
-
forwardedRef,
|
|
27199
|
-
(node) => setNode(node)
|
|
27200
|
-
);
|
|
27201
|
-
const layers = Array.from(context.layers);
|
|
27202
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
27203
|
-
...context.layersWithOutsidePointerEventsDisabled
|
|
27204
|
-
].slice(-1);
|
|
27205
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
27206
|
-
const index = node1 ? layers.indexOf(node1) : -1;
|
|
27207
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
27208
|
-
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
27209
|
-
const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
|
|
27210
|
-
const target = event.target;
|
|
27211
|
-
const isPointerDownOnBranch = [
|
|
27212
|
-
...context.branches
|
|
27213
|
-
].some(
|
|
27214
|
-
(branch) => branch.contains(target)
|
|
27215
|
-
);
|
|
27216
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
27217
|
-
onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
|
|
27218
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
27219
|
-
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
27220
|
-
}, ownerDocument);
|
|
27221
|
-
const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
|
|
27222
|
-
const target = event.target;
|
|
27223
|
-
const isFocusInBranch = [
|
|
27224
|
-
...context.branches
|
|
27225
|
-
].some(
|
|
27226
|
-
(branch) => branch.contains(target)
|
|
27227
|
-
);
|
|
27228
|
-
if (isFocusInBranch) return;
|
|
27229
|
-
onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
|
|
27230
|
-
onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
|
|
27231
|
-
if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
|
|
27232
|
-
}, ownerDocument);
|
|
27233
|
-
$addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
|
|
27234
|
-
const isHighestLayer = index === context.layers.size - 1;
|
|
27235
|
-
if (!isHighestLayer) return;
|
|
27236
|
-
onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
|
|
27237
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
27238
|
-
event.preventDefault();
|
|
27239
|
-
onDismiss();
|
|
27240
|
-
}
|
|
27241
|
-
}, ownerDocument);
|
|
27242
|
-
(0, import_react167.useEffect)(() => {
|
|
27243
|
-
if (!node1) return;
|
|
27244
|
-
if (disableOutsidePointerEvents) {
|
|
27245
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
27246
|
-
$5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
27247
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
27248
|
-
}
|
|
27249
|
-
context.layersWithOutsidePointerEventsDisabled.add(node1);
|
|
27250
|
-
}
|
|
27251
|
-
context.layers.add(node1);
|
|
27252
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
27253
|
-
return () => {
|
|
27254
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
|
|
27255
|
-
};
|
|
27256
|
-
}, [
|
|
27257
|
-
node1,
|
|
27258
|
-
ownerDocument,
|
|
27259
|
-
disableOutsidePointerEvents,
|
|
27260
|
-
context
|
|
27261
|
-
]);
|
|
27262
|
-
(0, import_react167.useEffect)(() => {
|
|
27263
|
-
return () => {
|
|
27264
|
-
if (!node1) return;
|
|
27265
|
-
context.layers.delete(node1);
|
|
27266
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node1);
|
|
27267
|
-
$5cb92bef7577960e$var$dispatchUpdate();
|
|
27268
|
-
};
|
|
27269
|
-
}, [
|
|
27270
|
-
node1,
|
|
27271
|
-
context
|
|
27272
|
-
]);
|
|
27273
|
-
(0, import_react167.useEffect)(() => {
|
|
27274
|
-
const handleUpdate = () => force({});
|
|
27275
|
-
document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
27276
|
-
return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
|
|
27277
|
-
}, []);
|
|
27278
|
-
return /* @__PURE__ */ (0, import_react167.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
|
|
27279
|
-
ref: composedRefs,
|
|
27280
|
-
style: {
|
|
27281
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
27282
|
-
...props.style
|
|
27283
|
-
},
|
|
27284
|
-
onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
27285
|
-
onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
27286
|
-
onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
27287
|
-
}));
|
|
27288
|
-
});
|
|
27289
|
-
function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27290
|
-
const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
|
|
27291
|
-
const isPointerInsideReactTreeRef = (0, import_react167.useRef)(false);
|
|
27292
|
-
const handleClickRef = (0, import_react167.useRef)(() => {
|
|
27293
|
-
});
|
|
27294
|
-
(0, import_react167.useEffect)(() => {
|
|
27295
|
-
const handlePointerDown = (event) => {
|
|
27296
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
27297
|
-
let handleAndDispatchPointerDownOutsideEvent = function() {
|
|
27298
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
|
|
27299
|
-
discrete: true
|
|
27300
|
-
});
|
|
27301
|
-
};
|
|
27302
|
-
const eventDetail = {
|
|
27303
|
-
originalEvent: event
|
|
27304
|
-
};
|
|
27305
|
-
if (event.pointerType === "touch") {
|
|
27306
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27307
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
|
|
27308
|
-
ownerDocument.addEventListener("click", handleClickRef.current, {
|
|
27309
|
-
once: true
|
|
27310
|
-
});
|
|
27311
|
-
} else handleAndDispatchPointerDownOutsideEvent();
|
|
27312
|
-
} else
|
|
27313
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27314
|
-
isPointerInsideReactTreeRef.current = false;
|
|
27315
|
-
};
|
|
27316
|
-
const timerId = window.setTimeout(() => {
|
|
27317
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
27318
|
-
}, 0);
|
|
27319
|
-
return () => {
|
|
27320
|
-
window.clearTimeout(timerId);
|
|
27321
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
27322
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
27323
|
-
};
|
|
27324
|
-
}, [
|
|
27325
|
-
ownerDocument,
|
|
27326
|
-
handlePointerDownOutside
|
|
27327
|
-
]);
|
|
27328
|
-
return {
|
|
27329
|
-
// ensures we check React component tree (not just DOM tree)
|
|
27330
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
27331
|
-
};
|
|
27332
|
-
}
|
|
27333
|
-
function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
27334
|
-
const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
|
|
27335
|
-
const isFocusInsideReactTreeRef = (0, import_react167.useRef)(false);
|
|
27336
|
-
(0, import_react167.useEffect)(() => {
|
|
27337
|
-
const handleFocus = (event) => {
|
|
27338
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
27339
|
-
const eventDetail = {
|
|
27340
|
-
originalEvent: event
|
|
27341
|
-
};
|
|
27342
|
-
$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
27343
|
-
discrete: false
|
|
27344
|
-
});
|
|
27345
|
-
}
|
|
27346
|
-
};
|
|
27347
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
27348
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
27349
|
-
}, [
|
|
27350
|
-
ownerDocument,
|
|
27351
|
-
handleFocusOutside
|
|
27352
|
-
]);
|
|
27353
|
-
return {
|
|
27354
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
27355
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
27356
|
-
};
|
|
27357
|
-
}
|
|
27358
|
-
function $5cb92bef7577960e$var$dispatchUpdate() {
|
|
27359
|
-
const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
|
|
27360
|
-
document.dispatchEvent(event);
|
|
27361
|
-
}
|
|
27362
|
-
function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
27363
|
-
const target = detail.originalEvent.target;
|
|
27364
|
-
const event = new CustomEvent(name, {
|
|
27365
|
-
bubbles: false,
|
|
27366
|
-
cancelable: true,
|
|
27367
|
-
detail
|
|
27368
|
-
});
|
|
27369
|
-
if (handler) target.addEventListener(name, handler, {
|
|
27370
|
-
once: true
|
|
27371
|
-
});
|
|
27372
|
-
if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
|
|
27373
|
-
else target.dispatchEvent(event);
|
|
27374
|
-
}
|
|
27375
|
-
|
|
27376
|
-
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
27377
|
-
var import_react168 = require("react");
|
|
27378
|
-
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
27379
|
-
const ref = (0, import_react168.useRef)({
|
|
27380
|
-
value,
|
|
27381
|
-
previous: value
|
|
27382
|
-
});
|
|
27383
|
-
return (0, import_react168.useMemo)(() => {
|
|
27384
|
-
if (ref.current.value !== value) {
|
|
27385
|
-
ref.current.previous = ref.current.value;
|
|
27386
|
-
ref.current.value = value;
|
|
27387
|
-
}
|
|
27388
|
-
return ref.current.previous;
|
|
27389
|
-
}, [
|
|
27390
|
-
value
|
|
27391
|
-
]);
|
|
27392
|
-
}
|
|
27393
|
-
|
|
27394
|
-
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
27395
|
-
var import_react169 = require("react");
|
|
27396
|
-
var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ (0, import_react169.forwardRef)((props, forwardedRef) => {
|
|
27397
|
-
return /* @__PURE__ */ (0, import_react169.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
27398
|
-
ref: forwardedRef,
|
|
27399
|
-
style: {
|
|
27400
|
-
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
|
|
27401
|
-
position: "absolute",
|
|
27402
|
-
border: 0,
|
|
27403
|
-
width: 1,
|
|
27404
|
-
height: 1,
|
|
27405
|
-
padding: 0,
|
|
27406
|
-
margin: -1,
|
|
27407
|
-
overflow: "hidden",
|
|
27408
|
-
clip: "rect(0, 0, 0, 0)",
|
|
27409
|
-
whiteSpace: "nowrap",
|
|
27410
|
-
wordWrap: "normal",
|
|
27411
|
-
...props.style
|
|
27412
|
-
}
|
|
27413
|
-
}));
|
|
27414
|
-
});
|
|
27415
|
-
var $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164;
|
|
27416
|
-
|
|
27417
|
-
// node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
27418
|
-
var $322c88a641701f3b$var$NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
27419
|
-
var [$322c88a641701f3b$var$Collection, $322c88a641701f3b$var$useCollection, $322c88a641701f3b$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27420
|
-
var [$322c88a641701f3b$var$FocusGroupCollection, $322c88a641701f3b$var$useFocusGroupCollection, $322c88a641701f3b$var$createFocusGroupCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27421
|
-
var [$322c88a641701f3b$var$createNavigationMenuContext, $322c88a641701f3b$export$fb8ea5af8c9fcdf0] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($322c88a641701f3b$var$NAVIGATION_MENU_NAME, [
|
|
27422
|
-
$322c88a641701f3b$var$createCollectionScope,
|
|
27423
|
-
$322c88a641701f3b$var$createFocusGroupCollectionScope
|
|
27424
|
-
]);
|
|
27425
|
-
var [$322c88a641701f3b$var$NavigationMenuProviderImpl, $322c88a641701f3b$var$useNavigationMenuContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27426
|
-
var [$322c88a641701f3b$var$ViewportContentProvider, $322c88a641701f3b$var$useViewportContentContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
|
|
27427
|
-
var $322c88a641701f3b$export$5b2278cf1e8bcae2 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27428
|
-
const { __scopeNavigationMenu, value: valueProp, onValueChange, defaultValue, delayDuration = 200, skipDelayDuration = 300, orientation = "horizontal", dir, ...NavigationMenuProps } = props;
|
|
27429
|
-
const [navigationMenu, setNavigationMenu] = (0, import_react170.useState)(null);
|
|
27430
|
-
const composedRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
|
|
27431
|
-
forwardedRef,
|
|
27432
|
-
(node) => setNavigationMenu(node)
|
|
27433
|
-
);
|
|
27434
|
-
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
27435
|
-
const openTimerRef = (0, import_react170.useRef)(0);
|
|
27436
|
-
const closeTimerRef = (0, import_react170.useRef)(0);
|
|
27437
|
-
const skipDelayTimerRef = (0, import_react170.useRef)(0);
|
|
27438
|
-
const [isOpenDelayed, setIsOpenDelayed] = (0, import_react170.useState)(true);
|
|
27439
|
-
const [value1 = "", setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
27440
|
-
prop: valueProp,
|
|
27441
|
-
onChange: (value) => {
|
|
27442
|
-
const isOpen = value !== "";
|
|
27443
|
-
const hasSkipDelayDuration = skipDelayDuration > 0;
|
|
27444
|
-
if (isOpen) {
|
|
27445
|
-
window.clearTimeout(skipDelayTimerRef.current);
|
|
27446
|
-
if (hasSkipDelayDuration) setIsOpenDelayed(false);
|
|
27447
|
-
} else {
|
|
27448
|
-
window.clearTimeout(skipDelayTimerRef.current);
|
|
27449
|
-
skipDelayTimerRef.current = window.setTimeout(
|
|
27450
|
-
() => setIsOpenDelayed(true),
|
|
27451
|
-
skipDelayDuration
|
|
27452
|
-
);
|
|
27453
|
-
}
|
|
27454
|
-
onValueChange === null || onValueChange === void 0 || onValueChange(value);
|
|
27455
|
-
},
|
|
27456
|
-
defaultProp: defaultValue
|
|
27457
|
-
});
|
|
27458
|
-
const startCloseTimer = (0, import_react170.useCallback)(() => {
|
|
27459
|
-
window.clearTimeout(closeTimerRef.current);
|
|
27460
|
-
closeTimerRef.current = window.setTimeout(
|
|
27461
|
-
() => setValue(""),
|
|
27462
|
-
150
|
|
27463
|
-
);
|
|
27464
|
-
}, [
|
|
27465
|
-
setValue
|
|
27466
|
-
]);
|
|
27467
|
-
const handleOpen = (0, import_react170.useCallback)((itemValue) => {
|
|
27468
|
-
window.clearTimeout(closeTimerRef.current);
|
|
27469
|
-
setValue(itemValue);
|
|
27470
|
-
}, [
|
|
27471
|
-
setValue
|
|
27472
|
-
]);
|
|
27473
|
-
const handleDelayedOpen = (0, import_react170.useCallback)((itemValue) => {
|
|
27474
|
-
const isOpenItem = value1 === itemValue;
|
|
27475
|
-
if (isOpenItem)
|
|
27476
|
-
window.clearTimeout(closeTimerRef.current);
|
|
27477
|
-
else openTimerRef.current = window.setTimeout(() => {
|
|
27478
|
-
window.clearTimeout(closeTimerRef.current);
|
|
27479
|
-
setValue(itemValue);
|
|
27480
|
-
}, delayDuration);
|
|
27481
|
-
}, [
|
|
27482
|
-
value1,
|
|
27483
|
-
setValue,
|
|
27484
|
-
delayDuration
|
|
27485
|
-
]);
|
|
27486
|
-
(0, import_react170.useEffect)(() => {
|
|
27487
|
-
return () => {
|
|
27488
|
-
window.clearTimeout(openTimerRef.current);
|
|
27489
|
-
window.clearTimeout(closeTimerRef.current);
|
|
27490
|
-
window.clearTimeout(skipDelayTimerRef.current);
|
|
27491
|
-
};
|
|
27492
|
-
}, []);
|
|
27493
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuProvider, {
|
|
27494
|
-
scope: __scopeNavigationMenu,
|
|
27495
|
-
isRootMenu: true,
|
|
27496
|
-
value: value1,
|
|
27497
|
-
dir: direction,
|
|
27498
|
-
orientation,
|
|
27499
|
-
rootNavigationMenu: navigationMenu,
|
|
27500
|
-
onTriggerEnter: (itemValue) => {
|
|
27501
|
-
window.clearTimeout(openTimerRef.current);
|
|
27502
|
-
if (isOpenDelayed) handleDelayedOpen(itemValue);
|
|
27503
|
-
else handleOpen(itemValue);
|
|
27504
|
-
},
|
|
27505
|
-
onTriggerLeave: () => {
|
|
27506
|
-
window.clearTimeout(openTimerRef.current);
|
|
27507
|
-
startCloseTimer();
|
|
27508
|
-
},
|
|
27509
|
-
onContentEnter: () => window.clearTimeout(closeTimerRef.current),
|
|
27510
|
-
onContentLeave: startCloseTimer,
|
|
27511
|
-
onItemSelect: (itemValue) => {
|
|
27512
|
-
setValue(
|
|
27513
|
-
(prevValue) => prevValue === itemValue ? "" : itemValue
|
|
27514
|
-
);
|
|
27515
|
-
},
|
|
27516
|
-
onItemDismiss: () => setValue("")
|
|
27517
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.nav, _extends({
|
|
27518
|
-
"aria-label": "Main",
|
|
27519
|
-
"data-orientation": orientation,
|
|
27520
|
-
dir: direction
|
|
27521
|
-
}, NavigationMenuProps, {
|
|
27522
|
-
ref: composedRef
|
|
27523
|
-
})));
|
|
27524
|
-
});
|
|
27525
|
-
var $322c88a641701f3b$var$NavigationMenuProvider = (props) => {
|
|
27526
|
-
const { scope, isRootMenu, rootNavigationMenu, dir, orientation, children, value, onItemSelect, onItemDismiss, onTriggerEnter, onTriggerLeave, onContentEnter, onContentLeave } = props;
|
|
27527
|
-
const [viewport, setViewport] = (0, import_react170.useState)(null);
|
|
27528
|
-
const [viewportContent, setViewportContent] = (0, import_react170.useState)(/* @__PURE__ */ new Map());
|
|
27529
|
-
const [indicatorTrack, setIndicatorTrack] = (0, import_react170.useState)(null);
|
|
27530
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuProviderImpl, {
|
|
27531
|
-
scope,
|
|
27532
|
-
isRootMenu,
|
|
27533
|
-
rootNavigationMenu,
|
|
27534
|
-
value,
|
|
27535
|
-
previousValue: $010c2913dbd2fe3d$export$5cae361ad82dce8b(value),
|
|
27536
|
-
baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
27537
|
-
dir,
|
|
27538
|
-
orientation,
|
|
27539
|
-
viewport,
|
|
27540
|
-
onViewportChange: setViewport,
|
|
27541
|
-
indicatorTrack,
|
|
27542
|
-
onIndicatorTrackChange: setIndicatorTrack,
|
|
27543
|
-
onTriggerEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerEnter),
|
|
27544
|
-
onTriggerLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerLeave),
|
|
27545
|
-
onContentEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentEnter),
|
|
27546
|
-
onContentLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentLeave),
|
|
27547
|
-
onItemSelect: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemSelect),
|
|
27548
|
-
onItemDismiss: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemDismiss),
|
|
27549
|
-
onViewportContentChange: (0, import_react170.useCallback)((contentValue, contentData) => {
|
|
27550
|
-
setViewportContent((prevContent) => {
|
|
27551
|
-
prevContent.set(contentValue, contentData);
|
|
27552
|
-
return new Map(prevContent);
|
|
27553
|
-
});
|
|
27554
|
-
}, []),
|
|
27555
|
-
onViewportContentRemove: (0, import_react170.useCallback)((contentValue) => {
|
|
27556
|
-
setViewportContent((prevContent) => {
|
|
27557
|
-
if (!prevContent.has(contentValue)) return prevContent;
|
|
27558
|
-
prevContent.delete(contentValue);
|
|
27559
|
-
return new Map(prevContent);
|
|
27560
|
-
});
|
|
27561
|
-
}, [])
|
|
27562
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$Collection.Provider, {
|
|
27563
|
-
scope
|
|
27564
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$ViewportContentProvider, {
|
|
27565
|
-
scope,
|
|
27566
|
-
items: viewportContent
|
|
27567
|
-
}, children)));
|
|
27568
|
-
};
|
|
27569
|
-
var $322c88a641701f3b$var$LIST_NAME = "NavigationMenuList";
|
|
27570
|
-
var $322c88a641701f3b$export$c361068a95fd2286 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27571
|
-
const { __scopeNavigationMenu, ...listProps } = props;
|
|
27572
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$LIST_NAME, __scopeNavigationMenu);
|
|
27573
|
-
const list = /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.ul, _extends({
|
|
27574
|
-
"data-orientation": context.orientation
|
|
27575
|
-
}, listProps, {
|
|
27576
|
-
ref: forwardedRef
|
|
27577
|
-
}));
|
|
27578
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, {
|
|
27579
|
-
style: {
|
|
27580
|
-
position: "relative"
|
|
27581
|
-
},
|
|
27582
|
-
ref: context.onIndicatorTrackChange
|
|
27583
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$Collection.Slot, {
|
|
27584
|
-
scope: __scopeNavigationMenu
|
|
27585
|
-
}, context.isRootMenu ? /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroup, {
|
|
27586
|
-
asChild: true
|
|
27587
|
-
}, list) : list));
|
|
27588
|
-
});
|
|
27589
|
-
var $322c88a641701f3b$var$ITEM_NAME = "NavigationMenuItem";
|
|
27590
|
-
var [$322c88a641701f3b$var$NavigationMenuItemContextProvider, $322c88a641701f3b$var$useNavigationMenuItemContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$ITEM_NAME);
|
|
27591
|
-
var $322c88a641701f3b$export$ffdbb83a2de845c2 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27592
|
-
const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
|
|
27593
|
-
const autoValue = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
27594
|
-
const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
|
|
27595
|
-
const contentRef = (0, import_react170.useRef)(null);
|
|
27596
|
-
const triggerRef = (0, import_react170.useRef)(null);
|
|
27597
|
-
const focusProxyRef = (0, import_react170.useRef)(null);
|
|
27598
|
-
const restoreContentTabOrderRef = (0, import_react170.useRef)(() => {
|
|
27599
|
-
});
|
|
27600
|
-
const wasEscapeCloseRef = (0, import_react170.useRef)(false);
|
|
27601
|
-
const handleContentEntry = (0, import_react170.useCallback)((side = "start") => {
|
|
27602
|
-
if (contentRef.current) {
|
|
27603
|
-
restoreContentTabOrderRef.current();
|
|
27604
|
-
const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
|
|
27605
|
-
if (candidates.length) $322c88a641701f3b$var$focusFirst(side === "start" ? candidates : candidates.reverse());
|
|
27606
|
-
}
|
|
27607
|
-
}, []);
|
|
27608
|
-
const handleContentExit = (0, import_react170.useCallback)(() => {
|
|
27609
|
-
if (contentRef.current) {
|
|
27610
|
-
const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
|
|
27611
|
-
if (candidates.length) restoreContentTabOrderRef.current = $322c88a641701f3b$var$removeFromTabOrder(candidates);
|
|
27612
|
-
}
|
|
27613
|
-
}, []);
|
|
27614
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuItemContextProvider, {
|
|
27615
|
-
scope: __scopeNavigationMenu,
|
|
27616
|
-
value,
|
|
27617
|
-
triggerRef,
|
|
27618
|
-
contentRef,
|
|
27619
|
-
focusProxyRef,
|
|
27620
|
-
wasEscapeCloseRef,
|
|
27621
|
-
onEntryKeyDown: handleContentEntry,
|
|
27622
|
-
onFocusProxyEnter: handleContentEntry,
|
|
27623
|
-
onRootContentClose: handleContentExit,
|
|
27624
|
-
onContentFocusOutside: handleContentExit
|
|
27625
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.li, _extends({}, itemProps, {
|
|
27626
|
-
ref: forwardedRef
|
|
27627
|
-
})));
|
|
27628
|
-
});
|
|
27629
|
-
var $322c88a641701f3b$var$TRIGGER_NAME = "NavigationMenuTrigger";
|
|
27630
|
-
var $322c88a641701f3b$export$37fe8002734d8f2 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27631
|
-
const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
|
|
27632
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
|
|
27633
|
-
const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
|
|
27634
|
-
const ref = (0, import_react170.useRef)(null);
|
|
27635
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, itemContext.triggerRef, forwardedRef);
|
|
27636
|
-
const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, itemContext.value);
|
|
27637
|
-
const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, itemContext.value);
|
|
27638
|
-
const hasPointerMoveOpenedRef = (0, import_react170.useRef)(false);
|
|
27639
|
-
const wasClickCloseRef = (0, import_react170.useRef)(false);
|
|
27640
|
-
const open = itemContext.value === context.value;
|
|
27641
|
-
return /* @__PURE__ */ (0, import_react170.createElement)(import_react170.Fragment, null, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$Collection.ItemSlot, {
|
|
27642
|
-
scope: __scopeNavigationMenu,
|
|
27643
|
-
value: itemContext.value
|
|
27644
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroupItem, {
|
|
27645
|
-
asChild: true
|
|
27646
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
27647
|
-
id: triggerId,
|
|
27648
|
-
disabled,
|
|
27649
|
-
"data-disabled": disabled ? "" : void 0,
|
|
27650
|
-
"data-state": $322c88a641701f3b$var$getOpenState(open),
|
|
27651
|
-
"aria-expanded": open,
|
|
27652
|
-
"aria-controls": contentId
|
|
27653
|
-
}, triggerProps, {
|
|
27654
|
-
ref: composedRefs,
|
|
27655
|
-
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, () => {
|
|
27656
|
-
wasClickCloseRef.current = false;
|
|
27657
|
-
itemContext.wasEscapeCloseRef.current = false;
|
|
27658
|
-
}),
|
|
27659
|
-
onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $322c88a641701f3b$var$whenMouse(() => {
|
|
27660
|
-
if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) return;
|
|
27661
|
-
context.onTriggerEnter(itemContext.value);
|
|
27662
|
-
hasPointerMoveOpenedRef.current = true;
|
|
27663
|
-
})),
|
|
27664
|
-
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(() => {
|
|
27665
|
-
if (disabled) return;
|
|
27666
|
-
context.onTriggerLeave();
|
|
27667
|
-
hasPointerMoveOpenedRef.current = false;
|
|
27668
|
-
})),
|
|
27669
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, () => {
|
|
27670
|
-
context.onItemSelect(itemContext.value);
|
|
27671
|
-
wasClickCloseRef.current = open;
|
|
27672
|
-
}),
|
|
27673
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
27674
|
-
const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
27675
|
-
const entryKey = {
|
|
27676
|
-
horizontal: "ArrowDown",
|
|
27677
|
-
vertical: verticalEntryKey
|
|
27678
|
-
}[context.orientation];
|
|
27679
|
-
if (open && event.key === entryKey) {
|
|
27680
|
-
itemContext.onEntryKeyDown();
|
|
27681
|
-
event.preventDefault();
|
|
27682
|
-
}
|
|
27683
|
-
})
|
|
27684
|
-
})))), open && /* @__PURE__ */ (0, import_react170.createElement)(import_react170.Fragment, null, /* @__PURE__ */ (0, import_react170.createElement)($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
|
|
27685
|
-
"aria-hidden": true,
|
|
27686
|
-
tabIndex: 0,
|
|
27687
|
-
ref: itemContext.focusProxyRef,
|
|
27688
|
-
onFocus: (event) => {
|
|
27689
|
-
const content = itemContext.contentRef.current;
|
|
27690
|
-
const prevFocusedElement = event.relatedTarget;
|
|
27691
|
-
const wasTriggerFocused = prevFocusedElement === ref.current;
|
|
27692
|
-
const wasFocusFromContent = content === null || content === void 0 ? void 0 : content.contains(prevFocusedElement);
|
|
27693
|
-
if (wasTriggerFocused || !wasFocusFromContent) itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end");
|
|
27694
|
-
}
|
|
27695
|
-
}), context.viewport && /* @__PURE__ */ (0, import_react170.createElement)("span", {
|
|
27696
|
-
"aria-owns": contentId
|
|
27697
|
-
})));
|
|
27698
|
-
});
|
|
27699
|
-
var $322c88a641701f3b$var$LINK_SELECT = "navigationMenu.linkSelect";
|
|
27700
|
-
var $322c88a641701f3b$export$6893bf21536567da = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27701
|
-
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
|
|
27702
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroupItem, {
|
|
27703
|
-
asChild: true
|
|
27704
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.a, _extends({
|
|
27705
|
-
"data-active": active ? "" : void 0,
|
|
27706
|
-
"aria-current": active ? "page" : void 0
|
|
27707
|
-
}, linkProps, {
|
|
27708
|
-
ref: forwardedRef,
|
|
27709
|
-
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event1) => {
|
|
27710
|
-
const target = event1.target;
|
|
27711
|
-
const linkSelectEvent = new CustomEvent($322c88a641701f3b$var$LINK_SELECT, {
|
|
27712
|
-
bubbles: true,
|
|
27713
|
-
cancelable: true
|
|
27714
|
-
});
|
|
27715
|
-
target.addEventListener(
|
|
27716
|
-
$322c88a641701f3b$var$LINK_SELECT,
|
|
27717
|
-
(event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
|
|
27718
|
-
{
|
|
27719
|
-
once: true
|
|
27720
|
-
}
|
|
27721
|
-
);
|
|
27722
|
-
$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, linkSelectEvent);
|
|
27723
|
-
if (!linkSelectEvent.defaultPrevented && !event1.metaKey) {
|
|
27724
|
-
const rootContentDismissEvent = new CustomEvent($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
|
|
27725
|
-
bubbles: true,
|
|
27726
|
-
cancelable: true
|
|
27727
|
-
});
|
|
27728
|
-
$8927f6f2acc4f386$export$6d1a0317bde7de7f(target, rootContentDismissEvent);
|
|
27729
|
-
}
|
|
27730
|
-
}, {
|
|
27731
|
-
checkForDefaultPrevented: false
|
|
27732
|
-
})
|
|
27733
|
-
})));
|
|
27734
|
-
});
|
|
27735
|
-
var $322c88a641701f3b$var$INDICATOR_NAME = "NavigationMenuIndicator";
|
|
27736
|
-
var $322c88a641701f3b$export$8ddb526647c0d8fb = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27737
|
-
const { forceMount, ...indicatorProps } = props;
|
|
27738
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, props.__scopeNavigationMenu);
|
|
27739
|
-
const isVisible = Boolean(context.value);
|
|
27740
|
-
return context.indicatorTrack ? /* @__PURE__ */ import_react_dom10.default.createPortal(/* @__PURE__ */ (0, import_react170.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27741
|
-
present: forceMount || isVisible
|
|
27742
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuIndicatorImpl, _extends({}, indicatorProps, {
|
|
27743
|
-
ref: forwardedRef
|
|
27744
|
-
}))), context.indicatorTrack) : null;
|
|
27745
|
-
});
|
|
27746
|
-
var $322c88a641701f3b$var$NavigationMenuIndicatorImpl = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27747
|
-
const { __scopeNavigationMenu, ...indicatorProps } = props;
|
|
27748
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, __scopeNavigationMenu);
|
|
27749
|
-
const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
|
|
27750
|
-
const [activeTrigger, setActiveTrigger] = (0, import_react170.useState)(null);
|
|
27751
|
-
const [position, setPosition] = (0, import_react170.useState)(null);
|
|
27752
|
-
const isHorizontal = context.orientation === "horizontal";
|
|
27753
|
-
const isVisible = Boolean(context.value);
|
|
27754
|
-
(0, import_react170.useEffect)(() => {
|
|
27755
|
-
var _items$find;
|
|
27756
|
-
const items = getItems();
|
|
27757
|
-
const triggerNode = (_items$find = items.find(
|
|
27758
|
-
(item) => item.value === context.value
|
|
27759
|
-
)) === null || _items$find === void 0 ? void 0 : _items$find.ref.current;
|
|
27760
|
-
if (triggerNode) setActiveTrigger(triggerNode);
|
|
27761
|
-
}, [
|
|
27762
|
-
getItems,
|
|
27763
|
-
context.value
|
|
27764
|
-
]);
|
|
27765
|
-
const handlePositionChange = () => {
|
|
27766
|
-
if (activeTrigger) setPosition({
|
|
27767
|
-
size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,
|
|
27768
|
-
offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop
|
|
27769
|
-
});
|
|
27770
|
-
};
|
|
27771
|
-
$322c88a641701f3b$var$useResizeObserver(activeTrigger, handlePositionChange);
|
|
27772
|
-
$322c88a641701f3b$var$useResizeObserver(context.indicatorTrack, handlePositionChange);
|
|
27773
|
-
return position ? /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
27774
|
-
"aria-hidden": true,
|
|
27775
|
-
"data-state": isVisible ? "visible" : "hidden",
|
|
27776
|
-
"data-orientation": context.orientation
|
|
27777
|
-
}, indicatorProps, {
|
|
27778
|
-
ref: forwardedRef,
|
|
27779
|
-
style: {
|
|
27780
|
-
position: "absolute",
|
|
27781
|
-
...isHorizontal ? {
|
|
27782
|
-
left: 0,
|
|
27783
|
-
width: position.size + "px",
|
|
27784
|
-
transform: `translateX(${position.offset}px)`
|
|
27785
|
-
} : {
|
|
27786
|
-
top: 0,
|
|
27787
|
-
height: position.size + "px",
|
|
27788
|
-
transform: `translateY(${position.offset}px)`
|
|
27789
|
-
},
|
|
27790
|
-
...indicatorProps.style
|
|
27791
|
-
}
|
|
27792
|
-
})) : null;
|
|
27793
|
-
});
|
|
27794
|
-
var $322c88a641701f3b$var$CONTENT_NAME = "NavigationMenuContent";
|
|
27795
|
-
var $322c88a641701f3b$export$38e00e996c2f93f7 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27796
|
-
const { forceMount, ...contentProps } = props;
|
|
27797
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27798
|
-
const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27799
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(itemContext.contentRef, forwardedRef);
|
|
27800
|
-
const open = itemContext.value === context.value;
|
|
27801
|
-
const commonProps = {
|
|
27802
|
-
value: itemContext.value,
|
|
27803
|
-
triggerRef: itemContext.triggerRef,
|
|
27804
|
-
focusProxyRef: itemContext.focusProxyRef,
|
|
27805
|
-
wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
|
|
27806
|
-
onContentFocusOutside: itemContext.onContentFocusOutside,
|
|
27807
|
-
onRootContentClose: itemContext.onRootContentClose,
|
|
27808
|
-
...contentProps
|
|
27809
|
-
};
|
|
27810
|
-
return !context.viewport ? /* @__PURE__ */ (0, import_react170.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27811
|
-
present: forceMount || open
|
|
27812
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({
|
|
27813
|
-
"data-state": $322c88a641701f3b$var$getOpenState(open)
|
|
27814
|
-
}, commonProps, {
|
|
27815
|
-
ref: composedRefs,
|
|
27816
|
-
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, context.onContentEnter),
|
|
27817
|
-
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave)),
|
|
27818
|
-
style: {
|
|
27819
|
-
// Prevent interaction when animating out
|
|
27820
|
-
pointerEvents: !open && context.isRootMenu ? "none" : void 0,
|
|
27821
|
-
...commonProps.style
|
|
27822
|
-
}
|
|
27823
|
-
}))) : /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$ViewportContentMounter, _extends({
|
|
27824
|
-
forceMount
|
|
27825
|
-
}, commonProps, {
|
|
27826
|
-
ref: composedRefs
|
|
27827
|
-
}));
|
|
27828
|
-
});
|
|
27829
|
-
var $322c88a641701f3b$var$ViewportContentMounter = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27830
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
|
|
27831
|
-
const { onViewportContentChange, onViewportContentRemove } = context;
|
|
27832
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
27833
|
-
onViewportContentChange(props.value, {
|
|
27834
|
-
ref: forwardedRef,
|
|
27835
|
-
...props
|
|
27836
|
-
});
|
|
27837
|
-
}, [
|
|
27838
|
-
props,
|
|
27839
|
-
forwardedRef,
|
|
27840
|
-
onViewportContentChange
|
|
27841
|
-
]);
|
|
27842
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
27843
|
-
return () => onViewportContentRemove(props.value);
|
|
27844
|
-
}, [
|
|
27845
|
-
props.value,
|
|
27846
|
-
onViewportContentRemove
|
|
27847
|
-
]);
|
|
27848
|
-
return null;
|
|
27849
|
-
});
|
|
27850
|
-
var $322c88a641701f3b$var$ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
|
|
27851
|
-
var $322c88a641701f3b$var$NavigationMenuContentImpl = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27852
|
-
const { __scopeNavigationMenu, value, triggerRef, focusProxyRef, wasEscapeCloseRef, onRootContentClose, onContentFocusOutside, ...contentProps } = props;
|
|
27853
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, __scopeNavigationMenu);
|
|
27854
|
-
const ref = (0, import_react170.useRef)(null);
|
|
27855
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, forwardedRef);
|
|
27856
|
-
const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, value);
|
|
27857
|
-
const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, value);
|
|
27858
|
-
const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
|
|
27859
|
-
const prevMotionAttributeRef = (0, import_react170.useRef)(null);
|
|
27860
|
-
const { onItemDismiss } = context;
|
|
27861
|
-
(0, import_react170.useEffect)(() => {
|
|
27862
|
-
const content = ref.current;
|
|
27863
|
-
if (context.isRootMenu && content) {
|
|
27864
|
-
const handleClose = () => {
|
|
27865
|
-
var _triggerRef$current;
|
|
27866
|
-
onItemDismiss();
|
|
27867
|
-
onRootContentClose();
|
|
27868
|
-
if (content.contains(document.activeElement)) (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
27869
|
-
};
|
|
27870
|
-
content.addEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
|
|
27871
|
-
return () => content.removeEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
|
|
27872
|
-
}
|
|
27873
|
-
}, [
|
|
27874
|
-
context.isRootMenu,
|
|
27875
|
-
props.value,
|
|
27876
|
-
triggerRef,
|
|
27877
|
-
onItemDismiss,
|
|
27878
|
-
onRootContentClose
|
|
27879
|
-
]);
|
|
27880
|
-
const motionAttribute = (0, import_react170.useMemo)(() => {
|
|
27881
|
-
const items = getItems();
|
|
27882
|
-
const values = items.map(
|
|
27883
|
-
(item) => item.value
|
|
27884
|
-
);
|
|
27885
|
-
if (context.dir === "rtl") values.reverse();
|
|
27886
|
-
const index = values.indexOf(context.value);
|
|
27887
|
-
const prevIndex = values.indexOf(context.previousValue);
|
|
27888
|
-
const isSelected = value === context.value;
|
|
27889
|
-
const wasSelected = prevIndex === values.indexOf(value);
|
|
27890
|
-
if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;
|
|
27891
|
-
const attribute = (() => {
|
|
27892
|
-
if (index !== prevIndex) {
|
|
27893
|
-
if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start";
|
|
27894
|
-
if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end";
|
|
27895
|
-
}
|
|
27896
|
-
return null;
|
|
27897
|
-
})();
|
|
27898
|
-
prevMotionAttributeRef.current = attribute;
|
|
27899
|
-
return attribute;
|
|
27900
|
-
}, [
|
|
27901
|
-
context.previousValue,
|
|
27902
|
-
context.value,
|
|
27903
|
-
context.dir,
|
|
27904
|
-
getItems,
|
|
27905
|
-
value
|
|
27906
|
-
]);
|
|
27907
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroup, {
|
|
27908
|
-
asChild: true
|
|
27909
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
|
|
27910
|
-
id: contentId,
|
|
27911
|
-
"aria-labelledby": triggerId,
|
|
27912
|
-
"data-motion": motionAttribute,
|
|
27913
|
-
"data-orientation": context.orientation
|
|
27914
|
-
}, contentProps, {
|
|
27915
|
-
ref: composedRefs,
|
|
27916
|
-
onDismiss: () => {
|
|
27917
|
-
var _ref$current;
|
|
27918
|
-
const rootContentDismissEvent = new Event($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
|
|
27919
|
-
bubbles: true,
|
|
27920
|
-
cancelable: true
|
|
27921
|
-
});
|
|
27922
|
-
(_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.dispatchEvent(rootContentDismissEvent);
|
|
27923
|
-
},
|
|
27924
|
-
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event) => {
|
|
27925
|
-
var _context$rootNavigati;
|
|
27926
|
-
onContentFocusOutside();
|
|
27927
|
-
const target = event.target;
|
|
27928
|
-
if ((_context$rootNavigati = context.rootNavigationMenu) !== null && _context$rootNavigati !== void 0 && _context$rootNavigati.contains(target)) event.preventDefault();
|
|
27929
|
-
}),
|
|
27930
|
-
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event) => {
|
|
27931
|
-
var _context$viewport;
|
|
27932
|
-
const target = event.target;
|
|
27933
|
-
const isTrigger = getItems().some((item) => {
|
|
27934
|
-
var _item$ref$current;
|
|
27935
|
-
return (_item$ref$current = item.ref.current) === null || _item$ref$current === void 0 ? void 0 : _item$ref$current.contains(target);
|
|
27936
|
-
});
|
|
27937
|
-
const isRootViewport = context.isRootMenu && ((_context$viewport = context.viewport) === null || _context$viewport === void 0 ? void 0 : _context$viewport.contains(target));
|
|
27938
|
-
if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();
|
|
27939
|
-
}),
|
|
27940
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
27941
|
-
const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
|
|
27942
|
-
const isTabKey = event.key === "Tab" && !isMetaKey;
|
|
27943
|
-
if (isTabKey) {
|
|
27944
|
-
const candidates = $322c88a641701f3b$var$getTabbableCandidates(event.currentTarget);
|
|
27945
|
-
const focusedElement = document.activeElement;
|
|
27946
|
-
const index = candidates.findIndex(
|
|
27947
|
-
(candidate) => candidate === focusedElement
|
|
27948
|
-
);
|
|
27949
|
-
const isMovingBackwards = event.shiftKey;
|
|
27950
|
-
const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);
|
|
27951
|
-
if ($322c88a641701f3b$var$focusFirst(nextCandidates))
|
|
27952
|
-
event.preventDefault();
|
|
27953
|
-
else {
|
|
27954
|
-
var _focusProxyRef$curren;
|
|
27955
|
-
(_focusProxyRef$curren = focusProxyRef.current) === null || _focusProxyRef$curren === void 0 || _focusProxyRef$curren.focus();
|
|
27956
|
-
}
|
|
27957
|
-
}
|
|
27958
|
-
}),
|
|
27959
|
-
onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onEscapeKeyDown, (event) => {
|
|
27960
|
-
wasEscapeCloseRef.current = true;
|
|
27961
|
-
})
|
|
27962
|
-
})));
|
|
27963
|
-
});
|
|
27964
|
-
var $322c88a641701f3b$var$VIEWPORT_NAME = "NavigationMenuViewport";
|
|
27965
|
-
var $322c88a641701f3b$export$ee880b97cc6d44a5 = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
27966
|
-
const { forceMount, ...viewportProps } = props;
|
|
27967
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, props.__scopeNavigationMenu);
|
|
27968
|
-
const open = Boolean(context.value);
|
|
27969
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
27970
|
-
present: forceMount || open
|
|
27971
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuViewportImpl, _extends({}, viewportProps, {
|
|
27972
|
-
ref: forwardedRef
|
|
27973
|
-
})));
|
|
27974
|
-
});
|
|
27975
|
-
var $322c88a641701f3b$var$NavigationMenuViewportImpl = /* @__PURE__ */ (0, import_react170.forwardRef)((props1, forwardedRef) => {
|
|
27976
|
-
const { __scopeNavigationMenu, children, ...viewportImplProps } = props1;
|
|
27977
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, __scopeNavigationMenu);
|
|
27978
|
-
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onViewportChange);
|
|
27979
|
-
const viewportContentContext = $322c88a641701f3b$var$useViewportContentContext($322c88a641701f3b$var$CONTENT_NAME, props1.__scopeNavigationMenu);
|
|
27980
|
-
const [size, setSize] = (0, import_react170.useState)(null);
|
|
27981
|
-
const [content, setContent] = (0, import_react170.useState)(null);
|
|
27982
|
-
const viewportWidth = size ? (size === null || size === void 0 ? void 0 : size.width) + "px" : void 0;
|
|
27983
|
-
const viewportHeight = size ? (size === null || size === void 0 ? void 0 : size.height) + "px" : void 0;
|
|
27984
|
-
const open = Boolean(context.value);
|
|
27985
|
-
const activeContentValue = open ? context.value : context.previousValue;
|
|
27986
|
-
const handleSizeChange = () => {
|
|
27987
|
-
if (content) setSize({
|
|
27988
|
-
width: content.offsetWidth,
|
|
27989
|
-
height: content.offsetHeight
|
|
27990
|
-
});
|
|
27991
|
-
};
|
|
27992
|
-
$322c88a641701f3b$var$useResizeObserver(content, handleSizeChange);
|
|
27993
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
27994
|
-
"data-state": $322c88a641701f3b$var$getOpenState(open),
|
|
27995
|
-
"data-orientation": context.orientation
|
|
27996
|
-
}, viewportImplProps, {
|
|
27997
|
-
ref: composedRefs,
|
|
27998
|
-
style: {
|
|
27999
|
-
// Prevent interaction when animating out
|
|
28000
|
-
pointerEvents: !open && context.isRootMenu ? "none" : void 0,
|
|
28001
|
-
["--radix-navigation-menu-viewport-width"]: viewportWidth,
|
|
28002
|
-
["--radix-navigation-menu-viewport-height"]: viewportHeight,
|
|
28003
|
-
...viewportImplProps.style
|
|
28004
|
-
},
|
|
28005
|
-
onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerEnter, context.onContentEnter),
|
|
28006
|
-
onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave))
|
|
28007
|
-
}), Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {
|
|
28008
|
-
const isActive = activeContentValue === value;
|
|
28009
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
28010
|
-
key: value,
|
|
28011
|
-
present: forceMount || isActive
|
|
28012
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({}, props, {
|
|
28013
|
-
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(ref, (node) => {
|
|
28014
|
-
if (isActive && node) setContent(node);
|
|
28015
|
-
})
|
|
28016
|
-
})));
|
|
28017
|
-
}));
|
|
28018
|
-
});
|
|
28019
|
-
var $322c88a641701f3b$var$FOCUS_GROUP_NAME = "FocusGroup";
|
|
28020
|
-
var $322c88a641701f3b$var$FocusGroup = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
28021
|
-
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
28022
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
28023
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroupCollection.Provider, {
|
|
28024
|
-
scope: __scopeNavigationMenu
|
|
28025
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroupCollection.Slot, {
|
|
28026
|
-
scope: __scopeNavigationMenu
|
|
28027
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
28028
|
-
dir: context.dir
|
|
28029
|
-
}, groupProps, {
|
|
28030
|
-
ref: forwardedRef
|
|
28031
|
-
}))));
|
|
28032
|
-
});
|
|
28033
|
-
var $322c88a641701f3b$var$ARROW_KEYS = [
|
|
28034
|
-
"ArrowRight",
|
|
28035
|
-
"ArrowLeft",
|
|
28036
|
-
"ArrowUp",
|
|
28037
|
-
"ArrowDown"
|
|
28038
|
-
];
|
|
28039
|
-
var $322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
|
|
28040
|
-
var $322c88a641701f3b$var$FocusGroupItem = /* @__PURE__ */ (0, import_react170.forwardRef)((props, forwardedRef) => {
|
|
28041
|
-
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
28042
|
-
const getItems = $322c88a641701f3b$var$useFocusGroupCollection(__scopeNavigationMenu);
|
|
28043
|
-
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
|
|
28044
|
-
return /* @__PURE__ */ (0, import_react170.createElement)($322c88a641701f3b$var$FocusGroupCollection.ItemSlot, {
|
|
28045
|
-
scope: __scopeNavigationMenu
|
|
28046
|
-
}, /* @__PURE__ */ (0, import_react170.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({}, groupProps, {
|
|
28047
|
-
ref: forwardedRef,
|
|
28048
|
-
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
|
|
28049
|
-
const isFocusNavigationKey = [
|
|
28050
|
-
"Home",
|
|
28051
|
-
"End",
|
|
28052
|
-
...$322c88a641701f3b$var$ARROW_KEYS
|
|
28053
|
-
].includes(event.key);
|
|
28054
|
-
if (isFocusNavigationKey) {
|
|
28055
|
-
let candidateNodes = getItems().map(
|
|
28056
|
-
(item) => item.ref.current
|
|
28057
|
-
);
|
|
28058
|
-
const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
|
|
28059
|
-
const prevKeys = [
|
|
28060
|
-
prevItemKey,
|
|
28061
|
-
"ArrowUp",
|
|
28062
|
-
"End"
|
|
28063
|
-
];
|
|
28064
|
-
if (prevKeys.includes(event.key)) candidateNodes.reverse();
|
|
28065
|
-
if ($322c88a641701f3b$var$ARROW_KEYS.includes(event.key)) {
|
|
28066
|
-
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
28067
|
-
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
28068
|
-
}
|
|
28069
|
-
setTimeout(
|
|
28070
|
-
() => $322c88a641701f3b$var$focusFirst(candidateNodes)
|
|
28071
|
-
);
|
|
28072
|
-
event.preventDefault();
|
|
28073
|
-
}
|
|
28074
|
-
})
|
|
28075
|
-
})));
|
|
28076
|
-
});
|
|
28077
|
-
function $322c88a641701f3b$var$getTabbableCandidates(container) {
|
|
28078
|
-
const nodes = [];
|
|
28079
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
28080
|
-
acceptNode: (node) => {
|
|
28081
|
-
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
28082
|
-
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
28083
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
28084
|
-
}
|
|
28085
|
-
});
|
|
28086
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
28087
|
-
return nodes;
|
|
28088
|
-
}
|
|
28089
|
-
function $322c88a641701f3b$var$focusFirst(candidates) {
|
|
28090
|
-
const previouslyFocusedElement = document.activeElement;
|
|
28091
|
-
return candidates.some((candidate) => {
|
|
28092
|
-
if (candidate === previouslyFocusedElement) return true;
|
|
28093
|
-
candidate.focus();
|
|
28094
|
-
return document.activeElement !== previouslyFocusedElement;
|
|
28095
|
-
});
|
|
28096
|
-
}
|
|
28097
|
-
function $322c88a641701f3b$var$removeFromTabOrder(candidates) {
|
|
28098
|
-
candidates.forEach((candidate) => {
|
|
28099
|
-
candidate.dataset.tabindex = candidate.getAttribute("tabindex") || "";
|
|
28100
|
-
candidate.setAttribute("tabindex", "-1");
|
|
28101
|
-
});
|
|
28102
|
-
return () => {
|
|
28103
|
-
candidates.forEach((candidate) => {
|
|
28104
|
-
const prevTabIndex = candidate.dataset.tabindex;
|
|
28105
|
-
candidate.setAttribute("tabindex", prevTabIndex);
|
|
28106
|
-
});
|
|
28107
|
-
};
|
|
28108
|
-
}
|
|
28109
|
-
function $322c88a641701f3b$var$useResizeObserver(element, onResize) {
|
|
28110
|
-
const handleResize = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onResize);
|
|
28111
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
28112
|
-
let rAF = 0;
|
|
28113
|
-
if (element) {
|
|
28114
|
-
const resizeObserver = new ResizeObserver(() => {
|
|
28115
|
-
cancelAnimationFrame(rAF);
|
|
28116
|
-
rAF = window.requestAnimationFrame(handleResize);
|
|
28117
|
-
});
|
|
28118
|
-
resizeObserver.observe(element);
|
|
28119
|
-
return () => {
|
|
28120
|
-
window.cancelAnimationFrame(rAF);
|
|
28121
|
-
resizeObserver.unobserve(element);
|
|
28122
|
-
};
|
|
28123
|
-
}
|
|
28124
|
-
}, [
|
|
28125
|
-
element,
|
|
28126
|
-
handleResize
|
|
28127
|
-
]);
|
|
28128
|
-
}
|
|
28129
|
-
function $322c88a641701f3b$var$getOpenState(open) {
|
|
28130
|
-
return open ? "open" : "closed";
|
|
28131
|
-
}
|
|
28132
|
-
function $322c88a641701f3b$var$makeTriggerId(baseId, value) {
|
|
28133
|
-
return `${baseId}-trigger-${value}`;
|
|
28134
|
-
}
|
|
28135
|
-
function $322c88a641701f3b$var$makeContentId(baseId, value) {
|
|
28136
|
-
return `${baseId}-content-${value}`;
|
|
28137
|
-
}
|
|
28138
|
-
function $322c88a641701f3b$var$whenMouse(handler) {
|
|
28139
|
-
return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
|
|
28140
|
-
}
|
|
28141
|
-
var $322c88a641701f3b$export$be92b6f5f03c0fe9 = $322c88a641701f3b$export$5b2278cf1e8bcae2;
|
|
28142
|
-
var $322c88a641701f3b$export$54c2e3dc7acea9f5 = $322c88a641701f3b$export$c361068a95fd2286;
|
|
28143
|
-
var $322c88a641701f3b$export$6d08773d2e66f8f2 = $322c88a641701f3b$export$ffdbb83a2de845c2;
|
|
28144
|
-
var $322c88a641701f3b$export$41fb9f06171c75f4 = $322c88a641701f3b$export$37fe8002734d8f2;
|
|
28145
|
-
var $322c88a641701f3b$export$a6c7ac8248d6e38a = $322c88a641701f3b$export$6893bf21536567da;
|
|
28146
|
-
var $322c88a641701f3b$export$adb584737d712b70 = $322c88a641701f3b$export$8ddb526647c0d8fb;
|
|
28147
|
-
var $322c88a641701f3b$export$7c6e2c02157bb7d2 = $322c88a641701f3b$export$38e00e996c2f93f7;
|
|
28148
|
-
var $322c88a641701f3b$export$d5c6c08dc2d3ca7 = $322c88a641701f3b$export$ee880b97cc6d44a5;
|
|
28149
|
-
|
|
28150
27191
|
// src/components/NavigationMenu.tsx
|
|
28151
27192
|
var import_classnames33 = __toESM(require_classnames());
|
|
28152
27193
|
|
|
27194
|
+
// src/components/hooks/useNavigationMenu.ts
|
|
27195
|
+
var initialState3 = { activeMenu: null };
|
|
27196
|
+
var store3 = create(() => ({ ...initialState3 }));
|
|
27197
|
+
function setActiveMenu(activeMenu) {
|
|
27198
|
+
store3.setState({ activeMenu });
|
|
27199
|
+
}
|
|
27200
|
+
var useNavigationMenu = store3;
|
|
27201
|
+
|
|
28153
27202
|
// src/components/NavigationMenu.module.css
|
|
28154
27203
|
var NavigationMenu_default = {
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
link: "NavigationMenu_link",
|
|
28159
|
-
content: "NavigationMenu_content",
|
|
28160
|
-
enterFromLeft: "NavigationMenu_enterFromLeft",
|
|
28161
|
-
enterFromRight: "NavigationMenu_enterFromRight",
|
|
28162
|
-
exitToLeft: "NavigationMenu_exitToLeft",
|
|
28163
|
-
exitToRight: "NavigationMenu_exitToRight",
|
|
28164
|
-
indicator: "NavigationMenu_indicator",
|
|
28165
|
-
fadeIn: "NavigationMenu_fadeIn",
|
|
28166
|
-
fadeOut: "NavigationMenu_fadeOut",
|
|
28167
|
-
viewport: "NavigationMenu_viewport",
|
|
28168
|
-
scaleIn: "NavigationMenu_scaleIn",
|
|
28169
|
-
scaleOut: "NavigationMenu_scaleOut",
|
|
28170
|
-
wrapper: "NavigationMenu_wrapper",
|
|
28171
|
-
arrow: "NavigationMenu_arrow"
|
|
27204
|
+
nav: "NavigationMenu_nav",
|
|
27205
|
+
item: "NavigationMenu_item",
|
|
27206
|
+
icon: "NavigationMenu_icon"
|
|
28172
27207
|
};
|
|
28173
27208
|
|
|
28174
27209
|
// src/components/NavigationMenu.tsx
|
|
28175
27210
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
28176
|
-
function NavigationMenu({
|
|
28177
|
-
|
|
28178
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)($322c88a641701f3b$export$54c2e3dc7acea9f5, { className: NavigationMenu_default.list, children: [
|
|
28179
|
-
children,
|
|
28180
|
-
showArrow && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)($322c88a641701f3b$export$adb584737d712b70, { className: NavigationMenu_default.indicator, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: NavigationMenu_default.arrow }) })
|
|
28181
|
-
] }),
|
|
28182
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: NavigationMenu_default.wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)($322c88a641701f3b$export$d5c6c08dc2d3ca7, { className: NavigationMenu_default.viewport }) })
|
|
28183
|
-
] });
|
|
28184
|
-
}
|
|
28185
|
-
function NavigationMenuItem({ children, className, ...props }) {
|
|
28186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)($322c88a641701f3b$export$6d08773d2e66f8f2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
|
|
28187
|
-
}
|
|
28188
|
-
function NavigationMenuTrigger({
|
|
28189
|
-
children,
|
|
27211
|
+
function NavigationMenu({
|
|
27212
|
+
showArrow = true,
|
|
28190
27213
|
className,
|
|
27214
|
+
children,
|
|
28191
27215
|
...props
|
|
28192
27216
|
}) {
|
|
28193
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.
|
|
28194
|
-
children,
|
|
28195
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icons.Chevron, {}) })
|
|
28196
|
-
] });
|
|
27217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.nav, className), children });
|
|
28197
27218
|
}
|
|
28198
|
-
function
|
|
27219
|
+
function NavigationMenuItem({
|
|
27220
|
+
label,
|
|
28199
27221
|
children,
|
|
28200
27222
|
className,
|
|
28201
27223
|
...props
|
|
28202
27224
|
}) {
|
|
28203
|
-
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
27225
|
+
const { activeMenu } = useNavigationMenu();
|
|
27226
|
+
if (label) {
|
|
27227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
|
|
27228
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children: [
|
|
27229
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Text, { children: label }),
|
|
27230
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { rotate: 90, size: "xs", className: NavigationMenu_default.icon, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icons.Chevron, {}) })
|
|
27231
|
+
] }),
|
|
27232
|
+
children
|
|
27233
|
+
] });
|
|
27234
|
+
}
|
|
27235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
|
|
28207
27236
|
}
|
|
28208
27237
|
|
|
28209
27238
|
// src/components/PasswordField.tsx
|
|
28210
|
-
var
|
|
27239
|
+
var import_react167 = require("react");
|
|
28211
27240
|
var import_classnames34 = __toESM(require_classnames());
|
|
28212
27241
|
|
|
28213
27242
|
// src/components/PasswordField.module.css
|
|
@@ -28217,9 +27246,9 @@ var PasswordField_default = {
|
|
|
28217
27246
|
|
|
28218
27247
|
// src/components/PasswordField.tsx
|
|
28219
27248
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
28220
|
-
var PasswordField = (0,
|
|
27249
|
+
var PasswordField = (0, import_react167.forwardRef)(
|
|
28221
27250
|
({ label, className, ...props }, ref) => {
|
|
28222
|
-
const [show, setShow] = (0,
|
|
27251
|
+
const [show, setShow] = (0, import_react167.useState)(false);
|
|
28223
27252
|
const type = show ? "text" : "password";
|
|
28224
27253
|
const handleShowPassword = () => setShow((state) => !state);
|
|
28225
27254
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)($bcdf0525bf22703d$export$2c73285ae9390cec, { ...props, ref, className: (0, import_classnames34.default)(Input_default.field, className), children: [
|
|
@@ -28307,7 +27336,7 @@ function ProgressCircle({ className, showValue, ...props }) {
|
|
|
28307
27336
|
}
|
|
28308
27337
|
|
|
28309
27338
|
// src/components/RadioGroup.tsx
|
|
28310
|
-
var
|
|
27339
|
+
var import_react168 = require("react");
|
|
28311
27340
|
var import_classnames38 = __toESM(require_classnames());
|
|
28312
27341
|
|
|
28313
27342
|
// src/components/RadioGroup.module.css
|
|
@@ -28318,7 +27347,7 @@ var RadioGroup_default = {
|
|
|
28318
27347
|
|
|
28319
27348
|
// src/components/RadioGroup.tsx
|
|
28320
27349
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
28321
|
-
var RadioGroup = (0,
|
|
27350
|
+
var RadioGroup = (0, import_react168.forwardRef)(
|
|
28322
27351
|
({ label, children, className, ...props }, ref) => {
|
|
28323
27352
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames38.default)(RadioGroup_default.radiogroup, className), children: [
|
|
28324
27353
|
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Label, { children: label }),
|
|
@@ -28331,7 +27360,7 @@ function Radio({ children, className, ...props }) {
|
|
|
28331
27360
|
}
|
|
28332
27361
|
|
|
28333
27362
|
// src/components/SearchField.tsx
|
|
28334
|
-
var
|
|
27363
|
+
var import_react169 = require("react");
|
|
28335
27364
|
var import_classnames39 = __toESM(require_classnames());
|
|
28336
27365
|
|
|
28337
27366
|
// src/components/SearchField.module.css
|
|
@@ -28343,9 +27372,9 @@ var SearchField_default = {
|
|
|
28343
27372
|
|
|
28344
27373
|
// src/components/SearchField.tsx
|
|
28345
27374
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
28346
|
-
var SearchField = (0,
|
|
27375
|
+
var SearchField = (0, import_react169.forwardRef)(
|
|
28347
27376
|
({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
|
|
28348
|
-
const [search, setSearch] = (0,
|
|
27377
|
+
const [search, setSearch] = (0, import_react169.useState)(value ?? "");
|
|
28349
27378
|
const searchValue = useDebounce(search, delay);
|
|
28350
27379
|
const handleChange = (e) => {
|
|
28351
27380
|
const { value: value2 } = e.target;
|
|
@@ -28358,7 +27387,7 @@ var SearchField = (0, import_react173.forwardRef)(
|
|
|
28358
27387
|
setSearch("");
|
|
28359
27388
|
onSearch?.("");
|
|
28360
27389
|
};
|
|
28361
|
-
(0,
|
|
27390
|
+
(0, import_react169.useEffect)(() => {
|
|
28362
27391
|
if (delay > 0) {
|
|
28363
27392
|
onSearch?.(searchValue);
|
|
28364
27393
|
}
|
|
@@ -28390,7 +27419,7 @@ var SearchField = (0, import_react173.forwardRef)(
|
|
|
28390
27419
|
);
|
|
28391
27420
|
|
|
28392
27421
|
// src/components/Select.tsx
|
|
28393
|
-
var
|
|
27422
|
+
var import_react170 = require("react");
|
|
28394
27423
|
var import_classnames40 = __toESM(require_classnames());
|
|
28395
27424
|
|
|
28396
27425
|
// src/components/Select.module.css
|
|
@@ -28403,7 +27432,7 @@ var Select_default = {
|
|
|
28403
27432
|
|
|
28404
27433
|
// src/components/Select.tsx
|
|
28405
27434
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
28406
|
-
var Select = (0,
|
|
27435
|
+
var Select = (0, import_react170.forwardRef)(
|
|
28407
27436
|
({
|
|
28408
27437
|
children,
|
|
28409
27438
|
items = [],
|
|
@@ -28439,7 +27468,7 @@ var Select = (0, import_react174.forwardRef)(
|
|
|
28439
27468
|
);
|
|
28440
27469
|
|
|
28441
27470
|
// src/components/Slider.tsx
|
|
28442
|
-
var
|
|
27471
|
+
var import_react171 = require("react");
|
|
28443
27472
|
var import_classnames41 = __toESM(require_classnames());
|
|
28444
27473
|
|
|
28445
27474
|
// src/components/Slider.module.css
|
|
@@ -28453,7 +27482,7 @@ var Slider_default = {
|
|
|
28453
27482
|
|
|
28454
27483
|
// src/components/Slider.tsx
|
|
28455
27484
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
28456
|
-
var Slider = (0,
|
|
27485
|
+
var Slider = (0, import_react171.forwardRef)(
|
|
28457
27486
|
({ className, showValue = true, label, ...props }, ref) => {
|
|
28458
27487
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames41.default)(Slider_default.slider, className), children: [
|
|
28459
27488
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: Slider_default.header, children: [
|
|
@@ -28511,7 +27540,7 @@ function StatusLight(props) {
|
|
|
28511
27540
|
}
|
|
28512
27541
|
|
|
28513
27542
|
// src/components/Switch.tsx
|
|
28514
|
-
var
|
|
27543
|
+
var import_react172 = require("react");
|
|
28515
27544
|
var import_classnames43 = __toESM(require_classnames());
|
|
28516
27545
|
|
|
28517
27546
|
// src/components/Switch.module.css
|
|
@@ -28523,7 +27552,7 @@ var Switch_default = {
|
|
|
28523
27552
|
|
|
28524
27553
|
// src/components/Switch.tsx
|
|
28525
27554
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
28526
|
-
var Switch = (0,
|
|
27555
|
+
var Switch = (0, import_react172.forwardRef)(
|
|
28527
27556
|
({ label, children, className, ...props }, ref) => {
|
|
28528
27557
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
28529
27558
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
@@ -28585,7 +27614,7 @@ function TextOverflow({ asChild, children, className, ...props }) {
|
|
|
28585
27614
|
}
|
|
28586
27615
|
|
|
28587
27616
|
// src/components/TextArea.tsx
|
|
28588
|
-
var
|
|
27617
|
+
var import_react173 = require("react");
|
|
28589
27618
|
var import_classnames45 = __toESM(require_classnames());
|
|
28590
27619
|
|
|
28591
27620
|
// src/components/TextArea.module.css
|
|
@@ -28598,7 +27627,7 @@ var TextArea_default = {
|
|
|
28598
27627
|
|
|
28599
27628
|
// src/components/TextArea.tsx
|
|
28600
27629
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
28601
|
-
var TextArea = (0,
|
|
27630
|
+
var TextArea = (0, import_react173.forwardRef)(({ resize, className, ...props }, ref) => {
|
|
28602
27631
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
28603
27632
|
TextField,
|
|
28604
27633
|
{
|
|
@@ -28612,7 +27641,7 @@ var TextArea = (0, import_react177.forwardRef)(({ resize, className, ...props },
|
|
|
28612
27641
|
|
|
28613
27642
|
// src/components/Toast.tsx
|
|
28614
27643
|
var import_classnames46 = __toESM(require_classnames());
|
|
28615
|
-
var
|
|
27644
|
+
var import_react175 = require("react");
|
|
28616
27645
|
|
|
28617
27646
|
// node_modules/@radix-ui/react-toast/dist/index.mjs
|
|
28618
27647
|
var React18 = __toESM(require("react"), 1);
|
|
@@ -28645,7 +27674,7 @@ function useComposedRefs(...refs) {
|
|
|
28645
27674
|
}
|
|
28646
27675
|
|
|
28647
27676
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
28648
|
-
var
|
|
27677
|
+
var import_react174 = __toESM(require("react"), 1);
|
|
28649
27678
|
|
|
28650
27679
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
28651
27680
|
var React6 = __toESM(require("react"), 1);
|
|
@@ -28797,13 +27826,13 @@ function createCollection(name) {
|
|
|
28797
27826
|
);
|
|
28798
27827
|
const CollectionProvider = (props) => {
|
|
28799
27828
|
const { scope, children } = props;
|
|
28800
|
-
const ref =
|
|
28801
|
-
const itemMap =
|
|
27829
|
+
const ref = import_react174.default.useRef(null);
|
|
27830
|
+
const itemMap = import_react174.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
28802
27831
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
28803
27832
|
};
|
|
28804
27833
|
CollectionProvider.displayName = PROVIDER_NAME2;
|
|
28805
27834
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
28806
|
-
const CollectionSlot =
|
|
27835
|
+
const CollectionSlot = import_react174.default.forwardRef(
|
|
28807
27836
|
(props, forwardedRef) => {
|
|
28808
27837
|
const { scope, children } = props;
|
|
28809
27838
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
@@ -28814,13 +27843,13 @@ function createCollection(name) {
|
|
|
28814
27843
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
28815
27844
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
28816
27845
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
28817
|
-
const CollectionItemSlot =
|
|
27846
|
+
const CollectionItemSlot = import_react174.default.forwardRef(
|
|
28818
27847
|
(props, forwardedRef) => {
|
|
28819
27848
|
const { scope, children, ...itemData } = props;
|
|
28820
|
-
const ref =
|
|
27849
|
+
const ref = import_react174.default.useRef(null);
|
|
28821
27850
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
28822
27851
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
28823
|
-
|
|
27852
|
+
import_react174.default.useEffect(() => {
|
|
28824
27853
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
28825
27854
|
return () => void context.itemMap.delete(ref);
|
|
28826
27855
|
});
|
|
@@ -28830,7 +27859,7 @@ function createCollection(name) {
|
|
|
28830
27859
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
28831
27860
|
function useCollection2(scope) {
|
|
28832
27861
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
28833
|
-
const getItems =
|
|
27862
|
+
const getItems = import_react174.default.useCallback(() => {
|
|
28834
27863
|
const collectionNode = context.collectionRef.current;
|
|
28835
27864
|
if (!collectionNode) return [];
|
|
28836
27865
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -29124,7 +28153,7 @@ var Branch = DismissableLayerBranch;
|
|
|
29124
28153
|
|
|
29125
28154
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
29126
28155
|
var React14 = __toESM(require("react"), 1);
|
|
29127
|
-
var
|
|
28156
|
+
var import_react_dom10 = __toESM(require("react-dom"), 1);
|
|
29128
28157
|
|
|
29129
28158
|
// node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
29130
28159
|
var React13 = __toESM(require("react"), 1);
|
|
@@ -29139,7 +28168,7 @@ var Portal = React14.forwardRef((props, forwardedRef) => {
|
|
|
29139
28168
|
const [mounted, setMounted] = React14.useState(false);
|
|
29140
28169
|
useLayoutEffect2(() => setMounted(true), []);
|
|
29141
28170
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
29142
|
-
return container ?
|
|
28171
|
+
return container ? import_react_dom10.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
29143
28172
|
});
|
|
29144
28173
|
Portal.displayName = PORTAL_NAME;
|
|
29145
28174
|
|
|
@@ -29147,11 +28176,11 @@ Portal.displayName = PORTAL_NAME;
|
|
|
29147
28176
|
var React22 = __toESM(require("react"), 1);
|
|
29148
28177
|
var ReactDOM3 = __toESM(require("react-dom"), 1);
|
|
29149
28178
|
var React15 = __toESM(require("react"), 1);
|
|
29150
|
-
function useStateMachine(
|
|
28179
|
+
function useStateMachine(initialState4, machine) {
|
|
29151
28180
|
return React15.useReducer((state, event) => {
|
|
29152
28181
|
const nextState = machine[state][event];
|
|
29153
28182
|
return nextState ?? state;
|
|
29154
|
-
},
|
|
28183
|
+
}, initialState4);
|
|
29155
28184
|
}
|
|
29156
28185
|
var Presence = (props) => {
|
|
29157
28186
|
const { present, children } = props;
|
|
@@ -29167,8 +28196,8 @@ function usePresence(present) {
|
|
|
29167
28196
|
const stylesRef = React22.useRef({});
|
|
29168
28197
|
const prevPresentRef = React22.useRef(present);
|
|
29169
28198
|
const prevAnimationNameRef = React22.useRef("none");
|
|
29170
|
-
const
|
|
29171
|
-
const [state, send] = useStateMachine(
|
|
28199
|
+
const initialState4 = present ? "mounted" : "unmounted";
|
|
28200
|
+
const [state, send] = useStateMachine(initialState4, {
|
|
29172
28201
|
mounted: {
|
|
29173
28202
|
UNMOUNT: "unmounted",
|
|
29174
28203
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -29961,7 +28990,7 @@ var Toast_default = {
|
|
|
29961
28990
|
|
|
29962
28991
|
// src/components/Toast.tsx
|
|
29963
28992
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
29964
|
-
var
|
|
28993
|
+
var import_react176 = require("react");
|
|
29965
28994
|
var icons = {
|
|
29966
28995
|
info: Icons.Info,
|
|
29967
28996
|
error: Icons.Alert
|
|
@@ -29977,7 +29006,7 @@ function Toast2({
|
|
|
29977
29006
|
...props
|
|
29978
29007
|
}) {
|
|
29979
29008
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Root2, { ...props, className: (0, import_classnames46.default)(Toast_default.toast, className, variant && Toast_default[variant]), children: [
|
|
29980
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { className: Toast_default.icon, size: "md", children: variant && (0,
|
|
29009
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { className: Toast_default.icon, size: "md", children: variant && (0, import_react175.createElement)(icons[variant]) }),
|
|
29981
29010
|
title && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ToastTitle, { className: Toast_default.title, children: title }),
|
|
29982
29011
|
description && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ToastDescription, { className: Toast_default.description, children: description }),
|
|
29983
29012
|
children && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ToastAction, { className: Toast_default.action, altText: actionText || "Action", asChild: true, children }),
|
|
@@ -29988,14 +29017,14 @@ function Toaster(props) {
|
|
|
29988
29017
|
const { toasts } = useToast();
|
|
29989
29018
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx_runtime61.Fragment, { children: [
|
|
29990
29019
|
toasts.map(({ id, message, props: props2 }) => {
|
|
29991
|
-
return /* @__PURE__ */ (0,
|
|
29020
|
+
return /* @__PURE__ */ (0, import_react176.createElement)(Toast2, { ...props2, key: id, description: message });
|
|
29992
29021
|
}),
|
|
29993
29022
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Viewport, { className: Toast_default.viewport, ...props })
|
|
29994
29023
|
] });
|
|
29995
29024
|
}
|
|
29996
29025
|
|
|
29997
29026
|
// src/components/Toggle.tsx
|
|
29998
|
-
var
|
|
29027
|
+
var import_react177 = require("react");
|
|
29999
29028
|
var import_classnames47 = __toESM(require_classnames());
|
|
30000
29029
|
|
|
30001
29030
|
// src/components/Toggle.module.css
|
|
@@ -30005,7 +29034,7 @@ var Toggle_default = {
|
|
|
30005
29034
|
|
|
30006
29035
|
// src/components/Toggle.tsx
|
|
30007
29036
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
30008
|
-
var Toggle = (0,
|
|
29037
|
+
var Toggle = (0, import_react177.forwardRef)(
|
|
30009
29038
|
({ label, children, className, ...props }, ref) => {
|
|
30010
29039
|
const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
|
|
30011
29040
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
@@ -30028,10 +29057,10 @@ var Toggle = (0, import_react181.forwardRef)(
|
|
|
30028
29057
|
var import_classnames48 = __toESM(require_classnames());
|
|
30029
29058
|
|
|
30030
29059
|
// node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
30031
|
-
var
|
|
29060
|
+
var import_react180 = __toESM(require("react"), 1);
|
|
30032
29061
|
|
|
30033
29062
|
// node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
30034
|
-
var
|
|
29063
|
+
var import_react178 = require("react");
|
|
30035
29064
|
var $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
30036
29065
|
var $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
30037
29066
|
bubbles: false,
|
|
@@ -30043,18 +29072,18 @@ var [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$expo
|
|
|
30043
29072
|
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
30044
29073
|
]);
|
|
30045
29074
|
var [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
30046
|
-
var $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ (0,
|
|
30047
|
-
return /* @__PURE__ */ (0,
|
|
29075
|
+
var $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ (0, import_react178.forwardRef)((props, forwardedRef) => {
|
|
29076
|
+
return /* @__PURE__ */ (0, import_react178.createElement)($d7bdfb9eb0fdf311$var$Collection.Provider, {
|
|
30048
29077
|
scope: props.__scopeRovingFocusGroup
|
|
30049
|
-
}, /* @__PURE__ */ (0,
|
|
29078
|
+
}, /* @__PURE__ */ (0, import_react178.createElement)($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
30050
29079
|
scope: props.__scopeRovingFocusGroup
|
|
30051
|
-
}, /* @__PURE__ */ (0,
|
|
29080
|
+
}, /* @__PURE__ */ (0, import_react178.createElement)($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
30052
29081
|
ref: forwardedRef
|
|
30053
29082
|
}))));
|
|
30054
29083
|
});
|
|
30055
|
-
var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0,
|
|
29084
|
+
var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_react178.forwardRef)((props, forwardedRef) => {
|
|
30056
29085
|
const { __scopeRovingFocusGroup, orientation, loop = false, dir, currentTabStopId: currentTabStopIdProp, defaultCurrentTabStopId, onCurrentTabStopIdChange, onEntryFocus, ...groupProps } = props;
|
|
30057
|
-
const ref = (0,
|
|
29086
|
+
const ref = (0, import_react178.useRef)(null);
|
|
30058
29087
|
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
30059
29088
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
30060
29089
|
const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -30062,12 +29091,12 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
30062
29091
|
defaultProp: defaultCurrentTabStopId,
|
|
30063
29092
|
onChange: onCurrentTabStopIdChange
|
|
30064
29093
|
});
|
|
30065
|
-
const [isTabbingBackOut, setIsTabbingBackOut] = (0,
|
|
29094
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = (0, import_react178.useState)(false);
|
|
30066
29095
|
const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus);
|
|
30067
29096
|
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
30068
|
-
const isClickFocusRef = (0,
|
|
30069
|
-
const [focusableItemsCount, setFocusableItemsCount] = (0,
|
|
30070
|
-
(0,
|
|
29097
|
+
const isClickFocusRef = (0, import_react178.useRef)(false);
|
|
29098
|
+
const [focusableItemsCount, setFocusableItemsCount] = (0, import_react178.useState)(0);
|
|
29099
|
+
(0, import_react178.useEffect)(() => {
|
|
30071
29100
|
const node = ref.current;
|
|
30072
29101
|
if (node) {
|
|
30073
29102
|
node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -30076,35 +29105,35 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
30076
29105
|
}, [
|
|
30077
29106
|
handleEntryFocus
|
|
30078
29107
|
]);
|
|
30079
|
-
return /* @__PURE__ */ (0,
|
|
29108
|
+
return /* @__PURE__ */ (0, import_react178.createElement)($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
|
|
30080
29109
|
scope: __scopeRovingFocusGroup,
|
|
30081
29110
|
orientation,
|
|
30082
29111
|
dir: direction,
|
|
30083
29112
|
loop,
|
|
30084
29113
|
currentTabStopId,
|
|
30085
|
-
onItemFocus: (0,
|
|
29114
|
+
onItemFocus: (0, import_react178.useCallback)(
|
|
30086
29115
|
(tabStopId) => setCurrentTabStopId(tabStopId),
|
|
30087
29116
|
[
|
|
30088
29117
|
setCurrentTabStopId
|
|
30089
29118
|
]
|
|
30090
29119
|
),
|
|
30091
|
-
onItemShiftTab: (0,
|
|
29120
|
+
onItemShiftTab: (0, import_react178.useCallback)(
|
|
30092
29121
|
() => setIsTabbingBackOut(true),
|
|
30093
29122
|
[]
|
|
30094
29123
|
),
|
|
30095
|
-
onFocusableItemAdd: (0,
|
|
29124
|
+
onFocusableItemAdd: (0, import_react178.useCallback)(
|
|
30096
29125
|
() => setFocusableItemsCount(
|
|
30097
29126
|
(prevCount) => prevCount + 1
|
|
30098
29127
|
),
|
|
30099
29128
|
[]
|
|
30100
29129
|
),
|
|
30101
|
-
onFocusableItemRemove: (0,
|
|
29130
|
+
onFocusableItemRemove: (0, import_react178.useCallback)(
|
|
30102
29131
|
() => setFocusableItemsCount(
|
|
30103
29132
|
(prevCount) => prevCount - 1
|
|
30104
29133
|
),
|
|
30105
29134
|
[]
|
|
30106
29135
|
)
|
|
30107
|
-
}, /* @__PURE__ */ (0,
|
|
29136
|
+
}, /* @__PURE__ */ (0, import_react178.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
30108
29137
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
30109
29138
|
"data-orientation": orientation
|
|
30110
29139
|
}, groupProps, {
|
|
@@ -30151,7 +29180,7 @@ var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ (0, import_reac
|
|
|
30151
29180
|
})));
|
|
30152
29181
|
});
|
|
30153
29182
|
var $d7bdfb9eb0fdf311$var$ITEM_NAME = "RovingFocusGroupItem";
|
|
30154
|
-
var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0,
|
|
29183
|
+
var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react178.forwardRef)((props, forwardedRef) => {
|
|
30155
29184
|
const { __scopeRovingFocusGroup, focusable = true, active = false, tabStopId, ...itemProps } = props;
|
|
30156
29185
|
const autoId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
30157
29186
|
const id = tabStopId || autoId;
|
|
@@ -30159,7 +29188,7 @@ var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react1
|
|
|
30159
29188
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
30160
29189
|
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
30161
29190
|
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
|
30162
|
-
(0,
|
|
29191
|
+
(0, import_react178.useEffect)(() => {
|
|
30163
29192
|
if (focusable) {
|
|
30164
29193
|
onFocusableItemAdd();
|
|
30165
29194
|
return () => onFocusableItemRemove();
|
|
@@ -30169,12 +29198,12 @@ var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ (0, import_react1
|
|
|
30169
29198
|
onFocusableItemAdd,
|
|
30170
29199
|
onFocusableItemRemove
|
|
30171
29200
|
]);
|
|
30172
|
-
return /* @__PURE__ */ (0,
|
|
29201
|
+
return /* @__PURE__ */ (0, import_react178.createElement)($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
|
|
30173
29202
|
scope: __scopeRovingFocusGroup,
|
|
30174
29203
|
id,
|
|
30175
29204
|
focusable,
|
|
30176
29205
|
active
|
|
30177
|
-
}, /* @__PURE__ */ (0,
|
|
29206
|
+
}, /* @__PURE__ */ (0, import_react178.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
30178
29207
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
30179
29208
|
"data-orientation": context.orientation
|
|
30180
29209
|
}, itemProps, {
|
|
@@ -30258,15 +29287,15 @@ var $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c
|
|
|
30258
29287
|
var $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
|
|
30259
29288
|
|
|
30260
29289
|
// node_modules/@radix-ui/react-toggle/dist/index.mjs
|
|
30261
|
-
var
|
|
30262
|
-
var $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ (0,
|
|
29290
|
+
var import_react179 = require("react");
|
|
29291
|
+
var $b3bbe2732c13b576$export$bea8ebba691c5813 = /* @__PURE__ */ (0, import_react179.forwardRef)((props, forwardedRef) => {
|
|
30263
29292
|
const { pressed: pressedProp, defaultPressed = false, onPressedChange, ...buttonProps } = props;
|
|
30264
29293
|
const [pressed = false, setPressed] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
30265
29294
|
prop: pressedProp,
|
|
30266
29295
|
onChange: onPressedChange,
|
|
30267
29296
|
defaultProp: defaultPressed
|
|
30268
29297
|
});
|
|
30269
|
-
return /* @__PURE__ */ (0,
|
|
29298
|
+
return /* @__PURE__ */ (0, import_react179.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
30270
29299
|
type: "button",
|
|
30271
29300
|
"aria-pressed": pressed,
|
|
30272
29301
|
"data-state": pressed ? "on" : "off",
|
|
@@ -30285,24 +29314,24 @@ var [$6c1fd9e6a8969628$var$createToggleGroupContext, $6c1fd9e6a8969628$export$d1
|
|
|
30285
29314
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
30286
29315
|
]);
|
|
30287
29316
|
var $6c1fd9e6a8969628$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
|
|
30288
|
-
var $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */
|
|
29317
|
+
var $6c1fd9e6a8969628$export$af3ec21f6cfb5e30 = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30289
29318
|
const { type, ...toggleGroupProps } = props;
|
|
30290
29319
|
if (type === "single") {
|
|
30291
29320
|
const singleProps = toggleGroupProps;
|
|
30292
|
-
return /* @__PURE__ */
|
|
29321
|
+
return /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplSingle, _extends({}, singleProps, {
|
|
30293
29322
|
ref: forwardedRef
|
|
30294
29323
|
}));
|
|
30295
29324
|
}
|
|
30296
29325
|
if (type === "multiple") {
|
|
30297
29326
|
const multipleProps = toggleGroupProps;
|
|
30298
|
-
return /* @__PURE__ */
|
|
29327
|
+
return /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImplMultiple, _extends({}, multipleProps, {
|
|
30299
29328
|
ref: forwardedRef
|
|
30300
29329
|
}));
|
|
30301
29330
|
}
|
|
30302
29331
|
throw new Error(`Missing prop \`type\` expected on \`${$6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME}\``);
|
|
30303
29332
|
});
|
|
30304
29333
|
var [$6c1fd9e6a8969628$var$ToggleGroupValueProvider, $6c1fd9e6a8969628$var$useToggleGroupValueContext] = $6c1fd9e6a8969628$var$createToggleGroupContext($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME);
|
|
30305
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */
|
|
29334
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30306
29335
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
30307
29336
|
}, ...toggleGroupSingleProps } = props;
|
|
30308
29337
|
const [value, setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -30310,24 +29339,24 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplSingle = /* @__PURE__ */ import_react18
|
|
|
30310
29339
|
defaultProp: defaultValue,
|
|
30311
29340
|
onChange: onValueChange
|
|
30312
29341
|
});
|
|
30313
|
-
return /* @__PURE__ */
|
|
29342
|
+
return /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupValueProvider, {
|
|
30314
29343
|
scope: props.__scopeToggleGroup,
|
|
30315
29344
|
type: "single",
|
|
30316
29345
|
value: value ? [
|
|
30317
29346
|
value
|
|
30318
29347
|
] : [],
|
|
30319
29348
|
onItemActivate: setValue,
|
|
30320
|
-
onItemDeactivate:
|
|
29349
|
+
onItemDeactivate: import_react180.default.useCallback(
|
|
30321
29350
|
() => setValue(""),
|
|
30322
29351
|
[
|
|
30323
29352
|
setValue
|
|
30324
29353
|
]
|
|
30325
29354
|
)
|
|
30326
|
-
}, /* @__PURE__ */
|
|
29355
|
+
}, /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, _extends({}, toggleGroupSingleProps, {
|
|
30327
29356
|
ref: forwardedRef
|
|
30328
29357
|
})));
|
|
30329
29358
|
});
|
|
30330
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */
|
|
29359
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30331
29360
|
const { value: valueProp, defaultValue, onValueChange = () => {
|
|
30332
29361
|
}, ...toggleGroupMultipleProps } = props;
|
|
30333
29362
|
const [value1 = [], setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
@@ -30335,7 +29364,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
30335
29364
|
defaultProp: defaultValue,
|
|
30336
29365
|
onChange: onValueChange
|
|
30337
29366
|
});
|
|
30338
|
-
const handleButtonActivate =
|
|
29367
|
+
const handleButtonActivate = import_react180.default.useCallback(
|
|
30339
29368
|
(itemValue) => setValue(
|
|
30340
29369
|
(prevValue = []) => [
|
|
30341
29370
|
...prevValue,
|
|
@@ -30346,7 +29375,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
30346
29375
|
setValue
|
|
30347
29376
|
]
|
|
30348
29377
|
);
|
|
30349
|
-
const handleButtonDeactivate =
|
|
29378
|
+
const handleButtonDeactivate = import_react180.default.useCallback(
|
|
30350
29379
|
(itemValue) => setValue(
|
|
30351
29380
|
(prevValue = []) => prevValue.filter(
|
|
30352
29381
|
(value) => value !== itemValue
|
|
@@ -30356,18 +29385,18 @@ var $6c1fd9e6a8969628$var$ToggleGroupImplMultiple = /* @__PURE__ */ import_react
|
|
|
30356
29385
|
setValue
|
|
30357
29386
|
]
|
|
30358
29387
|
);
|
|
30359
|
-
return /* @__PURE__ */
|
|
29388
|
+
return /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupValueProvider, {
|
|
30360
29389
|
scope: props.__scopeToggleGroup,
|
|
30361
29390
|
type: "multiple",
|
|
30362
29391
|
value: value1,
|
|
30363
29392
|
onItemActivate: handleButtonActivate,
|
|
30364
29393
|
onItemDeactivate: handleButtonDeactivate
|
|
30365
|
-
}, /* @__PURE__ */
|
|
29394
|
+
}, /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupImpl, _extends({}, toggleGroupMultipleProps, {
|
|
30366
29395
|
ref: forwardedRef
|
|
30367
29396
|
})));
|
|
30368
29397
|
});
|
|
30369
29398
|
var [$6c1fd9e6a8969628$var$ToggleGroupContext, $6c1fd9e6a8969628$var$useToggleGroupContext] = $6c1fd9e6a8969628$var$createToggleGroupContext($6c1fd9e6a8969628$var$TOGGLE_GROUP_NAME);
|
|
30370
|
-
var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */
|
|
29399
|
+
var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30371
29400
|
const { __scopeToggleGroup, disabled = false, rovingFocus = true, orientation, dir, loop = true, ...toggleGroupProps } = props;
|
|
30372
29401
|
const rovingFocusGroupScope = $6c1fd9e6a8969628$var$useRovingFocusGroupScope(__scopeToggleGroup);
|
|
30373
29402
|
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
@@ -30376,24 +29405,24 @@ var $6c1fd9e6a8969628$var$ToggleGroupImpl = /* @__PURE__ */ import_react184.defa
|
|
|
30376
29405
|
dir: direction,
|
|
30377
29406
|
...toggleGroupProps
|
|
30378
29407
|
};
|
|
30379
|
-
return /* @__PURE__ */
|
|
29408
|
+
return /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupContext, {
|
|
30380
29409
|
scope: __scopeToggleGroup,
|
|
30381
29410
|
rovingFocus,
|
|
30382
29411
|
disabled
|
|
30383
|
-
}, rovingFocus ? /* @__PURE__ */
|
|
29412
|
+
}, rovingFocus ? /* @__PURE__ */ import_react180.default.createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
|
|
30384
29413
|
asChild: true
|
|
30385
29414
|
}, rovingFocusGroupScope, {
|
|
30386
29415
|
orientation,
|
|
30387
29416
|
dir: direction,
|
|
30388
29417
|
loop
|
|
30389
|
-
}), /* @__PURE__ */
|
|
29418
|
+
}), /* @__PURE__ */ import_react180.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, commonProps, {
|
|
30390
29419
|
ref: forwardedRef
|
|
30391
|
-
}))) : /* @__PURE__ */
|
|
29420
|
+
}))) : /* @__PURE__ */ import_react180.default.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, commonProps, {
|
|
30392
29421
|
ref: forwardedRef
|
|
30393
29422
|
})));
|
|
30394
29423
|
});
|
|
30395
29424
|
var $6c1fd9e6a8969628$var$ITEM_NAME = "ToggleGroupItem";
|
|
30396
|
-
var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */
|
|
29425
|
+
var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30397
29426
|
const valueContext = $6c1fd9e6a8969628$var$useToggleGroupValueContext($6c1fd9e6a8969628$var$ITEM_NAME, props.__scopeToggleGroup);
|
|
30398
29427
|
const context = $6c1fd9e6a8969628$var$useToggleGroupContext($6c1fd9e6a8969628$var$ITEM_NAME, props.__scopeToggleGroup);
|
|
30399
29428
|
const rovingFocusGroupScope = $6c1fd9e6a8969628$var$useRovingFocusGroupScope(props.__scopeToggleGroup);
|
|
@@ -30404,20 +29433,20 @@ var $6c1fd9e6a8969628$export$b453109e13abe10b = /* @__PURE__ */ import_react184.
|
|
|
30404
29433
|
pressed,
|
|
30405
29434
|
disabled
|
|
30406
29435
|
};
|
|
30407
|
-
const ref =
|
|
30408
|
-
return context.rovingFocus ? /* @__PURE__ */
|
|
29436
|
+
const ref = import_react180.default.useRef(null);
|
|
29437
|
+
return context.rovingFocus ? /* @__PURE__ */ import_react180.default.createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
|
|
30409
29438
|
asChild: true
|
|
30410
29439
|
}, rovingFocusGroupScope, {
|
|
30411
29440
|
focusable: !disabled,
|
|
30412
29441
|
active: pressed,
|
|
30413
29442
|
ref
|
|
30414
|
-
}), /* @__PURE__ */
|
|
29443
|
+
}), /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, _extends({}, commonProps, {
|
|
30415
29444
|
ref: forwardedRef
|
|
30416
|
-
}))) : /* @__PURE__ */
|
|
29445
|
+
}))) : /* @__PURE__ */ import_react180.default.createElement($6c1fd9e6a8969628$var$ToggleGroupItemImpl, _extends({}, commonProps, {
|
|
30417
29446
|
ref: forwardedRef
|
|
30418
29447
|
}));
|
|
30419
29448
|
});
|
|
30420
|
-
var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */
|
|
29449
|
+
var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ import_react180.default.forwardRef((props, forwardedRef) => {
|
|
30421
29450
|
const { __scopeToggleGroup, value, ...itemProps } = props;
|
|
30422
29451
|
const valueContext = $6c1fd9e6a8969628$var$useToggleGroupValueContext($6c1fd9e6a8969628$var$ITEM_NAME, __scopeToggleGroup);
|
|
30423
29452
|
const singleProps = {
|
|
@@ -30426,7 +29455,7 @@ var $6c1fd9e6a8969628$var$ToggleGroupItemImpl = /* @__PURE__ */ import_react184.
|
|
|
30426
29455
|
"aria-pressed": void 0
|
|
30427
29456
|
};
|
|
30428
29457
|
const typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
30429
|
-
return /* @__PURE__ */
|
|
29458
|
+
return /* @__PURE__ */ import_react180.default.createElement($b3bbe2732c13b576$export$bea8ebba691c5813, _extends({}, typeProps, itemProps, {
|
|
30430
29459
|
ref: forwardedRef,
|
|
30431
29460
|
onPressedChange: (pressed) => {
|
|
30432
29461
|
if (pressed) valueContext.onItemActivate(value);
|