@andrilla/mado-ui 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client.cjs → client/components/index.js} +915 -1511
- package/dist/client/graphics/index.js +463 -0
- package/dist/{client.esm.js → client.js} +1044 -490
- package/dist/{index.cjs → components/index.js} +915 -1511
- package/dist/graphics/index.js +462 -0
- package/dist/hooks/index.js +174 -0
- package/dist/{mado-ui.esm.js → index.js} +1044 -490
- package/dist/types/index.ts +0 -0
- package/dist/utils/index.js +664 -0
- package/package.json +34 -8
|
@@ -1,41 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
let tailwind_merge = require("tailwind-merge");
|
|
30
|
-
let _headlessui_react = require("@headlessui/react");
|
|
31
|
-
let react = require("react");
|
|
32
|
-
react = __toESM(react);
|
|
33
|
-
let react_dom = require("react-dom");
|
|
34
|
-
react_dom = __toESM(react_dom);
|
|
1
|
+
import { extendTailwindMerge, twJoin } from "tailwind-merge";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
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";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
6
|
+
import * as ReactDOM from "react-dom";
|
|
7
|
+
import { createPortal } from "react-dom";
|
|
35
8
|
|
|
36
9
|
//#region src/utils/custom-tailwind-merge.ts
|
|
37
10
|
const integerList = Array.from({ length: 100 }, (_, i) => `${i + 1}`);
|
|
38
|
-
const twMerge =
|
|
11
|
+
const twMerge = extendTailwindMerge({ extend: { classGroups: {
|
|
39
12
|
animate: [{ animate: [
|
|
40
13
|
"bounce",
|
|
41
14
|
"double-spin",
|
|
@@ -68,74 +41,6 @@ const twMerge = (0, tailwind_merge.extendTailwindMerge)({ extend: { classGroups:
|
|
|
68
41
|
"grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
|
|
69
42
|
transition: ["transition-rows"]
|
|
70
43
|
} } });
|
|
71
|
-
function extendMadoTailwindMerge(configExtension) {
|
|
72
|
-
const extend = configExtension.extend || {};
|
|
73
|
-
const theme = extend.theme || {};
|
|
74
|
-
const color = "color" in theme ? theme.color : [];
|
|
75
|
-
const classGroups = extend.classGroups || {};
|
|
76
|
-
const themeRest = { ...theme };
|
|
77
|
-
if ("color" in themeRest) delete themeRest.color;
|
|
78
|
-
const extendRest = { ...extend };
|
|
79
|
-
delete extendRest.theme;
|
|
80
|
-
delete extendRest.classGroups;
|
|
81
|
-
return (0, tailwind_merge.extendTailwindMerge)({
|
|
82
|
-
extend: {
|
|
83
|
-
theme: {
|
|
84
|
-
color: [{ ui: [
|
|
85
|
-
"red",
|
|
86
|
-
"orange",
|
|
87
|
-
"yellow",
|
|
88
|
-
"green",
|
|
89
|
-
"sky-blue",
|
|
90
|
-
"blue",
|
|
91
|
-
"violet",
|
|
92
|
-
"magenta",
|
|
93
|
-
"purple",
|
|
94
|
-
"brown",
|
|
95
|
-
"grey",
|
|
96
|
-
"pink"
|
|
97
|
-
] }, ...color],
|
|
98
|
-
...themeRest
|
|
99
|
-
},
|
|
100
|
-
classGroups: {
|
|
101
|
-
animate: [{ animate: [
|
|
102
|
-
"bounce",
|
|
103
|
-
"double-spin",
|
|
104
|
-
"drop-in",
|
|
105
|
-
"flip",
|
|
106
|
-
"flip-again",
|
|
107
|
-
"grid-rows",
|
|
108
|
-
"heartbeat",
|
|
109
|
-
"ping",
|
|
110
|
-
"pulse",
|
|
111
|
-
"slide-up",
|
|
112
|
-
"spin",
|
|
113
|
-
"wave"
|
|
114
|
-
] }],
|
|
115
|
-
"animation-direction": [{ "animation-direction": [
|
|
116
|
-
"normal",
|
|
117
|
-
"reverse",
|
|
118
|
-
"alternate",
|
|
119
|
-
"alternate-reverse"
|
|
120
|
-
] }],
|
|
121
|
-
"animation-fill": [{ "animation-fill": [
|
|
122
|
-
"none",
|
|
123
|
-
"forwards",
|
|
124
|
-
"backwards",
|
|
125
|
-
"both"
|
|
126
|
-
] }],
|
|
127
|
-
"animation-iteration": [{ "animation-iteration": [...integerList, "infinite"] }],
|
|
128
|
-
"animation-state": [{ "animation-state": ["running", "paused"] }],
|
|
129
|
-
"grid-cols": [{ "grid-cols": ["0fr", "1fr"] }],
|
|
130
|
-
"grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
|
|
131
|
-
transition: ["transition-rows"],
|
|
132
|
-
...classGroups
|
|
133
|
-
},
|
|
134
|
-
...extendRest
|
|
135
|
-
},
|
|
136
|
-
...configExtension
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
44
|
|
|
140
45
|
//#endregion
|
|
141
46
|
//#region src/components/link.tsx
|
|
@@ -146,116 +51,123 @@ function Anchor({ as, className, disabled, href, onClick, target, rel, ...props
|
|
|
146
51
|
onClick?.(e);
|
|
147
52
|
setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
|
|
148
53
|
};
|
|
149
|
-
|
|
150
|
-
|
|
54
|
+
return /* @__PURE__ */ jsx(as || "a", {
|
|
55
|
+
...props,
|
|
56
|
+
"aria-disabled": disabled,
|
|
57
|
+
className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
|
|
58
|
+
href,
|
|
59
|
+
target: target || (isExternal ? "_blank" : "_self"),
|
|
60
|
+
onClick: hasHash ? handleClick : onClick,
|
|
61
|
+
rel: rel !== void 0 ? rel === "nofollow" ? `${rel} noreferrer noopener` : `${rel} prefetch` : isExternal ? "nofollow noreferrer noopener" : "prefetch"
|
|
62
|
+
});
|
|
151
63
|
}
|
|
152
64
|
const baseClasses = "isolate after:absolute after:left-1/2 after:-z-10 after:-translate-x-1/2 after:duration-500 active:after:opacity-100 pointer-fine:active:after:opacity-100";
|
|
153
|
-
const lineStaticClasses =
|
|
154
|
-
const lineClasses =
|
|
65
|
+
const lineStaticClasses = twJoin(baseClasses, "whitespace-nowrap after:-bottom-0.5 after:w-[calc(100%+0.15rem)] after:rounded-full after:border after:border-current");
|
|
66
|
+
const lineClasses = twJoin(lineStaticClasses, "whitespace-nowrap after:transition-transform after:ease-exponential");
|
|
155
67
|
const scaleXClasses = "after:scale-x-0 active:after:scale-x-100 pointer-fine:hover:after:scale-x-100 pointer-fine:active:after:scale-x-100";
|
|
156
68
|
const scaleYClasses = "after:scale-y-0 active:after:scale-y-100 pointer-fine:hover:after:scale-y-100 pointer-fine:active:after:scale-y-100";
|
|
157
|
-
const lineNormalClasses =
|
|
69
|
+
const lineNormalClasses = twJoin([
|
|
158
70
|
lineClasses,
|
|
159
71
|
scaleYClasses,
|
|
160
72
|
"after:origin-bottom after:translate-y-0.5 active:after:translate-y-0 pointer-fine:hover:after:translate-y-0"
|
|
161
73
|
]);
|
|
162
|
-
const lineLtrClasses =
|
|
74
|
+
const lineLtrClasses = twJoin([
|
|
163
75
|
lineClasses,
|
|
164
76
|
scaleXClasses,
|
|
165
77
|
"after:origin-left"
|
|
166
78
|
]);
|
|
167
|
-
const lineRtlClasses =
|
|
79
|
+
const lineRtlClasses = twJoin([
|
|
168
80
|
lineClasses,
|
|
169
81
|
scaleXClasses,
|
|
170
82
|
"after:origin-right"
|
|
171
83
|
]);
|
|
172
|
-
const lineCenterClasses =
|
|
173
|
-
const lineLiftClasses =
|
|
84
|
+
const lineCenterClasses = twJoin([lineClasses, scaleXClasses]);
|
|
85
|
+
const lineLiftClasses = twJoin([
|
|
174
86
|
lineClasses,
|
|
175
87
|
scaleYClasses,
|
|
176
88
|
"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"
|
|
177
89
|
]);
|
|
178
|
-
const fillClasses =
|
|
90
|
+
const fillClasses = twJoin(baseClasses, "whitespace-nowrap [--text-color:var(--base-theme-color--foreground)] transition-[transform,color] after:top-1/2 after:h-[calc(100%+0.05rem)] after:w-[calc(100%+0.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)");
|
|
179
91
|
const getFillColorTransitionClasses = (theme = "blue", customTheme) => {
|
|
180
|
-
let fillColorTransitionClasses =
|
|
92
|
+
let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
|
|
181
93
|
switch (theme) {
|
|
182
94
|
case "amber":
|
|
183
|
-
fillColorTransitionClasses =
|
|
95
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-amber-500)]");
|
|
184
96
|
break;
|
|
185
97
|
case "blue":
|
|
186
|
-
fillColorTransitionClasses =
|
|
98
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-blue-500)]");
|
|
187
99
|
break;
|
|
188
100
|
case "cyan":
|
|
189
|
-
fillColorTransitionClasses =
|
|
101
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
190
102
|
break;
|
|
191
103
|
case "emerald":
|
|
192
|
-
fillColorTransitionClasses =
|
|
104
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
193
105
|
break;
|
|
194
106
|
case "fuchsia":
|
|
195
|
-
fillColorTransitionClasses =
|
|
107
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
196
108
|
break;
|
|
197
109
|
case "gray":
|
|
198
|
-
fillColorTransitionClasses =
|
|
110
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-gray-500)]");
|
|
199
111
|
break;
|
|
200
112
|
case "green":
|
|
201
|
-
fillColorTransitionClasses =
|
|
113
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-green-500)]");
|
|
202
114
|
break;
|
|
203
115
|
case "indigo":
|
|
204
|
-
fillColorTransitionClasses =
|
|
116
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
205
117
|
break;
|
|
206
118
|
case "lime":
|
|
207
|
-
fillColorTransitionClasses =
|
|
119
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-lime-500)]");
|
|
208
120
|
break;
|
|
209
121
|
case "mauve":
|
|
210
|
-
fillColorTransitionClasses =
|
|
122
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
211
123
|
break;
|
|
212
124
|
case "mist":
|
|
213
|
-
fillColorTransitionClasses =
|
|
125
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-mist-500)]");
|
|
214
126
|
break;
|
|
215
127
|
case "neutral":
|
|
216
|
-
fillColorTransitionClasses =
|
|
128
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
217
129
|
break;
|
|
218
130
|
case "olive":
|
|
219
|
-
fillColorTransitionClasses =
|
|
131
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-olive-500)]");
|
|
220
132
|
break;
|
|
221
133
|
case "orange":
|
|
222
|
-
fillColorTransitionClasses =
|
|
134
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-orange-500)]");
|
|
223
135
|
break;
|
|
224
136
|
case "pink":
|
|
225
|
-
fillColorTransitionClasses =
|
|
137
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-pink-500)]");
|
|
226
138
|
break;
|
|
227
139
|
case "purple":
|
|
228
|
-
fillColorTransitionClasses =
|
|
140
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-purple-500)]");
|
|
229
141
|
break;
|
|
230
142
|
case "red":
|
|
231
|
-
fillColorTransitionClasses =
|
|
143
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-red-500)]");
|
|
232
144
|
break;
|
|
233
145
|
case "rose":
|
|
234
|
-
fillColorTransitionClasses =
|
|
146
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-rose-500)]");
|
|
235
147
|
break;
|
|
236
148
|
case "sky":
|
|
237
|
-
fillColorTransitionClasses =
|
|
149
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-sky-500)]");
|
|
238
150
|
break;
|
|
239
151
|
case "slate":
|
|
240
|
-
fillColorTransitionClasses =
|
|
152
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-slate-500)]");
|
|
241
153
|
break;
|
|
242
154
|
case "stone":
|
|
243
|
-
fillColorTransitionClasses =
|
|
155
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-stone-500)]");
|
|
244
156
|
break;
|
|
245
157
|
case "taupe":
|
|
246
|
-
fillColorTransitionClasses =
|
|
158
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
247
159
|
break;
|
|
248
160
|
case "teal":
|
|
249
|
-
fillColorTransitionClasses =
|
|
161
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-teal-500)]");
|
|
250
162
|
break;
|
|
251
163
|
case "violet":
|
|
252
|
-
fillColorTransitionClasses =
|
|
164
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-violet-500)]");
|
|
253
165
|
break;
|
|
254
166
|
case "yellow":
|
|
255
|
-
fillColorTransitionClasses =
|
|
167
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
256
168
|
break;
|
|
257
169
|
case "zinc":
|
|
258
|
-
fillColorTransitionClasses =
|
|
170
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
259
171
|
break;
|
|
260
172
|
case "custom":
|
|
261
173
|
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`.");
|
|
@@ -268,85 +180,85 @@ const getFillColorTransitionClasses = (theme = "blue", customTheme) => {
|
|
|
268
180
|
return fillColorTransitionClasses;
|
|
269
181
|
};
|
|
270
182
|
const getFillCenterClasses = (theme = "blue", customTheme) => {
|
|
271
|
-
let fillCenterColorClasses =
|
|
183
|
+
let fillCenterColorClasses = twJoin(fillClasses, "after:scale-x-50 after:scale-y-[0.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)");
|
|
272
184
|
switch (theme) {
|
|
273
185
|
case "amber":
|
|
274
|
-
fillCenterColorClasses =
|
|
186
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
275
187
|
break;
|
|
276
188
|
case "blue":
|
|
277
|
-
fillCenterColorClasses =
|
|
189
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
278
190
|
break;
|
|
279
191
|
case "cyan":
|
|
280
|
-
fillCenterColorClasses =
|
|
192
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
281
193
|
break;
|
|
282
194
|
case "emerald":
|
|
283
|
-
fillCenterColorClasses =
|
|
195
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
284
196
|
break;
|
|
285
197
|
case "fuchsia":
|
|
286
|
-
fillCenterColorClasses =
|
|
198
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
287
199
|
break;
|
|
288
200
|
case "gray":
|
|
289
|
-
fillCenterColorClasses =
|
|
201
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
290
202
|
break;
|
|
291
203
|
case "green":
|
|
292
|
-
fillCenterColorClasses =
|
|
204
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
293
205
|
break;
|
|
294
206
|
case "indigo":
|
|
295
|
-
fillCenterColorClasses =
|
|
207
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
296
208
|
break;
|
|
297
209
|
case "lime":
|
|
298
|
-
fillCenterColorClasses =
|
|
210
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
299
211
|
break;
|
|
300
212
|
case "mauve":
|
|
301
|
-
fillCenterColorClasses =
|
|
213
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
302
214
|
break;
|
|
303
215
|
case "mist":
|
|
304
|
-
fillCenterColorClasses =
|
|
216
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
305
217
|
break;
|
|
306
218
|
case "neutral":
|
|
307
|
-
fillCenterColorClasses =
|
|
219
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
308
220
|
break;
|
|
309
221
|
case "olive":
|
|
310
|
-
fillCenterColorClasses =
|
|
222
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
311
223
|
break;
|
|
312
224
|
case "orange":
|
|
313
|
-
fillCenterColorClasses =
|
|
225
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
314
226
|
break;
|
|
315
227
|
case "pink":
|
|
316
|
-
fillCenterColorClasses =
|
|
228
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
317
229
|
break;
|
|
318
230
|
case "purple":
|
|
319
|
-
fillCenterColorClasses =
|
|
231
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
320
232
|
break;
|
|
321
233
|
case "red":
|
|
322
|
-
fillCenterColorClasses =
|
|
234
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
323
235
|
break;
|
|
324
236
|
case "rose":
|
|
325
|
-
fillCenterColorClasses =
|
|
237
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
326
238
|
break;
|
|
327
239
|
case "sky":
|
|
328
|
-
fillCenterColorClasses =
|
|
240
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
329
241
|
break;
|
|
330
242
|
case "slate":
|
|
331
|
-
fillCenterColorClasses =
|
|
243
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
332
244
|
break;
|
|
333
245
|
case "stone":
|
|
334
|
-
fillCenterColorClasses =
|
|
246
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
335
247
|
break;
|
|
336
248
|
case "taupe":
|
|
337
|
-
fillCenterColorClasses =
|
|
249
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
338
250
|
break;
|
|
339
251
|
case "teal":
|
|
340
|
-
fillCenterColorClasses =
|
|
252
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
341
253
|
break;
|
|
342
254
|
case "violet":
|
|
343
|
-
fillCenterColorClasses =
|
|
255
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
344
256
|
break;
|
|
345
257
|
case "yellow":
|
|
346
|
-
fillCenterColorClasses =
|
|
258
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
347
259
|
break;
|
|
348
260
|
case "zinc":
|
|
349
|
-
fillCenterColorClasses =
|
|
261
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
350
262
|
break;
|
|
351
263
|
case "custom":
|
|
352
264
|
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`.");
|
|
@@ -361,92 +273,92 @@ const getFillCenterClasses = (theme = "blue", customTheme) => {
|
|
|
361
273
|
const multilineBaseClasses = "bg-linear-to-r from-current to-current bg-no-repeat active:scale-95";
|
|
362
274
|
const multilineLineStaticClasses = "underline";
|
|
363
275
|
const multilineNormalClasses = "underline-offset-1 active:underline pointer-fine:hover:underline";
|
|
364
|
-
const multilineLineClasses =
|
|
365
|
-
const multilineXClasses =
|
|
366
|
-
const multilineLineRtlClasses =
|
|
367
|
-
const multilineLineCenterClasses =
|
|
368
|
-
const multilineLineLiftClasses =
|
|
369
|
-
const multilineFillBaseClasses =
|
|
276
|
+
const multilineLineClasses = twJoin(twJoin(multilineBaseClasses, "duration-500 ease-exponential"), "bg-position-[0%_100%] px-px pb-px transition-[background-size]");
|
|
277
|
+
const multilineXClasses = twJoin(multilineLineClasses, "bg-size-[0%_2px] focus-visible:bg-size-[100%_2px] active:bg-size-[100%_2px] pointer-fine:hover:bg-size-[100%_2px]");
|
|
278
|
+
const multilineLineRtlClasses = twJoin([multilineXClasses, "bg-position-[100%_100%]"]);
|
|
279
|
+
const multilineLineCenterClasses = twJoin([multilineXClasses, "bg-position-[50%_100%]"]);
|
|
280
|
+
const multilineLineLiftClasses = twJoin(multilineLineClasses, "bg-size-[auto_0px] focus-visible:bg-size-[auto_2px] active:bg-size-[auto_2px] pointer-fine:hover:bg-size-[auto_2px]");
|
|
281
|
+
const multilineFillBaseClasses = twJoin(multilineBaseClasses, "rounded px-0.5 py-0.75 focus-visible:text-zinc-50 active:text-zinc-50 pointer-fine:hover:text-zinc-50");
|
|
370
282
|
const getMultilineFillColorClasses = (theme = "blue", customTheme) => {
|
|
371
|
-
let multilineFillColorClasses =
|
|
283
|
+
let multilineFillColorClasses = twJoin(multilineFillBaseClasses, "from-(--theme-color) to-(--theme-color) transition-[background-size,color]");
|
|
372
284
|
switch (theme) {
|
|
373
285
|
case "amber":
|
|
374
|
-
multilineFillColorClasses =
|
|
286
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
375
287
|
break;
|
|
376
288
|
case "blue":
|
|
377
|
-
multilineFillColorClasses =
|
|
289
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
378
290
|
break;
|
|
379
291
|
case "cyan":
|
|
380
|
-
multilineFillColorClasses =
|
|
292
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
381
293
|
break;
|
|
382
294
|
case "emerald":
|
|
383
|
-
multilineFillColorClasses =
|
|
295
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
384
296
|
break;
|
|
385
297
|
case "fuchsia":
|
|
386
|
-
multilineFillColorClasses =
|
|
298
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
387
299
|
break;
|
|
388
300
|
case "gray":
|
|
389
|
-
multilineFillColorClasses =
|
|
301
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
390
302
|
break;
|
|
391
303
|
case "green":
|
|
392
|
-
multilineFillColorClasses =
|
|
304
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
393
305
|
break;
|
|
394
306
|
case "indigo":
|
|
395
|
-
multilineFillColorClasses =
|
|
307
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
396
308
|
break;
|
|
397
309
|
case "lime":
|
|
398
|
-
multilineFillColorClasses =
|
|
310
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
399
311
|
break;
|
|
400
312
|
case "mauve":
|
|
401
|
-
multilineFillColorClasses =
|
|
313
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
402
314
|
break;
|
|
403
315
|
case "mist":
|
|
404
|
-
multilineFillColorClasses =
|
|
316
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
405
317
|
break;
|
|
406
318
|
case "neutral":
|
|
407
|
-
multilineFillColorClasses =
|
|
319
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
408
320
|
break;
|
|
409
321
|
case "olive":
|
|
410
|
-
multilineFillColorClasses =
|
|
322
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
411
323
|
break;
|
|
412
324
|
case "orange":
|
|
413
|
-
multilineFillColorClasses =
|
|
325
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
414
326
|
break;
|
|
415
327
|
case "pink":
|
|
416
|
-
multilineFillColorClasses =
|
|
328
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
417
329
|
break;
|
|
418
330
|
case "purple":
|
|
419
|
-
multilineFillColorClasses =
|
|
331
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
420
332
|
break;
|
|
421
333
|
case "red":
|
|
422
|
-
multilineFillColorClasses =
|
|
334
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
423
335
|
break;
|
|
424
336
|
case "rose":
|
|
425
|
-
multilineFillColorClasses =
|
|
337
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
426
338
|
break;
|
|
427
339
|
case "sky":
|
|
428
|
-
multilineFillColorClasses =
|
|
340
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
429
341
|
break;
|
|
430
342
|
case "slate":
|
|
431
|
-
multilineFillColorClasses =
|
|
343
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
432
344
|
break;
|
|
433
345
|
case "stone":
|
|
434
|
-
multilineFillColorClasses =
|
|
346
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
435
347
|
break;
|
|
436
348
|
case "taupe":
|
|
437
|
-
multilineFillColorClasses =
|
|
349
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
438
350
|
break;
|
|
439
351
|
case "teal":
|
|
440
|
-
multilineFillColorClasses =
|
|
352
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
441
353
|
break;
|
|
442
354
|
case "violet":
|
|
443
|
-
multilineFillColorClasses =
|
|
355
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
444
356
|
break;
|
|
445
357
|
case "yellow":
|
|
446
|
-
multilineFillColorClasses =
|
|
358
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
447
359
|
break;
|
|
448
360
|
case "zinc":
|
|
449
|
-
multilineFillColorClasses =
|
|
361
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
450
362
|
break;
|
|
451
363
|
case "custom":
|
|
452
364
|
if (customTheme && customTheme.themeColor && !customTheme.themeColor.includes("[--theme-color:")) throw new Error("`customTheme.themeColor` must modify the `--theme-color` variable. Otherwise, please use `customTheme.classes`.");
|
|
@@ -459,85 +371,85 @@ const getMultilineFillColorClasses = (theme = "blue", customTheme) => {
|
|
|
459
371
|
return multilineFillColorClasses;
|
|
460
372
|
};
|
|
461
373
|
const getMultilineFillClasses = (theme = "blue", customTheme) => {
|
|
462
|
-
let multilineFillColorClasses =
|
|
374
|
+
let multilineFillColorClasses = twJoin(multilineFillBaseClasses, "from-(--theme-color)/0 to-(--theme-color)/0 bg-size-[50%_0px] bg-position-[50%_50%] transition-[background-size,background-image,color] focus-visible:from-(--theme-color) focus-visible:to-(--theme-color) focus-visible:bg-size-[100%_100%] active:from-(--theme-color) active:to-(--theme-color) active:bg-size-[100%_100%] contrast-more:from-(--theme-color)/0 pointer-fine:hover:from-(--theme-color) pointer-fine:hover:to-(--theme-color) pointer-fine:hover:bg-size-[100%_100%]");
|
|
463
375
|
switch (theme) {
|
|
464
376
|
case "amber":
|
|
465
|
-
multilineFillColorClasses =
|
|
377
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
466
378
|
break;
|
|
467
379
|
case "blue":
|
|
468
|
-
multilineFillColorClasses =
|
|
380
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
469
381
|
break;
|
|
470
382
|
case "cyan":
|
|
471
|
-
multilineFillColorClasses =
|
|
383
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
472
384
|
break;
|
|
473
385
|
case "emerald":
|
|
474
|
-
multilineFillColorClasses =
|
|
386
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
475
387
|
break;
|
|
476
388
|
case "fuchsia":
|
|
477
|
-
multilineFillColorClasses =
|
|
389
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
478
390
|
break;
|
|
479
391
|
case "gray":
|
|
480
|
-
multilineFillColorClasses =
|
|
392
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
481
393
|
break;
|
|
482
394
|
case "green":
|
|
483
|
-
multilineFillColorClasses =
|
|
395
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
484
396
|
break;
|
|
485
397
|
case "indigo":
|
|
486
|
-
multilineFillColorClasses =
|
|
398
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
487
399
|
break;
|
|
488
400
|
case "lime":
|
|
489
|
-
multilineFillColorClasses =
|
|
401
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
490
402
|
break;
|
|
491
403
|
case "mauve":
|
|
492
|
-
multilineFillColorClasses =
|
|
404
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
493
405
|
break;
|
|
494
406
|
case "mist":
|
|
495
|
-
multilineFillColorClasses =
|
|
407
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
496
408
|
break;
|
|
497
409
|
case "neutral":
|
|
498
|
-
multilineFillColorClasses =
|
|
410
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
499
411
|
break;
|
|
500
412
|
case "olive":
|
|
501
|
-
multilineFillColorClasses =
|
|
413
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
502
414
|
break;
|
|
503
415
|
case "orange":
|
|
504
|
-
multilineFillColorClasses =
|
|
416
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
505
417
|
break;
|
|
506
418
|
case "pink":
|
|
507
|
-
multilineFillColorClasses =
|
|
419
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
508
420
|
break;
|
|
509
421
|
case "purple":
|
|
510
|
-
multilineFillColorClasses =
|
|
422
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
511
423
|
break;
|
|
512
424
|
case "red":
|
|
513
|
-
multilineFillColorClasses =
|
|
425
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
514
426
|
break;
|
|
515
427
|
case "rose":
|
|
516
|
-
multilineFillColorClasses =
|
|
428
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
517
429
|
break;
|
|
518
430
|
case "sky":
|
|
519
|
-
multilineFillColorClasses =
|
|
431
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
520
432
|
break;
|
|
521
433
|
case "slate":
|
|
522
|
-
multilineFillColorClasses =
|
|
434
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
523
435
|
break;
|
|
524
436
|
case "stone":
|
|
525
|
-
multilineFillColorClasses =
|
|
437
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
526
438
|
break;
|
|
527
439
|
case "taupe":
|
|
528
|
-
multilineFillColorClasses =
|
|
440
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
529
441
|
break;
|
|
530
442
|
case "teal":
|
|
531
|
-
multilineFillColorClasses =
|
|
443
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
532
444
|
break;
|
|
533
445
|
case "violet":
|
|
534
|
-
multilineFillColorClasses =
|
|
446
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
535
447
|
break;
|
|
536
448
|
case "yellow":
|
|
537
|
-
multilineFillColorClasses =
|
|
449
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
538
450
|
break;
|
|
539
451
|
case "zinc":
|
|
540
|
-
multilineFillColorClasses =
|
|
452
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
541
453
|
break;
|
|
542
454
|
case "custom":
|
|
543
455
|
if (customTheme && customTheme.themeColor && !customTheme.themeColor.includes("[--theme-color:")) throw new Error("`customTheme.themeColor` must modify the `--theme-color` variable. Otherwise, please use `customTheme.classes`.");
|
|
@@ -550,16 +462,16 @@ const getMultilineFillClasses = (theme = "blue", customTheme) => {
|
|
|
550
462
|
return multilineFillColorClasses;
|
|
551
463
|
};
|
|
552
464
|
const getMultilineFillLiftClasses = (theme = "blue", customTheme) => {
|
|
553
|
-
return
|
|
465
|
+
return twJoin(getMultilineFillColorClasses(theme, customTheme), "bg-size-[auto_0px] bg-position-[50%_100%] focus-visible:bg-size-[auto_100%] active:bg-size-[auto_100%] pointer-fine:hover:bg-size-[auto_100%]");
|
|
554
466
|
};
|
|
555
467
|
const getMultilineFillXClasses = (theme = "blue", customTheme) => {
|
|
556
|
-
return
|
|
468
|
+
return twJoin(getMultilineFillColorClasses(theme, customTheme), "bg-size-[0%_100%] focus-visible:bg-size-[100%_100%] active:bg-size-[100%_100%] pointer-fine:hover:bg-size-[100%_100%]");
|
|
557
469
|
};
|
|
558
470
|
const getMultilineFillRtlClasses = (theme = "blue", customTheme) => {
|
|
559
|
-
return
|
|
471
|
+
return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[100%_auto]");
|
|
560
472
|
};
|
|
561
473
|
const getMultilineFillCenterClasses = (theme = "blue", customTheme) => {
|
|
562
|
-
return
|
|
474
|
+
return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[50%_auto]");
|
|
563
475
|
};
|
|
564
476
|
function getLinkClasses({ customTheme, theme, type }) {
|
|
565
477
|
switch (type) {
|
|
@@ -569,17 +481,17 @@ function getLinkClasses({ customTheme, theme, type }) {
|
|
|
569
481
|
case "center": return lineCenterClasses;
|
|
570
482
|
case "lift": return lineLiftClasses;
|
|
571
483
|
case "fill": return getFillCenterClasses(theme, customTheme);
|
|
572
|
-
case "fill-ltr": return
|
|
484
|
+
case "fill-ltr": return twJoin([
|
|
573
485
|
getFillColorTransitionClasses(theme, customTheme),
|
|
574
486
|
scaleXClasses,
|
|
575
487
|
"after:origin-left"
|
|
576
488
|
]);
|
|
577
|
-
case "fill-rtl": return
|
|
489
|
+
case "fill-rtl": return twJoin([
|
|
578
490
|
getFillColorTransitionClasses(theme, customTheme),
|
|
579
491
|
scaleXClasses,
|
|
580
492
|
"after:origin-right"
|
|
581
493
|
]);
|
|
582
|
-
case "fill-lift": return
|
|
494
|
+
case "fill-lift": return twJoin([
|
|
583
495
|
getFillColorTransitionClasses(theme, customTheme),
|
|
584
496
|
scaleYClasses,
|
|
585
497
|
"after:origin-bottom"
|
|
@@ -633,8 +545,10 @@ function Link({ as, className, customTheme, theme, type, ...props }) {
|
|
|
633
545
|
theme,
|
|
634
546
|
type
|
|
635
547
|
});
|
|
636
|
-
|
|
637
|
-
|
|
548
|
+
return /* @__PURE__ */ jsx(as || Anchor, {
|
|
549
|
+
...props,
|
|
550
|
+
className: twMerge(linkClasses, className)
|
|
551
|
+
});
|
|
638
552
|
}
|
|
639
553
|
/**
|
|
640
554
|
* # createLink
|
|
@@ -676,13 +590,28 @@ function createLink(config) {
|
|
|
676
590
|
else if (as) linkProps.as = as;
|
|
677
591
|
if (finalTheme && typeof finalTheme === "string" && config.theme && finalTheme in config.theme) {
|
|
678
592
|
const extendedTheme = config.theme[finalTheme];
|
|
679
|
-
if (customTheme) return
|
|
593
|
+
if (customTheme) return /* @__PURE__ */ jsx(Link, {
|
|
594
|
+
...linkProps,
|
|
595
|
+
theme: "custom",
|
|
596
|
+
customTheme,
|
|
597
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
598
|
+
});
|
|
680
599
|
let resolvedCustomTheme;
|
|
681
600
|
if (extendedTheme.customTheme.themeColor) resolvedCustomTheme = { themeColor: (finalType ? finalType.includes("multiline") : false) ? extendedTheme.customTheme.themeColor.multilineFill : extendedTheme.customTheme.themeColor.fill };
|
|
682
601
|
else resolvedCustomTheme = { classes: extendedTheme.customTheme.classes };
|
|
683
|
-
return
|
|
602
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
603
|
+
...linkProps,
|
|
604
|
+
theme: "custom",
|
|
605
|
+
customTheme: resolvedCustomTheme,
|
|
606
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
607
|
+
});
|
|
684
608
|
}
|
|
685
|
-
return
|
|
609
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
610
|
+
...linkProps,
|
|
611
|
+
theme: finalTheme,
|
|
612
|
+
className: twMerge(configClassName, className),
|
|
613
|
+
customTheme
|
|
614
|
+
});
|
|
686
615
|
};
|
|
687
616
|
}
|
|
688
617
|
|
|
@@ -756,8 +685,15 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
|
|
|
756
685
|
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(" "),
|
|
757
686
|
className
|
|
758
687
|
]);
|
|
759
|
-
if ("href" in props && !props.as && props.href) return
|
|
760
|
-
|
|
688
|
+
if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
|
|
689
|
+
...props,
|
|
690
|
+
as: Anchor,
|
|
691
|
+
className: buttonClasses
|
|
692
|
+
});
|
|
693
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
694
|
+
...props,
|
|
695
|
+
className: buttonClasses
|
|
696
|
+
});
|
|
761
697
|
}
|
|
762
698
|
/**
|
|
763
699
|
* # createButton
|
|
@@ -811,9 +747,19 @@ function createButton(config) {
|
|
|
811
747
|
} else if (as) buttonProps.as = as;
|
|
812
748
|
if (finalTheme && typeof finalTheme === "string" && config.theme && finalTheme in config.theme) {
|
|
813
749
|
const extendedTheme = config.theme[finalTheme];
|
|
814
|
-
return
|
|
750
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
751
|
+
...buttonProps,
|
|
752
|
+
theme: "custom",
|
|
753
|
+
customTheme: customTheme || extendedTheme.customTheme,
|
|
754
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
755
|
+
});
|
|
815
756
|
}
|
|
816
|
-
return
|
|
757
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
758
|
+
...buttonProps,
|
|
759
|
+
theme: finalTheme,
|
|
760
|
+
className: twMerge(configClassName, className),
|
|
761
|
+
customTheme
|
|
762
|
+
});
|
|
817
763
|
};
|
|
818
764
|
}
|
|
819
765
|
|
|
@@ -821,65 +767,107 @@ function createButton(config) {
|
|
|
821
767
|
//#region src/symbols/checkmark.tsx
|
|
822
768
|
function Checkmark({ weight = "regular", ...props }) {
|
|
823
769
|
switch (weight) {
|
|
824
|
-
case "ultralight": return
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
case "
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
770
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
771
|
+
viewBox: "9.76562 -66.2656 60.64 62.07",
|
|
772
|
+
...props,
|
|
773
|
+
children: /* @__PURE__ */ jsx("path", { d: "M30.5586-4.19382C31.0098-4.19382 31.2974-4.38816 31.5543-4.73143L70.1016-64.2544C70.3414-64.6611 70.4073-64.8691 70.4073-65.0771C70.4073-65.7441 69.8892-66.2656 69.2188-66.2656C68.7779-66.2656 68.4824-66.0884 68.271-65.6963L30.4996-7.29446L12.0064-28.4888C11.7461-28.8672 11.4439-29.0479 10.9678-29.0479C10.252-29.0479 9.76562-28.565 9.76562-27.8946C9.76562-27.5957 9.88721-27.2901 10.1724-26.9878L29.4165-4.73827C29.7847-4.29734 30.062-4.19382 30.5586-4.19382Z" })
|
|
774
|
+
});
|
|
775
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
776
|
+
viewBox: "9.76562 -66.4297 62.1 62.98",
|
|
777
|
+
...props,
|
|
778
|
+
children: /* @__PURE__ */ jsx("path", { d: "M31.7071-3.44529C32.4864-3.44529 33.0508-3.78319 33.4922-4.42382L71.3731-63.2187C71.7461-63.8203 71.8633-64.2129 71.8633-64.6055C71.8633-65.6621 71.1094-66.4297 70.0391-66.4297C69.3008-66.4297 68.8516-66.1602 68.4453-65.4707L31.6172-8.08401L13.3086-29.8731C12.8535-30.5079 12.377-30.7911 11.6445-30.7911C10.5391-30.7911 9.76562-30.0313 9.76562-28.961C9.76562-28.4981 9.95899-28.0078 10.3672-27.5313L29.7754-4.45116C30.3692-3.71287 30.8926-3.44529 31.7071-3.44529Z" })
|
|
779
|
+
});
|
|
780
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
781
|
+
viewBox: "9.76562 -66.75 64.94 64.77",
|
|
782
|
+
...props,
|
|
783
|
+
children: /* @__PURE__ */ jsx("path", { d: "M33.9492-1.98388C35.3692-1.98388 36.4741-2.60204 37.2759-3.82324L73.8555-61.1968C74.4888-62.1787 74.7061-62.9316 74.7061-63.6846C74.7061-65.502 73.4917-66.75 71.6406-66.75C70.3218-66.75 69.5723-66.3003 68.7856-65.0303L33.7993-9.6255L15.8511-32.5757C15.0156-33.711 14.1987-34.1944 12.9658-34.1944C11.0996-34.1944 9.76562-32.8941 9.76562-31.043C9.76562-30.2598 10.0991-29.4092 10.7476-28.5923L30.4761-3.89062C31.5103-2.57177 32.5142-1.98388 33.9492-1.98388Z" })
|
|
784
|
+
});
|
|
785
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
786
|
+
viewBox: "9.76562 -66.9922 67.09 66.11",
|
|
787
|
+
...props,
|
|
788
|
+
children: /* @__PURE__ */ jsx("path", { d: "M35.6445-0.878906C37.5488-0.878906 39.0625-1.70898 40.1367-3.36914L75.7324-59.668C76.5625-60.9375 76.8555-61.9629 76.8555-62.9883C76.8555-65.3809 75.293-66.9922 72.8516-66.9922C71.0938-66.9922 70.1172-66.4062 69.043-64.6973L35.4492-10.791L17.7734-34.6191C16.6504-36.1328 15.5762-36.7676 13.9648-36.7676C11.5234-36.7676 9.76562-35.0586 9.76562-32.6172C9.76562-31.5918 10.2051-30.4688 11.0352-29.3945L31.0059-3.4668C32.373-1.70898 33.7402-0.878906 35.6445-0.878906Z" })
|
|
789
|
+
});
|
|
790
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
791
|
+
viewBox: "9.76562 -67.6602 68.7 67.03",
|
|
792
|
+
...props,
|
|
793
|
+
children: /* @__PURE__ */ jsx("path", { d: "M36.4707-0.632812C38.7002-0.632812 40.46-1.55078 41.6924-3.43066L77.1914-58.9121C78.1182-60.3135 78.4639-61.5322 78.4639-62.707C78.4639-65.6182 76.4268-67.6602 73.4404-67.6602C71.3398-67.6602 70.1084-66.9424 68.8232-64.9082L36.2842-12.9443L19.3379-35.2432C18.0742-36.8711 16.7891-37.5762 14.9229-37.5762C11.9365-37.5762 9.76562-35.4541 9.76562-32.4941C9.76562-31.2139 10.2402-29.9502 11.2988-28.6475L31.208-3.3877C32.7158-1.50684 34.3115-0.632812 36.4707-0.632812Z" })
|
|
794
|
+
});
|
|
795
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
796
|
+
viewBox: "9.76562 -68.1723 69.93 67.73",
|
|
797
|
+
...props,
|
|
798
|
+
children: /* @__PURE__ */ jsx("path", { d: "M37.1041-0.444141C39.5829-0.444141 41.5313-1.42949 42.8851-3.47783L78.31-58.3326C79.3108-59.8351 79.697-61.2021 79.697-62.4914C79.697-65.8001 77.296-68.1723 73.8919-68.1723C71.5285-68.1723 70.1017-67.3534 68.6548-65.0699L36.9243-14.5952L20.5373-35.7216C19.1658-37.4371 17.7189-38.1961 15.6573-38.1961C12.2532-38.1961 9.76562-35.7573 9.76562-32.3998C9.76562-30.9241 10.2672-29.5526 11.501-28.0747L31.363-3.32705C32.9786-1.35186 34.7495-0.444141 37.1041-0.444141Z" })
|
|
799
|
+
});
|
|
800
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
801
|
+
viewBox: "9.76562 -68.8477 71.56 68.65",
|
|
802
|
+
...props,
|
|
803
|
+
children: /* @__PURE__ */ jsx("path", { d: "M37.9395-0.195312C40.7471-0.195312 42.9443-1.26953 44.458-3.54004L79.7852-57.5684C80.8838-59.2041 81.3232-60.7666 81.3232-62.207C81.3232-66.04 78.4424-68.8477 74.4873-68.8477C71.7773-68.8477 70.0928-67.8955 68.4326-65.2832L37.7686-16.7725L22.1191-36.3525C20.6055-38.1836 18.9453-39.0137 16.626-39.0137C12.6709-39.0137 9.76562-36.1572 9.76562-32.2754C9.76562-30.542 10.3027-29.0283 11.7676-27.3193L31.5674-3.24707C33.3252-1.14746 35.3271-0.195312 37.9395-0.195312Z" })
|
|
804
|
+
});
|
|
805
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
806
|
+
viewBox: "9.76562 -69.8273 73.92 69.99",
|
|
807
|
+
...props,
|
|
808
|
+
children: /* @__PURE__ */ jsx("path", { d: "M39.1511 0.165596C42.4356 0.165596 44.9938-1.03752 46.7395-3.63027L81.9248-56.4599C83.1652-58.2889 83.682-60.135 83.682-61.7946C83.682-66.3881 80.1051-69.8273 75.3509-69.8273C72.1383-69.8273 70.0799-68.6818 68.1104-65.5926L38.9931-19.9304L24.4135-37.2677C22.6936-39.2663 20.7241-40.1995 18.0309-40.1995C13.2767-40.1995 9.76562-36.7373 9.76562-32.0949C9.76562-29.9877 10.3543-28.2678 12.1543-26.2237L31.8638-3.13106C33.8279-0.851 36.165 0.165596 39.1511 0.165596Z" })
|
|
809
|
+
});
|
|
810
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
811
|
+
viewBox: "9.76562 -70.7031 76.03 71.19",
|
|
812
|
+
...props,
|
|
813
|
+
children: /* @__PURE__ */ jsx("path", { d: "M40.2344 0.488281C43.9453 0.488281 46.8262-0.830078 48.7793-3.71094L83.8379-55.4688C85.2051-57.4707 85.791-59.5703 85.791-61.4258C85.791-66.6992 81.5918-70.7031 76.123-70.7031C72.4609-70.7031 70.0684-69.3848 67.8223-65.8691L40.0879-22.7539L26.4648-38.0859C24.5605-40.2344 22.3145-41.2598 19.2871-41.2598C13.8184-41.2598 9.76562-37.2559 9.76562-31.9336C9.76562-29.4922 10.4004-27.5879 12.5-25.2441L32.1289-3.02734C34.2773-0.585938 36.9141 0.488281 40.2344 0.488281Z" })
|
|
814
|
+
});
|
|
851
815
|
}
|
|
852
816
|
}
|
|
853
817
|
|
|
854
818
|
//#endregion
|
|
855
819
|
//#region src/components/checkbox.tsx
|
|
856
820
|
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 }) {
|
|
857
|
-
const [checked, setChecked] =
|
|
821
|
+
const [checked, setChecked] = useState(props.defaultChecked || false), [hasInteracted, setHasInteracted] = useState(false);
|
|
858
822
|
const handleChange = (newValue) => {
|
|
859
823
|
setHasInteracted(true);
|
|
860
824
|
setChecked(newValue);
|
|
861
825
|
onChange?.(newValue);
|
|
862
826
|
};
|
|
863
|
-
return
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
{
|
|
881
|
-
|
|
882
|
-
|
|
827
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
828
|
+
...fieldProps,
|
|
829
|
+
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),
|
|
830
|
+
...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
|
|
831
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
832
|
+
...inputContainerProps,
|
|
833
|
+
className: twMerge("flex items-start gap-2", inputContainerClassName),
|
|
834
|
+
children: [/* @__PURE__ */ jsxs(Checkbox$1, {
|
|
835
|
+
...props,
|
|
836
|
+
...required ? { "aria-required": "true" } : {},
|
|
837
|
+
...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
|
|
838
|
+
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),
|
|
839
|
+
onChange: handleChange,
|
|
840
|
+
value,
|
|
841
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
842
|
+
checked: props.checked || checked,
|
|
843
|
+
className: "sr-only left-1/2 -translate-x-1/2",
|
|
844
|
+
onChange: () => {},
|
|
845
|
+
onInvalid: () => {
|
|
846
|
+
setHasInteracted(true);
|
|
847
|
+
},
|
|
848
|
+
required,
|
|
849
|
+
role: "presentation",
|
|
850
|
+
tabIndex: -1,
|
|
851
|
+
type: "checkbox",
|
|
852
|
+
value
|
|
853
|
+
}), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
|
|
854
|
+
className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
|
|
855
|
+
weight: "bold"
|
|
856
|
+
})]
|
|
857
|
+
}), /* @__PURE__ */ jsxs(Label, {
|
|
858
|
+
...labelProps,
|
|
859
|
+
className: (bag) => twMerge("text-sm font-medium", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
860
|
+
children: [children, required ? /* @__PURE__ */ jsx("span", {
|
|
861
|
+
className: "text-red-700",
|
|
862
|
+
children: "*"
|
|
863
|
+
}) : ""]
|
|
864
|
+
})]
|
|
865
|
+
}), description && /* @__PURE__ */ jsx(Description, {
|
|
866
|
+
...descriptionProps,
|
|
867
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
868
|
+
children: description
|
|
869
|
+
})]
|
|
870
|
+
});
|
|
883
871
|
}
|
|
884
872
|
|
|
885
873
|
//#endregion
|
|
@@ -1062,7 +1050,7 @@ if (isBrowser) {
|
|
|
1062
1050
|
* @param {String} str
|
|
1063
1051
|
* @return {String}
|
|
1064
1052
|
*/
|
|
1065
|
-
const toLowerCase
|
|
1053
|
+
const toLowerCase = (str) => str.replace(lowerCaseRgx, "$1-$2").toLowerCase();
|
|
1066
1054
|
/**
|
|
1067
1055
|
* Prioritize this method instead of regex when possible
|
|
1068
1056
|
* @param {String} str
|
|
@@ -1705,7 +1693,7 @@ const sanitizePropertyName = (propertyName, target, tweenType) => {
|
|
|
1705
1693
|
const cachedPropertyName = propertyNamesCache[propertyName];
|
|
1706
1694
|
if (cachedPropertyName) return cachedPropertyName;
|
|
1707
1695
|
else {
|
|
1708
|
-
const lowerCaseName = propertyName ? toLowerCase
|
|
1696
|
+
const lowerCaseName = propertyName ? toLowerCase(propertyName) : propertyName;
|
|
1709
1697
|
propertyNamesCache[propertyName] = lowerCaseName;
|
|
1710
1698
|
return lowerCaseName;
|
|
1711
1699
|
}
|
|
@@ -1738,7 +1726,7 @@ const cleanInlineStyles = (renderable) => {
|
|
|
1738
1726
|
for (let key in cachedTransforms) str += transformsFragmentStrings[key] + cachedTransforms[key] + ") ";
|
|
1739
1727
|
targetStyle.transform = str;
|
|
1740
1728
|
}
|
|
1741
|
-
} else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase
|
|
1729
|
+
} else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase(tweenProperty));
|
|
1742
1730
|
else targetStyle[tweenProperty] = originalInlinedValue;
|
|
1743
1731
|
if (animation._tail === tween) animation.targets.forEach((t) => {
|
|
1744
1732
|
if (t.getAttribute && t.getAttribute("style") === emptyString) t.removeAttribute("style");
|
|
@@ -3672,129 +3660,6 @@ const morphTo = (path2, precision = .33) => ($path1) => {
|
|
|
3672
3660
|
return [v1, v2];
|
|
3673
3661
|
};
|
|
3674
3662
|
|
|
3675
|
-
//#endregion
|
|
3676
|
-
//#region src/utils/class-management.ts
|
|
3677
|
-
/**
|
|
3678
|
-
* ### Has Class
|
|
3679
|
-
* - Returns a boolean based on whether the specified element has the specified class
|
|
3680
|
-
* @param {HTMLElement} element Any HTML Element
|
|
3681
|
-
* @param {string} className A string of any class to check for
|
|
3682
|
-
* @returns {boolean} true if the specified element has the specified class, else false
|
|
3683
|
-
*/
|
|
3684
|
-
function hasClass(element, className) {
|
|
3685
|
-
return element.classList.contains(className);
|
|
3686
|
-
}
|
|
3687
|
-
/**
|
|
3688
|
-
* ### Add Class
|
|
3689
|
-
* - Adds the specified classes to the specified elements
|
|
3690
|
-
* @param {Element|HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
|
|
3691
|
-
* @param {string|string[]} classList A string or an array of classes to add to each element
|
|
3692
|
-
*/
|
|
3693
|
-
function addClass(elements, classList) {
|
|
3694
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3695
|
-
let elementList, classListGroup;
|
|
3696
|
-
switch (elementsType) {
|
|
3697
|
-
case "String":
|
|
3698
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3699
|
-
break;
|
|
3700
|
-
case "NodeList":
|
|
3701
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3702
|
-
break;
|
|
3703
|
-
case "Array":
|
|
3704
|
-
if (!elementsIsString) elementList = elements;
|
|
3705
|
-
break;
|
|
3706
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3707
|
-
}
|
|
3708
|
-
switch (classListType) {
|
|
3709
|
-
case "String":
|
|
3710
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3711
|
-
else classListGroup = [classList];
|
|
3712
|
-
break;
|
|
3713
|
-
case "Array":
|
|
3714
|
-
if (!classListIsString) classListGroup = classList;
|
|
3715
|
-
break;
|
|
3716
|
-
}
|
|
3717
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3718
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3719
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3720
|
-
if (hasClass(element, classItem)) return;
|
|
3721
|
-
element.classList.add(classItem);
|
|
3722
|
-
}));
|
|
3723
|
-
}
|
|
3724
|
-
/**
|
|
3725
|
-
* ### Remove Class
|
|
3726
|
-
* - Removes the specified classes from the specified elements
|
|
3727
|
-
* @param {HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
|
|
3728
|
-
* @param {string|string[]} classList A string or an array of classes to remove from each element
|
|
3729
|
-
*/
|
|
3730
|
-
function removeClass(elements, classList) {
|
|
3731
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3732
|
-
let elementList, classListGroup;
|
|
3733
|
-
switch (elementsType) {
|
|
3734
|
-
case "String":
|
|
3735
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3736
|
-
break;
|
|
3737
|
-
case "NodeList":
|
|
3738
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3739
|
-
break;
|
|
3740
|
-
case "Array":
|
|
3741
|
-
if (!elementsIsString) elementList = elements;
|
|
3742
|
-
break;
|
|
3743
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3744
|
-
}
|
|
3745
|
-
switch (classListType) {
|
|
3746
|
-
case "String":
|
|
3747
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3748
|
-
else classListGroup = [classList];
|
|
3749
|
-
break;
|
|
3750
|
-
case "Array":
|
|
3751
|
-
if (!classListIsString) classListGroup = classList;
|
|
3752
|
-
break;
|
|
3753
|
-
}
|
|
3754
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3755
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3756
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3757
|
-
if (!hasClass(element, classItem)) return;
|
|
3758
|
-
element.classList.remove(classItem);
|
|
3759
|
-
}));
|
|
3760
|
-
}
|
|
3761
|
-
/**
|
|
3762
|
-
* ### Toggle Class
|
|
3763
|
-
* - Toggles the specified classes on the specified elements
|
|
3764
|
-
* @param {HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
|
|
3765
|
-
* @param {string|string[]} classList A string or an array of classes to toggle on each element
|
|
3766
|
-
*/
|
|
3767
|
-
function toggleClass(elements, classList) {
|
|
3768
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3769
|
-
let elementList, classListGroup;
|
|
3770
|
-
switch (elementsType) {
|
|
3771
|
-
case "String":
|
|
3772
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3773
|
-
break;
|
|
3774
|
-
case "NodeList":
|
|
3775
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3776
|
-
break;
|
|
3777
|
-
case "Array":
|
|
3778
|
-
if (!elementsIsString) elementList = elements;
|
|
3779
|
-
break;
|
|
3780
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3781
|
-
}
|
|
3782
|
-
switch (classListType) {
|
|
3783
|
-
case "String":
|
|
3784
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3785
|
-
else classListGroup = [classList];
|
|
3786
|
-
break;
|
|
3787
|
-
case "Array":
|
|
3788
|
-
if (!classListIsString) classListGroup = classList;
|
|
3789
|
-
break;
|
|
3790
|
-
}
|
|
3791
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3792
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3793
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3794
|
-
element.classList.toggle(classItem);
|
|
3795
|
-
}));
|
|
3796
|
-
}
|
|
3797
|
-
|
|
3798
3663
|
//#endregion
|
|
3799
3664
|
//#region src/utils/get-date.ts
|
|
3800
3665
|
/** The current date as a Date object */
|
|
@@ -3833,25 +3698,6 @@ const currentMonthName = getMonthName();
|
|
|
3833
3698
|
/** The name of the current day of the week */
|
|
3834
3699
|
const currentWeekdayName = getWeekdayName();
|
|
3835
3700
|
/**
|
|
3836
|
-
* ### Days In Month
|
|
3837
|
-
* - Returns the number of days in the specified month.
|
|
3838
|
-
* @param {Date} date A Date object representing the month to get the number of days for. (Preset to the current date)
|
|
3839
|
-
* @returns {number} The number of days in the specified month.
|
|
3840
|
-
*/
|
|
3841
|
-
function daysInMonth(date = d) {
|
|
3842
|
-
const selectedYear = date.getFullYear(), selectedMonth = date.getMonth() + 1;
|
|
3843
|
-
return new Date(selectedYear, selectedMonth, 0).getDate();
|
|
3844
|
-
}
|
|
3845
|
-
/**
|
|
3846
|
-
* ### First of Month
|
|
3847
|
-
* - Returns the first day of the specified month.
|
|
3848
|
-
* @param {Date} date A Date object representing the month to get the first day for. (Preset to current date)
|
|
3849
|
-
* @returns {Date} A Date object of the given month, with the first day.
|
|
3850
|
-
*/
|
|
3851
|
-
function firstOfMonth(date = d) {
|
|
3852
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
3853
|
-
}
|
|
3854
|
-
/**
|
|
3855
3701
|
* ### Get Date
|
|
3856
3702
|
* - Returns the date with two digits
|
|
3857
3703
|
* @param {number|Date} date The date to get date
|
|
@@ -3876,28 +3722,6 @@ function getHours(hours = d) {
|
|
|
3876
3722
|
return formattedHours;
|
|
3877
3723
|
}
|
|
3878
3724
|
/**
|
|
3879
|
-
* ### Get Hours in 12
|
|
3880
|
-
* - Returns the hour based on the specified 24 hour value in a 12 hour format
|
|
3881
|
-
* @param {number|Date} hour The hour to be converted to 12 hour format
|
|
3882
|
-
* @returns {number} The hour in a 12 hour format
|
|
3883
|
-
*/
|
|
3884
|
-
function getHoursIn12(hour = d) {
|
|
3885
|
-
if (typeof hour !== "number") hour = hour.getHours();
|
|
3886
|
-
if (hour > 12) return hour - 12;
|
|
3887
|
-
return hour;
|
|
3888
|
-
}
|
|
3889
|
-
/**
|
|
3890
|
-
* ### Get Meridian from Hour
|
|
3891
|
-
* - Returns either 'pm' or 'am' based on the specified 24 hour value
|
|
3892
|
-
* @param {number|Date} hour The hour to get the meridian from
|
|
3893
|
-
* @returns {'am'|'pm'} The meridian for the given hour
|
|
3894
|
-
*/
|
|
3895
|
-
function getMeridianFromHour(hour = d) {
|
|
3896
|
-
if (typeof hour !== "number") hour = hour.getHours();
|
|
3897
|
-
if (hour >= 12) return "pm";
|
|
3898
|
-
return "am";
|
|
3899
|
-
}
|
|
3900
|
-
/**
|
|
3901
3725
|
* ### Get Milliseconds
|
|
3902
3726
|
* - Returns the milliseconds with two digits
|
|
3903
3727
|
* @param {number|Date} milliseconds The date to get milliseconds
|
|
@@ -3933,9 +3757,6 @@ function getMonth(month = d) {
|
|
|
3933
3757
|
if (formattedMonth.length === 1) formattedMonth = `0${formattedMonth}`;
|
|
3934
3758
|
return formattedMonth;
|
|
3935
3759
|
}
|
|
3936
|
-
function getMonthIndexFromName(name) {
|
|
3937
|
-
return monthNamesList.findIndex((monthName) => monthName === name);
|
|
3938
|
-
}
|
|
3939
3760
|
/**
|
|
3940
3761
|
* ### Get Month Name
|
|
3941
3762
|
* - Returns the name of the specified month
|
|
@@ -3947,26 +3768,6 @@ function getMonthName(date = d) {
|
|
|
3947
3768
|
return monthNamesList[date.getMonth()];
|
|
3948
3769
|
}
|
|
3949
3770
|
/**
|
|
3950
|
-
* ### Get Next Month
|
|
3951
|
-
* - Returns the number of the following month from the specified month
|
|
3952
|
-
* @param {Date} date The Date object representing the month to get the following month from (Preset to current date)
|
|
3953
|
-
* @returns {number} The indexed month of the following month
|
|
3954
|
-
*/
|
|
3955
|
-
function getNextMonth(date = d) {
|
|
3956
|
-
const givenMonth = date.getMonth();
|
|
3957
|
-
return givenMonth === 11 ? 0 : givenMonth + 1;
|
|
3958
|
-
}
|
|
3959
|
-
/**
|
|
3960
|
-
* ### Get Previous Month
|
|
3961
|
-
* - Returns the number of the previous month from the specified month
|
|
3962
|
-
* @param {Date} date The Date object representing the month to get the previous month from (Preset to current date)
|
|
3963
|
-
* @returns {number} The indexed month of the previous month
|
|
3964
|
-
*/
|
|
3965
|
-
function getPreviousMonth(date = d) {
|
|
3966
|
-
const givenMonth = date.getMonth();
|
|
3967
|
-
return givenMonth === 0 ? 11 : givenMonth - 1;
|
|
3968
|
-
}
|
|
3969
|
-
/**
|
|
3970
3771
|
* ### Get Seconds
|
|
3971
3772
|
* - Returns the seconds with two digits
|
|
3972
3773
|
* @param {number|Date} seconds The date to get seconds
|
|
@@ -3979,25 +3780,6 @@ function getSeconds(seconds = d) {
|
|
|
3979
3780
|
return formattedSeconds;
|
|
3980
3781
|
}
|
|
3981
3782
|
/**
|
|
3982
|
-
* ### Get User Readable Date
|
|
3983
|
-
* - Returns a string of the current date in a user-friendly way
|
|
3984
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
3985
|
-
* @param date (default: `new Date()`)
|
|
3986
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
3987
|
-
*/
|
|
3988
|
-
function getUserReadableDate(date = d) {
|
|
3989
|
-
const dateTime = date.getTime();
|
|
3990
|
-
const today = /* @__PURE__ */ new Date();
|
|
3991
|
-
if (dateTime === today.getTime()) return "Today";
|
|
3992
|
-
if (dateTime === (/* @__PURE__ */ new Date(today.getDate() - 1)).getTime()) return "Yesterday";
|
|
3993
|
-
if (dateTime === new Date(today.getDate() + 1).getTime()) return "Tomorrow";
|
|
3994
|
-
const thisYear = today.getFullYear();
|
|
3995
|
-
return toFullDateString(date, {
|
|
3996
|
-
weekday: "code",
|
|
3997
|
-
year: !(date.getFullYear() === thisYear)
|
|
3998
|
-
});
|
|
3999
|
-
}
|
|
4000
|
-
/**
|
|
4001
3783
|
* ### Get Weekday Name
|
|
4002
3784
|
* - Returns the weekday name of the specified day
|
|
4003
3785
|
* @param {number | Date} weekday A Date object or number representing the day to get the weekday name from. (Preset to the current date)
|
|
@@ -4007,76 +3789,6 @@ function getWeekdayName(weekday = d) {
|
|
|
4007
3789
|
if (typeof weekday === "number") return weekdayNamesList[weekday];
|
|
4008
3790
|
return weekdayNamesList[weekday.getDay()];
|
|
4009
3791
|
}
|
|
4010
|
-
/**
|
|
4011
|
-
* ### Get Years in Range
|
|
4012
|
-
* - Returns an array of years in between the specified minimum and maximum years
|
|
4013
|
-
* @param {number} minYear The minimum year
|
|
4014
|
-
* @param {number} maxYear The maximum year
|
|
4015
|
-
* @returns {number[]} Array of years
|
|
4016
|
-
*/
|
|
4017
|
-
function getYearsInRange(minYear = 0, maxYear = year) {
|
|
4018
|
-
const yearList = [];
|
|
4019
|
-
for (let selectedYear = minYear; selectedYear <= maxYear; selectedYear++) yearList.push(selectedYear);
|
|
4020
|
-
return yearList;
|
|
4021
|
-
}
|
|
4022
|
-
/**
|
|
4023
|
-
* ### To Full Date String
|
|
4024
|
-
* - Returns a formatted string to display the date
|
|
4025
|
-
* @param {Date} date (default: `new Date()`)
|
|
4026
|
-
* @param {ToFullDateStringOptionsProps} options Change how to display the weekday, month name, day of the month, and year.
|
|
4027
|
-
* @returns {string} '`weekday`, `month` `day`, `year`'
|
|
4028
|
-
*/
|
|
4029
|
-
function toFullDateString(date = d, options) {
|
|
4030
|
-
let weekdayName = getWeekdayName(date), monthName = getMonthName(date), dayOfMonth = date.getDate(), year = date.getFullYear().toString();
|
|
4031
|
-
if (options) {
|
|
4032
|
-
const includesWeekday = options.weekday !== false, includesDay = options.day !== false, includesMonth = options.month !== false, includesYear = options.year !== false;
|
|
4033
|
-
if (includesWeekday) {
|
|
4034
|
-
if (options.weekday === "code") weekdayName = weekdayName.slice(0, 3);
|
|
4035
|
-
if (includesMonth || includesDay || includesYear) weekdayName += ", ";
|
|
4036
|
-
} else weekdayName = "";
|
|
4037
|
-
if (includesMonth) {
|
|
4038
|
-
if (options.month === "code") monthName = monthName.slice(0, 3);
|
|
4039
|
-
if (includesDay) monthName += " ";
|
|
4040
|
-
} else monthName = "";
|
|
4041
|
-
if (!includesDay) dayOfMonth = "";
|
|
4042
|
-
if (includesYear) {
|
|
4043
|
-
if (options.year === "code") year = year.slice(-2);
|
|
4044
|
-
if (includesMonth || includesDay) year = ", " + year;
|
|
4045
|
-
} else year = "";
|
|
4046
|
-
}
|
|
4047
|
-
return weekdayName + monthName + dayOfMonth + year;
|
|
4048
|
-
}
|
|
4049
|
-
/**
|
|
4050
|
-
* ### Get User Readable Date From Timestampz
|
|
4051
|
-
* - Returns a string of the current date in a user-friendly way
|
|
4052
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
4053
|
-
* @param string
|
|
4054
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
4055
|
-
*/
|
|
4056
|
-
function getUserReadableDateFromTimestampz(timestampz) {
|
|
4057
|
-
const [date, time] = timestampz.split("T") || [];
|
|
4058
|
-
const [year, month, day] = date?.split("-").map((string) => Number(string)) || [];
|
|
4059
|
-
const [hms, _timezone] = time?.includes("+") ? time?.split("+") : time?.split("-") || [];
|
|
4060
|
-
const [hours, minutes, seconds] = hms?.split(":").map((string) => Number(string)) || [];
|
|
4061
|
-
return getUserReadableDate(new Date(year, month - 1, day, hours, minutes, seconds));
|
|
4062
|
-
}
|
|
4063
|
-
function getLocalTime(time) {
|
|
4064
|
-
const date = /* @__PURE__ */ new Date(), [hours, minutes] = typeof time === "string" ? time.split(":") : time;
|
|
4065
|
-
const timezone = getTimezone();
|
|
4066
|
-
console.log(timezone);
|
|
4067
|
-
date.setUTCHours(Number(hours));
|
|
4068
|
-
date.setMinutes(Number(minutes));
|
|
4069
|
-
return date.toLocaleTimeString([], {
|
|
4070
|
-
hour: "numeric",
|
|
4071
|
-
minute: "2-digit",
|
|
4072
|
-
hour12: true
|
|
4073
|
-
});
|
|
4074
|
-
}
|
|
4075
|
-
function getTimezone() {
|
|
4076
|
-
const date = /* @__PURE__ */ new Date();
|
|
4077
|
-
const timezonePart = Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(date).find((part) => part.type === "timeZoneName");
|
|
4078
|
-
return timezonePart ? timezonePart.value : "";
|
|
4079
|
-
}
|
|
4080
3792
|
|
|
4081
3793
|
//#endregion
|
|
4082
3794
|
//#region src/utils/math.ts
|
|
@@ -4084,156 +3796,12 @@ function easeOutExpo(time, start, end, duration) {
|
|
|
4084
3796
|
return time == duration ? start + end : end * (-Math.pow(2, -10 * time / duration) + 1) + start;
|
|
4085
3797
|
}
|
|
4086
3798
|
|
|
4087
|
-
//#endregion
|
|
4088
|
-
//#region src/utils/regex.ts
|
|
4089
|
-
const emailRegex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
4090
|
-
/**
|
|
4091
|
-
* # Is Email
|
|
4092
|
-
* Checks whether the specified string is in email format
|
|
4093
|
-
*/
|
|
4094
|
-
function isEmail(email) {
|
|
4095
|
-
return emailRegex.test(email);
|
|
4096
|
-
}
|
|
4097
|
-
const telRegex = /(?:\+1\s|1\s|)?\d{3}\.\d{3}\.\d{4}|(?:\+1\s|1\s|)?\d{3}-\d{3}-\d{4}|(?:\+1\s|1\s|)?\(\d{3}\) \d{3}-\d{4}|(?:\+1\s|1\s|\+1|1|)?\d{10}/;
|
|
4098
|
-
/**
|
|
4099
|
-
* # Is Phone Number
|
|
4100
|
-
* Checks whether the specified string is in phone number format
|
|
4101
|
-
*/
|
|
4102
|
-
function isPhoneNumber(tel) {
|
|
4103
|
-
return telRegex.test(tel);
|
|
4104
|
-
}
|
|
4105
|
-
|
|
4106
|
-
//#endregion
|
|
4107
|
-
//#region src/utils/string-manipulation.ts
|
|
4108
|
-
/**
|
|
4109
|
-
* # Format Phone Number
|
|
4110
|
-
* Converts any string containing at least 10 numbers to a formatted phone number
|
|
4111
|
-
* @param {string} phoneNumber
|
|
4112
|
-
* @param options
|
|
4113
|
-
* @property {string} `countryCode`
|
|
4114
|
-
* @property {'continuous' | 'dot' | 'hyphenated' | 'none' | 'space' | 'standard'} `format`
|
|
4115
|
-
*
|
|
4116
|
-
* Input: a555b555c5555d
|
|
4117
|
-
*
|
|
4118
|
-
* @example
|
|
4119
|
-
* format: 'continuous'
|
|
4120
|
-
* countryCode: '1'
|
|
4121
|
-
* returns: +1 5555555555
|
|
4122
|
-
*
|
|
4123
|
-
* @example
|
|
4124
|
-
* format: 'dot'
|
|
4125
|
-
* returns: 555.555.5555
|
|
4126
|
-
*
|
|
4127
|
-
* @example
|
|
4128
|
-
* format: 'hyphenated'
|
|
4129
|
-
* returns: 555-555-5555
|
|
4130
|
-
*
|
|
4131
|
-
* @example
|
|
4132
|
-
* format: 'none'
|
|
4133
|
-
* countryCode: '1'
|
|
4134
|
-
* returns: +1 a555b555c5555d
|
|
4135
|
-
*
|
|
4136
|
-
* @example
|
|
4137
|
-
* format: 'space'
|
|
4138
|
-
* returns: 555 555 5555
|
|
4139
|
-
*
|
|
4140
|
-
* @example
|
|
4141
|
-
* format: 'standard' (default)
|
|
4142
|
-
* returns: (555) 555-5555
|
|
4143
|
-
*
|
|
4144
|
-
* @returns {string} string formatted
|
|
4145
|
-
*/
|
|
4146
|
-
function formatPhoneNumber(phoneNumber, options) {
|
|
4147
|
-
const format = options?.format || "standard";
|
|
4148
|
-
if (format !== "none") phoneNumber = phoneNumber.replace(/\D/g, "").slice(-10);
|
|
4149
|
-
switch (format) {
|
|
4150
|
-
case "dot":
|
|
4151
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4152
|
-
if (index === 2) return `${char}.`;
|
|
4153
|
-
if (index === 5) return `${char}.`;
|
|
4154
|
-
return char;
|
|
4155
|
-
}).join("");
|
|
4156
|
-
break;
|
|
4157
|
-
case "hyphenated":
|
|
4158
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4159
|
-
if (index === 2) return `${char}-`;
|
|
4160
|
-
if (index === 5) return `${char}-`;
|
|
4161
|
-
return char;
|
|
4162
|
-
}).join("");
|
|
4163
|
-
break;
|
|
4164
|
-
case "space":
|
|
4165
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4166
|
-
if (index === 2) return `${char} `;
|
|
4167
|
-
if (index === 5) return `${char} `;
|
|
4168
|
-
return char;
|
|
4169
|
-
}).join("");
|
|
4170
|
-
break;
|
|
4171
|
-
case "standard": phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4172
|
-
if (index === 0) return `(${char}`;
|
|
4173
|
-
if (index === 2) return `${char}) `;
|
|
4174
|
-
if (index === 5) return `${char}-`;
|
|
4175
|
-
return char;
|
|
4176
|
-
}).join("");
|
|
4177
|
-
}
|
|
4178
|
-
return `${options?.countryCode ? `+${options?.countryCode} ` : ""}` + phoneNumber;
|
|
4179
|
-
}
|
|
4180
|
-
/**
|
|
4181
|
-
* ### Split Camel Case
|
|
4182
|
-
* - Separates a camel case string with a joiner (default: ' ')
|
|
4183
|
-
* @param {string} string
|
|
4184
|
-
* @returns {string} string
|
|
4185
|
-
*/
|
|
4186
|
-
function splitCamelCase(string, joiner = " ") {
|
|
4187
|
-
if (string[0].match(/[A-Z0-9]/) || string.includes(" ")) return string;
|
|
4188
|
-
let lastChar = "";
|
|
4189
|
-
return string.split("").map((char) => {
|
|
4190
|
-
let returnedString = char;
|
|
4191
|
-
if (char.match(/[A-Z0-9]/)) returnedString = ` ${char}`;
|
|
4192
|
-
if (lastChar.match(/[0-9]/) && char.match(/[0-9]/)) returnedString = char;
|
|
4193
|
-
lastChar = char;
|
|
4194
|
-
return returnedString;
|
|
4195
|
-
}).join(joiner);
|
|
4196
|
-
}
|
|
4197
|
-
/**
|
|
4198
|
-
* ### To Camel Case
|
|
4199
|
-
* - Converts any string to camel case based on spaces
|
|
4200
|
-
* - Eliminates no letter-number characters
|
|
4201
|
-
* @param {string} string
|
|
4202
|
-
* @returns {string} string
|
|
4203
|
-
*/
|
|
4204
|
-
function toCamelCase(string, delimiter = " ") {
|
|
4205
|
-
if (typeof string !== "string") return string;
|
|
4206
|
-
return string.toLowerCase().replace(/[^a-z0-9]/gi, delimiter).split(delimiter).map((str, index) => index === 0 ? str : str.substring(0, 1).toUpperCase() + str.substring(1, str.length).toLowerCase()).join("");
|
|
4207
|
-
}
|
|
4208
|
-
/**
|
|
4209
|
-
* # To Lower Case
|
|
4210
|
-
* Converts a string to lowercase, and offers easy string replacements for creating snake case, kebab case, or your own.
|
|
4211
|
-
* @param str - The string to convert to lowercase.
|
|
4212
|
-
* @param options - Configuration options.
|
|
4213
|
-
* @param options[0] - The delimiter to split the string. Defaults to space.
|
|
4214
|
-
* @param options[1] - The string to join the parts back together. Defaults to space.
|
|
4215
|
-
* @returns The lowercase version of the input string, with the replacements, if provided.
|
|
4216
|
-
*/
|
|
4217
|
-
function toLowerCase(str, [delimiter, joiner]) {
|
|
4218
|
-
return str.toLowerCase().replaceAll(delimiter || " ", joiner || " ");
|
|
4219
|
-
}
|
|
4220
|
-
/**
|
|
4221
|
-
* ### To Title Case
|
|
4222
|
-
* - Converts any string to title case based on spaces
|
|
4223
|
-
* @param {string} string
|
|
4224
|
-
* @returns {string} string
|
|
4225
|
-
*/
|
|
4226
|
-
function toTitleCase(string, delimiter = " ") {
|
|
4227
|
-
if (typeof string !== "string") return string;
|
|
4228
|
-
return string.toLowerCase().split(delimiter).map((str) => str.substring(0, 1).toUpperCase() + str.substring(1, str.length).toLowerCase()).join(" ");
|
|
4229
|
-
}
|
|
4230
|
-
|
|
4231
3799
|
//#endregion
|
|
4232
3800
|
//#region src/components/chevron-up-down-anime.tsx
|
|
4233
3801
|
function ChevronUpDownAnime({ className, isUp = false }) {
|
|
4234
|
-
const firstLoadRef =
|
|
4235
|
-
const controlPathRef =
|
|
4236
|
-
|
|
3802
|
+
const firstLoadRef = useRef(true);
|
|
3803
|
+
const controlPathRef = useRef(null), chevronDownRef = useRef(null), chevronUpRef = useRef(null);
|
|
3804
|
+
useEffect(() => {
|
|
4237
3805
|
if (firstLoadRef.current) {
|
|
4238
3806
|
firstLoadRef.current = false;
|
|
4239
3807
|
return;
|
|
@@ -4250,57 +3818,85 @@ function ChevronUpDownAnime({ className, isUp = false }) {
|
|
|
4250
3818
|
ease: "outExpo"
|
|
4251
3819
|
});
|
|
4252
3820
|
}, [isUp]);
|
|
4253
|
-
return
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
3821
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
3822
|
+
viewBox: "0 0 69 39",
|
|
3823
|
+
className: twMerge("w-4", className),
|
|
3824
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
3825
|
+
d: "M3.997,4.008l30.498,30.989l30.498,-30.989",
|
|
3826
|
+
className: "fill-none stroke-8",
|
|
3827
|
+
strokeLinecap: "round",
|
|
3828
|
+
ref: controlPathRef
|
|
3829
|
+
}), /* @__PURE__ */ jsxs("g", {
|
|
3830
|
+
className: "opacity-0",
|
|
3831
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
3832
|
+
d: "M3.997,4.008l30.498,30.989l30.498,-30.989",
|
|
3833
|
+
ref: chevronDownRef
|
|
3834
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
3835
|
+
d: "M3.997,34.997l30.498,-30.989l30.498,30.989",
|
|
3836
|
+
ref: chevronUpRef
|
|
3837
|
+
})]
|
|
3838
|
+
})]
|
|
3839
|
+
});
|
|
4262
3840
|
}
|
|
4263
3841
|
|
|
4264
3842
|
//#endregion
|
|
4265
3843
|
//#region src/components/details.tsx
|
|
4266
3844
|
function DetailsSummary({ arrow = true, children, className, onClick, ...props }) {
|
|
4267
|
-
const [isUp, setIsUp] =
|
|
3845
|
+
const [isUp, setIsUp] = useState(false);
|
|
4268
3846
|
const handleClick = (e) => {
|
|
4269
3847
|
setIsUp((previous) => !previous);
|
|
4270
3848
|
onClick?.(e);
|
|
4271
3849
|
};
|
|
4272
|
-
return
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
3850
|
+
return /* @__PURE__ */ jsx(DisclosureButton, {
|
|
3851
|
+
...props,
|
|
3852
|
+
as: Button,
|
|
3853
|
+
className: twMerge("w-full", className, Boolean(arrow) && "grid grid-cols-[1fr_1rem] gap-2"),
|
|
3854
|
+
onClick: handleClick,
|
|
3855
|
+
role: "summary",
|
|
3856
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
|
|
3857
|
+
className: "absolute top-1/2 right-3 block -translate-y-1/2",
|
|
3858
|
+
isUp
|
|
3859
|
+
}) : arrow)] })
|
|
3860
|
+
});
|
|
4279
3861
|
}
|
|
4280
3862
|
function DetailsBody({ children, className, ...props }) {
|
|
4281
|
-
return
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
3863
|
+
return /* @__PURE__ */ jsx(DisclosurePanel, {
|
|
3864
|
+
...props,
|
|
3865
|
+
className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
|
|
3866
|
+
transition: true,
|
|
3867
|
+
children: (bag) => /* @__PURE__ */ jsx("div", {
|
|
3868
|
+
className: "overflow-y-hidden px-2 pt-3 pb-1",
|
|
3869
|
+
children: typeof children === "function" ? children(bag) : children
|
|
3870
|
+
})
|
|
3871
|
+
});
|
|
4286
3872
|
}
|
|
4287
3873
|
function Details({ as = "div", className, ...props }) {
|
|
4288
|
-
return
|
|
3874
|
+
return /* @__PURE__ */ jsx(Disclosure, {
|
|
3875
|
+
...props,
|
|
3876
|
+
as,
|
|
3877
|
+
className: twMerge("rounded-2xl bg-neutral-500/25 p-2", className),
|
|
3878
|
+
role: "details"
|
|
3879
|
+
});
|
|
4289
3880
|
}
|
|
4290
3881
|
|
|
4291
3882
|
//#endregion
|
|
4292
3883
|
//#region src/components/drop-down.tsx
|
|
4293
3884
|
function DropDownButton({ arrow = true, as, children, className, ...props }) {
|
|
4294
|
-
return
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
3885
|
+
return /* @__PURE__ */ jsx(MenuButton, {
|
|
3886
|
+
...props,
|
|
3887
|
+
as: as || "button",
|
|
3888
|
+
className: twJoin("group/button", className),
|
|
3889
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
|
|
3890
|
+
className: "-mr-1",
|
|
3891
|
+
isUp: bag.open
|
|
3892
|
+
}) : arrow)] })
|
|
3893
|
+
});
|
|
4301
3894
|
}
|
|
4302
3895
|
function DropDownItem({ as, ...props }) {
|
|
4303
|
-
return
|
|
3896
|
+
return /* @__PURE__ */ jsx(MenuItem, {
|
|
3897
|
+
...props,
|
|
3898
|
+
as: as || "div"
|
|
3899
|
+
});
|
|
4304
3900
|
}
|
|
4305
3901
|
function DropDownItems({ anchor, children, className, containerClassName, style, ...props }) {
|
|
4306
3902
|
const getAnchorProps = () => {
|
|
@@ -4319,41 +3915,53 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
|
|
|
4319
3915
|
return initialAnchor;
|
|
4320
3916
|
};
|
|
4321
3917
|
const anchorProps = getAnchorProps();
|
|
4322
|
-
return
|
|
4323
|
-
...
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
3918
|
+
return /* @__PURE__ */ jsx(MenuItems, {
|
|
3919
|
+
...props,
|
|
3920
|
+
anchor: anchorProps,
|
|
3921
|
+
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),
|
|
3922
|
+
static: props.static,
|
|
3923
|
+
style: {
|
|
3924
|
+
...style,
|
|
3925
|
+
minWidth: "var(--button-width)"
|
|
3926
|
+
},
|
|
3927
|
+
transition: true,
|
|
3928
|
+
children: (bag) => /* @__PURE__ */ jsx("div", {
|
|
3929
|
+
className: "overflow-y-scroll",
|
|
3930
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
3931
|
+
className: twMerge("rounded-xl bg-neutral-50/20 px-6 py-5 backdrop-blur-md backdrop-brightness-150", className),
|
|
3932
|
+
children: typeof children === "function" ? children(bag) : children
|
|
3933
|
+
})
|
|
3934
|
+
})
|
|
3935
|
+
});
|
|
4332
3936
|
}
|
|
4333
3937
|
function DropDownSection({ children, label, labelProps, separatorAbove, separatorBelow, ...props }) {
|
|
4334
3938
|
const { labelClassName, ...restLabelProps } = {
|
|
4335
3939
|
labelClassName: labelProps?.className || "",
|
|
4336
3940
|
...labelProps
|
|
4337
3941
|
};
|
|
4338
|
-
return
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
3942
|
+
return /* @__PURE__ */ jsx(MenuSection, {
|
|
3943
|
+
...props,
|
|
3944
|
+
children: (sectionBag) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3945
|
+
separatorAbove && /* @__PURE__ */ jsx(DropDownSeparator, {}),
|
|
3946
|
+
label && /* @__PURE__ */ jsx(MenuHeading, {
|
|
3947
|
+
...restLabelProps,
|
|
3948
|
+
className: (headingBag) => twMerge("text-[larger] font-bold text-current/80", typeof labelClassName === "function" ? labelClassName(headingBag) : labelClassName),
|
|
3949
|
+
children: label
|
|
3950
|
+
}),
|
|
3951
|
+
typeof children === "function" ? children(sectionBag) : children,
|
|
3952
|
+
separatorBelow && /* @__PURE__ */ jsx(DropDownSeparator, {})
|
|
3953
|
+
] })
|
|
3954
|
+
});
|
|
4351
3955
|
}
|
|
4352
3956
|
function DropDownSeparator({ as, className, ...props }) {
|
|
4353
|
-
return
|
|
3957
|
+
return /* @__PURE__ */ jsx(MenuSeparator, {
|
|
3958
|
+
...props,
|
|
3959
|
+
as: as || "div",
|
|
3960
|
+
className: (bag) => twMerge("my-4 block h-px rounded-full bg-neutral-950/20", typeof className === "function" ? className(bag) : className)
|
|
3961
|
+
});
|
|
4354
3962
|
}
|
|
4355
3963
|
function DropDown(props) {
|
|
4356
|
-
return
|
|
3964
|
+
return /* @__PURE__ */ jsx(Menu, { ...props });
|
|
4357
3965
|
}
|
|
4358
3966
|
|
|
4359
3967
|
//#endregion
|
|
@@ -4361,40 +3969,45 @@ function DropDown(props) {
|
|
|
4361
3969
|
function Fieldset({ children, className, legend, legendProps, name, ...props }) {
|
|
4362
3970
|
const { className: legendClassName, ...restLegendProps } = legendProps || {};
|
|
4363
3971
|
name = legend || name;
|
|
4364
|
-
return
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
3972
|
+
return /* @__PURE__ */ jsx(Fieldset$1, {
|
|
3973
|
+
...props,
|
|
3974
|
+
name,
|
|
3975
|
+
className: (bag) => twMerge("contents", typeof className === "function" ? className(bag) : className),
|
|
3976
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [legend && /* @__PURE__ */ jsx(Legend, {
|
|
3977
|
+
...restLegendProps,
|
|
3978
|
+
className: twMerge("text-xl font-bold text-current/80", typeof legendClassName === "function" ? legendClassName(bag) : legendClassName),
|
|
3979
|
+
children: legend
|
|
3980
|
+
}), typeof children === "function" ? children(bag) : children] })
|
|
3981
|
+
});
|
|
4373
3982
|
}
|
|
4374
3983
|
|
|
4375
3984
|
//#endregion
|
|
4376
3985
|
//#region src/components/form.tsx
|
|
4377
3986
|
function Form({ children, className, ...props }) {
|
|
4378
|
-
return
|
|
4379
|
-
|
|
4380
|
-
|
|
3987
|
+
return /* @__PURE__ */ jsx("form", {
|
|
3988
|
+
...props,
|
|
3989
|
+
className: twMerge("grid gap-3", className),
|
|
3990
|
+
children
|
|
3991
|
+
});
|
|
4381
3992
|
}
|
|
4382
3993
|
|
|
4383
3994
|
//#endregion
|
|
4384
3995
|
//#region src/components/ghost.tsx
|
|
4385
3996
|
function Ghost({ children, className, ...props }) {
|
|
4386
|
-
return
|
|
4387
|
-
|
|
4388
|
-
|
|
3997
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3998
|
+
...props,
|
|
3999
|
+
className: twMerge("block w-24 max-w-full animate-pulse rounded bg-neutral-500/15 backdrop-brightness-110", className),
|
|
4000
|
+
children: children || /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })
|
|
4001
|
+
});
|
|
4389
4002
|
}
|
|
4390
4003
|
|
|
4391
4004
|
//#endregion
|
|
4392
4005
|
//#region src/components/heading.tsx
|
|
4393
4006
|
function getTextFromChildren(children) {
|
|
4394
4007
|
let text = "";
|
|
4395
|
-
|
|
4008
|
+
Children.forEach(children, (child) => {
|
|
4396
4009
|
if (typeof child === "string" || typeof child === "number") text += child;
|
|
4397
|
-
else if (
|
|
4010
|
+
else if (isValidElement(child)) text += getTextFromChildren(child.props.children);
|
|
4398
4011
|
});
|
|
4399
4012
|
return text;
|
|
4400
4013
|
}
|
|
@@ -4417,42 +4030,64 @@ function Heading({ as = "h2", children, customize, className, id, ref, ...props
|
|
|
4417
4030
|
}
|
|
4418
4031
|
};
|
|
4419
4032
|
const baseClasses = getBaseClasses();
|
|
4420
|
-
return
|
|
4421
|
-
|
|
4422
|
-
|
|
4033
|
+
return /* @__PURE__ */ jsx(HeadingElement, {
|
|
4034
|
+
ref,
|
|
4035
|
+
id: targetableID,
|
|
4036
|
+
...props,
|
|
4037
|
+
className: twMerge(baseClasses, className),
|
|
4038
|
+
children
|
|
4039
|
+
});
|
|
4423
4040
|
}
|
|
4424
4041
|
|
|
4425
4042
|
//#endregion
|
|
4426
4043
|
//#region src/symbols/chevron.forward.tsx
|
|
4427
4044
|
function ChevronForward({ weight = "regular", ...props }) {
|
|
4428
4045
|
switch (weight) {
|
|
4429
|
-
case "ultralight": return
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
case "
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4046
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
4047
|
+
viewBox: "14.6484 -64.7007 33.47 58.89",
|
|
4048
|
+
...props,
|
|
4049
|
+
children: /* @__PURE__ */ jsx("path", { d: "M48.1162-35.2539C48.1162-35.6924 47.9527-35.9424 47.6221-36.2276L16.6289-64.3462C16.396-64.5826 16.1006-64.7007 15.7949-64.7007C15.1802-64.7007 14.6484-64.2178 14.6484-63.5576C14.6484-63.2554 14.7734-63.002 14.9575-62.811L45.2949-35.2539L14.9575-7.69678C14.7734-7.50586 14.6484-7.25585 14.6484-6.95018C14.6484-6.29001 15.1802-5.80709 15.7949-5.80709C16.1006-5.80709 16.396-5.92526 16.6289-6.16159L47.6221-34.2803C47.9527-34.5654 48.1162-34.8154 48.1162-35.2539Z" })
|
|
4050
|
+
});
|
|
4051
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
4052
|
+
viewBox: "14.6484 -65.7364 34.55 60.96",
|
|
4053
|
+
...props,
|
|
4054
|
+
children: /* @__PURE__ */ jsx("path", { d: "M49.2032-35.2539C49.2032-35.8359 48.9883-36.25 48.5449-36.6582L17.7364-65.1973C17.3907-65.5567 16.9414-65.7364 16.4512-65.7364C15.457-65.7364 14.6484-64.9766 14.6484-63.9473C14.6484-63.4707 14.8555-63.043 15.1523-62.7187L44.8027-35.2539L15.1523-7.78906C14.8555-7.46484 14.6484-7.05078 14.6484-6.56054C14.6484-5.53123 15.457-4.77146 16.4512-4.77146C16.9414-4.77146 17.3907-4.95115 17.7364-5.31052L48.5449-33.8496C48.9883-34.2578 49.2032-34.6719 49.2032-35.2539Z" })
|
|
4055
|
+
});
|
|
4056
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
4057
|
+
viewBox: "14.6484 -67.7583 36.68 65.01",
|
|
4058
|
+
...props,
|
|
4059
|
+
children: /* @__PURE__ */ jsx("path", { d: "M51.3252-35.2539C51.3252-36.1162 51.0103-36.8506 50.3467-37.499L19.8985-66.8589C19.3325-67.4585 18.583-67.7583 17.7324-67.7583C15.9976-67.7583 14.6484-66.458 14.6484-64.708C14.6484-63.8911 15.0156-63.123 15.5327-62.5386L43.8418-35.2539L15.5327-7.96924C15.0156-7.38477 14.6484-6.65039 14.6484-5.7998C14.6484-4.0498 15.9976-2.7495 17.7324-2.7495C18.583-2.7495 19.3325-3.04931 19.8985-3.64892L50.3467-33.0088C51.0103-33.6572 51.3252-34.3916 51.3252-35.2539Z" })
|
|
4060
|
+
});
|
|
4061
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
4062
|
+
viewBox: "14.6484 -69.2871 38.28 68.07",
|
|
4063
|
+
...props,
|
|
4064
|
+
children: /* @__PURE__ */ jsx("path", { d: "M52.9297-35.2539C52.9297-36.3281 52.5391-37.3047 51.709-38.1348L21.5332-68.1152C20.8008-68.8965 19.8242-69.2871 18.7012-69.2871C16.4062-69.2871 14.6484-67.5781 14.6484-65.2832C14.6484-64.209 15.1367-63.1836 15.8203-62.4023L43.1152-35.2539L15.8203-8.10547C15.1367-7.32422 14.6484-6.34766 14.6484-5.22461C14.6484-2.92969 16.4062-1.2207 18.7012-1.2207C19.8242-1.2207 20.8008-1.61133 21.5332-2.39258L51.709-32.373C52.5391-33.2031 52.9297-34.1797 52.9297-35.2539Z" })
|
|
4065
|
+
});
|
|
4066
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
4067
|
+
viewBox: "14.8242 -69.832 39.74 69.17",
|
|
4068
|
+
...props,
|
|
4069
|
+
children: /* @__PURE__ */ jsx("path", { d: "M54.5645-35.2539C54.5557-36.6797 54.0508-37.9023 52.9131-39.0312L23.2559-68.4141C22.3389-69.3711 21.1777-69.832 19.8086-69.832C17.0215-69.832 14.8242-67.6836 14.8242-64.9141C14.8242-63.585 15.4092-62.3223 16.3389-61.3301L42.7109-35.2627L16.3389-9.17773C15.418-8.18555 14.8242-6.96289 14.8242-5.58496C14.8242-2.81543 17.0215-0.666992 19.8086-0.666992C21.1689-0.666992 22.3389-1.12793 23.2559-2.08496L52.9131-31.4766C54.0596-32.6055 54.5645-33.8369 54.5645-35.2539Z" })
|
|
4070
|
+
});
|
|
4071
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
4072
|
+
viewBox: "14.959 -70.2498 40.86 70.01",
|
|
4073
|
+
...props,
|
|
4074
|
+
children: /* @__PURE__ */ jsx("path", { d: "M55.8178-35.2539C55.8022-36.9492 55.2098-38.3605 53.8362-39.7186L24.5766-68.6432C23.5181-69.735 22.2154-70.2498 20.6576-70.2498C17.4932-70.2498 14.959-67.7645 14.959-64.6311C14.959-63.1065 15.6181-61.6619 16.7364-60.508L42.401-35.2694L16.7364-9.9998C15.6336-8.8459 14.959-7.43457 14.959-5.86123C14.959-2.72783 17.4932-0.24248 20.6576-0.24248C22.1999-0.24248 23.5181-0.757324 24.5766-1.84912L53.8362-30.7893C55.2253-32.1473 55.8178-33.5741 55.8178-35.2539Z" })
|
|
4075
|
+
});
|
|
4076
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
4077
|
+
viewBox: "15.1367 -70.8008 42.33 71.12",
|
|
4078
|
+
...props,
|
|
4079
|
+
children: /* @__PURE__ */ jsx("path", { d: "M57.4707-35.2539C57.4463-37.3047 56.7383-38.9648 55.0537-40.625L26.3184-68.9453C25.0732-70.2148 23.584-70.8008 21.7773-70.8008C18.1152-70.8008 15.1367-67.8711 15.1367-64.2578C15.1367-62.4756 15.8936-60.791 17.2607-59.4238L41.9922-35.2783L17.2607-11.084C15.918-9.7168 15.1367-8.05664 15.1367-6.22559C15.1367-2.6123 18.1152 0.317383 21.7773 0.317383C23.5596 0.317383 25.0732-0.268555 26.3184-1.53809L55.0537-29.8828C56.7627-31.543 57.4707-33.2275 57.4707-35.2539Z" })
|
|
4080
|
+
});
|
|
4081
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
4082
|
+
viewBox: "15.3945 -71.5999 44.47 72.73",
|
|
4083
|
+
...props,
|
|
4084
|
+
children: /* @__PURE__ */ jsx("path", { d: "M59.8682-35.2539C59.8309-37.8203 58.9553-39.8413 56.8196-41.9397L28.8447-69.3836C27.3289-70.9109 25.569-71.5999 23.4014-71.5999C19.0175-71.5999 15.3945-68.0258 15.3945-63.7164C15.3945-61.5604 16.2931-59.5278 18.0212-57.8513L41.3993-35.2912L18.0212-12.6565C16.3304-10.98 15.3945-8.95891 15.3945-6.75406C15.3945-2.44474 19.0175 1.12943 23.4014 1.12943C25.5317 1.12943 27.3289 0.440373 28.8447-1.08695L56.8196-28.5681C58.9926-30.6665 59.8682-32.7248 59.8682-35.2539Z" })
|
|
4085
|
+
});
|
|
4086
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
4087
|
+
viewBox: "15.625 -72.3145 46.39 74.17",
|
|
4088
|
+
...props,
|
|
4089
|
+
children: /* @__PURE__ */ jsx("path", { d: "M62.0117-35.2539C61.9629-38.2812 60.9375-40.625 58.3984-43.1152L31.1035-69.7754C29.3457-71.5332 27.3438-72.3145 24.8535-72.3145C19.8242-72.3145 15.625-68.1641 15.625-63.2324C15.625-60.7422 16.6504-58.3984 18.7012-56.4453L40.8691-35.3027L18.7012-14.0625C16.6992-12.1094 15.625-9.76562 15.625-7.22656C15.625-2.29492 19.8242 1.85547 24.8535 1.85547C27.2949 1.85547 29.3457 1.07422 31.1035-0.683594L58.3984-27.3926C60.9863-29.8828 62.0117-32.2754 62.0117-35.2539Z" })
|
|
4090
|
+
});
|
|
4456
4091
|
}
|
|
4457
4092
|
}
|
|
4458
4093
|
|
|
@@ -6129,8 +5764,8 @@ function generateHumanValidationToken() {
|
|
|
6129
5764
|
}).join("")}_${weekCode}`;
|
|
6130
5765
|
}
|
|
6131
5766
|
function HumanVerification({ children = "Verify", className }) {
|
|
6132
|
-
const [dragProgress, setDragProgress] =
|
|
6133
|
-
const submitButtonRef =
|
|
5767
|
+
const [dragProgress, setDragProgress] = useState(0);
|
|
5768
|
+
const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
|
|
6134
5769
|
const handleTrySubmit = (x) => {
|
|
6135
5770
|
if (x > 239) {
|
|
6136
5771
|
const form = buttonRef.current?.closest("form");
|
|
@@ -6175,7 +5810,7 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6175
5810
|
setTimeout(() => tokenInput.remove(), 1e3);
|
|
6176
5811
|
}
|
|
6177
5812
|
};
|
|
6178
|
-
const onDraggable =
|
|
5813
|
+
const onDraggable = useEffectEvent(() => {
|
|
6179
5814
|
if (!buttonRef.current || !buttonContainerRef.current) return;
|
|
6180
5815
|
const draggable = createDraggable(buttonRef.current, {
|
|
6181
5816
|
container: buttonContainerRef.current,
|
|
@@ -6194,7 +5829,7 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6194
5829
|
}
|
|
6195
5830
|
draggableRef.current = draggable;
|
|
6196
5831
|
});
|
|
6197
|
-
|
|
5832
|
+
useEffect(() => {
|
|
6198
5833
|
onDraggable();
|
|
6199
5834
|
}, []);
|
|
6200
5835
|
const moveButton = (e) => {
|
|
@@ -6221,32 +5856,54 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6221
5856
|
setDragProgress(Math.min(100, Math.max(0, Math.round(newX / 240 * 100))));
|
|
6222
5857
|
handleTrySubmit(newX);
|
|
6223
5858
|
};
|
|
6224
|
-
return
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
5859
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
5860
|
+
className: ["w-72", className].join(" "),
|
|
5861
|
+
children: [
|
|
5862
|
+
/* @__PURE__ */ jsxs("div", {
|
|
5863
|
+
className: "h-12 w-72 rounded-md bg-neutral-300 p-1",
|
|
5864
|
+
ref: buttonContainerRef,
|
|
5865
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
5866
|
+
"aria-describedby": "human-verification-instructions",
|
|
5867
|
+
"aria-label": `Human verification: ${children.toLowerCase()} by dragging right or pressing arrow keys`,
|
|
5868
|
+
"aria-valuemax": 100,
|
|
5869
|
+
"aria-valuemin": 0,
|
|
5870
|
+
"aria-valuenow": dragProgress,
|
|
5871
|
+
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",
|
|
5872
|
+
onKeyDown: moveButton,
|
|
5873
|
+
ref: buttonRef,
|
|
5874
|
+
role: "slider",
|
|
5875
|
+
type: "button",
|
|
5876
|
+
children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
|
|
5877
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
5878
|
+
className: "flex size-full items-center justify-center pl-8 text-center text-sm font-semibold text-neutral-800",
|
|
5879
|
+
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
5880
|
+
"Swipe to ",
|
|
5881
|
+
children,
|
|
5882
|
+
" ",
|
|
5883
|
+
/* @__PURE__ */ jsx(ChevronForward, { className: "ml-1 inline-block h-3.5 overflow-visible stroke-2" })
|
|
5884
|
+
] })
|
|
5885
|
+
})]
|
|
5886
|
+
}),
|
|
5887
|
+
/* @__PURE__ */ jsx(Button, {
|
|
5888
|
+
ref: submitButtonRef,
|
|
5889
|
+
className: "sr-only",
|
|
5890
|
+
type: "submit",
|
|
5891
|
+
children: "Complete Submit"
|
|
5892
|
+
}),
|
|
5893
|
+
/* @__PURE__ */ jsxs("div", {
|
|
5894
|
+
id: "human-verification-instructions",
|
|
5895
|
+
className: "pt-1 text-center text-xs",
|
|
5896
|
+
children: [
|
|
5897
|
+
"Human verification challenge.",
|
|
5898
|
+
" ",
|
|
5899
|
+
/* @__PURE__ */ jsx("span", {
|
|
5900
|
+
className: "sr-only",
|
|
5901
|
+
children: "Drag the button right to the end to complete the challenge. Use arrow keys or spacebar to move without a mouse."
|
|
5902
|
+
})
|
|
5903
|
+
]
|
|
5904
|
+
})
|
|
5905
|
+
]
|
|
5906
|
+
});
|
|
6250
5907
|
}
|
|
6251
5908
|
|
|
6252
5909
|
//#endregion
|
|
@@ -6308,7 +5965,14 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
|
|
|
6308
5965
|
});
|
|
6309
5966
|
return propertyDefinition.join(" ");
|
|
6310
5967
|
}) || []).join("; ");
|
|
6311
|
-
return
|
|
5968
|
+
return /* @__PURE__ */ jsx("iframe", {
|
|
5969
|
+
...props,
|
|
5970
|
+
allow: allowAttribute,
|
|
5971
|
+
allowFullScreen: allowAttribute?.includes("fullscreen") || props.src?.replace(/[^a-zA-Z]/g, "").includes("vimeo") || props.src?.replace(/[^a-zA-Z]/g, "").includes("youtube"),
|
|
5972
|
+
className: twMerge("aspect-video w-full bg-linear-60 from-neutral-700 via-neutral-500 to-neutral-600", className),
|
|
5973
|
+
referrerPolicy,
|
|
5974
|
+
sandbox: sandbox?.join(" ")
|
|
5975
|
+
});
|
|
6312
5976
|
}
|
|
6313
5977
|
|
|
6314
5978
|
//#endregion
|
|
@@ -6328,54 +5992,78 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
|
|
|
6328
5992
|
* @prop descriptionProps - The props to be passed to the description component.
|
|
6329
5993
|
*/
|
|
6330
5994
|
function Input({ children, className, description, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, fieldProps: { className: fieldClassName, ...fieldProps } = {}, label, labelProps: { className: labelClassName, ...labelProps } = {}, required = true, ...props }) {
|
|
6331
|
-
return
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
5995
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
5996
|
+
...fieldProps,
|
|
5997
|
+
className: (bag) => twMerge("grid h-fit gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
5998
|
+
children: [
|
|
5999
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
6000
|
+
...labelProps,
|
|
6001
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6002
|
+
children: label
|
|
6003
|
+
}),
|
|
6004
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
|
|
6005
|
+
...props,
|
|
6006
|
+
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),
|
|
6007
|
+
required
|
|
6008
|
+
}), children] }),
|
|
6009
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
6010
|
+
...descriptionProps,
|
|
6011
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6012
|
+
children: description
|
|
6013
|
+
})
|
|
6014
|
+
]
|
|
6015
|
+
});
|
|
6346
6016
|
}
|
|
6347
6017
|
|
|
6348
6018
|
//#endregion
|
|
6349
6019
|
//#region src/symbols/xmark.tsx
|
|
6350
6020
|
function Xmark({ weight = "regular", ...props }) {
|
|
6351
6021
|
switch (weight) {
|
|
6352
|
-
case "ultralight": return
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
case "
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6022
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
6023
|
+
viewBox: "9.64746 -64.0801 57.84 57.84",
|
|
6024
|
+
...props,
|
|
6025
|
+
children: /* @__PURE__ */ jsx("path", { d: "M65.4941-63.6108L10.1167-8.27883C9.65088-7.813 9.64746-7.13232 10.1167-6.66308C10.544-6.23924 11.2212-6.23924 11.6905-6.66308L67.0645-62.0371C67.4883-62.5063 67.4917-63.187 67.0645-63.6108C66.5918-64.0767 65.918-64.0801 65.4941-63.6108ZM67.0645-8.27883L11.6905-63.6108C11.2212-64.0767 10.5405-64.0801 10.1167-63.6108C9.65088-63.1836 9.65088-62.5063 10.1167-62.0371L65.4941-6.66308C65.9146-6.23924 66.5952-6.23924 67.0645-6.66308C67.4883-7.13574 67.4883-7.813 67.0645-8.27883Z" })
|
|
6026
|
+
});
|
|
6027
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
6028
|
+
viewBox: "9.58594 -64.5723 58.82 58.8",
|
|
6029
|
+
...props,
|
|
6030
|
+
children: /* @__PURE__ */ jsx("path", { d: "M65.248-63.8672L10.291-8.94533C9.59961-8.25392 9.58594-7.14258 10.291-6.43749C10.9746-5.76757 12.0723-5.76757 12.7774-6.43749L67.7207-61.3808C68.3906-62.0859 68.4043-63.1973 67.7207-63.8672C67.002-64.5586 65.918-64.5723 65.248-63.8672ZM67.7207-8.94533L12.7774-63.8672C12.0723-64.5586 10.9609-64.5723 10.291-63.8672C9.59961-63.1836 9.59961-62.0859 10.291-61.3808L65.248-6.43749C65.9043-5.76757 67.0156-5.76757 67.7207-6.43749C68.3906-7.15625 68.3906-8.25392 67.7207-8.94533Z" })
|
|
6031
|
+
});
|
|
6032
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
6033
|
+
viewBox: "9.46582 -65.5332 60.72 60.69",
|
|
6034
|
+
...props,
|
|
6035
|
+
children: /* @__PURE__ */ jsx("path", { d: "M64.7676-64.3677L10.6313-10.2466C9.49951-9.11475 9.46582-7.1626 10.6313-5.99707C11.8154-4.84667 13.7339-4.84667 14.8994-5.99707L69.002-60.0996C70.1524-61.2651 70.186-63.2173 69.002-64.3677C67.8027-65.4995 65.918-65.5332 64.7676-64.3677ZM69.002-10.2466L14.8994-64.3677C13.7339-65.4995 11.7817-65.5332 10.6313-64.3677C9.49951-63.1836 9.49951-61.2651 10.6313-60.0996L64.7676-5.99707C65.8843-4.84667 67.8364-4.84667 69.002-5.99707C70.1524-7.19629 70.1524-9.11475 69.002-10.2466Z" })
|
|
6036
|
+
});
|
|
6037
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
6038
|
+
viewBox: "9.375 -66.2598 62.16 62.11",
|
|
6039
|
+
...props,
|
|
6040
|
+
children: /* @__PURE__ */ jsx("path", { d: "M64.4043-64.7461L10.8887-11.2305C9.42383-9.76562 9.375-7.17773 10.8887-5.66406C12.4512-4.15039 14.9902-4.15039 16.5039-5.66406L69.9707-59.1309C71.4844-60.6445 71.5332-63.2324 69.9707-64.7461C68.4082-66.2109 65.918-66.2598 64.4043-64.7461ZM69.9707-11.2305L16.5039-64.7461C14.9902-66.2109 12.4023-66.2598 10.8887-64.7461C9.42383-63.1836 9.42383-60.6445 10.8887-59.1309L64.4043-5.66406C65.8691-4.15039 68.457-4.15039 69.9707-5.66406C71.4844-7.22656 71.4844-9.76562 69.9707-11.2305Z" })
|
|
6041
|
+
});
|
|
6042
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
6043
|
+
viewBox: "9.30469 -66.7871 63.2 63.17",
|
|
6044
|
+
...props,
|
|
6045
|
+
children: /* @__PURE__ */ jsx("path", { d: "M63.9121-64.9746L11.0996-12.1621C9.35352-10.416 9.30469-7.26562 11.126-5.44434C12.9873-3.62305 16.1152-3.64941 17.8838-5.41797L70.6562-58.1904C72.4688-60.0029 72.5-63.1182 70.6299-64.9482C68.7598-66.7383 65.7246-66.7871 63.9121-64.9746ZM70.6562-12.1709L17.8838-64.9834C16.1064-66.7207 12.9561-66.7871 11.126-64.957C9.33594-63.0869 9.3623-59.9766 11.0996-58.1992L63.9121-5.42676C65.6846-3.61426 68.7998-3.62305 70.6299-5.45312C72.46-7.32324 72.4688-10.3984 70.6562-12.1709Z" })
|
|
6046
|
+
});
|
|
6047
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
6048
|
+
viewBox: "9.25078 -67.1914 63.99 63.99",
|
|
6049
|
+
...props,
|
|
6050
|
+
children: /* @__PURE__ */ jsx("path", { d: "M63.5348-65.1498L11.2613-12.8764C9.29961-10.9146 9.25078-7.33301 11.3079-5.27588C13.3983-3.21875 16.9777-3.26533 18.9417-5.2293L71.1818-57.4694C73.2234-59.511 73.2412-63.0306 71.1353-65.1032C69.0293-67.1426 65.5764-67.1914 63.5348-65.1498ZM71.1818-12.8919L18.9417-65.1653C16.9622-67.1115 13.3806-67.1914 11.3079-65.1188C9.26855-63.0128 9.31514-59.4645 11.2613-57.485L63.5348-5.24482C65.5431-3.20322 69.0626-3.21875 71.1353-5.29141C73.2079-7.39736 73.2234-10.8836 71.1818-12.8919Z" })
|
|
6051
|
+
});
|
|
6052
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
6053
|
+
viewBox: "9.17969 -67.7246 65.04 65.06",
|
|
6054
|
+
...props,
|
|
6055
|
+
children: /* @__PURE__ */ jsx("path", { d: "M63.0371-65.3809L11.4746-13.8184C9.22852-11.5723 9.17969-7.42188 11.5479-5.05371C13.9404-2.68555 18.1152-2.75879 20.3369-4.98047L71.875-56.5186C74.2188-58.8623 74.2188-62.915 71.8018-65.3076C69.3848-67.6758 65.3809-67.7246 63.0371-65.3809ZM71.875-13.8428L20.3369-65.4053C18.0908-67.627 13.9404-67.7246 11.5479-65.332C9.17969-62.915 9.25293-58.7891 11.4746-56.543L63.0371-5.00488C65.3564-2.66113 69.4092-2.68555 71.8018-5.07812C74.1943-7.49512 74.2188-11.5234 71.875-13.8428Z" })
|
|
6056
|
+
});
|
|
6057
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
6058
|
+
viewBox: "9.05079 -68.498 66.61 66.62",
|
|
6059
|
+
...props,
|
|
6060
|
+
children: /* @__PURE__ */ jsx("path", { d: "M62.3153-65.716L11.784-15.1847C9.1254-12.5261 9.07657-7.55077 11.8959-4.73147C14.7267-1.91217 19.7651-2.02408 22.3606-4.61956L72.8804-55.1394C75.6624-57.9214 75.6366-62.7475 72.7685-65.6041C69.9003-68.4492 65.0973-68.498 62.3153-65.716ZM72.8804-15.222L22.3606-65.7533C19.7278-68.3745 14.7525-68.498 11.8959-65.6414C9.05079-62.7733 9.1627-57.8095 11.784-55.1767L62.3153-4.65686C65.0858-1.87487 69.9119-1.91217 72.7685-4.76877C75.6251-7.6369 75.6624-12.4515 72.8804-15.222Z" })
|
|
6061
|
+
});
|
|
6062
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
6063
|
+
viewBox: "8.93555 -69.1895 68.02 68.02",
|
|
6064
|
+
...props,
|
|
6065
|
+
children: /* @__PURE__ */ jsx("path", { d: "M61.6699-66.0156L12.0605-16.4062C9.0332-13.3789 8.98438-7.66602 12.207-4.44336C15.4297-1.2207 21.2402-1.36719 24.1699-4.29688L73.7793-53.9062C76.9531-57.0801 76.9043-62.5977 73.6328-65.8691C70.3613-69.1406 64.8438-69.1895 61.6699-66.0156ZM73.7793-16.4551L24.1699-66.0645C21.1914-69.043 15.4785-69.1895 12.207-65.918C8.93555-62.6465 9.08203-56.9336 12.0605-53.9551L61.6699-4.3457C64.8438-1.17188 70.3613-1.2207 73.6328-4.49219C76.9043-7.76367 76.9531-13.2812 73.7793-16.4551Z" })
|
|
6066
|
+
});
|
|
6379
6067
|
}
|
|
6380
6068
|
}
|
|
6381
6069
|
|
|
@@ -6383,7 +6071,7 @@ function Xmark({ weight = "regular", ...props }) {
|
|
|
6383
6071
|
//#region src/hooks/create-fast-context.tsx
|
|
6384
6072
|
function createFastContext(defaultInitialState) {
|
|
6385
6073
|
function useStoreData(initialState = defaultInitialState) {
|
|
6386
|
-
const store =
|
|
6074
|
+
const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
|
|
6387
6075
|
const set = (value) => {
|
|
6388
6076
|
if (typeof value === "function") store.current = value(store.current);
|
|
6389
6077
|
else store.current = value;
|
|
@@ -6399,18 +6087,21 @@ function createFastContext(defaultInitialState) {
|
|
|
6399
6087
|
subscribe
|
|
6400
6088
|
};
|
|
6401
6089
|
}
|
|
6402
|
-
const StoreContext =
|
|
6090
|
+
const StoreContext = createContext(null);
|
|
6403
6091
|
function Provider({ initialValue = defaultInitialState, ...props }) {
|
|
6404
|
-
return
|
|
6092
|
+
return /* @__PURE__ */ jsx(StoreContext.Provider, {
|
|
6093
|
+
value: useStoreData(initialValue),
|
|
6094
|
+
...props
|
|
6095
|
+
});
|
|
6405
6096
|
}
|
|
6406
6097
|
function useStore(selector, initialValue) {
|
|
6407
|
-
const store =
|
|
6098
|
+
const store = useContext(StoreContext);
|
|
6408
6099
|
if (!store) {
|
|
6409
6100
|
const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
|
|
6410
6101
|
const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
|
|
6411
6102
|
return [selectedValue, noOpSet];
|
|
6412
6103
|
}
|
|
6413
|
-
return [
|
|
6104
|
+
return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
|
|
6414
6105
|
}
|
|
6415
6106
|
return {
|
|
6416
6107
|
Provider,
|
|
@@ -6422,128 +6113,6 @@ function createFastContext(defaultInitialState) {
|
|
|
6422
6113
|
//#region src/hooks/use-form-status.tsx
|
|
6423
6114
|
const DEFAULT_STATUS = "incomplete";
|
|
6424
6115
|
const { Provider, useStore } = createFastContext(DEFAULT_STATUS);
|
|
6425
|
-
function FormStatusProvider({ children, initialStatus = DEFAULT_STATUS }) {
|
|
6426
|
-
return <react.Suspense>
|
|
6427
|
-
<Provider initialValue={initialStatus}>{children}</Provider>
|
|
6428
|
-
</react.Suspense>;
|
|
6429
|
-
}
|
|
6430
|
-
function useFormStatus() {
|
|
6431
|
-
return useStore((store) => store);
|
|
6432
|
-
}
|
|
6433
|
-
|
|
6434
|
-
//#endregion
|
|
6435
|
-
//#region src/hooks/use-pointer-movement.ts
|
|
6436
|
-
function usePointerMovement(props) {
|
|
6437
|
-
const pointerTypeRef = (0, react.useRef)("pointer"), [isTracking, setIsTracking] = (0, react.useState)(false), [delta, setDelta] = (0, react.useState)({
|
|
6438
|
-
x: 0,
|
|
6439
|
-
y: 0
|
|
6440
|
-
}), startCoordsRef = (0, react.useRef)({
|
|
6441
|
-
x: 0,
|
|
6442
|
-
y: 0
|
|
6443
|
-
});
|
|
6444
|
-
const styleID = (0, react.useId)();
|
|
6445
|
-
const changeCursor = (cursor) => {
|
|
6446
|
-
if (cursor === false) {
|
|
6447
|
-
document.querySelector(`#${styleID}`)?.remove();
|
|
6448
|
-
return;
|
|
6449
|
-
}
|
|
6450
|
-
const css = `*, *:active { cursor: ${cursor}; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }`;
|
|
6451
|
-
const style = document.createElement("style");
|
|
6452
|
-
style.id = styleID;
|
|
6453
|
-
style.innerHTML = css;
|
|
6454
|
-
document.body.prepend(style);
|
|
6455
|
-
};
|
|
6456
|
-
const trackPointerMovement = (e) => {
|
|
6457
|
-
changeCursor(props?.activeCursor || "grabbing");
|
|
6458
|
-
const { type } = e;
|
|
6459
|
-
switch (type) {
|
|
6460
|
-
case "mousemove":
|
|
6461
|
-
case "mouseup":
|
|
6462
|
-
case "pointermove":
|
|
6463
|
-
case "pointerup":
|
|
6464
|
-
case "touchmove":
|
|
6465
|
-
case "touchend": throw new Error("To initiate the tracking of pointer movement, you must use a `mousedown`, `pointerdown`, or `touchstart`.");
|
|
6466
|
-
case "mousedown":
|
|
6467
|
-
pointerTypeRef.current = "mouse";
|
|
6468
|
-
break;
|
|
6469
|
-
case "pointerdown":
|
|
6470
|
-
pointerTypeRef.current = "pointer";
|
|
6471
|
-
break;
|
|
6472
|
-
case "touchstart":
|
|
6473
|
-
pointerTypeRef.current = "touch";
|
|
6474
|
-
break;
|
|
6475
|
-
}
|
|
6476
|
-
let x = 0, y = 0;
|
|
6477
|
-
if ("touches" in e) {
|
|
6478
|
-
const { touches } = e;
|
|
6479
|
-
if (touches.length > 1) return;
|
|
6480
|
-
x = touches[0].clientX;
|
|
6481
|
-
y = touches[0].clientY;
|
|
6482
|
-
} else {
|
|
6483
|
-
x = e.clientX;
|
|
6484
|
-
y = e.clientY;
|
|
6485
|
-
}
|
|
6486
|
-
startCoordsRef.current = {
|
|
6487
|
-
x,
|
|
6488
|
-
y
|
|
6489
|
-
};
|
|
6490
|
-
setIsTracking(true);
|
|
6491
|
-
};
|
|
6492
|
-
const updateDelta = (0, react.useCallback)((e) => {
|
|
6493
|
-
let clientX = 0, clientY = 0;
|
|
6494
|
-
if ("touches" in e) {
|
|
6495
|
-
const { touches } = e;
|
|
6496
|
-
if (touches.length > 1) return;
|
|
6497
|
-
clientX = touches[0].clientX;
|
|
6498
|
-
clientY = touches[0].clientY;
|
|
6499
|
-
} else {
|
|
6500
|
-
clientX = e.clientX;
|
|
6501
|
-
clientY = e.clientY;
|
|
6502
|
-
}
|
|
6503
|
-
const { x, y } = startCoordsRef.current, newDelta = {
|
|
6504
|
-
x: clientX - x,
|
|
6505
|
-
y: clientY - y
|
|
6506
|
-
};
|
|
6507
|
-
setDelta(newDelta);
|
|
6508
|
-
props?.onChange?.(newDelta);
|
|
6509
|
-
}, []);
|
|
6510
|
-
const stopTracking = (0, react.useCallback)(() => {
|
|
6511
|
-
changeCursor(false);
|
|
6512
|
-
setIsTracking(false);
|
|
6513
|
-
props?.onEnd?.(delta);
|
|
6514
|
-
}, [delta]);
|
|
6515
|
-
(0, react.useEffect)(() => {
|
|
6516
|
-
if (typeof window === "undefined") return;
|
|
6517
|
-
const controller = new AbortController(), signal = controller.signal;
|
|
6518
|
-
if (isTracking) switch (pointerTypeRef.current) {
|
|
6519
|
-
case "mouse":
|
|
6520
|
-
document.body.addEventListener("mousemove", updateDelta, { signal });
|
|
6521
|
-
document.body.addEventListener("mouseup", stopTracking, { signal });
|
|
6522
|
-
break;
|
|
6523
|
-
case "pointer":
|
|
6524
|
-
document.body.addEventListener("pointermove", updateDelta, { signal });
|
|
6525
|
-
document.body.addEventListener("pointerup", stopTracking, { signal });
|
|
6526
|
-
break;
|
|
6527
|
-
case "touch":
|
|
6528
|
-
document.body.addEventListener("touchmove", updateDelta, { signal });
|
|
6529
|
-
document.body.addEventListener("touchend", stopTracking, { signal });
|
|
6530
|
-
break;
|
|
6531
|
-
}
|
|
6532
|
-
else controller.abort();
|
|
6533
|
-
return () => {
|
|
6534
|
-
controller.abort();
|
|
6535
|
-
};
|
|
6536
|
-
}, [
|
|
6537
|
-
isTracking,
|
|
6538
|
-
updateDelta,
|
|
6539
|
-
stopTracking
|
|
6540
|
-
]);
|
|
6541
|
-
return {
|
|
6542
|
-
delta,
|
|
6543
|
-
stopTracking,
|
|
6544
|
-
trackPointerMovement
|
|
6545
|
-
};
|
|
6546
|
-
}
|
|
6547
6116
|
|
|
6548
6117
|
//#endregion
|
|
6549
6118
|
//#region src/components/modal.tsx
|
|
@@ -6558,7 +6127,7 @@ const { Provider: ModalControlsProvider, useStore: useModalControls } = createFa
|
|
|
6558
6127
|
dialogPanelRef: { current: null }
|
|
6559
6128
|
});
|
|
6560
6129
|
function ModalTrigger({ as, onClick, ...props }) {
|
|
6561
|
-
const ModalTriggerElement = as ||
|
|
6130
|
+
const ModalTriggerElement = as || Button$1;
|
|
6562
6131
|
const [modalControls] = useModalControls((store) => store);
|
|
6563
6132
|
const { isOpen, openModal, closeModal } = modalControls || {};
|
|
6564
6133
|
const handleClick = (e) => {
|
|
@@ -6566,10 +6135,13 @@ function ModalTrigger({ as, onClick, ...props }) {
|
|
|
6566
6135
|
if (!isOpen) openModal?.();
|
|
6567
6136
|
onClick?.(e);
|
|
6568
6137
|
};
|
|
6569
|
-
return
|
|
6138
|
+
return /* @__PURE__ */ jsx(ModalTriggerElement, {
|
|
6139
|
+
...props,
|
|
6140
|
+
onClick: handleClick
|
|
6141
|
+
});
|
|
6570
6142
|
}
|
|
6571
6143
|
function ModalTitle(props) {
|
|
6572
|
-
return
|
|
6144
|
+
return /* @__PURE__ */ jsx(DialogTitle, { ...props });
|
|
6573
6145
|
}
|
|
6574
6146
|
function ModalDialog(props) {
|
|
6575
6147
|
const [modalControls] = useModalControls((store) => store);
|
|
@@ -6583,47 +6155,63 @@ function ModalDialog(props) {
|
|
|
6583
6155
|
enableTouchClose: () => {},
|
|
6584
6156
|
dialogPanelRef: { current: null }
|
|
6585
6157
|
};
|
|
6586
|
-
return
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6158
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
6159
|
+
open: isOpen,
|
|
6160
|
+
onClose: () => closeModal?.(),
|
|
6161
|
+
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(" "),
|
|
6162
|
+
children: [/* @__PURE__ */ jsx(DialogBackdrop, {
|
|
6163
|
+
transition: true,
|
|
6164
|
+
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(" "),
|
|
6165
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
6166
|
+
padding: "none",
|
|
6167
|
+
rounded: "full",
|
|
6168
|
+
className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
|
|
6169
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
6170
|
+
className: "ease-exponential absolute top-1 right-1 flex items-center gap-1 pt-px transition-transform duration-300 pointer-fine:group-hover/button:-translate-x-0.5",
|
|
6171
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
6172
|
+
className: "block text-xs leading-none uppercase",
|
|
6173
|
+
children: ["Close", /* @__PURE__ */ jsx("span", {
|
|
6174
|
+
className: "sr-only",
|
|
6175
|
+
children: "Modal"
|
|
6176
|
+
})]
|
|
6177
|
+
}), /* @__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" })]
|
|
6178
|
+
})
|
|
6179
|
+
})
|
|
6180
|
+
}), /* @__PURE__ */ jsxs(DialogPanel, {
|
|
6181
|
+
ref: dialogPanelRef,
|
|
6182
|
+
transition: true,
|
|
6183
|
+
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),
|
|
6184
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
6185
|
+
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(" "),
|
|
6186
|
+
onTouchStart: enableTouchClose,
|
|
6187
|
+
onMouseDown: enableMouseClose,
|
|
6188
|
+
type: "button",
|
|
6189
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
6190
|
+
className: "sr-only",
|
|
6191
|
+
children: "Drag down to close"
|
|
6192
|
+
})
|
|
6193
|
+
}), /* @__PURE__ */ jsx("div", { ...props })]
|
|
6194
|
+
})]
|
|
6195
|
+
});
|
|
6607
6196
|
}
|
|
6608
6197
|
function ModalClose({ as, ...props }) {
|
|
6609
|
-
|
|
6610
|
-
return <ModalCloseElement {...props} />;
|
|
6198
|
+
return /* @__PURE__ */ jsx(as || Button$1, { ...props });
|
|
6611
6199
|
}
|
|
6612
6200
|
function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
|
|
6613
|
-
const [bodyElement, setBodyElement] =
|
|
6614
|
-
const onVisible =
|
|
6201
|
+
const [bodyElement, setBodyElement] = useState(null);
|
|
6202
|
+
const onVisible = useEffectEvent(() => {
|
|
6615
6203
|
setBodyElement(document.body);
|
|
6616
6204
|
});
|
|
6617
|
-
|
|
6205
|
+
useEffect(() => {
|
|
6618
6206
|
if (typeof window !== "undefined") onVisible();
|
|
6619
6207
|
}, []);
|
|
6620
6208
|
const [, setModalControls] = useModalControls(() => null);
|
|
6621
|
-
const [isOpen, setIsOpen] =
|
|
6622
|
-
const dragMoveBoxRef =
|
|
6209
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
6210
|
+
const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
|
|
6623
6211
|
x: 0,
|
|
6624
6212
|
y: 0
|
|
6625
|
-
}), localDialogPanelRef =
|
|
6626
|
-
const [allowDragClose, setAllowDragClose] =
|
|
6213
|
+
}), localDialogPanelRef = useRef(null);
|
|
6214
|
+
const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
|
|
6627
6215
|
const openModal = () => {
|
|
6628
6216
|
setIsOpen((previous) => {
|
|
6629
6217
|
if (previous) return previous;
|
|
@@ -6683,7 +6271,7 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
|
|
|
6683
6271
|
const { clientY } = e;
|
|
6684
6272
|
disableDragClose(clientY);
|
|
6685
6273
|
};
|
|
6686
|
-
|
|
6274
|
+
useEffect(() => {
|
|
6687
6275
|
setModalControls?.((previous) => ({
|
|
6688
6276
|
...previous,
|
|
6689
6277
|
isOpen,
|
|
@@ -6707,49 +6295,66 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
|
|
|
6707
6295
|
readyToClose,
|
|
6708
6296
|
setModalControls
|
|
6709
6297
|
]);
|
|
6710
|
-
return
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6298
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
|
|
6299
|
+
ref: dragMoveBoxRef,
|
|
6300
|
+
className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
|
|
6301
|
+
onMouseMove: handleMouseMove,
|
|
6302
|
+
onMouseUp: disableMouseDragClose
|
|
6303
|
+
}), bodyElement), children] });
|
|
6715
6304
|
}
|
|
6716
6305
|
function Modal(props) {
|
|
6717
|
-
return
|
|
6718
|
-
<ModalDisplay {...props} />
|
|
6719
|
-
</ModalControlsProvider>;
|
|
6306
|
+
return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
|
|
6720
6307
|
}
|
|
6721
6308
|
|
|
6722
6309
|
//#endregion
|
|
6723
6310
|
//#region src/symbols/chevron.up.chevron.down.tsx
|
|
6724
6311
|
function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
6725
6312
|
switch (weight) {
|
|
6726
|
-
case "ultralight": return
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
case "
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6313
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
6314
|
+
viewBox: "9.76562 -70.5083 50.44 70.51",
|
|
6315
|
+
...props,
|
|
6316
|
+
children: /* @__PURE__ */ jsx("path", { d: "M34.9849-70.5083C34.4976-70.5083 34.1113-70.2505 33.7808-69.9199L10.2075-46.96C9.89063-46.6397 9.76562-46.3511 9.76562-46.0318C9.76562-45.417 10.252-44.9761 10.9121-44.9761C11.1587-44.9761 11.503-45.084 11.795-45.3306L34.9849-68.039L58.1714-45.3306C58.4633-45.042 58.7656-44.9761 59.0576-44.9761C59.6724-44.9761 60.2007-45.417 60.2007-46.0318C60.2007-46.3511 60.0791-46.6397 59.7588-46.96L36.189-69.9199C35.8096-70.2505 35.4688-70.5083 34.9849-70.5083ZM34.9849 0.000503659C35.4688 0.000503659 35.8096-0.25731 36.189-0.587881L59.7588-23.5478C60.0791-23.8681 60.2007-24.1567 60.2007-24.4761C60.2007-25.0908 59.6724-25.5317 59.0576-25.5317C58.7656-25.5317 58.4633-25.4658 58.1714-25.1772L34.9849-2.46879L11.795-25.1772C11.503-25.4238 11.1587-25.5317 10.9121-25.5317C10.252-25.5317 9.76562-25.0908 9.76562-24.4761C9.76562-24.1567 9.89063-23.8681 10.2075-23.5478L33.7808-0.587881C34.1113-0.25731 34.4976 0.000503659 34.9849 0.000503659Z" })
|
|
6317
|
+
});
|
|
6318
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
6319
|
+
viewBox: "9.76562 -70.9492 50.57 71.39",
|
|
6320
|
+
...props,
|
|
6321
|
+
children: /* @__PURE__ */ jsx("path", { d: "M35.0566-70.9492C34.4258-70.9492 33.9062-70.6504 33.4629-70.207L10.3613-47.8008C9.97266-47.3985 9.76562-46.9766 9.76562-46.4317C9.76562-45.4375 10.5391-44.6992 11.5684-44.6992C11.9688-44.6992 12.4668-44.8379 12.9024-45.2383L35.0566-66.9316L57.1972-45.2383C57.6328-44.8164 58.1094-44.6992 58.5449-44.6992C59.5391-44.6992 60.334-45.4375 60.334-46.4317C60.334-46.9766 60.1406-47.3985 59.7383-47.8008L36.6504-70.207C36.1582-70.6504 35.6738-70.9492 35.0566-70.9492ZM35.0566 0.441418C35.6738 0.441418 36.1582 0.142589 36.6504-0.300773L59.7383-22.707C60.1406-23.1094 60.334-23.5312 60.334-24.0762C60.334-25.0703 59.5391-25.8086 58.5449-25.8086C58.1094-25.8086 57.6328-25.6914 57.1972-25.2695L35.0566-3.5762L12.9024-25.2695C12.4668-25.6699 11.9688-25.8086 11.5684-25.8086C10.5391-25.8086 9.76562-25.0703 9.76562-24.0762C9.76562-23.5312 9.97266-23.1094 10.3613-22.707L33.4629-0.300773C33.9062 0.142589 34.4258 0.441418 35.0566 0.441418Z" })
|
|
6322
|
+
});
|
|
6323
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
6324
|
+
viewBox: "9.76562 -71.8101 50.83 73.11",
|
|
6325
|
+
...props,
|
|
6326
|
+
children: /* @__PURE__ */ jsx("path", { d: "M35.1968-71.8101C34.2856-71.8101 33.5059-71.4312 32.8423-70.7676L10.6616-49.4424C10.1328-48.8799 9.76562-48.1978 9.76562-47.2124C9.76562-45.4775 11.0996-44.1587 12.8496-44.1587C13.5503-44.1587 14.3486-44.3574 15.0645-45.0581L35.1968-64.7695L55.2954-45.0581C56.0112-44.376 56.8281-44.1587 57.5439-44.1587C59.2788-44.1587 60.5942-45.4775 60.5942-47.2124C60.5942-48.1978 60.2607-48.8799 59.6982-49.4424L37.5513-70.7676C36.8389-71.4312 36.0742-71.8101 35.1968-71.8101ZM35.1968 1.30225C36.0742 1.30225 36.8389 0.923344 37.5513 0.259769L59.6982-21.0654C60.2607-21.6279 60.5942-22.3101 60.5942-23.2954C60.5942-25.0303 59.2788-26.3491 57.5439-26.3491C56.8281-26.3491 56.0112-26.1318 55.2954-25.4497L35.1968-5.73829L15.0645-25.4497C14.3486-26.1504 13.5503-26.3491 12.8496-26.3491C11.0996-26.3491 9.76562-25.0303 9.76562-23.2954C9.76562-22.3101 10.1328-21.6279 10.6616-21.0654L32.8423 0.259769C33.5059 0.923344 34.2856 1.30225 35.1968 1.30225Z" })
|
|
6327
|
+
});
|
|
6328
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
6329
|
+
viewBox: "9.76562 -72.4609 51.03 74.41",
|
|
6330
|
+
...props,
|
|
6331
|
+
children: /* @__PURE__ */ jsx("path", { d: "M35.3027-72.4609C34.1797-72.4609 33.2031-72.0215 32.373-71.1914L10.8887-50.6836C10.2539-50 9.76562-49.1211 9.76562-47.8027C9.76562-45.5078 11.5234-43.75 13.8184-43.75C14.7461-43.75 15.7715-43.9941 16.6992-44.9219L35.3027-63.1348L53.8574-44.9219C54.7852-44.043 55.8594-43.75 56.7871-43.75C59.082-43.75 60.791-45.5078 60.791-47.8027C60.791-49.1211 60.3516-50 59.668-50.6836L38.2324-71.1914C37.3535-72.0215 36.377-72.4609 35.3027-72.4609ZM35.3027 1.95312C36.377 1.95312 37.3535 1.51367 38.2324 0.683594L59.668-19.8242C60.3516-20.5078 60.791-21.3867 60.791-22.7051C60.791-25 59.082-26.7578 56.7871-26.7578C55.8594-26.7578 54.7852-26.4648 53.8574-25.5859L35.3027-7.37305L16.6992-25.5859C15.7715-26.5137 14.7461-26.7578 13.8184-26.7578C11.5234-26.7578 9.76562-25 9.76562-22.7051C9.76562-21.3867 10.2539-20.5078 10.8887-19.8242L32.373 0.683594C33.2031 1.51367 34.1797 1.95312 35.3027 1.95312Z" })
|
|
6332
|
+
});
|
|
6333
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
6334
|
+
viewBox: "9.76562 -74.0254 53.67 77.54",
|
|
6335
|
+
...props,
|
|
6336
|
+
children: /* @__PURE__ */ jsx("path", { d: "M36.6211-74.0254C35.1641-74.0254 33.9326-73.4453 32.8037-72.334L11.3369-51.8174C10.4385-50.8965 9.76562-49.7451 9.76562-48.2246C9.76562-45.3584 12.0508-43.249 14.7236-43.249C15.915-43.249 17.1953-43.5898 18.2988-44.6846L36.6211-62.6162L54.9033-44.6846C56.0068-43.6299 57.3271-43.249 58.5186-43.249C61.1914-43.249 63.4365-45.3584 63.4365-48.2246C63.4365-49.7451 62.8037-50.8965 61.8652-51.8174L40.4385-72.334C39.2695-73.4453 38.0381-74.0254 36.6211-74.0254ZM36.6211 3.51758C38.0381 3.51758 39.2695 2.9375 40.4385 1.82617L61.8652-18.6904C62.8037-19.6113 63.4365-20.7627 63.4365-22.2832C63.4365-25.1494 61.1914-27.2588 58.5186-27.2588C57.3271-27.2588 56.0068-26.8779 54.9033-25.8232L36.6211-7.8916L18.2988-25.8232C17.1953-26.918 15.915-27.2588 14.7236-27.2588C12.0508-27.2588 9.76562-25.1494 9.76562-22.2832C9.76562-20.7627 10.4385-19.6113 11.3369-18.6904L32.8037 1.82617C33.9326 2.9375 35.1641 3.51758 36.6211 3.51758Z" })
|
|
6337
|
+
});
|
|
6338
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
6339
|
+
viewBox: "9.76562 -75.2248 55.7 79.94",
|
|
6340
|
+
...props,
|
|
6341
|
+
children: /* @__PURE__ */ jsx("path", { d: "M37.6318-75.2248C35.9188-75.2248 34.4919-74.5369 33.1339-73.21L11.6806-52.6866C10.58-51.5838 9.76562-50.2235 9.76562-48.548C9.76562-45.2438 12.4551-42.8649 15.4177-42.8649C16.8112-42.8649 18.2869-43.2799 19.5252-44.5026L37.6318-62.2187L55.7052-44.5026C56.9435-43.3132 58.4524-42.8649 59.846-42.8649C62.8086-42.8649 65.4647-45.2438 65.4647-48.548C65.4647-50.2235 64.6837-51.5838 63.5498-52.6866L42.1298-73.21C40.7385-74.5369 39.3116-75.2248 37.6318-75.2248ZM37.6318 4.71699C39.3116 4.71699 40.7385 4.0291 42.1298 2.70215L63.5498-17.8212C64.6837-18.924 65.4647-20.2843 65.4647-21.9598C65.4647-25.264 62.8086-27.6429 59.846-27.6429C58.4524-27.6429 56.9435-27.1946 55.7052-26.0052L37.6318-8.28916L19.5252-26.0052C18.2869-27.2279 16.8112-27.6429 15.4177-27.6429C12.4551-27.6429 9.76562-25.264 9.76562-21.9598C9.76562-20.2843 10.58-18.924 11.6806-17.8212L33.1339 2.70215C34.4919 4.0291 35.9188 4.71699 37.6318 4.71699Z" })
|
|
6342
|
+
});
|
|
6343
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
6344
|
+
viewBox: "9.76562 -76.8066 58.37 83.11",
|
|
6345
|
+
...props,
|
|
6346
|
+
children: /* @__PURE__ */ jsx("path", { d: "M38.9648-76.8066C36.9141-76.8066 35.2295-75.9766 33.5693-74.3652L12.1338-53.833C10.7666-52.4902 9.76562-50.8545 9.76562-48.9746C9.76562-45.0928 12.9883-42.3584 16.333-42.3584C17.9932-42.3584 19.7266-42.8711 21.1426-44.2627L38.9648-61.6943L56.7627-44.2627C58.1787-42.8955 59.9365-42.3584 61.5967-42.3584C64.9414-42.3584 68.1396-45.0928 68.1396-48.9746C68.1396-50.8545 67.1631-52.4902 65.7715-53.833L44.3604-74.3652C42.6758-75.9766 40.9912-76.8066 38.9648-76.8066ZM38.9648 6.29883C40.9912 6.29883 42.6758 5.46875 44.3604 3.85742L65.7715-16.6748C67.1631-18.0176 68.1396-19.6533 68.1396-21.5332C68.1396-25.415 64.9414-28.1494 61.5967-28.1494C59.9365-28.1494 58.1787-27.6123 56.7627-26.2451L38.9648-8.81348L21.1426-26.2451C19.7266-27.6367 17.9932-28.1494 16.333-28.1494C12.9883-28.1494 9.76562-25.415 9.76562-21.5332C9.76562-19.6533 10.7666-18.0176 12.1338-16.6748L33.5693 3.85742C35.2295 5.46875 36.9141 6.29883 38.9648 6.29883Z" })
|
|
6347
|
+
});
|
|
6348
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
6349
|
+
viewBox: "9.76562 -79.101 62.25 87.69",
|
|
6350
|
+
...props,
|
|
6351
|
+
children: /* @__PURE__ */ jsx("path", { d: "M40.8983-79.101C38.3577-79.101 36.2993-78.0647 34.2009-76.0409L12.7912-55.4958C11.0373-53.805 9.76562-51.7697 9.76562-49.5933C9.76562-44.8737 13.7617-41.6237 17.6606-41.6237C19.7075-41.6237 21.8147-42.2782 23.4885-43.9147L40.8983-60.9338L58.2966-43.9147C59.9704-42.2897 62.0891-41.6237 64.1359-41.6237C68.0349-41.6237 72.0194-44.8737 72.0194-49.5933C72.0194-51.7697 70.7593-53.805 68.9939-55.4958L47.5956-76.0409C45.4857-78.0647 43.4273-79.101 40.8983-79.101ZM40.8983 8.59318C43.4273 8.59318 45.4857 7.55686 47.5956 5.53307L68.9939-15.012C70.7593-16.7028 72.0194-18.7382 72.0194-20.9145C72.0194-25.6342 68.0349-28.8841 64.1359-28.8841C62.0891-28.8841 59.9704-28.2181 58.2966-26.5931L40.8983-9.57396L23.4885-26.5931C21.8147-28.2296 19.7075-28.8841 17.6606-28.8841C13.7617-28.8841 9.76562-25.6342 9.76562-20.9145C9.76562-18.7382 11.0373-16.7028 12.7912-15.012L34.2009 5.53307C36.2993 7.55686 38.3577 8.59318 40.8983 8.59318Z" })
|
|
6352
|
+
});
|
|
6353
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
6354
|
+
viewBox: "9.76562 -81.1523 65.72 91.8",
|
|
6355
|
+
...props,
|
|
6356
|
+
children: /* @__PURE__ */ jsx("path", { d: "M42.627-81.1523C39.6484-81.1523 37.2559-79.9316 34.7656-77.5391L13.3789-56.9824C11.2793-54.9805 9.76562-52.5879 9.76562-50.1465C9.76562-44.6777 14.4531-40.9668 18.8477-40.9668C21.2402-40.9668 23.6816-41.748 25.5859-43.6035L42.627-60.2539L59.668-43.6035C61.5723-41.748 64.0137-40.9668 66.4062-40.9668C70.8008-40.9668 75.4883-44.6777 75.4883-50.1465C75.4883-52.5879 73.9746-54.9805 71.875-56.9824L50.4883-77.5391C47.998-79.9316 45.6055-81.1523 42.627-81.1523ZM42.627 10.6445C45.6055 10.6445 47.998 9.42383 50.4883 7.03125L71.875-13.5254C73.9746-15.5273 75.4883-17.9199 75.4883-20.3613C75.4883-25.8301 70.8008-29.541 66.4062-29.541C64.0137-29.541 61.5723-28.7598 59.668-26.9043L42.627-10.2539L25.5859-26.9043C23.6816-28.7598 21.2402-29.541 18.8477-29.541C14.4531-29.541 9.76562-25.8301 9.76562-20.3613C9.76562-17.9199 11.2793-15.5273 13.3789-13.5254L34.7656 7.03125C37.2559 9.42383 39.6484 10.6445 42.627 10.6445Z" })
|
|
6357
|
+
});
|
|
6753
6358
|
}
|
|
6754
6359
|
}
|
|
6755
6360
|
|
|
@@ -6761,7 +6366,10 @@ function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
|
6761
6366
|
* Displays a simple title.
|
|
6762
6367
|
*/
|
|
6763
6368
|
function SelectSectionTitle({ className, ...props }) {
|
|
6764
|
-
return
|
|
6369
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6370
|
+
className: twMerge("sticky -top-1 z-10 -mx-1 bg-inherit mask-t-from-transparent mask-t-from-0 mask-t-to-white mask-t-to-1.5 pl-2 font-bold text-neutral-500/50 backdrop-blur-[2px] backdrop-brightness-101", className),
|
|
6371
|
+
...props
|
|
6372
|
+
});
|
|
6765
6373
|
}
|
|
6766
6374
|
/**
|
|
6767
6375
|
* ## SelectOption
|
|
@@ -6771,15 +6379,17 @@ function SelectSectionTitle({ className, ...props }) {
|
|
|
6771
6379
|
* @prop value - This is used for FormData
|
|
6772
6380
|
*/
|
|
6773
6381
|
function SelectOption({ children, className, name, ...props }) {
|
|
6774
|
-
return
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6382
|
+
return /* @__PURE__ */ jsx(ListboxOption, {
|
|
6383
|
+
className: "group/option contents",
|
|
6384
|
+
...props,
|
|
6385
|
+
children: (bag) => bag.selectedOption ? /* @__PURE__ */ jsx("span", {
|
|
6386
|
+
className: "mr-3 before:absolute before:-left-3 before:content-[\",_\"]",
|
|
6387
|
+
children: name
|
|
6388
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
6389
|
+
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),
|
|
6390
|
+
children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
|
|
6391
|
+
})
|
|
6392
|
+
});
|
|
6783
6393
|
}
|
|
6784
6394
|
/**
|
|
6785
6395
|
* # Select
|
|
@@ -6804,12 +6414,12 @@ function SelectOption({ children, className, name, ...props }) {
|
|
|
6804
6414
|
* @prop anchor - The anchor point for the drop down menu.
|
|
6805
6415
|
*/
|
|
6806
6416
|
function Select({ buttonProps, children, className, description, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, fieldProps: { className: fieldClassName, ...fieldProps } = {}, invalid, label, labelProps: { className: labelClassName, ...labelProps } = {}, onChange, optionsProps: { anchor, className: optionsClassName, transition, ...optionsProps } = {}, placeholder, required, selectedOptionProps: { ...selectedOptionProps } = {}, ...props }) {
|
|
6807
|
-
const uniqueId =
|
|
6417
|
+
const uniqueId = useId();
|
|
6808
6418
|
const multiple = props.multiple;
|
|
6809
|
-
const selectOptionList =
|
|
6810
|
-
const listboxButtonRef =
|
|
6811
|
-
const [isInvalid, setIsInvalid] =
|
|
6812
|
-
const [selectedOptionSync, setSelectedOptionSync] =
|
|
6419
|
+
const selectOptionList = Children.toArray(children).filter((child) => isValidElement(child) && child.props && typeof child.props === "object" && "name" in child.props && "value" in child.props && "children" in child.props);
|
|
6420
|
+
const listboxButtonRef = useRef(null);
|
|
6421
|
+
const [isInvalid, setIsInvalid] = useState(invalid);
|
|
6422
|
+
const [selectedOptionSync, setSelectedOptionSync] = useState(multiple ? [] : "");
|
|
6813
6423
|
const handleChange = (selected) => {
|
|
6814
6424
|
setIsInvalid(false);
|
|
6815
6425
|
setSelectedOptionSync(selected);
|
|
@@ -6817,31 +6427,61 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6817
6427
|
};
|
|
6818
6428
|
const handleInvalid = () => setIsInvalid(true);
|
|
6819
6429
|
const refocus = () => listboxButtonRef.current?.focus();
|
|
6820
|
-
return
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6430
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
6431
|
+
...fieldProps,
|
|
6432
|
+
className: (bag) => twMerge("grid gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
6433
|
+
children: [
|
|
6434
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
6435
|
+
...labelProps,
|
|
6436
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6437
|
+
children: label
|
|
6438
|
+
}),
|
|
6439
|
+
/* @__PURE__ */ jsxs(Listbox, {
|
|
6440
|
+
...props,
|
|
6441
|
+
invalid: isInvalid || invalid,
|
|
6442
|
+
onChange: handleChange,
|
|
6443
|
+
children: [/* @__PURE__ */ jsxs(ListboxButton, {
|
|
6444
|
+
...buttonProps,
|
|
6445
|
+
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),
|
|
6446
|
+
ref: listboxButtonRef,
|
|
6447
|
+
children: [
|
|
6448
|
+
/* @__PURE__ */ jsx("input", {
|
|
6449
|
+
"aria-hidden": "true",
|
|
6450
|
+
className: "sr-only top-0 left-1/2",
|
|
6451
|
+
id: props.name + ":input:id" + uniqueId,
|
|
6452
|
+
name: props.name + ":input:name" + uniqueId,
|
|
6453
|
+
onChange: () => {},
|
|
6454
|
+
onInvalid: handleInvalid,
|
|
6455
|
+
onFocus: refocus,
|
|
6456
|
+
required,
|
|
6457
|
+
tabIndex: -1,
|
|
6458
|
+
value: Array.isArray(selectedOptionSync) ? selectedOptionSync.join(", ") : selectedOptionSync
|
|
6459
|
+
}),
|
|
6460
|
+
/* @__PURE__ */ jsx(ListboxSelectedOption, {
|
|
6461
|
+
...selectedOptionProps,
|
|
6462
|
+
options: selectOptionList,
|
|
6463
|
+
placeholder: /* @__PURE__ */ jsx("span", {
|
|
6464
|
+
className: "opacity-50",
|
|
6465
|
+
children: placeholder || (multiple ? "Choose Any" : "Choose One")
|
|
6466
|
+
})
|
|
6467
|
+
}),
|
|
6468
|
+
/* @__PURE__ */ jsx(ChevronUpChevronDown, { className: "absolute top-1/2 right-2 size-3 -translate-y-1/2 fill-current/50" })
|
|
6469
|
+
]
|
|
6470
|
+
}), /* @__PURE__ */ jsx(ListboxOptions, {
|
|
6471
|
+
...optionsProps,
|
|
6472
|
+
anchor: anchor || "bottom start",
|
|
6473
|
+
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),
|
|
6474
|
+
transition: transition || true,
|
|
6475
|
+
children
|
|
6476
|
+
})]
|
|
6477
|
+
}),
|
|
6478
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
6479
|
+
...descriptionProps,
|
|
6480
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6481
|
+
children: description
|
|
6482
|
+
})
|
|
6483
|
+
]
|
|
6484
|
+
});
|
|
6845
6485
|
}
|
|
6846
6486
|
|
|
6847
6487
|
//#endregion
|
|
@@ -6869,21 +6509,28 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6869
6509
|
const getButtonText = () => {
|
|
6870
6510
|
switch (formStatus) {
|
|
6871
6511
|
case "incomplete": return incomplete || "Complete Form";
|
|
6872
|
-
case "loading": return loading ||
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6512
|
+
case "loading": return loading || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6513
|
+
/* @__PURE__ */ jsx("span", {
|
|
6514
|
+
className: "animate-wave animation-delay-300 inline-block",
|
|
6515
|
+
children: "•"
|
|
6516
|
+
}),
|
|
6517
|
+
/* @__PURE__ */ jsx("span", {
|
|
6518
|
+
className: "animate-wave animation-delay-150 inline-block",
|
|
6519
|
+
children: "•"
|
|
6520
|
+
}),
|
|
6521
|
+
/* @__PURE__ */ jsx("span", {
|
|
6522
|
+
className: "animate-wave inline-block",
|
|
6523
|
+
children: "•"
|
|
6524
|
+
})
|
|
6525
|
+
] });
|
|
6526
|
+
case "error": return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6527
|
+
error || "Error",
|
|
6528
|
+
" ",
|
|
6529
|
+
/* @__PURE__ */ jsx("span", {
|
|
6530
|
+
className: "absolute top-1/2 ml-1.5 translate-y-[calc(-50%-1.5px)] text-2xl",
|
|
6531
|
+
children: "×"
|
|
6532
|
+
})
|
|
6533
|
+
] });
|
|
6887
6534
|
case "readonly": return readonly || children;
|
|
6888
6535
|
case "success": return success || "Successfully Submitted";
|
|
6889
6536
|
default: return children || "Submit";
|
|
@@ -6902,13 +6549,19 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6902
6549
|
}
|
|
6903
6550
|
};
|
|
6904
6551
|
const dataFormState = getDataFormState();
|
|
6905
|
-
return
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
className
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6552
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
6553
|
+
...props,
|
|
6554
|
+
...dataFormState,
|
|
6555
|
+
className: twMerge([
|
|
6556
|
+
formStatusButtonClasses,
|
|
6557
|
+
"w-full text-white",
|
|
6558
|
+
className
|
|
6559
|
+
]),
|
|
6560
|
+
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) },
|
|
6561
|
+
theme: "custom",
|
|
6562
|
+
type: type || "submit",
|
|
6563
|
+
children: buttonText
|
|
6564
|
+
});
|
|
6912
6565
|
}
|
|
6913
6566
|
|
|
6914
6567
|
//#endregion
|
|
@@ -6957,21 +6610,27 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6957
6610
|
}
|
|
6958
6611
|
resizeClassName = resizeClassList.join(" ");
|
|
6959
6612
|
}
|
|
6960
|
-
return
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6613
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
6614
|
+
...fieldProps,
|
|
6615
|
+
className: (bag) => twMerge("grid h-fit gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
6616
|
+
children: [
|
|
6617
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
6618
|
+
...labelProps,
|
|
6619
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6620
|
+
children: label
|
|
6621
|
+
}),
|
|
6622
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
|
|
6623
|
+
...props,
|
|
6624
|
+
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),
|
|
6625
|
+
required
|
|
6626
|
+
}), children] }),
|
|
6627
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
6628
|
+
...descriptionProps,
|
|
6629
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6630
|
+
children: description
|
|
6631
|
+
})
|
|
6632
|
+
]
|
|
6633
|
+
});
|
|
6975
6634
|
}
|
|
6976
6635
|
|
|
6977
6636
|
//#endregion
|
|
@@ -6993,7 +6652,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6993
6652
|
* @prop year - Include the year in the display.
|
|
6994
6653
|
*/
|
|
6995
6654
|
function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }) {
|
|
6996
|
-
const [date, setDate] =
|
|
6655
|
+
const [date, setDate] = useState(dateObject || void 0);
|
|
6997
6656
|
const getDateAndTime = () => {
|
|
6998
6657
|
if (dateTime) return dateTime;
|
|
6999
6658
|
if (!date) return "";
|
|
@@ -7029,15 +6688,18 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
|
|
|
7029
6688
|
].filter(Boolean).join(" ");
|
|
7030
6689
|
};
|
|
7031
6690
|
const dateDisplay = getDateDisplay();
|
|
7032
|
-
const onVisible =
|
|
6691
|
+
const onVisible = useEffectEvent(() => {
|
|
7033
6692
|
if (date === void 0 && dateObject === void 0 && dateTime === void 0 && typeof window !== "undefined" && (dateAndTime === "" || dateDisplay === "")) setDate(/* @__PURE__ */ new Date());
|
|
7034
6693
|
});
|
|
7035
|
-
|
|
6694
|
+
useEffect(() => {
|
|
7036
6695
|
onVisible();
|
|
7037
6696
|
}, []);
|
|
7038
|
-
return
|
|
7039
|
-
|
|
7040
|
-
|
|
6697
|
+
return /* @__PURE__ */ jsx("time", {
|
|
6698
|
+
dateTime: dateAndTime,
|
|
6699
|
+
ref,
|
|
6700
|
+
...props,
|
|
6701
|
+
children: dateDisplay
|
|
6702
|
+
});
|
|
7041
6703
|
}
|
|
7042
6704
|
|
|
7043
6705
|
//#endregion
|
|
@@ -8297,7 +7959,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
8297
7959
|
|
|
8298
7960
|
//#endregion
|
|
8299
7961
|
//#region node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
8300
|
-
var index = typeof document !== "undefined" ?
|
|
7962
|
+
var index = typeof document !== "undefined" ? useLayoutEffect : function noop() {};
|
|
8301
7963
|
function deepEqual(a, b) {
|
|
8302
7964
|
if (a === b) return true;
|
|
8303
7965
|
if (typeof a !== typeof b) return false;
|
|
@@ -8334,7 +7996,7 @@ function roundByDPR(element, value) {
|
|
|
8334
7996
|
return Math.round(value * dpr) / dpr;
|
|
8335
7997
|
}
|
|
8336
7998
|
function useLatestRef(value) {
|
|
8337
|
-
const ref =
|
|
7999
|
+
const ref = React.useRef(value);
|
|
8338
8000
|
index(() => {
|
|
8339
8001
|
ref.current = value;
|
|
8340
8002
|
});
|
|
@@ -8347,7 +8009,7 @@ function useLatestRef(value) {
|
|
|
8347
8009
|
function useFloating(options) {
|
|
8348
8010
|
if (options === void 0) options = {};
|
|
8349
8011
|
const { placement = "bottom", strategy = "absolute", middleware = [], platform, elements: { reference: externalReference, floating: externalFloating } = {}, transform = true, whileElementsMounted, open } = options;
|
|
8350
|
-
const [data, setData] =
|
|
8012
|
+
const [data, setData] = React.useState({
|
|
8351
8013
|
x: 0,
|
|
8352
8014
|
y: 0,
|
|
8353
8015
|
strategy,
|
|
@@ -8355,17 +8017,17 @@ function useFloating(options) {
|
|
|
8355
8017
|
middlewareData: {},
|
|
8356
8018
|
isPositioned: false
|
|
8357
8019
|
});
|
|
8358
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
8020
|
+
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
|
|
8359
8021
|
if (!deepEqual(latestMiddleware, middleware)) setLatestMiddleware(middleware);
|
|
8360
|
-
const [_reference, _setReference] =
|
|
8361
|
-
const [_floating, _setFloating] =
|
|
8362
|
-
const setReference =
|
|
8022
|
+
const [_reference, _setReference] = React.useState(null);
|
|
8023
|
+
const [_floating, _setFloating] = React.useState(null);
|
|
8024
|
+
const setReference = React.useCallback((node) => {
|
|
8363
8025
|
if (node !== referenceRef.current) {
|
|
8364
8026
|
referenceRef.current = node;
|
|
8365
8027
|
_setReference(node);
|
|
8366
8028
|
}
|
|
8367
8029
|
}, []);
|
|
8368
|
-
const setFloating =
|
|
8030
|
+
const setFloating = React.useCallback((node) => {
|
|
8369
8031
|
if (node !== floatingRef.current) {
|
|
8370
8032
|
floatingRef.current = node;
|
|
8371
8033
|
_setFloating(node);
|
|
@@ -8373,14 +8035,14 @@ function useFloating(options) {
|
|
|
8373
8035
|
}, []);
|
|
8374
8036
|
const referenceEl = externalReference || _reference;
|
|
8375
8037
|
const floatingEl = externalFloating || _floating;
|
|
8376
|
-
const referenceRef =
|
|
8377
|
-
const floatingRef =
|
|
8378
|
-
const dataRef =
|
|
8038
|
+
const referenceRef = React.useRef(null);
|
|
8039
|
+
const floatingRef = React.useRef(null);
|
|
8040
|
+
const dataRef = React.useRef(data);
|
|
8379
8041
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
8380
8042
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
8381
8043
|
const platformRef = useLatestRef(platform);
|
|
8382
8044
|
const openRef = useLatestRef(open);
|
|
8383
|
-
const update =
|
|
8045
|
+
const update = React.useCallback(() => {
|
|
8384
8046
|
if (!referenceRef.current || !floatingRef.current) return;
|
|
8385
8047
|
const config = {
|
|
8386
8048
|
placement,
|
|
@@ -8395,7 +8057,7 @@ function useFloating(options) {
|
|
|
8395
8057
|
};
|
|
8396
8058
|
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
8397
8059
|
dataRef.current = fullData;
|
|
8398
|
-
|
|
8060
|
+
ReactDOM.flushSync(() => {
|
|
8399
8061
|
setData(fullData);
|
|
8400
8062
|
});
|
|
8401
8063
|
}
|
|
@@ -8416,7 +8078,7 @@ function useFloating(options) {
|
|
|
8416
8078
|
}));
|
|
8417
8079
|
}
|
|
8418
8080
|
}, [open]);
|
|
8419
|
-
const isMountedRef =
|
|
8081
|
+
const isMountedRef = React.useRef(false);
|
|
8420
8082
|
index(() => {
|
|
8421
8083
|
isMountedRef.current = true;
|
|
8422
8084
|
return () => {
|
|
@@ -8437,17 +8099,17 @@ function useFloating(options) {
|
|
|
8437
8099
|
whileElementsMountedRef,
|
|
8438
8100
|
hasWhileElementsMounted
|
|
8439
8101
|
]);
|
|
8440
|
-
const refs =
|
|
8102
|
+
const refs = React.useMemo(() => ({
|
|
8441
8103
|
reference: referenceRef,
|
|
8442
8104
|
floating: floatingRef,
|
|
8443
8105
|
setReference,
|
|
8444
8106
|
setFloating
|
|
8445
8107
|
}), [setReference, setFloating]);
|
|
8446
|
-
const elements =
|
|
8108
|
+
const elements = React.useMemo(() => ({
|
|
8447
8109
|
reference: referenceEl,
|
|
8448
8110
|
floating: floatingEl
|
|
8449
8111
|
}), [referenceEl, floatingEl]);
|
|
8450
|
-
const floatingStyles =
|
|
8112
|
+
const floatingStyles = React.useMemo(() => {
|
|
8451
8113
|
const initialStyles = {
|
|
8452
8114
|
position: strategy,
|
|
8453
8115
|
left: 0,
|
|
@@ -8473,7 +8135,7 @@ function useFloating(options) {
|
|
|
8473
8135
|
data.x,
|
|
8474
8136
|
data.y
|
|
8475
8137
|
]);
|
|
8476
|
-
return
|
|
8138
|
+
return React.useMemo(() => ({
|
|
8477
8139
|
...data,
|
|
8478
8140
|
update,
|
|
8479
8141
|
refs,
|
|
@@ -8598,7 +8260,7 @@ const { Provider: TooltipContextProvider, useStore: useTooltipContext } = create
|
|
|
8598
8260
|
* @prop asChild - Whether to render the children as the trigger element.
|
|
8599
8261
|
*/
|
|
8600
8262
|
function TooltipTrigger({ as, asChild = false, children, onMouseEnter, onMouseLeave, onFocus, onBlur, onTouchStart, ...props }) {
|
|
8601
|
-
const TooltipTriggerElement = as ||
|
|
8263
|
+
const TooltipTriggerElement = as || Button$1;
|
|
8602
8264
|
const [tooltipContext] = useTooltipContext((store) => store);
|
|
8603
8265
|
const { isOpen, openTooltip, closeTooltip, refs } = tooltipContext || {};
|
|
8604
8266
|
const handleMouseEnter = (e) => {
|
|
@@ -8631,10 +8293,11 @@ function TooltipTrigger({ as, asChild = false, children, onMouseEnter, onMouseLe
|
|
|
8631
8293
|
onTouchStart: handleTouchStart,
|
|
8632
8294
|
"aria-describedby": isOpen ? "tooltip" : void 0
|
|
8633
8295
|
};
|
|
8634
|
-
if (asChild &&
|
|
8635
|
-
return
|
|
8636
|
-
|
|
8637
|
-
|
|
8296
|
+
if (asChild && isValidElement(children)) return cloneElement(children, triggerProps);
|
|
8297
|
+
return /* @__PURE__ */ jsx(TooltipTriggerElement, {
|
|
8298
|
+
...triggerProps,
|
|
8299
|
+
children
|
|
8300
|
+
});
|
|
8638
8301
|
}
|
|
8639
8302
|
/**
|
|
8640
8303
|
* ## Tooltip Panel
|
|
@@ -8645,7 +8308,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
|
|
|
8645
8308
|
const TooltipPanelElement = as || "div";
|
|
8646
8309
|
const [tooltipContext] = useTooltipContext((store) => store);
|
|
8647
8310
|
const { isOpen, refs, floatingStyles, isPositioned, placement, middlewareData, arrowRef, arrow: contextArrow, arrowClassName: contextArrowClassName, openTooltip, closeTooltip } = tooltipContext || {};
|
|
8648
|
-
if (!isOpen) return
|
|
8311
|
+
if (!isOpen) return /* @__PURE__ */ jsx(Fragment, {});
|
|
8649
8312
|
const reversedAnchor = {
|
|
8650
8313
|
top: "bottom",
|
|
8651
8314
|
right: "left",
|
|
@@ -8705,33 +8368,44 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
|
|
|
8705
8368
|
openTooltip?.();
|
|
8706
8369
|
onTouchStart?.(e);
|
|
8707
8370
|
};
|
|
8708
|
-
return
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
if (
|
|
8712
|
-
|
|
8713
|
-
if (
|
|
8371
|
+
return /* @__PURE__ */ jsxs(TooltipPanelElement, {
|
|
8372
|
+
...props,
|
|
8373
|
+
ref: (node) => {
|
|
8374
|
+
if (node && typeof node.querySelector === "function") {
|
|
8375
|
+
refs?.setFloating(node);
|
|
8376
|
+
if (contextArrow) {
|
|
8377
|
+
const arrowElement = node.querySelector("[data-tooltip-arrow]");
|
|
8378
|
+
if (arrowElement && arrowRef) arrowRef.current = arrowElement;
|
|
8379
|
+
}
|
|
8714
8380
|
}
|
|
8715
|
-
}
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8381
|
+
},
|
|
8382
|
+
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),
|
|
8383
|
+
style: {
|
|
8384
|
+
...style,
|
|
8385
|
+
...floatingStyles,
|
|
8386
|
+
transformOrigin: reversedAnchor,
|
|
8387
|
+
pointerEvents: "none"
|
|
8388
|
+
},
|
|
8389
|
+
onMouseEnter: handleMouseEnter,
|
|
8390
|
+
onMouseLeave: handleMouseLeave,
|
|
8391
|
+
onTouchStart: handleTouchStart,
|
|
8392
|
+
role: "tooltip",
|
|
8393
|
+
...isPositioned ? { "data-ready": true } : {},
|
|
8394
|
+
children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
|
|
8395
|
+
className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
|
|
8396
|
+
style: arrowStyles,
|
|
8397
|
+
"data-tooltip-arrow": true
|
|
8398
|
+
})]
|
|
8399
|
+
});
|
|
8726
8400
|
}
|
|
8727
8401
|
function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, children, delay = 500, offset: offset$3 = 8, onClose, onOpen, portal }) {
|
|
8728
|
-
const [isOpen, setIsOpen] =
|
|
8729
|
-
const [bodyElement, setBodyElement] =
|
|
8730
|
-
const onReady =
|
|
8402
|
+
const [isOpen, setIsOpen] = useState(false), timeoutRef = useRef(void 0), arrowRef = useRef(null);
|
|
8403
|
+
const [bodyElement, setBodyElement] = useState(() => typeof window !== "undefined" ? document.body : null);
|
|
8404
|
+
const onReady = useEffectEvent(() => {
|
|
8731
8405
|
const documentBody = document.body;
|
|
8732
8406
|
setBodyElement(documentBody);
|
|
8733
8407
|
});
|
|
8734
|
-
|
|
8408
|
+
useEffect(() => {
|
|
8735
8409
|
if (typeof window !== "undefined" && !bodyElement) onReady();
|
|
8736
8410
|
}, [bodyElement, portal]);
|
|
8737
8411
|
const { refs, floatingStyles, isPositioned, placement, middlewareData } = useFloating({
|
|
@@ -8767,13 +8441,13 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8767
8441
|
setIsOpen(false);
|
|
8768
8442
|
onClose?.();
|
|
8769
8443
|
};
|
|
8770
|
-
|
|
8444
|
+
useEffect(() => {
|
|
8771
8445
|
return () => {
|
|
8772
8446
|
clearTimeout(timeoutRef.current);
|
|
8773
8447
|
};
|
|
8774
8448
|
}, []);
|
|
8775
8449
|
const [, setTooltipContext] = useTooltipContext(() => void 0, defaultTooltipContext);
|
|
8776
|
-
|
|
8450
|
+
useEffect(() => {
|
|
8777
8451
|
setTooltipContext?.((previous) => {
|
|
8778
8452
|
const nextArrow = arrow$4 || false, nextArrowClassName = arrowClassName || "";
|
|
8779
8453
|
if (previous.isOpen === isOpen && previous.openTooltip === openTooltip && previous.closeTooltip === closeTooltip && previous.refs === refs && previous.floatingStyles === floatingStyles && previous.isPositioned === isPositioned && previous.placement === placement && previous.middlewareData === middlewareData && previous.arrowRef === arrowRef && previous.arrow === nextArrow && previous.arrowClassName === nextArrowClassName) return previous;
|
|
@@ -8809,9 +8483,7 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8809
8483
|
openTooltip,
|
|
8810
8484
|
closeTooltip
|
|
8811
8485
|
}) : children;
|
|
8812
|
-
return
|
|
8813
|
-
{portal ? bodyElement ? (0, react_dom.createPortal)(content, bodyElement) : null : content}
|
|
8814
|
-
</>;
|
|
8486
|
+
return /* @__PURE__ */ jsx(Fragment, { children: portal ? bodyElement ? createPortal(content, bodyElement) : null : content });
|
|
8815
8487
|
}
|
|
8816
8488
|
/**
|
|
8817
8489
|
* # Tooltip
|
|
@@ -8829,297 +8501,29 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8829
8501
|
* @prop portal - Whether to use a portal for the tooltip.
|
|
8830
8502
|
*/
|
|
8831
8503
|
function Tooltip(props) {
|
|
8832
|
-
return
|
|
8833
|
-
<TooltipDisplay {...props} />
|
|
8834
|
-
</TooltipContextProvider>;
|
|
8504
|
+
return /* @__PURE__ */ jsx(TooltipContextProvider, { children: /* @__PURE__ */ jsx(TooltipDisplay, { ...props }) });
|
|
8835
8505
|
}
|
|
8836
8506
|
function ArrowSvg({ className, ...props }) {
|
|
8837
|
-
return
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
* ```
|
|
8857
|
-
*/
|
|
8858
|
-
function FacebookLogo({ className, cutout = false, targets, variant = "circle", ...props }) {
|
|
8859
|
-
return <svg {...props} className={twMerge(variant === "circle" && cutout ? "fill-[url(#facebook-gradient)]" : "**-data-[name=\"f\"]:fill-white **-data-[name=\"background\"]:fill-[url(#facebook-gradient)]", variant === "f" && "fill-[url(#facebook-gradient)]", className)} viewBox={`0 0 ${variant === "circle" ? "1024" : "551"} ${variant === "circle" && cutout ? "1017" : "1024"}`}>
|
|
8860
|
-
{variant === "circle" && (cutout ? <path {...targets?.background} data-name="background" d="M426.672,1016.91C184.64,976.24 0,765.504 0,512C0,229.424 229.424,0 512,0C794.576,0 1024,229.424 1024,512C1024,765.504 839.36,976.24 597.328,1016.91L597.328,651.376L711.104,651.376L733.872,509.152L597.328,509.152L597.328,409.6C597.328,369.776 611.552,338.496 674.128,338.496L739.552,338.496L739.552,207.648C702.576,201.952 662.752,196.272 625.776,196.272C509.152,196.272 426.672,267.376 426.672,395.376L426.672,509.152L298.672,509.152L298.672,651.376L426.672,651.376L426.672,1016.91Z" /> : <>
|
|
8861
|
-
<circle {...targets?.background} data-name="background" cx="512" cy="512" r="512" />
|
|
8862
|
-
<path {...targets && "f" in targets ? targets?.f : {}} data-name="f" d="M426.672,1016.91L426.672,651.376L298.672,651.376L298.672,509.152L426.672,509.152L426.672,395.376C426.672,267.376 509.152,196.272 625.776,196.272C662.752,196.272 702.576,201.952 739.552,207.648L739.552,338.496L674.128,338.496C611.552,338.496 597.328,369.776 597.328,409.6L597.328,509.152L733.872,509.152L711.104,651.376L597.328,651.376L597.328,1016.91C569.584,1021.57 541.072,1024 512,1024C482.928,1024 454.416,1021.57 426.672,1016.91Z" />
|
|
8863
|
-
</>)}
|
|
8864
|
-
{variant === "f" && <path d="M159.712,1024L159.712,567.888L0,567.888L0,390.432L159.712,390.432L159.712,248.448C159.712,88.736 262.656,0 408.176,0C454.304,0 504,7.104 550.144,14.192L550.144,177.472L468.512,177.472C390.432,177.472 372.672,216.512 372.672,266.192L372.672,390.432L543.04,390.432L514.656,567.888L372.672,567.888L372.672,1024L159.712,1024Z" />}
|
|
8865
|
-
<defs>
|
|
8866
|
-
{variant === "circle" && <linearGradient id="facebook-gradient" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(2.81599e-13,-994.078,994.078,2.81599e-13,512,994.078)">
|
|
8867
|
-
<stop offset="0" stopColor="rgb(0 98 224)" stopOpacity={1} />
|
|
8868
|
-
<stop offset="1" stopColor="rgb(25 175 255)" stopOpacity={1} />
|
|
8869
|
-
</linearGradient>}
|
|
8870
|
-
{variant === "f" && <linearGradient id="facebook-gradient" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.0108513,-1032.85,1032.85,0.0108513,266.187,1032.85)">
|
|
8871
|
-
<stop offset="0" stopColor="rgb(0 98 224)" stopOpacity={1} />
|
|
8872
|
-
<stop offset="1" stopColor="rgb(25 175 255)" stopOpacity={1} />
|
|
8873
|
-
</linearGradient>}
|
|
8874
|
-
</defs>
|
|
8875
|
-
</svg>;
|
|
8876
|
-
}
|
|
8877
|
-
|
|
8878
|
-
//#endregion
|
|
8879
|
-
//#region src/graphics/social-media/google-logo.tsx
|
|
8880
|
-
/**
|
|
8881
|
-
* # Google Logo
|
|
8882
|
-
*
|
|
8883
|
-
* ```ts
|
|
8884
|
-
* gradient: boolean = true
|
|
8885
|
-
* ```
|
|
8886
|
-
*/
|
|
8887
|
-
function GoogleLogo({ gradient = true, ...props }) {
|
|
8888
|
-
return <svg {...props} viewBox="0 0 1003 1024">
|
|
8889
|
-
{gradient ? <>
|
|
8890
|
-
<path d="M992.945,417.01L511.964,417.01L511.964,613.859L788.338,613.859C783.897,641.717 773.921,669.122 759.31,694.112C742.575,722.744 721.881,744.542 700.67,761.138C637.14,810.865 563.07,821.031 511.628,821.031C381.685,821.031 270.653,735.251 227.672,618.689C225.937,614.461 224.786,610.09 223.383,605.772C213.887,576.108 208.697,544.687 208.697,512.032C208.697,478.046 214.317,445.514 224.561,414.789C264.982,293.606 378.511,203.097 511.721,203.097C538.518,203.097 564.319,206.353 588.786,212.851C644.708,227.698 684.261,256.943 708.499,280.075L854.747,133.794C765.786,50.482 649.815,0 511.478,0C400.888,-0.004 298.788,35.19 215.121,94.667C147.265,142.902 91.616,207.482 54.06,282.487C19.128,352.029 0,429.093 0,511.953C0,594.821 19.158,672.685 54.09,741.588L54.09,742.052C90.988,815.198 144.943,878.178 210.526,926.192C267.816,968.135 370.54,1024 511.478,1024C592.529,1024 664.363,1009.08 727.713,981.104C773.413,960.926 813.904,934.608 850.563,900.787C899,856.093 936.938,800.815 962.829,737.214C988.724,673.612 1002.57,601.692 1002.57,523.719C1002.57,487.404 999.002,450.524 992.945,417.01Z" fill="url(#google-gradient-1)" />
|
|
8891
|
-
<path d="M962.829,737.214L788.338,613.859C783.897,641.717 773.921,669.122 759.31,694.112C742.575,722.744 721.881,744.542 700.67,761.138C637.14,810.865 563.07,821.031 511.628,821.031C381.685,821.031 270.653,735.251 227.672,618.689C225.937,614.461 224.786,610.09 223.383,605.772C213.887,576.108 208.697,544.687 208.697,512.032L0,511.953C0,594.821 19.158,672.685 54.09,741.588L54.09,742.052C90.988,815.198 144.943,878.178 210.526,926.192C267.816,968.135 370.54,1024 511.478,1024C592.529,1024 664.363,1009.08 727.713,981.104C773.413,960.926 813.904,934.608 850.563,900.787C899,856.093 936.938,800.815 962.829,737.214Z" fill="url(#google-gradient-2)" />
|
|
8892
|
-
<path d="M0,511.953L208.697,512.032C208.697,478.046 214.317,445.514 224.561,414.789C264.982,293.606 378.511,203.097 511.721,203.097C538.518,203.097 564.319,206.353 588.786,212.851C644.708,227.698 684.261,256.943 708.499,280.075L854.747,133.794C765.786,50.482 649.815,0 511.478,0C400.888,-0.004 298.788,35.19 215.121,94.667C147.265,142.902 91.616,207.482 54.06,282.487C19.128,352.029 0,429.093 0,511.953Z" fill="url(#google-gradient-3)" />
|
|
8893
|
-
<defs>
|
|
8894
|
-
<linearGradient id="google-gradient-1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-23.365,-1.73106,1.73106,-23.365,500.07,513.731)">
|
|
8895
|
-
<stop offset="0" stopColor="rgb(48,134,255)" stopOpacity={1} />
|
|
8896
|
-
<stop offset="1" stopColor="rgb(254,206,5)" stopOpacity={1} />
|
|
8897
|
-
</linearGradient>
|
|
8898
|
-
<radialGradient id="google-gradient-2" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(762.024,46.0057,-28.7966,476.978,457.583,993.176)">
|
|
8899
|
-
<stop offset="0" stopColor="rgb(15,188,92)" stopOpacity={1} />
|
|
8900
|
-
<stop offset="0.38" stopColor="rgb(15,188,92)" stopOpacity={1} />
|
|
8901
|
-
<stop offset="0.71" stopColor="rgb(15,188,92)" stopOpacity={.28} />
|
|
8902
|
-
<stop offset="1" stopColor="rgb(15,188,92)" stopOpacity={0} />
|
|
8903
|
-
</radialGradient>
|
|
8904
|
-
<linearGradient id="google-gradient-3" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(-220.623,431.86,-270.317,-138.096,806.553,181.999)">
|
|
8905
|
-
<stop offset="0" stopColor="rgb(251,78,90)" stopOpacity={1} />
|
|
8906
|
-
<stop offset="0.39" stopColor="rgb(255,71,63)" stopOpacity={1} />
|
|
8907
|
-
<stop offset="1" stopColor="rgb(251,78,90)" stopOpacity={0} />
|
|
8908
|
-
</linearGradient>
|
|
8909
|
-
</defs>
|
|
8910
|
-
</> : <path d="M992.945,417.01L511.964,417.01L511.964,613.859L788.338,613.859C783.897,641.717 773.921,669.122 759.31,694.112C742.575,722.744 721.881,744.542 700.67,761.138C637.14,810.865 563.07,821.031 511.628,821.031C381.685,821.031 270.653,735.251 227.672,618.689C225.937,614.461 224.786,610.09 223.383,605.772C213.887,576.108 208.697,544.687 208.697,512.032C208.697,478.046 214.317,445.514 224.561,414.789C264.982,293.606 378.511,203.097 511.721,203.097C538.518,203.097 564.319,206.353 588.786,212.851C644.708,227.698 684.261,256.943 708.499,280.075L854.747,133.794C765.786,50.482 649.815,0 511.478,0C400.888,-0.004 298.788,35.19 215.121,94.667C147.265,142.902 91.616,207.482 54.06,282.487C19.128,352.029 0,429.093 0,511.953C0,594.821 19.158,672.685 54.09,741.588L54.09,742.052C90.988,815.198 144.943,878.178 210.526,926.192C267.816,968.135 370.54,1024 511.478,1024C592.529,1024 664.363,1009.08 727.713,981.104C773.413,960.926 813.904,934.608 850.563,900.787C899,856.093 936.938,800.815 962.829,737.214C988.724,673.612 1002.57,601.692 1002.57,523.719C1002.57,487.404 999.002,450.524 992.945,417.01Z" />}
|
|
8911
|
-
</svg>;
|
|
8912
|
-
}
|
|
8913
|
-
|
|
8914
|
-
//#endregion
|
|
8915
|
-
//#region src/graphics/social-media/instagram-logo.tsx
|
|
8916
|
-
/**
|
|
8917
|
-
* # Instagram Logo
|
|
8918
|
-
*
|
|
8919
|
-
* ```ts
|
|
8920
|
-
* gradient: boolean = true
|
|
8921
|
-
* ```
|
|
8922
|
-
*/
|
|
8923
|
-
function InstagramLogo({ gradient = true, ...props }) {
|
|
8924
|
-
return <svg {...props} viewBox="0 0 1024 1024">
|
|
8925
|
-
{gradient ? <>
|
|
8926
|
-
<path d="M512,0C651.052,0 668.488,0.588 723.096,3.08C777.592,5.568 814.812,14.224 847.38,26.88C881.048,39.96 909.6,57.472 938.064,85.936C966.528,114.4 984.036,142.952 997.12,176.624C1009.78,209.188 1018.43,246.408 1020.92,300.904C1023.41,355.512 1024,372.948 1024,512C1024,651.052 1023.41,668.488 1020.92,723.1C1018.43,777.596 1009.78,814.812 997.12,847.38C984.036,881.052 966.528,909.604 938.064,938.068C909.6,966.532 881.048,984.04 847.376,997.12C814.812,1009.78 777.592,1018.43 723.096,1020.92C668.488,1023.41 651.052,1024 512,1024C372.948,1024 355.512,1023.41 300.9,1020.92C246.404,1018.43 209.188,1009.78 176.62,997.12C142.948,984.036 114.396,966.532 85.932,938.068C57.468,909.604 39.96,881.048 26.88,847.38C14.22,814.816 5.568,777.596 3.08,723.096C0.588,668.488 0,651.052 0,512C0,372.948 0.588,355.512 3.08,300.904C5.568,246.408 14.22,209.188 26.88,176.62C39.964,142.952 57.468,114.4 85.932,85.936C114.396,57.472 142.948,39.964 176.62,26.88C209.184,14.224 246.404,5.568 300.904,3.08C355.512,0.588 372.948,0 512,0ZM512,92.256C375.288,92.256 359.096,92.776 305.108,95.236C255.188,97.516 228.076,105.856 210.036,112.868C186.14,122.156 169.084,133.248 151.164,151.168C133.248,169.084 122.152,186.14 112.868,210.036C105.856,228.08 97.516,255.192 95.236,305.112C92.772,359.1 92.252,375.292 92.252,512C92.252,648.712 92.772,664.904 95.236,718.892C97.512,768.812 105.856,795.924 112.868,813.964C122.152,837.86 133.248,854.916 151.164,872.836C169.08,890.752 186.14,901.848 210.036,911.132C228.08,918.144 255.188,926.484 305.108,928.764C359.088,931.228 375.28,931.748 512,931.748C648.716,931.748 664.908,931.228 718.888,928.764C768.808,926.488 795.92,918.144 813.964,911.132C837.86,901.848 854.916,890.752 872.832,872.836C890.748,854.92 901.844,837.86 911.132,813.964C918.144,795.92 926.484,768.812 928.764,718.892C931.224,664.904 931.744,648.712 931.744,512C931.744,375.292 931.224,359.1 928.764,305.108C926.484,255.192 918.144,228.08 911.132,210.036C901.844,186.14 890.752,169.084 872.832,151.168C854.916,133.252 837.86,122.156 813.964,112.868C795.92,105.856 768.808,97.516 718.888,95.236C664.9,92.776 648.708,92.256 512,92.256ZM512,249.08C657.204,249.08 774.92,366.796 774.92,512C774.92,657.208 657.204,774.92 512,774.92C366.792,774.92 249.08,657.208 249.08,512C249.08,366.8 366.792,249.08 512,249.08ZM512,682.668C606.256,682.668 682.668,606.256 682.668,512C682.668,417.744 606.256,341.332 512,341.332C417.744,341.332 341.332,417.744 341.332,512C341.332,606.256 417.744,682.668 512,682.668ZM846.744,238.692C846.744,272.628 819.24,300.132 785.304,300.132C751.372,300.132 723.864,272.628 723.864,238.692C723.864,204.76 751.372,177.252 785.304,177.252C819.24,177.252 846.744,204.76 846.744,238.692Z" fill="url(#instagram-gradient-1)" />
|
|
8927
|
-
<path d="M512,0C651.052,0 668.488,0.588 723.096,3.08C777.592,5.568 814.812,14.224 847.38,26.88C881.048,39.96 909.6,57.472 938.064,85.936C966.528,114.4 984.036,142.952 997.12,176.624C1009.78,209.188 1018.43,246.408 1020.92,300.904C1023.41,355.512 1024,372.948 1024,512C1024,651.052 1023.41,668.488 1020.92,723.1C1018.43,777.596 1009.78,814.812 997.12,847.38C984.036,881.052 966.528,909.604 938.064,938.068C909.6,966.532 881.048,984.04 847.376,997.12C814.812,1009.78 777.592,1018.43 723.096,1020.92C668.488,1023.41 651.052,1024 512,1024C372.948,1024 355.512,1023.41 300.9,1020.92C246.404,1018.43 209.188,1009.78 176.62,997.12C142.948,984.036 114.396,966.532 85.932,938.068C57.468,909.604 39.96,881.048 26.88,847.38C14.22,814.816 5.568,777.596 3.08,723.096C0.588,668.488 0,651.052 0,512C0,372.948 0.588,355.512 3.08,300.904C5.568,246.408 14.22,209.188 26.88,176.62C39.964,142.952 57.468,114.4 85.932,85.936C114.396,57.472 142.948,39.964 176.62,26.88C209.184,14.224 246.404,5.568 300.904,3.08C355.512,0.588 372.948,0 512,0ZM512,92.256C375.288,92.256 359.096,92.776 305.108,95.236C255.188,97.516 228.076,105.856 210.036,112.868C186.14,122.156 169.084,133.248 151.164,151.168C133.248,169.084 122.152,186.14 112.868,210.036C105.856,228.08 97.516,255.192 95.236,305.112C92.772,359.1 92.252,375.292 92.252,512C92.252,648.712 92.772,664.904 95.236,718.892C97.512,768.812 105.856,795.924 112.868,813.964C122.152,837.86 133.248,854.916 151.164,872.836C169.08,890.752 186.14,901.848 210.036,911.132C228.08,918.144 255.188,926.484 305.108,928.764C359.088,931.228 375.28,931.748 512,931.748C648.716,931.748 664.908,931.228 718.888,928.764C768.808,926.488 795.92,918.144 813.964,911.132C837.86,901.848 854.916,890.752 872.832,872.836C890.748,854.92 901.844,837.86 911.132,813.964C918.144,795.92 926.484,768.812 928.764,718.892C931.224,664.904 931.744,648.712 931.744,512C931.744,375.292 931.224,359.1 928.764,305.108C926.484,255.192 918.144,228.08 911.132,210.036C901.844,186.14 890.752,169.084 872.832,151.168C854.916,133.252 837.86,122.156 813.964,112.868C795.92,105.856 768.808,97.516 718.888,95.236C664.9,92.776 648.708,92.256 512,92.256ZM512,249.08C657.204,249.08 774.92,366.796 774.92,512C774.92,657.208 657.204,774.92 512,774.92C366.792,774.92 249.08,657.208 249.08,512C249.08,366.8 366.792,249.08 512,249.08ZM512,682.668C606.256,682.668 682.668,606.256 682.668,512C682.668,417.744 606.256,341.332 512,341.332C417.744,341.332 341.332,417.744 341.332,512C341.332,606.256 417.744,682.668 512,682.668ZM846.744,238.692C846.744,272.628 819.24,300.132 785.304,300.132C751.372,300.132 723.864,272.628 723.864,238.692C723.864,204.76 751.372,177.252 785.304,177.252C819.24,177.252 846.744,204.76 846.744,238.692Z" fill="url(#instagram-gradient-2)" />
|
|
8928
|
-
<path d="M512,0C651.052,-0 668.488,0.588 723.096,3.08C777.592,5.568 814.812,14.224 847.38,26.88C881.048,39.96 909.6,57.472 938.064,85.936C966.528,114.4 984.036,142.952 997.12,176.624C1009.78,209.188 1018.43,246.408 1020.92,300.904C1023.41,355.512 1024,372.948 1024,512C1024,651.052 1023.41,668.488 1020.92,723.1C1018.43,777.596 1009.78,814.812 997.12,847.38C984.036,881.052 966.528,909.604 938.064,938.068C909.6,966.532 881.048,984.04 847.376,997.12C814.812,1009.78 777.592,1018.43 723.096,1020.92C668.488,1023.41 651.052,1024 512,1024C372.948,1024 355.512,1023.41 300.9,1020.92C246.404,1018.43 209.188,1009.78 176.62,997.12C142.948,984.036 114.396,966.532 85.932,938.068C57.468,909.604 39.96,881.048 26.88,847.38C14.22,814.816 5.568,777.596 3.08,723.096C0.588,668.488 0,651.052 0,512C0,372.948 0.588,355.512 3.08,300.904C5.568,246.408 14.22,209.188 26.88,176.62C39.964,142.952 57.468,114.4 85.932,85.936C114.396,57.472 142.948,39.964 176.62,26.88C209.184,14.224 246.404,5.568 300.904,3.08C355.512,0.588 372.948,0 512,0ZM512,92.256C375.288,92.256 359.096,92.776 305.108,95.236C255.188,97.516 228.076,105.856 210.036,112.868C186.14,122.156 169.084,133.248 151.164,151.168C133.248,169.084 122.152,186.14 112.868,210.036C105.856,228.08 97.516,255.192 95.236,305.112C92.772,359.1 92.252,375.292 92.252,512C92.252,648.712 92.772,664.904 95.236,718.892C97.512,768.812 105.856,795.924 112.868,813.964C122.152,837.86 133.248,854.916 151.164,872.836C169.08,890.752 186.14,901.848 210.036,911.132C228.08,918.144 255.188,926.484 305.108,928.764C359.088,931.228 375.28,931.748 512,931.748C648.716,931.748 664.908,931.228 718.888,928.764C768.808,926.488 795.92,918.144 813.964,911.132C837.86,901.848 854.916,890.752 872.832,872.836C890.748,854.92 901.844,837.86 911.132,813.964C918.144,795.92 926.484,768.812 928.764,718.892C931.224,664.904 931.744,648.712 931.744,512C931.744,375.292 931.224,359.1 928.764,305.108C926.484,255.192 918.144,228.08 911.132,210.036C901.844,186.14 890.752,169.084 872.832,151.168C854.916,133.252 837.86,122.156 813.964,112.868C795.92,105.856 768.808,97.516 718.888,95.236C664.9,92.776 648.708,92.256 512,92.256ZM512,249.08C657.204,249.08 774.92,366.796 774.92,512C774.92,657.208 657.204,774.92 512,774.92C366.792,774.92 249.08,657.208 249.08,512C249.08,366.8 366.792,249.08 512,249.08ZM512,682.668C606.256,682.668 682.668,606.256 682.668,512C682.668,417.744 606.256,341.332 512,341.332C417.744,341.332 341.332,417.744 341.332,512C341.332,606.256 417.744,682.668 512,682.668ZM846.744,238.692C846.744,272.628 819.24,300.132 785.304,300.132C751.372,300.132 723.864,272.628 723.864,238.692C723.864,204.76 751.372,177.252 785.304,177.252C819.24,177.252 846.744,204.76 846.744,238.692Z" fill="url(#instagram-gradient-3)" />
|
|
8929
|
-
<defs>
|
|
8930
|
-
<radialGradient id="instagram-gradient-1" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(871.396,269.57,-152.264,492.2,322.577,976.97)">
|
|
8931
|
-
<stop offset="0" stopColor="rgb(255 213 1)" stopOpacity={1} />
|
|
8932
|
-
<stop offset="0.32" stopColor="rgb(255 189 7)" stopOpacity={1} />
|
|
8933
|
-
<stop offset="0.59" stopColor="rgb(255 103 29)" stopOpacity={1} />
|
|
8934
|
-
<stop offset="1" stopColor="rgb(255 0 185)" stopOpacity={1} />
|
|
8935
|
-
</radialGradient>
|
|
8936
|
-
<radialGradient id="instagram-gradient-2" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(94.7015,306.205,-937.345,289.897,119.251,57.4757)">
|
|
8937
|
-
<stop offset="0" stopColor="rgb(109 25 255)" stopOpacity={1} />
|
|
8938
|
-
<stop offset="0.43" stopColor="rgb(151 18 235)" stopOpacity={1} />
|
|
8939
|
-
<stop offset="0.96" stopColor="rgb(250 1 187)" stopOpacity={1} />
|
|
8940
|
-
<stop offset="1" stopColor="rgb(255 0 185)" stopOpacity={0} />
|
|
8941
|
-
</radialGradient>
|
|
8942
|
-
<radialGradient id="instagram-gradient-3" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(112.098,-864.179,131.728,17.0873,1003.58,829.183)">
|
|
8943
|
-
<stop offset="0" stopColor="rgb(254 21 138)" stopOpacity={1} />
|
|
8944
|
-
<stop offset="0.46" stopColor="rgb(255 2 62)" stopOpacity={1} />
|
|
8945
|
-
<stop offset="1" stopColor="rgb(255 0 55)" stopOpacity={0} />
|
|
8946
|
-
</radialGradient>
|
|
8947
|
-
</defs>
|
|
8948
|
-
</> : <>
|
|
8949
|
-
<path d="M512,0C651.052,0 668.488,0.588 723.096,3.08C777.592,5.568 814.812,14.224 847.38,26.88C881.048,39.96 909.6,57.472 938.064,85.936C966.528,114.4 984.036,142.952 997.12,176.624C1009.78,209.188 1018.43,246.408 1020.92,300.904C1023.41,355.512 1024,372.948 1024,512C1024,651.052 1023.41,668.488 1020.92,723.1C1018.43,777.596 1009.78,814.812 997.12,847.38C984.036,881.052 966.528,909.604 938.064,938.068C909.6,966.532 881.048,984.04 847.376,997.12C814.812,1009.78 777.592,1018.43 723.096,1020.92C668.488,1023.41 651.052,1024 512,1024C372.948,1024 355.512,1023.41 300.9,1020.92C246.404,1018.43 209.188,1009.78 176.62,997.12C142.948,984.036 114.396,966.532 85.932,938.068C57.468,909.604 39.96,881.048 26.88,847.38C14.22,814.816 5.568,777.596 3.08,723.096C0.588,668.488 0,651.052 0,512C0,372.948 0.588,355.512 3.08,300.904C5.568,246.408 14.22,209.188 26.88,176.62C39.964,142.952 57.468,114.4 85.932,85.936C114.396,57.472 142.948,39.964 176.62,26.88C209.184,14.224 246.404,5.568 300.904,3.08C355.512,0.588 372.948,0 512,0ZM512,92.256C375.288,92.256 359.096,92.776 305.108,95.236C255.188,97.516 228.076,105.856 210.036,112.868C186.14,122.156 169.084,133.248 151.164,151.168C133.248,169.084 122.152,186.14 112.868,210.036C105.856,228.08 97.516,255.192 95.236,305.112C92.772,359.1 92.252,375.292 92.252,512C92.252,648.712 92.772,664.904 95.236,718.892C97.512,768.812 105.856,795.924 112.868,813.964C122.152,837.86 133.248,854.916 151.164,872.836C169.08,890.752 186.14,901.848 210.036,911.132C228.08,918.144 255.188,926.484 305.108,928.764C359.088,931.228 375.28,931.748 512,931.748C648.716,931.748 664.908,931.228 718.888,928.764C768.808,926.488 795.92,918.144 813.964,911.132C837.86,901.848 854.916,890.752 872.832,872.836C890.748,854.92 901.844,837.86 911.132,813.964C918.144,795.92 926.484,768.812 928.764,718.892C931.224,664.904 931.744,648.712 931.744,512C931.744,375.292 931.224,359.1 928.764,305.108C926.484,255.192 918.144,228.08 911.132,210.036C901.844,186.14 890.752,169.084 872.832,151.168C854.916,133.252 837.86,122.156 813.964,112.868C795.92,105.856 768.808,97.516 718.888,95.236C664.9,92.776 648.708,92.256 512,92.256Z" />
|
|
8950
|
-
<path d="M512,249.08C657.204,249.08 774.92,366.796 774.92,512C774.92,657.208 657.204,774.92 512,774.92C366.792,774.92 249.08,657.208 249.08,512C249.08,366.8 366.792,249.08 512,249.08ZM512,682.668C606.256,682.668 682.668,606.256 682.668,512C682.668,417.744 606.256,341.332 512,341.332C417.744,341.332 341.332,417.744 341.332,512C341.332,606.256 417.744,682.668 512,682.668Z" />
|
|
8951
|
-
<path d="M846.744,238.692C846.744,272.628 819.24,300.132 785.304,300.132C751.372,300.132 723.864,272.628 723.864,238.692C723.864,204.76 751.372,177.252 785.304,177.252C819.24,177.252 846.744,204.76 846.744,238.692Z" />
|
|
8952
|
-
</>}
|
|
8953
|
-
</svg>;
|
|
8954
|
-
}
|
|
8955
|
-
|
|
8956
|
-
//#endregion
|
|
8957
|
-
//#region src/graphics/social-media/linkedin-logo.tsx
|
|
8958
|
-
/**
|
|
8959
|
-
* # LinkedIn Logo
|
|
8960
|
-
*
|
|
8961
|
-
* ```ts
|
|
8962
|
-
* cutout: boolean
|
|
8963
|
-
* targets: {
|
|
8964
|
-
* in: [data-name="in"]
|
|
8965
|
-
* background: [data-name="background"]
|
|
8966
|
-
* }
|
|
8967
|
-
* ```
|
|
8968
|
-
*/
|
|
8969
|
-
function LinkedInLogo({ className, cutout, targets, ...props }) {
|
|
8970
|
-
return <svg {...props} className={twMerge(cutout ? "fill-[rgb(10_102_194)]" : "**-data-[name=\"background\"]:fill-[rgb(10_102_194)] **-data-[name=\"in\"]:fill-white", className)} viewBox="0 0 1024 1024">
|
|
8971
|
-
{!cutout && <rect {...targets?.in} data-name="in" x="112" y="112" width="800" height="800" />}
|
|
8972
|
-
<path {...targets?.background} data-name="background" d="M872.496,872.511L720.772,872.511L720.772,634.899C720.772,578.239 719.76,505.299 641.86,505.299C562.836,505.299 550.744,567.035 550.744,630.775L550.744,872.495L399.024,872.495L399.024,383.871L544.676,383.871L544.676,450.647L546.716,450.647C576.374,399.935 631.721,369.536 690.428,371.715C844.208,371.715 872.56,472.867 872.56,604.459L872.496,872.511ZM227.824,317.083C179.196,317.091 139.768,277.675 139.76,229.047C139.752,180.419 179.164,140.991 227.792,140.983C276.42,140.971 315.848,180.387 315.856,229.015C315.865,277.317 276.126,317.072 227.824,317.083M303.688,872.515L151.804,872.515L151.804,383.871L303.684,383.871L303.684,872.511L303.688,872.515ZM948.136,0.075L75.564,0.075C34.324,-0.389 0.504,32.647 0,73.887L0,950.099C0.488,991.359 34.304,1024.43 75.56,1024L948.136,1024C989.48,1024.51 1023.43,991.439 1024,950.099L1024,73.819C1023.41,32.499 989.46,-0.533 948.136,0.007" />
|
|
8973
|
-
</svg>;
|
|
8974
|
-
}
|
|
8975
|
-
|
|
8976
|
-
//#endregion
|
|
8977
|
-
//#region src/graphics/social-media/tiktok-logo.tsx
|
|
8978
|
-
/**
|
|
8979
|
-
* # TikTok Logo
|
|
8980
|
-
*
|
|
8981
|
-
* ```ts
|
|
8982
|
-
* variant: 'multicolor' | 'solid' = 'multicolor'
|
|
8983
|
-
* targets: {
|
|
8984
|
-
* bottom: [data-name="bottom"]
|
|
8985
|
-
* middle: [data-name="middle"]
|
|
8986
|
-
* top: [data-name="top"]
|
|
8987
|
-
* }
|
|
8988
|
-
* ```
|
|
8989
|
-
*/
|
|
8990
|
-
function TikTokLogo({ className, targets, variant = "multicolor", ...props }) {
|
|
8991
|
-
return <svg {...props} className={twMerge(variant === "multicolor" && "**-data-[name=\"bottom\"]:fill-[rgb(0_242_234)] **-data-[name=\"middle\"]:fill-black **-data-[name=\"top\"]:fill-[rgb(255_0_79)]", className)} viewBox={`0 0 ${variant === "solid" ? "914" : "907"} 1024`}>
|
|
8992
|
-
{variant === "multicolor" && <>
|
|
8993
|
-
<path {...targets?.top} data-name="top" d="M671.592,369.642C737.71,416.882 818.708,444.676 906.19,444.676L906.19,276.422C889.634,276.425 873.12,274.7 856.923,271.27L856.923,403.71C769.448,403.71 688.461,375.915 622.325,328.679L622.325,672.038C622.325,843.804 483.01,983.037 311.168,983.037C247.049,983.037 187.453,963.663 137.947,930.435C194.45,988.179 273.248,1024 360.424,1024C532.278,1024 671.599,884.767 671.599,712.994L671.599,369.642L671.592,369.642ZM732.368,199.894C698.578,162.997 676.392,115.315 671.592,62.6L671.592,40.959L624.904,40.959C636.656,107.96 676.74,165.201 732.368,199.894ZM246.638,798.627C227.759,773.886 217.557,743.621 217.603,712.502C217.603,633.943 281.324,570.246 359.939,570.246C374.59,570.243 389.154,572.485 403.116,576.913L403.116,404.898C386.799,402.663 370.331,401.714 353.87,402.062L353.87,535.95C339.897,531.522 325.327,529.273 310.672,529.287C232.057,529.287 168.339,592.977 168.339,671.546C168.339,727.1 200.189,775.197 246.638,798.627Z" />
|
|
8994
|
-
<path {...targets?.middle} data-name="middle" d="M622.325,328.676C688.461,375.912 769.448,403.706 856.923,403.706L856.923,271.266C808.095,260.871 764.869,235.367 732.368,199.894C676.737,165.197 636.656,107.956 624.904,40.959L502.269,40.959L502.269,712.987C501.991,791.331 438.379,854.768 359.932,854.768C313.705,854.768 272.637,832.744 246.627,798.627C200.182,775.197 168.332,727.097 168.332,671.55C168.332,592.987 232.05,529.29 310.665,529.29C325.727,529.29 340.245,531.634 353.863,535.954L353.863,402.065C185.039,405.551 49.264,543.425 49.264,712.99C49.264,797.636 83.075,874.371 137.951,930.438C187.457,963.663 247.053,983.041 311.171,983.041C483.017,983.041 622.328,843.8 622.328,672.038L622.328,328.676L622.325,328.676Z" />
|
|
8995
|
-
<path {...targets?.bottom} data-name="bottom" d="M856.923,271.266L856.923,235.455C812.892,235.522 769.725,223.197 732.368,199.89C765.438,236.077 808.984,261.029 856.923,271.266ZM624.904,40.959C623.783,34.557 622.923,28.113 622.325,21.641L622.325,0L452.998,0L452.998,672.035C452.728,750.369 389.119,813.805 310.665,813.805C287.632,813.805 265.886,808.341 246.627,798.631C272.637,832.744 313.705,854.765 359.932,854.765C438.372,854.765 501.995,791.335 502.269,712.99L502.269,40.959L624.904,40.959ZM353.87,402.065L353.87,363.942C339.721,362.009 325.457,361.039 311.175,361.046C139.314,361.046 0,500.283 0,672.035C0,779.713 54.753,874.61 137.954,930.431C83.078,874.368 49.267,797.629 49.267,712.987C49.267,543.425 185.039,405.551 353.87,402.065L353.87,402.065Z" />
|
|
8996
|
-
</>}
|
|
8997
|
-
{variant === "solid" && <path d="M667.348,44.69C680.075,111.724 720.791,169.313 777.229,205.249L777.286,205.307C816.62,230.358 863.44,244.986 913.716,244.986L913.716,420.98C820.306,420.98 733.749,391.782 663.086,342.197L663.086,700.001C663.086,878.644 514.39,1024 331.543,1024C260.881,1024 195.401,1002.23 141.555,965.316L141.44,965.201C55.977,906.517 0,809.536 0,699.944C0,521.301 148.754,375.887 331.543,375.887C346.747,375.887 361.605,377.154 376.233,379.054L376.233,558.849C362.066,554.53 347.15,551.996 331.543,551.996C248.038,551.996 180.14,618.397 180.14,700.001C180.14,756.784 213.139,806.196 261.284,830.96C282.304,841.787 306.204,847.949 331.543,847.949C413.09,847.949 479.663,784.543 482.658,705.53L482.946,0L663.086,0C663.086,15.261 664.584,30.177 667.348,44.69Z" />}
|
|
8998
|
-
</svg>;
|
|
8999
|
-
}
|
|
9000
|
-
|
|
9001
|
-
//#endregion
|
|
9002
|
-
//#region src/graphics/social-media/x-logo.tsx
|
|
9003
|
-
/**
|
|
9004
|
-
* # 𝕏 Logo
|
|
9005
|
-
*/
|
|
9006
|
-
function XLogo(props) {
|
|
9007
|
-
return <svg {...props} viewBox="0 0 1024 926">
|
|
9008
|
-
<path d="M806.464,0L963.472,0L620.432,392.08L1024,925.6L708.016,925.6L460.528,602.016L177.328,925.6L20.224,925.6L387.136,506.24L0,0L324,0L547.712,295.76L806.464,0ZM751.344,831.616L838.352,831.616L276.736,89.04L183.36,89.04L751.344,831.616Z" />
|
|
9009
|
-
</svg>;
|
|
9010
|
-
}
|
|
9011
|
-
|
|
9012
|
-
//#endregion
|
|
9013
|
-
//#region src/graphics/social-media/youtube-logo.tsx
|
|
9014
|
-
/**
|
|
9015
|
-
* # YouTube Logo
|
|
9016
|
-
*
|
|
9017
|
-
* ```ts
|
|
9018
|
-
* cutout: boolean = false
|
|
9019
|
-
* targets: {
|
|
9020
|
-
* background: [data-name="background"],
|
|
9021
|
-
* play: [data-name="play"]
|
|
9022
|
-
* }
|
|
9023
|
-
* ```
|
|
9024
|
-
*/
|
|
9025
|
-
function YouTubeLogo({ className, cutout = false, targets, ...props }) {
|
|
9026
|
-
return <svg {...props} className={twMerge(cutout ? "fill-[rgb(255_0_0)]" : "**-data-[name=\"background\"]:fill-[rgb(255_0_0)] **-data-[name=\"play\"]:fill-white", className)} viewBox="0 0 1024 718">
|
|
9027
|
-
{cutout ? <path {...targets?.background} data-name="background" d="M1001.4,112.302L1001.4,112.306C1035.22,248.444 1027.41,463.456 1002.06,604.85C990.119,648.968 955.546,683.541 911.428,695.48C831.967,717.152 512.141,717.152 512.141,717.152C512.141,717.152 192.312,717.152 112.847,695.48C68.73,683.54 34.159,648.967 22.221,604.85C-11.799,469.304 -2.475,254.156 21.561,112.962C33.498,68.844 68.069,34.269 112.187,22.328C191.652,0.656 511.489,0 511.489,0C511.489,0 831.311,0 910.776,21.672C954.892,33.612 989.464,68.185 1001.4,112.302ZM409.692,512.249L675.008,358.574L409.692,204.899L409.692,512.249Z" /> : <>
|
|
9028
|
-
<path {...targets?.background} data-name="background" d="M1001.4,112.302C989.464,68.185 954.892,33.612 910.776,21.672C831.311,0 511.489,0 511.489,0C511.489,0 191.652,0.656 112.187,22.328C68.069,34.269 33.498,68.844 21.561,112.962C-2.475,254.156 -11.799,469.304 22.221,604.85C34.159,648.967 68.73,683.54 112.847,695.48C192.312,717.152 512.141,717.152 512.141,717.152C512.141,717.152 831.967,717.152 911.428,695.48C955.546,683.541 990.119,648.968 1002.06,604.85C1027.41,463.456 1035.22,248.444 1001.4,112.306L1001.4,112.302Z" />
|
|
9029
|
-
<path {...targets && "play" in targets ? targets?.play : {}} data-name="play" d="M409.692,512.249L675.008,358.574L409.692,204.899L409.692,512.249Z" />
|
|
9030
|
-
</>}
|
|
9031
|
-
</svg>;
|
|
8507
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8508
|
+
viewBox: "0 0 20 10",
|
|
8509
|
+
className: twMerge("h-2.5 w-5 fill-none", className),
|
|
8510
|
+
...props,
|
|
8511
|
+
children: [
|
|
8512
|
+
/* @__PURE__ */ jsx("path", {
|
|
8513
|
+
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
8514
|
+
className: "fill-neutral-50 dark:fill-neutral-800"
|
|
8515
|
+
}),
|
|
8516
|
+
/* @__PURE__ */ jsx("path", {
|
|
8517
|
+
d: "M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z",
|
|
8518
|
+
className: "fill-neutral-400 dark:fill-none"
|
|
8519
|
+
}),
|
|
8520
|
+
/* @__PURE__ */ jsx("path", {
|
|
8521
|
+
d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
|
|
8522
|
+
className: "dark:fill-neutral-600"
|
|
8523
|
+
})
|
|
8524
|
+
]
|
|
8525
|
+
});
|
|
9032
8526
|
}
|
|
9033
8527
|
|
|
9034
8528
|
//#endregion
|
|
9035
|
-
|
|
9036
|
-
exports.Button = Button;
|
|
9037
|
-
exports.Checkbox = Checkbox;
|
|
9038
|
-
exports.Details = Details;
|
|
9039
|
-
exports.DetailsBody = DetailsBody;
|
|
9040
|
-
exports.DetailsSummary = DetailsSummary;
|
|
9041
|
-
exports.DropDown = DropDown;
|
|
9042
|
-
exports.DropDownButton = DropDownButton;
|
|
9043
|
-
exports.DropDownItem = DropDownItem;
|
|
9044
|
-
exports.DropDownItems = DropDownItems;
|
|
9045
|
-
exports.DropDownSection = DropDownSection;
|
|
9046
|
-
exports.DropDownSeparator = DropDownSeparator;
|
|
9047
|
-
exports.FacebookLogo = FacebookLogo;
|
|
9048
|
-
exports.Fieldset = Fieldset;
|
|
9049
|
-
exports.Form = Form;
|
|
9050
|
-
exports.FormStatusProvider = FormStatusProvider;
|
|
9051
|
-
exports.Ghost = Ghost;
|
|
9052
|
-
exports.GoogleLogo = GoogleLogo;
|
|
9053
|
-
exports.Heading = Heading;
|
|
9054
|
-
exports.HumanVerification = HumanVerification;
|
|
9055
|
-
exports.IFrame = IFrame;
|
|
9056
|
-
exports.Input = Input;
|
|
9057
|
-
exports.InstagramLogo = InstagramLogo;
|
|
9058
|
-
exports.Link = Link;
|
|
9059
|
-
exports.LinkedInLogo = LinkedInLogo;
|
|
9060
|
-
exports.Modal = Modal;
|
|
9061
|
-
exports.ModalClose = ModalClose;
|
|
9062
|
-
exports.ModalDialog = ModalDialog;
|
|
9063
|
-
exports.ModalTitle = ModalTitle;
|
|
9064
|
-
exports.ModalTrigger = ModalTrigger;
|
|
9065
|
-
exports.Select = Select;
|
|
9066
|
-
exports.SelectOption = SelectOption;
|
|
9067
|
-
exports.SelectSectionTitle = SelectSectionTitle;
|
|
9068
|
-
exports.SubmitButton = SubmitButton;
|
|
9069
|
-
exports.Textarea = Textarea;
|
|
9070
|
-
exports.TikTokLogo = TikTokLogo;
|
|
9071
|
-
exports.Time = Time;
|
|
9072
|
-
exports.Tooltip = Tooltip;
|
|
9073
|
-
exports.TooltipPanel = TooltipPanel;
|
|
9074
|
-
exports.TooltipTrigger = TooltipTrigger;
|
|
9075
|
-
exports.XLogo = XLogo;
|
|
9076
|
-
exports.YouTubeLogo = YouTubeLogo;
|
|
9077
|
-
exports.addClass = addClass;
|
|
9078
|
-
exports.createButton = createButton;
|
|
9079
|
-
exports.createFastContext = createFastContext;
|
|
9080
|
-
exports.createLink = createLink;
|
|
9081
|
-
exports.currentMonthName = currentMonthName;
|
|
9082
|
-
exports.currentWeekdayName = currentWeekdayName;
|
|
9083
|
-
exports.daysInMonth = daysInMonth;
|
|
9084
|
-
exports.easeOutExpo = easeOutExpo;
|
|
9085
|
-
exports.emailRegex = emailRegex;
|
|
9086
|
-
exports.extendMadoTailwindMerge = extendMadoTailwindMerge;
|
|
9087
|
-
exports.firstOfMonth = firstOfMonth;
|
|
9088
|
-
exports.formatPhoneNumber = formatPhoneNumber;
|
|
9089
|
-
exports.generateHumanValidationToken = generateHumanValidationToken;
|
|
9090
|
-
exports.getDate = getDate;
|
|
9091
|
-
exports.getHours = getHours;
|
|
9092
|
-
exports.getHoursIn12 = getHoursIn12;
|
|
9093
|
-
exports.getLinkClasses = getLinkClasses;
|
|
9094
|
-
exports.getLocalTime = getLocalTime;
|
|
9095
|
-
exports.getMeridianFromHour = getMeridianFromHour;
|
|
9096
|
-
exports.getMilliseconds = getMilliseconds;
|
|
9097
|
-
exports.getMinutes = getMinutes;
|
|
9098
|
-
exports.getMonth = getMonth;
|
|
9099
|
-
exports.getMonthIndexFromName = getMonthIndexFromName;
|
|
9100
|
-
exports.getMonthName = getMonthName;
|
|
9101
|
-
exports.getNextMonth = getNextMonth;
|
|
9102
|
-
exports.getPreviousMonth = getPreviousMonth;
|
|
9103
|
-
exports.getSeconds = getSeconds;
|
|
9104
|
-
exports.getTimezone = getTimezone;
|
|
9105
|
-
exports.getUserReadableDate = getUserReadableDate;
|
|
9106
|
-
exports.getUserReadableDateFromTimestampz = getUserReadableDateFromTimestampz;
|
|
9107
|
-
exports.getWeekdayName = getWeekdayName;
|
|
9108
|
-
exports.getYearsInRange = getYearsInRange;
|
|
9109
|
-
exports.hasClass = hasClass;
|
|
9110
|
-
exports.isEmail = isEmail;
|
|
9111
|
-
exports.isPhoneNumber = isPhoneNumber;
|
|
9112
|
-
exports.monthNamesList = monthNamesList;
|
|
9113
|
-
exports.removeClass = removeClass;
|
|
9114
|
-
exports.splitCamelCase = splitCamelCase;
|
|
9115
|
-
exports.telRegex = telRegex;
|
|
9116
|
-
exports.toCamelCase = toCamelCase;
|
|
9117
|
-
exports.toFullDateString = toFullDateString;
|
|
9118
|
-
exports.toLowerCase = toLowerCase;
|
|
9119
|
-
exports.toTitleCase = toTitleCase;
|
|
9120
|
-
exports.toggleClass = toggleClass;
|
|
9121
|
-
exports.twMerge = twMerge;
|
|
9122
|
-
exports.useFormStatus = useFormStatus;
|
|
9123
|
-
exports.usePointerMovement = usePointerMovement;
|
|
9124
|
-
exports.validateHuman = validateHuman;
|
|
9125
|
-
exports.weekdayNamesList = weekdayNamesList;
|
|
8529
|
+
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, createButton, createLink, generateHumanValidationToken, getLinkClasses, validateHuman };
|