@umami/react-zen 0.12.0 → 0.14.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",
@@ -25200,7 +25200,7 @@ function Text({
25200
25200
  );
25201
25201
  }
25202
25202
 
25203
- // src/components/form/Form.tsx
25203
+ // src/components/forms/Form.tsx
25204
25204
  import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
25205
25205
  function Form({
25206
25206
  gap = "md",
@@ -25273,7 +25273,7 @@ function Form({
25273
25273
  ] });
25274
25274
  }
25275
25275
 
25276
- // src/components/form/FormField.tsx
25276
+ // src/components/forms/FormField.tsx
25277
25277
  import { cloneElement as cloneElement2, forwardRef } from "react";
25278
25278
  var import_classnames7 = __toESM(require_classnames());
25279
25279
 
@@ -25296,14 +25296,14 @@ function mapChildren(children, handler) {
25296
25296
  });
25297
25297
  }
25298
25298
 
25299
- // src/components/form/FormField.module.css
25299
+ // src/components/forms/FormField.module.css
25300
25300
  var FormField_default = {
25301
25301
  field: "FormField_field",
25302
25302
  description: "FormField_description",
25303
25303
  error: "FormField_error"
25304
25304
  };
25305
25305
 
25306
- // src/components/form/FormField.tsx
25306
+ // src/components/forms/FormField.tsx
25307
25307
  import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
25308
25308
  var FormField = forwardRef(
25309
25309
  ({ name, description, label, rules, className, children, ...props }, ref) => {
@@ -25323,6 +25323,7 @@ var FormField = forwardRef(
25323
25323
  );
25324
25324
 
25325
25325
  // src/components/Button.tsx
25326
+ import { forwardRef as forwardRef2 } from "react";
25326
25327
  var import_classnames8 = __toESM(require_classnames());
25327
25328
 
25328
25329
  // src/components/Button.module.css
@@ -25342,33 +25343,36 @@ var Button_default = {
25342
25343
 
25343
25344
  // src/components/Button.tsx
25344
25345
  import { jsx as jsx9 } from "react/jsx-runtime";
25345
- function Button({
25346
- variant = "secondary",
25347
- size = "md",
25348
- preventFocusOnPress = true,
25349
- asChild,
25350
- className,
25351
- children,
25352
- ...props
25353
- }) {
25354
- const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $d2b4bc8c273e7be6$export$353f5b6fc5456de1;
25355
- return /* @__PURE__ */ jsx9(
25356
- Component,
25357
- {
25358
- ...props,
25359
- preventFocusOnPress: Component === $d2b4bc8c273e7be6$export$353f5b6fc5456de1 ? preventFocusOnPress : void 0,
25360
- className: (0, import_classnames8.default)(
25361
- Button_default.button,
25362
- className,
25363
- variant && Button_default[variant],
25364
- size && Button_default[size]
25365
- ),
25366
- children
25367
- }
25368
- );
25369
- }
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
+ );
25370
25374
 
25371
- // src/components/form/FormResetButton.tsx
25375
+ // src/components/forms/FormResetButton.tsx
25372
25376
  import { jsx as jsx10 } from "react/jsx-runtime";
25373
25377
  function FormResetButton({ values = {}, children, onPress, ...props }) {
25374
25378
  const { reset } = useFormContext();
@@ -25424,7 +25428,7 @@ function LoadingButton({ isLoading, children, ...props }) {
25424
25428
  ] });
25425
25429
  }
25426
25430
 
25427
- // src/components/form/FormSubmitButton.tsx
25431
+ // src/components/forms/FormSubmitButton.tsx
25428
25432
  import { jsx as jsx13 } from "react/jsx-runtime";
25429
25433
  function FormSubmitButton({ children, disabled, isLoading, ...props }) {
25430
25434
  const {
@@ -25470,7 +25474,7 @@ var createStoreImpl = (createState) => {
25470
25474
  }
25471
25475
  };
25472
25476
  const getState = () => state;
25473
- const getInitialState = () => initialState3;
25477
+ const getInitialState = () => initialState4;
25474
25478
  const subscribe = (listener) => {
25475
25479
  listeners.add(listener);
25476
25480
  return () => listeners.delete(listener);
@@ -25484,7 +25488,7 @@ var createStoreImpl = (createState) => {
25484
25488
  listeners.clear();
25485
25489
  };
25486
25490
  const api = { setState, getState, getInitialState, subscribe, destroy };
25487
- const initialState3 = state = createState(setState, getState, api);
25491
+ const initialState4 = state = createState(setState, getState, api);
25488
25492
  return api;
25489
25493
  };
25490
25494
  var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
@@ -25863,11 +25867,6 @@ var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.redu
25863
25867
  [node]: Node2
25864
25868
  };
25865
25869
  }, {});
25866
- function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
25867
- if (target) $4q5Fq$flushSync(
25868
- () => target.dispatchEvent(event)
25869
- );
25870
- }
25871
25870
 
25872
25871
  // node_modules/@radix-ui/react-collapsible/dist/index.mjs
25873
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";
@@ -25880,11 +25879,11 @@ var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || g
25880
25879
  // node_modules/@radix-ui/react-presence/dist/index.mjs
25881
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";
25882
25881
  import { flushSync as $iqq3r$flushSync } from "react-dom";
25883
- function $fe963b355347cc68$export$3e6543de14f8614f(initialState3, machine) {
25882
+ function $fe963b355347cc68$export$3e6543de14f8614f(initialState4, machine) {
25884
25883
  return $iqq3r$useReducer((state, event) => {
25885
25884
  const nextState = machine[state][event];
25886
25885
  return nextState !== null && nextState !== void 0 ? nextState : state;
25887
- }, initialState3);
25886
+ }, initialState4);
25888
25887
  }
25889
25888
  var $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props) => {
25890
25889
  const { present, children } = props;
@@ -25904,8 +25903,8 @@ function $921a889cee6df7e8$var$usePresence(present) {
25904
25903
  const stylesRef = $iqq3r$useRef({});
25905
25904
  const prevPresentRef = $iqq3r$useRef(present);
25906
25905
  const prevAnimationNameRef = $iqq3r$useRef("none");
25907
- const initialState3 = present ? "mounted" : "unmounted";
25908
- const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState3, {
25906
+ const initialState4 = present ? "mounted" : "unmounted";
25907
+ const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState4, {
25909
25908
  mounted: {
25910
25909
  UNMOUNT: "unmounted",
25911
25910
  ANIMATION_OUT: "unmountSuspended"
@@ -26572,7 +26571,7 @@ function Calendar({ className, ...props }) {
26572
26571
  }
26573
26572
 
26574
26573
  // src/components/Checkbox.tsx
26575
- import { forwardRef as forwardRef2 } from "react";
26574
+ import { forwardRef as forwardRef3 } from "react";
26576
26575
 
26577
26576
  // node_modules/react-icons/im/index.mjs
26578
26577
  function ImCheckmark(props) {
@@ -26591,7 +26590,7 @@ var Checkbox_default = {
26591
26590
 
26592
26591
  // src/components/Checkbox.tsx
26593
26592
  import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
26594
- var Checkbox = forwardRef2(
26593
+ var Checkbox = forwardRef3(
26595
26594
  ({ label, className, children, ...props }, ref) => {
26596
26595
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
26597
26596
  return /* @__PURE__ */ jsx20(
@@ -26695,7 +26694,7 @@ var import_classnames23 = __toESM(require_classnames());
26695
26694
  import { useState as useState5 } from "react";
26696
26695
 
26697
26696
  // src/components/TextField.tsx
26698
- 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";
26699
26698
  var import_classnames22 = __toESM(require_classnames());
26700
26699
 
26701
26700
  // src/components/Label.tsx
@@ -26749,27 +26748,27 @@ var Input_default = {
26749
26748
 
26750
26749
  // src/components/TextField.module.css
26751
26750
  var TextField_default = {
26752
- textarea: "TextField_textarea",
26753
26751
  allowCopy: "TextField_allowCopy",
26754
26752
  icon: "TextField_icon"
26755
26753
  };
26756
26754
 
26757
26755
  // src/components/TextField.tsx
26758
26756
  import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
26759
- var TextField = forwardRef3(
26757
+ var TextField = forwardRef4(
26760
26758
  ({
26761
26759
  value,
26762
26760
  defaultValue,
26763
26761
  label,
26764
26762
  placeholder,
26765
- asTextArea,
26766
26763
  allowCopy,
26764
+ asChild,
26767
26765
  className,
26768
26766
  onChange,
26767
+ children,
26769
26768
  ...props
26770
26769
  }, ref) => {
26771
26770
  const [inputValue, setInputValue] = useState4(defaultValue || value);
26772
- const Component = asTextArea ? $216918bed6669f72$export$f5c9f3c2c4054eec : $3985021b0ad6602f$export$f5b8910cec6cf069;
26771
+ const Component = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : $3985021b0ad6602f$export$f5b8910cec6cf069;
26773
26772
  const handleChange = (e) => {
26774
26773
  setInputValue(e.target.value);
26775
26774
  return onChange?.(e);
@@ -26777,6 +26776,7 @@ var TextField = forwardRef3(
26777
26776
  useEffect3(() => {
26778
26777
  setInputValue(value);
26779
26778
  }, [value]);
26779
+ console.log(asChild && { Component, asChild });
26780
26780
  return /* @__PURE__ */ jsxs14(
26781
26781
  $bcdf0525bf22703d$export$2c73285ae9390cec,
26782
26782
  {
@@ -26790,13 +26790,10 @@ var TextField = forwardRef3(
26790
26790
  /* @__PURE__ */ jsx27(
26791
26791
  Component,
26792
26792
  {
26793
- className: (0, import_classnames22.default)(
26794
- TextField_default.input,
26795
- Input_default.input,
26796
- asTextArea && TextField_default.textarea,
26797
- allowCopy && TextField_default.allowCopy
26798
- ),
26799
- onChange: handleChange
26793
+ className: (0, import_classnames22.default)(TextField_default.input, Input_default.input, allowCopy && TextField_default.allowCopy),
26794
+ placeholder,
26795
+ onChange: handleChange,
26796
+ children
26800
26797
  }
26801
26798
  ),
26802
26799
  allowCopy && /* @__PURE__ */ jsx27(CopyButton, { className: (0, import_classnames22.default)(TextField_default.icon, Input_default.icon), value: inputValue })
@@ -26979,7 +26976,7 @@ function Heading({ size = 5, className, children, asChild, ...props }) {
26979
26976
  }
26980
26977
 
26981
26978
  // src/components/HoverTrigger.tsx
26982
- import { cloneElement as cloneElement3, useRef as useRef2, useState as useState6 } from "react";
26979
+ import { useRef as useRef2, useState as useState6, useEffect as useEffect4 } from "react";
26983
26980
 
26984
26981
  // src/components/HoverTrigger.module.css
26985
26982
  var HoverTrigger_default = {
@@ -26987,20 +26984,34 @@ var HoverTrigger_default = {
26987
26984
  };
26988
26985
 
26989
26986
  // src/components/HoverTrigger.tsx
26990
- import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
26987
+ import { Fragment as Fragment5, jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
26991
26988
  var CLOSE_DELAY = 500;
26992
- function HoverTrigger({ closeDelay = CLOSE_DELAY, children }) {
26989
+ function HoverTrigger({
26990
+ isOpen,
26991
+ onHoverStart,
26992
+ onHoverEnd,
26993
+ closeDelay = CLOSE_DELAY,
26994
+ children
26995
+ }) {
26993
26996
  const [triggerElement, popupElement] = children;
26994
- const [show, setShow] = useState6(false);
26997
+ const triggerRef = useRef2(null);
26998
+ const [open, setOpen] = useState6(isOpen);
26995
26999
  const isOverMenu = useRef2(false);
26996
27000
  const isOverButton = useRef2(false);
26997
27001
  const timeout = useRef2();
26998
- const handleHoverStart = () => {
27002
+ useEffect4(() => {
27003
+ if (isOpen !== open) {
27004
+ setOpen(isOpen);
27005
+ }
27006
+ }, [isOpen]);
27007
+ const close = () => setOpen(false);
27008
+ const handleMouseEnter = () => {
26999
27009
  isOverMenu.current = false;
27000
27010
  isOverButton.current = true;
27001
- setShow(true);
27011
+ setOpen(true);
27012
+ onHoverStart?.();
27002
27013
  };
27003
- const handleHoverEnd = () => {
27014
+ const handleMouseLeave = () => {
27004
27015
  isOverButton.current = false;
27005
27016
  checkHoverState();
27006
27017
  };
@@ -27015,21 +27026,22 @@ function HoverTrigger({ closeDelay = CLOSE_DELAY, children }) {
27015
27026
  clearTimeout(timeout.current);
27016
27027
  timeout.current = setTimeout(() => {
27017
27028
  if (!isOverMenu.current && !isOverButton.current) {
27018
- setShow(false);
27029
+ setOpen(false);
27030
+ onHoverEnd?.();
27019
27031
  isOverMenu.current = false;
27020
27032
  isOverButton.current = false;
27021
27033
  }
27022
27034
  }, closeDelay);
27023
27035
  };
27024
- return /* @__PURE__ */ jsxs18($de32f1b87079253c$export$2e1e1122cf0cba88, { children: [
27025
- cloneElement3(triggerElement, { onHoverStart: handleHoverStart, onHoverEnd: handleHoverEnd }),
27026
- /* @__PURE__ */ jsx33(Popover, { isOpen: show, isNonModal: true, children: /* @__PURE__ */ jsx33(
27036
+ return /* @__PURE__ */ jsxs18(Fragment5, { children: [
27037
+ /* @__PURE__ */ jsx33("div", { ref: triggerRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: triggerElement }),
27038
+ /* @__PURE__ */ jsx33(Popover, { isOpen: open, isNonModal: true, triggerRef, children: /* @__PURE__ */ jsx33(
27027
27039
  "div",
27028
27040
  {
27029
27041
  className: HoverTrigger_default.wrapper,
27030
27042
  onMouseEnter: handleMenuEnter,
27031
27043
  onMouseLeave: handleMenuLeave,
27032
- children: /* @__PURE__ */ jsx33(Dialog, { children: cloneElement3(popupElement) })
27044
+ children: popupElement
27033
27045
  }
27034
27046
  ) })
27035
27047
  ] });
@@ -27190,1060 +27202,55 @@ function Modal({ children, className, ...props }) {
27190
27202
  ) });
27191
27203
  }
27192
27204
 
27193
- // node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
27194
- 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";
27195
- import $yHMN2$reactdom from "react-dom";
27196
-
27197
- // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
27198
- 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";
27199
-
27200
- // node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
27201
- import { useEffect as $hPSQ5$useEffect } from "react";
27202
- function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27203
- const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
27204
- $hPSQ5$useEffect(() => {
27205
- const handleKeyDown = (event) => {
27206
- if (event.key === "Escape") onEscapeKeyDown(event);
27207
- };
27208
- ownerDocument.addEventListener("keydown", handleKeyDown);
27209
- return () => ownerDocument.removeEventListener("keydown", handleKeyDown);
27210
- }, [
27211
- onEscapeKeyDown,
27212
- ownerDocument
27213
- ]);
27214
- }
27215
-
27216
- // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
27217
- var $5cb92bef7577960e$var$CONTEXT_UPDATE = "dismissableLayer.update";
27218
- var $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
27219
- var $5cb92bef7577960e$var$FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
27220
- var $5cb92bef7577960e$var$originalBodyPointerEvents;
27221
- var $5cb92bef7577960e$var$DismissableLayerContext = /* @__PURE__ */ $kqwpH$createContext({
27222
- layers: /* @__PURE__ */ new Set(),
27223
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
27224
- branches: /* @__PURE__ */ new Set()
27225
- });
27226
- var $5cb92bef7577960e$export$177fb62ff3ec1f22 = /* @__PURE__ */ $kqwpH$forwardRef((props, forwardedRef) => {
27227
- var _node$ownerDocument;
27228
- const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
27229
- const context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);
27230
- const [node1, setNode] = $kqwpH$useState(null);
27231
- 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;
27232
- const [, force] = $kqwpH$useState({});
27233
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
27234
- forwardedRef,
27235
- (node) => setNode(node)
27236
- );
27237
- const layers = Array.from(context.layers);
27238
- const [highestLayerWithOutsidePointerEventsDisabled] = [
27239
- ...context.layersWithOutsidePointerEventsDisabled
27240
- ].slice(-1);
27241
- const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
27242
- const index = node1 ? layers.indexOf(node1) : -1;
27243
- const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
27244
- const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
27245
- const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event) => {
27246
- const target = event.target;
27247
- const isPointerDownOnBranch = [
27248
- ...context.branches
27249
- ].some(
27250
- (branch) => branch.contains(target)
27251
- );
27252
- if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
27253
- onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
27254
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
27255
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
27256
- }, ownerDocument);
27257
- const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event) => {
27258
- const target = event.target;
27259
- const isFocusInBranch = [
27260
- ...context.branches
27261
- ].some(
27262
- (branch) => branch.contains(target)
27263
- );
27264
- if (isFocusInBranch) return;
27265
- onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
27266
- onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
27267
- if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
27268
- }, ownerDocument);
27269
- $addc16e1bbe58fd0$export$3a72a57244d6e765((event) => {
27270
- const isHighestLayer = index === context.layers.size - 1;
27271
- if (!isHighestLayer) return;
27272
- onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
27273
- if (!event.defaultPrevented && onDismiss) {
27274
- event.preventDefault();
27275
- onDismiss();
27276
- }
27277
- }, ownerDocument);
27278
- $kqwpH$useEffect(() => {
27279
- if (!node1) return;
27280
- if (disableOutsidePointerEvents) {
27281
- if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
27282
- $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
27283
- ownerDocument.body.style.pointerEvents = "none";
27284
- }
27285
- context.layersWithOutsidePointerEventsDisabled.add(node1);
27286
- }
27287
- context.layers.add(node1);
27288
- $5cb92bef7577960e$var$dispatchUpdate();
27289
- return () => {
27290
- if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
27291
- };
27292
- }, [
27293
- node1,
27294
- ownerDocument,
27295
- disableOutsidePointerEvents,
27296
- context
27297
- ]);
27298
- $kqwpH$useEffect(() => {
27299
- return () => {
27300
- if (!node1) return;
27301
- context.layers.delete(node1);
27302
- context.layersWithOutsidePointerEventsDisabled.delete(node1);
27303
- $5cb92bef7577960e$var$dispatchUpdate();
27304
- };
27305
- }, [
27306
- node1,
27307
- context
27308
- ]);
27309
- $kqwpH$useEffect(() => {
27310
- const handleUpdate = () => force({});
27311
- document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
27312
- return () => document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
27313
- }, []);
27314
- return /* @__PURE__ */ $kqwpH$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
27315
- ref: composedRefs,
27316
- style: {
27317
- pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
27318
- ...props.style
27319
- },
27320
- onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
27321
- onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
27322
- onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
27323
- }));
27324
- });
27325
- function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27326
- const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
27327
- const isPointerInsideReactTreeRef = $kqwpH$useRef(false);
27328
- const handleClickRef = $kqwpH$useRef(() => {
27329
- });
27330
- $kqwpH$useEffect(() => {
27331
- const handlePointerDown = (event) => {
27332
- if (event.target && !isPointerInsideReactTreeRef.current) {
27333
- let handleAndDispatchPointerDownOutsideEvent = function() {
27334
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
27335
- discrete: true
27336
- });
27337
- };
27338
- const eventDetail = {
27339
- originalEvent: event
27340
- };
27341
- if (event.pointerType === "touch") {
27342
- ownerDocument.removeEventListener("click", handleClickRef.current);
27343
- handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
27344
- ownerDocument.addEventListener("click", handleClickRef.current, {
27345
- once: true
27346
- });
27347
- } else handleAndDispatchPointerDownOutsideEvent();
27348
- } else
27349
- ownerDocument.removeEventListener("click", handleClickRef.current);
27350
- isPointerInsideReactTreeRef.current = false;
27351
- };
27352
- const timerId = window.setTimeout(() => {
27353
- ownerDocument.addEventListener("pointerdown", handlePointerDown);
27354
- }, 0);
27355
- return () => {
27356
- window.clearTimeout(timerId);
27357
- ownerDocument.removeEventListener("pointerdown", handlePointerDown);
27358
- ownerDocument.removeEventListener("click", handleClickRef.current);
27359
- };
27360
- }, [
27361
- ownerDocument,
27362
- handlePointerDownOutside
27363
- ]);
27364
- return {
27365
- // ensures we check React component tree (not just DOM tree)
27366
- onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
27367
- };
27368
- }
27369
- function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
27370
- const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
27371
- const isFocusInsideReactTreeRef = $kqwpH$useRef(false);
27372
- $kqwpH$useEffect(() => {
27373
- const handleFocus = (event) => {
27374
- if (event.target && !isFocusInsideReactTreeRef.current) {
27375
- const eventDetail = {
27376
- originalEvent: event
27377
- };
27378
- $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
27379
- discrete: false
27380
- });
27381
- }
27382
- };
27383
- ownerDocument.addEventListener("focusin", handleFocus);
27384
- return () => ownerDocument.removeEventListener("focusin", handleFocus);
27385
- }, [
27386
- ownerDocument,
27387
- handleFocusOutside
27388
- ]);
27389
- return {
27390
- onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
27391
- onBlurCapture: () => isFocusInsideReactTreeRef.current = false
27392
- };
27393
- }
27394
- function $5cb92bef7577960e$var$dispatchUpdate() {
27395
- const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
27396
- document.dispatchEvent(event);
27397
- }
27398
- function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
27399
- const target = detail.originalEvent.target;
27400
- const event = new CustomEvent(name, {
27401
- bubbles: false,
27402
- cancelable: true,
27403
- detail
27404
- });
27405
- if (handler) target.addEventListener(name, handler, {
27406
- once: true
27407
- });
27408
- if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
27409
- else target.dispatchEvent(event);
27410
- }
27411
-
27412
- // node_modules/@radix-ui/react-use-previous/dist/index.mjs
27413
- import { useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo } from "react";
27414
- function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
27415
- const ref = $8LvvK$useRef({
27416
- value,
27417
- previous: value
27418
- });
27419
- return $8LvvK$useMemo(() => {
27420
- if (ref.current.value !== value) {
27421
- ref.current.previous = ref.current.value;
27422
- ref.current.value = value;
27423
- }
27424
- return ref.current.previous;
27425
- }, [
27426
- value
27427
- ]);
27428
- }
27429
-
27430
- // node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
27431
- import { forwardRef as $kVwnw$forwardRef, createElement as $kVwnw$createElement } from "react";
27432
- var $ea1ef594cf570d83$export$439d29a4e110a164 = /* @__PURE__ */ $kVwnw$forwardRef((props, forwardedRef) => {
27433
- return /* @__PURE__ */ $kVwnw$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
27434
- ref: forwardedRef,
27435
- style: {
27436
- // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
27437
- position: "absolute",
27438
- border: 0,
27439
- width: 1,
27440
- height: 1,
27441
- padding: 0,
27442
- margin: -1,
27443
- overflow: "hidden",
27444
- clip: "rect(0, 0, 0, 0)",
27445
- whiteSpace: "nowrap",
27446
- wordWrap: "normal",
27447
- ...props.style
27448
- }
27449
- }));
27450
- });
27451
- var $ea1ef594cf570d83$export$be92b6f5f03c0fe9 = $ea1ef594cf570d83$export$439d29a4e110a164;
27452
-
27453
- // node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
27454
- var $322c88a641701f3b$var$NAVIGATION_MENU_NAME = "NavigationMenu";
27455
- var [$322c88a641701f3b$var$Collection, $322c88a641701f3b$var$useCollection, $322c88a641701f3b$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27456
- var [$322c88a641701f3b$var$FocusGroupCollection, $322c88a641701f3b$var$useFocusGroupCollection, $322c88a641701f3b$var$createFocusGroupCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27457
- var [$322c88a641701f3b$var$createNavigationMenuContext, $322c88a641701f3b$export$fb8ea5af8c9fcdf0] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($322c88a641701f3b$var$NAVIGATION_MENU_NAME, [
27458
- $322c88a641701f3b$var$createCollectionScope,
27459
- $322c88a641701f3b$var$createFocusGroupCollectionScope
27460
- ]);
27461
- var [$322c88a641701f3b$var$NavigationMenuProviderImpl, $322c88a641701f3b$var$useNavigationMenuContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27462
- var [$322c88a641701f3b$var$ViewportContentProvider, $322c88a641701f3b$var$useViewportContentContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$NAVIGATION_MENU_NAME);
27463
- var $322c88a641701f3b$export$5b2278cf1e8bcae2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27464
- const { __scopeNavigationMenu, value: valueProp, onValueChange, defaultValue, delayDuration = 200, skipDelayDuration = 300, orientation = "horizontal", dir, ...NavigationMenuProps } = props;
27465
- const [navigationMenu, setNavigationMenu] = $yHMN2$useState(null);
27466
- const composedRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(
27467
- forwardedRef,
27468
- (node) => setNavigationMenu(node)
27469
- );
27470
- const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
27471
- const openTimerRef = $yHMN2$useRef(0);
27472
- const closeTimerRef = $yHMN2$useRef(0);
27473
- const skipDelayTimerRef = $yHMN2$useRef(0);
27474
- const [isOpenDelayed, setIsOpenDelayed] = $yHMN2$useState(true);
27475
- const [value1 = "", setValue] = $71cd76cc60e0454e$export$6f32135080cb4c3({
27476
- prop: valueProp,
27477
- onChange: (value) => {
27478
- const isOpen = value !== "";
27479
- const hasSkipDelayDuration = skipDelayDuration > 0;
27480
- if (isOpen) {
27481
- window.clearTimeout(skipDelayTimerRef.current);
27482
- if (hasSkipDelayDuration) setIsOpenDelayed(false);
27483
- } else {
27484
- window.clearTimeout(skipDelayTimerRef.current);
27485
- skipDelayTimerRef.current = window.setTimeout(
27486
- () => setIsOpenDelayed(true),
27487
- skipDelayDuration
27488
- );
27489
- }
27490
- onValueChange === null || onValueChange === void 0 || onValueChange(value);
27491
- },
27492
- defaultProp: defaultValue
27493
- });
27494
- const startCloseTimer = $yHMN2$useCallback(() => {
27495
- window.clearTimeout(closeTimerRef.current);
27496
- closeTimerRef.current = window.setTimeout(
27497
- () => setValue(""),
27498
- 150
27499
- );
27500
- }, [
27501
- setValue
27502
- ]);
27503
- const handleOpen = $yHMN2$useCallback((itemValue) => {
27504
- window.clearTimeout(closeTimerRef.current);
27505
- setValue(itemValue);
27506
- }, [
27507
- setValue
27508
- ]);
27509
- const handleDelayedOpen = $yHMN2$useCallback((itemValue) => {
27510
- const isOpenItem = value1 === itemValue;
27511
- if (isOpenItem)
27512
- window.clearTimeout(closeTimerRef.current);
27513
- else openTimerRef.current = window.setTimeout(() => {
27514
- window.clearTimeout(closeTimerRef.current);
27515
- setValue(itemValue);
27516
- }, delayDuration);
27517
- }, [
27518
- value1,
27519
- setValue,
27520
- delayDuration
27521
- ]);
27522
- $yHMN2$useEffect(() => {
27523
- return () => {
27524
- window.clearTimeout(openTimerRef.current);
27525
- window.clearTimeout(closeTimerRef.current);
27526
- window.clearTimeout(skipDelayTimerRef.current);
27527
- };
27528
- }, []);
27529
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProvider, {
27530
- scope: __scopeNavigationMenu,
27531
- isRootMenu: true,
27532
- value: value1,
27533
- dir: direction,
27534
- orientation,
27535
- rootNavigationMenu: navigationMenu,
27536
- onTriggerEnter: (itemValue) => {
27537
- window.clearTimeout(openTimerRef.current);
27538
- if (isOpenDelayed) handleDelayedOpen(itemValue);
27539
- else handleOpen(itemValue);
27540
- },
27541
- onTriggerLeave: () => {
27542
- window.clearTimeout(openTimerRef.current);
27543
- startCloseTimer();
27544
- },
27545
- onContentEnter: () => window.clearTimeout(closeTimerRef.current),
27546
- onContentLeave: startCloseTimer,
27547
- onItemSelect: (itemValue) => {
27548
- setValue(
27549
- (prevValue) => prevValue === itemValue ? "" : itemValue
27550
- );
27551
- },
27552
- onItemDismiss: () => setValue("")
27553
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.nav, _extends({
27554
- "aria-label": "Main",
27555
- "data-orientation": orientation,
27556
- dir: direction
27557
- }, NavigationMenuProps, {
27558
- ref: composedRef
27559
- })));
27560
- });
27561
- var $322c88a641701f3b$var$NavigationMenuProvider = (props) => {
27562
- const { scope, isRootMenu, rootNavigationMenu, dir, orientation, children, value, onItemSelect, onItemDismiss, onTriggerEnter, onTriggerLeave, onContentEnter, onContentLeave } = props;
27563
- const [viewport, setViewport] = $yHMN2$useState(null);
27564
- const [viewportContent, setViewportContent] = $yHMN2$useState(/* @__PURE__ */ new Map());
27565
- const [indicatorTrack, setIndicatorTrack] = $yHMN2$useState(null);
27566
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuProviderImpl, {
27567
- scope,
27568
- isRootMenu,
27569
- rootNavigationMenu,
27570
- value,
27571
- previousValue: $010c2913dbd2fe3d$export$5cae361ad82dce8b(value),
27572
- baseId: $1746a345f3d73bb7$export$f680877a34711e37(),
27573
- dir,
27574
- orientation,
27575
- viewport,
27576
- onViewportChange: setViewport,
27577
- indicatorTrack,
27578
- onIndicatorTrackChange: setIndicatorTrack,
27579
- onTriggerEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerEnter),
27580
- onTriggerLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onTriggerLeave),
27581
- onContentEnter: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentEnter),
27582
- onContentLeave: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onContentLeave),
27583
- onItemSelect: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemSelect),
27584
- onItemDismiss: $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onItemDismiss),
27585
- onViewportContentChange: $yHMN2$useCallback((contentValue, contentData) => {
27586
- setViewportContent((prevContent) => {
27587
- prevContent.set(contentValue, contentData);
27588
- return new Map(prevContent);
27589
- });
27590
- }, []),
27591
- onViewportContentRemove: $yHMN2$useCallback((contentValue) => {
27592
- setViewportContent((prevContent) => {
27593
- if (!prevContent.has(contentValue)) return prevContent;
27594
- prevContent.delete(contentValue);
27595
- return new Map(prevContent);
27596
- });
27597
- }, [])
27598
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Provider, {
27599
- scope
27600
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentProvider, {
27601
- scope,
27602
- items: viewportContent
27603
- }, children)));
27604
- };
27605
- var $322c88a641701f3b$var$LIST_NAME = "NavigationMenuList";
27606
- var $322c88a641701f3b$export$c361068a95fd2286 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27607
- const { __scopeNavigationMenu, ...listProps } = props;
27608
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$LIST_NAME, __scopeNavigationMenu);
27609
- const list = /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.ul, _extends({
27610
- "data-orientation": context.orientation
27611
- }, listProps, {
27612
- ref: forwardedRef
27613
- }));
27614
- return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, {
27615
- style: {
27616
- position: "relative"
27617
- },
27618
- ref: context.onIndicatorTrackChange
27619
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.Slot, {
27620
- scope: __scopeNavigationMenu
27621
- }, context.isRootMenu ? /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
27622
- asChild: true
27623
- }, list) : list));
27624
- });
27625
- var $322c88a641701f3b$var$ITEM_NAME = "NavigationMenuItem";
27626
- var [$322c88a641701f3b$var$NavigationMenuItemContextProvider, $322c88a641701f3b$var$useNavigationMenuItemContext] = $322c88a641701f3b$var$createNavigationMenuContext($322c88a641701f3b$var$ITEM_NAME);
27627
- var $322c88a641701f3b$export$ffdbb83a2de845c2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27628
- const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
27629
- const autoValue = $1746a345f3d73bb7$export$f680877a34711e37();
27630
- const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
27631
- const contentRef = $yHMN2$useRef(null);
27632
- const triggerRef = $yHMN2$useRef(null);
27633
- const focusProxyRef = $yHMN2$useRef(null);
27634
- const restoreContentTabOrderRef = $yHMN2$useRef(() => {
27635
- });
27636
- const wasEscapeCloseRef = $yHMN2$useRef(false);
27637
- const handleContentEntry = $yHMN2$useCallback((side = "start") => {
27638
- if (contentRef.current) {
27639
- restoreContentTabOrderRef.current();
27640
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
27641
- if (candidates.length) $322c88a641701f3b$var$focusFirst(side === "start" ? candidates : candidates.reverse());
27642
- }
27643
- }, []);
27644
- const handleContentExit = $yHMN2$useCallback(() => {
27645
- if (contentRef.current) {
27646
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(contentRef.current);
27647
- if (candidates.length) restoreContentTabOrderRef.current = $322c88a641701f3b$var$removeFromTabOrder(candidates);
27648
- }
27649
- }, []);
27650
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuItemContextProvider, {
27651
- scope: __scopeNavigationMenu,
27652
- value,
27653
- triggerRef,
27654
- contentRef,
27655
- focusProxyRef,
27656
- wasEscapeCloseRef,
27657
- onEntryKeyDown: handleContentEntry,
27658
- onFocusProxyEnter: handleContentEntry,
27659
- onRootContentClose: handleContentExit,
27660
- onContentFocusOutside: handleContentExit
27661
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.li, _extends({}, itemProps, {
27662
- ref: forwardedRef
27663
- })));
27664
- });
27665
- var $322c88a641701f3b$var$TRIGGER_NAME = "NavigationMenuTrigger";
27666
- var $322c88a641701f3b$export$37fe8002734d8f2 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27667
- const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
27668
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
27669
- const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$TRIGGER_NAME, props.__scopeNavigationMenu);
27670
- const ref = $yHMN2$useRef(null);
27671
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, itemContext.triggerRef, forwardedRef);
27672
- const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, itemContext.value);
27673
- const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, itemContext.value);
27674
- const hasPointerMoveOpenedRef = $yHMN2$useRef(false);
27675
- const wasClickCloseRef = $yHMN2$useRef(false);
27676
- const open = itemContext.value === context.value;
27677
- return /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$Collection.ItemSlot, {
27678
- scope: __scopeNavigationMenu,
27679
- value: itemContext.value
27680
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
27681
- asChild: true
27682
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
27683
- id: triggerId,
27684
- disabled,
27685
- "data-disabled": disabled ? "" : void 0,
27686
- "data-state": $322c88a641701f3b$var$getOpenState(open),
27687
- "aria-expanded": open,
27688
- "aria-controls": contentId
27689
- }, triggerProps, {
27690
- ref: composedRefs,
27691
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, () => {
27692
- wasClickCloseRef.current = false;
27693
- itemContext.wasEscapeCloseRef.current = false;
27694
- }),
27695
- onPointerMove: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerMove, $322c88a641701f3b$var$whenMouse(() => {
27696
- if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current) return;
27697
- context.onTriggerEnter(itemContext.value);
27698
- hasPointerMoveOpenedRef.current = true;
27699
- })),
27700
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(() => {
27701
- if (disabled) return;
27702
- context.onTriggerLeave();
27703
- hasPointerMoveOpenedRef.current = false;
27704
- })),
27705
- onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, () => {
27706
- context.onItemSelect(itemContext.value);
27707
- wasClickCloseRef.current = open;
27708
- }),
27709
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
27710
- const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
27711
- const entryKey = {
27712
- horizontal: "ArrowDown",
27713
- vertical: verticalEntryKey
27714
- }[context.orientation];
27715
- if (open && event.key === entryKey) {
27716
- itemContext.onEntryKeyDown();
27717
- event.preventDefault();
27718
- }
27719
- })
27720
- })))), open && /* @__PURE__ */ $yHMN2$createElement($yHMN2$Fragment, null, /* @__PURE__ */ $yHMN2$createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9, {
27721
- "aria-hidden": true,
27722
- tabIndex: 0,
27723
- ref: itemContext.focusProxyRef,
27724
- onFocus: (event) => {
27725
- const content = itemContext.contentRef.current;
27726
- const prevFocusedElement = event.relatedTarget;
27727
- const wasTriggerFocused = prevFocusedElement === ref.current;
27728
- const wasFocusFromContent = content === null || content === void 0 ? void 0 : content.contains(prevFocusedElement);
27729
- if (wasTriggerFocused || !wasFocusFromContent) itemContext.onFocusProxyEnter(wasTriggerFocused ? "start" : "end");
27730
- }
27731
- }), context.viewport && /* @__PURE__ */ $yHMN2$createElement("span", {
27732
- "aria-owns": contentId
27733
- })));
27734
- });
27735
- var $322c88a641701f3b$var$LINK_SELECT = "navigationMenu.linkSelect";
27736
- var $322c88a641701f3b$export$6893bf21536567da = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27737
- const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
27738
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupItem, {
27739
- asChild: true
27740
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.a, _extends({
27741
- "data-active": active ? "" : void 0,
27742
- "aria-current": active ? "page" : void 0
27743
- }, linkProps, {
27744
- ref: forwardedRef,
27745
- onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, (event1) => {
27746
- const target = event1.target;
27747
- const linkSelectEvent = new CustomEvent($322c88a641701f3b$var$LINK_SELECT, {
27748
- bubbles: true,
27749
- cancelable: true
27750
- });
27751
- target.addEventListener(
27752
- $322c88a641701f3b$var$LINK_SELECT,
27753
- (event) => onSelect === null || onSelect === void 0 ? void 0 : onSelect(event),
27754
- {
27755
- once: true
27756
- }
27757
- );
27758
- $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, linkSelectEvent);
27759
- if (!linkSelectEvent.defaultPrevented && !event1.metaKey) {
27760
- const rootContentDismissEvent = new CustomEvent($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
27761
- bubbles: true,
27762
- cancelable: true
27763
- });
27764
- $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, rootContentDismissEvent);
27765
- }
27766
- }, {
27767
- checkForDefaultPrevented: false
27768
- })
27769
- })));
27770
- });
27771
- var $322c88a641701f3b$var$INDICATOR_NAME = "NavigationMenuIndicator";
27772
- var $322c88a641701f3b$export$8ddb526647c0d8fb = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27773
- const { forceMount, ...indicatorProps } = props;
27774
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, props.__scopeNavigationMenu);
27775
- const isVisible = Boolean(context.value);
27776
- return context.indicatorTrack ? /* @__PURE__ */ $yHMN2$reactdom.createPortal(/* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
27777
- present: forceMount || isVisible
27778
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuIndicatorImpl, _extends({}, indicatorProps, {
27779
- ref: forwardedRef
27780
- }))), context.indicatorTrack) : null;
27781
- });
27782
- var $322c88a641701f3b$var$NavigationMenuIndicatorImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27783
- const { __scopeNavigationMenu, ...indicatorProps } = props;
27784
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$INDICATOR_NAME, __scopeNavigationMenu);
27785
- const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
27786
- const [activeTrigger, setActiveTrigger] = $yHMN2$useState(null);
27787
- const [position, setPosition] = $yHMN2$useState(null);
27788
- const isHorizontal = context.orientation === "horizontal";
27789
- const isVisible = Boolean(context.value);
27790
- $yHMN2$useEffect(() => {
27791
- var _items$find;
27792
- const items = getItems();
27793
- const triggerNode = (_items$find = items.find(
27794
- (item) => item.value === context.value
27795
- )) === null || _items$find === void 0 ? void 0 : _items$find.ref.current;
27796
- if (triggerNode) setActiveTrigger(triggerNode);
27797
- }, [
27798
- getItems,
27799
- context.value
27800
- ]);
27801
- const handlePositionChange = () => {
27802
- if (activeTrigger) setPosition({
27803
- size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,
27804
- offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop
27805
- });
27806
- };
27807
- $322c88a641701f3b$var$useResizeObserver(activeTrigger, handlePositionChange);
27808
- $322c88a641701f3b$var$useResizeObserver(context.indicatorTrack, handlePositionChange);
27809
- return position ? /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
27810
- "aria-hidden": true,
27811
- "data-state": isVisible ? "visible" : "hidden",
27812
- "data-orientation": context.orientation
27813
- }, indicatorProps, {
27814
- ref: forwardedRef,
27815
- style: {
27816
- position: "absolute",
27817
- ...isHorizontal ? {
27818
- left: 0,
27819
- width: position.size + "px",
27820
- transform: `translateX(${position.offset}px)`
27821
- } : {
27822
- top: 0,
27823
- height: position.size + "px",
27824
- transform: `translateY(${position.offset}px)`
27825
- },
27826
- ...indicatorProps.style
27827
- }
27828
- })) : null;
27829
- });
27830
- var $322c88a641701f3b$var$CONTENT_NAME = "NavigationMenuContent";
27831
- var $322c88a641701f3b$export$38e00e996c2f93f7 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27832
- const { forceMount, ...contentProps } = props;
27833
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27834
- const itemContext = $322c88a641701f3b$var$useNavigationMenuItemContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27835
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(itemContext.contentRef, forwardedRef);
27836
- const open = itemContext.value === context.value;
27837
- const commonProps = {
27838
- value: itemContext.value,
27839
- triggerRef: itemContext.triggerRef,
27840
- focusProxyRef: itemContext.focusProxyRef,
27841
- wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
27842
- onContentFocusOutside: itemContext.onContentFocusOutside,
27843
- onRootContentClose: itemContext.onRootContentClose,
27844
- ...contentProps
27845
- };
27846
- return !context.viewport ? /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
27847
- present: forceMount || open
27848
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({
27849
- "data-state": $322c88a641701f3b$var$getOpenState(open)
27850
- }, commonProps, {
27851
- ref: composedRefs,
27852
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerEnter, context.onContentEnter),
27853
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave)),
27854
- style: {
27855
- // Prevent interaction when animating out
27856
- pointerEvents: !open && context.isRootMenu ? "none" : void 0,
27857
- ...commonProps.style
27858
- }
27859
- }))) : /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$ViewportContentMounter, _extends({
27860
- forceMount
27861
- }, commonProps, {
27862
- ref: composedRefs
27863
- }));
27864
- });
27865
- var $322c88a641701f3b$var$ViewportContentMounter = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27866
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, props.__scopeNavigationMenu);
27867
- const { onViewportContentChange, onViewportContentRemove } = context;
27868
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
27869
- onViewportContentChange(props.value, {
27870
- ref: forwardedRef,
27871
- ...props
27872
- });
27873
- }, [
27874
- props,
27875
- forwardedRef,
27876
- onViewportContentChange
27877
- ]);
27878
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
27879
- return () => onViewportContentRemove(props.value);
27880
- }, [
27881
- props.value,
27882
- onViewportContentRemove
27883
- ]);
27884
- return null;
27885
- });
27886
- var $322c88a641701f3b$var$ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
27887
- var $322c88a641701f3b$var$NavigationMenuContentImpl = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
27888
- const { __scopeNavigationMenu, value, triggerRef, focusProxyRef, wasEscapeCloseRef, onRootContentClose, onContentFocusOutside, ...contentProps } = props;
27889
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, __scopeNavigationMenu);
27890
- const ref = $yHMN2$useRef(null);
27891
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(ref, forwardedRef);
27892
- const triggerId = $322c88a641701f3b$var$makeTriggerId(context.baseId, value);
27893
- const contentId = $322c88a641701f3b$var$makeContentId(context.baseId, value);
27894
- const getItems = $322c88a641701f3b$var$useCollection(__scopeNavigationMenu);
27895
- const prevMotionAttributeRef = $yHMN2$useRef(null);
27896
- const { onItemDismiss } = context;
27897
- $yHMN2$useEffect(() => {
27898
- const content = ref.current;
27899
- if (context.isRootMenu && content) {
27900
- const handleClose = () => {
27901
- var _triggerRef$current;
27902
- onItemDismiss();
27903
- onRootContentClose();
27904
- if (content.contains(document.activeElement)) (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
27905
- };
27906
- content.addEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
27907
- return () => content.removeEventListener($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, handleClose);
27908
- }
27909
- }, [
27910
- context.isRootMenu,
27911
- props.value,
27912
- triggerRef,
27913
- onItemDismiss,
27914
- onRootContentClose
27915
- ]);
27916
- const motionAttribute = $yHMN2$useMemo(() => {
27917
- const items = getItems();
27918
- const values = items.map(
27919
- (item) => item.value
27920
- );
27921
- if (context.dir === "rtl") values.reverse();
27922
- const index = values.indexOf(context.value);
27923
- const prevIndex = values.indexOf(context.previousValue);
27924
- const isSelected = value === context.value;
27925
- const wasSelected = prevIndex === values.indexOf(value);
27926
- if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;
27927
- const attribute = (() => {
27928
- if (index !== prevIndex) {
27929
- if (isSelected && prevIndex !== -1) return index > prevIndex ? "from-end" : "from-start";
27930
- if (wasSelected && index !== -1) return index > prevIndex ? "to-start" : "to-end";
27931
- }
27932
- return null;
27933
- })();
27934
- prevMotionAttributeRef.current = attribute;
27935
- return attribute;
27936
- }, [
27937
- context.previousValue,
27938
- context.value,
27939
- context.dir,
27940
- getItems,
27941
- value
27942
- ]);
27943
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroup, {
27944
- asChild: true
27945
- }, /* @__PURE__ */ $yHMN2$createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
27946
- id: contentId,
27947
- "aria-labelledby": triggerId,
27948
- "data-motion": motionAttribute,
27949
- "data-orientation": context.orientation
27950
- }, contentProps, {
27951
- ref: composedRefs,
27952
- onDismiss: () => {
27953
- var _ref$current;
27954
- const rootContentDismissEvent = new Event($322c88a641701f3b$var$ROOT_CONTENT_DISMISS, {
27955
- bubbles: true,
27956
- cancelable: true
27957
- });
27958
- (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.dispatchEvent(rootContentDismissEvent);
27959
- },
27960
- onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event) => {
27961
- var _context$rootNavigati;
27962
- onContentFocusOutside();
27963
- const target = event.target;
27964
- if ((_context$rootNavigati = context.rootNavigationMenu) !== null && _context$rootNavigati !== void 0 && _context$rootNavigati.contains(target)) event.preventDefault();
27965
- }),
27966
- onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event) => {
27967
- var _context$viewport;
27968
- const target = event.target;
27969
- const isTrigger = getItems().some((item) => {
27970
- var _item$ref$current;
27971
- return (_item$ref$current = item.ref.current) === null || _item$ref$current === void 0 ? void 0 : _item$ref$current.contains(target);
27972
- });
27973
- const isRootViewport = context.isRootMenu && ((_context$viewport = context.viewport) === null || _context$viewport === void 0 ? void 0 : _context$viewport.contains(target));
27974
- if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();
27975
- }),
27976
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
27977
- const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
27978
- const isTabKey = event.key === "Tab" && !isMetaKey;
27979
- if (isTabKey) {
27980
- const candidates = $322c88a641701f3b$var$getTabbableCandidates(event.currentTarget);
27981
- const focusedElement = document.activeElement;
27982
- const index = candidates.findIndex(
27983
- (candidate) => candidate === focusedElement
27984
- );
27985
- const isMovingBackwards = event.shiftKey;
27986
- const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);
27987
- if ($322c88a641701f3b$var$focusFirst(nextCandidates))
27988
- event.preventDefault();
27989
- else {
27990
- var _focusProxyRef$curren;
27991
- (_focusProxyRef$curren = focusProxyRef.current) === null || _focusProxyRef$curren === void 0 || _focusProxyRef$curren.focus();
27992
- }
27993
- }
27994
- }),
27995
- onEscapeKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onEscapeKeyDown, (event) => {
27996
- wasEscapeCloseRef.current = true;
27997
- })
27998
- })));
27999
- });
28000
- var $322c88a641701f3b$var$VIEWPORT_NAME = "NavigationMenuViewport";
28001
- var $322c88a641701f3b$export$ee880b97cc6d44a5 = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
28002
- const { forceMount, ...viewportProps } = props;
28003
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, props.__scopeNavigationMenu);
28004
- const open = Boolean(context.value);
28005
- return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
28006
- present: forceMount || open
28007
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuViewportImpl, _extends({}, viewportProps, {
28008
- ref: forwardedRef
28009
- })));
28010
- });
28011
- var $322c88a641701f3b$var$NavigationMenuViewportImpl = /* @__PURE__ */ $yHMN2$forwardRef((props1, forwardedRef) => {
28012
- const { __scopeNavigationMenu, children, ...viewportImplProps } = props1;
28013
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$VIEWPORT_NAME, __scopeNavigationMenu);
28014
- const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.onViewportChange);
28015
- const viewportContentContext = $322c88a641701f3b$var$useViewportContentContext($322c88a641701f3b$var$CONTENT_NAME, props1.__scopeNavigationMenu);
28016
- const [size, setSize] = $yHMN2$useState(null);
28017
- const [content, setContent] = $yHMN2$useState(null);
28018
- const viewportWidth = size ? (size === null || size === void 0 ? void 0 : size.width) + "px" : void 0;
28019
- const viewportHeight = size ? (size === null || size === void 0 ? void 0 : size.height) + "px" : void 0;
28020
- const open = Boolean(context.value);
28021
- const activeContentValue = open ? context.value : context.previousValue;
28022
- const handleSizeChange = () => {
28023
- if (content) setSize({
28024
- width: content.offsetWidth,
28025
- height: content.offsetHeight
28026
- });
28027
- };
28028
- $322c88a641701f3b$var$useResizeObserver(content, handleSizeChange);
28029
- return /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
28030
- "data-state": $322c88a641701f3b$var$getOpenState(open),
28031
- "data-orientation": context.orientation
28032
- }, viewportImplProps, {
28033
- ref: composedRefs,
28034
- style: {
28035
- // Prevent interaction when animating out
28036
- pointerEvents: !open && context.isRootMenu ? "none" : void 0,
28037
- ["--radix-navigation-menu-viewport-width"]: viewportWidth,
28038
- ["--radix-navigation-menu-viewport-height"]: viewportHeight,
28039
- ...viewportImplProps.style
28040
- },
28041
- onPointerEnter: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerEnter, context.onContentEnter),
28042
- onPointerLeave: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props1.onPointerLeave, $322c88a641701f3b$var$whenMouse(context.onContentLeave))
28043
- }), Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props }]) => {
28044
- const isActive = activeContentValue === value;
28045
- return /* @__PURE__ */ $yHMN2$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
28046
- key: value,
28047
- present: forceMount || isActive
28048
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$NavigationMenuContentImpl, _extends({}, props, {
28049
- ref: $6ed0406888f73fc4$export$43e446d32b3d21af(ref, (node) => {
28050
- if (isActive && node) setContent(node);
28051
- })
28052
- })));
28053
- }));
28054
- });
28055
- var $322c88a641701f3b$var$FOCUS_GROUP_NAME = "FocusGroup";
28056
- var $322c88a641701f3b$var$FocusGroup = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
28057
- const { __scopeNavigationMenu, ...groupProps } = props;
28058
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_NAME, __scopeNavigationMenu);
28059
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Provider, {
28060
- scope: __scopeNavigationMenu
28061
- }, /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.Slot, {
28062
- scope: __scopeNavigationMenu
28063
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
28064
- dir: context.dir
28065
- }, groupProps, {
28066
- ref: forwardedRef
28067
- }))));
28068
- });
28069
- var $322c88a641701f3b$var$ARROW_KEYS = [
28070
- "ArrowRight",
28071
- "ArrowLeft",
28072
- "ArrowUp",
28073
- "ArrowDown"
28074
- ];
28075
- var $322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
28076
- var $322c88a641701f3b$var$FocusGroupItem = /* @__PURE__ */ $yHMN2$forwardRef((props, forwardedRef) => {
28077
- const { __scopeNavigationMenu, ...groupProps } = props;
28078
- const getItems = $322c88a641701f3b$var$useFocusGroupCollection(__scopeNavigationMenu);
28079
- const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
28080
- return /* @__PURE__ */ $yHMN2$createElement($322c88a641701f3b$var$FocusGroupCollection.ItemSlot, {
28081
- scope: __scopeNavigationMenu
28082
- }, /* @__PURE__ */ $yHMN2$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({}, groupProps, {
28083
- ref: forwardedRef,
28084
- onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event) => {
28085
- const isFocusNavigationKey = [
28086
- "Home",
28087
- "End",
28088
- ...$322c88a641701f3b$var$ARROW_KEYS
28089
- ].includes(event.key);
28090
- if (isFocusNavigationKey) {
28091
- let candidateNodes = getItems().map(
28092
- (item) => item.ref.current
28093
- );
28094
- const prevItemKey = context.dir === "rtl" ? "ArrowRight" : "ArrowLeft";
28095
- const prevKeys = [
28096
- prevItemKey,
28097
- "ArrowUp",
28098
- "End"
28099
- ];
28100
- if (prevKeys.includes(event.key)) candidateNodes.reverse();
28101
- if ($322c88a641701f3b$var$ARROW_KEYS.includes(event.key)) {
28102
- const currentIndex = candidateNodes.indexOf(event.currentTarget);
28103
- candidateNodes = candidateNodes.slice(currentIndex + 1);
28104
- }
28105
- setTimeout(
28106
- () => $322c88a641701f3b$var$focusFirst(candidateNodes)
28107
- );
28108
- event.preventDefault();
28109
- }
28110
- })
28111
- })));
28112
- });
28113
- function $322c88a641701f3b$var$getTabbableCandidates(container) {
28114
- const nodes = [];
28115
- const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
28116
- acceptNode: (node) => {
28117
- const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
28118
- if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
28119
- return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
28120
- }
28121
- });
28122
- while (walker.nextNode()) nodes.push(walker.currentNode);
28123
- return nodes;
28124
- }
28125
- function $322c88a641701f3b$var$focusFirst(candidates) {
28126
- const previouslyFocusedElement = document.activeElement;
28127
- return candidates.some((candidate) => {
28128
- if (candidate === previouslyFocusedElement) return true;
28129
- candidate.focus();
28130
- return document.activeElement !== previouslyFocusedElement;
28131
- });
28132
- }
28133
- function $322c88a641701f3b$var$removeFromTabOrder(candidates) {
28134
- candidates.forEach((candidate) => {
28135
- candidate.dataset.tabindex = candidate.getAttribute("tabindex") || "";
28136
- candidate.setAttribute("tabindex", "-1");
28137
- });
28138
- return () => {
28139
- candidates.forEach((candidate) => {
28140
- const prevTabIndex = candidate.dataset.tabindex;
28141
- candidate.setAttribute("tabindex", prevTabIndex);
28142
- });
28143
- };
28144
- }
28145
- function $322c88a641701f3b$var$useResizeObserver(element, onResize) {
28146
- const handleResize = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onResize);
28147
- $9f79659886946c16$export$e5c5a5f917a5871c(() => {
28148
- let rAF = 0;
28149
- if (element) {
28150
- const resizeObserver = new ResizeObserver(() => {
28151
- cancelAnimationFrame(rAF);
28152
- rAF = window.requestAnimationFrame(handleResize);
28153
- });
28154
- resizeObserver.observe(element);
28155
- return () => {
28156
- window.cancelAnimationFrame(rAF);
28157
- resizeObserver.unobserve(element);
28158
- };
28159
- }
28160
- }, [
28161
- element,
28162
- handleResize
28163
- ]);
28164
- }
28165
- function $322c88a641701f3b$var$getOpenState(open) {
28166
- return open ? "open" : "closed";
28167
- }
28168
- function $322c88a641701f3b$var$makeTriggerId(baseId, value) {
28169
- return `${baseId}-trigger-${value}`;
28170
- }
28171
- function $322c88a641701f3b$var$makeContentId(baseId, value) {
28172
- return `${baseId}-content-${value}`;
28173
- }
28174
- function $322c88a641701f3b$var$whenMouse(handler) {
28175
- return (event) => event.pointerType === "mouse" ? handler(event) : void 0;
28176
- }
28177
- var $322c88a641701f3b$export$be92b6f5f03c0fe9 = $322c88a641701f3b$export$5b2278cf1e8bcae2;
28178
- var $322c88a641701f3b$export$54c2e3dc7acea9f5 = $322c88a641701f3b$export$c361068a95fd2286;
28179
- var $322c88a641701f3b$export$6d08773d2e66f8f2 = $322c88a641701f3b$export$ffdbb83a2de845c2;
28180
- var $322c88a641701f3b$export$41fb9f06171c75f4 = $322c88a641701f3b$export$37fe8002734d8f2;
28181
- var $322c88a641701f3b$export$a6c7ac8248d6e38a = $322c88a641701f3b$export$6893bf21536567da;
28182
- var $322c88a641701f3b$export$adb584737d712b70 = $322c88a641701f3b$export$8ddb526647c0d8fb;
28183
- var $322c88a641701f3b$export$7c6e2c02157bb7d2 = $322c88a641701f3b$export$38e00e996c2f93f7;
28184
- var $322c88a641701f3b$export$d5c6c08dc2d3ca7 = $322c88a641701f3b$export$ee880b97cc6d44a5;
28185
-
28186
27205
  // src/components/NavigationMenu.tsx
28187
27206
  var import_classnames33 = __toESM(require_classnames());
28188
27207
 
27208
+ // src/components/hooks/useNavigationMenu.ts
27209
+ var initialState3 = { activeMenu: null };
27210
+ var store3 = create(() => ({ ...initialState3 }));
27211
+ function setActiveMenu(activeMenu) {
27212
+ store3.setState({ activeMenu });
27213
+ }
27214
+ var useNavigationMenu = store3;
27215
+
28189
27216
  // src/components/NavigationMenu.module.css
28190
27217
  var NavigationMenu_default = {
28191
- root: "NavigationMenu_root",
28192
- list: "NavigationMenu_list",
28193
- trigger: "NavigationMenu_trigger",
28194
- link: "NavigationMenu_link",
28195
- content: "NavigationMenu_content",
28196
- enterFromLeft: "NavigationMenu_enterFromLeft",
28197
- enterFromRight: "NavigationMenu_enterFromRight",
28198
- exitToLeft: "NavigationMenu_exitToLeft",
28199
- exitToRight: "NavigationMenu_exitToRight",
28200
- indicator: "NavigationMenu_indicator",
28201
- fadeIn: "NavigationMenu_fadeIn",
28202
- fadeOut: "NavigationMenu_fadeOut",
28203
- viewport: "NavigationMenu_viewport",
28204
- scaleIn: "NavigationMenu_scaleIn",
28205
- scaleOut: "NavigationMenu_scaleOut",
28206
- wrapper: "NavigationMenu_wrapper",
28207
- arrow: "NavigationMenu_arrow"
27218
+ nav: "NavigationMenu_nav",
27219
+ item: "NavigationMenu_item",
27220
+ icon: "NavigationMenu_icon"
28208
27221
  };
28209
27222
 
28210
27223
  // src/components/NavigationMenu.tsx
28211
27224
  import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
28212
- function NavigationMenu({ showArrow = true, children, ...props }) {
28213
- return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$be92b6f5f03c0fe9, { ...props, className: NavigationMenu_default.root, children: [
28214
- /* @__PURE__ */ jsxs22($322c88a641701f3b$export$54c2e3dc7acea9f5, { className: NavigationMenu_default.list, children: [
28215
- children,
28216
- showArrow && /* @__PURE__ */ jsx39($322c88a641701f3b$export$adb584737d712b70, { className: NavigationMenu_default.indicator, children: /* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.arrow }) })
28217
- ] }),
28218
- /* @__PURE__ */ jsx39("div", { className: NavigationMenu_default.wrapper, children: /* @__PURE__ */ jsx39($322c88a641701f3b$export$d5c6c08dc2d3ca7, { className: NavigationMenu_default.viewport }) })
28219
- ] });
28220
- }
28221
- function NavigationMenuItem({ children, className, ...props }) {
28222
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$6d08773d2e66f8f2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
28223
- }
28224
- function NavigationMenuTrigger({
28225
- children,
27225
+ function NavigationMenu({
27226
+ showArrow = true,
28226
27227
  className,
27228
+ children,
28227
27229
  ...props
28228
27230
  }) {
28229
- return /* @__PURE__ */ jsxs22($322c88a641701f3b$export$41fb9f06171c75f4, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.trigger, className), children: [
28230
- children,
28231
- /* @__PURE__ */ jsx39(Icon, { rotate: 90, size: "xs", children: /* @__PURE__ */ jsx39(Icons.Chevron, {}) })
28232
- ] });
27231
+ return /* @__PURE__ */ jsx39("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.nav, className), children });
28233
27232
  }
28234
- function NavigationMenuContent({
27233
+ function NavigationMenuItem({
27234
+ label,
28235
27235
  children,
28236
27236
  className,
28237
27237
  ...props
28238
27238
  }) {
28239
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$7c6e2c02157bb7d2, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.content, className), children });
28240
- }
28241
- function NavigationMenuLink({ children, className, ...props }) {
28242
- return /* @__PURE__ */ jsx39($322c88a641701f3b$export$a6c7ac8248d6e38a, { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.link, className), children });
27239
+ const { activeMenu } = useNavigationMenu();
27240
+ if (label) {
27241
+ return /* @__PURE__ */ jsxs22(HoverTrigger, { isOpen: activeMenu === label, onHoverStart: () => setActiveMenu(label), children: [
27242
+ /* @__PURE__ */ jsxs22("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children: [
27243
+ /* @__PURE__ */ jsx39(Text, { children: label }),
27244
+ /* @__PURE__ */ jsx39(Icon, { rotate: 90, size: "xs", className: NavigationMenu_default.icon, children: /* @__PURE__ */ jsx39(Icons.Chevron, {}) })
27245
+ ] }),
27246
+ children
27247
+ ] });
27248
+ }
27249
+ return /* @__PURE__ */ jsx39("div", { ...props, className: (0, import_classnames33.default)(NavigationMenu_default.item, className), children });
28243
27250
  }
28244
27251
 
28245
27252
  // src/components/PasswordField.tsx
28246
- import { useState as useState8, forwardRef as forwardRef4 } from "react";
27253
+ import { useState as useState8, forwardRef as forwardRef5 } from "react";
28247
27254
  var import_classnames34 = __toESM(require_classnames());
28248
27255
 
28249
27256
  // src/components/PasswordField.module.css
@@ -28253,7 +27260,7 @@ var PasswordField_default = {
28253
27260
 
28254
27261
  // src/components/PasswordField.tsx
28255
27262
  import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
28256
- var PasswordField = forwardRef4(
27263
+ var PasswordField = forwardRef5(
28257
27264
  ({ label, className, ...props }, ref) => {
28258
27265
  const [show, setShow] = useState8(false);
28259
27266
  const type = show ? "text" : "password";
@@ -28294,10 +27301,10 @@ var ProgressBar_default = {
28294
27301
  };
28295
27302
 
28296
27303
  // src/components/ProgressBar.tsx
28297
- import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
27304
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
28298
27305
  function ProgressBar({ className, showValue, ...props }) {
28299
27306
  return /* @__PURE__ */ jsx42($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames36.default)(ProgressBar_default.progressbar, className), children: ({ percentage = 0, valueText }) => {
28300
- return /* @__PURE__ */ jsxs24(Fragment5, { children: [
27307
+ return /* @__PURE__ */ jsxs24(Fragment6, { children: [
28301
27308
  /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.track, children: /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.fill, style: { width: `${percentage}%` } }) }),
28302
27309
  showValue && /* @__PURE__ */ jsx42("div", { className: ProgressBar_default.value, children: valueText })
28303
27310
  ] });
@@ -28316,13 +27323,13 @@ var ProgressCircle_default = {
28316
27323
  };
28317
27324
 
28318
27325
  // src/components/ProgressCircle.tsx
28319
- import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
27326
+ import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
28320
27327
  function ProgressCircle({ className, showValue, ...props }) {
28321
27328
  return /* @__PURE__ */ jsx43($0393f8ab869a0f1a$export$c17561cb55d4db30, { ...props, className: (0, import_classnames37.default)(ProgressCircle_default.progresscircle, className), children: ({ percentage = 0, valueText }) => {
28322
27329
  const radius = 45;
28323
27330
  const circumference = radius * 2 * Math.PI;
28324
27331
  const offset = circumference - percentage / 100 * circumference;
28325
- return /* @__PURE__ */ jsxs25(Fragment6, { children: [
27332
+ return /* @__PURE__ */ jsxs25(Fragment7, { children: [
28326
27333
  /* @__PURE__ */ jsxs25("svg", { viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", children: [
28327
27334
  /* @__PURE__ */ jsx43("circle", { className: ProgressCircle_default.track, cx: "50", cy: "50", r: "45" }),
28328
27335
  /* @__PURE__ */ jsx43(
@@ -28343,7 +27350,7 @@ function ProgressCircle({ className, showValue, ...props }) {
28343
27350
  }
28344
27351
 
28345
27352
  // src/components/RadioGroup.tsx
28346
- import { forwardRef as forwardRef5 } from "react";
27353
+ import { forwardRef as forwardRef6 } from "react";
28347
27354
  var import_classnames38 = __toESM(require_classnames());
28348
27355
 
28349
27356
  // src/components/RadioGroup.module.css
@@ -28354,7 +27361,7 @@ var RadioGroup_default = {
28354
27361
 
28355
27362
  // src/components/RadioGroup.tsx
28356
27363
  import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
28357
- var RadioGroup = forwardRef5(
27364
+ var RadioGroup = forwardRef6(
28358
27365
  ({ label, children, className, ...props }, ref) => {
28359
27366
  return /* @__PURE__ */ jsxs26($b6c3ddc6086f204d$export$a98f0dcb43a68a25, { ...props, ref, className: (0, import_classnames38.default)(RadioGroup_default.radiogroup, className), children: [
28360
27367
  label && /* @__PURE__ */ jsx44(Label, { children: label }),
@@ -28367,7 +27374,7 @@ function Radio({ children, className, ...props }) {
28367
27374
  }
28368
27375
 
28369
27376
  // src/components/SearchField.tsx
28370
- import { useState as useState9, useEffect as useEffect4, forwardRef as forwardRef6 } from "react";
27377
+ import { useState as useState9, useEffect as useEffect5, forwardRef as forwardRef7 } from "react";
28371
27378
  var import_classnames39 = __toESM(require_classnames());
28372
27379
 
28373
27380
  // src/components/SearchField.module.css
@@ -28378,8 +27385,8 @@ var SearchField_default = {
28378
27385
  };
28379
27386
 
28380
27387
  // src/components/SearchField.tsx
28381
- import { Fragment as Fragment7, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
28382
- var SearchField = forwardRef6(
27388
+ import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
27389
+ var SearchField = forwardRef7(
28383
27390
  ({ label, value, delay = 0, onSearch, className, ...props }, ref) => {
28384
27391
  const [search, setSearch] = useState9(value ?? "");
28385
27392
  const searchValue = useDebounce(search, delay);
@@ -28394,13 +27401,13 @@ var SearchField = forwardRef6(
28394
27401
  setSearch("");
28395
27402
  onSearch?.("");
28396
27403
  };
28397
- useEffect4(() => {
27404
+ useEffect5(() => {
28398
27405
  if (delay > 0) {
28399
27406
  onSearch?.(searchValue);
28400
27407
  }
28401
27408
  }, [searchValue, delay, onSearch]);
28402
27409
  return /* @__PURE__ */ jsx45($440f4836bcb56932$export$b94867ecbd698f21, { ...props, ref, className: (0, import_classnames39.default)(Input_default.field, className), children: ({ state }) => {
28403
- return /* @__PURE__ */ jsxs27(Fragment7, { children: [
27410
+ return /* @__PURE__ */ jsxs27(Fragment8, { children: [
28404
27411
  label && /* @__PURE__ */ jsx45(Label, { children: label }),
28405
27412
  /* @__PURE__ */ jsxs27("div", { className: Input_default.row, children: [
28406
27413
  /* @__PURE__ */ jsx45(Icons.MagnifyingGlass, { className: (0, import_classnames39.default)(SearchField_default.search, Input_default.icon) }),
@@ -28427,7 +27434,7 @@ var SearchField = forwardRef6(
28427
27434
 
28428
27435
  // src/components/Select.tsx
28429
27436
  var import_classnames40 = __toESM(require_classnames());
28430
- import { forwardRef as forwardRef7 } from "react";
27437
+ import { forwardRef as forwardRef8 } from "react";
28431
27438
 
28432
27439
  // src/components/Select.module.css
28433
27440
  var Select_default = {
@@ -28439,7 +27446,7 @@ var Select_default = {
28439
27446
 
28440
27447
  // src/components/Select.tsx
28441
27448
  import { jsx as jsx46, jsxs as jsxs28 } from "react/jsx-runtime";
28442
- var Select = forwardRef7(
27449
+ var Select = forwardRef8(
28443
27450
  ({
28444
27451
  children,
28445
27452
  items = [],
@@ -28475,7 +27482,7 @@ var Select = forwardRef7(
28475
27482
  );
28476
27483
 
28477
27484
  // src/components/Slider.tsx
28478
- import { forwardRef as forwardRef8 } from "react";
27485
+ import { forwardRef as forwardRef9 } from "react";
28479
27486
  var import_classnames41 = __toESM(require_classnames());
28480
27487
 
28481
27488
  // src/components/Slider.module.css
@@ -28488,8 +27495,8 @@ var Slider_default = {
28488
27495
  };
28489
27496
 
28490
27497
  // src/components/Slider.tsx
28491
- import { Fragment as Fragment8, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
28492
- var Slider = forwardRef8(
27498
+ import { Fragment as Fragment9, jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
27499
+ var Slider = forwardRef9(
28493
27500
  ({ className, showValue = true, label, ...props }, ref) => {
28494
27501
  return /* @__PURE__ */ jsxs29($6f909507e6374d18$export$472062a354075cee, { ...props, ref, className: (0, import_classnames41.default)(Slider_default.slider, className), children: [
28495
27502
  /* @__PURE__ */ jsxs29("div", { className: Slider_default.header, children: [
@@ -28498,7 +27505,7 @@ var Slider = forwardRef8(
28498
27505
  ] }),
28499
27506
  /* @__PURE__ */ jsx47($6f909507e6374d18$export$105594979f116971, { className: Slider_default.track, children: ({ state }) => {
28500
27507
  const isHorizontal = state.orientation === "horizontal";
28501
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
27508
+ return /* @__PURE__ */ jsxs29(Fragment9, { children: [
28502
27509
  /* @__PURE__ */ jsx47(
28503
27510
  "div",
28504
27511
  {
@@ -28547,7 +27554,7 @@ function StatusLight(props) {
28547
27554
  }
28548
27555
 
28549
27556
  // src/components/Switch.tsx
28550
- import { forwardRef as forwardRef9 } from "react";
27557
+ import { forwardRef as forwardRef10 } from "react";
28551
27558
  var import_classnames43 = __toESM(require_classnames());
28552
27559
 
28553
27560
  // src/components/Switch.module.css
@@ -28558,11 +27565,11 @@ var Switch_default = {
28558
27565
  };
28559
27566
 
28560
27567
  // src/components/Switch.tsx
28561
- import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
28562
- var Switch = forwardRef9(
27568
+ import { Fragment as Fragment10, jsx as jsx49, jsxs as jsxs31 } from "react/jsx-runtime";
27569
+ var Switch = forwardRef10(
28563
27570
  ({ label, children, className, ...props }, ref) => {
28564
27571
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
28565
- return /* @__PURE__ */ jsxs31(Fragment9, { children: [
27572
+ return /* @__PURE__ */ jsxs31(Fragment10, { children: [
28566
27573
  label && /* @__PURE__ */ jsx49(Label, { children: label }),
28567
27574
  /* @__PURE__ */ jsxs31(
28568
27575
  $8e59e948500a8fe1$export$b5d5cf8927ab7262,
@@ -28622,7 +27629,7 @@ function TextOverflow({ asChild, children, className, ...props }) {
28622
27629
 
28623
27630
  // src/components/TextArea.tsx
28624
27631
  var import_classnames45 = __toESM(require_classnames());
28625
- import { forwardRef as forwardRef10 } from "react";
27632
+ import { forwardRef as forwardRef11 } from "react";
28626
27633
 
28627
27634
  // src/components/TextArea.module.css
28628
27635
  var TextArea_default = {
@@ -28634,17 +27641,20 @@ var TextArea_default = {
28634
27641
 
28635
27642
  // src/components/TextArea.tsx
28636
27643
  import { jsx as jsx52 } from "react/jsx-runtime";
28637
- var TextArea = forwardRef10(({ resize, className, ...props }, ref) => {
28638
- return /* @__PURE__ */ jsx52(
28639
- TextField,
28640
- {
28641
- ...props,
28642
- ref,
28643
- className: (0, import_classnames45.default)(resize && TextArea_default[`resize-${resize}`]),
28644
- asTextArea: true
28645
- }
28646
- );
28647
- });
27644
+ var TextArea = forwardRef11(
27645
+ ({ resize, className, children, ...props }, ref) => {
27646
+ return /* @__PURE__ */ jsx52(
27647
+ TextField,
27648
+ {
27649
+ ...props,
27650
+ ref,
27651
+ className: (0, import_classnames45.default)(resize && TextArea_default[`resize-${resize}`]),
27652
+ asChild: true,
27653
+ children: /* @__PURE__ */ jsx52($216918bed6669f72$export$f5c9f3c2c4054eec, { children })
27654
+ }
27655
+ );
27656
+ }
27657
+ );
28648
27658
 
28649
27659
  // src/components/Toast.tsx
28650
27660
  var import_classnames46 = __toESM(require_classnames());
@@ -28746,7 +27756,7 @@ function composeContextScopes(...scopes) {
28746
27756
 
28747
27757
  // node_modules/@radix-ui/react-toast/node_modules/@radix-ui/react-slot/dist/index.mjs
28748
27758
  import * as React7 from "react";
28749
- import { Fragment as Fragment10, jsx as jsx54 } from "react/jsx-runtime";
27759
+ import { Fragment as Fragment11, jsx as jsx54 } from "react/jsx-runtime";
28750
27760
  var Slot = React7.forwardRef((props, forwardedRef) => {
28751
27761
  const { children, ...slotProps } = props;
28752
27762
  const childrenArray = React7.Children.toArray(children);
@@ -28780,7 +27790,7 @@ var SlotClone = React7.forwardRef((props, forwardedRef) => {
28780
27790
  });
28781
27791
  SlotClone.displayName = "SlotClone";
28782
27792
  var Slottable = ({ children }) => {
28783
- return /* @__PURE__ */ jsx54(Fragment10, { children });
27793
+ return /* @__PURE__ */ jsx54(Fragment11, { children });
28784
27794
  };
28785
27795
  function isSlottable(child) {
28786
27796
  return React7.isValidElement(child) && child.type === Slottable;
@@ -29183,11 +28193,11 @@ Portal.displayName = PORTAL_NAME;
29183
28193
  import * as React22 from "react";
29184
28194
  import * as ReactDOM3 from "react-dom";
29185
28195
  import * as React15 from "react";
29186
- function useStateMachine(initialState3, machine) {
28196
+ function useStateMachine(initialState4, machine) {
29187
28197
  return React15.useReducer((state, event) => {
29188
28198
  const nextState = machine[state][event];
29189
28199
  return nextState ?? state;
29190
- }, initialState3);
28200
+ }, initialState4);
29191
28201
  }
29192
28202
  var Presence = (props) => {
29193
28203
  const { present, children } = props;
@@ -29203,8 +28213,8 @@ function usePresence(present) {
29203
28213
  const stylesRef = React22.useRef({});
29204
28214
  const prevPresentRef = React22.useRef(present);
29205
28215
  const prevAnimationNameRef = React22.useRef("none");
29206
- const initialState3 = present ? "mounted" : "unmounted";
29207
- const [state, send] = useStateMachine(initialState3, {
28216
+ const initialState4 = present ? "mounted" : "unmounted";
28217
+ const [state, send] = useStateMachine(initialState4, {
29208
28218
  mounted: {
29209
28219
  UNMOUNT: "unmounted",
29210
28220
  ANIMATION_OUT: "unmountSuspended"
@@ -29369,7 +28379,7 @@ var VisuallyHidden = React17.forwardRef(
29369
28379
  VisuallyHidden.displayName = NAME;
29370
28380
 
29371
28381
  // node_modules/@radix-ui/react-toast/dist/index.mjs
29372
- import { Fragment as Fragment11, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
28382
+ import { Fragment as Fragment12, jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
29373
28383
  var PROVIDER_NAME = "ToastProvider";
29374
28384
  var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
29375
28385
  var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
@@ -29715,7 +28725,7 @@ var ToastImpl = React18.forwardRef(
29715
28725
  return node ? getAnnounceTextContent(node) : null;
29716
28726
  }, [node]);
29717
28727
  if (!context.viewport) return null;
29718
- return /* @__PURE__ */ jsxs32(Fragment11, { children: [
28728
+ return /* @__PURE__ */ jsxs32(Fragment12, { children: [
29719
28729
  announceTextContent && /* @__PURE__ */ jsx60(
29720
28730
  ToastAnnounce,
29721
28731
  {
@@ -29835,7 +28845,7 @@ var ToastAnnounce = (props) => {
29835
28845
  const timer = window.setTimeout(() => setIsAnnounced(true), 1e3);
29836
28846
  return () => window.clearTimeout(timer);
29837
28847
  }, []);
29838
- return isAnnounced ? null : /* @__PURE__ */ jsx60(Portal, { asChild: true, children: /* @__PURE__ */ jsx60(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs32(Fragment11, { children: [
28848
+ return isAnnounced ? null : /* @__PURE__ */ jsx60(Portal, { asChild: true, children: /* @__PURE__ */ jsx60(VisuallyHidden, { ...announceProps, children: renderAnnounceText && /* @__PURE__ */ jsxs32(Fragment12, { children: [
29839
28849
  context.label,
29840
28850
  " ",
29841
28851
  children
@@ -29996,7 +29006,7 @@ var Toast_default = {
29996
29006
  };
29997
29007
 
29998
29008
  // src/components/Toast.tsx
29999
- import { Fragment as Fragment12, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
29009
+ import { Fragment as Fragment13, jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
30000
29010
  import { createElement as createElement4 } from "react";
30001
29011
  var icons = {
30002
29012
  info: Icons.Info,
@@ -30022,7 +29032,7 @@ function Toast2({
30022
29032
  }
30023
29033
  function Toaster(props) {
30024
29034
  const { toasts } = useToast();
30025
- return /* @__PURE__ */ jsxs33(Fragment12, { children: [
29035
+ return /* @__PURE__ */ jsxs33(Fragment13, { children: [
30026
29036
  toasts.map(({ id, message, props: props2 }) => {
30027
29037
  return /* @__PURE__ */ createElement4(Toast2, { ...props2, key: id, description: message });
30028
29038
  }),
@@ -30031,7 +29041,7 @@ function Toaster(props) {
30031
29041
  }
30032
29042
 
30033
29043
  // src/components/Toggle.tsx
30034
- import { forwardRef as forwardRef17 } from "react";
29044
+ import { forwardRef as forwardRef18 } from "react";
30035
29045
  var import_classnames47 = __toESM(require_classnames());
30036
29046
 
30037
29047
  // src/components/Toggle.module.css
@@ -30040,11 +29050,11 @@ var Toggle_default = {
30040
29050
  };
30041
29051
 
30042
29052
  // src/components/Toggle.tsx
30043
- import { Fragment as Fragment13, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
30044
- var Toggle = forwardRef17(
29053
+ import { Fragment as Fragment14, jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
29054
+ var Toggle = forwardRef18(
30045
29055
  ({ label, children, className, ...props }, ref) => {
30046
29056
  const isSelected = typeof props.value !== "undefined" ? !!props.value : void 0;
30047
- return /* @__PURE__ */ jsxs34(Fragment13, { children: [
29057
+ return /* @__PURE__ */ jsxs34(Fragment14, { children: [
30048
29058
  label && /* @__PURE__ */ jsx62(Label, { children: label }),
30049
29059
  /* @__PURE__ */ jsx62(
30050
29060
  $efde0372d7a700fe$export$d2b052e7b4be1756,
@@ -30556,10 +29566,7 @@ export {
30556
29566
  $3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger,
30557
29567
  Modal,
30558
29568
  NavigationMenu,
30559
- NavigationMenuContent,
30560
29569
  NavigationMenuItem,
30561
- NavigationMenuLink,
30562
- NavigationMenuTrigger,
30563
29570
  Page,
30564
29571
  PasswordField,
30565
29572
  Popover,