@andrilla/mado-ui 1.0.8 → 1.0.10

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.
@@ -1,4 +1,4 @@
1
- 'use client'
1
+ "use client";
2
2
  import { extendTailwindMerge, twJoin } from "tailwind-merge";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { Button as Button$1, Checkbox as Checkbox$1, Description, Dialog, DialogBackdrop, DialogPanel, DialogTitle, Disclosure, DisclosureButton, DisclosurePanel, Field, Fieldset as Fieldset$1, Input as Input$1, Label, Legend, Listbox, ListboxButton, ListboxOption, ListboxOptions, ListboxSelectedOption, Menu, MenuButton, MenuHeading, MenuItem, MenuItems, MenuSection, MenuSeparator, Textarea as Textarea$1 } from "@headlessui/react";
@@ -6,7 +6,6 @@ import * as React from "react";
6
6
  import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
7
7
  import * as ReactDOM from "react-dom";
8
8
  import { createPortal } from "react-dom";
9
-
10
9
  //#region src/utils/custom-tailwind-merge.ts
11
10
  const isInteger = (classPart) => /^\d+$/.test(classPart);
12
11
  const isFloat = (classPart) => /^\d+\.\d+$/.test(classPart);
@@ -101,7 +100,6 @@ const twMerge = extendTailwindMerge({ extend: { classGroups: {
101
100
  "grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
102
101
  transition: [{ transition: ["transition-cols", "transition-rows"] }]
103
102
  } } });
104
-
105
103
  //#endregion
106
104
  //#region src/utils/get-theme-color.ts
107
105
  function getThemeColor(theme) {
@@ -739,20 +737,19 @@ function getTextColor(theme, asVariable) {
739
737
  default: return asVariable ? "[--text-color:var(--base-theme-color--foreground)]" : "text-[var(--base-theme-color--foreground)]";
740
738
  }
741
739
  }
742
-
743
740
  //#endregion
744
741
  //#region src/components/link.tsx
745
- function Anchor({ as, className, disabled, href, onClick, target, rel, ...props }) {
742
+ function Anchor({ as, className, disabled, href, onClick, target, rel, removeHash = true, ...props }) {
746
743
  const isExternal = `${href}`.startsWith("http"), hasHash = `${href}`.includes("#");
747
744
  const handleClick = (e) => {
748
745
  if (disabled) return e.preventDefault();
749
746
  onClick?.(e);
750
- setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
747
+ if (removeHash) setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
751
748
  };
752
749
  return /* @__PURE__ */ jsx(as || "a", {
753
750
  ...props,
754
751
  "aria-disabled": disabled,
755
- className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
752
+ className: twMerge("inline-block transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
756
753
  href,
757
754
  target: target || (isExternal ? "_blank" : "_self"),
758
755
  onClick: hasHash ? handleClick : onClick,
@@ -785,7 +782,7 @@ const lineLiftClasses = twJoin([
785
782
  scaleYClasses,
786
783
  "after:origin-bottom after:translate-y-1 after:scale-x-75 active:after:translate-y-0 active:after:scale-x-100 pointer-fine:hover:after:translate-y-0 pointer-fine:hover:after:scale-x-100 pointer-fine:active:after:translate-y-0 pointer-fine:active:after:scale-x-100"
787
784
  ]);
788
- const fillClasses = twJoin(baseClasses, "whitespace-nowrap transition-[transform,color] after:top-1/2 after:h-[calc(100%+.05rem)] after:w-[calc(100%+.25rem)] after:-translate-y-1/2 after:rounded after:ease-exponential active:text-(--text-color) pointer-fine:hover:text-(--text-color) pointer-fine:active:text-(--text-color)");
785
+ const fillClasses = twJoin(baseClasses, "whitespace-nowrap transition-[scale,color] after:top-1/2 after:h-[calc(100%+.05rem)] after:w-[calc(100%+.25rem)] after:-translate-y-1/2 after:rounded after:ease-exponential active:text-(--text-color) pointer-fine:hover:text-(--text-color) pointer-fine:active:text-(--text-color)");
789
786
  const getFillColorTransitionClasses = (theme, customTheme) => {
790
787
  let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
791
788
  if (theme === "custom") {
@@ -839,8 +836,8 @@ const getMultilineFillRtlClasses = (theme, customTheme) => {
839
836
  const getMultilineFillCenterClasses = (theme, customTheme) => {
840
837
  return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[50%_auto]");
841
838
  };
842
- function getLinkClasses({ customTheme, theme, type }) {
843
- switch (type) {
839
+ function getLinkClasses({ customTheme, theme, lineType }) {
840
+ switch (lineType) {
844
841
  case "static": return lineStaticClasses;
845
842
  case "ltr": return lineLtrClasses;
846
843
  case "rtl": return lineRtlClasses;
@@ -900,26 +897,28 @@ function getLinkClasses({ customTheme, theme, type }) {
900
897
  * ## Examples
901
898
  *
902
899
  * @example
903
- * <Link href='/about' type='ltr' title='About Us'>Learn more about our company</Link>
900
+ * <Link href='/about' lineType='ltr' title='About Us'>Learn more about our company</Link>
901
+ *
902
+ * @example
903
+ * <Link href='/about' lineType='fill-ltr' title='About Us'>Learn more about our company</Link>
904
904
  *
905
905
  * @example
906
- * <Link href='/about' type='fill-ltr' title='About Us'>Learn more about our company</Link>
906
+ * <Link href='/about' lineType='multiline-fill-rtl' theme='red' title='About Us'>Learn more about our company</Link>
907
907
  *
908
908
  * @example
909
- * <Link href='/about' type='fill-ltr' theme='red' title='About Us'>Learn more about our company</Link>
909
+ * <Link as='button' lineType='fill-lift' theme='mauve-700'>Edit</Link>
910
910
  */
911
- function Link({ as, className, customTheme, theme, type, ...props }) {
911
+ function Link({ as, className, customTheme, lineType, theme, ...props }) {
912
912
  const linkClasses = getLinkClasses({
913
913
  customTheme,
914
914
  theme,
915
- type
915
+ lineType
916
916
  });
917
917
  return /* @__PURE__ */ jsx(as || Anchor, {
918
918
  ...props,
919
919
  className: twMerge(linkClasses, className)
920
920
  });
921
921
  }
922
-
923
922
  //#endregion
924
923
  //#region src/components/button.tsx
925
924
  /**
@@ -973,7 +972,6 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
973
972
  className: buttonClasses
974
973
  });
975
974
  }
976
-
977
975
  //#endregion
978
976
  //#region src/symbols/checkmark.tsx
979
977
  function Checkmark({ weight = "regular", ...props }) {
@@ -1025,7 +1023,6 @@ function Checkmark({ weight = "regular", ...props }) {
1025
1023
  });
1026
1024
  }
1027
1025
  }
1028
-
1029
1026
  //#endregion
1030
1027
  //#region src/components/checkbox.tsx
1031
1028
  function Checkbox({ checkmark, children, className, description, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, fieldProps: { className: fieldClassName, ...fieldProps } = {}, labelProps: { className: labelClassName, ...labelProps } = {}, inputContainerProps: { className: inputContainerClassName, ...inputContainerProps } = {}, onChange, required, value, ...props }) {
@@ -1037,7 +1034,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1037
1034
  };
1038
1035
  return /* @__PURE__ */ jsxs(Field, {
1039
1036
  ...fieldProps,
1040
- className: (bag) => twMerge("ease-exponential corner-super-1.5 -mx-1 grid h-fit w-fit gap-1 rounded-md p-1 transition-[background-color] duration-200 hover:bg-neutral-500/10 data-invalid:ring-1 data-invalid:ring-red-500/50", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
1037
+ className: (bag) => twMerge("-mx-1 grid h-fit w-fit gap-1 rounded-md p-1 transition-[background-color] duration-200 ease-exponential corner-super-1.5 hover:bg-neutral-500/10 data-invalid:ring-1 data-invalid:ring-red-500/50", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
1041
1038
  ...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
1042
1039
  children: [/* @__PURE__ */ jsxs("div", {
1043
1040
  ...inputContainerProps,
@@ -1046,7 +1043,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1046
1043
  ...props,
1047
1044
  ...required ? { "aria-required": "true" } : {},
1048
1045
  ...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
1049
- className: (bag) => twMerge("group/checkbox ease-exponential corner-super-1.5 size-5 shrink-0 cursor-pointer rounded-md border border-neutral-500/50 bg-neutral-100 transition-[background-color] duration-300 [--checkmark-color:var(--base-theme-color--foreground)] [--theme-color:var(--base-theme-color)] focus:ring-3 focus:ring-blue-400 focus:ring-offset-2 focus:ring-offset-(--global-bg) focus:outline-none aria-invalid:border-red-500 data-checked:bg-(--theme-color) dark:bg-neutral-700", typeof className === "function" ? className(bag) : className),
1046
+ className: (bag) => twMerge("group/checkbox size-5 shrink-0 cursor-pointer rounded-md border border-neutral-500/50 bg-neutral-100 transition-[background-color] duration-300 ease-exponential [--checkmark-color:var(--base-theme-color--foreground)] [--theme-color:var(--base-theme-color)] corner-super-1.5 focus:ring-3 focus:ring-blue-400 focus:ring-offset-2 focus:ring-offset-(--global-bg) focus:outline-none aria-invalid:border-red-500 data-checked:bg-(--theme-color) dark:bg-neutral-700", typeof className === "function" ? className(bag) : className),
1050
1047
  onChange: handleChange,
1051
1048
  value,
1052
1049
  children: [/* @__PURE__ */ jsx("input", {
@@ -1062,7 +1059,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1062
1059
  type: "checkbox",
1063
1060
  value
1064
1061
  }), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
1065
- className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
1062
+ className: "size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 ease-exponential group-data-checked/checkbox:scale-60",
1066
1063
  weight: "bold"
1067
1064
  })]
1068
1065
  }), /* @__PURE__ */ jsxs(Label, {
@@ -1080,7 +1077,6 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1080
1077
  })]
1081
1078
  });
1082
1079
  }
1083
-
1084
1080
  //#endregion
1085
1081
  //#region node_modules/animejs/dist/modules/core/consts.js
1086
1082
  /**
@@ -1132,9 +1128,6 @@ const proxyTargetSymbol = Symbol();
1132
1128
  const minValue = 1e-11;
1133
1129
  const maxValue = 0xe8d4a51000;
1134
1130
  const K = 1e3;
1135
- const maxFps = 240;
1136
- const emptyString = "";
1137
- const cssVarPrefix = "var(";
1138
1131
  const shortTransforms = /* @__PURE__ */ (() => {
1139
1132
  const map = /* @__PURE__ */ new Map();
1140
1133
  map.set("x", "translateX");
@@ -1178,7 +1171,6 @@ const unitsExecRgx = /^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i;
1178
1171
  const lowerCaseRgx = /([a-z])([A-Z])/g;
1179
1172
  const transformsExecRgx = /(\w+)(\([^)]+\)+)/g;
1180
1173
  const cssVariableMatchRgx = /var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/;
1181
-
1182
1174
  //#endregion
1183
1175
  //#region node_modules/animejs/dist/modules/core/globals.js
1184
1176
  /**
@@ -1203,7 +1195,7 @@ const defaults = {
1203
1195
  keyframes: null,
1204
1196
  playbackEase: null,
1205
1197
  playbackRate: 1,
1206
- frameRate: maxFps,
1198
+ frameRate: 240,
1207
1199
  loop: 0,
1208
1200
  reversed: false,
1209
1201
  alternate: false,
@@ -1242,7 +1234,6 @@ if (isBrowser) {
1242
1234
  if (!win.AnimeJS) win.AnimeJS = [];
1243
1235
  win.AnimeJS.push(globalVersions);
1244
1236
  }
1245
-
1246
1237
  //#endregion
1247
1238
  //#region node_modules/animejs/dist/modules/core/helpers.js
1248
1239
  /**
@@ -1381,7 +1372,7 @@ const clampInfinity = (v) => v === Infinity ? maxValue : v === -Infinity ? -maxV
1381
1372
  * @param {Number} v - Time value to normalize
1382
1373
  * @return {Number}
1383
1374
  */
1384
- const normalizeTime = (v) => v <= minValue ? minValue : clampInfinity(round$1(v, 11));
1375
+ const normalizeTime = (v) => v <= 1e-11 ? minValue : clampInfinity(round$1(v, 11));
1385
1376
  /**
1386
1377
  * @template T
1387
1378
  * @param {T[]} a
@@ -1456,7 +1447,6 @@ const addChild = (parent, child, sortMethod, prevProp = "_prev", nextProp = "_ne
1456
1447
  child[prevProp] = prev;
1457
1448
  child[nextProp] = next;
1458
1449
  };
1459
-
1460
1450
  //#endregion
1461
1451
  //#region node_modules/animejs/dist/modules/core/targets.js
1462
1452
  /**
@@ -1569,7 +1559,6 @@ function registerTargets(targets) {
1569
1559
  }
1570
1560
  return parsedTargetsArray;
1571
1561
  }
1572
-
1573
1562
  //#endregion
1574
1563
  //#region node_modules/animejs/dist/modules/core/transforms.js
1575
1564
  /**
@@ -1607,7 +1596,6 @@ const parseInlineTransforms = (target, propName, animationInlineStyles) => {
1607
1596
  }
1608
1597
  return inlineTransforms && !isUnd(inlinedStylesPropertyValue) ? inlinedStylesPropertyValue : stringStartsWith(propName, "scale") ? "1" : stringStartsWith(propName, "rotate") || stringStartsWith(propName, "skew") ? "0deg" : "0px";
1609
1598
  };
1610
-
1611
1599
  //#endregion
1612
1600
  //#region node_modules/animejs/dist/modules/core/colors.js
1613
1601
  /**
@@ -1702,7 +1690,6 @@ const convertColorStringValuesToRgbaArray = (colorString) => {
1702
1690
  1
1703
1691
  ];
1704
1692
  };
1705
-
1706
1693
  //#endregion
1707
1694
  //#region node_modules/animejs/dist/modules/core/values.js
1708
1695
  /**
@@ -1743,12 +1730,12 @@ const getFunctionValue = (value, target, index, total, store) => {
1743
1730
  const computed = value(target, index, total);
1744
1731
  return !isNaN(+computed) ? +computed : computed || 0;
1745
1732
  };
1746
- else if (isStr(value) && stringStartsWith(value, cssVarPrefix)) func = () => {
1733
+ else if (isStr(value) && stringStartsWith(value, "var(")) func = () => {
1747
1734
  const match = value.match(cssVariableMatchRgx);
1748
1735
  const cssVarName = match[1];
1749
1736
  const fallbackValue = match[2];
1750
1737
  let computed = getComputedStyle(target)?.getPropertyValue(cssVarName);
1751
- if ((!computed || computed.trim() === emptyString) && fallbackValue) computed = fallbackValue.trim();
1738
+ if ((!computed || computed.trim() === "") && fallbackValue) computed = fallbackValue.trim();
1752
1739
  return computed || 0;
1753
1740
  };
1754
1741
  else return value;
@@ -1867,7 +1854,6 @@ const decomposeTweenValue = (tween, targetObject) => {
1867
1854
  return targetObject;
1868
1855
  };
1869
1856
  const decomposedOriginalValue = createDecomposedValueTargetObject();
1870
-
1871
1857
  //#endregion
1872
1858
  //#region node_modules/animejs/dist/modules/core/styles.js
1873
1859
  /**
@@ -1926,28 +1912,27 @@ const cleanInlineStyles = (renderable) => {
1926
1912
  if (tweenTarget[isDomSymbol]) {
1927
1913
  const targetStyle = tweenTarget.style;
1928
1914
  const originalInlinedValue = tween._inlineValue;
1929
- const tweenHadNoInlineValue = isNil(originalInlinedValue) || originalInlinedValue === emptyString;
1915
+ const tweenHadNoInlineValue = isNil(originalInlinedValue) || originalInlinedValue === "";
1930
1916
  if (tween._tweenType === tweenTypes.TRANSFORM) {
1931
1917
  const cachedTransforms = tweenTarget[transformsSymbol];
1932
1918
  if (tweenHadNoInlineValue) delete cachedTransforms[tweenProperty];
1933
1919
  else cachedTransforms[tweenProperty] = originalInlinedValue;
1934
1920
  if (tween._renderTransforms) if (!Object.keys(cachedTransforms).length) targetStyle.removeProperty("transform");
1935
1921
  else {
1936
- let str = emptyString;
1922
+ let str = "";
1937
1923
  for (let key in cachedTransforms) str += transformsFragmentStrings[key] + cachedTransforms[key] + ") ";
1938
1924
  targetStyle.transform = str;
1939
1925
  }
1940
1926
  } else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase(tweenProperty));
1941
1927
  else targetStyle[tweenProperty] = originalInlinedValue;
1942
1928
  if (animation._tail === tween) animation.targets.forEach((t) => {
1943
- if (t.getAttribute && t.getAttribute("style") === emptyString) t.removeAttribute("style");
1929
+ if (t.getAttribute && t.getAttribute("style") === "") t.removeAttribute("style");
1944
1930
  });
1945
1931
  }
1946
1932
  });
1947
1933
  }
1948
1934
  return renderable;
1949
1935
  };
1950
-
1951
1936
  //#endregion
1952
1937
  //#region node_modules/animejs/dist/modules/core/units.js
1953
1938
  /**
@@ -2006,7 +1991,6 @@ const convertValueUnit = (el, decomposedValue, unit, force = false) => {
2006
1991
  decomposedValue.u = unit;
2007
1992
  return decomposedValue;
2008
1993
  };
2009
-
2010
1994
  //#endregion
2011
1995
  //#region node_modules/animejs/dist/modules/easings/none.js
2012
1996
  /**
@@ -2022,7 +2006,6 @@ const convertValueUnit = (el, decomposedValue, unit, force = false) => {
2022
2006
  */
2023
2007
  /** @type {EasingFunction} */
2024
2008
  const none = (t) => t;
2025
-
2026
2009
  //#endregion
2027
2010
  //#region node_modules/animejs/dist/modules/easings/eases/parser.js
2028
2011
  /**
@@ -2063,7 +2046,7 @@ const halfPI = PI / 2;
2063
2046
  const doublePI = PI * 2;
2064
2047
  /** @type {Record<String, EasingFunctionWithParams|EasingFunction>} */
2065
2048
  const easeInFunctions = {
2066
- [emptyString]: easeInPower,
2049
+ [""]: easeInPower,
2067
2050
  Quad: easeInPower(2),
2068
2051
  Cubic: easeInPower(3),
2069
2052
  Quart: easeInPower(4),
@@ -2142,7 +2125,7 @@ const eases = /* @__PURE__ */ (() => {
2142
2125
  for (let type in easeTypes) for (let name in easeInFunctions) {
2143
2126
  const easeIn = easeInFunctions[name];
2144
2127
  const easeType = easeTypes[type];
2145
- list[type + name] = name === emptyString || name === "Back" || name === "Elastic" ? (a, b) => easeType(
2128
+ list[type + name] = name === "" || name === "Back" || name === "Elastic" ? (a, b) => easeType(
2146
2129
  /** @type {EasingFunctionWithParams} */
2147
2130
  easeIn(a, b)
2148
2131
  ) : easeType(easeIn);
@@ -2188,7 +2171,6 @@ const parseEase = (ease) => {
2188
2171
  }
2189
2172
  return isFnc(ease) ? ease : isStr(ease) ? parseEaseString(ease) : none;
2190
2173
  };
2191
-
2192
2174
  //#endregion
2193
2175
  //#region node_modules/animejs/dist/modules/core/render.js
2194
2176
  /**
@@ -2354,7 +2336,7 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
2354
2336
  } else tween._value = value;
2355
2337
  }
2356
2338
  if (tweenTransformsNeedUpdate && tween._renderTransforms) {
2357
- let str = emptyString;
2339
+ let str = "";
2358
2340
  for (let key in tweenTargetTransformsProperties) str += `${transformsFragmentStrings[key]}${tweenTargetTransformsProperties[key]}) `;
2359
2341
  tweenStyle.transform = str;
2360
2342
  tweenTransformsNeedUpdate = 0;
@@ -2367,7 +2349,7 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
2367
2349
  if (!muteCallbacks && isCurrentTimeAboveZero) tickable.onUpdate(tickable);
2368
2350
  }
2369
2351
  if (parent && isSetter) {
2370
- if (!muteCallbacks && (parent.began && !isRunningBackwards && tickableAbsoluteTime > 0 && !completed || isRunningBackwards && tickableAbsoluteTime <= minValue && completed)) {
2352
+ if (!muteCallbacks && (parent.began && !isRunningBackwards && tickableAbsoluteTime > 0 && !completed || isRunningBackwards && tickableAbsoluteTime <= 1e-11 && completed)) {
2371
2353
  tickable.onComplete(tickable);
2372
2354
  tickable.completed = !isRunningBackwards;
2373
2355
  }
@@ -2415,7 +2397,7 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
2415
2397
  const childDuration = child.duration;
2416
2398
  const childStartTime = child._offset + child._delay;
2417
2399
  const childEndTime = childStartTime + childDuration;
2418
- if (!muteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === tlIterationDuration)) child.onComplete(child);
2400
+ if (!muteCallbacks && childDuration <= 1e-11 && (!childStartTime || childEndTime === tlIterationDuration)) child.onComplete(child);
2419
2401
  }
2420
2402
  });
2421
2403
  if (!muteCallbacks) tl.onLoop(tl);
@@ -2439,7 +2421,6 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
2439
2421
  }
2440
2422
  }
2441
2423
  };
2442
-
2443
2424
  //#endregion
2444
2425
  //#region node_modules/animejs/dist/modules/core/clock.js
2445
2426
  /**
@@ -2470,9 +2451,9 @@ var Clock = class {
2470
2451
  /** @type {Number} */
2471
2452
  this._scheduledTime = 0;
2472
2453
  /** @type {Number} */
2473
- this._frameDuration = K / maxFps;
2454
+ this._frameDuration = K / 240;
2474
2455
  /** @type {Number} */
2475
- this._fps = maxFps;
2456
+ this._fps = 240;
2476
2457
  /** @type {Number} */
2477
2458
  this._speed = 1;
2478
2459
  /** @type {Boolean} */
@@ -2488,7 +2469,7 @@ var Clock = class {
2488
2469
  set fps(frameRate) {
2489
2470
  const previousFrameDuration = this._frameDuration;
2490
2471
  const fr = +frameRate;
2491
- const fps = fr < minValue ? minValue : fr;
2472
+ const fps = fr < 1e-11 ? minValue : fr;
2492
2473
  const frameDuration = K / fps;
2493
2474
  if (fps > defaults.frameRate) defaults.frameRate = fps;
2494
2475
  this._fps = fps;
@@ -2500,7 +2481,7 @@ var Clock = class {
2500
2481
  }
2501
2482
  set speed(playbackRate) {
2502
2483
  const pbr = +playbackRate;
2503
- this._speed = pbr < minValue ? minValue : pbr;
2484
+ this._speed = pbr < 1e-11 ? minValue : pbr;
2504
2485
  }
2505
2486
  /**
2506
2487
  * @param {Number} time
@@ -2526,7 +2507,6 @@ var Clock = class {
2526
2507
  return delta;
2527
2508
  }
2528
2509
  };
2529
-
2530
2510
  //#endregion
2531
2511
  //#region node_modules/animejs/dist/modules/animation/additive.js
2532
2512
  /**
@@ -2594,7 +2574,6 @@ const addAdditiveAnimation = (lookups) => {
2594
2574
  }
2595
2575
  return animation;
2596
2576
  };
2597
-
2598
2577
  //#endregion
2599
2578
  //#region node_modules/animejs/dist/modules/engine/engine.js
2600
2579
  /**
@@ -2718,7 +2697,6 @@ const killEngine = () => {
2718
2697
  engine.reqId = 0;
2719
2698
  return engine;
2720
2699
  };
2721
-
2722
2700
  //#endregion
2723
2701
  //#region node_modules/animejs/dist/modules/animation/composition.js
2724
2702
  /**
@@ -2810,7 +2788,7 @@ const composeTween = (tween, siblings) => {
2810
2788
  prevSibling._changeDuration = updatedPrevChangeDuration;
2811
2789
  prevSibling._currentTime = updatedPrevChangeDuration;
2812
2790
  prevSibling._isOverlapped = 1;
2813
- if (updatedPrevChangeDuration < minValue) overrideTween(prevSibling);
2791
+ if (updatedPrevChangeDuration < 1e-11) overrideTween(prevSibling);
2814
2792
  }
2815
2793
  let pausePrevParentAnimation = true;
2816
2794
  forEachChildren(prevParent, (t) => {
@@ -2955,7 +2933,6 @@ const removeTargetsFromRenderable = (targetsArray, renderable, propertyName) =>
2955
2933
  if (parent.cancel) /** @type {Renderable} */ parent.cancel();
2956
2934
  }
2957
2935
  };
2958
-
2959
2936
  //#endregion
2960
2937
  //#region node_modules/animejs/dist/modules/timer/timer.js
2961
2938
  /**
@@ -3045,7 +3022,7 @@ var Timer = class extends Clock {
3045
3022
  this.id = !isUnd(id) ? id : timerId;
3046
3023
  /** @type {Timeline} */
3047
3024
  this.parent = parent;
3048
- this.duration = clampInfinity((timerDuration + timerLoopDelay) * timerIterationCount - timerLoopDelay) || minValue;
3025
+ this.duration = clampInfinity((timerDuration + timerLoopDelay) * timerIterationCount - timerLoopDelay) || 1e-11;
3049
3026
  /** @type {Boolean} */
3050
3027
  this.backwards = false;
3051
3028
  /** @type {Boolean} */
@@ -3209,7 +3186,7 @@ var Timer = class extends Clock {
3209
3186
  resume() {
3210
3187
  if (!this.paused) return this;
3211
3188
  this.paused = false;
3212
- if (this.duration <= minValue && !this._hasChildren) tick(this, minValue, 0, 0, tickModes.FORCE);
3189
+ if (this.duration <= 1e-11 && !this._hasChildren) tick(this, minValue, 0, 0, tickModes.FORCE);
3213
3190
  else {
3214
3191
  if (!this._running) {
3215
3192
  addChild(engine, this);
@@ -3326,7 +3303,6 @@ var Timer = class extends Clock {
3326
3303
  });
3327
3304
  }
3328
3305
  };
3329
-
3330
3306
  //#endregion
3331
3307
  //#region node_modules/animejs/dist/modules/animation/animation.js
3332
3308
  /**
@@ -3471,7 +3447,7 @@ var JSAnimation = class extends Timer {
3471
3447
  const tDuration = hasSpring ? animEase.settlingDuration : setValue(duration, animDefaults.duration);
3472
3448
  const tDelay = setValue(delay, animDefaults.delay);
3473
3449
  const tModifier = modifier || animDefaults.modifier;
3474
- const tComposition = isUnd(composition) && targetsLength >= K ? compositionTypes.none : !isUnd(composition) ? composition : animDefaults.composition;
3450
+ const tComposition = isUnd(composition) && targetsLength >= 1e3 ? compositionTypes.none : !isUnd(composition) ? composition : animDefaults.composition;
3475
3451
  const absoluteOffsetTime = this._offset + (parent ? parent._offset : 0);
3476
3452
  if (hasSpring) /** @type {Spring} */ animEase.parent = this;
3477
3453
  let iterationDuration = NaN;
@@ -3630,7 +3606,7 @@ var JSAnimation = class extends Timer {
3630
3606
  shortestValue.d = longestValue.d.map((_, i) => isUnd(shortestValue.d[i]) ? 0 : shortestValue.d[i]);
3631
3607
  shortestValue.s = cloneArray(longestValue.s);
3632
3608
  }
3633
- const tweenUpdateDuration = round$1(+tweenDuration || minValue, 12);
3609
+ const tweenUpdateDuration = round$1(+tweenDuration || 1e-11, 12);
3634
3610
  let inlineValue = inlineStylesStore[propName];
3635
3611
  if (!isNil(inlineValue)) inlineStylesStore[propName] = null;
3636
3612
  /** @type {Tween} */
@@ -3716,7 +3692,7 @@ var JSAnimation = class extends Timer {
3716
3692
  /** @type {String|Number} */
3717
3693
  this.id = !isUnd(id) ? id : JSAnimationId;
3718
3694
  /** @type {Number} */
3719
- this.duration = iterationDuration === minValue ? minValue : clampInfinity((iterationDuration + this._loopDelay) * this.iterationCount - this._loopDelay) || minValue;
3695
+ this.duration = iterationDuration === 1e-11 ? minValue : clampInfinity((iterationDuration + this._loopDelay) * this.iterationCount - this._loopDelay) || 1e-11;
3720
3696
  /** @type {Callback<this>} */
3721
3697
  this.onRender = onRender || animDefaults.onRender;
3722
3698
  /** @type {EasingFunction} */
@@ -3770,7 +3746,7 @@ var JSAnimation = class extends Timer {
3770
3746
  }
3771
3747
  }
3772
3748
  });
3773
- if (this.duration === minValue) this.restart();
3749
+ if (this.duration === 1e-11) this.restart();
3774
3750
  return this;
3775
3751
  }
3776
3752
  /**
@@ -3798,7 +3774,6 @@ var JSAnimation = class extends Timer {
3798
3774
  * @return {JSAnimation}
3799
3775
  */
3800
3776
  const animate = (targets, parameters) => new JSAnimation(targets, parameters, null, 0, false).init();
3801
-
3802
3777
  //#endregion
3803
3778
  //#region node_modules/animejs/dist/modules/svg/helpers.js
3804
3779
  /**
@@ -3821,7 +3796,6 @@ const getPath = (path) => {
3821
3796
  if (!$parsedSvg || !isSvg($parsedSvg)) return console.warn(`${path} is not a valid SVGGeometryElement`);
3822
3797
  return $parsedSvg;
3823
3798
  };
3824
-
3825
3799
  //#endregion
3826
3800
  //#region node_modules/animejs/dist/modules/svg/morphto.js
3827
3801
  /**
@@ -3870,15 +3844,13 @@ const morphTo = (path2, precision = .33) => ($path1) => {
3870
3844
  $path1[morphPointsSymbol] = v2;
3871
3845
  return [v1, v2];
3872
3846
  };
3873
-
3874
3847
  //#endregion
3875
3848
  //#region src/utils/get-date.ts
3876
3849
  /** The current date as a Date object */
3877
3850
  const d = /* @__PURE__ */ new Date();
3878
3851
  /** The current minute of the current hour */
3879
3852
  const minutes = d.getMinutes();
3880
- /** The current year */
3881
- const year = d.getFullYear();
3853
+ d.getFullYear();
3882
3854
  /** An array of the names of month in order */
3883
3855
  const monthNamesList = [
3884
3856
  "January",
@@ -3904,10 +3876,8 @@ const weekdayNamesList = [
3904
3876
  "Friday",
3905
3877
  "Saturday"
3906
3878
  ];
3907
- /** The name of the current month */
3908
- const currentMonthName = getMonthName();
3909
- /** The name of the current day of the week */
3910
- const currentWeekdayName = getWeekdayName();
3879
+ getMonthName();
3880
+ getWeekdayName();
3911
3881
  /**
3912
3882
  * ### Get Date
3913
3883
  * - Returns the date with two digits
@@ -4000,13 +3970,6 @@ function getWeekdayName(weekday = d) {
4000
3970
  if (typeof weekday === "number") return weekdayNamesList[weekday];
4001
3971
  return weekdayNamesList[weekday.getDay()];
4002
3972
  }
4003
-
4004
- //#endregion
4005
- //#region src/utils/math.ts
4006
- function easeOutExpo(time, start, end, duration) {
4007
- return time == duration ? start + end : end * (-Math.pow(2, -10 * time / duration) + 1) + start;
4008
- }
4009
-
4010
3973
  //#endregion
4011
3974
  //#region src/components/chevron-up-down-anime.tsx
4012
3975
  function ChevronUpDownAnime({ className, isUp = false }) {
@@ -4049,7 +4012,6 @@ function ChevronUpDownAnime({ className, isUp = false }) {
4049
4012
  })]
4050
4013
  });
4051
4014
  }
4052
-
4053
4015
  //#endregion
4054
4016
  //#region src/components/details.tsx
4055
4017
  function DetailsSummary({ arrow = true, children, className, onClick, ...props }) {
@@ -4073,7 +4035,7 @@ function DetailsSummary({ arrow = true, children, className, onClick, ...props }
4073
4035
  function DetailsBody({ children, className, ...props }) {
4074
4036
  return /* @__PURE__ */ jsx(DisclosurePanel, {
4075
4037
  ...props,
4076
- className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
4038
+ className: twMerge("grid grid-rows-1fr transition-rows duration-500 ease-exponential data-closed:grid-rows-0fr", className),
4077
4039
  transition: true,
4078
4040
  children: (bag) => /* @__PURE__ */ jsx("div", {
4079
4041
  className: "overflow-y-hidden px-2 pbs-3 pbe-1",
@@ -4089,14 +4051,14 @@ function Details({ as = "div", className, ...props }) {
4089
4051
  role: "details"
4090
4052
  });
4091
4053
  }
4092
-
4093
4054
  //#endregion
4094
4055
  //#region src/components/drop-down.tsx
4095
4056
  function DropDownButton({ arrow = true, as, children, className, ...props }) {
4096
4057
  return /* @__PURE__ */ jsx(MenuButton, {
4097
4058
  ...props,
4098
- as: as || "button",
4099
- className: twJoin("group/button", className),
4059
+ as,
4060
+ className: twJoin("group/button transition-transform duration-300 ease-exponential active:scale-95", className),
4061
+ onClick: () => console.log("here i am"),
4100
4062
  children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
4101
4063
  className: "-mr-1",
4102
4064
  isUp: bag.open
@@ -4129,7 +4091,7 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
4129
4091
  return /* @__PURE__ */ jsx(MenuItems, {
4130
4092
  ...props,
4131
4093
  anchor: anchorProps,
4132
- className: twMerge("grid-rows-1fr transition-rows ease-exponential not-data-open:not-data-enter:not-data-leave:grid-rows-0fr data-closed:grid-rows-0fr grid rounded-xl shadow-xl duration-500", containerClassName),
4094
+ className: twMerge("grid grid-rows-1fr rounded-xl shadow-xl transition-rows duration-500 ease-exponential not-data-open:not-data-enter:not-data-leave:grid-rows-0fr data-closed:grid-rows-0fr", containerClassName),
4133
4095
  static: props.static,
4134
4096
  style: {
4135
4097
  ...style,
@@ -4156,7 +4118,7 @@ function DropDownSection({ children, label, labelProps, separatorAbove, separato
4156
4118
  separatorAbove && /* @__PURE__ */ jsx(DropDownSeparator, {}),
4157
4119
  label && /* @__PURE__ */ jsx(MenuHeading, {
4158
4120
  ...restLabelProps,
4159
- className: (headingBag) => twMerge("text-[larger] font-bold text-current/80", typeof labelClassName === "function" ? labelClassName(headingBag) : labelClassName),
4121
+ className: (headingBag) => twMerge("text-larger font-bold text-current/80", typeof labelClassName === "function" ? labelClassName(headingBag) : labelClassName),
4160
4122
  children: label
4161
4123
  }),
4162
4124
  typeof children === "function" ? children(sectionBag) : children,
@@ -4171,12 +4133,21 @@ function DropDownSeparator({ as, className, ...props }) {
4171
4133
  className: (bag) => twMerge("my-4 block h-px rounded-full bg-neutral-950/20", typeof className === "function" ? className(bag) : className)
4172
4134
  });
4173
4135
  }
4174
- function DropDown(props) {
4175
- return /* @__PURE__ */ jsx(Menu, { ...props });
4136
+ function DropDown({ as, ...props }) {
4137
+ return /* @__PURE__ */ jsx(Menu, {
4138
+ ...props,
4139
+ as
4140
+ });
4176
4141
  }
4177
-
4178
4142
  //#endregion
4179
4143
  //#region src/components/fieldset.tsx
4144
+ /**
4145
+ * # Fieldset
4146
+ *
4147
+ * @prop legend - The legend text to display above the fieldset.
4148
+ * @prop legendProps - Additional props to pass to the legend component.
4149
+ * @prop className - GOTCHA: The default className includes `contents`, to effectively remove it from the layout. Be sure to change the display style if you want to modify any other styles.
4150
+ */
4180
4151
  function Fieldset({ children, className, legend, legendProps, name, ...props }) {
4181
4152
  const { className: legendClassName, ...restLegendProps } = legendProps || {};
4182
4153
  name = legend || name;
@@ -4191,7 +4162,6 @@ function Fieldset({ children, className, legend, legendProps, name, ...props })
4191
4162
  }), typeof children === "function" ? children(bag) : children] })
4192
4163
  });
4193
4164
  }
4194
-
4195
4165
  //#endregion
4196
4166
  //#region src/components/form.tsx
4197
4167
  function Form({ children, className, ...props }) {
@@ -4201,7 +4171,6 @@ function Form({ children, className, ...props }) {
4201
4171
  children
4202
4172
  });
4203
4173
  }
4204
-
4205
4174
  //#endregion
4206
4175
  //#region src/components/ghost.tsx
4207
4176
  function Ghost({ children, className, ...props }) {
@@ -4211,7 +4180,6 @@ function Ghost({ children, className, ...props }) {
4211
4180
  children: children || /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })
4212
4181
  });
4213
4182
  }
4214
-
4215
4183
  //#endregion
4216
4184
  //#region src/components/heading.tsx
4217
4185
  function getTextFromChildren(children) {
@@ -4249,7 +4217,6 @@ function Heading({ as = "h2", children, customize, className, id, ref, ...props
4249
4217
  children
4250
4218
  });
4251
4219
  }
4252
-
4253
4220
  //#endregion
4254
4221
  //#region src/symbols/chevron.forward.tsx
4255
4222
  function ChevronForward({ weight = "regular", ...props }) {
@@ -4301,7 +4268,6 @@ function ChevronForward({ weight = "regular", ...props }) {
4301
4268
  });
4302
4269
  }
4303
4270
  }
4304
-
4305
4271
  //#endregion
4306
4272
  //#region node_modules/animejs/dist/modules/animatable/animatable.js
4307
4273
  /**
@@ -4420,7 +4386,6 @@ var Animatable = class {
4420
4386
  return this;
4421
4387
  }
4422
4388
  };
4423
-
4424
4389
  //#endregion
4425
4390
  //#region node_modules/animejs/dist/modules/utils/number.js
4426
4391
  /**
@@ -4433,7 +4398,6 @@ var Animatable = class {
4433
4398
  * @return {Number}
4434
4399
  */
4435
4400
  const mapRange = (value, inLow, inHigh, outLow, outHigh) => outLow + (value - inLow) / (inHigh - inLow) * (outHigh - outLow);
4436
-
4437
4401
  //#endregion
4438
4402
  //#region node_modules/animejs/dist/modules/easings/spring/index.js
4439
4403
  /**
@@ -4604,7 +4568,6 @@ var Spring = class {
4604
4568
  * @returns {Spring}
4605
4569
  */
4606
4570
  const spring = (parameters) => new Spring(parameters);
4607
-
4608
4571
  //#endregion
4609
4572
  //#region node_modules/animejs/dist/modules/utils/target.js
4610
4573
  /**
@@ -4683,7 +4646,6 @@ const set = (targets, parameters) => {
4683
4646
  parameters.composition = setValue(parameters.composition, compositionTypes.none);
4684
4647
  return new JSAnimation(targets, parameters, null, 0, true).resume();
4685
4648
  };
4686
-
4687
4649
  //#endregion
4688
4650
  //#region node_modules/animejs/dist/modules/draggable/draggable.js
4689
4651
  /**
@@ -5867,7 +5829,6 @@ var Draggable = class {
5867
5829
  * @return {Draggable}
5868
5830
  */
5869
5831
  const createDraggable = (target, parameters) => new Draggable(target, parameters);
5870
-
5871
5832
  //#endregion
5872
5833
  //#region src/components/human-verification.tsx
5873
5834
  function checkHashSecret([number, letter]) {
@@ -5974,9 +5935,30 @@ function generateHumanValidationToken() {
5974
5935
  return char;
5975
5936
  }).join("")}_${weekCode}`;
5976
5937
  }
5977
- function HumanVerification({ children = "Verify", className }) {
5938
+ function HumanVerification({ children = "Verify", className, ref }) {
5978
5939
  const [dragProgress, setDragProgress] = useState(0);
5979
5940
  const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
5941
+ const resetVerification = useEffectEvent(() => {
5942
+ setDragProgress(0);
5943
+ const draggable = draggableRef.current;
5944
+ if (draggable) {
5945
+ draggable.enable();
5946
+ draggable.setX(0);
5947
+ draggable.refresh();
5948
+ }
5949
+ (buttonRef.current?.closest("form"))?.querySelectorAll("input[name=\"human_verification_token\"]")?.forEach((input) => input.remove());
5950
+ });
5951
+ useEffect(() => {
5952
+ const form = buttonRef.current?.closest("form");
5953
+ if (!form) return;
5954
+ const controller = new AbortController();
5955
+ form.addEventListener("reset", () => {
5956
+ queueMicrotask(() => resetVerification());
5957
+ }, { signal: controller.signal });
5958
+ return () => {
5959
+ controller.abort();
5960
+ };
5961
+ }, []);
5980
5962
  const handleTrySubmit = (x) => {
5981
5963
  if (x > 239) {
5982
5964
  const form = buttonRef.current?.closest("form");
@@ -6081,7 +6063,10 @@ function HumanVerification({ children = "Verify", className }) {
6081
6063
  "aria-valuenow": dragProgress,
6082
6064
  className: "absolute left-1 z-10 grid aspect-square h-[calc(100%-(var(--spacing)*2))] cursor-grab place-items-center rounded-sm bg-neutral-50 shadow-lg ring ring-neutral-500 focus:ring-3 focus:ring-blue-400 focus:ring-offset-2 focus:ring-offset-neutral-500 focus:outline-none active:cursor-grabbing",
6083
6065
  onKeyDown: moveButton,
6084
- ref: buttonRef,
6066
+ ref: (node) => {
6067
+ buttonRef.current = node;
6068
+ if (ref) ref.current = node;
6069
+ },
6085
6070
  role: "slider",
6086
6071
  type: "button",
6087
6072
  children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
@@ -6116,7 +6101,6 @@ function HumanVerification({ children = "Verify", className }) {
6116
6101
  ]
6117
6102
  });
6118
6103
  }
6119
-
6120
6104
  //#endregion
6121
6105
  //#region src/components/iframe.tsx
6122
6106
  const allAllowProperties = [
@@ -6185,7 +6169,6 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
6185
6169
  sandbox: sandbox?.join(" ")
6186
6170
  });
6187
6171
  }
6188
-
6189
6172
  //#endregion
6190
6173
  //#region src/components/input.tsx
6191
6174
  /**
@@ -6209,23 +6192,77 @@ function Input({ children, className, description, descriptionProps: { className
6209
6192
  children: [
6210
6193
  label && /* @__PURE__ */ jsx(Label, {
6211
6194
  ...labelProps,
6212
- className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
6195
+ className: (bag) => twMerge("text-sm font-medium", required ? `after:text-red-700 after:content-['_*']` : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
6213
6196
  children: label
6214
6197
  }),
6215
6198
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
6216
6199
  ...props,
6217
- className: (bag) => twMerge("ease-exponential corner-super-1.5 w-full rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 dark:bg-neutral-700 dark:text-neutral-50", "focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "user-invalid:border-red-500 user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100)_5%)] user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] dark:user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-500)_5%)] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800)_5%)] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)]", typeof className === "function" ? className(bag) : className),
6200
+ className: (bag) => twMerge("w-full rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 ease-exponential corner-super-1.5 dark:bg-neutral-700 dark:text-neutral-50", "focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "user-invalid:border-red-500 user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100)_5%)] user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] dark:user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-500)_5%)] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800)_5%)] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)]", typeof className === "function" ? className(bag) : className),
6218
6201
  required
6219
6202
  }), children] }),
6220
6203
  description && /* @__PURE__ */ jsx(Description, {
6221
6204
  ...descriptionProps,
6222
- className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
6205
+ className: (bag) => twMerge("max-w-none text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
6223
6206
  children: description
6224
6207
  })
6225
6208
  ]
6226
6209
  });
6227
6210
  }
6228
-
6211
+ //#endregion
6212
+ //#region src/hooks/create-fast-context.tsx
6213
+ function createFastContext(defaultInitialState) {
6214
+ function useStoreData(initialState = defaultInitialState) {
6215
+ const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
6216
+ const set = (value) => {
6217
+ if (typeof value === "function") store.current = value(store.current);
6218
+ else store.current = value;
6219
+ subscribers.current.forEach((callback) => callback());
6220
+ };
6221
+ const subscribe = (callback) => {
6222
+ subscribers.current.add(callback);
6223
+ return () => subscribers.current.delete(callback);
6224
+ };
6225
+ return {
6226
+ get,
6227
+ set,
6228
+ subscribe
6229
+ };
6230
+ }
6231
+ const StoreContext = createContext(null);
6232
+ function Provider({ initialValue = defaultInitialState, ...props }) {
6233
+ return /* @__PURE__ */ jsx(StoreContext.Provider, {
6234
+ value: useStoreData(initialValue),
6235
+ ...props
6236
+ });
6237
+ }
6238
+ function useStore(selector, initialValue) {
6239
+ const store = useContext(StoreContext);
6240
+ if (!store) {
6241
+ const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
6242
+ const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
6243
+ return [selectedValue, noOpSet];
6244
+ }
6245
+ return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
6246
+ }
6247
+ return {
6248
+ Provider,
6249
+ useStore
6250
+ };
6251
+ }
6252
+ const { Provider, useStore } = createFastContext("incomplete");
6253
+ //#endregion
6254
+ //#region src/hooks/use-mobile-device.ts
6255
+ function useMobileDevice() {
6256
+ const [isMobileDevice, setIsMobileDevice] = useState(false);
6257
+ const onRun = () => {
6258
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0, hasSmallViewport = window.innerWidth < 500;
6259
+ setIsMobileDevice(hasTouch || hasSmallViewport);
6260
+ };
6261
+ useEffect(() => {
6262
+ if (typeof window !== "undefined") onRun();
6263
+ }, []);
6264
+ return isMobileDevice;
6265
+ }
6229
6266
  //#endregion
6230
6267
  //#region src/symbols/xmark.tsx
6231
6268
  function Xmark({ weight = "regular", ...props }) {
@@ -6277,65 +6314,17 @@ function Xmark({ weight = "regular", ...props }) {
6277
6314
  });
6278
6315
  }
6279
6316
  }
6280
-
6281
- //#endregion
6282
- //#region src/hooks/create-fast-context.tsx
6283
- function createFastContext(defaultInitialState) {
6284
- function useStoreData(initialState = defaultInitialState) {
6285
- const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
6286
- const set = (value) => {
6287
- if (typeof value === "function") store.current = value(store.current);
6288
- else store.current = value;
6289
- subscribers.current.forEach((callback) => callback());
6290
- };
6291
- const subscribe = (callback) => {
6292
- subscribers.current.add(callback);
6293
- return () => subscribers.current.delete(callback);
6294
- };
6295
- return {
6296
- get,
6297
- set,
6298
- subscribe
6299
- };
6300
- }
6301
- const StoreContext = createContext(null);
6302
- function Provider({ initialValue = defaultInitialState, ...props }) {
6303
- return /* @__PURE__ */ jsx(StoreContext.Provider, {
6304
- value: useStoreData(initialValue),
6305
- ...props
6306
- });
6307
- }
6308
- function useStore(selector, initialValue) {
6309
- const store = useContext(StoreContext);
6310
- if (!store) {
6311
- const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
6312
- const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
6313
- return [selectedValue, noOpSet];
6314
- }
6315
- return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
6316
- }
6317
- return {
6318
- Provider,
6319
- useStore
6320
- };
6321
- }
6322
-
6323
- //#endregion
6324
- //#region src/hooks/use-form-status.tsx
6325
- const DEFAULT_STATUS = "incomplete";
6326
- const { Provider, useStore } = createFastContext(DEFAULT_STATUS);
6327
-
6328
6317
  //#endregion
6329
6318
  //#region src/components/modal.tsx
6319
+ const DRAG_TO_CLOSE_PROGRESS = .5;
6330
6320
  const { Provider: ModalControlsProvider, useStore: useModalControls } = createFastContext({
6321
+ closeModal: () => {},
6322
+ dialogPanelRef: { current: null },
6331
6323
  isOpen: false,
6332
6324
  openModal: () => {},
6333
- closeModal: () => {},
6334
6325
  place: "bottom",
6335
- readyToClose: false,
6336
- enableTouchClose: () => {},
6337
- enableMouseClose: () => {},
6338
- dialogPanelRef: { current: null }
6326
+ pseudoContainerRef: { current: null },
6327
+ readyToClose: false
6339
6328
  });
6340
6329
  function ModalTrigger({ as, onClick, ...props }) {
6341
6330
  const ModalTriggerElement = as || Button$1;
@@ -6351,78 +6340,182 @@ function ModalTrigger({ as, onClick, ...props }) {
6351
6340
  onClick: handleClick
6352
6341
  });
6353
6342
  }
6354
- function ModalTitle(props) {
6355
- return /* @__PURE__ */ jsx(DialogTitle, { ...props });
6343
+ function ModalTitle({ as, ref, ...props }) {
6344
+ return /* @__PURE__ */ jsx(DialogTitle, {
6345
+ ...props,
6346
+ as,
6347
+ ref
6348
+ });
6356
6349
  }
6357
6350
  function ModalDialog(props) {
6358
- const [modalControls] = useModalControls((store) => store);
6359
- const { isOpen, closeModal, place, readyToClose, className, enableMouseClose, enableTouchClose, dialogPanelRef } = modalControls || {
6360
- isOpen: false,
6361
- closeModal: () => {},
6362
- place: "bottom",
6363
- readyToClose: false,
6364
- className: "",
6365
- enableMouseClose: () => {},
6366
- enableTouchClose: () => {},
6367
- dialogPanelRef: { current: null }
6351
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
6352
+ const { className, closeModal, dialogPanelRef, isOpen, place, pseudoContainerRef, readyToClose } = modalControls || {};
6353
+ const [dialogPanelEl, setDialogPanelEl] = useState(null);
6354
+ const [draggableTriggerEl, setDraggableTriggerEl] = useState(null);
6355
+ const setDialogPanelRef = (node) => {
6356
+ setDialogPanelEl(node);
6357
+ if (dialogPanelRef) dialogPanelRef.current = node;
6368
6358
  };
6359
+ const setDraggableTriggerRef = (node) => {
6360
+ setDraggableTriggerEl(node);
6361
+ };
6362
+ const readyToCloseRef = useRef(readyToClose);
6363
+ function setUpDraggable({ dialogPanel, draggableTrigger, pseudoContainer }) {
6364
+ createDraggable(dialogPanel, {
6365
+ container: pseudoContainer,
6366
+ containerFriction: .99,
6367
+ onRelease: (draggable) => {
6368
+ if (readyToCloseRef.current) return closeModal?.();
6369
+ if (draggable.y >= 1) {
6370
+ const coord = { yCoord: draggable.y };
6371
+ animate(coord, {
6372
+ yCoord: 0,
6373
+ duration: 500,
6374
+ ease: spring({ duration: 300 }),
6375
+ composition: "blend",
6376
+ onUpdate: () => {
6377
+ draggable.setY(coord.yCoord);
6378
+ }
6379
+ });
6380
+ }
6381
+ },
6382
+ onUpdate: ({ progressY }) => {
6383
+ if (!setModalControls) return;
6384
+ if (progressY >= DRAG_TO_CLOSE_PROGRESS && !readyToCloseRef.current) {
6385
+ readyToCloseRef.current = true;
6386
+ setModalControls((prev) => ({
6387
+ ...prev,
6388
+ readyToClose: true
6389
+ }));
6390
+ }
6391
+ if (progressY < DRAG_TO_CLOSE_PROGRESS && readyToCloseRef.current) {
6392
+ readyToCloseRef.current = false;
6393
+ setModalControls((prev) => ({
6394
+ ...prev,
6395
+ readyToClose: false
6396
+ }));
6397
+ }
6398
+ },
6399
+ trigger: draggableTrigger
6400
+ });
6401
+ }
6402
+ const onDraggable = useEffectEvent(({ dialogPanel, draggableTrigger }) => {
6403
+ if (!pseudoContainerRef) return;
6404
+ const { top, left, width } = dialogPanel.getBoundingClientRect();
6405
+ pseudoContainerRef.current = document.createElement("div");
6406
+ const pseudoContainer = pseudoContainerRef.current;
6407
+ pseudoContainer.style.position = "fixed";
6408
+ pseudoContainer.style.top = `${top}px`;
6409
+ pseudoContainer.style.left = `${left}px`;
6410
+ pseudoContainer.style.width = `${width}px`;
6411
+ pseudoContainer.style.height = `100dvh`;
6412
+ pseudoContainer.style.zIndex = "-1";
6413
+ pseudoContainer.style.border = "2px solid blue";
6414
+ document.body.appendChild(pseudoContainer);
6415
+ animate(dialogPanel, {
6416
+ ...isMobileDevice ? {
6417
+ y: ["100lvh", 0],
6418
+ ease: "outExpo",
6419
+ duration: 500
6420
+ } : { keyframes: [
6421
+ {
6422
+ opacity: [0, 1],
6423
+ scale: [.5, .85],
6424
+ y: ["10rem", "9rem"],
6425
+ ease: "inExpo",
6426
+ duration: 250
6427
+ },
6428
+ {
6429
+ scale: [.85, 1],
6430
+ y: ["9rem", "0rem"],
6431
+ ease: "outExpo",
6432
+ duration: 500
6433
+ },
6434
+ {
6435
+ y: "0px",
6436
+ duration: 0
6437
+ }
6438
+ ] },
6439
+ onComplete: () => setUpDraggable({
6440
+ dialogPanel,
6441
+ draggableTrigger,
6442
+ pseudoContainer
6443
+ })
6444
+ });
6445
+ });
6446
+ useEffect(() => {
6447
+ if (isOpen && dialogPanelEl && draggableTriggerEl) onDraggable({
6448
+ dialogPanel: dialogPanelEl,
6449
+ draggableTrigger: draggableTriggerEl
6450
+ });
6451
+ }, [
6452
+ isOpen,
6453
+ dialogPanelEl,
6454
+ draggableTriggerEl
6455
+ ]);
6369
6456
  return /* @__PURE__ */ jsxs(Dialog, {
6370
6457
  open: isOpen,
6371
- onClose: () => closeModal?.(),
6458
+ onClose: closeModal || (() => void 0),
6372
6459
  className: ["isolate z-50", place === "bottom" && "after:fixed after:inset-x-0 after:bottom-0 after:-z-10 after:h-16 after:bg-neutral-50 sm:after:hidden"].join(" "),
6373
6460
  children: [/* @__PURE__ */ jsx(DialogBackdrop, {
6374
6461
  transition: true,
6375
- className: ["ease-exponential fixed inset-0 cursor-pointer transition-[opacity,background-color,backdrop-filter,-webkit-backdrop-filter] delay-100 duration-750 data-closed:opacity-0", readyToClose ? "bg-neutral-50/5 backdrop-blur-[1px] dark:bg-neutral-950/5" : "bg-neutral-50/25 backdrop-blur-sm dark:bg-neutral-950/25"].join(" "),
6376
- children: /* @__PURE__ */ jsx(Button, {
6462
+ ...readyToClose ? { "data-ready": "" } : {},
6463
+ className: "fixed inset-0 cursor-pointer bg-neutral-50/25 backdrop-blur-sm transition-[opacity,background-color,backdrop-filter,-webkit-backdrop-filter] delay-100 duration-750 ease-exponential data-closed:opacity-0 data-ready:bg-neutral-50/5 data-ready:backdrop-blur-[1px] dark:bg-neutral-950/25 dark:data-ready:bg-neutral-950/5",
6464
+ children: /* @__PURE__ */ jsxs(Button, {
6377
6465
  padding: "none",
6378
6466
  rounded: "full",
6379
- className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
6380
- children: /* @__PURE__ */ jsxs("div", {
6381
- className: "ease-exponential absolute top-1 right-1 flex items-center gap-1 pbs-px transition-transform duration-300 pointer-fine:group-hover/button:-translate-x-0.5",
6382
- children: [/* @__PURE__ */ jsxs("span", {
6383
- className: "block text-xs leading-none uppercase",
6384
- children: ["Close", /* @__PURE__ */ jsx("span", {
6385
- className: "sr-only",
6386
- children: "Modal"
6387
- })]
6388
- }), /* @__PURE__ */ jsx(Xmark, { className: "-top-px block size-4 scale-75 rotate-90 transition-transform duration-300 ease-in-out group-hover/button:rotate-0" })]
6389
- })
6467
+ className: "group/button fixed top-4 right-4 grid size-7 grid-cols-[1fr_calc(var(--spacing)*7)] gap-0 transition-[background-color,background-position-y,scale,grid-template-columns] pointer-fine:grid-cols-[0fr_calc(var(--spacing)*7)] pointer-fine:hover:grid-cols-[1fr_calc(var(--spacing)*7)]",
6468
+ children: [/* @__PURE__ */ jsxs("span", {
6469
+ className: "block overflow-x-hidden text-center text-xs leading-none uppercase",
6470
+ children: [/* @__PURE__ */ jsx("span", {
6471
+ className: "ps-2",
6472
+ children: "Close"
6473
+ }), /* @__PURE__ */ jsx("span", {
6474
+ className: "sr-only",
6475
+ children: "Modal"
6476
+ })]
6477
+ }), /* @__PURE__ */ jsx(Xmark, { className: "mx-auto size-3.5 rotate-90 transition-transform duration-300 ease-in-out group-hover/button:rotate-0" })]
6390
6478
  })
6391
6479
  }), /* @__PURE__ */ jsxs(DialogPanel, {
6392
- ref: dialogPanelRef,
6393
- transition: true,
6394
- className: twMerge("ease-exponential fixed left-1/2 -translate-x-1/2 overflow-y-scroll bg-neutral-50 p-4 shadow-[0_-15px_50px_-12px] shadow-neutral-950/25 transition-[transform,translate,opacity] duration-750 data-closed:scale-50 data-closed:opacity-0 sm:w-[calc(100vw-2rem)] sm:max-w-fit sm:p-6 sm:shadow-2xl lg:p-8 dark:bg-neutral-900", place === "center" ? "top-1/2 -translate-y-1/2 rounded-2xl data-enter:translate-y-[calc(-50%+12rem)] data-leave:translate-y-[calc(-50%-8rem)]" : "bottom-0 h-fit max-h-[calc(100dvh-4rem)] translate-y-0 rounded-t-4xl data-enter:translate-y-full data-leave:translate-y-full sm:top-1/2 sm:bottom-auto sm:rounded-t-2xl sm:rounded-b-2xl sm:data-enter:translate-y-[calc(-50%+12rem)] sm:data-leave:translate-y-[calc(-50%-8rem)] sm:data-open:-translate-y-1/2 pointer-fine:top-1/2 pointer-fine:bottom-auto pointer-fine:-translate-y-1/2 pointer-fine:rounded-2xl", className),
6480
+ ref: setDialogPanelRef,
6481
+ className: twMerge("fixed left-1/2 w-screen -translate-x-1/2 bg-neutral-50 px-4 shadow-[0_-15px_50px_-12px] shadow-neutral-950/25 ease-exponential sm:w-[calc(100vw-2rem)] sm:max-w-fit sm:px-6 sm:shadow-2xl lg:px-8 dark:bg-neutral-900", place === "center" ? "top-1/2 -translate-y-1/2 rounded-2xl" : "bottom-0 h-fit max-h-[calc(100dvh-4rem)] translate-y-0 rounded-ss-4xl rounded-se-4xl after:absolute after:inset-x-0 after:-bottom-64 after:h-64 after:bg-inherit sm:top-1/2 sm:bottom-auto sm:-translate-y-1/2 sm:rounded-ee-4xl sm:rounded-es-4xl sm:after:hidden pointer-fine:top-1/2 pointer-fine:bottom-auto pointer-fine:-translate-y-1/2 pointer-fine:rounded-3xl", className),
6482
+ style: isMobileDevice ? void 0 : { opacity: 0 },
6395
6483
  children: [/* @__PURE__ */ jsx("button", {
6396
- className: ["after:ease-exponential absolute inset-x-0 top-0 z-10 flex h-6 cursor-grab items-center justify-center after:h-1 after:w-8 after:rounded-full after:transition-[transform,background-color] after:duration-500 active:cursor-grabbing", readyToClose ? "after:scale-x-200 after:scale-y-200 after:bg-blue-500" : "after:bg-neutral-500/50 active:after:scale-x-150 active:after:scale-y-125 active:after:bg-neutral-500 pointer-fine:hover:after:scale-x-125 pointer-fine:hover:after:bg-neutral-500/75 pointer-fine:active:after:scale-x-150 pointer-fine:active:after:bg-neutral-500"].join(" "),
6397
- onTouchStart: enableTouchClose,
6398
- onMouseDown: enableMouseClose,
6484
+ className: "absolute inset-x-0 top-0 z-10 flex h-6 cursor-grab items-center justify-center after:h-1 after:w-8 after:rounded-full after:bg-neutral-500/50 after:transition-[scale,background-color] after:duration-500 after:ease-exponential active:cursor-grabbing active:after:scale-x-150 active:after:scale-y-125 active:after:bg-neutral-500 data-ready:after:scale-x-200 data-ready:after:scale-y-200 data-ready:after:bg-(--base-theme-color) pointer-fine:hover:after:scale-x-125 pointer-fine:hover:after:bg-neutral-500/75 pointer-fine:active:after:scale-x-150 pointer-fine:active:after:bg-neutral-500 data-ready:pointer-fine:hover:after:scale-x-200 data-ready:pointer-fine:hover:after:scale-y-200 data-ready:pointer-fine:hover:after:bg-(--base-theme-color) data-ready:pointer-fine:active:after:scale-x-200 data-ready:pointer-fine:active:after:scale-y-200 data-ready:pointer-fine:active:after:bg-(--base-theme-color)",
6485
+ ...readyToClose ? { "data-ready": "" } : {},
6486
+ ref: setDraggableTriggerRef,
6399
6487
  type: "button",
6400
6488
  children: /* @__PURE__ */ jsx("span", {
6401
6489
  className: "sr-only",
6402
6490
  children: "Drag down to close"
6403
6491
  })
6404
- }), /* @__PURE__ */ jsx("div", { ...props })]
6492
+ }), /* @__PURE__ */ jsx("div", {
6493
+ className: "overflow-y-scroll",
6494
+ children: /* @__PURE__ */ jsx("div", {
6495
+ ...props,
6496
+ className: "py-4 sm:py-6 lg:py-8"
6497
+ })
6498
+ })]
6405
6499
  })]
6406
6500
  });
6407
6501
  }
6408
- function ModalClose({ as, ...props }) {
6409
- return /* @__PURE__ */ jsx(as || Button$1, { ...props });
6502
+ function ModalClose({ as, onClick, ...props }) {
6503
+ const ModalCloseElement = as || Button$1;
6504
+ const [modalControls] = useModalControls((store) => store);
6505
+ const { closeModal } = modalControls || { closeModal: () => {} };
6506
+ const handleClick = (e) => {
6507
+ onClick?.(e);
6508
+ if (!e.defaultPrevented) closeModal();
6509
+ };
6510
+ return /* @__PURE__ */ jsx(ModalCloseElement, {
6511
+ ...props,
6512
+ onClick: handleClick
6513
+ });
6410
6514
  }
6411
6515
  function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
6412
- const [bodyElement, setBodyElement] = useState(null);
6413
- const onVisible = useEffectEvent(() => {
6414
- setBodyElement(document.body);
6415
- });
6416
- useEffect(() => {
6417
- if (typeof window !== "undefined") onVisible();
6418
- }, []);
6419
- const [, setModalControls] = useModalControls(() => null);
6516
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
6420
6517
  const [isOpen, setIsOpen] = useState(false);
6421
- const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
6422
- x: 0,
6423
- y: 0
6424
- }), localDialogPanelRef = useRef(null);
6425
- const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
6518
+ const localDialogPanelRef = useRef(null);
6426
6519
  const openModal = () => {
6427
6520
  setIsOpen((previous) => {
6428
6521
  if (previous) return previous;
@@ -6430,67 +6523,47 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
6430
6523
  return true;
6431
6524
  });
6432
6525
  };
6526
+ const closeFunctions = () => {
6527
+ onClose?.();
6528
+ modalControls?.pseudoContainerRef?.current?.remove();
6529
+ setModalControls?.((previous) => ({
6530
+ ...previous,
6531
+ pseudoContainerRef: { current: null },
6532
+ readyToClose: false
6533
+ }));
6534
+ };
6535
+ const mobileAnimation = {
6536
+ y: "100%",
6537
+ ease: "outExpo",
6538
+ duration: 500
6539
+ };
6540
+ const desktopAnimation = {
6541
+ opacity: 0,
6542
+ scale: .5,
6543
+ ease: "outExpo",
6544
+ duration: 500
6545
+ };
6546
+ const handleClose = () => {
6547
+ if (!localDialogPanelRef.current) return closeFunctions();
6548
+ animate(localDialogPanelRef.current, {
6549
+ ...isMobileDevice ? mobileAnimation : desktopAnimation,
6550
+ composition: "blend",
6551
+ onComplete: closeFunctions
6552
+ });
6553
+ };
6433
6554
  const closeModal = () => {
6434
6555
  setIsOpen((previous) => {
6435
6556
  if (!previous) return previous;
6436
- onClose?.();
6557
+ handleClose();
6437
6558
  return false;
6438
6559
  });
6439
6560
  };
6440
- const enableClose = (clientX, clientY) => {
6441
- startDragCoords.current.x = clientX;
6442
- startDragCoords.current.y = clientY;
6443
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "0s";
6444
- setAllowDragClose(true);
6445
- };
6446
- const enableTouchClose = (e) => {
6447
- const { touches } = e, { clientY } = touches[0];
6448
- enableClose(0, clientY);
6449
- };
6450
- const enableMouseClose = (e) => {
6451
- const { clientX, clientY } = e;
6452
- enableClose(clientX, clientY);
6453
- };
6454
- const handleMove = (clientX, clientY) => {
6455
- if (!localDialogPanelRef.current) return;
6456
- let deltaX = clientX - startDragCoords.current.x, deltaY = clientY - startDragCoords.current.y;
6457
- if (deltaX > 0) deltaX = easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
6458
- if (deltaX < 0) deltaX = -easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
6459
- if (deltaY < 0) deltaY = -easeOutExpo(Math.abs(deltaY), 0, 25, 2e3);
6460
- if (deltaY >= 100 && !readyToClose) setReadyToClose(true);
6461
- else if (deltaY < 100 && readyToClose) setReadyToClose(false);
6462
- const greaterThanMediaSmall = innerWidth > 640;
6463
- localDialogPanelRef.current.style.translate = `calc(-50% + ${deltaX}px) ${greaterThanMediaSmall ? `calc(-50% + ${deltaY}px)` : `${deltaY}px`}`;
6464
- };
6465
- const handleMouseMove = (e) => {
6466
- if (!allowDragClose) return;
6467
- const { clientX, clientY } = e;
6468
- handleMove(clientX, clientY);
6469
- };
6470
- const disableDragClose = (clientY) => {
6471
- const deltaY = clientY - startDragCoords.current.y;
6472
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "";
6473
- if (deltaY >= 100) {
6474
- closeModal();
6475
- setReadyToClose(false);
6476
- } else setTimeout(() => {
6477
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.removeProperty("translate");
6478
- }, 50);
6479
- };
6480
- const disableMouseDragClose = (e) => {
6481
- if (allowDragClose) setAllowDragClose(false);
6482
- const { clientY } = e;
6483
- disableDragClose(clientY);
6484
- };
6485
6561
  useEffect(() => {
6486
6562
  setModalControls?.((previous) => ({
6487
6563
  ...previous,
6488
6564
  isOpen,
6489
- readyToClose,
6490
6565
  place,
6491
6566
  className,
6492
- enableMouseClose,
6493
- enableTouchClose,
6494
6567
  openModal,
6495
6568
  closeModal,
6496
6569
  dialogPanelRef: localDialogPanelRef
@@ -6498,25 +6571,16 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
6498
6571
  }, [
6499
6572
  className,
6500
6573
  closeModal,
6501
- enableMouseClose,
6502
- enableTouchClose,
6503
6574
  isOpen,
6504
6575
  openModal,
6505
6576
  place,
6506
- readyToClose,
6507
6577
  setModalControls
6508
6578
  ]);
6509
- return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
6510
- ref: dragMoveBoxRef,
6511
- className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
6512
- onMouseMove: handleMouseMove,
6513
- onMouseUp: disableMouseDragClose
6514
- }), bodyElement), children] });
6579
+ return /* @__PURE__ */ jsx(Fragment, { children });
6515
6580
  }
6516
6581
  function Modal(props) {
6517
6582
  return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
6518
6583
  }
6519
-
6520
6584
  //#endregion
6521
6585
  //#region src/symbols/chevron.up.chevron.down.tsx
6522
6586
  function ChevronUpChevronDown({ weight = "regular", ...props }) {
@@ -6568,7 +6632,6 @@ function ChevronUpChevronDown({ weight = "regular", ...props }) {
6568
6632
  });
6569
6633
  }
6570
6634
  }
6571
-
6572
6635
  //#endregion
6573
6636
  //#region src/components/select.tsx
6574
6637
  /**
@@ -6594,10 +6657,10 @@ function SelectOption({ children, className, name, ...props }) {
6594
6657
  className: "group/option contents",
6595
6658
  ...props,
6596
6659
  children: (bag) => bag.selectedOption ? /* @__PURE__ */ jsx("span", {
6597
- className: "mr-3 before:absolute before:-left-3 before:content-[\",_\"]",
6660
+ className: `mr-3 before:absolute before:-left-3 before:content-[',_']`,
6598
6661
  children: name
6599
6662
  }) : /* @__PURE__ */ jsxs("div", {
6600
- className: twMerge("ease-exponential corner-super-1.5 flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 transition-[background-color] duration-200 select-none [--theme-color:var(--base-theme-color)] group-disabled/option:opacity-50 group-data-focus/option:bg-(--theme-color)/15 group-data-selected/option:cursor-default group-data-selected/option:text-(--theme-color) group-data-focus/option:group-data-selected/option:bg-transparent dark:group-data-focus/option:bg-(--theme-color)/15", className),
6663
+ className: twMerge("flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 transition-[background-color] duration-200 ease-exponential select-none [--theme-color:var(--base-theme-color)] corner-super-1.5 group-disabled/option:opacity-50 group-data-focus/option:bg-(--theme-color)/15 group-data-selected/option:cursor-default group-data-selected/option:text-(--theme-color) group-data-focus/option:group-data-selected/option:bg-transparent dark:group-data-focus/option:bg-(--theme-color)/15", className),
6601
6664
  children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
6602
6665
  })
6603
6666
  });
@@ -6644,7 +6707,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
6644
6707
  children: [
6645
6708
  label && /* @__PURE__ */ jsx(Label, {
6646
6709
  ...labelProps,
6647
- className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
6710
+ className: (bag) => twMerge("text-sm font-medium", required ? `after:text-red-700 after:content-['_*']` : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
6648
6711
  children: label
6649
6712
  }),
6650
6713
  /* @__PURE__ */ jsxs(Listbox, {
@@ -6653,14 +6716,14 @@ function Select({ buttonProps, children, className, description, descriptionProp
6653
6716
  onChange: handleChange,
6654
6717
  children: [/* @__PURE__ */ jsxs(ListboxButton, {
6655
6718
  ...buttonProps,
6656
- className: (bag) => twMerge("ease-exponential corner-super-1.5 inline-block w-full overflow-clip rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pr-4.5 pl-2 text-left text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 dark:bg-neutral-700 dark:text-neutral-50", "focus:outline-3 focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "data-invalid:border-red-500 data-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100)_5%)] data-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] data-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:data-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] dark:data-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:data-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] data-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-500)_5%)] data-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] data-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:data-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800)_5%)] dark:data-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:data-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)]", typeof className === "function" ? className(bag) : className),
6719
+ className: (bag) => twMerge("inline-block w-full overflow-clip rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pr-4.5 pl-2 text-left text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 ease-exponential corner-super-1.5 dark:bg-neutral-700 dark:text-neutral-50", "focus:outline-3 focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "data-invalid:border-red-500 data-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100)_5%)] data-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] data-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:data-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] dark:data-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:data-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)] data-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-500)_5%)] data-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] data-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-100))] dark:data-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800)_5%)] dark:data-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:data-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_5%,var(--color-neutral-800)_5%)]", typeof className === "function" ? className(bag) : className),
6657
6720
  ref: listboxButtonRef,
6658
6721
  children: [
6659
6722
  /* @__PURE__ */ jsx("input", {
6660
6723
  "aria-hidden": "true",
6661
6724
  className: "sr-only top-0 left-1/2",
6662
6725
  id: props.name + ":input:id" + uniqueId,
6663
- name: props.name + ":input:name" + uniqueId,
6726
+ name: props.name,
6664
6727
  onChange: () => {},
6665
6728
  onInvalid: handleInvalid,
6666
6729
  onFocus: refocus,
@@ -6681,7 +6744,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
6681
6744
  }), /* @__PURE__ */ jsx(ListboxOptions, {
6682
6745
  ...optionsProps,
6683
6746
  anchor: anchor || "bottom start",
6684
- className: (bag) => twMerge("ease-exponential corner-super-1.5 z-50 w-(--button-width) origin-top rounded-xl border border-neutral-500/50 bg-neutral-50/95 p-1 backdrop-blur-sm backdrop-brightness-110 transition-[opacity,scale,translate] duration-300 [--anchor-gap:--spacing(1)] focus:outline-none data-closed:-translate-y-0.5 data-closed:scale-y-0 data-closed:opacity-0 data-[anchor*=top]:origin-bottom dark:bg-neutral-800/95", typeof optionsClassName === "function" ? optionsClassName(bag) : optionsClassName),
6747
+ className: (bag) => twMerge("z-50 w-(--button-width) origin-top rounded-xl border border-neutral-500/50 bg-neutral-50/95 p-1 backdrop-blur-sm backdrop-brightness-110 transition-[opacity,scale,translate] duration-300 ease-exponential [--anchor-gap:--spacing(1)] corner-super-1.5 focus:outline-none data-closed:-translate-y-0.5 data-closed:scale-y-0 data-closed:opacity-0 data-[anchor*=top]:origin-bottom dark:bg-neutral-800/95", typeof optionsClassName === "function" ? optionsClassName(bag) : optionsClassName),
6685
6748
  transition: transition || true,
6686
6749
  children
6687
6750
  })]
@@ -6694,7 +6757,6 @@ function Select({ buttonProps, children, className, description, descriptionProp
6694
6757
  ]
6695
6758
  });
6696
6759
  }
6697
-
6698
6760
  //#endregion
6699
6761
  //#region src/symbols/circle.fill.tsx
6700
6762
  function CircleFill({ weight = "regular", ...props }) {
@@ -6746,7 +6808,6 @@ function CircleFill({ weight = "regular", ...props }) {
6746
6808
  });
6747
6809
  }
6748
6810
  }
6749
-
6750
6811
  //#endregion
6751
6812
  //#region src/components/submit-button.tsx
6752
6813
  /**
@@ -6779,15 +6840,15 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
6779
6840
  }),
6780
6841
  "\xA0",
6781
6842
  /* @__PURE__ */ jsx(CircleFill, {
6782
- className: "animate-wave size-2",
6843
+ className: "size-2 animate-wave",
6783
6844
  weight: "black"
6784
6845
  }),
6785
6846
  /* @__PURE__ */ jsx(CircleFill, {
6786
- className: "animate-wave animation-delay-100 size-2",
6847
+ className: "size-2 animate-wave animation-delay-100",
6787
6848
  weight: "black"
6788
6849
  }),
6789
6850
  /* @__PURE__ */ jsx(CircleFill, {
6790
- className: "animate-wave animation-delay-200 size-2",
6851
+ className: "size-2 animate-wave animation-delay-200",
6791
6852
  weight: "black"
6792
6853
  }),
6793
6854
  "\xA0"
@@ -6822,7 +6883,7 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
6822
6883
  ...dataFormState,
6823
6884
  className: twMerge([
6824
6885
  formStatusButtonClasses,
6825
- "w-full text-white",
6886
+ "flex w-full items-center justify-center gap-2 text-white",
6826
6887
  className
6827
6888
  ]),
6828
6889
  customTheme: { themeColor: twMerge("data-error:[--theme-color:var(--color-red-500)] data-incomplete:[--theme-color:var(--color-neutral-500)] data-loading:[--theme-color:var(--color-yellow-500)] data-readonly:[--theme-color:var(--color-neutral-500)] data-ready:[--theme-color:var(--base-theme-color)] data-success:[--theme-color:var(--color-green-500)]", customTheme?.themeColor) },
@@ -6831,7 +6892,6 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
6831
6892
  children: buttonText
6832
6893
  });
6833
6894
  }
6834
-
6835
6895
  //#endregion
6836
6896
  //#region src/components/textarea.tsx
6837
6897
  /**
@@ -6889,7 +6949,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
6889
6949
  }),
6890
6950
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
6891
6951
  ...props,
6892
- className: (bag) => twMerge("corner-super-1.5 ease-exponential w-full rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 dark:bg-neutral-700 dark:text-neutral-50", "focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "user-invalid:border-red-500 user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_20%,var(--color-neutral-100))] user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_20%,var(--color-neutral-800))] dark:user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-800))] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-100))] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-800))]", resizeClassName, typeof className === "function" ? className(bag) : className),
6952
+ className: (bag) => twMerge("w-full rounded-xl border border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-blue-400/95 transition-[background-color] duration-300 ease-exponential corner-super-1.5 dark:bg-neutral-700 dark:text-neutral-50", "focus-visible:bg-neutral-50 focus-visible:outline-3 active:bg-neutral-200 dark:focus-visible:bg-neutral-600 dark:active:bg-neutral-800 pointer-fine:hover:bg-neutral-50 pointer-fine:active:bg-neutral-200 dark:pointer-fine:hover:bg-neutral-600 dark:pointer-fine:active:bg-neutral-800", "user-invalid:border-red-500 user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_20%,var(--color-neutral-100))] user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklch,var(--color-red-500)_20%,var(--color-neutral-800))] dark:user-invalid:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-800))] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-100))] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklch,var(--color-red-500)_10%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklch,var(--color-red-500)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklch,var(--color-red-500)_25%,var(--color-neutral-800))]", resizeClassName, typeof className === "function" ? className(bag) : className),
6893
6953
  required
6894
6954
  }), children] }),
6895
6955
  description && /* @__PURE__ */ jsx(Description, {
@@ -6900,7 +6960,6 @@ function Textarea({ children, className, description, descriptionProps: { classN
6900
6960
  ]
6901
6961
  });
6902
6962
  }
6903
-
6904
6963
  //#endregion
6905
6964
  //#region src/components/time.tsx
6906
6965
  /**
@@ -6913,45 +6972,48 @@ function Textarea({ children, className, description, descriptionProps: { classN
6913
6972
  * @prop dateTime - Set the dateTime itself.
6914
6973
  * @prop day - Include the day of the month in the display.
6915
6974
  * @prop hours - Include the hours in the display.
6975
+ * @prop militaryTime - Use military time (24-hour clock) instead of AM/PM.
6916
6976
  * @prop milliseconds - Include the milliseconds in the display.
6917
6977
  * @prop minutes - Include the minutes in the display.
6918
6978
  * @prop month - Include the month in the display.
6919
6979
  * @prop seconds - Include the seconds in the display.
6920
6980
  * @prop year - Include the year in the display.
6921
6981
  */
6922
- function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }) {
6982
+ function Time({ children, dateObject, dateTime, day, hours, militaryTime, milliseconds, minutes, month, seconds, year, ref, ...props }) {
6923
6983
  const [date, setDate] = useState(dateObject || void 0);
6924
6984
  const getDateAndTime = () => {
6925
6985
  if (dateTime) return dateTime;
6926
6986
  if (!date) return "";
6927
- return [
6928
- date.getFullYear(),
6929
- getMonth(date),
6930
- getDate(date),
6931
- getHours(date),
6932
- getMinutes(date),
6933
- getSeconds(date),
6934
- getMilliseconds(date)
6935
- ].join("-");
6987
+ const currentYear = date.getFullYear(), currentMonth = getMonth(date), currentDay = getDate(date), currentHour = getHours(date), currentMinute = getMinutes(date), currentSecond = getSeconds(date), currentMillisecond = getMilliseconds(date);
6988
+ return [[
6989
+ currentYear,
6990
+ currentMonth,
6991
+ currentDay
6992
+ ].join("-"), [
6993
+ currentHour,
6994
+ currentMinute,
6995
+ [currentSecond, currentMillisecond].join(".")
6996
+ ].join(":")].join(" ");
6936
6997
  };
6937
6998
  const dateAndTime = getDateAndTime();
6938
6999
  const getDateDisplay = () => {
6939
7000
  if (children) return children;
6940
7001
  if (dateAndTime === "") return "";
6941
- const [dtYear, dtMonth, dtDay, dtHour, dtMinute, dtSecond, dtMillisecond] = dateAndTime.split("-").map(Number);
7002
+ const [dateData, timeData] = dateAndTime.split(" "), [dtYear, dtMonth, dtDay] = dateData.split("-").map(Number), [dtHour, dtMinute, secondData] = timeData.split(":").map(Number), [dtSecond, dtMillisecond] = String(secondData).split(".").map(Number);
6942
7003
  return [
6943
- day && dtDay,
6944
- month && [getMonthName(Number(dtMonth) - 1), month && year && ","].filter(Boolean).join(""),
7004
+ [month && getMonthName(Number(dtMonth) - 1), !day && month && year && ","].filter(Boolean).join(""),
7005
+ [day && dtDay, day && month && year && ","].filter(Boolean).join(""),
6945
7006
  year && dtYear,
6946
7007
  hours && minutes && [
6947
7008
  "at ",
6948
- hours && dtHour,
7009
+ hours && militaryTime ? dtHour : dtHour % 12 || 12,
6949
7010
  hours && minutes && ":",
6950
7011
  minutes && dtMinute,
6951
7012
  minutes && seconds && ":",
6952
7013
  seconds && dtSecond,
6953
7014
  seconds && milliseconds && ".",
6954
- milliseconds && dtMillisecond
7015
+ milliseconds && dtMillisecond,
7016
+ !militaryTime && (dtHour < 12 ? "am" : "pm")
6955
7017
  ].filter(Boolean).join("")
6956
7018
  ].filter(Boolean).join(" ");
6957
7019
  };
@@ -6969,7 +7031,6 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
6969
7031
  children: dateDisplay
6970
7032
  });
6971
7033
  }
6972
-
6973
7034
  //#endregion
6974
7035
  //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
6975
7036
  const min = Math.min;
@@ -6986,10 +7047,6 @@ const oppositeSideMap = {
6986
7047
  bottom: "top",
6987
7048
  top: "bottom"
6988
7049
  };
6989
- const oppositeAlignmentMap = {
6990
- start: "end",
6991
- end: "start"
6992
- };
6993
7050
  function clamp(start, value, end) {
6994
7051
  return max(start, min(value, end));
6995
7052
  }
@@ -7008,9 +7065,9 @@ function getOppositeAxis(axis) {
7008
7065
  function getAxisLength(axis) {
7009
7066
  return axis === "y" ? "height" : "width";
7010
7067
  }
7011
- const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
7012
7068
  function getSideAxis(placement) {
7013
- return yAxisSides.has(getSide(placement)) ? "y" : "x";
7069
+ const firstChar = placement[0];
7070
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
7014
7071
  }
7015
7072
  function getAlignmentAxis(placement) {
7016
7073
  return getOppositeAxis(getSideAxis(placement));
@@ -7033,7 +7090,7 @@ function getExpandedPlacements(placement) {
7033
7090
  ];
7034
7091
  }
7035
7092
  function getOppositeAlignmentPlacement(placement) {
7036
- return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
7093
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
7037
7094
  }
7038
7095
  const lrPlacement = ["left", "right"];
7039
7096
  const rlPlacement = ["right", "left"];
@@ -7060,7 +7117,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
7060
7117
  return list;
7061
7118
  }
7062
7119
  function getOppositePlacement(placement) {
7063
- return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
7120
+ const side = getSide(placement);
7121
+ return oppositeSideMap[side] + placement.slice(side.length);
7064
7122
  }
7065
7123
  function expandPaddingObject(padding) {
7066
7124
  return {
@@ -7092,7 +7150,6 @@ function rectToClientRect(rect) {
7092
7150
  y
7093
7151
  };
7094
7152
  }
7095
-
7096
7153
  //#endregion
7097
7154
  //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
7098
7155
  function computeCoordsFromPlacement(_ref, placement, rtl) {
@@ -7194,6 +7251,7 @@ async function detectOverflow(state, options) {
7194
7251
  right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
7195
7252
  };
7196
7253
  }
7254
+ const MAX_RESET_COUNT = 50;
7197
7255
  /**
7198
7256
  * Computes the `x` and `y` coordinates that will place the floating element
7199
7257
  * next to a given reference element.
@@ -7203,7 +7261,10 @@ async function detectOverflow(state, options) {
7203
7261
  */
7204
7262
  const computePosition$1 = async (reference, floating, config) => {
7205
7263
  const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
7206
- const validMiddleware = middleware.filter(Boolean);
7264
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
7265
+ ...platform,
7266
+ detectOverflow
7267
+ };
7207
7268
  const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
7208
7269
  let rects = await platform.getElementRects({
7209
7270
  reference,
@@ -7212,11 +7273,12 @@ const computePosition$1 = async (reference, floating, config) => {
7212
7273
  });
7213
7274
  let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
7214
7275
  let statefulPlacement = placement;
7215
- let middlewareData = {};
7216
7276
  let resetCount = 0;
7217
- for (let i = 0; i < validMiddleware.length; i++) {
7218
- var _platform$detectOverf;
7219
- const { name, fn } = validMiddleware[i];
7277
+ const middlewareData = {};
7278
+ for (let i = 0; i < middleware.length; i++) {
7279
+ const currentMiddleware = middleware[i];
7280
+ if (!currentMiddleware) continue;
7281
+ const { name, fn } = currentMiddleware;
7220
7282
  const { x: nextX, y: nextY, data, reset } = await fn({
7221
7283
  x,
7222
7284
  y,
@@ -7225,10 +7287,7 @@ const computePosition$1 = async (reference, floating, config) => {
7225
7287
  strategy,
7226
7288
  middlewareData,
7227
7289
  rects,
7228
- platform: {
7229
- ...platform,
7230
- detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
7231
- },
7290
+ platform: platformWithDetectOverflow,
7232
7291
  elements: {
7233
7292
  reference,
7234
7293
  floating
@@ -7236,14 +7295,11 @@ const computePosition$1 = async (reference, floating, config) => {
7236
7295
  });
7237
7296
  x = nextX != null ? nextX : x;
7238
7297
  y = nextY != null ? nextY : y;
7239
- middlewareData = {
7240
- ...middlewareData,
7241
- [name]: {
7242
- ...middlewareData[name],
7243
- ...data
7244
- }
7298
+ middlewareData[name] = {
7299
+ ...middlewareData[name],
7300
+ ...data
7245
7301
  };
7246
- if (reset && resetCount <= 50) {
7302
+ if (reset && resetCount < MAX_RESET_COUNT) {
7247
7303
  resetCount++;
7248
7304
  if (typeof reset === "object") {
7249
7305
  if (reset.placement) statefulPlacement = reset.placement;
@@ -7562,7 +7618,6 @@ const size$2 = function(options) {
7562
7618
  }
7563
7619
  };
7564
7620
  };
7565
-
7566
7621
  //#endregion
7567
7622
  //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
7568
7623
  function hasWindow() {
@@ -7596,54 +7651,30 @@ function isShadowRoot(value) {
7596
7651
  if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
7597
7652
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
7598
7653
  }
7599
- const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
7600
7654
  function isOverflowElement(element) {
7601
7655
  const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
7602
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
7656
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
7603
7657
  }
7604
- const tableElements = /* @__PURE__ */ new Set([
7605
- "table",
7606
- "td",
7607
- "th"
7608
- ]);
7609
7658
  function isTableElement(element) {
7610
- return tableElements.has(getNodeName(element));
7659
+ return /^(table|td|th)$/.test(getNodeName(element));
7611
7660
  }
7612
- const topLayerSelectors = [":popover-open", ":modal"];
7613
7661
  function isTopLayer(element) {
7614
- return topLayerSelectors.some((selector) => {
7615
- try {
7616
- return element.matches(selector);
7617
- } catch (_e) {
7618
- return false;
7619
- }
7620
- });
7621
- }
7622
- const transformProperties = [
7623
- "transform",
7624
- "translate",
7625
- "scale",
7626
- "rotate",
7627
- "perspective"
7628
- ];
7629
- const willChangeValues = [
7630
- "transform",
7631
- "translate",
7632
- "scale",
7633
- "rotate",
7634
- "perspective",
7635
- "filter"
7636
- ];
7637
- const containValues = [
7638
- "paint",
7639
- "layout",
7640
- "strict",
7641
- "content"
7642
- ];
7662
+ try {
7663
+ if (element.matches(":popover-open")) return true;
7664
+ } catch (_e) {}
7665
+ try {
7666
+ return element.matches(":modal");
7667
+ } catch (_e) {
7668
+ return false;
7669
+ }
7670
+ }
7671
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
7672
+ const containRe = /paint|layout|strict|content/;
7673
+ const isNotNone = (value) => !!value && value !== "none";
7674
+ let isWebKitValue;
7643
7675
  function isContainingBlock(elementOrCss) {
7644
- const webkit = isWebKit();
7645
7676
  const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
7646
- return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
7677
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
7647
7678
  }
7648
7679
  function getContainingBlock(element) {
7649
7680
  let currentNode = getParentNode(element);
@@ -7655,16 +7686,11 @@ function getContainingBlock(element) {
7655
7686
  return null;
7656
7687
  }
7657
7688
  function isWebKit() {
7658
- if (typeof CSS === "undefined" || !CSS.supports) return false;
7659
- return CSS.supports("-webkit-backdrop-filter", "none");
7689
+ if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
7690
+ return isWebKitValue;
7660
7691
  }
7661
- const lastTraversableNodeNames = /* @__PURE__ */ new Set([
7662
- "html",
7663
- "body",
7664
- "#document"
7665
- ]);
7666
7692
  function isLastTraversableNode(node) {
7667
- return lastTraversableNodeNames.has(getNodeName(node));
7693
+ return /^(html|body|#document)$/.test(getNodeName(node));
7668
7694
  }
7669
7695
  function getComputedStyle$1(element) {
7670
7696
  return getWindow(element).getComputedStyle(element);
@@ -7700,13 +7726,11 @@ function getOverflowAncestors(node, list, traverseIframes) {
7700
7726
  if (isBody) {
7701
7727
  const frameElement = getFrameElement(win);
7702
7728
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
7703
- }
7704
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
7729
+ } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
7705
7730
  }
7706
7731
  function getFrameElement(win) {
7707
7732
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
7708
7733
  }
7709
-
7710
7734
  //#endregion
7711
7735
  //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
7712
7736
  function getCssDimensions(element) {
@@ -7827,7 +7851,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
7827
7851
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
7828
7852
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
7829
7853
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
7830
- if (isHTMLElement(offsetParent)) {
7854
+ if (isOffsetParentAnElement) {
7831
7855
  const offsetRect = getBoundingClientRect(offsetParent);
7832
7856
  scale = getScale(offsetParent);
7833
7857
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -7895,7 +7919,6 @@ function getViewportRect(element, strategy) {
7895
7919
  y
7896
7920
  };
7897
7921
  }
7898
- const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
7899
7922
  function getInnerBoundingClientRect(element, strategy) {
7900
7923
  const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
7901
7924
  const top = clientRect.top + element.clientTop;
@@ -7940,7 +7963,7 @@ function getClippingElementAncestors(element, cache) {
7940
7963
  const computedStyle = getComputedStyle$1(currentNode);
7941
7964
  const currentNodeIsContaining = isContainingBlock(currentNode);
7942
7965
  if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
7943
- if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
7966
+ if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
7944
7967
  else currentContainingBlockComputedStyle = computedStyle;
7945
7968
  currentNode = getParentNode(currentNode);
7946
7969
  }
@@ -7950,20 +7973,23 @@ function getClippingElementAncestors(element, cache) {
7950
7973
  function getClippingRect(_ref) {
7951
7974
  let { element, boundary, rootBoundary, strategy } = _ref;
7952
7975
  const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
7953
- const firstClippingAncestor = clippingAncestors[0];
7954
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
7955
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
7956
- accRect.top = max(rect.top, accRect.top);
7957
- accRect.right = min(rect.right, accRect.right);
7958
- accRect.bottom = min(rect.bottom, accRect.bottom);
7959
- accRect.left = max(rect.left, accRect.left);
7960
- return accRect;
7961
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
7976
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
7977
+ let top = firstRect.top;
7978
+ let right = firstRect.right;
7979
+ let bottom = firstRect.bottom;
7980
+ let left = firstRect.left;
7981
+ for (let i = 1; i < clippingAncestors.length; i++) {
7982
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
7983
+ top = max(rect.top, top);
7984
+ right = min(rect.right, right);
7985
+ bottom = min(rect.bottom, bottom);
7986
+ left = max(rect.left, left);
7987
+ }
7962
7988
  return {
7963
- width: clippingRect.right - clippingRect.left,
7964
- height: clippingRect.bottom - clippingRect.top,
7965
- x: clippingRect.left,
7966
- y: clippingRect.top
7989
+ width: right - left,
7990
+ height: bottom - top,
7991
+ x: left,
7992
+ y: top
7967
7993
  };
7968
7994
  }
7969
7995
  function getDimensions(element) {
@@ -8125,7 +8151,7 @@ function autoUpdate(reference, floating, update, options) {
8125
8151
  if (options === void 0) options = {};
8126
8152
  const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
8127
8153
  const referenceEl = unwrapElement(reference);
8128
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
8154
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
8129
8155
  ancestors.forEach((ancestor) => {
8130
8156
  ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
8131
8157
  ancestorResize && ancestor.addEventListener("resize", update);
@@ -8136,7 +8162,7 @@ function autoUpdate(reference, floating, update, options) {
8136
8162
  if (elementResize) {
8137
8163
  resizeObserver = new ResizeObserver((_ref) => {
8138
8164
  let [firstEntry] = _ref;
8139
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
8165
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
8140
8166
  resizeObserver.unobserve(floating);
8141
8167
  cancelAnimationFrame(reobserveFrame);
8142
8168
  reobserveFrame = requestAnimationFrame(() => {
@@ -8147,7 +8173,7 @@ function autoUpdate(reference, floating, update, options) {
8147
8173
  update();
8148
8174
  });
8149
8175
  if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
8150
- resizeObserver.observe(floating);
8176
+ if (floating) resizeObserver.observe(floating);
8151
8177
  }
8152
8178
  let frameId;
8153
8179
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -8224,7 +8250,6 @@ const computePosition = (reference, floating, options) => {
8224
8250
  platform: platformWithCache
8225
8251
  });
8226
8252
  };
8227
-
8228
8253
  //#endregion
8229
8254
  //#region node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
8230
8255
  var index = typeof document !== "undefined" ? useLayoutEffect : function noop() {};
@@ -8454,50 +8479,69 @@ const arrow$1 = (options) => {
8454
8479
  * object may be passed.
8455
8480
  * @see https://floating-ui.com/docs/offset
8456
8481
  */
8457
- const offset = (options, deps) => ({
8458
- ...offset$1(options),
8459
- options: [options, deps]
8460
- });
8482
+ const offset = (options, deps) => {
8483
+ const result = offset$1(options);
8484
+ return {
8485
+ name: result.name,
8486
+ fn: result.fn,
8487
+ options: [options, deps]
8488
+ };
8489
+ };
8461
8490
  /**
8462
8491
  * Optimizes the visibility of the floating element by shifting it in order to
8463
8492
  * keep it in view when it will overflow the clipping boundary.
8464
8493
  * @see https://floating-ui.com/docs/shift
8465
8494
  */
8466
- const shift = (options, deps) => ({
8467
- ...shift$1(options),
8468
- options: [options, deps]
8469
- });
8495
+ const shift = (options, deps) => {
8496
+ const result = shift$1(options);
8497
+ return {
8498
+ name: result.name,
8499
+ fn: result.fn,
8500
+ options: [options, deps]
8501
+ };
8502
+ };
8470
8503
  /**
8471
8504
  * Optimizes the visibility of the floating element by flipping the `placement`
8472
8505
  * in order to keep it in view when the preferred placement(s) will overflow the
8473
8506
  * clipping boundary. Alternative to `autoPlacement`.
8474
8507
  * @see https://floating-ui.com/docs/flip
8475
8508
  */
8476
- const flip = (options, deps) => ({
8477
- ...flip$1(options),
8478
- options: [options, deps]
8479
- });
8509
+ const flip = (options, deps) => {
8510
+ const result = flip$1(options);
8511
+ return {
8512
+ name: result.name,
8513
+ fn: result.fn,
8514
+ options: [options, deps]
8515
+ };
8516
+ };
8480
8517
  /**
8481
8518
  * Provides data that allows you to change the size of the floating element —
8482
8519
  * for instance, prevent it from overflowing the clipping boundary or match the
8483
8520
  * width of the reference element.
8484
8521
  * @see https://floating-ui.com/docs/size
8485
8522
  */
8486
- const size = (options, deps) => ({
8487
- ...size$1(options),
8488
- options: [options, deps]
8489
- });
8523
+ const size = (options, deps) => {
8524
+ const result = size$1(options);
8525
+ return {
8526
+ name: result.name,
8527
+ fn: result.fn,
8528
+ options: [options, deps]
8529
+ };
8530
+ };
8490
8531
  /**
8491
8532
  * Provides data to position an inner element of the floating element so that it
8492
8533
  * appears centered to the reference element.
8493
8534
  * This wraps the core `arrow` middleware to allow React refs as the element.
8494
8535
  * @see https://floating-ui.com/docs/arrow
8495
8536
  */
8496
- const arrow = (options, deps) => ({
8497
- ...arrow$1(options),
8498
- options: [options, deps]
8499
- });
8500
-
8537
+ const arrow = (options, deps) => {
8538
+ const result = arrow$1(options);
8539
+ return {
8540
+ name: result.name,
8541
+ fn: result.fn,
8542
+ options: [options, deps]
8543
+ };
8544
+ };
8501
8545
  //#endregion
8502
8546
  //#region src/components/tooltip.tsx
8503
8547
  const defaultTooltipContext = {
@@ -8638,6 +8682,8 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8638
8682
  };
8639
8683
  return /* @__PURE__ */ jsxs(TooltipPanelElement, {
8640
8684
  ...props,
8685
+ "aria-live": isPositioned ? "assertive" : "off",
8686
+ className: twMerge("absolute top-0 left-0 z-50 w-max rounded-md bg-neutral-50 px-2 py-1 text-sm text-neutral-950 opacity-0 shadow-lg outline-1 outline-neutral-400 data-portal:fixed data-ready:animate-fade-in dark:bg-neutral-800 dark:text-neutral-50 dark:shadow-none dark:-outline-offset-1 dark:outline-neutral-600", className),
8641
8687
  ref: (node) => {
8642
8688
  if (node && typeof node.querySelector === "function") {
8643
8689
  refs?.setFloating(node);
@@ -8647,7 +8693,6 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8647
8693
  }
8648
8694
  }
8649
8695
  },
8650
- className: twMerge("data-ready:animate-fade-in absolute top-0 left-0 z-50 w-max rounded-md bg-neutral-50 px-2 py-1 text-sm text-neutral-950 opacity-0 shadow-lg outline-1 outline-neutral-400 data-portal:fixed dark:bg-neutral-800 dark:text-neutral-50 dark:shadow-none dark:-outline-offset-1 dark:outline-neutral-600", className),
8651
8696
  style: {
8652
8697
  ...style,
8653
8698
  ...floatingStyles,
@@ -8658,7 +8703,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8658
8703
  onMouseLeave: handleMouseLeave,
8659
8704
  onTouchStart: handleTouchStart,
8660
8705
  role: "tooltip",
8661
- ...isPositioned ? { "data-ready": true } : {},
8706
+ ...isPositioned ? { "data-ready": "" } : {},
8662
8707
  children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
8663
8708
  className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
8664
8709
  style: arrowStyles,
@@ -8792,6 +8837,5 @@ function ArrowSvg({ className, ...props }) {
8792
8837
  ]
8793
8838
  });
8794
8839
  }
8795
-
8796
8840
  //#endregion
8797
- export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, Fieldset, Form, Ghost, Heading, HumanVerification, IFrame, Input, Link, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, Time, Tooltip, TooltipPanel, TooltipTrigger, generateHumanValidationToken, getLinkClasses, validateHuman };
8841
+ export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, Fieldset, Form, Ghost, Heading, HumanVerification, IFrame, Input, Link, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, Time, Tooltip, TooltipPanel, TooltipTrigger, generateHumanValidationToken, getLinkClasses, validateHuman };