@andrilla/mado-ui 1.0.8 → 1.0.9
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/README.md +751 -12
- package/dist/client/components/index.js +204 -256
- package/dist/client/graphics/index.js +2 -11
- package/dist/client.js +200 -257
- package/dist/components/drop-down.d.ts +4 -4
- package/dist/components/fieldset.d.ts +7 -0
- package/dist/components/index.js +203 -255
- package/dist/components/link.d.ts +14 -10
- package/dist/components/modal.d.ts +9 -6
- package/dist/components/select.d.ts +2 -1
- package/dist/components/time.d.ts +3 -1
- package/dist/css/theme.css +1 -1
- package/dist/css/utilities.css +26 -0
- package/dist/graphics/index.js +1 -10
- package/dist/hooks/index.js +1 -5
- package/dist/index.js +199 -256
- package/dist/utils/index.js +1 -8
- package/package.json +11 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import { extendTailwindMerge, twJoin } from "tailwind-merge";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Button as Button$1, Checkbox as Checkbox$1, Description, Dialog, DialogBackdrop, DialogPanel, DialogTitle, Disclosure, DisclosureButton, DisclosurePanel, Field, Fieldset as Fieldset$1, Input as Input$1, Label, Legend, Listbox, ListboxButton, ListboxOption, ListboxOptions, ListboxSelectedOption, Menu, MenuButton, MenuHeading, MenuItem, MenuItems, MenuSection, MenuSeparator, Textarea as Textarea$1 } from "@headlessui/react";
|
|
@@ -6,7 +6,6 @@ import * as React from "react";
|
|
|
6
6
|
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
7
7
|
import * as ReactDOM from "react-dom";
|
|
8
8
|
import { createPortal } from "react-dom";
|
|
9
|
-
|
|
10
9
|
//#region src/utils/custom-tailwind-merge.ts
|
|
11
10
|
const isInteger = (classPart) => /^\d+$/.test(classPart);
|
|
12
11
|
const isFloat = (classPart) => /^\d+\.\d+$/.test(classPart);
|
|
@@ -101,7 +100,6 @@ const twMerge = extendTailwindMerge({ extend: { classGroups: {
|
|
|
101
100
|
"grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
|
|
102
101
|
transition: [{ transition: ["transition-cols", "transition-rows"] }]
|
|
103
102
|
} } });
|
|
104
|
-
|
|
105
103
|
//#endregion
|
|
106
104
|
//#region src/utils/get-theme-color.ts
|
|
107
105
|
function getThemeColor(theme) {
|
|
@@ -739,15 +737,14 @@ function getTextColor(theme, asVariable) {
|
|
|
739
737
|
default: return asVariable ? "[--text-color:var(--base-theme-color--foreground)]" : "text-[var(--base-theme-color--foreground)]";
|
|
740
738
|
}
|
|
741
739
|
}
|
|
742
|
-
|
|
743
740
|
//#endregion
|
|
744
741
|
//#region src/components/link.tsx
|
|
745
|
-
function Anchor({ as, className, disabled, href, onClick, target, rel, ...props }) {
|
|
742
|
+
function Anchor({ as, className, disabled, href, onClick, target, rel, removeHash = true, ...props }) {
|
|
746
743
|
const isExternal = `${href}`.startsWith("http"), hasHash = `${href}`.includes("#");
|
|
747
744
|
const handleClick = (e) => {
|
|
748
745
|
if (disabled) return e.preventDefault();
|
|
749
746
|
onClick?.(e);
|
|
750
|
-
setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
|
|
747
|
+
if (removeHash) setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
|
|
751
748
|
};
|
|
752
749
|
return /* @__PURE__ */ jsx(as || "a", {
|
|
753
750
|
...props,
|
|
@@ -785,9 +782,9 @@ const lineLiftClasses = twJoin([
|
|
|
785
782
|
scaleYClasses,
|
|
786
783
|
"after:origin-bottom after:translate-y-1 after:scale-x-75 active:after:translate-y-0 active:after:scale-x-100 pointer-fine:hover:after:translate-y-0 pointer-fine:hover:after:scale-x-100 pointer-fine:active:after:translate-y-0 pointer-fine:active:after:scale-x-100"
|
|
787
784
|
]);
|
|
788
|
-
const fillClasses = twJoin(baseClasses, "whitespace-nowrap transition-[
|
|
785
|
+
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)");
|
|
789
786
|
const getFillColorTransitionClasses = (theme, customTheme) => {
|
|
790
|
-
let fillColorTransitionClasses = twJoin(fillClasses, "transition-[
|
|
787
|
+
let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale_color] after:bg-(--theme-color)");
|
|
791
788
|
if (theme === "custom") {
|
|
792
789
|
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`.");
|
|
793
790
|
fillColorTransitionClasses = customTheme.themeColor ? twMerge(fillColorTransitionClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
|
|
@@ -795,7 +792,7 @@ const getFillColorTransitionClasses = (theme, customTheme) => {
|
|
|
795
792
|
return fillColorTransitionClasses;
|
|
796
793
|
};
|
|
797
794
|
const getFillCenterClasses = (theme, customTheme) => {
|
|
798
|
-
let fillCenterColorClasses = twJoin(fillClasses, "after:scale-x-50 after:scale-y-[.25] after:bg-(--theme-color)/0 after:transition-[
|
|
795
|
+
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)");
|
|
799
796
|
if (theme === "custom") {
|
|
800
797
|
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`.");
|
|
801
798
|
fillCenterColorClasses = customTheme.themeColor ? twMerge(fillCenterColorClasses, customTheme.themeColor) : twMerge(fillClasses, customTheme.classes);
|
|
@@ -839,8 +836,8 @@ const getMultilineFillRtlClasses = (theme, customTheme) => {
|
|
|
839
836
|
const getMultilineFillCenterClasses = (theme, customTheme) => {
|
|
840
837
|
return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[50%_auto]");
|
|
841
838
|
};
|
|
842
|
-
function getLinkClasses({ customTheme, theme,
|
|
843
|
-
switch (
|
|
839
|
+
function getLinkClasses({ customTheme, theme, lineType }) {
|
|
840
|
+
switch (lineType) {
|
|
844
841
|
case "static": return lineStaticClasses;
|
|
845
842
|
case "ltr": return lineLtrClasses;
|
|
846
843
|
case "rtl": return lineRtlClasses;
|
|
@@ -900,26 +897,28 @@ function getLinkClasses({ customTheme, theme, type }) {
|
|
|
900
897
|
* ## Examples
|
|
901
898
|
*
|
|
902
899
|
* @example
|
|
903
|
-
* <Link href='/about'
|
|
900
|
+
* <Link href='/about' lineType='ltr' title='About Us'>Learn more about our company</Link>
|
|
901
|
+
*
|
|
902
|
+
* @example
|
|
903
|
+
* <Link href='/about' lineType='fill-ltr' title='About Us'>Learn more about our company</Link>
|
|
904
904
|
*
|
|
905
905
|
* @example
|
|
906
|
-
* <Link href='/about'
|
|
906
|
+
* <Link href='/about' lineType='multiline-fill-rtl' theme='red' title='About Us'>Learn more about our company</Link>
|
|
907
907
|
*
|
|
908
908
|
* @example
|
|
909
|
-
* <Link
|
|
909
|
+
* <Link as='button' lineType='fill-lift' theme='mauve-700'>Edit</Link>
|
|
910
910
|
*/
|
|
911
|
-
function Link({ as, className, customTheme,
|
|
911
|
+
function Link({ as, className, customTheme, lineType, theme, ...props }) {
|
|
912
912
|
const linkClasses = getLinkClasses({
|
|
913
913
|
customTheme,
|
|
914
914
|
theme,
|
|
915
|
-
|
|
915
|
+
lineType
|
|
916
916
|
});
|
|
917
917
|
return /* @__PURE__ */ jsx(as || Anchor, {
|
|
918
918
|
...props,
|
|
919
919
|
className: twMerge(linkClasses, className)
|
|
920
920
|
});
|
|
921
921
|
}
|
|
922
|
-
|
|
923
922
|
//#endregion
|
|
924
923
|
//#region src/components/button.tsx
|
|
925
924
|
/**
|
|
@@ -960,7 +959,7 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
|
|
|
960
959
|
getPaddingClasses(),
|
|
961
960
|
getRoundedClasses(),
|
|
962
961
|
getThemeColorVariable(),
|
|
963
|
-
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-[
|
|
962
|
+
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(" "),
|
|
964
963
|
className
|
|
965
964
|
]);
|
|
966
965
|
if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
|
|
@@ -973,7 +972,6 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
|
|
|
973
972
|
className: buttonClasses
|
|
974
973
|
});
|
|
975
974
|
}
|
|
976
|
-
|
|
977
975
|
//#endregion
|
|
978
976
|
//#region src/symbols/checkmark.tsx
|
|
979
977
|
function Checkmark({ weight = "regular", ...props }) {
|
|
@@ -1025,7 +1023,6 @@ function Checkmark({ weight = "regular", ...props }) {
|
|
|
1025
1023
|
});
|
|
1026
1024
|
}
|
|
1027
1025
|
}
|
|
1028
|
-
|
|
1029
1026
|
//#endregion
|
|
1030
1027
|
//#region src/components/checkbox.tsx
|
|
1031
1028
|
function Checkbox({ checkmark, children, className, description, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, fieldProps: { className: fieldClassName, ...fieldProps } = {}, labelProps: { className: labelClassName, ...labelProps } = {}, inputContainerProps: { className: inputContainerClassName, ...inputContainerProps } = {}, onChange, required, value, ...props }) {
|
|
@@ -1080,7 +1077,6 @@ function Checkbox({ checkmark, children, className, description, descriptionProp
|
|
|
1080
1077
|
})]
|
|
1081
1078
|
});
|
|
1082
1079
|
}
|
|
1083
|
-
|
|
1084
1080
|
//#endregion
|
|
1085
1081
|
//#region node_modules/animejs/dist/modules/core/consts.js
|
|
1086
1082
|
/**
|
|
@@ -1132,9 +1128,6 @@ const proxyTargetSymbol = Symbol();
|
|
|
1132
1128
|
const minValue = 1e-11;
|
|
1133
1129
|
const maxValue = 0xe8d4a51000;
|
|
1134
1130
|
const K = 1e3;
|
|
1135
|
-
const maxFps = 240;
|
|
1136
|
-
const emptyString = "";
|
|
1137
|
-
const cssVarPrefix = "var(";
|
|
1138
1131
|
const shortTransforms = /* @__PURE__ */ (() => {
|
|
1139
1132
|
const map = /* @__PURE__ */ new Map();
|
|
1140
1133
|
map.set("x", "translateX");
|
|
@@ -1178,7 +1171,6 @@ const unitsExecRgx = /^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i;
|
|
|
1178
1171
|
const lowerCaseRgx = /([a-z])([A-Z])/g;
|
|
1179
1172
|
const transformsExecRgx = /(\w+)(\([^)]+\)+)/g;
|
|
1180
1173
|
const cssVariableMatchRgx = /var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/;
|
|
1181
|
-
|
|
1182
1174
|
//#endregion
|
|
1183
1175
|
//#region node_modules/animejs/dist/modules/core/globals.js
|
|
1184
1176
|
/**
|
|
@@ -1203,7 +1195,7 @@ const defaults = {
|
|
|
1203
1195
|
keyframes: null,
|
|
1204
1196
|
playbackEase: null,
|
|
1205
1197
|
playbackRate: 1,
|
|
1206
|
-
frameRate:
|
|
1198
|
+
frameRate: 240,
|
|
1207
1199
|
loop: 0,
|
|
1208
1200
|
reversed: false,
|
|
1209
1201
|
alternate: false,
|
|
@@ -1242,7 +1234,6 @@ if (isBrowser) {
|
|
|
1242
1234
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
1243
1235
|
win.AnimeJS.push(globalVersions);
|
|
1244
1236
|
}
|
|
1245
|
-
|
|
1246
1237
|
//#endregion
|
|
1247
1238
|
//#region node_modules/animejs/dist/modules/core/helpers.js
|
|
1248
1239
|
/**
|
|
@@ -1381,7 +1372,7 @@ const clampInfinity = (v) => v === Infinity ? maxValue : v === -Infinity ? -maxV
|
|
|
1381
1372
|
* @param {Number} v - Time value to normalize
|
|
1382
1373
|
* @return {Number}
|
|
1383
1374
|
*/
|
|
1384
|
-
const normalizeTime = (v) => v <=
|
|
1375
|
+
const normalizeTime = (v) => v <= 1e-11 ? minValue : clampInfinity(round$1(v, 11));
|
|
1385
1376
|
/**
|
|
1386
1377
|
* @template T
|
|
1387
1378
|
* @param {T[]} a
|
|
@@ -1456,7 +1447,6 @@ const addChild = (parent, child, sortMethod, prevProp = "_prev", nextProp = "_ne
|
|
|
1456
1447
|
child[prevProp] = prev;
|
|
1457
1448
|
child[nextProp] = next;
|
|
1458
1449
|
};
|
|
1459
|
-
|
|
1460
1450
|
//#endregion
|
|
1461
1451
|
//#region node_modules/animejs/dist/modules/core/targets.js
|
|
1462
1452
|
/**
|
|
@@ -1569,7 +1559,6 @@ function registerTargets(targets) {
|
|
|
1569
1559
|
}
|
|
1570
1560
|
return parsedTargetsArray;
|
|
1571
1561
|
}
|
|
1572
|
-
|
|
1573
1562
|
//#endregion
|
|
1574
1563
|
//#region node_modules/animejs/dist/modules/core/transforms.js
|
|
1575
1564
|
/**
|
|
@@ -1607,7 +1596,6 @@ const parseInlineTransforms = (target, propName, animationInlineStyles) => {
|
|
|
1607
1596
|
}
|
|
1608
1597
|
return inlineTransforms && !isUnd(inlinedStylesPropertyValue) ? inlinedStylesPropertyValue : stringStartsWith(propName, "scale") ? "1" : stringStartsWith(propName, "rotate") || stringStartsWith(propName, "skew") ? "0deg" : "0px";
|
|
1609
1598
|
};
|
|
1610
|
-
|
|
1611
1599
|
//#endregion
|
|
1612
1600
|
//#region node_modules/animejs/dist/modules/core/colors.js
|
|
1613
1601
|
/**
|
|
@@ -1702,7 +1690,6 @@ const convertColorStringValuesToRgbaArray = (colorString) => {
|
|
|
1702
1690
|
1
|
|
1703
1691
|
];
|
|
1704
1692
|
};
|
|
1705
|
-
|
|
1706
1693
|
//#endregion
|
|
1707
1694
|
//#region node_modules/animejs/dist/modules/core/values.js
|
|
1708
1695
|
/**
|
|
@@ -1743,12 +1730,12 @@ const getFunctionValue = (value, target, index, total, store) => {
|
|
|
1743
1730
|
const computed = value(target, index, total);
|
|
1744
1731
|
return !isNaN(+computed) ? +computed : computed || 0;
|
|
1745
1732
|
};
|
|
1746
|
-
else if (isStr(value) && stringStartsWith(value,
|
|
1733
|
+
else if (isStr(value) && stringStartsWith(value, "var(")) func = () => {
|
|
1747
1734
|
const match = value.match(cssVariableMatchRgx);
|
|
1748
1735
|
const cssVarName = match[1];
|
|
1749
1736
|
const fallbackValue = match[2];
|
|
1750
1737
|
let computed = getComputedStyle(target)?.getPropertyValue(cssVarName);
|
|
1751
|
-
if ((!computed || computed.trim() ===
|
|
1738
|
+
if ((!computed || computed.trim() === "") && fallbackValue) computed = fallbackValue.trim();
|
|
1752
1739
|
return computed || 0;
|
|
1753
1740
|
};
|
|
1754
1741
|
else return value;
|
|
@@ -1867,7 +1854,6 @@ const decomposeTweenValue = (tween, targetObject) => {
|
|
|
1867
1854
|
return targetObject;
|
|
1868
1855
|
};
|
|
1869
1856
|
const decomposedOriginalValue = createDecomposedValueTargetObject();
|
|
1870
|
-
|
|
1871
1857
|
//#endregion
|
|
1872
1858
|
//#region node_modules/animejs/dist/modules/core/styles.js
|
|
1873
1859
|
/**
|
|
@@ -1926,28 +1912,27 @@ const cleanInlineStyles = (renderable) => {
|
|
|
1926
1912
|
if (tweenTarget[isDomSymbol]) {
|
|
1927
1913
|
const targetStyle = tweenTarget.style;
|
|
1928
1914
|
const originalInlinedValue = tween._inlineValue;
|
|
1929
|
-
const tweenHadNoInlineValue = isNil(originalInlinedValue) || originalInlinedValue ===
|
|
1915
|
+
const tweenHadNoInlineValue = isNil(originalInlinedValue) || originalInlinedValue === "";
|
|
1930
1916
|
if (tween._tweenType === tweenTypes.TRANSFORM) {
|
|
1931
1917
|
const cachedTransforms = tweenTarget[transformsSymbol];
|
|
1932
1918
|
if (tweenHadNoInlineValue) delete cachedTransforms[tweenProperty];
|
|
1933
1919
|
else cachedTransforms[tweenProperty] = originalInlinedValue;
|
|
1934
1920
|
if (tween._renderTransforms) if (!Object.keys(cachedTransforms).length) targetStyle.removeProperty("transform");
|
|
1935
1921
|
else {
|
|
1936
|
-
let str =
|
|
1922
|
+
let str = "";
|
|
1937
1923
|
for (let key in cachedTransforms) str += transformsFragmentStrings[key] + cachedTransforms[key] + ") ";
|
|
1938
1924
|
targetStyle.transform = str;
|
|
1939
1925
|
}
|
|
1940
1926
|
} else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase(tweenProperty));
|
|
1941
1927
|
else targetStyle[tweenProperty] = originalInlinedValue;
|
|
1942
1928
|
if (animation._tail === tween) animation.targets.forEach((t) => {
|
|
1943
|
-
if (t.getAttribute && t.getAttribute("style") ===
|
|
1929
|
+
if (t.getAttribute && t.getAttribute("style") === "") t.removeAttribute("style");
|
|
1944
1930
|
});
|
|
1945
1931
|
}
|
|
1946
1932
|
});
|
|
1947
1933
|
}
|
|
1948
1934
|
return renderable;
|
|
1949
1935
|
};
|
|
1950
|
-
|
|
1951
1936
|
//#endregion
|
|
1952
1937
|
//#region node_modules/animejs/dist/modules/core/units.js
|
|
1953
1938
|
/**
|
|
@@ -2006,7 +1991,6 @@ const convertValueUnit = (el, decomposedValue, unit, force = false) => {
|
|
|
2006
1991
|
decomposedValue.u = unit;
|
|
2007
1992
|
return decomposedValue;
|
|
2008
1993
|
};
|
|
2009
|
-
|
|
2010
1994
|
//#endregion
|
|
2011
1995
|
//#region node_modules/animejs/dist/modules/easings/none.js
|
|
2012
1996
|
/**
|
|
@@ -2022,7 +2006,6 @@ const convertValueUnit = (el, decomposedValue, unit, force = false) => {
|
|
|
2022
2006
|
*/
|
|
2023
2007
|
/** @type {EasingFunction} */
|
|
2024
2008
|
const none = (t) => t;
|
|
2025
|
-
|
|
2026
2009
|
//#endregion
|
|
2027
2010
|
//#region node_modules/animejs/dist/modules/easings/eases/parser.js
|
|
2028
2011
|
/**
|
|
@@ -2063,7 +2046,7 @@ const halfPI = PI / 2;
|
|
|
2063
2046
|
const doublePI = PI * 2;
|
|
2064
2047
|
/** @type {Record<String, EasingFunctionWithParams|EasingFunction>} */
|
|
2065
2048
|
const easeInFunctions = {
|
|
2066
|
-
[
|
|
2049
|
+
[""]: easeInPower,
|
|
2067
2050
|
Quad: easeInPower(2),
|
|
2068
2051
|
Cubic: easeInPower(3),
|
|
2069
2052
|
Quart: easeInPower(4),
|
|
@@ -2142,7 +2125,7 @@ const eases = /* @__PURE__ */ (() => {
|
|
|
2142
2125
|
for (let type in easeTypes) for (let name in easeInFunctions) {
|
|
2143
2126
|
const easeIn = easeInFunctions[name];
|
|
2144
2127
|
const easeType = easeTypes[type];
|
|
2145
|
-
list[type + name] = name ===
|
|
2128
|
+
list[type + name] = name === "" || name === "Back" || name === "Elastic" ? (a, b) => easeType(
|
|
2146
2129
|
/** @type {EasingFunctionWithParams} */
|
|
2147
2130
|
easeIn(a, b)
|
|
2148
2131
|
) : easeType(easeIn);
|
|
@@ -2188,7 +2171,6 @@ const parseEase = (ease) => {
|
|
|
2188
2171
|
}
|
|
2189
2172
|
return isFnc(ease) ? ease : isStr(ease) ? parseEaseString(ease) : none;
|
|
2190
2173
|
};
|
|
2191
|
-
|
|
2192
2174
|
//#endregion
|
|
2193
2175
|
//#region node_modules/animejs/dist/modules/core/render.js
|
|
2194
2176
|
/**
|
|
@@ -2354,7 +2336,7 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
|
|
|
2354
2336
|
} else tween._value = value;
|
|
2355
2337
|
}
|
|
2356
2338
|
if (tweenTransformsNeedUpdate && tween._renderTransforms) {
|
|
2357
|
-
let str =
|
|
2339
|
+
let str = "";
|
|
2358
2340
|
for (let key in tweenTargetTransformsProperties) str += `${transformsFragmentStrings[key]}${tweenTargetTransformsProperties[key]}) `;
|
|
2359
2341
|
tweenStyle.transform = str;
|
|
2360
2342
|
tweenTransformsNeedUpdate = 0;
|
|
@@ -2367,7 +2349,7 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
|
|
|
2367
2349
|
if (!muteCallbacks && isCurrentTimeAboveZero) tickable.onUpdate(tickable);
|
|
2368
2350
|
}
|
|
2369
2351
|
if (parent && isSetter) {
|
|
2370
|
-
if (!muteCallbacks && (parent.began && !isRunningBackwards && tickableAbsoluteTime > 0 && !completed || isRunningBackwards && tickableAbsoluteTime <=
|
|
2352
|
+
if (!muteCallbacks && (parent.began && !isRunningBackwards && tickableAbsoluteTime > 0 && !completed || isRunningBackwards && tickableAbsoluteTime <= 1e-11 && completed)) {
|
|
2371
2353
|
tickable.onComplete(tickable);
|
|
2372
2354
|
tickable.completed = !isRunningBackwards;
|
|
2373
2355
|
}
|
|
@@ -2415,7 +2397,7 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
|
|
|
2415
2397
|
const childDuration = child.duration;
|
|
2416
2398
|
const childStartTime = child._offset + child._delay;
|
|
2417
2399
|
const childEndTime = childStartTime + childDuration;
|
|
2418
|
-
if (!muteCallbacks && childDuration <=
|
|
2400
|
+
if (!muteCallbacks && childDuration <= 1e-11 && (!childStartTime || childEndTime === tlIterationDuration)) child.onComplete(child);
|
|
2419
2401
|
}
|
|
2420
2402
|
});
|
|
2421
2403
|
if (!muteCallbacks) tl.onLoop(tl);
|
|
@@ -2439,7 +2421,6 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
|
|
|
2439
2421
|
}
|
|
2440
2422
|
}
|
|
2441
2423
|
};
|
|
2442
|
-
|
|
2443
2424
|
//#endregion
|
|
2444
2425
|
//#region node_modules/animejs/dist/modules/core/clock.js
|
|
2445
2426
|
/**
|
|
@@ -2470,9 +2451,9 @@ var Clock = class {
|
|
|
2470
2451
|
/** @type {Number} */
|
|
2471
2452
|
this._scheduledTime = 0;
|
|
2472
2453
|
/** @type {Number} */
|
|
2473
|
-
this._frameDuration = K /
|
|
2454
|
+
this._frameDuration = K / 240;
|
|
2474
2455
|
/** @type {Number} */
|
|
2475
|
-
this._fps =
|
|
2456
|
+
this._fps = 240;
|
|
2476
2457
|
/** @type {Number} */
|
|
2477
2458
|
this._speed = 1;
|
|
2478
2459
|
/** @type {Boolean} */
|
|
@@ -2488,7 +2469,7 @@ var Clock = class {
|
|
|
2488
2469
|
set fps(frameRate) {
|
|
2489
2470
|
const previousFrameDuration = this._frameDuration;
|
|
2490
2471
|
const fr = +frameRate;
|
|
2491
|
-
const fps = fr <
|
|
2472
|
+
const fps = fr < 1e-11 ? minValue : fr;
|
|
2492
2473
|
const frameDuration = K / fps;
|
|
2493
2474
|
if (fps > defaults.frameRate) defaults.frameRate = fps;
|
|
2494
2475
|
this._fps = fps;
|
|
@@ -2500,7 +2481,7 @@ var Clock = class {
|
|
|
2500
2481
|
}
|
|
2501
2482
|
set speed(playbackRate) {
|
|
2502
2483
|
const pbr = +playbackRate;
|
|
2503
|
-
this._speed = pbr <
|
|
2484
|
+
this._speed = pbr < 1e-11 ? minValue : pbr;
|
|
2504
2485
|
}
|
|
2505
2486
|
/**
|
|
2506
2487
|
* @param {Number} time
|
|
@@ -2526,7 +2507,6 @@ var Clock = class {
|
|
|
2526
2507
|
return delta;
|
|
2527
2508
|
}
|
|
2528
2509
|
};
|
|
2529
|
-
|
|
2530
2510
|
//#endregion
|
|
2531
2511
|
//#region node_modules/animejs/dist/modules/animation/additive.js
|
|
2532
2512
|
/**
|
|
@@ -2594,7 +2574,6 @@ const addAdditiveAnimation = (lookups) => {
|
|
|
2594
2574
|
}
|
|
2595
2575
|
return animation;
|
|
2596
2576
|
};
|
|
2597
|
-
|
|
2598
2577
|
//#endregion
|
|
2599
2578
|
//#region node_modules/animejs/dist/modules/engine/engine.js
|
|
2600
2579
|
/**
|
|
@@ -2718,7 +2697,6 @@ const killEngine = () => {
|
|
|
2718
2697
|
engine.reqId = 0;
|
|
2719
2698
|
return engine;
|
|
2720
2699
|
};
|
|
2721
|
-
|
|
2722
2700
|
//#endregion
|
|
2723
2701
|
//#region node_modules/animejs/dist/modules/animation/composition.js
|
|
2724
2702
|
/**
|
|
@@ -2810,7 +2788,7 @@ const composeTween = (tween, siblings) => {
|
|
|
2810
2788
|
prevSibling._changeDuration = updatedPrevChangeDuration;
|
|
2811
2789
|
prevSibling._currentTime = updatedPrevChangeDuration;
|
|
2812
2790
|
prevSibling._isOverlapped = 1;
|
|
2813
|
-
if (updatedPrevChangeDuration <
|
|
2791
|
+
if (updatedPrevChangeDuration < 1e-11) overrideTween(prevSibling);
|
|
2814
2792
|
}
|
|
2815
2793
|
let pausePrevParentAnimation = true;
|
|
2816
2794
|
forEachChildren(prevParent, (t) => {
|
|
@@ -2955,7 +2933,6 @@ const removeTargetsFromRenderable = (targetsArray, renderable, propertyName) =>
|
|
|
2955
2933
|
if (parent.cancel) /** @type {Renderable} */ parent.cancel();
|
|
2956
2934
|
}
|
|
2957
2935
|
};
|
|
2958
|
-
|
|
2959
2936
|
//#endregion
|
|
2960
2937
|
//#region node_modules/animejs/dist/modules/timer/timer.js
|
|
2961
2938
|
/**
|
|
@@ -3045,7 +3022,7 @@ var Timer = class extends Clock {
|
|
|
3045
3022
|
this.id = !isUnd(id) ? id : timerId;
|
|
3046
3023
|
/** @type {Timeline} */
|
|
3047
3024
|
this.parent = parent;
|
|
3048
|
-
this.duration = clampInfinity((timerDuration + timerLoopDelay) * timerIterationCount - timerLoopDelay) ||
|
|
3025
|
+
this.duration = clampInfinity((timerDuration + timerLoopDelay) * timerIterationCount - timerLoopDelay) || 1e-11;
|
|
3049
3026
|
/** @type {Boolean} */
|
|
3050
3027
|
this.backwards = false;
|
|
3051
3028
|
/** @type {Boolean} */
|
|
@@ -3209,7 +3186,7 @@ var Timer = class extends Clock {
|
|
|
3209
3186
|
resume() {
|
|
3210
3187
|
if (!this.paused) return this;
|
|
3211
3188
|
this.paused = false;
|
|
3212
|
-
if (this.duration <=
|
|
3189
|
+
if (this.duration <= 1e-11 && !this._hasChildren) tick(this, minValue, 0, 0, tickModes.FORCE);
|
|
3213
3190
|
else {
|
|
3214
3191
|
if (!this._running) {
|
|
3215
3192
|
addChild(engine, this);
|
|
@@ -3326,7 +3303,6 @@ var Timer = class extends Clock {
|
|
|
3326
3303
|
});
|
|
3327
3304
|
}
|
|
3328
3305
|
};
|
|
3329
|
-
|
|
3330
3306
|
//#endregion
|
|
3331
3307
|
//#region node_modules/animejs/dist/modules/animation/animation.js
|
|
3332
3308
|
/**
|
|
@@ -3471,7 +3447,7 @@ var JSAnimation = class extends Timer {
|
|
|
3471
3447
|
const tDuration = hasSpring ? animEase.settlingDuration : setValue(duration, animDefaults.duration);
|
|
3472
3448
|
const tDelay = setValue(delay, animDefaults.delay);
|
|
3473
3449
|
const tModifier = modifier || animDefaults.modifier;
|
|
3474
|
-
const tComposition = isUnd(composition) && targetsLength >=
|
|
3450
|
+
const tComposition = isUnd(composition) && targetsLength >= 1e3 ? compositionTypes.none : !isUnd(composition) ? composition : animDefaults.composition;
|
|
3475
3451
|
const absoluteOffsetTime = this._offset + (parent ? parent._offset : 0);
|
|
3476
3452
|
if (hasSpring) /** @type {Spring} */ animEase.parent = this;
|
|
3477
3453
|
let iterationDuration = NaN;
|
|
@@ -3630,7 +3606,7 @@ var JSAnimation = class extends Timer {
|
|
|
3630
3606
|
shortestValue.d = longestValue.d.map((_, i) => isUnd(shortestValue.d[i]) ? 0 : shortestValue.d[i]);
|
|
3631
3607
|
shortestValue.s = cloneArray(longestValue.s);
|
|
3632
3608
|
}
|
|
3633
|
-
const tweenUpdateDuration = round$1(+tweenDuration ||
|
|
3609
|
+
const tweenUpdateDuration = round$1(+tweenDuration || 1e-11, 12);
|
|
3634
3610
|
let inlineValue = inlineStylesStore[propName];
|
|
3635
3611
|
if (!isNil(inlineValue)) inlineStylesStore[propName] = null;
|
|
3636
3612
|
/** @type {Tween} */
|
|
@@ -3716,7 +3692,7 @@ var JSAnimation = class extends Timer {
|
|
|
3716
3692
|
/** @type {String|Number} */
|
|
3717
3693
|
this.id = !isUnd(id) ? id : JSAnimationId;
|
|
3718
3694
|
/** @type {Number} */
|
|
3719
|
-
this.duration = iterationDuration ===
|
|
3695
|
+
this.duration = iterationDuration === 1e-11 ? minValue : clampInfinity((iterationDuration + this._loopDelay) * this.iterationCount - this._loopDelay) || 1e-11;
|
|
3720
3696
|
/** @type {Callback<this>} */
|
|
3721
3697
|
this.onRender = onRender || animDefaults.onRender;
|
|
3722
3698
|
/** @type {EasingFunction} */
|
|
@@ -3770,7 +3746,7 @@ var JSAnimation = class extends Timer {
|
|
|
3770
3746
|
}
|
|
3771
3747
|
}
|
|
3772
3748
|
});
|
|
3773
|
-
if (this.duration ===
|
|
3749
|
+
if (this.duration === 1e-11) this.restart();
|
|
3774
3750
|
return this;
|
|
3775
3751
|
}
|
|
3776
3752
|
/**
|
|
@@ -3798,7 +3774,6 @@ var JSAnimation = class extends Timer {
|
|
|
3798
3774
|
* @return {JSAnimation}
|
|
3799
3775
|
*/
|
|
3800
3776
|
const animate = (targets, parameters) => new JSAnimation(targets, parameters, null, 0, false).init();
|
|
3801
|
-
|
|
3802
3777
|
//#endregion
|
|
3803
3778
|
//#region node_modules/animejs/dist/modules/svg/helpers.js
|
|
3804
3779
|
/**
|
|
@@ -3821,7 +3796,6 @@ const getPath = (path) => {
|
|
|
3821
3796
|
if (!$parsedSvg || !isSvg($parsedSvg)) return console.warn(`${path} is not a valid SVGGeometryElement`);
|
|
3822
3797
|
return $parsedSvg;
|
|
3823
3798
|
};
|
|
3824
|
-
|
|
3825
3799
|
//#endregion
|
|
3826
3800
|
//#region node_modules/animejs/dist/modules/svg/morphto.js
|
|
3827
3801
|
/**
|
|
@@ -3870,15 +3844,13 @@ const morphTo = (path2, precision = .33) => ($path1) => {
|
|
|
3870
3844
|
$path1[morphPointsSymbol] = v2;
|
|
3871
3845
|
return [v1, v2];
|
|
3872
3846
|
};
|
|
3873
|
-
|
|
3874
3847
|
//#endregion
|
|
3875
3848
|
//#region src/utils/get-date.ts
|
|
3876
3849
|
/** The current date as a Date object */
|
|
3877
3850
|
const d = /* @__PURE__ */ new Date();
|
|
3878
3851
|
/** The current minute of the current hour */
|
|
3879
3852
|
const minutes = d.getMinutes();
|
|
3880
|
-
|
|
3881
|
-
const year = d.getFullYear();
|
|
3853
|
+
d.getFullYear();
|
|
3882
3854
|
/** An array of the names of month in order */
|
|
3883
3855
|
const monthNamesList = [
|
|
3884
3856
|
"January",
|
|
@@ -3904,10 +3876,8 @@ const weekdayNamesList = [
|
|
|
3904
3876
|
"Friday",
|
|
3905
3877
|
"Saturday"
|
|
3906
3878
|
];
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
/** The name of the current day of the week */
|
|
3910
|
-
const currentWeekdayName = getWeekdayName();
|
|
3879
|
+
getMonthName();
|
|
3880
|
+
getWeekdayName();
|
|
3911
3881
|
/**
|
|
3912
3882
|
* ### Get Date
|
|
3913
3883
|
* - Returns the date with two digits
|
|
@@ -4000,13 +3970,11 @@ function getWeekdayName(weekday = d) {
|
|
|
4000
3970
|
if (typeof weekday === "number") return weekdayNamesList[weekday];
|
|
4001
3971
|
return weekdayNamesList[weekday.getDay()];
|
|
4002
3972
|
}
|
|
4003
|
-
|
|
4004
3973
|
//#endregion
|
|
4005
3974
|
//#region src/utils/math.ts
|
|
4006
3975
|
function easeOutExpo(time, start, end, duration) {
|
|
4007
3976
|
return time == duration ? start + end : end * (-Math.pow(2, -10 * time / duration) + 1) + start;
|
|
4008
3977
|
}
|
|
4009
|
-
|
|
4010
3978
|
//#endregion
|
|
4011
3979
|
//#region src/components/chevron-up-down-anime.tsx
|
|
4012
3980
|
function ChevronUpDownAnime({ className, isUp = false }) {
|
|
@@ -4049,7 +4017,6 @@ function ChevronUpDownAnime({ className, isUp = false }) {
|
|
|
4049
4017
|
})]
|
|
4050
4018
|
});
|
|
4051
4019
|
}
|
|
4052
|
-
|
|
4053
4020
|
//#endregion
|
|
4054
4021
|
//#region src/components/details.tsx
|
|
4055
4022
|
function DetailsSummary({ arrow = true, children, className, onClick, ...props }) {
|
|
@@ -4089,7 +4056,6 @@ function Details({ as = "div", className, ...props }) {
|
|
|
4089
4056
|
role: "details"
|
|
4090
4057
|
});
|
|
4091
4058
|
}
|
|
4092
|
-
|
|
4093
4059
|
//#endregion
|
|
4094
4060
|
//#region src/components/drop-down.tsx
|
|
4095
4061
|
function DropDownButton({ arrow = true, as, children, className, ...props }) {
|
|
@@ -4156,7 +4122,7 @@ function DropDownSection({ children, label, labelProps, separatorAbove, separato
|
|
|
4156
4122
|
separatorAbove && /* @__PURE__ */ jsx(DropDownSeparator, {}),
|
|
4157
4123
|
label && /* @__PURE__ */ jsx(MenuHeading, {
|
|
4158
4124
|
...restLabelProps,
|
|
4159
|
-
className: (headingBag) => twMerge("text-
|
|
4125
|
+
className: (headingBag) => twMerge("text-larger font-bold text-current/80", typeof labelClassName === "function" ? labelClassName(headingBag) : labelClassName),
|
|
4160
4126
|
children: label
|
|
4161
4127
|
}),
|
|
4162
4128
|
typeof children === "function" ? children(sectionBag) : children,
|
|
@@ -4171,12 +4137,21 @@ function DropDownSeparator({ as, className, ...props }) {
|
|
|
4171
4137
|
className: (bag) => twMerge("my-4 block h-px rounded-full bg-neutral-950/20", typeof className === "function" ? className(bag) : className)
|
|
4172
4138
|
});
|
|
4173
4139
|
}
|
|
4174
|
-
function DropDown(props) {
|
|
4175
|
-
return /* @__PURE__ */ jsx(Menu, {
|
|
4140
|
+
function DropDown({ as, ...props }) {
|
|
4141
|
+
return /* @__PURE__ */ jsx(Menu, {
|
|
4142
|
+
...props,
|
|
4143
|
+
as
|
|
4144
|
+
});
|
|
4176
4145
|
}
|
|
4177
|
-
|
|
4178
4146
|
//#endregion
|
|
4179
4147
|
//#region src/components/fieldset.tsx
|
|
4148
|
+
/**
|
|
4149
|
+
* # Fieldset
|
|
4150
|
+
*
|
|
4151
|
+
* @prop legend - The legend text to display above the fieldset.
|
|
4152
|
+
* @prop legendProps - Additional props to pass to the legend component.
|
|
4153
|
+
* @prop className - GOTCHA: The default className includes `contents`, to effectively remove it from the layout. Be sure to change the display style if you want to modify any other styles.
|
|
4154
|
+
*/
|
|
4180
4155
|
function Fieldset({ children, className, legend, legendProps, name, ...props }) {
|
|
4181
4156
|
const { className: legendClassName, ...restLegendProps } = legendProps || {};
|
|
4182
4157
|
name = legend || name;
|
|
@@ -4191,7 +4166,6 @@ function Fieldset({ children, className, legend, legendProps, name, ...props })
|
|
|
4191
4166
|
}), typeof children === "function" ? children(bag) : children] })
|
|
4192
4167
|
});
|
|
4193
4168
|
}
|
|
4194
|
-
|
|
4195
4169
|
//#endregion
|
|
4196
4170
|
//#region src/components/form.tsx
|
|
4197
4171
|
function Form({ children, className, ...props }) {
|
|
@@ -4201,7 +4175,6 @@ function Form({ children, className, ...props }) {
|
|
|
4201
4175
|
children
|
|
4202
4176
|
});
|
|
4203
4177
|
}
|
|
4204
|
-
|
|
4205
4178
|
//#endregion
|
|
4206
4179
|
//#region src/components/ghost.tsx
|
|
4207
4180
|
function Ghost({ children, className, ...props }) {
|
|
@@ -4211,7 +4184,6 @@ function Ghost({ children, className, ...props }) {
|
|
|
4211
4184
|
children: children || /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })
|
|
4212
4185
|
});
|
|
4213
4186
|
}
|
|
4214
|
-
|
|
4215
4187
|
//#endregion
|
|
4216
4188
|
//#region src/components/heading.tsx
|
|
4217
4189
|
function getTextFromChildren(children) {
|
|
@@ -4249,7 +4221,6 @@ function Heading({ as = "h2", children, customize, className, id, ref, ...props
|
|
|
4249
4221
|
children
|
|
4250
4222
|
});
|
|
4251
4223
|
}
|
|
4252
|
-
|
|
4253
4224
|
//#endregion
|
|
4254
4225
|
//#region src/symbols/chevron.forward.tsx
|
|
4255
4226
|
function ChevronForward({ weight = "regular", ...props }) {
|
|
@@ -4301,7 +4272,6 @@ function ChevronForward({ weight = "regular", ...props }) {
|
|
|
4301
4272
|
});
|
|
4302
4273
|
}
|
|
4303
4274
|
}
|
|
4304
|
-
|
|
4305
4275
|
//#endregion
|
|
4306
4276
|
//#region node_modules/animejs/dist/modules/animatable/animatable.js
|
|
4307
4277
|
/**
|
|
@@ -4420,7 +4390,6 @@ var Animatable = class {
|
|
|
4420
4390
|
return this;
|
|
4421
4391
|
}
|
|
4422
4392
|
};
|
|
4423
|
-
|
|
4424
4393
|
//#endregion
|
|
4425
4394
|
//#region node_modules/animejs/dist/modules/utils/number.js
|
|
4426
4395
|
/**
|
|
@@ -4433,7 +4402,6 @@ var Animatable = class {
|
|
|
4433
4402
|
* @return {Number}
|
|
4434
4403
|
*/
|
|
4435
4404
|
const mapRange = (value, inLow, inHigh, outLow, outHigh) => outLow + (value - inLow) / (inHigh - inLow) * (outHigh - outLow);
|
|
4436
|
-
|
|
4437
4405
|
//#endregion
|
|
4438
4406
|
//#region node_modules/animejs/dist/modules/easings/spring/index.js
|
|
4439
4407
|
/**
|
|
@@ -4604,7 +4572,6 @@ var Spring = class {
|
|
|
4604
4572
|
* @returns {Spring}
|
|
4605
4573
|
*/
|
|
4606
4574
|
const spring = (parameters) => new Spring(parameters);
|
|
4607
|
-
|
|
4608
4575
|
//#endregion
|
|
4609
4576
|
//#region node_modules/animejs/dist/modules/utils/target.js
|
|
4610
4577
|
/**
|
|
@@ -4683,7 +4650,6 @@ const set = (targets, parameters) => {
|
|
|
4683
4650
|
parameters.composition = setValue(parameters.composition, compositionTypes.none);
|
|
4684
4651
|
return new JSAnimation(targets, parameters, null, 0, true).resume();
|
|
4685
4652
|
};
|
|
4686
|
-
|
|
4687
4653
|
//#endregion
|
|
4688
4654
|
//#region node_modules/animejs/dist/modules/draggable/draggable.js
|
|
4689
4655
|
/**
|
|
@@ -5867,7 +5833,6 @@ var Draggable = class {
|
|
|
5867
5833
|
* @return {Draggable}
|
|
5868
5834
|
*/
|
|
5869
5835
|
const createDraggable = (target, parameters) => new Draggable(target, parameters);
|
|
5870
|
-
|
|
5871
5836
|
//#endregion
|
|
5872
5837
|
//#region src/components/human-verification.tsx
|
|
5873
5838
|
function checkHashSecret([number, letter]) {
|
|
@@ -6116,7 +6081,6 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6116
6081
|
]
|
|
6117
6082
|
});
|
|
6118
6083
|
}
|
|
6119
|
-
|
|
6120
6084
|
//#endregion
|
|
6121
6085
|
//#region src/components/iframe.tsx
|
|
6122
6086
|
const allAllowProperties = [
|
|
@@ -6185,7 +6149,6 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
|
|
|
6185
6149
|
sandbox: sandbox?.join(" ")
|
|
6186
6150
|
});
|
|
6187
6151
|
}
|
|
6188
|
-
|
|
6189
6152
|
//#endregion
|
|
6190
6153
|
//#region src/components/input.tsx
|
|
6191
6154
|
/**
|
|
@@ -6209,7 +6172,7 @@ function Input({ children, className, description, descriptionProps: { className
|
|
|
6209
6172
|
children: [
|
|
6210
6173
|
label && /* @__PURE__ */ jsx(Label, {
|
|
6211
6174
|
...labelProps,
|
|
6212
|
-
className: (bag) => twMerge("text-sm font-medium", required ?
|
|
6175
|
+
className: (bag) => twMerge("text-sm font-medium", required ? `after:text-red-700 after:content-['_*']` : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6213
6176
|
children: label
|
|
6214
6177
|
}),
|
|
6215
6178
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
|
|
@@ -6219,13 +6182,12 @@ function Input({ children, className, description, descriptionProps: { className
|
|
|
6219
6182
|
}), children] }),
|
|
6220
6183
|
description && /* @__PURE__ */ jsx(Description, {
|
|
6221
6184
|
...descriptionProps,
|
|
6222
|
-
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6185
|
+
className: (bag) => twMerge("max-w-none text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6223
6186
|
children: description
|
|
6224
6187
|
})
|
|
6225
6188
|
]
|
|
6226
6189
|
});
|
|
6227
6190
|
}
|
|
6228
|
-
|
|
6229
6191
|
//#endregion
|
|
6230
6192
|
//#region src/symbols/xmark.tsx
|
|
6231
6193
|
function Xmark({ weight = "regular", ...props }) {
|
|
@@ -6277,7 +6239,6 @@ function Xmark({ weight = "regular", ...props }) {
|
|
|
6277
6239
|
});
|
|
6278
6240
|
}
|
|
6279
6241
|
}
|
|
6280
|
-
|
|
6281
6242
|
//#endregion
|
|
6282
6243
|
//#region src/hooks/create-fast-context.tsx
|
|
6283
6244
|
function createFastContext(defaultInitialState) {
|
|
@@ -6319,12 +6280,7 @@ function createFastContext(defaultInitialState) {
|
|
|
6319
6280
|
useStore
|
|
6320
6281
|
};
|
|
6321
6282
|
}
|
|
6322
|
-
|
|
6323
|
-
//#endregion
|
|
6324
|
-
//#region src/hooks/use-form-status.tsx
|
|
6325
|
-
const DEFAULT_STATUS = "incomplete";
|
|
6326
|
-
const { Provider, useStore } = createFastContext(DEFAULT_STATUS);
|
|
6327
|
-
|
|
6283
|
+
const { Provider, useStore } = createFastContext("incomplete");
|
|
6328
6284
|
//#endregion
|
|
6329
6285
|
//#region src/components/modal.tsx
|
|
6330
6286
|
const { Provider: ModalControlsProvider, useStore: useModalControls } = createFastContext({
|
|
@@ -6351,8 +6307,12 @@ function ModalTrigger({ as, onClick, ...props }) {
|
|
|
6351
6307
|
onClick: handleClick
|
|
6352
6308
|
});
|
|
6353
6309
|
}
|
|
6354
|
-
function ModalTitle(props) {
|
|
6355
|
-
return /* @__PURE__ */ jsx(DialogTitle, {
|
|
6310
|
+
function ModalTitle({ as, ref, ...props }) {
|
|
6311
|
+
return /* @__PURE__ */ jsx(DialogTitle, {
|
|
6312
|
+
...props,
|
|
6313
|
+
as,
|
|
6314
|
+
ref
|
|
6315
|
+
});
|
|
6356
6316
|
}
|
|
6357
6317
|
function ModalDialog(props) {
|
|
6358
6318
|
const [modalControls] = useModalControls((store) => store);
|
|
@@ -6372,7 +6332,7 @@ function ModalDialog(props) {
|
|
|
6372
6332
|
className: ["isolate z-50", place === "bottom" && "after:fixed after:inset-x-0 after:bottom-0 after:-z-10 after:h-16 after:bg-neutral-50 sm:after:hidden"].join(" "),
|
|
6373
6333
|
children: [/* @__PURE__ */ jsx(DialogBackdrop, {
|
|
6374
6334
|
transition: true,
|
|
6375
|
-
className: ["ease-exponential fixed inset-0 cursor-pointer transition-[
|
|
6335
|
+
className: ["ease-exponential fixed inset-0 cursor-pointer transition-[opacity_background-color_backdrop-filter_-webkit-backdrop-filter] delay-100 duration-750 data-closed:opacity-0", readyToClose ? "bg-neutral-50/5 backdrop-blur-[1px] dark:bg-neutral-950/5" : "bg-neutral-50/25 backdrop-blur-sm dark:bg-neutral-950/25"].join(" "),
|
|
6376
6336
|
children: /* @__PURE__ */ jsx(Button, {
|
|
6377
6337
|
padding: "none",
|
|
6378
6338
|
rounded: "full",
|
|
@@ -6393,7 +6353,7 @@ function ModalDialog(props) {
|
|
|
6393
6353
|
transition: true,
|
|
6394
6354
|
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),
|
|
6395
6355
|
children: [/* @__PURE__ */ jsx("button", {
|
|
6396
|
-
className: ["after:ease-exponential absolute inset-x-0 top-0 z-10 flex h-6 cursor-grab items-center justify-center after:h-1 after:w-8 after:rounded-full after:transition-[
|
|
6356
|
+
className: ["after:ease-exponential absolute inset-x-0 top-0 z-10 flex h-6 cursor-grab items-center justify-center after:h-1 after:w-8 after:rounded-full after:transition-[transform_background-color] after:duration-500 active:cursor-grabbing", readyToClose ? "after:scale-x-200 after:scale-y-200 after:bg-blue-500" : "after:bg-neutral-500/50 active:after:scale-x-150 active:after:scale-y-125 active:after:bg-neutral-500 pointer-fine:hover:after:scale-x-125 pointer-fine:hover:after:bg-neutral-500/75 pointer-fine:active:after:scale-x-150 pointer-fine:active:after:bg-neutral-500"].join(" "),
|
|
6397
6357
|
onTouchStart: enableTouchClose,
|
|
6398
6358
|
onMouseDown: enableMouseClose,
|
|
6399
6359
|
type: "button",
|
|
@@ -6405,8 +6365,18 @@ function ModalDialog(props) {
|
|
|
6405
6365
|
})]
|
|
6406
6366
|
});
|
|
6407
6367
|
}
|
|
6408
|
-
function ModalClose({ as, ...props }) {
|
|
6409
|
-
|
|
6368
|
+
function ModalClose({ as, onClick, ...props }) {
|
|
6369
|
+
const ModalCloseElement = as || Button$1;
|
|
6370
|
+
const [modalControls] = useModalControls((store) => store);
|
|
6371
|
+
const { closeModal } = modalControls || { closeModal: () => {} };
|
|
6372
|
+
const handleClick = (e) => {
|
|
6373
|
+
onClick?.(e);
|
|
6374
|
+
if (!e.defaultPrevented) closeModal();
|
|
6375
|
+
};
|
|
6376
|
+
return /* @__PURE__ */ jsx(ModalCloseElement, {
|
|
6377
|
+
...props,
|
|
6378
|
+
onClick: handleClick
|
|
6379
|
+
});
|
|
6410
6380
|
}
|
|
6411
6381
|
function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
|
|
6412
6382
|
const [bodyElement, setBodyElement] = useState(null);
|
|
@@ -6516,7 +6486,6 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
|
|
|
6516
6486
|
function Modal(props) {
|
|
6517
6487
|
return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
|
|
6518
6488
|
}
|
|
6519
|
-
|
|
6520
6489
|
//#endregion
|
|
6521
6490
|
//#region src/symbols/chevron.up.chevron.down.tsx
|
|
6522
6491
|
function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
@@ -6568,7 +6537,6 @@ function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
|
6568
6537
|
});
|
|
6569
6538
|
}
|
|
6570
6539
|
}
|
|
6571
|
-
|
|
6572
6540
|
//#endregion
|
|
6573
6541
|
//#region src/components/select.tsx
|
|
6574
6542
|
/**
|
|
@@ -6594,7 +6562,7 @@ function SelectOption({ children, className, name, ...props }) {
|
|
|
6594
6562
|
className: "group/option contents",
|
|
6595
6563
|
...props,
|
|
6596
6564
|
children: (bag) => bag.selectedOption ? /* @__PURE__ */ jsx("span", {
|
|
6597
|
-
className:
|
|
6565
|
+
className: `mr-3 before:absolute before:-left-3 before:content-[',_']`,
|
|
6598
6566
|
children: name
|
|
6599
6567
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
6600
6568
|
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),
|
|
@@ -6644,7 +6612,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6644
6612
|
children: [
|
|
6645
6613
|
label && /* @__PURE__ */ jsx(Label, {
|
|
6646
6614
|
...labelProps,
|
|
6647
|
-
className: (bag) => twMerge("text-sm font-medium", required ?
|
|
6615
|
+
className: (bag) => twMerge("text-sm font-medium", required ? `after:text-red-700 after:content-['_*']` : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6648
6616
|
children: label
|
|
6649
6617
|
}),
|
|
6650
6618
|
/* @__PURE__ */ jsxs(Listbox, {
|
|
@@ -6660,7 +6628,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6660
6628
|
"aria-hidden": "true",
|
|
6661
6629
|
className: "sr-only top-0 left-1/2",
|
|
6662
6630
|
id: props.name + ":input:id" + uniqueId,
|
|
6663
|
-
name: props.name
|
|
6631
|
+
name: props.name,
|
|
6664
6632
|
onChange: () => {},
|
|
6665
6633
|
onInvalid: handleInvalid,
|
|
6666
6634
|
onFocus: refocus,
|
|
@@ -6681,7 +6649,7 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6681
6649
|
}), /* @__PURE__ */ jsx(ListboxOptions, {
|
|
6682
6650
|
...optionsProps,
|
|
6683
6651
|
anchor: anchor || "bottom start",
|
|
6684
|
-
className: (bag) => twMerge("ease-exponential corner-super-1.5 z-50 w-(--button-width) origin-top rounded-xl border border-neutral-500/50 bg-neutral-50/95 p-1 backdrop-blur-sm backdrop-brightness-110 transition-[
|
|
6652
|
+
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),
|
|
6685
6653
|
transition: transition || true,
|
|
6686
6654
|
children
|
|
6687
6655
|
})]
|
|
@@ -6694,7 +6662,6 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6694
6662
|
]
|
|
6695
6663
|
});
|
|
6696
6664
|
}
|
|
6697
|
-
|
|
6698
6665
|
//#endregion
|
|
6699
6666
|
//#region src/symbols/circle.fill.tsx
|
|
6700
6667
|
function CircleFill({ weight = "regular", ...props }) {
|
|
@@ -6746,7 +6713,6 @@ function CircleFill({ weight = "regular", ...props }) {
|
|
|
6746
6713
|
});
|
|
6747
6714
|
}
|
|
6748
6715
|
}
|
|
6749
|
-
|
|
6750
6716
|
//#endregion
|
|
6751
6717
|
//#region src/components/submit-button.tsx
|
|
6752
6718
|
/**
|
|
@@ -6822,7 +6788,7 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6822
6788
|
...dataFormState,
|
|
6823
6789
|
className: twMerge([
|
|
6824
6790
|
formStatusButtonClasses,
|
|
6825
|
-
"w-full text-white",
|
|
6791
|
+
"flex w-full items-center justify-center gap-2 text-white",
|
|
6826
6792
|
className
|
|
6827
6793
|
]),
|
|
6828
6794
|
customTheme: { themeColor: twMerge("data-error:[--theme-color:var(--color-red-500)] data-incomplete:[--theme-color:var(--color-neutral-500)] data-loading:[--theme-color:var(--color-yellow-500)] data-readonly:[--theme-color:var(--color-neutral-500)] data-ready:[--theme-color:var(--base-theme-color)] data-success:[--theme-color:var(--color-green-500)]", customTheme?.themeColor) },
|
|
@@ -6831,7 +6797,6 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6831
6797
|
children: buttonText
|
|
6832
6798
|
});
|
|
6833
6799
|
}
|
|
6834
|
-
|
|
6835
6800
|
//#endregion
|
|
6836
6801
|
//#region src/components/textarea.tsx
|
|
6837
6802
|
/**
|
|
@@ -6900,7 +6865,6 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6900
6865
|
]
|
|
6901
6866
|
});
|
|
6902
6867
|
}
|
|
6903
|
-
|
|
6904
6868
|
//#endregion
|
|
6905
6869
|
//#region src/components/time.tsx
|
|
6906
6870
|
/**
|
|
@@ -6913,45 +6877,48 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6913
6877
|
* @prop dateTime - Set the dateTime itself.
|
|
6914
6878
|
* @prop day - Include the day of the month in the display.
|
|
6915
6879
|
* @prop hours - Include the hours in the display.
|
|
6880
|
+
* @prop militaryTime - Use military time (24-hour clock) instead of AM/PM.
|
|
6916
6881
|
* @prop milliseconds - Include the milliseconds in the display.
|
|
6917
6882
|
* @prop minutes - Include the minutes in the display.
|
|
6918
6883
|
* @prop month - Include the month in the display.
|
|
6919
6884
|
* @prop seconds - Include the seconds in the display.
|
|
6920
6885
|
* @prop year - Include the year in the display.
|
|
6921
6886
|
*/
|
|
6922
|
-
function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }) {
|
|
6887
|
+
function Time({ children, dateObject, dateTime, day, hours, militaryTime, milliseconds, minutes, month, seconds, year, ref, ...props }) {
|
|
6923
6888
|
const [date, setDate] = useState(dateObject || void 0);
|
|
6924
6889
|
const getDateAndTime = () => {
|
|
6925
6890
|
if (dateTime) return dateTime;
|
|
6926
6891
|
if (!date) return "";
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6892
|
+
const currentYear = date.getFullYear(), currentMonth = getMonth(date), currentDay = getDate(date), currentHour = getHours(date), currentMinute = getMinutes(date), currentSecond = getSeconds(date), currentMillisecond = getMilliseconds(date);
|
|
6893
|
+
return [[
|
|
6894
|
+
currentYear,
|
|
6895
|
+
currentMonth,
|
|
6896
|
+
currentDay
|
|
6897
|
+
].join("-"), [
|
|
6898
|
+
currentHour,
|
|
6899
|
+
currentMinute,
|
|
6900
|
+
[currentSecond, currentMillisecond].join(".")
|
|
6901
|
+
].join(":")].join(" ");
|
|
6936
6902
|
};
|
|
6937
6903
|
const dateAndTime = getDateAndTime();
|
|
6938
6904
|
const getDateDisplay = () => {
|
|
6939
6905
|
if (children) return children;
|
|
6940
6906
|
if (dateAndTime === "") return "";
|
|
6941
|
-
const [dtYear, dtMonth, dtDay, dtHour, dtMinute, dtSecond, dtMillisecond] =
|
|
6907
|
+
const [dateData, timeData] = dateAndTime.split(" "), [dtYear, dtMonth, dtDay] = dateData.split("-").map(Number), [dtHour, dtMinute, secondData] = timeData.split(":").map(Number), [dtSecond, dtMillisecond] = String(secondData).split(".").map(Number);
|
|
6942
6908
|
return [
|
|
6943
|
-
day &&
|
|
6944
|
-
|
|
6909
|
+
[month && getMonthName(Number(dtMonth) - 1), !day && month && year && ","].filter(Boolean).join(""),
|
|
6910
|
+
[day && dtDay, day && month && year && ","].filter(Boolean).join(""),
|
|
6945
6911
|
year && dtYear,
|
|
6946
6912
|
hours && minutes && [
|
|
6947
6913
|
"at ",
|
|
6948
|
-
hours && dtHour,
|
|
6914
|
+
hours && militaryTime ? dtHour : dtHour % 12 || 12,
|
|
6949
6915
|
hours && minutes && ":",
|
|
6950
6916
|
minutes && dtMinute,
|
|
6951
6917
|
minutes && seconds && ":",
|
|
6952
6918
|
seconds && dtSecond,
|
|
6953
6919
|
seconds && milliseconds && ".",
|
|
6954
|
-
milliseconds && dtMillisecond
|
|
6920
|
+
milliseconds && dtMillisecond,
|
|
6921
|
+
!militaryTime && (dtHour < 12 ? "am" : "pm")
|
|
6955
6922
|
].filter(Boolean).join("")
|
|
6956
6923
|
].filter(Boolean).join(" ");
|
|
6957
6924
|
};
|
|
@@ -6969,7 +6936,6 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
|
|
|
6969
6936
|
children: dateDisplay
|
|
6970
6937
|
});
|
|
6971
6938
|
}
|
|
6972
|
-
|
|
6973
6939
|
//#endregion
|
|
6974
6940
|
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
6975
6941
|
const min = Math.min;
|
|
@@ -6986,10 +6952,6 @@ const oppositeSideMap = {
|
|
|
6986
6952
|
bottom: "top",
|
|
6987
6953
|
top: "bottom"
|
|
6988
6954
|
};
|
|
6989
|
-
const oppositeAlignmentMap = {
|
|
6990
|
-
start: "end",
|
|
6991
|
-
end: "start"
|
|
6992
|
-
};
|
|
6993
6955
|
function clamp(start, value, end) {
|
|
6994
6956
|
return max(start, min(value, end));
|
|
6995
6957
|
}
|
|
@@ -7008,9 +6970,9 @@ function getOppositeAxis(axis) {
|
|
|
7008
6970
|
function getAxisLength(axis) {
|
|
7009
6971
|
return axis === "y" ? "height" : "width";
|
|
7010
6972
|
}
|
|
7011
|
-
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
7012
6973
|
function getSideAxis(placement) {
|
|
7013
|
-
|
|
6974
|
+
const firstChar = placement[0];
|
|
6975
|
+
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
7014
6976
|
}
|
|
7015
6977
|
function getAlignmentAxis(placement) {
|
|
7016
6978
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -7033,7 +6995,7 @@ function getExpandedPlacements(placement) {
|
|
|
7033
6995
|
];
|
|
7034
6996
|
}
|
|
7035
6997
|
function getOppositeAlignmentPlacement(placement) {
|
|
7036
|
-
return placement.replace(
|
|
6998
|
+
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
7037
6999
|
}
|
|
7038
7000
|
const lrPlacement = ["left", "right"];
|
|
7039
7001
|
const rlPlacement = ["right", "left"];
|
|
@@ -7060,7 +7022,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
7060
7022
|
return list;
|
|
7061
7023
|
}
|
|
7062
7024
|
function getOppositePlacement(placement) {
|
|
7063
|
-
|
|
7025
|
+
const side = getSide(placement);
|
|
7026
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
7064
7027
|
}
|
|
7065
7028
|
function expandPaddingObject(padding) {
|
|
7066
7029
|
return {
|
|
@@ -7092,7 +7055,6 @@ function rectToClientRect(rect) {
|
|
|
7092
7055
|
y
|
|
7093
7056
|
};
|
|
7094
7057
|
}
|
|
7095
|
-
|
|
7096
7058
|
//#endregion
|
|
7097
7059
|
//#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
7098
7060
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
@@ -7194,6 +7156,7 @@ async function detectOverflow(state, options) {
|
|
|
7194
7156
|
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
7195
7157
|
};
|
|
7196
7158
|
}
|
|
7159
|
+
const MAX_RESET_COUNT = 50;
|
|
7197
7160
|
/**
|
|
7198
7161
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
7199
7162
|
* next to a given reference element.
|
|
@@ -7203,7 +7166,10 @@ async function detectOverflow(state, options) {
|
|
|
7203
7166
|
*/
|
|
7204
7167
|
const computePosition$1 = async (reference, floating, config) => {
|
|
7205
7168
|
const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
|
|
7206
|
-
const
|
|
7169
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
7170
|
+
...platform,
|
|
7171
|
+
detectOverflow
|
|
7172
|
+
};
|
|
7207
7173
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
7208
7174
|
let rects = await platform.getElementRects({
|
|
7209
7175
|
reference,
|
|
@@ -7212,11 +7178,12 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
7212
7178
|
});
|
|
7213
7179
|
let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
|
|
7214
7180
|
let statefulPlacement = placement;
|
|
7215
|
-
let middlewareData = {};
|
|
7216
7181
|
let resetCount = 0;
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
const
|
|
7182
|
+
const middlewareData = {};
|
|
7183
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
7184
|
+
const currentMiddleware = middleware[i];
|
|
7185
|
+
if (!currentMiddleware) continue;
|
|
7186
|
+
const { name, fn } = currentMiddleware;
|
|
7220
7187
|
const { x: nextX, y: nextY, data, reset } = await fn({
|
|
7221
7188
|
x,
|
|
7222
7189
|
y,
|
|
@@ -7225,10 +7192,7 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
7225
7192
|
strategy,
|
|
7226
7193
|
middlewareData,
|
|
7227
7194
|
rects,
|
|
7228
|
-
platform:
|
|
7229
|
-
...platform,
|
|
7230
|
-
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
7231
|
-
},
|
|
7195
|
+
platform: platformWithDetectOverflow,
|
|
7232
7196
|
elements: {
|
|
7233
7197
|
reference,
|
|
7234
7198
|
floating
|
|
@@ -7236,14 +7200,11 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
7236
7200
|
});
|
|
7237
7201
|
x = nextX != null ? nextX : x;
|
|
7238
7202
|
y = nextY != null ? nextY : y;
|
|
7239
|
-
middlewareData = {
|
|
7240
|
-
...middlewareData,
|
|
7241
|
-
|
|
7242
|
-
...middlewareData[name],
|
|
7243
|
-
...data
|
|
7244
|
-
}
|
|
7203
|
+
middlewareData[name] = {
|
|
7204
|
+
...middlewareData[name],
|
|
7205
|
+
...data
|
|
7245
7206
|
};
|
|
7246
|
-
if (reset && resetCount
|
|
7207
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
7247
7208
|
resetCount++;
|
|
7248
7209
|
if (typeof reset === "object") {
|
|
7249
7210
|
if (reset.placement) statefulPlacement = reset.placement;
|
|
@@ -7562,7 +7523,6 @@ const size$2 = function(options) {
|
|
|
7562
7523
|
}
|
|
7563
7524
|
};
|
|
7564
7525
|
};
|
|
7565
|
-
|
|
7566
7526
|
//#endregion
|
|
7567
7527
|
//#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
7568
7528
|
function hasWindow() {
|
|
@@ -7596,54 +7556,30 @@ function isShadowRoot(value) {
|
|
|
7596
7556
|
if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
|
|
7597
7557
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
7598
7558
|
}
|
|
7599
|
-
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
7600
7559
|
function isOverflowElement(element) {
|
|
7601
7560
|
const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
|
|
7602
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
7561
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
7603
7562
|
}
|
|
7604
|
-
const tableElements = /* @__PURE__ */ new Set([
|
|
7605
|
-
"table",
|
|
7606
|
-
"td",
|
|
7607
|
-
"th"
|
|
7608
|
-
]);
|
|
7609
7563
|
function isTableElement(element) {
|
|
7610
|
-
return
|
|
7564
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
7611
7565
|
}
|
|
7612
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
7613
7566
|
function isTopLayer(element) {
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
}
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
"perspective"
|
|
7628
|
-
];
|
|
7629
|
-
const willChangeValues = [
|
|
7630
|
-
"transform",
|
|
7631
|
-
"translate",
|
|
7632
|
-
"scale",
|
|
7633
|
-
"rotate",
|
|
7634
|
-
"perspective",
|
|
7635
|
-
"filter"
|
|
7636
|
-
];
|
|
7637
|
-
const containValues = [
|
|
7638
|
-
"paint",
|
|
7639
|
-
"layout",
|
|
7640
|
-
"strict",
|
|
7641
|
-
"content"
|
|
7642
|
-
];
|
|
7567
|
+
try {
|
|
7568
|
+
if (element.matches(":popover-open")) return true;
|
|
7569
|
+
} catch (_e) {}
|
|
7570
|
+
try {
|
|
7571
|
+
return element.matches(":modal");
|
|
7572
|
+
} catch (_e) {
|
|
7573
|
+
return false;
|
|
7574
|
+
}
|
|
7575
|
+
}
|
|
7576
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
7577
|
+
const containRe = /paint|layout|strict|content/;
|
|
7578
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
7579
|
+
let isWebKitValue;
|
|
7643
7580
|
function isContainingBlock(elementOrCss) {
|
|
7644
|
-
const webkit = isWebKit();
|
|
7645
7581
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
7646
|
-
return
|
|
7582
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
7647
7583
|
}
|
|
7648
7584
|
function getContainingBlock(element) {
|
|
7649
7585
|
let currentNode = getParentNode(element);
|
|
@@ -7655,16 +7591,11 @@ function getContainingBlock(element) {
|
|
|
7655
7591
|
return null;
|
|
7656
7592
|
}
|
|
7657
7593
|
function isWebKit() {
|
|
7658
|
-
if (typeof CSS
|
|
7659
|
-
return
|
|
7594
|
+
if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
7595
|
+
return isWebKitValue;
|
|
7660
7596
|
}
|
|
7661
|
-
const lastTraversableNodeNames = /* @__PURE__ */ new Set([
|
|
7662
|
-
"html",
|
|
7663
|
-
"body",
|
|
7664
|
-
"#document"
|
|
7665
|
-
]);
|
|
7666
7597
|
function isLastTraversableNode(node) {
|
|
7667
|
-
return
|
|
7598
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
7668
7599
|
}
|
|
7669
7600
|
function getComputedStyle$1(element) {
|
|
7670
7601
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -7700,13 +7631,11 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
7700
7631
|
if (isBody) {
|
|
7701
7632
|
const frameElement = getFrameElement(win);
|
|
7702
7633
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
7703
|
-
}
|
|
7704
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
7634
|
+
} else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
7705
7635
|
}
|
|
7706
7636
|
function getFrameElement(win) {
|
|
7707
7637
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
7708
7638
|
}
|
|
7709
|
-
|
|
7710
7639
|
//#endregion
|
|
7711
7640
|
//#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
7712
7641
|
function getCssDimensions(element) {
|
|
@@ -7827,7 +7756,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
7827
7756
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
7828
7757
|
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
7829
7758
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
7830
|
-
if (
|
|
7759
|
+
if (isOffsetParentAnElement) {
|
|
7831
7760
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
7832
7761
|
scale = getScale(offsetParent);
|
|
7833
7762
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -7895,7 +7824,6 @@ function getViewportRect(element, strategy) {
|
|
|
7895
7824
|
y
|
|
7896
7825
|
};
|
|
7897
7826
|
}
|
|
7898
|
-
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
7899
7827
|
function getInnerBoundingClientRect(element, strategy) {
|
|
7900
7828
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
7901
7829
|
const top = clientRect.top + element.clientTop;
|
|
@@ -7940,7 +7868,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
7940
7868
|
const computedStyle = getComputedStyle$1(currentNode);
|
|
7941
7869
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
7942
7870
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
|
|
7943
|
-
if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
7871
|
+
if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
|
|
7944
7872
|
else currentContainingBlockComputedStyle = computedStyle;
|
|
7945
7873
|
currentNode = getParentNode(currentNode);
|
|
7946
7874
|
}
|
|
@@ -7950,20 +7878,23 @@ function getClippingElementAncestors(element, cache) {
|
|
|
7950
7878
|
function getClippingRect(_ref) {
|
|
7951
7879
|
let { element, boundary, rootBoundary, strategy } = _ref;
|
|
7952
7880
|
const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
|
|
7953
|
-
const
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7881
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
7882
|
+
let top = firstRect.top;
|
|
7883
|
+
let right = firstRect.right;
|
|
7884
|
+
let bottom = firstRect.bottom;
|
|
7885
|
+
let left = firstRect.left;
|
|
7886
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
7887
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
7888
|
+
top = max(rect.top, top);
|
|
7889
|
+
right = min(rect.right, right);
|
|
7890
|
+
bottom = min(rect.bottom, bottom);
|
|
7891
|
+
left = max(rect.left, left);
|
|
7892
|
+
}
|
|
7962
7893
|
return {
|
|
7963
|
-
width:
|
|
7964
|
-
height:
|
|
7965
|
-
x:
|
|
7966
|
-
y:
|
|
7894
|
+
width: right - left,
|
|
7895
|
+
height: bottom - top,
|
|
7896
|
+
x: left,
|
|
7897
|
+
y: top
|
|
7967
7898
|
};
|
|
7968
7899
|
}
|
|
7969
7900
|
function getDimensions(element) {
|
|
@@ -8125,7 +8056,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
8125
8056
|
if (options === void 0) options = {};
|
|
8126
8057
|
const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
|
|
8127
8058
|
const referenceEl = unwrapElement(reference);
|
|
8128
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
8059
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
8129
8060
|
ancestors.forEach((ancestor) => {
|
|
8130
8061
|
ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
|
|
8131
8062
|
ancestorResize && ancestor.addEventListener("resize", update);
|
|
@@ -8136,7 +8067,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
8136
8067
|
if (elementResize) {
|
|
8137
8068
|
resizeObserver = new ResizeObserver((_ref) => {
|
|
8138
8069
|
let [firstEntry] = _ref;
|
|
8139
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
8070
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
8140
8071
|
resizeObserver.unobserve(floating);
|
|
8141
8072
|
cancelAnimationFrame(reobserveFrame);
|
|
8142
8073
|
reobserveFrame = requestAnimationFrame(() => {
|
|
@@ -8147,7 +8078,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
8147
8078
|
update();
|
|
8148
8079
|
});
|
|
8149
8080
|
if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
|
|
8150
|
-
resizeObserver.observe(floating);
|
|
8081
|
+
if (floating) resizeObserver.observe(floating);
|
|
8151
8082
|
}
|
|
8152
8083
|
let frameId;
|
|
8153
8084
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -8224,7 +8155,6 @@ const computePosition = (reference, floating, options) => {
|
|
|
8224
8155
|
platform: platformWithCache
|
|
8225
8156
|
});
|
|
8226
8157
|
};
|
|
8227
|
-
|
|
8228
8158
|
//#endregion
|
|
8229
8159
|
//#region node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
8230
8160
|
var index = typeof document !== "undefined" ? useLayoutEffect : function noop() {};
|
|
@@ -8454,50 +8384,69 @@ const arrow$1 = (options) => {
|
|
|
8454
8384
|
* object may be passed.
|
|
8455
8385
|
* @see https://floating-ui.com/docs/offset
|
|
8456
8386
|
*/
|
|
8457
|
-
const offset = (options, deps) =>
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8387
|
+
const offset = (options, deps) => {
|
|
8388
|
+
const result = offset$1(options);
|
|
8389
|
+
return {
|
|
8390
|
+
name: result.name,
|
|
8391
|
+
fn: result.fn,
|
|
8392
|
+
options: [options, deps]
|
|
8393
|
+
};
|
|
8394
|
+
};
|
|
8461
8395
|
/**
|
|
8462
8396
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
8463
8397
|
* keep it in view when it will overflow the clipping boundary.
|
|
8464
8398
|
* @see https://floating-ui.com/docs/shift
|
|
8465
8399
|
*/
|
|
8466
|
-
const shift = (options, deps) =>
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8400
|
+
const shift = (options, deps) => {
|
|
8401
|
+
const result = shift$1(options);
|
|
8402
|
+
return {
|
|
8403
|
+
name: result.name,
|
|
8404
|
+
fn: result.fn,
|
|
8405
|
+
options: [options, deps]
|
|
8406
|
+
};
|
|
8407
|
+
};
|
|
8470
8408
|
/**
|
|
8471
8409
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
8472
8410
|
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
8473
8411
|
* clipping boundary. Alternative to `autoPlacement`.
|
|
8474
8412
|
* @see https://floating-ui.com/docs/flip
|
|
8475
8413
|
*/
|
|
8476
|
-
const flip = (options, deps) =>
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8414
|
+
const flip = (options, deps) => {
|
|
8415
|
+
const result = flip$1(options);
|
|
8416
|
+
return {
|
|
8417
|
+
name: result.name,
|
|
8418
|
+
fn: result.fn,
|
|
8419
|
+
options: [options, deps]
|
|
8420
|
+
};
|
|
8421
|
+
};
|
|
8480
8422
|
/**
|
|
8481
8423
|
* Provides data that allows you to change the size of the floating element —
|
|
8482
8424
|
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
8483
8425
|
* width of the reference element.
|
|
8484
8426
|
* @see https://floating-ui.com/docs/size
|
|
8485
8427
|
*/
|
|
8486
|
-
const size = (options, deps) =>
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8428
|
+
const size = (options, deps) => {
|
|
8429
|
+
const result = size$1(options);
|
|
8430
|
+
return {
|
|
8431
|
+
name: result.name,
|
|
8432
|
+
fn: result.fn,
|
|
8433
|
+
options: [options, deps]
|
|
8434
|
+
};
|
|
8435
|
+
};
|
|
8490
8436
|
/**
|
|
8491
8437
|
* Provides data to position an inner element of the floating element so that it
|
|
8492
8438
|
* appears centered to the reference element.
|
|
8493
8439
|
* This wraps the core `arrow` middleware to allow React refs as the element.
|
|
8494
8440
|
* @see https://floating-ui.com/docs/arrow
|
|
8495
8441
|
*/
|
|
8496
|
-
const arrow = (options, deps) =>
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8442
|
+
const arrow = (options, deps) => {
|
|
8443
|
+
const result = arrow$1(options);
|
|
8444
|
+
return {
|
|
8445
|
+
name: result.name,
|
|
8446
|
+
fn: result.fn,
|
|
8447
|
+
options: [options, deps]
|
|
8448
|
+
};
|
|
8449
|
+
};
|
|
8501
8450
|
//#endregion
|
|
8502
8451
|
//#region src/components/tooltip.tsx
|
|
8503
8452
|
const defaultTooltipContext = {
|
|
@@ -8792,6 +8741,5 @@ function ArrowSvg({ className, ...props }) {
|
|
|
8792
8741
|
]
|
|
8793
8742
|
});
|
|
8794
8743
|
}
|
|
8795
|
-
|
|
8796
8744
|
//#endregion
|
|
8797
|
-
export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, Fieldset, Form, Ghost, Heading, HumanVerification, IFrame, Input, Link, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, Time, Tooltip, TooltipPanel, TooltipTrigger, generateHumanValidationToken, getLinkClasses, validateHuman };
|
|
8745
|
+
export { Anchor, Button, Checkbox, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, Fieldset, Form, Ghost, Heading, HumanVerification, IFrame, Input, Link, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, Select, SelectOption, SelectSectionTitle, SubmitButton, Textarea, Time, Tooltip, TooltipPanel, TooltipTrigger, generateHumanValidationToken, getLinkClasses, validateHuman };
|