@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.mjs CHANGED
@@ -113,7 +113,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
113
113
  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
114
114
  }
115
115
  var objectIs = typeof Object.is === "function" ? Object.is : is;
116
- var useState15 = React19.useState, useEffect11 = React19.useEffect, useLayoutEffect3 = React19.useLayoutEffect, useDebugValue2 = React19.useDebugValue;
116
+ var useState15 = React19.useState, useEffect12 = React19.useEffect, useLayoutEffect3 = React19.useLayoutEffect, useDebugValue2 = React19.useDebugValue;
117
117
  var didWarnOld18Alpha = false;
118
118
  var didWarnUncachedGetSnapshot = false;
119
119
  function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
@@ -150,7 +150,7 @@ var require_use_sync_external_store_shim_development = __commonJS({
150
150
  });
151
151
  }
152
152
  }, [subscribe, value, getSnapshot]);
153
- useEffect11(function() {
153
+ useEffect12(function() {
154
154
  if (checkIfSnapshotChanged(inst)) {
155
155
  forceUpdate({
156
156
  inst
@@ -344,7 +344,7 @@ var require_with_selector_development = __commonJS({
344
344
  }
345
345
  var objectIs = typeof Object.is === "function" ? Object.is : is;
346
346
  var useSyncExternalStore = shim.useSyncExternalStore;
347
- var useRef8 = React19.useRef, useEffect11 = React19.useEffect, useMemo4 = React19.useMemo, useDebugValue2 = React19.useDebugValue;
347
+ var useRef8 = React19.useRef, useEffect12 = React19.useEffect, useMemo4 = React19.useMemo, useDebugValue2 = React19.useDebugValue;
348
348
  function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
349
349
  var instRef = useRef8(null);
350
350
  var inst;
@@ -401,7 +401,7 @@ var require_with_selector_development = __commonJS({
401
401
  return [getSnapshotWithSelector, getServerSnapshotWithSelector];
402
402
  }, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection = _useMemo[0], getServerSelection = _useMemo[1];
403
403
  var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
404
- useEffect11(function() {
404
+ useEffect12(function() {
405
405
  inst.hasValue = true;
406
406
  inst.value = value;
407
407
  }, [value]);
@@ -22875,7 +22875,7 @@ function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
22875
22875
  };
22876
22876
  }
22877
22877
 
22878
- // src/components/form/Form.tsx
22878
+ // src/components/forms/Form.tsx
22879
22879
  import { useEffect } from "react";
22880
22880
 
22881
22881
  // node_modules/react-hook-form/dist/index.esm.mjs
@@ -24526,10 +24526,10 @@ function useForm(props = {}) {
24526
24526
  return _formControl.current;
24527
24527
  }
24528
24528
 
24529
- // src/components/form/Form.tsx
24529
+ // src/components/forms/Form.tsx
24530
24530
  var import_classnames6 = __toESM(require_classnames());
24531
24531
 
24532
- // src/components/form/Form.module.css
24532
+ // src/components/forms/Form.module.css
24533
24533
  var Form_default = {
24534
24534
  form: "Form_form",
24535
24535
  text: "Form_text",
@@ -25162,12 +25162,25 @@ var Text_default = {
25162
25162
  tighter: "Text_tighter",
25163
25163
  tight: "Text_tight",
25164
25164
  wide: "Text_wide",
25165
- wider: "Text_wider"
25165
+ wider: "Text_wider",
25166
+ left: "Text_left",
25167
+ center: "Text_center",
25168
+ right: "Text_right"
25166
25169
  };
25167
25170
 
25168
25171
  // src/components/Text.tsx
25169
25172
  import { jsx as jsx6 } from "react/jsx-runtime";
25170
- function Text({ children, type, size, spacing, weight, asChild, className, ...props }) {
25173
+ function Text({
25174
+ children,
25175
+ type,
25176
+ size,
25177
+ spacing,
25178
+ weight,
25179
+ align,
25180
+ asChild,
25181
+ className,
25182
+ ...props
25183
+ }) {
25171
25184
  const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "span";
25172
25185
  return /* @__PURE__ */ jsx6(
25173
25186
  Component,
@@ -25179,14 +25192,15 @@ function Text({ children, type, size, spacing, weight, asChild, className, ...pr
25179
25192
  size && Text_default[size],
25180
25193
  spacing && Text_default[spacing],
25181
25194
  type && Text_default[type],
25182
- weight && Text_default[weight]
25195
+ weight && Text_default[weight],
25196
+ align && Text_default[align]
25183
25197
  ),
25184
25198
  children
25185
25199
  }
25186
25200
  );
25187
25201
  }
25188
25202
 
25189
- // src/components/form/Form.tsx
25203
+ // src/components/forms/Form.tsx
25190
25204
  import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
25191
25205
  function Form({
25192
25206
  gap = "md",
@@ -25259,7 +25273,7 @@ function Form({
25259
25273
  ] });
25260
25274
  }
25261
25275
 
25262
- // src/components/form/FormField.tsx
25276
+ // src/components/forms/FormField.tsx
25263
25277
  import { cloneElement as cloneElement2, forwardRef } from "react";
25264
25278
  var import_classnames7 = __toESM(require_classnames());
25265
25279
 
@@ -25282,14 +25296,14 @@ function mapChildren(children, handler) {
25282
25296
  });
25283
25297
  }
25284
25298
 
25285
- // src/components/form/FormField.module.css
25299
+ // src/components/forms/FormField.module.css
25286
25300
  var FormField_default = {
25287
25301
  field: "FormField_field",
25288
25302
  description: "FormField_description",
25289
25303
  error: "FormField_error"
25290
25304
  };
25291
25305
 
25292
- // src/components/form/FormField.tsx
25306
+ // src/components/forms/FormField.tsx
25293
25307
  import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
25294
25308
  var FormField = forwardRef(
25295
25309
  ({ name, description, label, rules, className, children, ...props }, ref) => {
@@ -25309,6 +25323,7 @@ var FormField = forwardRef(
25309
25323
  );
25310
25324
 
25311
25325
  // src/components/Button.tsx
25326
+ import { forwardRef as forwardRef2 } from "react";
25312
25327
  var import_classnames8 = __toESM(require_classnames());
25313
25328
 
25314
25329
  // src/components/Button.module.css
@@ -25328,33 +25343,36 @@ var Button_default = {
25328
25343
 
25329
25344
  // src/components/Button.tsx
25330
25345
  import { jsx as jsx9 } from "react/jsx-runtime";
25331
- function Button({
25332
- variant = "secondary",
25333
- size = "md",
25334
- preventFocusOnPress = true,
25335
- asChild,
25336
- className,
25337
- children,
25338
- ...props
25339
- }) {
25340
- const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
25341
- return /* @__PURE__ */ jsx9(
25342
- Component,
25343
- {
25344
- ...props,
25345
- preventFocusOnPress: Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? preventFocusOnPress : void 0,
25346
- className: (0, import_classnames8.default)(
25347
- Button_default.button,
25348
- className,
25349
- variant && Button_default[variant],
25350
- size && Button_default[size]
25351
- ),
25352
- children
25353
- }
25354
- );
25355
- }
25346
+ var Button = forwardRef2(
25347
+ ({
25348
+ variant = "secondary",
25349
+ size = "md",
25350
+ preventFocusOnPress = true,
25351
+ asChild,
25352
+ className,
25353
+ children,
25354
+ ...props
25355
+ }, ref) => {
25356
+ const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
25357
+ return /* @__PURE__ */ jsx9(
25358
+ Component,
25359
+ {
25360
+ ...props,
25361
+ ref,
25362
+ preventFocusOnPress: Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? preventFocusOnPress : void 0,
25363
+ className: (0, import_classnames8.default)(
25364
+ Button_default.button,
25365
+ className,
25366
+ variant && Button_default[variant],
25367
+ size && Button_default[size]
25368
+ ),
25369
+ children
25370
+ }
25371
+ );
25372
+ }
25373
+ );
25356
25374
 
25357
- // src/components/form/FormResetButton.tsx
25375
+ // src/components/forms/FormResetButton.tsx
25358
25376
  import { jsx as jsx10 } from "react/jsx-runtime";
25359
25377
  function FormResetButton({ values = {}, children, onPress, ...props }) {
25360
25378
  const { reset } = useFormContext();
@@ -25410,7 +25428,7 @@ function LoadingButton({ isLoading, children, ...props }) {
25410
25428
  ] });
25411
25429
  }
25412
25430
 
25413
- // src/components/form/FormSubmitButton.tsx
25431
+ // src/components/forms/FormSubmitButton.tsx
25414
25432
  import { jsx as jsx13 } from "react/jsx-runtime";
25415
25433
  function FormSubmitButton({ children, disabled, isLoading, ...props }) {
25416
25434
  const {
@@ -25456,7 +25474,7 @@ var createStoreImpl = (createState) => {
25456
25474
  }
25457
25475
  };
25458
25476
  const getState = () => state;
25459
- const getInitialState = () => initialState3;
25477
+ const getInitialState = () => initialState4;
25460
25478
  const subscribe = (listener) => {
25461
25479
  listeners.add(listener);
25462
25480
  return () => listeners.delete(listener);
@@ -25470,7 +25488,7 @@ var createStoreImpl = (createState) => {
25470
25488
  listeners.clear();
25471
25489
  };
25472
25490
  const api = { setState, getState, getInitialState, subscribe, destroy };
25473
- const initialState3 = state = createState(setState, getState, api);
25491
+ const initialState4 = state = createState(setState, getState, api);
25474
25492
  return api;
25475
25493
  };
25476
25494
  var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
@@ -25849,11 +25867,6 @@ var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.redu
25849
25867
  [node]: Node2
25850
25868
  };
25851
25869
  }, {});
25852
- function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
25853
- if (target) $4q5Fq$flushSync(
25854
- () => target.dispatchEvent(event)
25855
- );
25856
- }
25857
25870
 
25858
25871
  // node_modules/@radix-ui/react-collapsible/dist/index.mjs
25859
25872
  import { forwardRef as $73KQ4$forwardRef, createElement as $73KQ4$createElement, useCallback as $73KQ4$useCallback, useState as $73KQ4$useState, useRef as $73KQ4$useRef, useEffect as $73KQ4$useEffect } from "react";
@@ -25866,11 +25879,11 @@ var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || g
25866
25879
  // node_modules/@radix-ui/react-presence/dist/index.mjs
25867
25880
  import { Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer } from "react";
25868
25881
  import { flushSync as $iqq3r$flushSync } from "react-dom";
25869
- function $fe963b355347cc68$export$3e6543de14f8614f(initialState3, machine) {
25882
+ function $fe963b355347cc68$export$3e6543de14f8614f(initialState4, machine) {
25870
25883
  return $iqq3r$useReducer((state, event) => {
25871
25884
  const nextState = machine[state][event];
25872
25885
  return nextState !== null && nextState !== void 0 ? nextState : state;
25873
- }, initialState3);
25886
+ }, initialState4);
25874
25887
  }
25875
25888
  var $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
25876
25889
  const { present, children } = props;
@@ -25890,8 +25903,8 @@ function $921a889cee6df7e8$var$usePresence(present) {
25890
25903
  const stylesRef = $iqq3r$useRef({});
25891
25904
  const prevPresentRef = $iqq3r$useRef(present);
25892
25905
  const prevAnimationNameRef = $iqq3r$useRef("none");
25893
- const initialState3 = present ? "mounted" : "unmounted";
25894
- const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState3, {
25906
+ const initialState4 = present ? "mounted" : "unmounted";
25907
+ const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState4, {
25895
25908
  mounted: {
25896
25909
  UNMOUNT: "unmounted",
25897
25910
  ANIMATION_OUT: "unmountSuspended"
@@ -26558,7 +26571,7 @@ function Calendar({ className, ...props }) {
26558
26571
  }
26559
26572
 
26560
26573
  // src/components/Checkbox.tsx
26561
- import { forwardRef as forwardRef2 } from "react";
26574
+ import { forwardRef as forwardRef3 } from "react";
26562
26575
 
26563
26576
  // node_modules/react-icons/im/index.mjs
26564
26577
  function ImCheckmark(props) {
@@ -26577,7 +26590,7 @@ var Checkbox_default = {
26577
26590
 
26578
26591
  // src/components/Checkbox.tsx
26579
26592
  import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
26580
- var Checkbox = forwardRef2(
26593
+ var Checkbox = forwardRef3(
26581
26594
  ({ label, className, children, ...props }, ref) => {
26582
26595
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
26583
26596
  return /* @__PURE__ */ jsx20(
@@ -26681,7 +26694,7 @@ var import_classnames23 = __toESM(require_classnames());
26681
26694
  import { useState as useState5 } from "react";
26682
26695
 
26683
26696
  // src/components/TextField.tsx
26684
- import { useEffect as useEffect3, useState as useState4, forwardRef as forwardRef3 } from "react";
26697
+ import { useEffect as useEffect3, useState as useState4, forwardRef as forwardRef4 } from "react";
26685
26698
  var import_classnames22 = __toESM(require_classnames());
26686
26699
 
26687
26700
  // src/components/Label.tsx
@@ -26742,7 +26755,7 @@ var TextField_default = {
26742
26755
 
26743
26756
  // src/components/TextField.tsx
26744
26757
  import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
26745
- var TextField = forwardRef3(
26758
+ var TextField = forwardRef4(
26746
26759
  ({
26747
26760
  value,
26748
26761
  defaultValue,
@@ -26953,7 +26966,7 @@ var Heading_default = {
26953
26966
  // src/components/Heading.tsx
26954
26967
  import { jsx as jsx32 } from "react/jsx-runtime";
26955
26968
  function Heading({ size = 5, className, children, asChild, ...props }) {
26956
- const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "h1";
26969
+ const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : "div";
26957
26970
  return /* @__PURE__ */ jsx32(
26958
26971
  Component,
26959
26972
  {
@@ -26965,7 +26978,7 @@ function Heading({ size = 5, className, children, asChild, ...props }) {
26965
26978
  }
26966
26979
 
26967
26980
  // src/components/HoverTrigger.tsx
26968
- import { cloneElement as cloneElement3, useRef as useRef2, useState as useState6 } from "react";
26981
+ import { useRef as useRef2, useState as useState6, useEffect as useEffect4 } from "react";
26969
26982
 
26970
26983
  // src/components/HoverTrigger.module.css
26971
26984
  var HoverTrigger_default = {
@@ -26973,40 +26986,64 @@ var HoverTrigger_default = {
26973
26986
  };
26974
26987
 
26975
26988
  // src/components/HoverTrigger.tsx
26976
- import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
26989
+ import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
26977
26990
  var CLOSE_DELAY = 500;
26978
- function HoverTrigger({ closeDelay = CLOSE_DELAY, children }) {
26991
+ function HoverTrigger({
26992
+ isOpen,
26993
+ onHoverStart,
26994
+ onHoverEnd,
26995
+ closeDelay = CLOSE_DELAY,
26996
+ children
26997
+ }) {
26979
26998
  const [triggerElement, popupElement] = children;
26980
- const [show, setShow] = useState6(false);
26981
- const overMenu = useRef2(false);
26982
- const handleHoverStart = () => {
26983
- overMenu.current = false;
26984
- setShow(true);
26999
+ const triggerRef = useRef2(null);
27000
+ const [open, setOpen] = useState6(isOpen);
27001
+ const isOverMenu = useRef2(false);
27002
+ const isOverButton = useRef2(false);
27003
+ const timeout = useRef2();
27004
+ useEffect4(() => {
27005
+ if (isOpen !== open) {
27006
+ setOpen(isOpen);
27007
+ }
27008
+ }, [isOpen]);
27009
+ const close = () => setOpen(false);
27010
+ const handleMouseEnter = () => {
27011
+ isOverMenu.current = false;
27012
+ isOverButton.current = true;
27013
+ setOpen(true);
27014
+ onHoverStart?.();
26985
27015
  };
26986
- const handleHoverEnd = () => {
26987
- setTimeout(() => {
26988
- if (!overMenu.current) {
26989
- setShow(false);
26990
- overMenu.current = false;
26991
- }
26992
- }, closeDelay);
27016
+ const handleMouseLeave = () => {
27017
+ isOverButton.current = false;
27018
+ checkHoverState();
26993
27019
  };
26994
27020
  const handleMenuEnter = () => {
26995
- overMenu.current = true;
27021
+ isOverMenu.current = true;
26996
27022
  };
26997
27023
  const handleMenuLeave = () => {
26998
- overMenu.current = false;
26999
- setShow(false);
27024
+ isOverMenu.current = false;
27025
+ checkHoverState();
27026
+ };
27027
+ const checkHoverState = () => {
27028
+ clearTimeout(timeout.current);
27029
+ timeout.current = setTimeout(() => {
27030
+ if (!isOverMenu.current && !isOverButton.current) {
27031
+ setOpen(false);
27032
+ onHoverEnd?.();
27033
+ isOverMenu.current = false;
27034
+ isOverButton.current = false;
27035
+ }
27036
+ }, closeDelay);
27000
27037
  };
27001
- return /* @__PURE__ */ jsxs18($de32f1b87079253c$export$2e1e1122cf0cba88, { children: [
27002
- cloneElement3(triggerElement, { onHoverStart: handleHoverStart, onHoverEnd: handleHoverEnd }),
27003
- /* @__PURE__ */ jsx33(Popover, { isOpen: show, isNonModal: true, children: /* @__PURE__ */ jsx33(
27038
+ return /* @__PURE__ */ jsxs18(Fragment5, { children: [
27039
+ /* @__PURE__ */ jsx33("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
27040
+ /* @__PURE__ */ jsx33(Popover, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ jsx33(
27004
27041
  "div",
27005
27042
  {
27006
27043
  className: HoverTrigger_default.wrapper,
27007
27044
  onMouseEnter: handleMenuEnter,
27008
27045
  onMouseLeave: handleMenuLeave,
27009
- children: /* @__PURE__ */ jsx33(Dialog, { children: cloneElement3(popupElement) })
27046
+ children: popupElement
27010
27047
  }
27011
27048
  ) })
27012
27049
  ] });
@@ -27167,1060 +27204,55 @@ function Modal({ children, className, ...props }) {
27167
27204
  ) });
27168
27205
  }
27169
27206
 
27170
- // node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
27171
- import { forwardRef as $yHMN2$forwardRef, useState as $yHMN2$useState, useRef as $yHMN2$useRef, useCallback as $yHMN2$useCallback, useEffect as $yHMN2$useEffect, createElement as $yHMN2$createElement, Fragment as $yHMN2$Fragment, useMemo as $yHMN2$useMemo } from "react";
27172
- import $yHMN2$reactdom from "react-dom";
27173
-
27174
- // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
27175
- import { createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef } from "react";
27176
-
27177
- // node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
27178
- import { useEffect as $hPSQ5$useEffect } from "react";
27179
- function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27180
- const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
27181
- $hPSQ5$useEffect(() => {
27182
- const handleKeyDown = (event) => {
27183
- if (event.key === "Escape") onEscapeKeyDown(event);
27184
- };
27185
- ownerDocument.addEventListener("keydown", handleKeyDown);
27186
- return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
27187
- }, [
27188
- onEscapeKeyDown,
27189
- ownerDocument
27190
- ]);
27191
- }
27192
-
27193
- // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
27194
- var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
27195
- var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
27196
- var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
27197
- var $5cb92bef7577960e$var$originalBodyPointerEvents;
27198
- var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ $kqwpH$createContext({
27199
- layers: /* @__PURE__ */ new Set(),
27200
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
27201
- branches: /* @__PURE__ */ new Set()
27202
- });
27203
- var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ $kqwpH$forwardRef((props, forwardedRef) => {
27204
- var _node$ownerDocument;
27205
- const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
27206
- const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
27207
- const [node1, setNode] = $kqwpH$useState(null);
27208
- const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
27209
- const [, force] = $kqwpH$useState({});
27210
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
27211
- forwardedRef,
27212
- (node) => setNode(node)
27213
- );
27214
- const layers = Array.from(context.layers);
27215
- const [highestLayerWithOutsidePointerEventsDisabled] = [
27216
- ...context.layersWithOutsidePointerEventsDisabled
27217
- ].slice(-1);
27218
- const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
27219
- const index = node1 ? layers.indexOf(node1) : -1;
27220
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
27221
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
27222
- const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
27223
- const target = event.target;
27224
- const isPointerDownOnBranch = [
27225
- ...context.branches
27226
- ].some(
27227
- (branch) => branch.contains(target)
27228
- );
27229
- if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
27230
- onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
27231
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
27232
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
27233
- }, ownerDocument);
27234
- const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
27235
- const target = event.target;
27236
- const isFocusInBranch = [
27237
- ...context.branches
27238
- ].some(
27239
- (branch) => branch.contains(target)
27240
- );
27241
- if (isFocusInBranch) return;
27242
- onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
27243
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
27244
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
27245
- }, ownerDocument);
27246
- $addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
27247
- const isHighestLayer = index === context.layers.size - 1;
27248
- if (!isHighestLayer) return;
27249
- onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
27250
- if (!event.defaultPrevented && onDismiss) {
27251
- event.preventDefault();
27252
- onDismiss();
27253
- }
27254
- }, ownerDocument);
27255
- $kqwpH$useEffect(() => {
27256
- if (!node1) return;
27257
- if (disableOutsidePointerEvents) {
27258
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
27259
- $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
27260
- ownerDocument.body.style.pointerEvents = "none";
27261
- }
27262
- context.layersWithOutsidePointerEventsDisabled.add(node1);
27263
- }
27264
- context.layers.add(node1);
27265
- $5cb92bef7577960e$var$dispatchUpdate();
27266
- return () => {
27267
- if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
27268
- };
27269
- }, [
27270
- node1,
27271
- ownerDocument,
27272
- disableOutsidePointerEvents,
27273
- context
27274
- ]);
27275
- $kqwpH$useEffect(() => {
27276
- return () => {
27277
- if (!node1) return;
27278
- context.layers.delete(node1);
27279
- context.layersWithOutsidePointerEventsDisabled.delete(node1);
27280
- $5cb92bef7577960e$var$dispatchUpdate();
27281
- };
27282
- }, [
27283
- node1,
27284
- context
27285
- ]);
27286
- $kqwpH$useEffect(() => {
27287
- const handleUpdate = () => force({});
27288
- document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
27289
- return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
27290
- }, []);
27291
- return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
27292
- ref: composedRefs,
27293
- style: {
27294
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
27295
- ...props.style
27296
- },
27297
- onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
27298
- onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
27299
- onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
27300
- }));
27301
- });
27302
- function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27303
- const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
27304
- const isPointerInsideReactTreeRef = $kqwpH$useRef(false);
27305
- const handleClickRef = $kqwpH$useRef(() => {
27306
- });
27307
- $kqwpH$useEffect(() => {
27308
- const handlePointerDown = (event) => {
27309
- if (event.target && !isPointerInsideReactTreeRef.current) {
27310
- let handleAndDispatchPointerDownOutsideEvent = function() {
27311
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
27312
- discrete: true
27313
- });
27314
- };
27315
- const eventDetail = {
27316
- originalEvent: event
27317
- };
27318
- if (event.pointerType === "touch") {
27319
- ownerDocument.removeEventListener("click", handleClickRef.current);
27320
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
27321
- ownerDocument.addEventListener("click", handleClickRef.current, {
27322
- once: true
27323
- });
27324
- } else handleAndDispatchPointerDownOutsideEvent();
27325
- } else
27326
- ownerDocument.removeEventListener("click", handleClickRef.current);
27327
- isPointerInsideReactTreeRef.current = false;
27328
- };
27329
- const timerId = window.setTimeout(() => {
27330
- ownerDocument.addEventListener("pointerdown", handlePointerDown);
27331
- }, 0);
27332
- return () => {
27333
- window.clearTimeout(timerId);
27334
- ownerDocument.removeEventListener("pointerdown", handlePointerDown);
27335
- ownerDocument.removeEventListener("click", handleClickRef.current);
27336
- };
27337
- }, [
27338
- ownerDocument,
27339
- handlePointerDownOutside
27340
- ]);
27341
- return {
27342
- // ensures we check React component tree (not just DOM tree)
27343
- onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
27344
- };
27345
- }
27346
- function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27347
- const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
27348
- const isFocusInsideReactTreeRef = $kqwpH$useRef(false);
27349
- $kqwpH$useEffect(() => {
27350
- const handleFocus = (event) => {
27351
- if (event.target && !isFocusInsideReactTreeRef.current) {
27352
- const eventDetail = {
27353
- originalEvent: event
27354
- };
27355
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
27356
- discrete: false
27357
- });
27358
- }
27359
- };
27360
- ownerDocument.addEventListener("focusin", handleFocus);
27361
- return () => ownerDocument.removeEventListener("focusin", handleFocus);
27362
- }, [
27363
- ownerDocument,
27364
- handleFocusOutside
27365
- ]);
27366
- return {
27367
- onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
27368
- onBlurCapture: () => isFocusInsideReactTreeRef.current = false
27369
- };
27370
- }
27371
- function $5cb92bef7577960e$var$dispatchUpdate() {
27372
- const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
27373
- document.dispatchEvent(event);
27374
- }
27375
- function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
27376
- const target = detail.originalEvent.target;
27377
- const event = new CustomEvent(name, {
27378
- bubbles: false,
27379
- cancelable: true,
27380
- detail
27381
- });
27382
- if (handler) target.addEventListener(name, handler, {
27383
- once: true
27384
- });
27385
- if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
27386
- else target.dispatchEvent(event);
27387
- }
27388
-
27389
- // node_modules/@radix-ui/react-use-previous/dist/index.mjs
27390
- import { useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo } from "react";
27391
- function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
27392
- const ref = $8LvvK$useRef({
27393
- value,
27394
- previous: value
27395
- });
27396
- return $8LvvK$useMemo(() => {
27397
- if (ref.current.value !== value) {
27398
- ref.current.previous = ref.current.value;
27399
- ref.current.value = value;
27400
- }
27401
- return ref.current.previous;
27402
- }, [
27403
- value
27404
- ]);
27405
- }
27406
-
27407
- // node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
27408
- import { forwardRef as $kVwnw$forwardRef, createElement as $kVwnw$createElement } from "react";
27409
- var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ $kVwnw$forwardRef((props, forwardedRef) => {
27410
- return /* @__PURE__ */ $kVwnw$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
27411
- ref: forwardedRef,
27412
- style: {
27413
- // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
27414
- position: "absolute",
27415
- border: 0,
27416
- width: 1,
27417
- height: 1,
27418
- padding: 0,
27419
- margin: -1,
27420
- overflow: "hidden",
27421
- clip: "rect(0, 0, 0, 0)",
27422
- whiteSpace: "nowrap",
27423
- wordWrap: "normal",
27424
- ...props.style
27425
- }
27426
- }));
27427
- });
27428
- var $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164;
27429
-
27430
- // node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
27431
- var $322c88a641701f3b$var$NAVIGATION_MENU_NAME = "NavigationMenu";
27432
- var [$322c88a641701f3b$var$Collection, $322c88a641701f3b$var$useCollection, $322c88a641701f3b$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27433
- var [$322c88a641701f3b$var$FocusGroupCollection, $322c88a641701f3b$var$useFocusGroupCollection, $322c88a641701f3b$var$createFocusGroupCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27434
- var [$322c88a641701f3b$var$createNavigationMenuContext, $322c88a641701f3b$export$fb8ea5af8c9fcdf0] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($322c88a641701f3b$var$NAVIGATION_MENU_NAME, [
27435
- $322c88a641701f3b$var$createCollectionScope,
27436
- $322c88a641701f3b$var$createFocusGroupCollectionScope
27437
- ]);
27438
- var [$322c88a641701f3b$var$NavigationMenuProviderImpl, $322c88a641701f3b$var$useNavigationMenuContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27439
- var [$322c88a641701f3b$var$ViewportContentProvider, $322c88a641701f3b$var$useViewportContentContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27440
- var $322c88a641701f3b$export$5b2278cf1e8bcae2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27441
- const { __scopeNavigationMenu, value: valueProp, onValueChange, defaultValue, delayDuration = 200, skipDelayDuration = 300, orientation = "horizontal", dir, ...NavigationMenuProps } = props;
27442
- const [navigationMenu, setNavigationMenu] = $yHMN2$useState(null);
27443
- const composedRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
27444
- forwardedRef,
27445
- (node) => setNavigationMenu(node)
27446
- );
27447
- const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
27448
- const openTimerRef = $yHMN2$useRef(0);
27449
- const closeTimerRef = $yHMN2$useRef(0);
27450
- const skipDelayTimerRef = $yHMN2$useRef(0);
27451
- const [isOpenDelayed, setIsOpenDelayed] = $yHMN2$useState(true);
27452
- const [value1 = "", setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
27453
- prop: valueProp,
27454
- onChange: (value) => {
27455
- const isOpen = value !== "";
27456
- const hasSkipDelayDuration = skipDelayDuration > 0;
27457
- if (isOpen) {
27458
- window.clearTimeout(skipDelayTimerRef.current);
27459
- if (hasSkipDelayDuration) setIsOpenDelayed(false);
27460
- } else {
27461
- window.clearTimeout(skipDelayTimerRef.current);
27462
- skipDelayTimerRef.current = window.setTimeout(
27463
- () => setIsOpenDelayed(true),
27464
- skipDelayDuration
27465
- );
27466
- }
27467
- onValueChange === null || onValueChange === void 0 || onValueChange(value);
27468
- },
27469
- defaultProp: defaultValue
27470
- });
27471
- const startCloseTimer = $yHMN2$useCallback(() => {
27472
- window.clearTimeout(closeTimerRef.current);
27473
- closeTimerRef.current = window.setTimeout(
27474
- () => setValue(""),
27475
- 150
27476
- );
27477
- }, [
27478
- setValue
27479
- ]);
27480
- const handleOpen = $yHMN2$useCallback((itemValue) => {
27481
- window.clearTimeout(closeTimerRef.current);
27482
- setValue(itemValue);
27483
- }, [
27484
- setValue
27485
- ]);
27486
- const handleDelayedOpen = $yHMN2$useCallback((itemValue) => {
27487
- const isOpenItem = value1 === itemValue;
27488
- if (isOpenItem)
27489
- window.clearTimeout(closeTimerRef.current);
27490
- else openTimerRef.current = window.setTimeout(() => {
27491
- window.clearTimeout(closeTimerRef.current);
27492
- setValue(itemValue);
27493
- }, delayDuration);
27494
- }, [
27495
- value1,
27496
- setValue,
27497
- delayDuration
27498
- ]);
27499
- $yHMN2$useEffect(() => {
27500
- return () => {
27501
- window.clearTimeout(openTimerRef.current);
27502
- window.clearTimeout(closeTimerRef.current);
27503
- window.clearTimeout(skipDelayTimerRef.current);
27504
- };
27505
- }, []);
27506
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProvider, {
27507
- scope: __scopeNavigationMenu,
27508
- isRootMenu: true,
27509
- value: value1,
27510
- dir: direction,
27511
- orientation,
27512
- rootNavigationMenu: navigationMenu,
27513
- onTriggerEnter: (itemValue) => {
27514
- window.clearTimeout(openTimerRef.current);
27515
- if (isOpenDelayed) handleDelayedOpen(itemValue);
27516
- else handleOpen(itemValue);
27517
- },
27518
- onTriggerLeave: () => {
27519
- window.clearTimeout(openTimerRef.current);
27520
- startCloseTimer();
27521
- },
27522
- onContentEnter: () => window.clearTimeout(closeTimerRef.current),
27523
- onContentLeave: startCloseTimer,
27524
- onItemSelect: (itemValue) => {
27525
- setValue(
27526
- (prevValue) => prevValue === itemValue ? "" : itemValue
27527
- );
27528
- },
27529
- onItemDismiss: () => setValue("")
27530
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.nav, _extends({
27531
- "aria-label": "Main",
27532
- "data-orientation": orientation,
27533
- dir: direction
27534
- }, NavigationMenuProps, {
27535
- ref: composedRef
27536
- })));
27537
- });
27538
- var $322c88a641701f3b$var$NavigationMenuProvider = (props) => {
27539
- const { scope, isRootMenu, rootNavigationMenu, dir, orientation, children, value, onItemSelect, onItemDismiss, onTriggerEnter, onTriggerLeave, onContentEnter, onContentLeave } = props;
27540
- const [viewport, setViewport] = $yHMN2$useState(null);
27541
- const [viewportContent, setViewportContent] = $yHMN2$useState(/* @__PURE__ */ new Map());
27542
- const [indicatorTrack, setIndicatorTrack] = $yHMN2$useState(null);
27543
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProviderImpl, {
27544
- scope,
27545
- isRootMenu,
27546
- rootNavigationMenu,
27547
- value,
27548
- previousValue: $010c2913dbd2fe3d$export$5cae361ad82dce8b(value),
27549
- baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
27550
- dir,
27551
- orientation,
27552
- viewport,
27553
- onViewportChange: setViewport,
27554
- indicatorTrack,
27555
- onIndicatorTrackChange: setIndicatorTrack,
27556
- onTriggerEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerEnter),
27557
- onTriggerLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerLeave),
27558
- onContentEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentEnter),
27559
- onContentLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentLeave),
27560
- onItemSelect: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemSelect),
27561
- onItemDismiss: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemDismiss),
27562
- onViewportContentChange: $yHMN2$useCallback((contentValue, contentData) => {
27563
- setViewportContent((prevContent) => {
27564
- prevContent.set(contentValue, contentData);
27565
- return new Map(prevContent);
27566
- });
27567
- }, []),
27568
- onViewportContentRemove: $yHMN2$useCallback((contentValue) => {
27569
- setViewportContent((prevContent) => {
27570
- if (!prevContent.has(contentValue)) return prevContent;
27571
- prevContent.delete(contentValue);
27572
- return new Map(prevContent);
27573
- });
27574
- }, [])
27575
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Provider, {
27576
- scope
27577
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentProvider, {
27578
- scope,
27579
- items: viewportContent
27580
- }, children)));
27581
- };
27582
- var $322c88a641701f3b$var$LIST_NAME = "NavigationMenuList";
27583
- var $322c88a641701f3b$export$c361068a95fd2286 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27584
- const { __scopeNavigationMenu, ...listProps } = props;
27585
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$LIST_NAME, __scopeNavigationMenu);
27586
- const list = /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.ul, _extends({
27587
- "data-orientation": context.orientation
27588
- }, listProps, {
27589
- ref: forwardedRef
27590
- }));
27591
- return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, {
27592
- style: {
27593
- position: "relative"
27594
- },
27595
- ref: context.onIndicatorTrackChange
27596
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Slot, {
27597
- scope: __scopeNavigationMenu
27598
- }, context.isRootMenu ? /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
27599
- asChild: true
27600
- }, list) : list));
27601
- });
27602
- var $322c88a641701f3b$var$ITEM_NAME = "NavigationMenuItem";
27603
- var [$322c88a641701f3b$var$NavigationMenuItemContextProvider, $322c88a641701f3b$var$useNavigationMenuItemContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$ITEM_NAME);
27604
- var $322c88a641701f3b$export$ffdbb83a2de845c2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27605
- const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
27606
- const autoValue = $1746a345f3d73bb7$export$f680877a34711e37();
27607
- const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
27608
- const contentRef = $yHMN2$useRef(null);
27609
- const triggerRef = $yHMN2$useRef(null);
27610
- const focusProxyRef = $yHMN2$useRef(null);
27611
- const restoreContentTabOrderRef = $yHMN2$useRef(() => {
27612
- });
27613
- const wasEscapeCloseRef = $yHMN2$useRef(false);
27614
- const handleContentEntry = $yHMN2$useCallback((side = "start") => {
27615
- if (contentRef.current) {
27616
- restoreContentTabOrderRef.current();
27617
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
27618
- if (candidates.length) $322c88a641701f3b$var$focusFirst(side === "start" ? candidates : candidates.reverse());
27619
- }
27620
- }, []);
27621
- const handleContentExit = $yHMN2$useCallback(() => {
27622
- if (contentRef.current) {
27623
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
27624
- if (candidates.length) restoreContentTabOrderRef.current = $322c88a641701f3b$var$removeFromTabOrder(candidates);
27625
- }
27626
- }, []);
27627
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuItemContextProvider, {
27628
- scope: __scopeNavigationMenu,
27629
- value,
27630
- triggerRef,
27631
- contentRef,
27632
- focusProxyRef,
27633
- wasEscapeCloseRef,
27634
- onEntryKeyDown: handleContentEntry,
27635
- onFocusProxyEnter: handleContentEntry,
27636
- onRootContentClose: handleContentExit,
27637
- onContentFocusOutside: handleContentExit
27638
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.li, _extends({}, itemProps, {
27639
- ref: forwardedRef
27640
- })));
27641
- });
27642
- var $322c88a641701f3b$var$TRIGGER_NAME = "NavigationMenuTrigger";
27643
- var $322c88a641701f3b$export$37fe8002734d8f2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27644
- const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
27645
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
27646
- const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
27647
- const ref = $yHMN2$useRef(null);
27648
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, itemContext.triggerRef, forwardedRef);
27649
- const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, itemContext.value);
27650
- const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, itemContext.value);
27651
- const hasPointerMoveOpenedRef = $yHMN2$useRef(false);
27652
- const wasClickCloseRef = $yHMN2$useRef(false);
27653
- const open = itemContext.value === context.value;
27654
- return /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.ItemSlot, {
27655
- scope: __scopeNavigationMenu,
27656
- value: itemContext.value
27657
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
27658
- asChild: true
27659
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
27660
- id: triggerId,
27661
- disabled,
27662
- "data-disabled": disabled ? "" : void 0,
27663
- "data-state": $322c88a641701f3b$var$getOpenState(open),
27664
- "aria-expanded": open,
27665
- "aria-controls": contentId
27666
- }, triggerProps, {
27667
- ref: composedRefs,
27668
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, () => {
27669
- wasClickCloseRef.current = false;
27670
- itemContext.wasEscapeCloseRef.current = false;
27671
- }),
27672
- onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $322c88a641701f3b$var$whenMouse(() => {
27673
- if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) return;
27674
- context.onTriggerEnter(itemContext.value);
27675
- hasPointerMoveOpenedRef.current = true;
27676
- })),
27677
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(() => {
27678
- if (disabled) return;
27679
- context.onTriggerLeave();
27680
- hasPointerMoveOpenedRef.current = false;
27681
- })),
27682
- onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, () => {
27683
- context.onItemSelect(itemContext.value);
27684
- wasClickCloseRef.current = open;
27685
- }),
27686
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
27687
- const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
27688
- const entryKey = {
27689
- horizontal: "ArrowDown",
27690
- vertical: verticalEntryKey
27691
- }[context.orientation];
27692
- if (open && event.key === entryKey) {
27693
- itemContext.onEntryKeyDown();
27694
- event.preventDefault();
27695
- }
27696
- })
27697
- })))), open && /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
27698
- "aria-hidden": true,
27699
- tabIndex: 0,
27700
- ref: itemContext.focusProxyRef,
27701
- onFocus: (event) => {
27702
- const content = itemContext.contentRef.current;
27703
- const prevFocusedElement = event.relatedTarget;
27704
- const wasTriggerFocused = prevFocusedElement === ref.current;
27705
- const wasFocusFromContent = content === null || content === void 0 ? void 0 : content.contains(prevFocusedElement);
27706
- if (wasTriggerFocused || !wasFocusFromContent) itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end");
27707
- }
27708
- }), context.viewport && /* @__PURE__ */ $yHMN2$createElement("span", {
27709
- "aria-owns": contentId
27710
- })));
27711
- });
27712
- var $322c88a641701f3b$var$LINK_SELECT = "navigationMenu.linkSelect";
27713
- var $322c88a641701f3b$export$6893bf21536567da = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27714
- const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
27715
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
27716
- asChild: true
27717
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.a, _extends({
27718
- "data-active": active ? "" : void 0,
27719
- "aria-current": active ? "page" : void 0
27720
- }, linkProps, {
27721
- ref: forwardedRef,
27722
- onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event1) => {
27723
- const target = event1.target;
27724
- const linkSelectEvent = new CustomEvent($322c88a641701f3b$var$LINK_SELECT, {
27725
- bubbles: true,
27726
- cancelable: true
27727
- });
27728
- target.addEventListener(
27729
- $322c88a641701f3b$var$LINK_SELECT,
27730
- (event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
27731
- {
27732
- once: true
27733
- }
27734
- );
27735
- $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, linkSelectEvent);
27736
- if (!linkSelectEvent.defaultPrevented && !event1.metaKey) {
27737
- const rootContentDismissEvent = new CustomEvent($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
27738
- bubbles: true,
27739
- cancelable: true
27740
- });
27741
- $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, rootContentDismissEvent);
27742
- }
27743
- }, {
27744
- checkForDefaultPrevented: false
27745
- })
27746
- })));
27747
- });
27748
- var $322c88a641701f3b$var$INDICATOR_NAME = "NavigationMenuIndicator";
27749
- var $322c88a641701f3b$export$8ddb526647c0d8fb = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27750
- const { forceMount, ...indicatorProps } = props;
27751
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, props.__scopeNavigationMenu);
27752
- const isVisible = Boolean(context.value);
27753
- return context.indicatorTrack ? /* @__PURE__ */ $yHMN2$reactdom.createPortal(/* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
27754
- present: forceMount || isVisible
27755
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuIndicatorImpl, _extends({}, indicatorProps, {
27756
- ref: forwardedRef
27757
- }))), context.indicatorTrack) : null;
27758
- });
27759
- var $322c88a641701f3b$var$NavigationMenuIndicatorImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27760
- const { __scopeNavigationMenu, ...indicatorProps } = props;
27761
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, __scopeNavigationMenu);
27762
- const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
27763
- const [activeTrigger, setActiveTrigger] = $yHMN2$useState(null);
27764
- const [position, setPosition] = $yHMN2$useState(null);
27765
- const isHorizontal = context.orientation === "horizontal";
27766
- const isVisible = Boolean(context.value);
27767
- $yHMN2$useEffect(() => {
27768
- var _items$find;
27769
- const items = getItems();
27770
- const triggerNode = (_items$find = items.find(
27771
- (item) => item.value === context.value
27772
- )) === null || _items$find === void 0 ? void 0 : _items$find.ref.current;
27773
- if (triggerNode) setActiveTrigger(triggerNode);
27774
- }, [
27775
- getItems,
27776
- context.value
27777
- ]);
27778
- const handlePositionChange = () => {
27779
- if (activeTrigger) setPosition({
27780
- size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,
27781
- offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop
27782
- });
27783
- };
27784
- $322c88a641701f3b$var$useResizeObserver(activeTrigger, handlePositionChange);
27785
- $322c88a641701f3b$var$useResizeObserver(context.indicatorTrack, handlePositionChange);
27786
- return position ? /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
27787
- "aria-hidden": true,
27788
- "data-state": isVisible ? "visible" : "hidden",
27789
- "data-orientation": context.orientation
27790
- }, indicatorProps, {
27791
- ref: forwardedRef,
27792
- style: {
27793
- position: "absolute",
27794
- ...isHorizontal ? {
27795
- left: 0,
27796
- width: position.size + "px",
27797
- transform: `translateX(${position.offset}px)`
27798
- } : {
27799
- top: 0,
27800
- height: position.size + "px",
27801
- transform: `translateY(${position.offset}px)`
27802
- },
27803
- ...indicatorProps.style
27804
- }
27805
- })) : null;
27806
- });
27807
- var $322c88a641701f3b$var$CONTENT_NAME = "NavigationMenuContent";
27808
- var $322c88a641701f3b$export$38e00e996c2f93f7 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27809
- const { forceMount, ...contentProps } = props;
27810
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27811
- const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27812
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(itemContext.contentRef, forwardedRef);
27813
- const open = itemContext.value === context.value;
27814
- const commonProps = {
27815
- value: itemContext.value,
27816
- triggerRef: itemContext.triggerRef,
27817
- focusProxyRef: itemContext.focusProxyRef,
27818
- wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
27819
- onContentFocusOutside: itemContext.onContentFocusOutside,
27820
- onRootContentClose: itemContext.onRootContentClose,
27821
- ...contentProps
27822
- };
27823
- return !context.viewport ? /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
27824
- present: forceMount || open
27825
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({
27826
- "data-state": $322c88a641701f3b$var$getOpenState(open)
27827
- }, commonProps, {
27828
- ref: composedRefs,
27829
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, context.onContentEnter),
27830
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave)),
27831
- style: {
27832
- // Prevent interaction when animating out
27833
- pointerEvents: !open && context.isRootMenu ? "none" : void 0,
27834
- ...commonProps.style
27835
- }
27836
- }))) : /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentMounter, _extends({
27837
- forceMount
27838
- }, commonProps, {
27839
- ref: composedRefs
27840
- }));
27841
- });
27842
- var $322c88a641701f3b$var$ViewportContentMounter = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27843
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27844
- const { onViewportContentChange, onViewportContentRemove } = context;
27845
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
27846
- onViewportContentChange(props.value, {
27847
- ref: forwardedRef,
27848
- ...props
27849
- });
27850
- }, [
27851
- props,
27852
- forwardedRef,
27853
- onViewportContentChange
27854
- ]);
27855
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
27856
- return () => onViewportContentRemove(props.value);
27857
- }, [
27858
- props.value,
27859
- onViewportContentRemove
27860
- ]);
27861
- return null;
27862
- });
27863
- var $322c88a641701f3b$var$ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
27864
- var $322c88a641701f3b$var$NavigationMenuContentImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27865
- const { __scopeNavigationMenu, value, triggerRef, focusProxyRef, wasEscapeCloseRef, onRootContentClose, onContentFocusOutside, ...contentProps } = props;
27866
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, __scopeNavigationMenu);
27867
- const ref = $yHMN2$useRef(null);
27868
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, forwardedRef);
27869
- const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, value);
27870
- const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, value);
27871
- const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
27872
- const prevMotionAttributeRef = $yHMN2$useRef(null);
27873
- const { onItemDismiss } = context;
27874
- $yHMN2$useEffect(() => {
27875
- const content = ref.current;
27876
- if (context.isRootMenu && content) {
27877
- const handleClose = () => {
27878
- var _triggerRef$current;
27879
- onItemDismiss();
27880
- onRootContentClose();
27881
- if (content.contains(document.activeElement)) (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
27882
- };
27883
- content.addEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
27884
- return () => content.removeEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
27885
- }
27886
- }, [
27887
- context.isRootMenu,
27888
- props.value,
27889
- triggerRef,
27890
- onItemDismiss,
27891
- onRootContentClose
27892
- ]);
27893
- const motionAttribute = $yHMN2$useMemo(() => {
27894
- const items = getItems();
27895
- const values = items.map(
27896
- (item) => item.value
27897
- );
27898
- if (context.dir === "rtl") values.reverse();
27899
- const index = values.indexOf(context.value);
27900
- const prevIndex = values.indexOf(context.previousValue);
27901
- const isSelected = value === context.value;
27902
- const wasSelected = prevIndex === values.indexOf(value);
27903
- if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;
27904
- const attribute = (() => {
27905
- if (index !== prevIndex) {
27906
- if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start";
27907
- if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end";
27908
- }
27909
- return null;
27910
- })();
27911
- prevMotionAttributeRef.current = attribute;
27912
- return attribute;
27913
- }, [
27914
- context.previousValue,
27915
- context.value,
27916
- context.dir,
27917
- getItems,
27918
- value
27919
- ]);
27920
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
27921
- asChild: true
27922
- }, /* @__PURE__ */ $yHMN2$createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
27923
- id: contentId,
27924
- "aria-labelledby": triggerId,
27925
- "data-motion": motionAttribute,
27926
- "data-orientation": context.orientation
27927
- }, contentProps, {
27928
- ref: composedRefs,
27929
- onDismiss: () => {
27930
- var _ref$current;
27931
- const rootContentDismissEvent = new Event($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
27932
- bubbles: true,
27933
- cancelable: true
27934
- });
27935
- (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.dispatchEvent(rootContentDismissEvent);
27936
- },
27937
- onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event) => {
27938
- var _context$rootNavigati;
27939
- onContentFocusOutside();
27940
- const target = event.target;
27941
- if ((_context$rootNavigati = context.rootNavigationMenu) !== null && _context$rootNavigati !== void 0 && _context$rootNavigati.contains(target)) event.preventDefault();
27942
- }),
27943
- onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event) => {
27944
- var _context$viewport;
27945
- const target = event.target;
27946
- const isTrigger = getItems().some((item) => {
27947
- var _item$ref$current;
27948
- return (_item$ref$current = item.ref.current) === null || _item$ref$current === void 0 ? void 0 : _item$ref$current.contains(target);
27949
- });
27950
- const isRootViewport = context.isRootMenu && ((_context$viewport = context.viewport) === null || _context$viewport === void 0 ? void 0 : _context$viewport.contains(target));
27951
- if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();
27952
- }),
27953
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
27954
- const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
27955
- const isTabKey = event.key === "Tab" && !isMetaKey;
27956
- if (isTabKey) {
27957
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(event.currentTarget);
27958
- const focusedElement = document.activeElement;
27959
- const index = candidates.findIndex(
27960
- (candidate) => candidate === focusedElement
27961
- );
27962
- const isMovingBackwards = event.shiftKey;
27963
- const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);
27964
- if ($322c88a641701f3b$var$focusFirst(nextCandidates))
27965
- event.preventDefault();
27966
- else {
27967
- var _focusProxyRef$curren;
27968
- (_focusProxyRef$curren = focusProxyRef.current) === null || _focusProxyRef$curren === void 0 || _focusProxyRef$curren.focus();
27969
- }
27970
- }
27971
- }),
27972
- onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onEscapeKeyDown, (event) => {
27973
- wasEscapeCloseRef.current = true;
27974
- })
27975
- })));
27976
- });
27977
- var $322c88a641701f3b$var$VIEWPORT_NAME = "NavigationMenuViewport";
27978
- var $322c88a641701f3b$export$ee880b97cc6d44a5 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27979
- const { forceMount, ...viewportProps } = props;
27980
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, props.__scopeNavigationMenu);
27981
- const open = Boolean(context.value);
27982
- return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
27983
- present: forceMount || open
27984
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuViewportImpl, _extends({}, viewportProps, {
27985
- ref: forwardedRef
27986
- })));
27987
- });
27988
- var $322c88a641701f3b$var$NavigationMenuViewportImpl = /* @__PURE__ */ $yHMN2$forwardRef((props1, forwardedRef) => {
27989
- const { __scopeNavigationMenu, children, ...viewportImplProps } = props1;
27990
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, __scopeNavigationMenu);
27991
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onViewportChange);
27992
- const viewportContentContext = $322c88a641701f3b$var$useViewportContentContext($322c88a641701f3b$var$CONTENT_NAME, props1.__scopeNavigationMenu);
27993
- const [size, setSize] = $yHMN2$useState(null);
27994
- const [content, setContent] = $yHMN2$useState(null);
27995
- const viewportWidth = size ? (size === null || size === void 0 ? void 0 : size.width) + "px" : void 0;
27996
- const viewportHeight = size ? (size === null || size === void 0 ? void 0 : size.height) + "px" : void 0;
27997
- const open = Boolean(context.value);
27998
- const activeContentValue = open ? context.value : context.previousValue;
27999
- const handleSizeChange = () => {
28000
- if (content) setSize({
28001
- width: content.offsetWidth,
28002
- height: content.offsetHeight
28003
- });
28004
- };
28005
- $322c88a641701f3b$var$useResizeObserver(content, handleSizeChange);
28006
- return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
28007
- "data-state": $322c88a641701f3b$var$getOpenState(open),
28008
- "data-orientation": context.orientation
28009
- }, viewportImplProps, {
28010
- ref: composedRefs,
28011
- style: {
28012
- // Prevent interaction when animating out
28013
- pointerEvents: !open && context.isRootMenu ? "none" : void 0,
28014
- ["--radix-navigation-menu-viewport-width"]: viewportWidth,
28015
- ["--radix-navigation-menu-viewport-height"]: viewportHeight,
28016
- ...viewportImplProps.style
28017
- },
28018
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerEnter, context.onContentEnter),
28019
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave))
28020
- }), Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {
28021
- const isActive = activeContentValue === value;
28022
- return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
28023
- key: value,
28024
- present: forceMount || isActive
28025
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({}, props, {
28026
- ref: $6ed0406888f73fc4$export$43e446d32b3d21af(ref, (node) => {
28027
- if (isActive && node) setContent(node);
28028
- })
28029
- })));
28030
- }));
28031
- });
28032
- var $322c88a641701f3b$var$FOCUS_GROUP_NAME = "FocusGroup";
28033
- var $322c88a641701f3b$var$FocusGroup = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
28034
- const { __scopeNavigationMenu, ...groupProps } = props;
28035
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_NAME, __scopeNavigationMenu);
28036
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Provider, {
28037
- scope: __scopeNavigationMenu
28038
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Slot, {
28039
- scope: __scopeNavigationMenu
28040
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
28041
- dir: context.dir
28042
- }, groupProps, {
28043
- ref: forwardedRef
28044
- }))));
28045
- });
28046
- var $322c88a641701f3b$var$ARROW_KEYS = [
28047
- "ArrowRight",
28048
- "ArrowLeft",
28049
- "ArrowUp",
28050
- "ArrowDown"
28051
- ];
28052
- var $322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
28053
- var $322c88a641701f3b$var$FocusGroupItem = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
28054
- const { __scopeNavigationMenu, ...groupProps } = props;
28055
- const getItems = $322c88a641701f3b$var$useFocusGroupCollection(__scopeNavigationMenu);
28056
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
28057
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.ItemSlot, {
28058
- scope: __scopeNavigationMenu
28059
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({}, groupProps, {
28060
- ref: forwardedRef,
28061
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
28062
- const isFocusNavigationKey = [
28063
- "Home",
28064
- "End",
28065
- ...$322c88a641701f3b$var$ARROW_KEYS
28066
- ].includes(event.key);
28067
- if (isFocusNavigationKey) {
28068
- let candidateNodes = getItems().map(
28069
- (item) => item.ref.current
28070
- );
28071
- const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
28072
- const prevKeys = [
28073
- prevItemKey,
28074
- "ArrowUp",
28075
- "End"
28076
- ];
28077
- if (prevKeys.includes(event.key)) candidateNodes.reverse();
28078
- if ($322c88a641701f3b$var$ARROW_KEYS.includes(event.key)) {
28079
- const currentIndex = candidateNodes.indexOf(event.currentTarget);
28080
- candidateNodes = candidateNodes.slice(currentIndex + 1);
28081
- }
28082
- setTimeout(
28083
- () => $322c88a641701f3b$var$focusFirst(candidateNodes)
28084
- );
28085
- event.preventDefault();
28086
- }
28087
- })
28088
- })));
28089
- });
28090
- function $322c88a641701f3b$var$getTabbableCandidates(container) {
28091
- const nodes = [];
28092
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
28093
- acceptNode: (node) => {
28094
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
28095
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
28096
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
28097
- }
28098
- });
28099
- while (walker.nextNode()) nodes.push(walker.currentNode);
28100
- return nodes;
28101
- }
28102
- function $322c88a641701f3b$var$focusFirst(candidates) {
28103
- const previouslyFocusedElement = document.activeElement;
28104
- return candidates.some((candidate) => {
28105
- if (candidate === previouslyFocusedElement) return true;
28106
- candidate.focus();
28107
- return document.activeElement !== previouslyFocusedElement;
28108
- });
28109
- }
28110
- function $322c88a641701f3b$var$removeFromTabOrder(candidates) {
28111
- candidates.forEach((candidate) => {
28112
- candidate.dataset.tabindex = candidate.getAttribute("tabindex") || "";
28113
- candidate.setAttribute("tabindex", "-1");
28114
- });
28115
- return () => {
28116
- candidates.forEach((candidate) => {
28117
- const prevTabIndex = candidate.dataset.tabindex;
28118
- candidate.setAttribute("tabindex", prevTabIndex);
28119
- });
28120
- };
28121
- }
28122
- function $322c88a641701f3b$var$useResizeObserver(element, onResize) {
28123
- const handleResize = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onResize);
28124
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
28125
- let rAF = 0;
28126
- if (element) {
28127
- const resizeObserver = new ResizeObserver(() => {
28128
- cancelAnimationFrame(rAF);
28129
- rAF = window.requestAnimationFrame(handleResize);
28130
- });
28131
- resizeObserver.observe(element);
28132
- return () => {
28133
- window.cancelAnimationFrame(rAF);
28134
- resizeObserver.unobserve(element);
28135
- };
28136
- }
28137
- }, [
28138
- element,
28139
- handleResize
28140
- ]);
28141
- }
28142
- function $322c88a641701f3b$var$getOpenState(open) {
28143
- return open ? "open" : "closed";
28144
- }
28145
- function $322c88a641701f3b$var$makeTriggerId(baseId, value) {
28146
- return `${baseId}-trigger-${value}`;
28147
- }
28148
- function $322c88a641701f3b$var$makeContentId(baseId, value) {
28149
- return `${baseId}-content-${value}`;
28150
- }
28151
- function $322c88a641701f3b$var$whenMouse(handler) {
28152
- return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
28153
- }
28154
- var $322c88a641701f3b$export$be92b6f5f03c0fe9 = $322c88a641701f3b$export$5b2278cf1e8bcae2;
28155
- var $322c88a641701f3b$export$54c2e3dc7acea9f5 = $322c88a641701f3b$export$c361068a95fd2286;
28156
- var $322c88a641701f3b$export$6d08773d2e66f8f2 = $322c88a641701f3b$export$ffdbb83a2de845c2;
28157
- var $322c88a641701f3b$export$41fb9f06171c75f4 = $322c88a641701f3b$export$37fe8002734d8f2;
28158
- var $322c88a641701f3b$export$a6c7ac8248d6e38a = $322c88a641701f3b$export$6893bf21536567da;
28159
- var $322c88a641701f3b$export$adb584737d712b70 = $322c88a641701f3b$export$8ddb526647c0d8fb;
28160
- var $322c88a641701f3b$export$7c6e2c02157bb7d2 = $322c88a641701f3b$export$38e00e996c2f93f7;
28161
- var $322c88a641701f3b$export$d5c6c08dc2d3ca7 = $322c88a641701f3b$export$ee880b97cc6d44a5;
28162
-
28163
27207
  // src/components/NavigationMenu.tsx
28164
27208
  var import_classnames33 = __toESM(require_classnames());
28165
27209
 
27210
+ // src/components/hooks/useNavigationMenu.ts
27211
+ var initialState3 = { activeMenu: null };
27212
+ var store3 = create(() => ({ ...initialState3 }));
27213
+ function setActiveMenu(activeMenu) {
27214
+ store3.setState({ activeMenu });
27215
+ }
27216
+ var useNavigationMenu = store3;
27217
+
28166
27218
  // src/components/NavigationMenu.module.css
28167
27219
  var NavigationMenu_default = {
28168
- root: "NavigationMenu_root",
28169
- list: "NavigationMenu_list",
28170
- trigger: "NavigationMenu_trigger",
28171
- link: "NavigationMenu_link",
28172
- content: "NavigationMenu_content",
28173
- enterFromLeft: "NavigationMenu_enterFromLeft",
28174
- enterFromRight: "NavigationMenu_enterFromRight",
28175
- exitToLeft: "NavigationMenu_exitToLeft",
28176
- exitToRight: "NavigationMenu_exitToRight",
28177
- indicator: "NavigationMenu_indicator",
28178
- fadeIn: "NavigationMenu_fadeIn",
28179
- fadeOut: "NavigationMenu_fadeOut",
28180
- viewport: "NavigationMenu_viewport",
28181
- scaleIn: "NavigationMenu_scaleIn",
28182
- scaleOut: "NavigationMenu_scaleOut",
28183
- wrapper: "NavigationMenu_wrapper",
28184
- arrow: "NavigationMenu_arrow"
27220
+ nav: "NavigationMenu_nav",
27221
+ item: "NavigationMenu_item",
27222
+ icon: "NavigationMenu_icon"
28185
27223
  };
28186
27224
 
28187
27225
  // src/components/NavigationMenu.tsx
28188
27226
  import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
28189
- function NavigationMenu({ showArrow = true, children, ...props }) {
28190
- return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$be92b6f5f03c0fe9, { ...props, className: NavigationMenu_default.root, children: [
28191
- /* @__PURE__ */ jsxs22($322c88a641701f3b$export$54c2e3dc7acea9f5, { className: NavigationMenu_default.list, children: [
28192
- children,
28193
- showArrow && /* @__PURE__ */ jsx39($322c88a641701f3b$export$adb584737d712b70, { className: NavigationMenu_default.indicator, children: /* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.arrow }) })
28194
- ] }),
28195
- /* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.wrapper, children: /* @__PURE__ */ jsx39($322c88a641701f3b$export$d5c6c08dc2d3ca7, { className: NavigationMenu_default.viewport }) })
28196
- ] });
28197
- }
28198
- function NavigationMenuItem({ children, className, ...props }) {
28199
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$6d08773d2e66f8f2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
28200
- }
28201
- function NavigationMenuTrigger({
28202
- children,
27227
+ function NavigationMenu({
27228
+ showArrow = true,
28203
27229
  className,
27230
+ children,
28204
27231
  ...props
28205
27232
  }) {
28206
- return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$41fb9f06171c75f4, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.trigger, className), children: [
28207
- children,
28208
- /* @__PURE__ */ jsx39(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx39(Icons.Chevron, {}) })
28209
- ] });
27233
+ return /* @__PURE__ */ jsx39("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.nav, className), children });
28210
27234
  }
28211
- function NavigationMenuContent({
27235
+ function NavigationMenuItem({
27236
+ label,
28212
27237
  children,
28213
27238
  className,
28214
27239
  ...props
28215
27240
  }) {
28216
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$7c6e2c02157bb7d2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.content, className), children });
28217
- }
28218
- function NavigationMenuLink({ children, className, ...props }) {
28219
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$a6c7ac8248d6e38a, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.link, className), children });
27241
+ const { activeMenu } = useNavigationMenu();
27242
+ if (label) {
27243
+ return /* @__PURE__ */ jsxs22(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
27244
+ /* @__PURE__ */ jsxs22("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children: [
27245
+ /* @__PURE__ */ jsx39(Text, { children: label }),
27246
+ /* @__PURE__ */ jsx39(Icon, { rotate: 90, size: "xs", className: NavigationMenu_default.icon, children: /* @__PURE__ */ jsx39(Icons.Chevron, {}) })
27247
+ ] }),
27248
+ children
27249
+ ] });
27250
+ }
27251
+ return /* @__PURE__ */ jsx39("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
28220
27252
  }
28221
27253
 
28222
27254
  // src/components/PasswordField.tsx
28223
- import { useState as useState8, forwardRef as forwardRef4 } from "react";
27255
+ import { useState as useState8, forwardRef as forwardRef5 } from "react";
28224
27256
  var import_classnames34 = __toESM(require_classnames());
28225
27257
 
28226
27258
  // src/components/PasswordField.module.css
@@ -28230,7 +27262,7 @@ var PasswordField_default = {
28230
27262
 
28231
27263
  // src/components/PasswordField.tsx
28232
27264
  import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
28233
- var PasswordField = forwardRef4(
27265
+ var PasswordField = forwardRef5(
28234
27266
  ({ label, className, ...props }, ref) => {
28235
27267
  const [show, setShow] = useState8(false);
28236
27268
  const type = show ? "text" : "password";
@@ -28271,10 +27303,10 @@ var ProgressBar_default = {
28271
27303
  };
28272
27304
 
28273
27305
  // src/components/ProgressBar.tsx
28274
- import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
27306
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
28275
27307
  function ProgressBar({ className, showValue, ...props }) {
28276
27308
  return /* @__PURE__ */ jsx42($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames36.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
28277
- return /* @__PURE__ */ jsxs24(Fragment5, { children: [
27309
+ return /* @__PURE__ */ jsxs24(Fragment6, { children: [
28278
27310
  /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
28279
27311
  showValue && /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.value, children: valueText })
28280
27312
  ] });
@@ -28293,13 +27325,13 @@ var ProgressCircle_default = {
28293
27325
  };
28294
27326
 
28295
27327
  // src/components/ProgressCircle.tsx
28296
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
27328
+ import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
28297
27329
  function ProgressCircle({ className, showValue, ...props }) {
28298
27330
  return /* @__PURE__ */ jsx43($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames37.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
28299
27331
  const radius = 45;
28300
27332
  const circumference = radius * 2 * Math.PI;
28301
27333
  const offset = circumference - percentage / 100 * circumference;
28302
- return /* @__PURE__ */ jsxs25(Fragment6, { children: [
27334
+ return /* @__PURE__ */ jsxs25(Fragment7, { children: [
28303
27335
  /* @__PURE__ */ jsxs25("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
28304
27336
  /* @__PURE__ */ jsx43("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
28305
27337
  /* @__PURE__ */ jsx43(
@@ -28320,7 +27352,7 @@ function ProgressCircle({ className, showValue, ...props }) {
28320
27352
  }
28321
27353
 
28322
27354
  // src/components/RadioGroup.tsx
28323
- import { forwardRef as forwardRef5 } from "react";
27355
+ import { forwardRef as forwardRef6 } from "react";
28324
27356
  var import_classnames38 = __toESM(require_classnames());
28325
27357
 
28326
27358
  // src/components/RadioGroup.module.css
@@ -28331,7 +27363,7 @@ var RadioGroup_default = {
28331
27363
 
28332
27364
  // src/components/RadioGroup.tsx
28333
27365
  import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
28334
- var RadioGroup = forwardRef5(
27366
+ var RadioGroup = forwardRef6(
28335
27367
  ({ label, children, className, ...props }, ref) => {
28336
27368
  return /* @__PURE__ */ jsxs26($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames38.default)(RadioGroup_default.radiogroup, className), children: [
28337
27369
  label && /* @__PURE__ */ jsx44(Label, { children: label }),
@@ -28344,7 +27376,7 @@ function Radio({ children, className, ...props }) {
28344
27376
  }
28345
27377
 
28346
27378
  // src/components/SearchField.tsx
28347
- import { useState as useState9, useEffect as useEffect4, forwardRef as forwardRef6 } from "react";
27379
+ import { useState as useState9, useEffect as useEffect5, forwardRef as forwardRef7 } from "react";
28348
27380
  var import_classnames39 = __toESM(require_classnames());
28349
27381
 
28350
27382
  // src/components/SearchField.module.css
@@ -28355,8 +27387,8 @@ var SearchField_default = {
28355
27387
  };
28356
27388
 
28357
27389
  // src/components/SearchField.tsx
28358
- import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
28359
- var SearchField = forwardRef6(
27390
+ import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
27391
+ var SearchField = forwardRef7(
28360
27392
  ({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
28361
27393
  const [search, setSearch] = useState9(value ?? "");
28362
27394
  const searchValue = useDebounce(search, delay);
@@ -28371,13 +27403,13 @@ var SearchField = forwardRef6(
28371
27403
  setSearch("");
28372
27404
  onSearch?.("");
28373
27405
  };
28374
- useEffect4(() => {
27406
+ useEffect5(() => {
28375
27407
  if (delay > 0) {
28376
27408
  onSearch?.(searchValue);
28377
27409
  }
28378
27410
  }, [searchValue, delay, onSearch]);
28379
27411
  return /* @__PURE__ */ jsx45($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames39.default)(Input_default.field, className), children: ({ state }) => {
28380
- return /* @__PURE__ */ jsxs27(Fragment7, { children: [
27412
+ return /* @__PURE__ */ jsxs27(Fragment8, { children: [
28381
27413
  label && /* @__PURE__ */ jsx45(Label, { children: label }),
28382
27414
  /* @__PURE__ */ jsxs27("div", { className: Input_default.row, children: [
28383
27415
  /* @__PURE__ */ jsx45(Icons.MagnifyingGlass, { className: (0, import_classnames39.default)(SearchField_default.search, Input_default.icon) }),
@@ -28404,7 +27436,7 @@ var SearchField = forwardRef6(
28404
27436
 
28405
27437
  // src/components/Select.tsx
28406
27438
  var import_classnames40 = __toESM(require_classnames());
28407
- import { forwardRef as forwardRef7 } from "react";
27439
+ import { forwardRef as forwardRef8 } from "react";
28408
27440
 
28409
27441
  // src/components/Select.module.css
28410
27442
  var Select_default = {
@@ -28416,7 +27448,7 @@ var Select_default = {
28416
27448
 
28417
27449
  // src/components/Select.tsx
28418
27450
  import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
28419
- var Select = forwardRef7(
27451
+ var Select = forwardRef8(
28420
27452
  ({
28421
27453
  children,
28422
27454
  items = [],
@@ -28452,7 +27484,7 @@ var Select = forwardRef7(
28452
27484
  );
28453
27485
 
28454
27486
  // src/components/Slider.tsx
28455
- import { forwardRef as forwardRef8 } from "react";
27487
+ import { forwardRef as forwardRef9 } from "react";
28456
27488
  var import_classnames41 = __toESM(require_classnames());
28457
27489
 
28458
27490
  // src/components/Slider.module.css
@@ -28465,8 +27497,8 @@ var Slider_default = {
28465
27497
  };
28466
27498
 
28467
27499
  // src/components/Slider.tsx
28468
- import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
28469
- var Slider = forwardRef8(
27500
+ import { Fragment as Fragment9, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
27501
+ var Slider = forwardRef9(
28470
27502
  ({ className, showValue = true, label, ...props }, ref) => {
28471
27503
  return /* @__PURE__ */ jsxs29($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames41.default)(Slider_default.slider, className), children: [
28472
27504
  /* @__PURE__ */ jsxs29("div", { className: Slider_default.header, children: [
@@ -28475,7 +27507,7 @@ var Slider = forwardRef8(
28475
27507
  ] }),
28476
27508
  /* @__PURE__ */ jsx47($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
28477
27509
  const isHorizontal = state.orientation === "horizontal";
28478
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
27510
+ return /* @__PURE__ */ jsxs29(Fragment9, { children: [
28479
27511
  /* @__PURE__ */ jsx47(
28480
27512
  "div",
28481
27513
  {
@@ -28524,7 +27556,7 @@ function StatusLight(props) {
28524
27556
  }
28525
27557
 
28526
27558
  // src/components/Switch.tsx
28527
- import { forwardRef as forwardRef9 } from "react";
27559
+ import { forwardRef as forwardRef10 } from "react";
28528
27560
  var import_classnames43 = __toESM(require_classnames());
28529
27561
 
28530
27562
  // src/components/Switch.module.css
@@ -28535,11 +27567,11 @@ var Switch_default = {
28535
27567
  };
28536
27568
 
28537
27569
  // src/components/Switch.tsx
28538
- import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
28539
- var Switch = forwardRef9(
27570
+ import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
27571
+ var Switch = forwardRef10(
28540
27572
  ({ label, children, className, ...props }, ref) => {
28541
27573
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
28542
- return /* @__PURE__ */ jsxs31(Fragment9, { children: [
27574
+ return /* @__PURE__ */ jsxs31(Fragment10, { children: [
28543
27575
  label && /* @__PURE__ */ jsx49(Label, { children: label }),
28544
27576
  /* @__PURE__ */ jsxs31(
28545
27577
  $8e59e948500a8fe1$export$b5d5cf8927ab7262,
@@ -28599,7 +27631,7 @@ function TextOverflow({ asChild, children, className, ...props }) {
28599
27631
 
28600
27632
  // src/components/TextArea.tsx
28601
27633
  var import_classnames45 = __toESM(require_classnames());
28602
- import { forwardRef as forwardRef10 } from "react";
27634
+ import { forwardRef as forwardRef11 } from "react";
28603
27635
 
28604
27636
  // src/components/TextArea.module.css
28605
27637
  var TextArea_default = {
@@ -28611,7 +27643,7 @@ var TextArea_default = {
28611
27643
 
28612
27644
  // src/components/TextArea.tsx
28613
27645
  import { jsx as jsx52 } from "react/jsx-runtime";
28614
- var TextArea = forwardRef10(({ resize, className, ...props }, ref) => {
27646
+ var TextArea = forwardRef11(({ resize, className, ...props }, ref) => {
28615
27647
  return /* @__PURE__ */ jsx52(
28616
27648
  TextField,
28617
27649
  {
@@ -28723,7 +27755,7 @@ function composeContextScopes(...scopes) {
28723
27755
 
28724
27756
  // node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.mjs
28725
27757
  import * as React7 from "react";
28726
- import { Fragment as Fragment10, jsx as jsx54 } from "react/jsx-runtime";
27758
+ import { Fragment as Fragment11, jsx as jsx54 } from "react/jsx-runtime";
28727
27759
  var Slot = React7.forwardRef((props, forwardedRef) => {
28728
27760
  const { children, ...slotProps } = props;
28729
27761
  const childrenArray = React7.Children.toArray(children);
@@ -28757,7 +27789,7 @@ var SlotClone = React7.forwardRef((props, forwardedRef) => {
28757
27789
  });
28758
27790
  SlotClone.displayName = "SlotClone";
28759
27791
  var Slottable = ({ children }) => {
28760
- return /* @__PURE__ */ jsx54(Fragment10, { children });
27792
+ return /* @__PURE__ */ jsx54(Fragment11, { children });
28761
27793
  };
28762
27794
  function isSlottable(child) {
28763
27795
  return React7.isValidElement(child) && child.type === Slottable;
@@ -29160,11 +28192,11 @@ Portal.displayName = PORTAL_NAME;
29160
28192
  import * as React22 from "react";
29161
28193
  import * as ReactDOM3 from "react-dom";
29162
28194
  import * as React15 from "react";
29163
- function useStateMachine(initialState3, machine) {
28195
+ function useStateMachine(initialState4, machine) {
29164
28196
  return React15.useReducer((state, event) => {
29165
28197
  const nextState = machine[state][event];
29166
28198
  return nextState ?? state;
29167
- }, initialState3);
28199
+ }, initialState4);
29168
28200
  }
29169
28201
  var Presence = (props) => {
29170
28202
  const { present, children } = props;
@@ -29180,8 +28212,8 @@ function usePresence(present) {
29180
28212
  const stylesRef = React22.useRef({});
29181
28213
  const prevPresentRef = React22.useRef(present);
29182
28214
  const prevAnimationNameRef = React22.useRef("none");
29183
- const initialState3 = present ? "mounted" : "unmounted";
29184
- const [state, send] = useStateMachine(initialState3, {
28215
+ const initialState4 = present ? "mounted" : "unmounted";
28216
+ const [state, send] = useStateMachine(initialState4, {
29185
28217
  mounted: {
29186
28218
  UNMOUNT: "unmounted",
29187
28219
  ANIMATION_OUT: "unmountSuspended"
@@ -29346,7 +28378,7 @@ var VisuallyHidden = React17.forwardRef(
29346
28378
  VisuallyHidden.displayName = NAME;
29347
28379
 
29348
28380
  // node_modules/@radix-ui/react-toast/dist/index.mjs
29349
- import { Fragment as Fragment11, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
28381
+ import { Fragment as Fragment12, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
29350
28382
  var PROVIDER_NAME = "ToastProvider";
29351
28383
  var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
29352
28384
  var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
@@ -29692,7 +28724,7 @@ var ToastImpl = React18.forwardRef(
29692
28724
  return node ? getAnnounceTextContent(node) : null;
29693
28725
  }, [node]);
29694
28726
  if (!context.viewport) return null;
29695
- return /* @__PURE__ */ jsxs32(Fragment11, { children: [
28727
+ return /* @__PURE__ */ jsxs32(Fragment12, { children: [
29696
28728
  announceTextContent && /* @__PURE__ */ jsx60(
29697
28729
  ToastAnnounce,
29698
28730
  {
@@ -29812,7 +28844,7 @@ var ToastAnnounce = (props) => {
29812
28844
  const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
29813
28845
  return () => window.clearTimeout(timer);
29814
28846
  }, []);
29815
- return isAnnounced ? null : /* @__PURE__ */ jsx60(Portal, { asChild: true, children: /* @__PURE__ */ jsx60(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs32(Fragment11, { children: [
28847
+ return isAnnounced ? null : /* @__PURE__ */ jsx60(Portal, { asChild: true, children: /* @__PURE__ */ jsx60(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs32(Fragment12, { children: [
29816
28848
  context.label,
29817
28849
  " ",
29818
28850
  children
@@ -29973,7 +29005,7 @@ var Toast_default = {
29973
29005
  };
29974
29006
 
29975
29007
  // src/components/Toast.tsx
29976
- import { Fragment as Fragment12, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
29008
+ import { Fragment as Fragment13, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
29977
29009
  import { createElement as createElement4 } from "react";
29978
29010
  var icons = {
29979
29011
  info: Icons.Info,
@@ -29999,7 +29031,7 @@ function Toast2({
29999
29031
  }
30000
29032
  function Toaster(props) {
30001
29033
  const { toasts } = useToast();
30002
- return /* @__PURE__ */ jsxs33(Fragment12, { children: [
29034
+ return /* @__PURE__ */ jsxs33(Fragment13, { children: [
30003
29035
  toasts.map(({ id, message, props: props2 }) => {
30004
29036
  return /* @__PURE__ */ createElement4(Toast2, { ...props2, key: id, description: message });
30005
29037
  }),
@@ -30008,7 +29040,7 @@ function Toaster(props) {
30008
29040
  }
30009
29041
 
30010
29042
  // src/components/Toggle.tsx
30011
- import { forwardRef as forwardRef17 } from "react";
29043
+ import { forwardRef as forwardRef18 } from "react";
30012
29044
  var import_classnames47 = __toESM(require_classnames());
30013
29045
 
30014
29046
  // src/components/Toggle.module.css
@@ -30017,11 +29049,11 @@ var Toggle_default = {
30017
29049
  };
30018
29050
 
30019
29051
  // src/components/Toggle.tsx
30020
- import { Fragment as Fragment13, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
30021
- var Toggle = forwardRef17(
29052
+ import { Fragment as Fragment14, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
29053
+ var Toggle = forwardRef18(
30022
29054
  ({ label, children, className, ...props }, ref) => {
30023
29055
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
30024
- return /* @__PURE__ */ jsxs34(Fragment13, { children: [
29056
+ return /* @__PURE__ */ jsxs34(Fragment14, { children: [
30025
29057
  label && /* @__PURE__ */ jsx62(Label, { children: label }),
30026
29058
  /* @__PURE__ */ jsx62(
30027
29059
  $efde0372d7a700fe$export$d2b052e7b4be1756,
@@ -30533,10 +29565,7 @@ export {
30533
29565
  $3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger,
30534
29566
  Modal,
30535
29567
  NavigationMenu,
30536
- NavigationMenuContent,
30537
29568
  NavigationMenuItem,
30538
- NavigationMenuLink,
30539
- NavigationMenuTrigger,
30540
29569
  Page,
30541
29570
  PasswordField,
30542
29571
  Popover,