@andrilla/mado-ui 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -846,7 +846,7 @@ function Anchor({ as, className, disabled, href, onClick, target, rel, removeHas
846
846
  return /* @__PURE__ */ jsx(as || "a", {
847
847
  ...props,
848
848
  "aria-disabled": disabled,
849
- className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
849
+ className: twMerge("inline-block transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
850
850
  href,
851
851
  target: target || (isExternal ? "_blank" : "_self"),
852
852
  onClick: hasHash ? handleClick : onClick,
@@ -879,9 +879,9 @@ const lineLiftClasses = twJoin([
879
879
  scaleYClasses,
880
880
  "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"
881
881
  ]);
882
- 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)");
882
+ 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)");
883
883
  const getFillColorTransitionClasses = (theme, customTheme) => {
884
- let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale_color] after:bg-(--theme-color)");
884
+ let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
885
885
  if (theme === "custom") {
886
886
  if (!customTheme || customTheme.themeColor && !customTheme.themeColor.includes("[--theme-color:")) throw new Error("`customTheme.themeColor` must modify the `--theme-color` variable on the ::after pseudo element. Otherwise, please use `customTheme.classes`.");
887
887
  fillColorTransitionClasses = customTheme.themeColor ? twMerge(fillColorTransitionClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -889,7 +889,7 @@ const getFillColorTransitionClasses = (theme, customTheme) => {
889
889
  return fillColorTransitionClasses;
890
890
  };
891
891
  const getFillCenterClasses = (theme, customTheme) => {
892
- let fillCenterColorClasses = twJoin(fillClasses, "after:scale-x-50 after:scale-y-[.25] after:bg-(--theme-color)/0 after:transition-[scale_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-(--theme-color) pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-(--theme-color) pointer-fine:active:after:scale-x-100 pointer-fine:active:after:scale-y-100 pointer-fine:active:after:bg-(--theme-color)");
892
+ let fillCenterColorClasses = twJoin(fillClasses, "after:scale-x-50 after:scale-y-[.25] after:bg-(--theme-color)/0 after:transition-[scale,background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-(--theme-color) pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-(--theme-color) pointer-fine:active:after:scale-x-100 pointer-fine:active:after:scale-y-100 pointer-fine:active:after:bg-(--theme-color)");
893
893
  if (theme === "custom") {
894
894
  if (customTheme && customTheme.themeColor && !customTheme.themeColor.includes("[--theme-color:")) throw new Error("`customTheme.themeColor` must modify the `--theme-color` variable on the ::after pseudo element. Otherwise, please use `customTheme.classes`.");
895
895
  fillCenterColorClasses = customTheme.themeColor ? twMerge(fillCenterColorClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -1056,7 +1056,7 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
1056
1056
  getPaddingClasses(),
1057
1057
  getRoundedClasses(),
1058
1058
  getThemeColorVariable(),
1059
- customTheme && customTheme.classes ? customTheme.classes : [gradient ? "bg-linear-to-t from-[color-mix(in_oklch,var(--theme-color),var(--color-black)_20%)] via-(--theme-color) to-[color-mix(in_oklch,var(--theme-color),var(--color-white)_20%)] bg-size-[100%_200%] transition-[scale_background-position-y] [background-position-y:50%] active:[background-position-y:100%] data-focus:[background-position-y:0%] pointer-fine:hover:[background-position-y:0%] pointer-fine:hover:active:[background-position-y:100%]" : "bg-(--theme-color) transition-[scale_background-color] active:bg-[color-mix(in_oklch,var(--theme-color),var(--color-black)_10%)] data-focus:bg-[color-mix(in_oklch,var(--theme-color),var(--color-white)_10%)] pointer-fine:hover:bg-[color-mix(in_oklch,var(--theme-color),var(--color-white)_10%)] pointer-fine:hover:active:bg-[color-mix(in_oklch,var(--theme-color),var(--color-black)_10%)]", "shadow-(--theme-color)/25"].join(" "),
1059
+ customTheme && customTheme.classes ? customTheme.classes : [gradient ? "bg-linear-to-t from-[color-mix(in_oklch,var(--theme-color),var(--color-black)_20%)] via-(--theme-color) to-[color-mix(in_oklch,var(--theme-color),var(--color-white)_20%)] bg-size-[100%_200%] transition-[scale,background-position-y] [background-position-y:50%] active:[background-position-y:100%] data-focus:[background-position-y:0%] pointer-fine:hover:[background-position-y:0%] pointer-fine:hover:active:[background-position-y:100%]" : "bg-(--theme-color) transition-[scale,background-color] active:bg-[color-mix(in_oklch,var(--theme-color),var(--color-black)_10%)] data-focus:bg-[color-mix(in_oklch,var(--theme-color),var(--color-white)_10%)] pointer-fine:hover:bg-[color-mix(in_oklch,var(--theme-color),var(--color-white)_10%)] pointer-fine:hover:active:bg-[color-mix(in_oklch,var(--theme-color),var(--color-black)_10%)]", "shadow-(--theme-color)/25"].join(" "),
1060
1060
  className
1061
1061
  ]);
1062
1062
  if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
@@ -1131,7 +1131,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1131
1131
  };
1132
1132
  return /* @__PURE__ */ jsxs(Field, {
1133
1133
  ...fieldProps,
1134
- 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),
1134
+ 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),
1135
1135
  ...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
1136
1136
  children: [/* @__PURE__ */ jsxs("div", {
1137
1137
  ...inputContainerProps,
@@ -1140,7 +1140,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1140
1140
  ...props,
1141
1141
  ...required ? { "aria-required": "true" } : {},
1142
1142
  ...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
1143
- 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),
1143
+ 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),
1144
1144
  onChange: handleChange,
1145
1145
  value,
1146
1146
  children: [/* @__PURE__ */ jsx("input", {
@@ -1156,7 +1156,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1156
1156
  type: "checkbox",
1157
1157
  value
1158
1158
  }), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
1159
- className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
1159
+ className: "size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 ease-exponential group-data-checked/checkbox:scale-60",
1160
1160
  weight: "bold"
1161
1161
  })]
1162
1162
  }), /* @__PURE__ */ jsxs(Label, {
@@ -4557,7 +4557,7 @@ function DetailsSummary({ arrow = true, children, className, onClick, ...props }
4557
4557
  function DetailsBody({ children, className, ...props }) {
4558
4558
  return /* @__PURE__ */ jsx(DisclosurePanel, {
4559
4559
  ...props,
4560
- className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
4560
+ className: twMerge("grid grid-rows-1fr transition-rows duration-500 ease-exponential data-closed:grid-rows-0fr", className),
4561
4561
  transition: true,
4562
4562
  children: (bag) => /* @__PURE__ */ jsx("div", {
4563
4563
  className: "overflow-y-hidden px-2 pbs-3 pbe-1",
@@ -4578,8 +4578,9 @@ function Details({ as = "div", className, ...props }) {
4578
4578
  function DropDownButton({ arrow = true, as, children, className, ...props }) {
4579
4579
  return /* @__PURE__ */ jsx(MenuButton, {
4580
4580
  ...props,
4581
- as: as || "button",
4582
- className: twJoin("group/button", className),
4581
+ as,
4582
+ className: twJoin("group/button transition-transform duration-300 ease-exponential active:scale-95", className),
4583
+ onClick: () => console.log("here i am"),
4583
4584
  children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
4584
4585
  className: "-mr-1",
4585
4586
  isUp: bag.open
@@ -4612,7 +4613,7 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
4612
4613
  return /* @__PURE__ */ jsx(MenuItems, {
4613
4614
  ...props,
4614
4615
  anchor: anchorProps,
4615
- 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),
4616
+ 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),
4616
4617
  static: props.static,
4617
4618
  style: {
4618
4619
  ...style,
@@ -6456,9 +6457,30 @@ function generateHumanValidationToken() {
6456
6457
  return char;
6457
6458
  }).join("")}_${weekCode}`;
6458
6459
  }
6459
- function HumanVerification({ children = "Verify", className }) {
6460
+ function HumanVerification({ children = "Verify", className, ref }) {
6460
6461
  const [dragProgress, setDragProgress] = useState(0);
6461
6462
  const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
6463
+ const resetVerification = useEffectEvent(() => {
6464
+ setDragProgress(0);
6465
+ const draggable = draggableRef.current;
6466
+ if (draggable) {
6467
+ draggable.enable();
6468
+ draggable.setX(0);
6469
+ draggable.refresh();
6470
+ }
6471
+ (buttonRef.current?.closest("form"))?.querySelectorAll("input[name=\"human_verification_token\"]")?.forEach((input) => input.remove());
6472
+ });
6473
+ useEffect(() => {
6474
+ const form = buttonRef.current?.closest("form");
6475
+ if (!form) return;
6476
+ const controller = new AbortController();
6477
+ form.addEventListener("reset", () => {
6478
+ queueMicrotask(() => resetVerification());
6479
+ }, { signal: controller.signal });
6480
+ return () => {
6481
+ controller.abort();
6482
+ };
6483
+ }, []);
6462
6484
  const handleTrySubmit = (x) => {
6463
6485
  if (x > 239) {
6464
6486
  const form = buttonRef.current?.closest("form");
@@ -6563,7 +6585,10 @@ function HumanVerification({ children = "Verify", className }) {
6563
6585
  "aria-valuenow": dragProgress,
6564
6586
  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",
6565
6587
  onKeyDown: moveButton,
6566
- ref: buttonRef,
6588
+ ref: (node) => {
6589
+ buttonRef.current = node;
6590
+ if (ref) ref.current = node;
6591
+ },
6567
6592
  role: "slider",
6568
6593
  type: "button",
6569
6594
  children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
@@ -6694,7 +6719,7 @@ function Input({ children, className, description, descriptionProps: { className
6694
6719
  }),
6695
6720
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
6696
6721
  ...props,
6697
- 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),
6722
+ 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),
6698
6723
  required
6699
6724
  }), children] }),
6700
6725
  description && /* @__PURE__ */ jsx(Description, {
@@ -6706,57 +6731,6 @@ function Input({ children, className, description, descriptionProps: { className
6706
6731
  });
6707
6732
  }
6708
6733
  //#endregion
6709
- //#region src/symbols/xmark.tsx
6710
- function Xmark({ weight = "regular", ...props }) {
6711
- switch (weight) {
6712
- case "ultralight": return /* @__PURE__ */ jsx("svg", {
6713
- viewBox: "9.64746 -64.0801 57.84 57.84",
6714
- ...props,
6715
- children: /* @__PURE__ */ jsx("path", { d: "M65.4941-63.6108L10.1167-8.27883C9.65088-7.813 9.64746-7.13232 10.1167-6.66308C10.544-6.23924 11.2212-6.23924 11.6905-6.66308L67.0645-62.0371C67.4883-62.5063 67.4917-63.187 67.0645-63.6108C66.5918-64.0767 65.918-64.0801 65.4941-63.6108ZM67.0645-8.27883L11.6905-63.6108C11.2212-64.0767 10.5405-64.0801 10.1167-63.6108C9.65088-63.1836 9.65088-62.5063 10.1167-62.0371L65.4941-6.66308C65.9146-6.23924 66.5952-6.23924 67.0645-6.66308C67.4883-7.13574 67.4883-7.813 67.0645-8.27883Z" })
6716
- });
6717
- case "thin": return /* @__PURE__ */ jsx("svg", {
6718
- viewBox: "9.58594 -64.5723 58.82 58.8",
6719
- ...props,
6720
- children: /* @__PURE__ */ jsx("path", { d: "M65.248-63.8672L10.291-8.94533C9.59961-8.25392 9.58594-7.14258 10.291-6.43749C10.9746-5.76757 12.0723-5.76757 12.7774-6.43749L67.7207-61.3808C68.3906-62.0859 68.4043-63.1973 67.7207-63.8672C67.002-64.5586 65.918-64.5723 65.248-63.8672ZM67.7207-8.94533L12.7774-63.8672C12.0723-64.5586 10.9609-64.5723 10.291-63.8672C9.59961-63.1836 9.59961-62.0859 10.291-61.3808L65.248-6.43749C65.9043-5.76757 67.0156-5.76757 67.7207-6.43749C68.3906-7.15625 68.3906-8.25392 67.7207-8.94533Z" })
6721
- });
6722
- case "light": return /* @__PURE__ */ jsx("svg", {
6723
- viewBox: "9.46582 -65.5332 60.72 60.69",
6724
- ...props,
6725
- children: /* @__PURE__ */ jsx("path", { d: "M64.7676-64.3677L10.6313-10.2466C9.49951-9.11475 9.46582-7.1626 10.6313-5.99707C11.8154-4.84667 13.7339-4.84667 14.8994-5.99707L69.002-60.0996C70.1524-61.2651 70.186-63.2173 69.002-64.3677C67.8027-65.4995 65.918-65.5332 64.7676-64.3677ZM69.002-10.2466L14.8994-64.3677C13.7339-65.4995 11.7817-65.5332 10.6313-64.3677C9.49951-63.1836 9.49951-61.2651 10.6313-60.0996L64.7676-5.99707C65.8843-4.84667 67.8364-4.84667 69.002-5.99707C70.1524-7.19629 70.1524-9.11475 69.002-10.2466Z" })
6726
- });
6727
- case "regular": return /* @__PURE__ */ jsx("svg", {
6728
- viewBox: "9.375 -66.2598 62.16 62.11",
6729
- ...props,
6730
- children: /* @__PURE__ */ jsx("path", { d: "M64.4043-64.7461L10.8887-11.2305C9.42383-9.76562 9.375-7.17773 10.8887-5.66406C12.4512-4.15039 14.9902-4.15039 16.5039-5.66406L69.9707-59.1309C71.4844-60.6445 71.5332-63.2324 69.9707-64.7461C68.4082-66.2109 65.918-66.2598 64.4043-64.7461ZM69.9707-11.2305L16.5039-64.7461C14.9902-66.2109 12.4023-66.2598 10.8887-64.7461C9.42383-63.1836 9.42383-60.6445 10.8887-59.1309L64.4043-5.66406C65.8691-4.15039 68.457-4.15039 69.9707-5.66406C71.4844-7.22656 71.4844-9.76562 69.9707-11.2305Z" })
6731
- });
6732
- case "medium": return /* @__PURE__ */ jsx("svg", {
6733
- viewBox: "9.30469 -66.7871 63.2 63.17",
6734
- ...props,
6735
- children: /* @__PURE__ */ jsx("path", { d: "M63.9121-64.9746L11.0996-12.1621C9.35352-10.416 9.30469-7.26562 11.126-5.44434C12.9873-3.62305 16.1152-3.64941 17.8838-5.41797L70.6562-58.1904C72.4688-60.0029 72.5-63.1182 70.6299-64.9482C68.7598-66.7383 65.7246-66.7871 63.9121-64.9746ZM70.6562-12.1709L17.8838-64.9834C16.1064-66.7207 12.9561-66.7871 11.126-64.957C9.33594-63.0869 9.3623-59.9766 11.0996-58.1992L63.9121-5.42676C65.6846-3.61426 68.7998-3.62305 70.6299-5.45312C72.46-7.32324 72.4688-10.3984 70.6562-12.1709Z" })
6736
- });
6737
- case "semibold": return /* @__PURE__ */ jsx("svg", {
6738
- viewBox: "9.25078 -67.1914 63.99 63.99",
6739
- ...props,
6740
- children: /* @__PURE__ */ jsx("path", { d: "M63.5348-65.1498L11.2613-12.8764C9.29961-10.9146 9.25078-7.33301 11.3079-5.27588C13.3983-3.21875 16.9777-3.26533 18.9417-5.2293L71.1818-57.4694C73.2234-59.511 73.2412-63.0306 71.1353-65.1032C69.0293-67.1426 65.5764-67.1914 63.5348-65.1498ZM71.1818-12.8919L18.9417-65.1653C16.9622-67.1115 13.3806-67.1914 11.3079-65.1188C9.26855-63.0128 9.31514-59.4645 11.2613-57.485L63.5348-5.24482C65.5431-3.20322 69.0626-3.21875 71.1353-5.29141C73.2079-7.39736 73.2234-10.8836 71.1818-12.8919Z" })
6741
- });
6742
- case "bold": return /* @__PURE__ */ jsx("svg", {
6743
- viewBox: "9.17969 -67.7246 65.04 65.06",
6744
- ...props,
6745
- children: /* @__PURE__ */ jsx("path", { d: "M63.0371-65.3809L11.4746-13.8184C9.22852-11.5723 9.17969-7.42188 11.5479-5.05371C13.9404-2.68555 18.1152-2.75879 20.3369-4.98047L71.875-56.5186C74.2188-58.8623 74.2188-62.915 71.8018-65.3076C69.3848-67.6758 65.3809-67.7246 63.0371-65.3809ZM71.875-13.8428L20.3369-65.4053C18.0908-67.627 13.9404-67.7246 11.5479-65.332C9.17969-62.915 9.25293-58.7891 11.4746-56.543L63.0371-5.00488C65.3564-2.66113 69.4092-2.68555 71.8018-5.07812C74.1943-7.49512 74.2188-11.5234 71.875-13.8428Z" })
6746
- });
6747
- case "heavy": return /* @__PURE__ */ jsx("svg", {
6748
- viewBox: "9.05079 -68.498 66.61 66.62",
6749
- ...props,
6750
- children: /* @__PURE__ */ jsx("path", { d: "M62.3153-65.716L11.784-15.1847C9.1254-12.5261 9.07657-7.55077 11.8959-4.73147C14.7267-1.91217 19.7651-2.02408 22.3606-4.61956L72.8804-55.1394C75.6624-57.9214 75.6366-62.7475 72.7685-65.6041C69.9003-68.4492 65.0973-68.498 62.3153-65.716ZM72.8804-15.222L22.3606-65.7533C19.7278-68.3745 14.7525-68.498 11.8959-65.6414C9.05079-62.7733 9.1627-57.8095 11.784-55.1767L62.3153-4.65686C65.0858-1.87487 69.9119-1.91217 72.7685-4.76877C75.6251-7.6369 75.6624-12.4515 72.8804-15.222Z" })
6751
- });
6752
- case "black": return /* @__PURE__ */ jsx("svg", {
6753
- viewBox: "8.93555 -69.1895 68.02 68.02",
6754
- ...props,
6755
- children: /* @__PURE__ */ jsx("path", { d: "M61.6699-66.0156L12.0605-16.4062C9.0332-13.3789 8.98438-7.66602 12.207-4.44336C15.4297-1.2207 21.2402-1.36719 24.1699-4.29688L73.7793-53.9062C76.9531-57.0801 76.9043-62.5977 73.6328-65.8691C70.3613-69.1406 64.8438-69.1895 61.6699-66.0156ZM73.7793-16.4551L24.1699-66.0645C21.1914-69.043 15.4785-69.1895 12.207-65.918C8.93555-62.6465 9.08203-56.9336 12.0605-53.9551L61.6699-4.3457C64.8438-1.17188 70.3613-1.2207 73.6328-4.49219C76.9043-7.76367 76.9531-13.2812 73.7793-16.4551Z" })
6756
- });
6757
- }
6758
- }
6759
- //#endregion
6760
6734
  //#region src/hooks/create-fast-context.tsx
6761
6735
  function createFastContext(defaultInitialState) {
6762
6736
  function useStoreData(initialState = defaultInitialState) {
@@ -6924,16 +6898,80 @@ function usePointerMovement(props) {
6924
6898
  };
6925
6899
  }
6926
6900
  //#endregion
6901
+ //#region src/hooks/use-mobile-device.ts
6902
+ function useMobileDevice() {
6903
+ const [isMobileDevice, setIsMobileDevice] = useState(false);
6904
+ const onRun = () => {
6905
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0, hasSmallViewport = window.innerWidth < 500;
6906
+ setIsMobileDevice(hasTouch || hasSmallViewport);
6907
+ };
6908
+ useEffect(() => {
6909
+ if (typeof window !== "undefined") onRun();
6910
+ }, []);
6911
+ return isMobileDevice;
6912
+ }
6913
+ //#endregion
6914
+ //#region src/symbols/xmark.tsx
6915
+ function Xmark({ weight = "regular", ...props }) {
6916
+ switch (weight) {
6917
+ case "ultralight": return /* @__PURE__ */ jsx("svg", {
6918
+ viewBox: "9.64746 -64.0801 57.84 57.84",
6919
+ ...props,
6920
+ children: /* @__PURE__ */ jsx("path", { d: "M65.4941-63.6108L10.1167-8.27883C9.65088-7.813 9.64746-7.13232 10.1167-6.66308C10.544-6.23924 11.2212-6.23924 11.6905-6.66308L67.0645-62.0371C67.4883-62.5063 67.4917-63.187 67.0645-63.6108C66.5918-64.0767 65.918-64.0801 65.4941-63.6108ZM67.0645-8.27883L11.6905-63.6108C11.2212-64.0767 10.5405-64.0801 10.1167-63.6108C9.65088-63.1836 9.65088-62.5063 10.1167-62.0371L65.4941-6.66308C65.9146-6.23924 66.5952-6.23924 67.0645-6.66308C67.4883-7.13574 67.4883-7.813 67.0645-8.27883Z" })
6921
+ });
6922
+ case "thin": return /* @__PURE__ */ jsx("svg", {
6923
+ viewBox: "9.58594 -64.5723 58.82 58.8",
6924
+ ...props,
6925
+ children: /* @__PURE__ */ jsx("path", { d: "M65.248-63.8672L10.291-8.94533C9.59961-8.25392 9.58594-7.14258 10.291-6.43749C10.9746-5.76757 12.0723-5.76757 12.7774-6.43749L67.7207-61.3808C68.3906-62.0859 68.4043-63.1973 67.7207-63.8672C67.002-64.5586 65.918-64.5723 65.248-63.8672ZM67.7207-8.94533L12.7774-63.8672C12.0723-64.5586 10.9609-64.5723 10.291-63.8672C9.59961-63.1836 9.59961-62.0859 10.291-61.3808L65.248-6.43749C65.9043-5.76757 67.0156-5.76757 67.7207-6.43749C68.3906-7.15625 68.3906-8.25392 67.7207-8.94533Z" })
6926
+ });
6927
+ case "light": return /* @__PURE__ */ jsx("svg", {
6928
+ viewBox: "9.46582 -65.5332 60.72 60.69",
6929
+ ...props,
6930
+ children: /* @__PURE__ */ jsx("path", { d: "M64.7676-64.3677L10.6313-10.2466C9.49951-9.11475 9.46582-7.1626 10.6313-5.99707C11.8154-4.84667 13.7339-4.84667 14.8994-5.99707L69.002-60.0996C70.1524-61.2651 70.186-63.2173 69.002-64.3677C67.8027-65.4995 65.918-65.5332 64.7676-64.3677ZM69.002-10.2466L14.8994-64.3677C13.7339-65.4995 11.7817-65.5332 10.6313-64.3677C9.49951-63.1836 9.49951-61.2651 10.6313-60.0996L64.7676-5.99707C65.8843-4.84667 67.8364-4.84667 69.002-5.99707C70.1524-7.19629 70.1524-9.11475 69.002-10.2466Z" })
6931
+ });
6932
+ case "regular": return /* @__PURE__ */ jsx("svg", {
6933
+ viewBox: "9.375 -66.2598 62.16 62.11",
6934
+ ...props,
6935
+ children: /* @__PURE__ */ jsx("path", { d: "M64.4043-64.7461L10.8887-11.2305C9.42383-9.76562 9.375-7.17773 10.8887-5.66406C12.4512-4.15039 14.9902-4.15039 16.5039-5.66406L69.9707-59.1309C71.4844-60.6445 71.5332-63.2324 69.9707-64.7461C68.4082-66.2109 65.918-66.2598 64.4043-64.7461ZM69.9707-11.2305L16.5039-64.7461C14.9902-66.2109 12.4023-66.2598 10.8887-64.7461C9.42383-63.1836 9.42383-60.6445 10.8887-59.1309L64.4043-5.66406C65.8691-4.15039 68.457-4.15039 69.9707-5.66406C71.4844-7.22656 71.4844-9.76562 69.9707-11.2305Z" })
6936
+ });
6937
+ case "medium": return /* @__PURE__ */ jsx("svg", {
6938
+ viewBox: "9.30469 -66.7871 63.2 63.17",
6939
+ ...props,
6940
+ children: /* @__PURE__ */ jsx("path", { d: "M63.9121-64.9746L11.0996-12.1621C9.35352-10.416 9.30469-7.26562 11.126-5.44434C12.9873-3.62305 16.1152-3.64941 17.8838-5.41797L70.6562-58.1904C72.4688-60.0029 72.5-63.1182 70.6299-64.9482C68.7598-66.7383 65.7246-66.7871 63.9121-64.9746ZM70.6562-12.1709L17.8838-64.9834C16.1064-66.7207 12.9561-66.7871 11.126-64.957C9.33594-63.0869 9.3623-59.9766 11.0996-58.1992L63.9121-5.42676C65.6846-3.61426 68.7998-3.62305 70.6299-5.45312C72.46-7.32324 72.4688-10.3984 70.6562-12.1709Z" })
6941
+ });
6942
+ case "semibold": return /* @__PURE__ */ jsx("svg", {
6943
+ viewBox: "9.25078 -67.1914 63.99 63.99",
6944
+ ...props,
6945
+ children: /* @__PURE__ */ jsx("path", { d: "M63.5348-65.1498L11.2613-12.8764C9.29961-10.9146 9.25078-7.33301 11.3079-5.27588C13.3983-3.21875 16.9777-3.26533 18.9417-5.2293L71.1818-57.4694C73.2234-59.511 73.2412-63.0306 71.1353-65.1032C69.0293-67.1426 65.5764-67.1914 63.5348-65.1498ZM71.1818-12.8919L18.9417-65.1653C16.9622-67.1115 13.3806-67.1914 11.3079-65.1188C9.26855-63.0128 9.31514-59.4645 11.2613-57.485L63.5348-5.24482C65.5431-3.20322 69.0626-3.21875 71.1353-5.29141C73.2079-7.39736 73.2234-10.8836 71.1818-12.8919Z" })
6946
+ });
6947
+ case "bold": return /* @__PURE__ */ jsx("svg", {
6948
+ viewBox: "9.17969 -67.7246 65.04 65.06",
6949
+ ...props,
6950
+ children: /* @__PURE__ */ jsx("path", { d: "M63.0371-65.3809L11.4746-13.8184C9.22852-11.5723 9.17969-7.42188 11.5479-5.05371C13.9404-2.68555 18.1152-2.75879 20.3369-4.98047L71.875-56.5186C74.2188-58.8623 74.2188-62.915 71.8018-65.3076C69.3848-67.6758 65.3809-67.7246 63.0371-65.3809ZM71.875-13.8428L20.3369-65.4053C18.0908-67.627 13.9404-67.7246 11.5479-65.332C9.17969-62.915 9.25293-58.7891 11.4746-56.543L63.0371-5.00488C65.3564-2.66113 69.4092-2.68555 71.8018-5.07812C74.1943-7.49512 74.2188-11.5234 71.875-13.8428Z" })
6951
+ });
6952
+ case "heavy": return /* @__PURE__ */ jsx("svg", {
6953
+ viewBox: "9.05079 -68.498 66.61 66.62",
6954
+ ...props,
6955
+ children: /* @__PURE__ */ jsx("path", { d: "M62.3153-65.716L11.784-15.1847C9.1254-12.5261 9.07657-7.55077 11.8959-4.73147C14.7267-1.91217 19.7651-2.02408 22.3606-4.61956L72.8804-55.1394C75.6624-57.9214 75.6366-62.7475 72.7685-65.6041C69.9003-68.4492 65.0973-68.498 62.3153-65.716ZM72.8804-15.222L22.3606-65.7533C19.7278-68.3745 14.7525-68.498 11.8959-65.6414C9.05079-62.7733 9.1627-57.8095 11.784-55.1767L62.3153-4.65686C65.0858-1.87487 69.9119-1.91217 72.7685-4.76877C75.6251-7.6369 75.6624-12.4515 72.8804-15.222Z" })
6956
+ });
6957
+ case "black": return /* @__PURE__ */ jsx("svg", {
6958
+ viewBox: "8.93555 -69.1895 68.02 68.02",
6959
+ ...props,
6960
+ children: /* @__PURE__ */ jsx("path", { d: "M61.6699-66.0156L12.0605-16.4062C9.0332-13.3789 8.98438-7.66602 12.207-4.44336C15.4297-1.2207 21.2402-1.36719 24.1699-4.29688L73.7793-53.9062C76.9531-57.0801 76.9043-62.5977 73.6328-65.8691C70.3613-69.1406 64.8438-69.1895 61.6699-66.0156ZM73.7793-16.4551L24.1699-66.0645C21.1914-69.043 15.4785-69.1895 12.207-65.918C8.93555-62.6465 9.08203-56.9336 12.0605-53.9551L61.6699-4.3457C64.8438-1.17188 70.3613-1.2207 73.6328-4.49219C76.9043-7.76367 76.9531-13.2812 73.7793-16.4551Z" })
6961
+ });
6962
+ }
6963
+ }
6964
+ //#endregion
6927
6965
  //#region src/components/modal.tsx
6966
+ const DRAG_TO_CLOSE_PROGRESS = .5;
6928
6967
  const { Provider: ModalControlsProvider, useStore: useModalControls } = createFastContext({
6968
+ closeModal: () => {},
6969
+ dialogPanelRef: { current: null },
6929
6970
  isOpen: false,
6930
6971
  openModal: () => {},
6931
- closeModal: () => {},
6932
6972
  place: "bottom",
6933
- readyToClose: false,
6934
- enableTouchClose: () => {},
6935
- enableMouseClose: () => {},
6936
- dialogPanelRef: { current: null }
6973
+ pseudoContainerRef: { current: null },
6974
+ readyToClose: false
6937
6975
  });
6938
6976
  function ModalTrigger({ as, onClick, ...props }) {
6939
6977
  const ModalTriggerElement = as || Button$1;
@@ -6957,53 +6995,154 @@ function ModalTitle({ as, ref, ...props }) {
6957
6995
  });
6958
6996
  }
6959
6997
  function ModalDialog(props) {
6960
- const [modalControls] = useModalControls((store) => store);
6961
- const { isOpen, closeModal, place, readyToClose, className, enableMouseClose, enableTouchClose, dialogPanelRef } = modalControls || {
6962
- isOpen: false,
6963
- closeModal: () => {},
6964
- place: "bottom",
6965
- readyToClose: false,
6966
- className: "",
6967
- enableMouseClose: () => {},
6968
- enableTouchClose: () => {},
6969
- dialogPanelRef: { current: null }
6998
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
6999
+ const { className, closeModal, dialogPanelRef, isOpen, place, pseudoContainerRef, readyToClose } = modalControls || {};
7000
+ const [dialogPanelEl, setDialogPanelEl] = useState(null);
7001
+ const [draggableTriggerEl, setDraggableTriggerEl] = useState(null);
7002
+ const setDialogPanelRef = (node) => {
7003
+ setDialogPanelEl(node);
7004
+ if (dialogPanelRef) dialogPanelRef.current = node;
7005
+ };
7006
+ const setDraggableTriggerRef = (node) => {
7007
+ setDraggableTriggerEl(node);
6970
7008
  };
7009
+ const readyToCloseRef = useRef(readyToClose);
7010
+ function setUpDraggable({ dialogPanel, draggableTrigger, pseudoContainer }) {
7011
+ createDraggable(dialogPanel, {
7012
+ container: pseudoContainer,
7013
+ containerFriction: .99,
7014
+ onRelease: (draggable) => {
7015
+ if (readyToCloseRef.current) return closeModal?.();
7016
+ if (draggable.y >= 1) {
7017
+ const coord = { yCoord: draggable.y };
7018
+ animate(coord, {
7019
+ yCoord: 0,
7020
+ duration: 500,
7021
+ ease: spring({ duration: 300 }),
7022
+ composition: "blend",
7023
+ onUpdate: () => {
7024
+ draggable.setY(coord.yCoord);
7025
+ }
7026
+ });
7027
+ }
7028
+ },
7029
+ onUpdate: ({ progressY }) => {
7030
+ if (!setModalControls) return;
7031
+ if (progressY >= DRAG_TO_CLOSE_PROGRESS && !readyToCloseRef.current) {
7032
+ readyToCloseRef.current = true;
7033
+ setModalControls((prev) => ({
7034
+ ...prev,
7035
+ readyToClose: true
7036
+ }));
7037
+ }
7038
+ if (progressY < DRAG_TO_CLOSE_PROGRESS && readyToCloseRef.current) {
7039
+ readyToCloseRef.current = false;
7040
+ setModalControls((prev) => ({
7041
+ ...prev,
7042
+ readyToClose: false
7043
+ }));
7044
+ }
7045
+ },
7046
+ trigger: draggableTrigger
7047
+ });
7048
+ }
7049
+ const onDraggable = useEffectEvent(({ dialogPanel, draggableTrigger }) => {
7050
+ if (!pseudoContainerRef) return;
7051
+ const { top, left, width } = dialogPanel.getBoundingClientRect();
7052
+ pseudoContainerRef.current = document.createElement("div");
7053
+ const pseudoContainer = pseudoContainerRef.current;
7054
+ pseudoContainer.style.position = "fixed";
7055
+ pseudoContainer.style.top = `${top}px`;
7056
+ pseudoContainer.style.left = `${left}px`;
7057
+ pseudoContainer.style.width = `${width}px`;
7058
+ pseudoContainer.style.height = `100dvh`;
7059
+ pseudoContainer.style.zIndex = "-1";
7060
+ pseudoContainer.style.border = "2px solid blue";
7061
+ document.body.appendChild(pseudoContainer);
7062
+ animate(dialogPanel, {
7063
+ ...isMobileDevice ? {
7064
+ y: ["100lvh", 0],
7065
+ ease: "outExpo",
7066
+ duration: 500
7067
+ } : { keyframes: [
7068
+ {
7069
+ opacity: [0, 1],
7070
+ scale: [.5, .85],
7071
+ y: ["10rem", "9rem"],
7072
+ ease: "inExpo",
7073
+ duration: 250
7074
+ },
7075
+ {
7076
+ scale: [.85, 1],
7077
+ y: ["9rem", "0rem"],
7078
+ ease: "outExpo",
7079
+ duration: 500
7080
+ },
7081
+ {
7082
+ y: "0px",
7083
+ duration: 0
7084
+ }
7085
+ ] },
7086
+ onComplete: () => setUpDraggable({
7087
+ dialogPanel,
7088
+ draggableTrigger,
7089
+ pseudoContainer
7090
+ })
7091
+ });
7092
+ });
7093
+ useEffect(() => {
7094
+ if (isOpen && dialogPanelEl && draggableTriggerEl) onDraggable({
7095
+ dialogPanel: dialogPanelEl,
7096
+ draggableTrigger: draggableTriggerEl
7097
+ });
7098
+ }, [
7099
+ isOpen,
7100
+ dialogPanelEl,
7101
+ draggableTriggerEl
7102
+ ]);
6971
7103
  return /* @__PURE__ */ jsxs(Dialog, {
6972
7104
  open: isOpen,
6973
- onClose: () => closeModal?.(),
7105
+ onClose: closeModal || (() => void 0),
6974
7106
  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(" "),
6975
7107
  children: [/* @__PURE__ */ jsx(DialogBackdrop, {
6976
7108
  transition: true,
6977
- 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(" "),
6978
- children: /* @__PURE__ */ jsx(Button, {
7109
+ ...readyToClose ? { "data-ready": "" } : {},
7110
+ 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",
7111
+ children: /* @__PURE__ */ jsxs(Button, {
6979
7112
  padding: "none",
6980
7113
  rounded: "full",
6981
- className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
6982
- children: /* @__PURE__ */ jsxs("div", {
6983
- 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",
6984
- children: [/* @__PURE__ */ jsxs("span", {
6985
- className: "block text-xs leading-none uppercase",
6986
- children: ["Close", /* @__PURE__ */ jsx("span", {
6987
- className: "sr-only",
6988
- children: "Modal"
6989
- })]
6990
- }), /* @__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" })]
6991
- })
7114
+ 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)]",
7115
+ children: [/* @__PURE__ */ jsxs("span", {
7116
+ className: "block overflow-x-hidden text-center text-xs leading-none uppercase",
7117
+ children: [/* @__PURE__ */ jsx("span", {
7118
+ className: "ps-2",
7119
+ children: "Close"
7120
+ }), /* @__PURE__ */ jsx("span", {
7121
+ className: "sr-only",
7122
+ children: "Modal"
7123
+ })]
7124
+ }), /* @__PURE__ */ jsx(Xmark, { className: "mx-auto size-3.5 rotate-90 transition-transform duration-300 ease-in-out group-hover/button:rotate-0" })]
6992
7125
  })
6993
7126
  }), /* @__PURE__ */ jsxs(DialogPanel, {
6994
- ref: dialogPanelRef,
6995
- transition: true,
6996
- 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),
7127
+ ref: setDialogPanelRef,
7128
+ 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),
7129
+ style: isMobileDevice ? void 0 : { opacity: 0 },
6997
7130
  children: [/* @__PURE__ */ jsx("button", {
6998
- 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(" "),
6999
- onTouchStart: enableTouchClose,
7000
- onMouseDown: enableMouseClose,
7131
+ 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)",
7132
+ ...readyToClose ? { "data-ready": "" } : {},
7133
+ ref: setDraggableTriggerRef,
7001
7134
  type: "button",
7002
7135
  children: /* @__PURE__ */ jsx("span", {
7003
7136
  className: "sr-only",
7004
7137
  children: "Drag down to close"
7005
7138
  })
7006
- }), /* @__PURE__ */ jsx("div", { ...props })]
7139
+ }), /* @__PURE__ */ jsx("div", {
7140
+ className: "overflow-y-scroll",
7141
+ children: /* @__PURE__ */ jsx("div", {
7142
+ ...props,
7143
+ className: "py-4 sm:py-6 lg:py-8"
7144
+ })
7145
+ })]
7007
7146
  })]
7008
7147
  });
7009
7148
  }
@@ -7021,20 +7160,9 @@ function ModalClose({ as, onClick, ...props }) {
7021
7160
  });
7022
7161
  }
7023
7162
  function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
7024
- const [bodyElement, setBodyElement] = useState(null);
7025
- const onVisible = useEffectEvent(() => {
7026
- setBodyElement(document.body);
7027
- });
7028
- useEffect(() => {
7029
- if (typeof window !== "undefined") onVisible();
7030
- }, []);
7031
- const [, setModalControls] = useModalControls(() => null);
7163
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
7032
7164
  const [isOpen, setIsOpen] = useState(false);
7033
- const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
7034
- x: 0,
7035
- y: 0
7036
- }), localDialogPanelRef = useRef(null);
7037
- const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
7165
+ const localDialogPanelRef = useRef(null);
7038
7166
  const openModal = () => {
7039
7167
  setIsOpen((previous) => {
7040
7168
  if (previous) return previous;
@@ -7042,67 +7170,47 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
7042
7170
  return true;
7043
7171
  });
7044
7172
  };
7173
+ const closeFunctions = () => {
7174
+ onClose?.();
7175
+ modalControls?.pseudoContainerRef?.current?.remove();
7176
+ setModalControls?.((previous) => ({
7177
+ ...previous,
7178
+ pseudoContainerRef: { current: null },
7179
+ readyToClose: false
7180
+ }));
7181
+ };
7182
+ const mobileAnimation = {
7183
+ y: "100%",
7184
+ ease: "outExpo",
7185
+ duration: 500
7186
+ };
7187
+ const desktopAnimation = {
7188
+ opacity: 0,
7189
+ scale: .5,
7190
+ ease: "outExpo",
7191
+ duration: 500
7192
+ };
7193
+ const handleClose = () => {
7194
+ if (!localDialogPanelRef.current) return closeFunctions();
7195
+ animate(localDialogPanelRef.current, {
7196
+ ...isMobileDevice ? mobileAnimation : desktopAnimation,
7197
+ composition: "blend",
7198
+ onComplete: closeFunctions
7199
+ });
7200
+ };
7045
7201
  const closeModal = () => {
7046
7202
  setIsOpen((previous) => {
7047
7203
  if (!previous) return previous;
7048
- onClose?.();
7204
+ handleClose();
7049
7205
  return false;
7050
7206
  });
7051
7207
  };
7052
- const enableClose = (clientX, clientY) => {
7053
- startDragCoords.current.x = clientX;
7054
- startDragCoords.current.y = clientY;
7055
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "0s";
7056
- setAllowDragClose(true);
7057
- };
7058
- const enableTouchClose = (e) => {
7059
- const { touches } = e, { clientY } = touches[0];
7060
- enableClose(0, clientY);
7061
- };
7062
- const enableMouseClose = (e) => {
7063
- const { clientX, clientY } = e;
7064
- enableClose(clientX, clientY);
7065
- };
7066
- const handleMove = (clientX, clientY) => {
7067
- if (!localDialogPanelRef.current) return;
7068
- let deltaX = clientX - startDragCoords.current.x, deltaY = clientY - startDragCoords.current.y;
7069
- if (deltaX > 0) deltaX = easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
7070
- if (deltaX < 0) deltaX = -easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
7071
- if (deltaY < 0) deltaY = -easeOutExpo(Math.abs(deltaY), 0, 25, 2e3);
7072
- if (deltaY >= 100 && !readyToClose) setReadyToClose(true);
7073
- else if (deltaY < 100 && readyToClose) setReadyToClose(false);
7074
- const greaterThanMediaSmall = innerWidth > 640;
7075
- localDialogPanelRef.current.style.translate = `calc(-50% + ${deltaX}px) ${greaterThanMediaSmall ? `calc(-50% + ${deltaY}px)` : `${deltaY}px`}`;
7076
- };
7077
- const handleMouseMove = (e) => {
7078
- if (!allowDragClose) return;
7079
- const { clientX, clientY } = e;
7080
- handleMove(clientX, clientY);
7081
- };
7082
- const disableDragClose = (clientY) => {
7083
- const deltaY = clientY - startDragCoords.current.y;
7084
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "";
7085
- if (deltaY >= 100) {
7086
- closeModal();
7087
- setReadyToClose(false);
7088
- } else setTimeout(() => {
7089
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.removeProperty("translate");
7090
- }, 50);
7091
- };
7092
- const disableMouseDragClose = (e) => {
7093
- if (allowDragClose) setAllowDragClose(false);
7094
- const { clientY } = e;
7095
- disableDragClose(clientY);
7096
- };
7097
7208
  useEffect(() => {
7098
7209
  setModalControls?.((previous) => ({
7099
7210
  ...previous,
7100
7211
  isOpen,
7101
- readyToClose,
7102
7212
  place,
7103
7213
  className,
7104
- enableMouseClose,
7105
- enableTouchClose,
7106
7214
  openModal,
7107
7215
  closeModal,
7108
7216
  dialogPanelRef: localDialogPanelRef
@@ -7110,20 +7218,12 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
7110
7218
  }, [
7111
7219
  className,
7112
7220
  closeModal,
7113
- enableMouseClose,
7114
- enableTouchClose,
7115
7221
  isOpen,
7116
7222
  openModal,
7117
7223
  place,
7118
- readyToClose,
7119
7224
  setModalControls
7120
7225
  ]);
7121
- return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
7122
- ref: dragMoveBoxRef,
7123
- className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
7124
- onMouseMove: handleMouseMove,
7125
- onMouseUp: disableMouseDragClose
7126
- }), bodyElement), children] });
7226
+ return /* @__PURE__ */ jsx(Fragment, { children });
7127
7227
  }
7128
7228
  function Modal(props) {
7129
7229
  return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
@@ -7207,7 +7307,7 @@ function SelectOption({ children, className, name, ...props }) {
7207
7307
  className: `mr-3 before:absolute before:-left-3 before:content-[',_']`,
7208
7308
  children: name
7209
7309
  }) : /* @__PURE__ */ jsxs("div", {
7210
- 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),
7310
+ 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),
7211
7311
  children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
7212
7312
  })
7213
7313
  });
@@ -7263,7 +7363,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
7263
7363
  onChange: handleChange,
7264
7364
  children: [/* @__PURE__ */ jsxs(ListboxButton, {
7265
7365
  ...buttonProps,
7266
- 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),
7366
+ 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),
7267
7367
  ref: listboxButtonRef,
7268
7368
  children: [
7269
7369
  /* @__PURE__ */ jsx("input", {
@@ -7291,7 +7391,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
7291
7391
  }), /* @__PURE__ */ jsx(ListboxOptions, {
7292
7392
  ...optionsProps,
7293
7393
  anchor: anchor || "bottom start",
7294
- 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),
7394
+ 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),
7295
7395
  transition: transition || true,
7296
7396
  children
7297
7397
  })]
@@ -7387,15 +7487,15 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
7387
7487
  }),
7388
7488
  "\xA0",
7389
7489
  /* @__PURE__ */ jsx(CircleFill, {
7390
- className: "animate-wave size-2",
7490
+ className: "size-2 animate-wave",
7391
7491
  weight: "black"
7392
7492
  }),
7393
7493
  /* @__PURE__ */ jsx(CircleFill, {
7394
- className: "animate-wave animation-delay-100 size-2",
7494
+ className: "size-2 animate-wave animation-delay-100",
7395
7495
  weight: "black"
7396
7496
  }),
7397
7497
  /* @__PURE__ */ jsx(CircleFill, {
7398
- className: "animate-wave animation-delay-200 size-2",
7498
+ className: "size-2 animate-wave animation-delay-200",
7399
7499
  weight: "black"
7400
7500
  }),
7401
7501
  "\xA0"
@@ -7496,7 +7596,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
7496
7596
  }),
7497
7597
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
7498
7598
  ...props,
7499
- 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),
7599
+ 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),
7500
7600
  required
7501
7601
  }), children] }),
7502
7602
  description && /* @__PURE__ */ jsx(Description, {
@@ -9229,6 +9329,8 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9229
9329
  };
9230
9330
  return /* @__PURE__ */ jsxs(TooltipPanelElement, {
9231
9331
  ...props,
9332
+ "aria-live": isPositioned ? "assertive" : "off",
9333
+ 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),
9232
9334
  ref: (node) => {
9233
9335
  if (node && typeof node.querySelector === "function") {
9234
9336
  refs?.setFloating(node);
@@ -9238,7 +9340,6 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9238
9340
  }
9239
9341
  }
9240
9342
  },
9241
- 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),
9242
9343
  style: {
9243
9344
  ...style,
9244
9345
  ...floatingStyles,
@@ -9249,7 +9350,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9249
9350
  onMouseLeave: handleMouseLeave,
9250
9351
  onTouchStart: handleTouchStart,
9251
9352
  role: "tooltip",
9252
- ...isPositioned ? { "data-ready": true } : {},
9353
+ ...isPositioned ? { "data-ready": "" } : {},
9253
9354
  children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
9254
9355
  className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
9255
9356
  style: arrowStyles,
@@ -9798,4 +9899,4 @@ function YouTubeLogo({ className, cutout = false, targets, ...props }) {
9798
9899
  });
9799
9900
  }
9800
9901
  //#endregion
9801
- export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, FacebookLogo, Fieldset, Form, FormStatusProvider, Ghost, GoogleLogo, Heading, HumanVerification, IFrame, Input, InstagramLogo, Link, LinkedInLogo, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, TikTokLogo, Time, Tooltip, TooltipPanel, TooltipTrigger, XLogo, YouTubeLogo, addClass, createFastContext, currentMonthName, currentWeekdayName, daysInMonth, easeOutExpo, emailRegex, extendMadoTailwindMerge, firstOfMonth, formatPhoneNumber, generateHumanValidationToken, getDate, getHours, getHoursIn12, getLinkClasses, getLocalTime, getMeridianFromHour, getMilliseconds, getMinutes, getMonth, getMonthIndexFromName, getMonthName, getNextMonth, getPreviousMonth, getSeconds, getTimezone, getUserReadableDate, getUserReadableDateFromTimestampz, getWeekdayName, getYearsInRange, hasClass, isEmail, isPhoneNumber, monthNamesList, removeClass, splitCamelCase, telRegex, toCamelCase, toFullDateString, toLowerCase, toTitleCase, toggleClass, twMerge, useFormStatus, usePointerMovement, validateHuman, weekdayNamesList };
9902
+ export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, FacebookLogo, Fieldset, Form, FormStatusProvider, Ghost, GoogleLogo, Heading, HumanVerification, IFrame, Input, InstagramLogo, Link, LinkedInLogo, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, TikTokLogo, Time, Tooltip, TooltipPanel, TooltipTrigger, XLogo, YouTubeLogo, addClass, createFastContext, currentMonthName, currentWeekdayName, daysInMonth, easeOutExpo, emailRegex, extendMadoTailwindMerge, firstOfMonth, formatPhoneNumber, generateHumanValidationToken, getDate, getHours, getHoursIn12, getLinkClasses, getLocalTime, getMeridianFromHour, getMilliseconds, getMinutes, getMonth, getMonthIndexFromName, getMonthName, getNextMonth, getPreviousMonth, getSeconds, getTimezone, getUserReadableDate, getUserReadableDateFromTimestampz, getWeekdayName, getYearsInRange, hasClass, isEmail, isPhoneNumber, monthNamesList, removeClass, splitCamelCase, telRegex, toCamelCase, toFullDateString, toLowerCase, toTitleCase, toggleClass, twMerge, useFormStatus, useMobileDevice, usePointerMovement, validateHuman, weekdayNamesList };