@andrilla/mado-ui 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -748,7 +748,7 @@ function Anchor({ as, className, disabled, href, onClick, target, rel, removeHas
748
748
  return /* @__PURE__ */ jsx(as || "a", {
749
749
  ...props,
750
750
  "aria-disabled": disabled,
751
- className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
751
+ className: twMerge("inline-block transition-transform duration-300 ease-exponential active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
752
752
  href,
753
753
  target: target || (isExternal ? "_blank" : "_self"),
754
754
  onClick: hasHash ? handleClick : onClick,
@@ -781,9 +781,9 @@ const lineLiftClasses = twJoin([
781
781
  scaleYClasses,
782
782
  "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"
783
783
  ]);
784
- 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)");
784
+ 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)");
785
785
  const getFillColorTransitionClasses = (theme, customTheme) => {
786
- let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale_color] after:bg-(--theme-color)");
786
+ let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
787
787
  if (theme === "custom") {
788
788
  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`.");
789
789
  fillColorTransitionClasses = customTheme.themeColor ? twMerge(fillColorTransitionClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -791,7 +791,7 @@ const getFillColorTransitionClasses = (theme, customTheme) => {
791
791
  return fillColorTransitionClasses;
792
792
  };
793
793
  const getFillCenterClasses = (theme, customTheme) => {
794
- 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)");
794
+ 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)");
795
795
  if (theme === "custom") {
796
796
  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`.");
797
797
  fillCenterColorClasses = customTheme.themeColor ? twMerge(fillCenterColorClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
@@ -958,7 +958,7 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
958
958
  getPaddingClasses(),
959
959
  getRoundedClasses(),
960
960
  getThemeColorVariable(),
961
- 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(" "),
961
+ 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(" "),
962
962
  className
963
963
  ]);
964
964
  if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
@@ -1033,7 +1033,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1033
1033
  };
1034
1034
  return /* @__PURE__ */ jsxs(Field, {
1035
1035
  ...fieldProps,
1036
- 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),
1036
+ 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),
1037
1037
  ...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
1038
1038
  children: [/* @__PURE__ */ jsxs("div", {
1039
1039
  ...inputContainerProps,
@@ -1042,7 +1042,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1042
1042
  ...props,
1043
1043
  ...required ? { "aria-required": "true" } : {},
1044
1044
  ...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
1045
- 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),
1045
+ 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),
1046
1046
  onChange: handleChange,
1047
1047
  value,
1048
1048
  children: [/* @__PURE__ */ jsx("input", {
@@ -1058,7 +1058,7 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
1058
1058
  type: "checkbox",
1059
1059
  value
1060
1060
  }), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
1061
- className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
1061
+ className: "size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 ease-exponential group-data-checked/checkbox:scale-60",
1062
1062
  weight: "bold"
1063
1063
  })]
1064
1064
  }), /* @__PURE__ */ jsxs(Label, {
@@ -3970,11 +3970,6 @@ function getWeekdayName(weekday = d) {
3970
3970
  return weekdayNamesList[weekday.getDay()];
3971
3971
  }
3972
3972
  //#endregion
3973
- //#region src/utils/math.ts
3974
- function easeOutExpo(time, start, end, duration) {
3975
- return time == duration ? start + end : end * (-Math.pow(2, -10 * time / duration) + 1) + start;
3976
- }
3977
- //#endregion
3978
3973
  //#region src/components/chevron-up-down-anime.tsx
3979
3974
  function ChevronUpDownAnime({ className, isUp = false }) {
3980
3975
  const firstLoadRef = useRef(true);
@@ -4039,7 +4034,7 @@ function DetailsSummary({ arrow = true, children, className, onClick, ...props }
4039
4034
  function DetailsBody({ children, className, ...props }) {
4040
4035
  return /* @__PURE__ */ jsx(DisclosurePanel, {
4041
4036
  ...props,
4042
- className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
4037
+ className: twMerge("grid grid-rows-1fr transition-rows duration-500 ease-exponential data-closed:grid-rows-0fr", className),
4043
4038
  transition: true,
4044
4039
  children: (bag) => /* @__PURE__ */ jsx("div", {
4045
4040
  className: "overflow-y-hidden px-2 pbs-3 pbe-1",
@@ -4060,8 +4055,9 @@ function Details({ as = "div", className, ...props }) {
4060
4055
  function DropDownButton({ arrow = true, as, children, className, ...props }) {
4061
4056
  return /* @__PURE__ */ jsx(MenuButton, {
4062
4057
  ...props,
4063
- as: as || "button",
4064
- className: twJoin("group/button", className),
4058
+ as,
4059
+ className: twJoin("group/button transition-transform duration-300 ease-exponential active:scale-95", className),
4060
+ onClick: () => console.log("here i am"),
4065
4061
  children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
4066
4062
  className: "-mr-1",
4067
4063
  isUp: bag.open
@@ -4094,7 +4090,7 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
4094
4090
  return /* @__PURE__ */ jsx(MenuItems, {
4095
4091
  ...props,
4096
4092
  anchor: anchorProps,
4097
- 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),
4093
+ 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),
4098
4094
  static: props.static,
4099
4095
  style: {
4100
4096
  ...style,
@@ -5938,9 +5934,30 @@ function generateHumanValidationToken() {
5938
5934
  return char;
5939
5935
  }).join("")}_${weekCode}`;
5940
5936
  }
5941
- function HumanVerification({ children = "Verify", className }) {
5937
+ function HumanVerification({ children = "Verify", className, ref }) {
5942
5938
  const [dragProgress, setDragProgress] = useState(0);
5943
5939
  const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
5940
+ const resetVerification = useEffectEvent(() => {
5941
+ setDragProgress(0);
5942
+ const draggable = draggableRef.current;
5943
+ if (draggable) {
5944
+ draggable.enable();
5945
+ draggable.setX(0);
5946
+ draggable.refresh();
5947
+ }
5948
+ (buttonRef.current?.closest("form"))?.querySelectorAll("input[name=\"human_verification_token\"]")?.forEach((input) => input.remove());
5949
+ });
5950
+ useEffect(() => {
5951
+ const form = buttonRef.current?.closest("form");
5952
+ if (!form) return;
5953
+ const controller = new AbortController();
5954
+ form.addEventListener("reset", () => {
5955
+ queueMicrotask(() => resetVerification());
5956
+ }, { signal: controller.signal });
5957
+ return () => {
5958
+ controller.abort();
5959
+ };
5960
+ }, []);
5944
5961
  const handleTrySubmit = (x) => {
5945
5962
  if (x > 239) {
5946
5963
  const form = buttonRef.current?.closest("form");
@@ -6045,7 +6062,10 @@ function HumanVerification({ children = "Verify", className }) {
6045
6062
  "aria-valuenow": dragProgress,
6046
6063
  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",
6047
6064
  onKeyDown: moveButton,
6048
- ref: buttonRef,
6065
+ ref: (node) => {
6066
+ buttonRef.current = node;
6067
+ if (ref) ref.current = node;
6068
+ },
6049
6069
  role: "slider",
6050
6070
  type: "button",
6051
6071
  children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
@@ -6176,7 +6196,7 @@ function Input({ children, className, description, descriptionProps: { className
6176
6196
  }),
6177
6197
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
6178
6198
  ...props,
6179
- 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),
6199
+ 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),
6180
6200
  required
6181
6201
  }), children] }),
6182
6202
  description && /* @__PURE__ */ jsx(Description, {
@@ -6188,6 +6208,61 @@ function Input({ children, className, description, descriptionProps: { className
6188
6208
  });
6189
6209
  }
6190
6210
  //#endregion
6211
+ //#region src/hooks/create-fast-context.tsx
6212
+ function createFastContext(defaultInitialState) {
6213
+ function useStoreData(initialState = defaultInitialState) {
6214
+ const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
6215
+ const set = (value) => {
6216
+ if (typeof value === "function") store.current = value(store.current);
6217
+ else store.current = value;
6218
+ subscribers.current.forEach((callback) => callback());
6219
+ };
6220
+ const subscribe = (callback) => {
6221
+ subscribers.current.add(callback);
6222
+ return () => subscribers.current.delete(callback);
6223
+ };
6224
+ return {
6225
+ get,
6226
+ set,
6227
+ subscribe
6228
+ };
6229
+ }
6230
+ const StoreContext = createContext(null);
6231
+ function Provider({ initialValue = defaultInitialState, ...props }) {
6232
+ return /* @__PURE__ */ jsx(StoreContext.Provider, {
6233
+ value: useStoreData(initialValue),
6234
+ ...props
6235
+ });
6236
+ }
6237
+ function useStore(selector, initialValue) {
6238
+ const store = useContext(StoreContext);
6239
+ if (!store) {
6240
+ const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
6241
+ const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
6242
+ return [selectedValue, noOpSet];
6243
+ }
6244
+ return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
6245
+ }
6246
+ return {
6247
+ Provider,
6248
+ useStore
6249
+ };
6250
+ }
6251
+ const { Provider, useStore } = createFastContext("incomplete");
6252
+ //#endregion
6253
+ //#region src/hooks/use-mobile-device.ts
6254
+ function useMobileDevice() {
6255
+ const [isMobileDevice, setIsMobileDevice] = useState(false);
6256
+ const onRun = () => {
6257
+ const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0, hasSmallViewport = window.innerWidth < 500;
6258
+ setIsMobileDevice(hasTouch || hasSmallViewport);
6259
+ };
6260
+ useEffect(() => {
6261
+ if (typeof window !== "undefined") onRun();
6262
+ }, []);
6263
+ return isMobileDevice;
6264
+ }
6265
+ //#endregion
6191
6266
  //#region src/symbols/xmark.tsx
6192
6267
  function Xmark({ weight = "regular", ...props }) {
6193
6268
  switch (weight) {
@@ -6239,58 +6314,16 @@ function Xmark({ weight = "regular", ...props }) {
6239
6314
  }
6240
6315
  }
6241
6316
  //#endregion
6242
- //#region src/hooks/create-fast-context.tsx
6243
- function createFastContext(defaultInitialState) {
6244
- function useStoreData(initialState = defaultInitialState) {
6245
- const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
6246
- const set = (value) => {
6247
- if (typeof value === "function") store.current = value(store.current);
6248
- else store.current = value;
6249
- subscribers.current.forEach((callback) => callback());
6250
- };
6251
- const subscribe = (callback) => {
6252
- subscribers.current.add(callback);
6253
- return () => subscribers.current.delete(callback);
6254
- };
6255
- return {
6256
- get,
6257
- set,
6258
- subscribe
6259
- };
6260
- }
6261
- const StoreContext = createContext(null);
6262
- function Provider({ initialValue = defaultInitialState, ...props }) {
6263
- return /* @__PURE__ */ jsx(StoreContext.Provider, {
6264
- value: useStoreData(initialValue),
6265
- ...props
6266
- });
6267
- }
6268
- function useStore(selector, initialValue) {
6269
- const store = useContext(StoreContext);
6270
- if (!store) {
6271
- const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
6272
- const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
6273
- return [selectedValue, noOpSet];
6274
- }
6275
- return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
6276
- }
6277
- return {
6278
- Provider,
6279
- useStore
6280
- };
6281
- }
6282
- const { Provider, useStore } = createFastContext("incomplete");
6283
- //#endregion
6284
6317
  //#region src/components/modal.tsx
6318
+ const DRAG_TO_CLOSE_PROGRESS = .5;
6285
6319
  const { Provider: ModalControlsProvider, useStore: useModalControls } = createFastContext({
6320
+ closeModal: () => {},
6321
+ dialogPanelRef: { current: null },
6286
6322
  isOpen: false,
6287
6323
  openModal: () => {},
6288
- closeModal: () => {},
6289
6324
  place: "bottom",
6290
- readyToClose: false,
6291
- enableTouchClose: () => {},
6292
- enableMouseClose: () => {},
6293
- dialogPanelRef: { current: null }
6325
+ pseudoContainerRef: { current: null },
6326
+ readyToClose: false
6294
6327
  });
6295
6328
  function ModalTrigger({ as, onClick, ...props }) {
6296
6329
  const ModalTriggerElement = as || Button$1;
@@ -6314,53 +6347,154 @@ function ModalTitle({ as, ref, ...props }) {
6314
6347
  });
6315
6348
  }
6316
6349
  function ModalDialog(props) {
6317
- const [modalControls] = useModalControls((store) => store);
6318
- const { isOpen, closeModal, place, readyToClose, className, enableMouseClose, enableTouchClose, dialogPanelRef } = modalControls || {
6319
- isOpen: false,
6320
- closeModal: () => {},
6321
- place: "bottom",
6322
- readyToClose: false,
6323
- className: "",
6324
- enableMouseClose: () => {},
6325
- enableTouchClose: () => {},
6326
- dialogPanelRef: { current: null }
6350
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
6351
+ const { className, closeModal, dialogPanelRef, isOpen, place, pseudoContainerRef, readyToClose } = modalControls || {};
6352
+ const [dialogPanelEl, setDialogPanelEl] = useState(null);
6353
+ const [draggableTriggerEl, setDraggableTriggerEl] = useState(null);
6354
+ const setDialogPanelRef = (node) => {
6355
+ setDialogPanelEl(node);
6356
+ if (dialogPanelRef) dialogPanelRef.current = node;
6327
6357
  };
6358
+ const setDraggableTriggerRef = (node) => {
6359
+ setDraggableTriggerEl(node);
6360
+ };
6361
+ const readyToCloseRef = useRef(readyToClose);
6362
+ function setUpDraggable({ dialogPanel, draggableTrigger, pseudoContainer }) {
6363
+ createDraggable(dialogPanel, {
6364
+ container: pseudoContainer,
6365
+ containerFriction: .99,
6366
+ onRelease: (draggable) => {
6367
+ if (readyToCloseRef.current) return closeModal?.();
6368
+ if (draggable.y >= 1) {
6369
+ const coord = { yCoord: draggable.y };
6370
+ animate(coord, {
6371
+ yCoord: 0,
6372
+ duration: 500,
6373
+ ease: spring({ duration: 300 }),
6374
+ composition: "blend",
6375
+ onUpdate: () => {
6376
+ draggable.setY(coord.yCoord);
6377
+ }
6378
+ });
6379
+ }
6380
+ },
6381
+ onUpdate: ({ progressY }) => {
6382
+ if (!setModalControls) return;
6383
+ if (progressY >= DRAG_TO_CLOSE_PROGRESS && !readyToCloseRef.current) {
6384
+ readyToCloseRef.current = true;
6385
+ setModalControls((prev) => ({
6386
+ ...prev,
6387
+ readyToClose: true
6388
+ }));
6389
+ }
6390
+ if (progressY < DRAG_TO_CLOSE_PROGRESS && readyToCloseRef.current) {
6391
+ readyToCloseRef.current = false;
6392
+ setModalControls((prev) => ({
6393
+ ...prev,
6394
+ readyToClose: false
6395
+ }));
6396
+ }
6397
+ },
6398
+ trigger: draggableTrigger
6399
+ });
6400
+ }
6401
+ const onDraggable = useEffectEvent(({ dialogPanel, draggableTrigger }) => {
6402
+ if (!pseudoContainerRef) return;
6403
+ const { top, left, width } = dialogPanel.getBoundingClientRect();
6404
+ pseudoContainerRef.current = document.createElement("div");
6405
+ const pseudoContainer = pseudoContainerRef.current;
6406
+ pseudoContainer.style.position = "fixed";
6407
+ pseudoContainer.style.top = `${top}px`;
6408
+ pseudoContainer.style.left = `${left}px`;
6409
+ pseudoContainer.style.width = `${width}px`;
6410
+ pseudoContainer.style.height = `100dvh`;
6411
+ pseudoContainer.style.zIndex = "-1";
6412
+ pseudoContainer.style.border = "2px solid blue";
6413
+ document.body.appendChild(pseudoContainer);
6414
+ animate(dialogPanel, {
6415
+ ...isMobileDevice ? {
6416
+ y: ["100lvh", 0],
6417
+ ease: "outExpo",
6418
+ duration: 500
6419
+ } : { keyframes: [
6420
+ {
6421
+ opacity: [0, 1],
6422
+ scale: [.5, .85],
6423
+ y: ["10rem", "9rem"],
6424
+ ease: "inExpo",
6425
+ duration: 250
6426
+ },
6427
+ {
6428
+ scale: [.85, 1],
6429
+ y: ["9rem", "0rem"],
6430
+ ease: "outExpo",
6431
+ duration: 500
6432
+ },
6433
+ {
6434
+ y: "0px",
6435
+ duration: 0
6436
+ }
6437
+ ] },
6438
+ onComplete: () => setUpDraggable({
6439
+ dialogPanel,
6440
+ draggableTrigger,
6441
+ pseudoContainer
6442
+ })
6443
+ });
6444
+ });
6445
+ useEffect(() => {
6446
+ if (isOpen && dialogPanelEl && draggableTriggerEl) onDraggable({
6447
+ dialogPanel: dialogPanelEl,
6448
+ draggableTrigger: draggableTriggerEl
6449
+ });
6450
+ }, [
6451
+ isOpen,
6452
+ dialogPanelEl,
6453
+ draggableTriggerEl
6454
+ ]);
6328
6455
  return /* @__PURE__ */ jsxs(Dialog, {
6329
6456
  open: isOpen,
6330
- onClose: () => closeModal?.(),
6457
+ onClose: closeModal || (() => void 0),
6331
6458
  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(" "),
6332
6459
  children: [/* @__PURE__ */ jsx(DialogBackdrop, {
6333
6460
  transition: true,
6334
- 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(" "),
6335
- children: /* @__PURE__ */ jsx(Button, {
6461
+ ...readyToClose ? { "data-ready": "" } : {},
6462
+ 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",
6463
+ children: /* @__PURE__ */ jsxs(Button, {
6336
6464
  padding: "none",
6337
6465
  rounded: "full",
6338
- className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
6339
- children: /* @__PURE__ */ jsxs("div", {
6340
- 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",
6341
- children: [/* @__PURE__ */ jsxs("span", {
6342
- className: "block text-xs leading-none uppercase",
6343
- children: ["Close", /* @__PURE__ */ jsx("span", {
6344
- className: "sr-only",
6345
- children: "Modal"
6346
- })]
6347
- }), /* @__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" })]
6348
- })
6466
+ 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)]",
6467
+ children: [/* @__PURE__ */ jsxs("span", {
6468
+ className: "block overflow-x-hidden text-center text-xs leading-none uppercase",
6469
+ children: [/* @__PURE__ */ jsx("span", {
6470
+ className: "ps-2",
6471
+ children: "Close"
6472
+ }), /* @__PURE__ */ jsx("span", {
6473
+ className: "sr-only",
6474
+ children: "Modal"
6475
+ })]
6476
+ }), /* @__PURE__ */ jsx(Xmark, { className: "mx-auto size-3.5 rotate-90 transition-transform duration-300 ease-in-out group-hover/button:rotate-0" })]
6349
6477
  })
6350
6478
  }), /* @__PURE__ */ jsxs(DialogPanel, {
6351
- ref: dialogPanelRef,
6352
- transition: true,
6353
- 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),
6479
+ ref: setDialogPanelRef,
6480
+ 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),
6481
+ style: isMobileDevice ? void 0 : { opacity: 0 },
6354
6482
  children: [/* @__PURE__ */ jsx("button", {
6355
- 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(" "),
6356
- onTouchStart: enableTouchClose,
6357
- onMouseDown: enableMouseClose,
6483
+ 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)",
6484
+ ...readyToClose ? { "data-ready": "" } : {},
6485
+ ref: setDraggableTriggerRef,
6358
6486
  type: "button",
6359
6487
  children: /* @__PURE__ */ jsx("span", {
6360
6488
  className: "sr-only",
6361
6489
  children: "Drag down to close"
6362
6490
  })
6363
- }), /* @__PURE__ */ jsx("div", { ...props })]
6491
+ }), /* @__PURE__ */ jsx("div", {
6492
+ className: "overflow-y-scroll",
6493
+ children: /* @__PURE__ */ jsx("div", {
6494
+ ...props,
6495
+ className: "py-4 sm:py-6 lg:py-8"
6496
+ })
6497
+ })]
6364
6498
  })]
6365
6499
  });
6366
6500
  }
@@ -6378,20 +6512,9 @@ function ModalClose({ as, onClick, ...props }) {
6378
6512
  });
6379
6513
  }
6380
6514
  function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
6381
- const [bodyElement, setBodyElement] = useState(null);
6382
- const onVisible = useEffectEvent(() => {
6383
- setBodyElement(document.body);
6384
- });
6385
- useEffect(() => {
6386
- if (typeof window !== "undefined") onVisible();
6387
- }, []);
6388
- const [, setModalControls] = useModalControls(() => null);
6515
+ const [modalControls, setModalControls] = useModalControls((store) => store), isMobileDevice = useMobileDevice();
6389
6516
  const [isOpen, setIsOpen] = useState(false);
6390
- const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
6391
- x: 0,
6392
- y: 0
6393
- }), localDialogPanelRef = useRef(null);
6394
- const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
6517
+ const localDialogPanelRef = useRef(null);
6395
6518
  const openModal = () => {
6396
6519
  setIsOpen((previous) => {
6397
6520
  if (previous) return previous;
@@ -6399,67 +6522,47 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
6399
6522
  return true;
6400
6523
  });
6401
6524
  };
6525
+ const closeFunctions = () => {
6526
+ onClose?.();
6527
+ modalControls?.pseudoContainerRef?.current?.remove();
6528
+ setModalControls?.((previous) => ({
6529
+ ...previous,
6530
+ pseudoContainerRef: { current: null },
6531
+ readyToClose: false
6532
+ }));
6533
+ };
6534
+ const mobileAnimation = {
6535
+ y: "100%",
6536
+ ease: "outExpo",
6537
+ duration: 500
6538
+ };
6539
+ const desktopAnimation = {
6540
+ opacity: 0,
6541
+ scale: .5,
6542
+ ease: "outExpo",
6543
+ duration: 500
6544
+ };
6545
+ const handleClose = () => {
6546
+ if (!localDialogPanelRef.current) return closeFunctions();
6547
+ animate(localDialogPanelRef.current, {
6548
+ ...isMobileDevice ? mobileAnimation : desktopAnimation,
6549
+ composition: "blend",
6550
+ onComplete: closeFunctions
6551
+ });
6552
+ };
6402
6553
  const closeModal = () => {
6403
6554
  setIsOpen((previous) => {
6404
6555
  if (!previous) return previous;
6405
- onClose?.();
6556
+ handleClose();
6406
6557
  return false;
6407
6558
  });
6408
6559
  };
6409
- const enableClose = (clientX, clientY) => {
6410
- startDragCoords.current.x = clientX;
6411
- startDragCoords.current.y = clientY;
6412
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "0s";
6413
- setAllowDragClose(true);
6414
- };
6415
- const enableTouchClose = (e) => {
6416
- const { touches } = e, { clientY } = touches[0];
6417
- enableClose(0, clientY);
6418
- };
6419
- const enableMouseClose = (e) => {
6420
- const { clientX, clientY } = e;
6421
- enableClose(clientX, clientY);
6422
- };
6423
- const handleMove = (clientX, clientY) => {
6424
- if (!localDialogPanelRef.current) return;
6425
- let deltaX = clientX - startDragCoords.current.x, deltaY = clientY - startDragCoords.current.y;
6426
- if (deltaX > 0) deltaX = easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
6427
- if (deltaX < 0) deltaX = -easeOutExpo(Math.abs(deltaX), 0, 25, 5e3);
6428
- if (deltaY < 0) deltaY = -easeOutExpo(Math.abs(deltaY), 0, 25, 2e3);
6429
- if (deltaY >= 100 && !readyToClose) setReadyToClose(true);
6430
- else if (deltaY < 100 && readyToClose) setReadyToClose(false);
6431
- const greaterThanMediaSmall = innerWidth > 640;
6432
- localDialogPanelRef.current.style.translate = `calc(-50% + ${deltaX}px) ${greaterThanMediaSmall ? `calc(-50% + ${deltaY}px)` : `${deltaY}px`}`;
6433
- };
6434
- const handleMouseMove = (e) => {
6435
- if (!allowDragClose) return;
6436
- const { clientX, clientY } = e;
6437
- handleMove(clientX, clientY);
6438
- };
6439
- const disableDragClose = (clientY) => {
6440
- const deltaY = clientY - startDragCoords.current.y;
6441
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.transitionDuration = "";
6442
- if (deltaY >= 100) {
6443
- closeModal();
6444
- setReadyToClose(false);
6445
- } else setTimeout(() => {
6446
- if (localDialogPanelRef.current) localDialogPanelRef.current.style.removeProperty("translate");
6447
- }, 50);
6448
- };
6449
- const disableMouseDragClose = (e) => {
6450
- if (allowDragClose) setAllowDragClose(false);
6451
- const { clientY } = e;
6452
- disableDragClose(clientY);
6453
- };
6454
6560
  useEffect(() => {
6455
6561
  setModalControls?.((previous) => ({
6456
6562
  ...previous,
6457
6563
  isOpen,
6458
- readyToClose,
6459
6564
  place,
6460
6565
  className,
6461
- enableMouseClose,
6462
- enableTouchClose,
6463
6566
  openModal,
6464
6567
  closeModal,
6465
6568
  dialogPanelRef: localDialogPanelRef
@@ -6467,20 +6570,12 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
6467
6570
  }, [
6468
6571
  className,
6469
6572
  closeModal,
6470
- enableMouseClose,
6471
- enableTouchClose,
6472
6573
  isOpen,
6473
6574
  openModal,
6474
6575
  place,
6475
- readyToClose,
6476
6576
  setModalControls
6477
6577
  ]);
6478
- return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
6479
- ref: dragMoveBoxRef,
6480
- className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
6481
- onMouseMove: handleMouseMove,
6482
- onMouseUp: disableMouseDragClose
6483
- }), bodyElement), children] });
6578
+ return /* @__PURE__ */ jsx(Fragment, { children });
6484
6579
  }
6485
6580
  function Modal(props) {
6486
6581
  return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
@@ -6564,7 +6659,7 @@ function SelectOption({ children, className, name, ...props }) {
6564
6659
  className: `mr-3 before:absolute before:-left-3 before:content-[',_']`,
6565
6660
  children: name
6566
6661
  }) : /* @__PURE__ */ jsxs("div", {
6567
- 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),
6662
+ 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),
6568
6663
  children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
6569
6664
  })
6570
6665
  });
@@ -6620,7 +6715,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
6620
6715
  onChange: handleChange,
6621
6716
  children: [/* @__PURE__ */ jsxs(ListboxButton, {
6622
6717
  ...buttonProps,
6623
- 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),
6718
+ 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),
6624
6719
  ref: listboxButtonRef,
6625
6720
  children: [
6626
6721
  /* @__PURE__ */ jsx("input", {
@@ -6648,7 +6743,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
6648
6743
  }), /* @__PURE__ */ jsx(ListboxOptions, {
6649
6744
  ...optionsProps,
6650
6745
  anchor: anchor || "bottom start",
6651
- 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),
6746
+ 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),
6652
6747
  transition: transition || true,
6653
6748
  children
6654
6749
  })]
@@ -6744,15 +6839,15 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
6744
6839
  }),
6745
6840
  "\xA0",
6746
6841
  /* @__PURE__ */ jsx(CircleFill, {
6747
- className: "animate-wave size-2",
6842
+ className: "size-2 animate-wave",
6748
6843
  weight: "black"
6749
6844
  }),
6750
6845
  /* @__PURE__ */ jsx(CircleFill, {
6751
- className: "animate-wave animation-delay-100 size-2",
6846
+ className: "size-2 animate-wave animation-delay-100",
6752
6847
  weight: "black"
6753
6848
  }),
6754
6849
  /* @__PURE__ */ jsx(CircleFill, {
6755
- className: "animate-wave animation-delay-200 size-2",
6850
+ className: "size-2 animate-wave animation-delay-200",
6756
6851
  weight: "black"
6757
6852
  }),
6758
6853
  "\xA0"
@@ -6853,7 +6948,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
6853
6948
  }),
6854
6949
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
6855
6950
  ...props,
6856
- 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),
6951
+ 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),
6857
6952
  required
6858
6953
  }), children] }),
6859
6954
  description && /* @__PURE__ */ jsx(Description, {
@@ -8586,6 +8681,8 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8586
8681
  };
8587
8682
  return /* @__PURE__ */ jsxs(TooltipPanelElement, {
8588
8683
  ...props,
8684
+ "aria-live": isPositioned ? "assertive" : "off",
8685
+ 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),
8589
8686
  ref: (node) => {
8590
8687
  if (node && typeof node.querySelector === "function") {
8591
8688
  refs?.setFloating(node);
@@ -8595,7 +8692,6 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8595
8692
  }
8596
8693
  }
8597
8694
  },
8598
- 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),
8599
8695
  style: {
8600
8696
  ...style,
8601
8697
  ...floatingStyles,
@@ -8606,7 +8702,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
8606
8702
  onMouseLeave: handleMouseLeave,
8607
8703
  onTouchStart: handleTouchStart,
8608
8704
  role: "tooltip",
8609
- ...isPositioned ? { "data-ready": true } : {},
8705
+ ...isPositioned ? { "data-ready": "" } : {},
8610
8706
  children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
8611
8707
  className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
8612
8708
  style: arrowStyles,