@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/client.js CHANGED
@@ -847,7 +847,7 @@ function Anchor({ as, className, disabled, href, onClick, target, rel, removeHas
847
847
  return /* @__PURE__ */ jsx(as || "a", {
848
848
  ...props,
849
849
  "aria-disabled": disabled,
850
- className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
850
+ className: twMerge("inline-block transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
851
851
  href,
852
852
  target: target || (isExternal ? "_blank" : "_self"),
853
853
  onClick: hasHash ? handleClick : onClick,
@@ -880,9 +880,9 @@ const lineLiftClasses = twJoin([
880
880
  scaleYClasses,
881
881
  "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"
882
882
  ]);
883
- 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)");
883
+ 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)");
884
884
  const getFillColorTransitionClasses = (theme, customTheme) => {
885
- let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale_color] after:bg-(--theme-color)");
885
+ let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
886
886
  if (theme === "custom") {
887
887
  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`.");
888
888
  fillColorTransitionClasses = customTheme.themeColor ? twMerge(fillColorTransitionClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -890,7 +890,7 @@ const getFillColorTransitionClasses = (theme, customTheme) => {
890
890
  return fillColorTransitionClasses;
891
891
  };
892
892
  const getFillCenterClasses = (theme, customTheme) => {
893
- 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
+ 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)");
894
894
  if (theme === "custom") {
895
895
  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`.");
896
896
  fillCenterColorClasses = customTheme.themeColor ? twMerge(fillCenterColorClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -1057,7 +1057,7 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
1057
1057
  getPaddingClasses(),
1058
1058
  getRoundedClasses(),
1059
1059
  getThemeColorVariable(),
1060
- 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
+ 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(" "),
1061
1061
  className
1062
1062
  ]);
1063
1063
  if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
@@ -1132,7 +1132,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1132
1132
  };
1133
1133
  return /* @__PURE__ */ jsxs(Field, {
1134
1134
  ...fieldProps,
1135
- 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),
1135
+ 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),
1136
1136
  ...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
1137
1137
  children: [/* @__PURE__ */ jsxs("div", {
1138
1138
  ...inputContainerProps,
@@ -1141,7 +1141,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1141
1141
  ...props,
1142
1142
  ...required ? { "aria-required": "true" } : {},
1143
1143
  ...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
1144
- 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),
1144
+ 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),
1145
1145
  onChange: handleChange,
1146
1146
  value,
1147
1147
  children: [/* @__PURE__ */ jsx("input", {
@@ -1157,7 +1157,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1157
1157
  type: "checkbox",
1158
1158
  value
1159
1159
  }), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
1160
- className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
1160
+ className: "size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 ease-exponential group-data-checked/checkbox:scale-60",
1161
1161
  weight: "bold"
1162
1162
  })]
1163
1163
  }), /* @__PURE__ */ jsxs(Label, {
@@ -4558,7 +4558,7 @@ function DetailsSummary({ arrow = true, children, className, onClick, ...props }
4558
4558
  function DetailsBody({ children, className, ...props }) {
4559
4559
  return /* @__PURE__ */ jsx(DisclosurePanel, {
4560
4560
  ...props,
4561
- className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
4561
+ className: twMerge("grid grid-rows-1fr transition-rows duration-500 ease-exponential data-closed:grid-rows-0fr", className),
4562
4562
  transition: true,
4563
4563
  children: (bag) => /* @__PURE__ */ jsx("div", {
4564
4564
  className: "overflow-y-hidden px-2 pbs-3 pbe-1",
@@ -4579,8 +4579,9 @@ function Details({ as = "div", className, ...props }) {
4579
4579
  function DropDownButton({ arrow = true, as, children, className, ...props }) {
4580
4580
  return /* @__PURE__ */ jsx(MenuButton, {
4581
4581
  ...props,
4582
- as: as || "button",
4583
- className: twJoin("group/button", className),
4582
+ as,
4583
+ className: twJoin("group/button transition-transform duration-300 ease-exponential active:scale-95", className),
4584
+ onClick: () => console.log("here i am"),
4584
4585
  children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
4585
4586
  className: "-mr-1",
4586
4587
  isUp: bag.open
@@ -4613,7 +4614,7 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
4613
4614
  return /* @__PURE__ */ jsx(MenuItems, {
4614
4615
  ...props,
4615
4616
  anchor: anchorProps,
4616
- 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),
4617
+ 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),
4617
4618
  static: props.static,
4618
4619
  style: {
4619
4620
  ...style,
@@ -6457,9 +6458,30 @@ function generateHumanValidationToken() {
6457
6458
  return char;
6458
6459
  }).join("")}_${weekCode}`;
6459
6460
  }
6460
- function HumanVerification({ children = "Verify", className }) {
6461
+ function HumanVerification({ children = "Verify", className, ref }) {
6461
6462
  const [dragProgress, setDragProgress] = useState(0);
6462
6463
  const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
6464
+ const resetVerification = useEffectEvent(() => {
6465
+ setDragProgress(0);
6466
+ const draggable = draggableRef.current;
6467
+ if (draggable) {
6468
+ draggable.enable();
6469
+ draggable.setX(0);
6470
+ draggable.refresh();
6471
+ }
6472
+ (buttonRef.current?.closest("form"))?.querySelectorAll("input[name=\"human_verification_token\"]")?.forEach((input) => input.remove());
6473
+ });
6474
+ useEffect(() => {
6475
+ const form = buttonRef.current?.closest("form");
6476
+ if (!form) return;
6477
+ const controller = new AbortController();
6478
+ form.addEventListener("reset", () => {
6479
+ queueMicrotask(() => resetVerification());
6480
+ }, { signal: controller.signal });
6481
+ return () => {
6482
+ controller.abort();
6483
+ };
6484
+ }, []);
6463
6485
  const handleTrySubmit = (x) => {
6464
6486
  if (x > 239) {
6465
6487
  const form = buttonRef.current?.closest("form");
@@ -6564,7 +6586,10 @@ function HumanVerification({ children = "Verify", className }) {
6564
6586
  "aria-valuenow": dragProgress,
6565
6587
  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",
6566
6588
  onKeyDown: moveButton,
6567
- ref: buttonRef,
6589
+ ref: (node) => {
6590
+ buttonRef.current = node;
6591
+ if (ref) ref.current = node;
6592
+ },
6568
6593
  role: "slider",
6569
6594
  type: "button",
6570
6595
  children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
@@ -6695,7 +6720,7 @@ function Input({ children, className, description, descriptionProps: { className
6695
6720
  }),
6696
6721
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
6697
6722
  ...props,
6698
- 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),
6723
+ 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),
6699
6724
  required
6700
6725
  }), children] }),
6701
6726
  description && /* @__PURE__ */ jsx(Description, {
@@ -6707,57 +6732,6 @@ function Input({ children, className, description, descriptionProps: { className
6707
6732
  });
6708
6733
  }
6709
6734
  //#endregion
6710
- //#region src/symbols/xmark.tsx
6711
- function Xmark({ weight = "regular", ...props }) {
6712
- switch (weight) {
6713
- case "ultralight": return /* @__PURE__ */ jsx("svg", {
6714
- viewBox: "9.64746 -64.0801 57.84 57.84",
6715
- ...props,
6716
- 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" })
6717
- });
6718
- case "thin": return /* @__PURE__ */ jsx("svg", {
6719
- viewBox: "9.58594 -64.5723 58.82 58.8",
6720
- ...props,
6721
- 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" })
6722
- });
6723
- case "light": return /* @__PURE__ */ jsx("svg", {
6724
- viewBox: "9.46582 -65.5332 60.72 60.69",
6725
- ...props,
6726
- 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" })
6727
- });
6728
- case "regular": return /* @__PURE__ */ jsx("svg", {
6729
- viewBox: "9.375 -66.2598 62.16 62.11",
6730
- ...props,
6731
- 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" })
6732
- });
6733
- case "medium": return /* @__PURE__ */ jsx("svg", {
6734
- viewBox: "9.30469 -66.7871 63.2 63.17",
6735
- ...props,
6736
- 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" })
6737
- });
6738
- case "semibold": return /* @__PURE__ */ jsx("svg", {
6739
- viewBox: "9.25078 -67.1914 63.99 63.99",
6740
- ...props,
6741
- 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" })
6742
- });
6743
- case "bold": return /* @__PURE__ */ jsx("svg", {
6744
- viewBox: "9.17969 -67.7246 65.04 65.06",
6745
- ...props,
6746
- 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" })
6747
- });
6748
- case "heavy": return /* @__PURE__ */ jsx("svg", {
6749
- viewBox: "9.05079 -68.498 66.61 66.62",
6750
- ...props,
6751
- 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" })
6752
- });
6753
- case "black": return /* @__PURE__ */ jsx("svg", {
6754
- viewBox: "8.93555 -69.1895 68.02 68.02",
6755
- ...props,
6756
- 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" })
6757
- });
6758
- }
6759
- }
6760
- //#endregion
6761
6735
  //#region src/hooks/create-fast-context.tsx
6762
6736
  function createFastContext(defaultInitialState) {
6763
6737
  function useStoreData(initialState = defaultInitialState) {
@@ -6925,16 +6899,80 @@ function usePointerMovement(props) {
6925
6899
  };
6926
6900
  }
6927
6901
  //#endregion
6902
+ //#region src/hooks/use-mobile-device.ts
6903
+ function useMobileDevice() {
6904
+ const [isMobileDevice, setIsMobileDevice] = useState(false);
6905
+ const onRun = () => {
6906
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0, hasSmallViewport = window.innerWidth < 500;
6907
+ setIsMobileDevice(hasTouch || hasSmallViewport);
6908
+ };
6909
+ useEffect(() => {
6910
+ if (typeof window !== "undefined") onRun();
6911
+ }, []);
6912
+ return isMobileDevice;
6913
+ }
6914
+ //#endregion
6915
+ //#region src/symbols/xmark.tsx
6916
+ function Xmark({ weight = "regular", ...props }) {
6917
+ switch (weight) {
6918
+ case "ultralight": return /* @__PURE__ */ jsx("svg", {
6919
+ viewBox: "9.64746 -64.0801 57.84 57.84",
6920
+ ...props,
6921
+ 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" })
6922
+ });
6923
+ case "thin": return /* @__PURE__ */ jsx("svg", {
6924
+ viewBox: "9.58594 -64.5723 58.82 58.8",
6925
+ ...props,
6926
+ 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" })
6927
+ });
6928
+ case "light": return /* @__PURE__ */ jsx("svg", {
6929
+ viewBox: "9.46582 -65.5332 60.72 60.69",
6930
+ ...props,
6931
+ 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" })
6932
+ });
6933
+ case "regular": return /* @__PURE__ */ jsx("svg", {
6934
+ viewBox: "9.375 -66.2598 62.16 62.11",
6935
+ ...props,
6936
+ 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" })
6937
+ });
6938
+ case "medium": return /* @__PURE__ */ jsx("svg", {
6939
+ viewBox: "9.30469 -66.7871 63.2 63.17",
6940
+ ...props,
6941
+ 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" })
6942
+ });
6943
+ case "semibold": return /* @__PURE__ */ jsx("svg", {
6944
+ viewBox: "9.25078 -67.1914 63.99 63.99",
6945
+ ...props,
6946
+ 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" })
6947
+ });
6948
+ case "bold": return /* @__PURE__ */ jsx("svg", {
6949
+ viewBox: "9.17969 -67.7246 65.04 65.06",
6950
+ ...props,
6951
+ 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" })
6952
+ });
6953
+ case "heavy": return /* @__PURE__ */ jsx("svg", {
6954
+ viewBox: "9.05079 -68.498 66.61 66.62",
6955
+ ...props,
6956
+ 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" })
6957
+ });
6958
+ case "black": return /* @__PURE__ */ jsx("svg", {
6959
+ viewBox: "8.93555 -69.1895 68.02 68.02",
6960
+ ...props,
6961
+ 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" })
6962
+ });
6963
+ }
6964
+ }
6965
+ //#endregion
6928
6966
  //#region src/components/modal.tsx
6967
+ const DRAG_TO_CLOSE_PROGRESS = .5;
6929
6968
  const { Provider: ModalControlsProvider, useStore: useModalControls } = createFastContext({
6969
+ closeModal: () => {},
6970
+ dialogPanelRef: { current: null },
6930
6971
  isOpen: false,
6931
6972
  openModal: () => {},
6932
- closeModal: () => {},
6933
6973
  place: "bottom",
6934
- readyToClose: false,
6935
- enableTouchClose: () => {},
6936
- enableMouseClose: () => {},
6937
- dialogPanelRef: { current: null }
6974
+ pseudoContainerRef: { current: null },
6975
+ readyToClose: false
6938
6976
  });
6939
6977
  function ModalTrigger({ as, onClick, ...props }) {
6940
6978
  const ModalTriggerElement = as || Button$1;
@@ -6958,53 +6996,154 @@ function ModalTitle({ as, ref, ...props }) {
6958
6996
  });
6959
6997
  }
6960
6998
  function ModalDialog(props) {
6961
- const [modalControls] = useModalControls((store) => store);
6962
- const { isOpen, closeModal, place, readyToClose, className, enableMouseClose, enableTouchClose, dialogPanelRef } = modalControls || {
6963
- isOpen: false,
6964
- closeModal: () => {},
6965
- place: "bottom",
6966
- readyToClose: false,
6967
- className: "",
6968
- enableMouseClose: () => {},
6969
- enableTouchClose: () => {},
6970
- dialogPanelRef: { current: null }
6999
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
7000
+ const { className, closeModal, dialogPanelRef, isOpen, place, pseudoContainerRef, readyToClose } = modalControls || {};
7001
+ const [dialogPanelEl, setDialogPanelEl] = useState(null);
7002
+ const [draggableTriggerEl, setDraggableTriggerEl] = useState(null);
7003
+ const setDialogPanelRef = (node) => {
7004
+ setDialogPanelEl(node);
7005
+ if (dialogPanelRef) dialogPanelRef.current = node;
7006
+ };
7007
+ const setDraggableTriggerRef = (node) => {
7008
+ setDraggableTriggerEl(node);
6971
7009
  };
7010
+ const readyToCloseRef = useRef(readyToClose);
7011
+ function setUpDraggable({ dialogPanel, draggableTrigger, pseudoContainer }) {
7012
+ createDraggable(dialogPanel, {
7013
+ container: pseudoContainer,
7014
+ containerFriction: .99,
7015
+ onRelease: (draggable) => {
7016
+ if (readyToCloseRef.current) return closeModal?.();
7017
+ if (draggable.y >= 1) {
7018
+ const coord = { yCoord: draggable.y };
7019
+ animate(coord, {
7020
+ yCoord: 0,
7021
+ duration: 500,
7022
+ ease: spring({ duration: 300 }),
7023
+ composition: "blend",
7024
+ onUpdate: () => {
7025
+ draggable.setY(coord.yCoord);
7026
+ }
7027
+ });
7028
+ }
7029
+ },
7030
+ onUpdate: ({ progressY }) => {
7031
+ if (!setModalControls) return;
7032
+ if (progressY >= DRAG_TO_CLOSE_PROGRESS && !readyToCloseRef.current) {
7033
+ readyToCloseRef.current = true;
7034
+ setModalControls((prev) => ({
7035
+ ...prev,
7036
+ readyToClose: true
7037
+ }));
7038
+ }
7039
+ if (progressY < DRAG_TO_CLOSE_PROGRESS && readyToCloseRef.current) {
7040
+ readyToCloseRef.current = false;
7041
+ setModalControls((prev) => ({
7042
+ ...prev,
7043
+ readyToClose: false
7044
+ }));
7045
+ }
7046
+ },
7047
+ trigger: draggableTrigger
7048
+ });
7049
+ }
7050
+ const onDraggable = useEffectEvent(({ dialogPanel, draggableTrigger }) => {
7051
+ if (!pseudoContainerRef) return;
7052
+ const { top, left, width } = dialogPanel.getBoundingClientRect();
7053
+ pseudoContainerRef.current = document.createElement("div");
7054
+ const pseudoContainer = pseudoContainerRef.current;
7055
+ pseudoContainer.style.position = "fixed";
7056
+ pseudoContainer.style.top = `${top}px`;
7057
+ pseudoContainer.style.left = `${left}px`;
7058
+ pseudoContainer.style.width = `${width}px`;
7059
+ pseudoContainer.style.height = `100dvh`;
7060
+ pseudoContainer.style.zIndex = "-1";
7061
+ pseudoContainer.style.border = "2px solid blue";
7062
+ document.body.appendChild(pseudoContainer);
7063
+ animate(dialogPanel, {
7064
+ ...isMobileDevice ? {
7065
+ y: ["100lvh", 0],
7066
+ ease: "outExpo",
7067
+ duration: 500
7068
+ } : { keyframes: [
7069
+ {
7070
+ opacity: [0, 1],
7071
+ scale: [.5, .85],
7072
+ y: ["10rem", "9rem"],
7073
+ ease: "inExpo",
7074
+ duration: 250
7075
+ },
7076
+ {
7077
+ scale: [.85, 1],
7078
+ y: ["9rem", "0rem"],
7079
+ ease: "outExpo",
7080
+ duration: 500
7081
+ },
7082
+ {
7083
+ y: "0px",
7084
+ duration: 0
7085
+ }
7086
+ ] },
7087
+ onComplete: () => setUpDraggable({
7088
+ dialogPanel,
7089
+ draggableTrigger,
7090
+ pseudoContainer
7091
+ })
7092
+ });
7093
+ });
7094
+ useEffect(() => {
7095
+ if (isOpen && dialogPanelEl && draggableTriggerEl) onDraggable({
7096
+ dialogPanel: dialogPanelEl,
7097
+ draggableTrigger: draggableTriggerEl
7098
+ });
7099
+ }, [
7100
+ isOpen,
7101
+ dialogPanelEl,
7102
+ draggableTriggerEl
7103
+ ]);
6972
7104
  return /* @__PURE__ */ jsxs(Dialog, {
6973
7105
  open: isOpen,
6974
- onClose: () => closeModal?.(),
7106
+ onClose: closeModal || (() => void 0),
6975
7107
  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(" "),
6976
7108
  children: [/* @__PURE__ */ jsx(DialogBackdrop, {
6977
7109
  transition: true,
6978
- 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(" "),
6979
- children: /* @__PURE__ */ jsx(Button, {
7110
+ ...readyToClose ? { "data-ready": "" } : {},
7111
+ 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",
7112
+ children: /* @__PURE__ */ jsxs(Button, {
6980
7113
  padding: "none",
6981
7114
  rounded: "full",
6982
- className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
6983
- children: /* @__PURE__ */ jsxs("div", {
6984
- 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",
6985
- children: [/* @__PURE__ */ jsxs("span", {
6986
- className: "block text-xs leading-none uppercase",
6987
- children: ["Close", /* @__PURE__ */ jsx("span", {
6988
- className: "sr-only",
6989
- children: "Modal"
6990
- })]
6991
- }), /* @__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" })]
6992
- })
7115
+ 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)]",
7116
+ children: [/* @__PURE__ */ jsxs("span", {
7117
+ className: "block overflow-x-hidden text-center text-xs leading-none uppercase",
7118
+ children: [/* @__PURE__ */ jsx("span", {
7119
+ className: "ps-2",
7120
+ children: "Close"
7121
+ }), /* @__PURE__ */ jsx("span", {
7122
+ className: "sr-only",
7123
+ children: "Modal"
7124
+ })]
7125
+ }), /* @__PURE__ */ jsx(Xmark, { className: "mx-auto size-3.5 rotate-90 transition-transform duration-300 ease-in-out group-hover/button:rotate-0" })]
6993
7126
  })
6994
7127
  }), /* @__PURE__ */ jsxs(DialogPanel, {
6995
- ref: dialogPanelRef,
6996
- transition: true,
6997
- 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),
7128
+ ref: setDialogPanelRef,
7129
+ 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),
7130
+ style: isMobileDevice ? void 0 : { opacity: 0 },
6998
7131
  children: [/* @__PURE__ */ jsx("button", {
6999
- 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(" "),
7000
- onTouchStart: enableTouchClose,
7001
- onMouseDown: enableMouseClose,
7132
+ 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)",
7133
+ ...readyToClose ? { "data-ready": "" } : {},
7134
+ ref: setDraggableTriggerRef,
7002
7135
  type: "button",
7003
7136
  children: /* @__PURE__ */ jsx("span", {
7004
7137
  className: "sr-only",
7005
7138
  children: "Drag down to close"
7006
7139
  })
7007
- }), /* @__PURE__ */ jsx("div", { ...props })]
7140
+ }), /* @__PURE__ */ jsx("div", {
7141
+ className: "overflow-y-scroll",
7142
+ children: /* @__PURE__ */ jsx("div", {
7143
+ ...props,
7144
+ className: "py-4 sm:py-6 lg:py-8"
7145
+ })
7146
+ })]
7008
7147
  })]
7009
7148
  });
7010
7149
  }
@@ -7022,20 +7161,9 @@ function ModalClose({ as, onClick, ...props }) {
7022
7161
  });
7023
7162
  }
7024
7163
  function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
7025
- const [bodyElement, setBodyElement] = useState(null);
7026
- const onVisible = useEffectEvent(() => {
7027
- setBodyElement(document.body);
7028
- });
7029
- useEffect(() => {
7030
- if (typeof window !== "undefined") onVisible();
7031
- }, []);
7032
- const [, setModalControls] = useModalControls(() => null);
7164
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
7033
7165
  const [isOpen, setIsOpen] = useState(false);
7034
- const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
7035
- x: 0,
7036
- y: 0
7037
- }), localDialogPanelRef = useRef(null);
7038
- const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
7166
+ const localDialogPanelRef = useRef(null);
7039
7167
  const openModal = () => {
7040
7168
  setIsOpen((previous) => {
7041
7169
  if (previous) return previous;
@@ -7043,67 +7171,47 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
7043
7171
  return true;
7044
7172
  });
7045
7173
  };
7174
+ const closeFunctions = () => {
7175
+ onClose?.();
7176
+ modalControls?.pseudoContainerRef?.current?.remove();
7177
+ setModalControls?.((previous) => ({
7178
+ ...previous,
7179
+ pseudoContainerRef: { current: null },
7180
+ readyToClose: false
7181
+ }));
7182
+ };
7183
+ const mobileAnimation = {
7184
+ y: "100%",
7185
+ ease: "outExpo",
7186
+ duration: 500
7187
+ };
7188
+ const desktopAnimation = {
7189
+ opacity: 0,
7190
+ scale: .5,
7191
+ ease: "outExpo",
7192
+ duration: 500
7193
+ };
7194
+ const handleClose = () => {
7195
+ if (!localDialogPanelRef.current) return closeFunctions();
7196
+ animate(localDialogPanelRef.current, {
7197
+ ...isMobileDevice ? mobileAnimation : desktopAnimation,
7198
+ composition: "blend",
7199
+ onComplete: closeFunctions
7200
+ });
7201
+ };
7046
7202
  const closeModal = () => {
7047
7203
  setIsOpen((previous) => {
7048
7204
  if (!previous) return previous;
7049
- onClose?.();
7205
+ handleClose();
7050
7206
  return false;
7051
7207
  });
7052
7208
  };
7053
- const enableClose = (clientX, clientY) => {
7054
- startDragCoords.current.x = clientX;
7055
- startDragCoords.current.y = clientY;
7056
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "0s";
7057
- setAllowDragClose(true);
7058
- };
7059
- const enableTouchClose = (e) => {
7060
- const { touches } = e, { clientY } = touches[0];
7061
- enableClose(0, clientY);
7062
- };
7063
- const enableMouseClose = (e) => {
7064
- const { clientX, clientY } = e;
7065
- enableClose(clientX, clientY);
7066
- };
7067
- const handleMove = (clientX, clientY) => {
7068
- if (!localDialogPanelRef.current) return;
7069
- let deltaX = clientX - startDragCoords.current.x, deltaY = clientY - startDragCoords.current.y;
7070
- if (deltaX > 0) deltaX = easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
7071
- if (deltaX < 0) deltaX = -easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
7072
- if (deltaY < 0) deltaY = -easeOutExpo(Math.abs(deltaY), 0, 25, 2e3);
7073
- if (deltaY >= 100 && !readyToClose) setReadyToClose(true);
7074
- else if (deltaY < 100 && readyToClose) setReadyToClose(false);
7075
- const greaterThanMediaSmall = innerWidth > 640;
7076
- localDialogPanelRef.current.style.translate = `calc(-50% + ${deltaX}px) ${greaterThanMediaSmall ? `calc(-50% + ${deltaY}px)` : `${deltaY}px`}`;
7077
- };
7078
- const handleMouseMove = (e) => {
7079
- if (!allowDragClose) return;
7080
- const { clientX, clientY } = e;
7081
- handleMove(clientX, clientY);
7082
- };
7083
- const disableDragClose = (clientY) => {
7084
- const deltaY = clientY - startDragCoords.current.y;
7085
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "";
7086
- if (deltaY >= 100) {
7087
- closeModal();
7088
- setReadyToClose(false);
7089
- } else setTimeout(() => {
7090
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.removeProperty("translate");
7091
- }, 50);
7092
- };
7093
- const disableMouseDragClose = (e) => {
7094
- if (allowDragClose) setAllowDragClose(false);
7095
- const { clientY } = e;
7096
- disableDragClose(clientY);
7097
- };
7098
7209
  useEffect(() => {
7099
7210
  setModalControls?.((previous) => ({
7100
7211
  ...previous,
7101
7212
  isOpen,
7102
- readyToClose,
7103
7213
  place,
7104
7214
  className,
7105
- enableMouseClose,
7106
- enableTouchClose,
7107
7215
  openModal,
7108
7216
  closeModal,
7109
7217
  dialogPanelRef: localDialogPanelRef
@@ -7111,20 +7219,12 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
7111
7219
  }, [
7112
7220
  className,
7113
7221
  closeModal,
7114
- enableMouseClose,
7115
- enableTouchClose,
7116
7222
  isOpen,
7117
7223
  openModal,
7118
7224
  place,
7119
- readyToClose,
7120
7225
  setModalControls
7121
7226
  ]);
7122
- return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
7123
- ref: dragMoveBoxRef,
7124
- className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
7125
- onMouseMove: handleMouseMove,
7126
- onMouseUp: disableMouseDragClose
7127
- }), bodyElement), children] });
7227
+ return /* @__PURE__ */ jsx(Fragment, { children });
7128
7228
  }
7129
7229
  function Modal(props) {
7130
7230
  return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
@@ -7208,7 +7308,7 @@ function SelectOption({ children, className, name, ...props }) {
7208
7308
  className: `mr-3 before:absolute before:-left-3 before:content-[',_']`,
7209
7309
  children: name
7210
7310
  }) : /* @__PURE__ */ jsxs("div", {
7211
- 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),
7311
+ 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),
7212
7312
  children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
7213
7313
  })
7214
7314
  });
@@ -7264,7 +7364,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
7264
7364
  onChange: handleChange,
7265
7365
  children: [/* @__PURE__ */ jsxs(ListboxButton, {
7266
7366
  ...buttonProps,
7267
- 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),
7367
+ 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),
7268
7368
  ref: listboxButtonRef,
7269
7369
  children: [
7270
7370
  /* @__PURE__ */ jsx("input", {
@@ -7292,7 +7392,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
7292
7392
  }), /* @__PURE__ */ jsx(ListboxOptions, {
7293
7393
  ...optionsProps,
7294
7394
  anchor: anchor || "bottom start",
7295
- 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),
7395
+ 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),
7296
7396
  transition: transition || true,
7297
7397
  children
7298
7398
  })]
@@ -7388,15 +7488,15 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
7388
7488
  }),
7389
7489
  "\xA0",
7390
7490
  /* @__PURE__ */ jsx(CircleFill, {
7391
- className: "animate-wave size-2",
7491
+ className: "size-2 animate-wave",
7392
7492
  weight: "black"
7393
7493
  }),
7394
7494
  /* @__PURE__ */ jsx(CircleFill, {
7395
- className: "animate-wave animation-delay-100 size-2",
7495
+ className: "size-2 animate-wave animation-delay-100",
7396
7496
  weight: "black"
7397
7497
  }),
7398
7498
  /* @__PURE__ */ jsx(CircleFill, {
7399
- className: "animate-wave animation-delay-200 size-2",
7499
+ className: "size-2 animate-wave animation-delay-200",
7400
7500
  weight: "black"
7401
7501
  }),
7402
7502
  "\xA0"
@@ -7497,7 +7597,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
7497
7597
  }),
7498
7598
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
7499
7599
  ...props,
7500
- 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),
7600
+ 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),
7501
7601
  required
7502
7602
  }), children] }),
7503
7603
  description && /* @__PURE__ */ jsx(Description, {
@@ -9230,6 +9330,8 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9230
9330
  };
9231
9331
  return /* @__PURE__ */ jsxs(TooltipPanelElement, {
9232
9332
  ...props,
9333
+ "aria-live": isPositioned ? "assertive" : "off",
9334
+ 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),
9233
9335
  ref: (node) => {
9234
9336
  if (node && typeof node.querySelector === "function") {
9235
9337
  refs?.setFloating(node);
@@ -9239,7 +9341,6 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9239
9341
  }
9240
9342
  }
9241
9343
  },
9242
- 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),
9243
9344
  style: {
9244
9345
  ...style,
9245
9346
  ...floatingStyles,
@@ -9250,7 +9351,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
9250
9351
  onMouseLeave: handleMouseLeave,
9251
9352
  onTouchStart: handleTouchStart,
9252
9353
  role: "tooltip",
9253
- ...isPositioned ? { "data-ready": true } : {},
9354
+ ...isPositioned ? { "data-ready": "" } : {},
9254
9355
  children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
9255
9356
  className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
9256
9357
  style: arrowStyles,
@@ -9799,4 +9900,4 @@ function YouTubeLogo({ className, cutout = false, targets, ...props }) {
9799
9900
  });
9800
9901
  }
9801
9902
  //#endregion
9802
- 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 };
9903
+ 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 };