@andrilla/mado-ui 1.0.2 → 1.0.5
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} +916 -1525
- package/dist/client/graphics/index.js +450 -0
- package/dist/{client.esm.js → client.js} +1048 -536
- package/dist/{index.cjs → components/index.js} +916 -1525
- package/dist/graphics/index.js +449 -0
- package/dist/hooks/index.js +174 -0
- package/dist/{mado-ui.esm.js → index.js} +1048 -536
- package/dist/types/index.ts +0 -0
- package/dist/utils/index.js +622 -0
- package/package.json +34 -9
- package/dist/css/index.css +0 -4561
|
@@ -1,56 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
-
key = keys[i];
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
15
|
-
__defProp(to, key, {
|
|
16
|
-
get: ((k) => from[k]).bind(null, key),
|
|
17
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
-
value: mod,
|
|
26
|
-
enumerable: true
|
|
27
|
-
}) : target, mod));
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
|
-
let tailwind_merge = require("tailwind-merge");
|
|
31
|
-
let _headlessui_react = require("@headlessui/react");
|
|
32
|
-
let react = require("react");
|
|
33
|
-
react = __toESM(react);
|
|
34
|
-
let react_dom = require("react-dom");
|
|
35
|
-
react_dom = __toESM(react_dom);
|
|
2
|
+
import { extendTailwindMerge, twJoin } from "tailwind-merge";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Button as Button$1, Checkbox as Checkbox$1, Description, Dialog, DialogBackdrop, DialogPanel, DialogTitle, Disclosure, DisclosureButton, DisclosurePanel, Field, Fieldset as Fieldset$1, Input as Input$1, Label, Legend, Listbox, ListboxButton, ListboxOption, ListboxOptions, ListboxSelectedOption, Menu, MenuButton, MenuHeading, MenuItem, MenuItems, MenuSection, MenuSeparator, Textarea as Textarea$1 } from "@headlessui/react";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { Children, cloneElement, createContext, isValidElement, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
7
|
+
import * as ReactDOM from "react-dom";
|
|
8
|
+
import { createPortal } from "react-dom";
|
|
36
9
|
|
|
37
10
|
//#region src/utils/custom-tailwind-merge.ts
|
|
38
11
|
const integerList = Array.from({ length: 100 }, (_, i) => `${i + 1}`);
|
|
39
|
-
const twMerge =
|
|
40
|
-
animate: [{ animate: [
|
|
41
|
-
"bounce",
|
|
42
|
-
"double-spin",
|
|
43
|
-
"drop-in",
|
|
44
|
-
"flip",
|
|
45
|
-
"flip-again",
|
|
46
|
-
"grid-rows",
|
|
47
|
-
"heartbeat",
|
|
48
|
-
"ping",
|
|
49
|
-
"pulse",
|
|
50
|
-
"slide-up",
|
|
51
|
-
"spin",
|
|
52
|
-
"wave"
|
|
53
|
-
] }],
|
|
12
|
+
const twMerge = extendTailwindMerge({ extend: { classGroups: {
|
|
13
|
+
animate: [{ animate: ["fade-in", "wave"] }],
|
|
54
14
|
"animation-direction": [{ "animation-direction": [
|
|
55
15
|
"normal",
|
|
56
16
|
"reverse",
|
|
@@ -69,74 +29,6 @@ const twMerge = (0, tailwind_merge.extendTailwindMerge)({ extend: { classGroups:
|
|
|
69
29
|
"grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
|
|
70
30
|
transition: ["transition-rows"]
|
|
71
31
|
} } });
|
|
72
|
-
function extendMadoTailwindMerge(configExtension) {
|
|
73
|
-
const extend = configExtension.extend || {};
|
|
74
|
-
const theme = extend.theme || {};
|
|
75
|
-
const color = "color" in theme ? theme.color : [];
|
|
76
|
-
const classGroups = extend.classGroups || {};
|
|
77
|
-
const themeRest = { ...theme };
|
|
78
|
-
if ("color" in themeRest) delete themeRest.color;
|
|
79
|
-
const extendRest = { ...extend };
|
|
80
|
-
delete extendRest.theme;
|
|
81
|
-
delete extendRest.classGroups;
|
|
82
|
-
return (0, tailwind_merge.extendTailwindMerge)({
|
|
83
|
-
extend: {
|
|
84
|
-
theme: {
|
|
85
|
-
color: [{ ui: [
|
|
86
|
-
"red",
|
|
87
|
-
"orange",
|
|
88
|
-
"yellow",
|
|
89
|
-
"green",
|
|
90
|
-
"sky-blue",
|
|
91
|
-
"blue",
|
|
92
|
-
"violet",
|
|
93
|
-
"magenta",
|
|
94
|
-
"purple",
|
|
95
|
-
"brown",
|
|
96
|
-
"grey",
|
|
97
|
-
"pink"
|
|
98
|
-
] }, ...color],
|
|
99
|
-
...themeRest
|
|
100
|
-
},
|
|
101
|
-
classGroups: {
|
|
102
|
-
animate: [{ animate: [
|
|
103
|
-
"bounce",
|
|
104
|
-
"double-spin",
|
|
105
|
-
"drop-in",
|
|
106
|
-
"flip",
|
|
107
|
-
"flip-again",
|
|
108
|
-
"grid-rows",
|
|
109
|
-
"heartbeat",
|
|
110
|
-
"ping",
|
|
111
|
-
"pulse",
|
|
112
|
-
"slide-up",
|
|
113
|
-
"spin",
|
|
114
|
-
"wave"
|
|
115
|
-
] }],
|
|
116
|
-
"animation-direction": [{ "animation-direction": [
|
|
117
|
-
"normal",
|
|
118
|
-
"reverse",
|
|
119
|
-
"alternate",
|
|
120
|
-
"alternate-reverse"
|
|
121
|
-
] }],
|
|
122
|
-
"animation-fill": [{ "animation-fill": [
|
|
123
|
-
"none",
|
|
124
|
-
"forwards",
|
|
125
|
-
"backwards",
|
|
126
|
-
"both"
|
|
127
|
-
] }],
|
|
128
|
-
"animation-iteration": [{ "animation-iteration": [...integerList, "infinite"] }],
|
|
129
|
-
"animation-state": [{ "animation-state": ["running", "paused"] }],
|
|
130
|
-
"grid-cols": [{ "grid-cols": ["0fr", "1fr"] }],
|
|
131
|
-
"grid-rows": [{ "grid-rows": ["0fr", "1fr"] }],
|
|
132
|
-
transition: ["transition-rows"],
|
|
133
|
-
...classGroups
|
|
134
|
-
},
|
|
135
|
-
...extendRest
|
|
136
|
-
},
|
|
137
|
-
...configExtension
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
32
|
|
|
141
33
|
//#endregion
|
|
142
34
|
//#region src/components/link.tsx
|
|
@@ -147,116 +39,123 @@ function Anchor({ as, className, disabled, href, onClick, target, rel, ...props
|
|
|
147
39
|
onClick?.(e);
|
|
148
40
|
setTimeout(() => history.replaceState({}, document.title, location.pathname), 100);
|
|
149
41
|
};
|
|
150
|
-
|
|
151
|
-
|
|
42
|
+
return /* @__PURE__ */ jsx(as || "a", {
|
|
43
|
+
...props,
|
|
44
|
+
"aria-disabled": disabled,
|
|
45
|
+
className: twMerge("ease-exponential inline-block transition-transform duration-300 active:scale-95 pointer-fine:active:scale-95", className, disabled && "pointer-events-none"),
|
|
46
|
+
href,
|
|
47
|
+
target: target || (isExternal ? "_blank" : "_self"),
|
|
48
|
+
onClick: hasHash ? handleClick : onClick,
|
|
49
|
+
rel: rel !== void 0 ? rel === "nofollow" ? `${rel} noreferrer noopener` : `${rel} prefetch` : isExternal ? "nofollow noreferrer noopener" : "prefetch"
|
|
50
|
+
});
|
|
152
51
|
}
|
|
153
52
|
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";
|
|
154
|
-
const lineStaticClasses =
|
|
155
|
-
const lineClasses =
|
|
53
|
+
const lineStaticClasses = twJoin(baseClasses, "whitespace-nowrap after:-bottom-0.5 after:w-[calc(100%+0.15rem)] after:rounded-full after:border after:border-current");
|
|
54
|
+
const lineClasses = twJoin(lineStaticClasses, "whitespace-nowrap after:transition-transform after:ease-exponential");
|
|
156
55
|
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";
|
|
157
56
|
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";
|
|
158
|
-
const lineNormalClasses =
|
|
57
|
+
const lineNormalClasses = twJoin([
|
|
159
58
|
lineClasses,
|
|
160
59
|
scaleYClasses,
|
|
161
60
|
"after:origin-bottom after:translate-y-0.5 active:after:translate-y-0 pointer-fine:hover:after:translate-y-0"
|
|
162
61
|
]);
|
|
163
|
-
const lineLtrClasses =
|
|
62
|
+
const lineLtrClasses = twJoin([
|
|
164
63
|
lineClasses,
|
|
165
64
|
scaleXClasses,
|
|
166
65
|
"after:origin-left"
|
|
167
66
|
]);
|
|
168
|
-
const lineRtlClasses =
|
|
67
|
+
const lineRtlClasses = twJoin([
|
|
169
68
|
lineClasses,
|
|
170
69
|
scaleXClasses,
|
|
171
70
|
"after:origin-right"
|
|
172
71
|
]);
|
|
173
|
-
const lineCenterClasses =
|
|
174
|
-
const lineLiftClasses =
|
|
72
|
+
const lineCenterClasses = twJoin([lineClasses, scaleXClasses]);
|
|
73
|
+
const lineLiftClasses = twJoin([
|
|
175
74
|
lineClasses,
|
|
176
75
|
scaleYClasses,
|
|
177
76
|
"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"
|
|
178
77
|
]);
|
|
179
|
-
const fillClasses =
|
|
78
|
+
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)");
|
|
180
79
|
const getFillColorTransitionClasses = (theme = "blue", customTheme) => {
|
|
181
|
-
let fillColorTransitionClasses =
|
|
80
|
+
let fillColorTransitionClasses = twJoin(fillClasses, "transition-[scale,color] after:bg-(--theme-color)");
|
|
182
81
|
switch (theme) {
|
|
183
82
|
case "amber":
|
|
184
|
-
fillColorTransitionClasses =
|
|
83
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-amber-500)]");
|
|
185
84
|
break;
|
|
186
85
|
case "blue":
|
|
187
|
-
fillColorTransitionClasses =
|
|
86
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-blue-500)]");
|
|
188
87
|
break;
|
|
189
88
|
case "cyan":
|
|
190
|
-
fillColorTransitionClasses =
|
|
89
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
191
90
|
break;
|
|
192
91
|
case "emerald":
|
|
193
|
-
fillColorTransitionClasses =
|
|
92
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
194
93
|
break;
|
|
195
94
|
case "fuchsia":
|
|
196
|
-
fillColorTransitionClasses =
|
|
95
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
197
96
|
break;
|
|
198
97
|
case "gray":
|
|
199
|
-
fillColorTransitionClasses =
|
|
98
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-gray-500)]");
|
|
200
99
|
break;
|
|
201
100
|
case "green":
|
|
202
|
-
fillColorTransitionClasses =
|
|
101
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-green-500)]");
|
|
203
102
|
break;
|
|
204
103
|
case "indigo":
|
|
205
|
-
fillColorTransitionClasses =
|
|
104
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
206
105
|
break;
|
|
207
106
|
case "lime":
|
|
208
|
-
fillColorTransitionClasses =
|
|
107
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-lime-500)]");
|
|
209
108
|
break;
|
|
210
109
|
case "mauve":
|
|
211
|
-
fillColorTransitionClasses =
|
|
110
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
212
111
|
break;
|
|
213
112
|
case "mist":
|
|
214
|
-
fillColorTransitionClasses =
|
|
113
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-mist-500)]");
|
|
215
114
|
break;
|
|
216
115
|
case "neutral":
|
|
217
|
-
fillColorTransitionClasses =
|
|
116
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
218
117
|
break;
|
|
219
118
|
case "olive":
|
|
220
|
-
fillColorTransitionClasses =
|
|
119
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-olive-500)]");
|
|
221
120
|
break;
|
|
222
121
|
case "orange":
|
|
223
|
-
fillColorTransitionClasses =
|
|
122
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-orange-500)]");
|
|
224
123
|
break;
|
|
225
124
|
case "pink":
|
|
226
|
-
fillColorTransitionClasses =
|
|
125
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-pink-500)]");
|
|
227
126
|
break;
|
|
228
127
|
case "purple":
|
|
229
|
-
fillColorTransitionClasses =
|
|
128
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-purple-500)]");
|
|
230
129
|
break;
|
|
231
130
|
case "red":
|
|
232
|
-
fillColorTransitionClasses =
|
|
131
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-red-500)]");
|
|
233
132
|
break;
|
|
234
133
|
case "rose":
|
|
235
|
-
fillColorTransitionClasses =
|
|
134
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-rose-500)]");
|
|
236
135
|
break;
|
|
237
136
|
case "sky":
|
|
238
|
-
fillColorTransitionClasses =
|
|
137
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-sky-500)]");
|
|
239
138
|
break;
|
|
240
139
|
case "slate":
|
|
241
|
-
fillColorTransitionClasses =
|
|
140
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-slate-500)]");
|
|
242
141
|
break;
|
|
243
142
|
case "stone":
|
|
244
|
-
fillColorTransitionClasses =
|
|
143
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-stone-500)]");
|
|
245
144
|
break;
|
|
246
145
|
case "taupe":
|
|
247
|
-
fillColorTransitionClasses =
|
|
146
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
248
147
|
break;
|
|
249
148
|
case "teal":
|
|
250
|
-
fillColorTransitionClasses =
|
|
149
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-teal-500)]");
|
|
251
150
|
break;
|
|
252
151
|
case "violet":
|
|
253
|
-
fillColorTransitionClasses =
|
|
152
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-violet-500)]");
|
|
254
153
|
break;
|
|
255
154
|
case "yellow":
|
|
256
|
-
fillColorTransitionClasses =
|
|
155
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
257
156
|
break;
|
|
258
157
|
case "zinc":
|
|
259
|
-
fillColorTransitionClasses =
|
|
158
|
+
fillColorTransitionClasses = twJoin(fillColorTransitionClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
260
159
|
break;
|
|
261
160
|
case "custom":
|
|
262
161
|
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`.");
|
|
@@ -269,85 +168,85 @@ const getFillColorTransitionClasses = (theme = "blue", customTheme) => {
|
|
|
269
168
|
return fillColorTransitionClasses;
|
|
270
169
|
};
|
|
271
170
|
const getFillCenterClasses = (theme = "blue", customTheme) => {
|
|
272
|
-
let fillCenterColorClasses =
|
|
171
|
+
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)");
|
|
273
172
|
switch (theme) {
|
|
274
173
|
case "amber":
|
|
275
|
-
fillCenterColorClasses =
|
|
174
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
276
175
|
break;
|
|
277
176
|
case "blue":
|
|
278
|
-
fillCenterColorClasses =
|
|
177
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
279
178
|
break;
|
|
280
179
|
case "cyan":
|
|
281
|
-
fillCenterColorClasses =
|
|
180
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
282
181
|
break;
|
|
283
182
|
case "emerald":
|
|
284
|
-
fillCenterColorClasses =
|
|
183
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
285
184
|
break;
|
|
286
185
|
case "fuchsia":
|
|
287
|
-
fillCenterColorClasses =
|
|
186
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
288
187
|
break;
|
|
289
188
|
case "gray":
|
|
290
|
-
fillCenterColorClasses =
|
|
189
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
291
190
|
break;
|
|
292
191
|
case "green":
|
|
293
|
-
fillCenterColorClasses =
|
|
192
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
294
193
|
break;
|
|
295
194
|
case "indigo":
|
|
296
|
-
fillCenterColorClasses =
|
|
195
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
297
196
|
break;
|
|
298
197
|
case "lime":
|
|
299
|
-
fillCenterColorClasses =
|
|
198
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
300
199
|
break;
|
|
301
200
|
case "mauve":
|
|
302
|
-
fillCenterColorClasses =
|
|
201
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
303
202
|
break;
|
|
304
203
|
case "mist":
|
|
305
|
-
fillCenterColorClasses =
|
|
204
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
306
205
|
break;
|
|
307
206
|
case "neutral":
|
|
308
|
-
fillCenterColorClasses =
|
|
207
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
309
208
|
break;
|
|
310
209
|
case "olive":
|
|
311
|
-
fillCenterColorClasses =
|
|
210
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
312
211
|
break;
|
|
313
212
|
case "orange":
|
|
314
|
-
fillCenterColorClasses =
|
|
213
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
315
214
|
break;
|
|
316
215
|
case "pink":
|
|
317
|
-
fillCenterColorClasses =
|
|
216
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
318
217
|
break;
|
|
319
218
|
case "purple":
|
|
320
|
-
fillCenterColorClasses =
|
|
219
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
321
220
|
break;
|
|
322
221
|
case "red":
|
|
323
|
-
fillCenterColorClasses =
|
|
222
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
324
223
|
break;
|
|
325
224
|
case "rose":
|
|
326
|
-
fillCenterColorClasses =
|
|
225
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
327
226
|
break;
|
|
328
227
|
case "sky":
|
|
329
|
-
fillCenterColorClasses =
|
|
228
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
330
229
|
break;
|
|
331
230
|
case "slate":
|
|
332
|
-
fillCenterColorClasses =
|
|
231
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
333
232
|
break;
|
|
334
233
|
case "stone":
|
|
335
|
-
fillCenterColorClasses =
|
|
234
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
336
235
|
break;
|
|
337
236
|
case "taupe":
|
|
338
|
-
fillCenterColorClasses =
|
|
237
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
339
238
|
break;
|
|
340
239
|
case "teal":
|
|
341
|
-
fillCenterColorClasses =
|
|
240
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
342
241
|
break;
|
|
343
242
|
case "violet":
|
|
344
|
-
fillCenterColorClasses =
|
|
243
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
345
244
|
break;
|
|
346
245
|
case "yellow":
|
|
347
|
-
fillCenterColorClasses =
|
|
246
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
348
247
|
break;
|
|
349
248
|
case "zinc":
|
|
350
|
-
fillCenterColorClasses =
|
|
249
|
+
fillCenterColorClasses = twJoin(fillCenterColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
351
250
|
break;
|
|
352
251
|
case "custom":
|
|
353
252
|
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`.");
|
|
@@ -362,92 +261,92 @@ const getFillCenterClasses = (theme = "blue", customTheme) => {
|
|
|
362
261
|
const multilineBaseClasses = "bg-linear-to-r from-current to-current bg-no-repeat active:scale-95";
|
|
363
262
|
const multilineLineStaticClasses = "underline";
|
|
364
263
|
const multilineNormalClasses = "underline-offset-1 active:underline pointer-fine:hover:underline";
|
|
365
|
-
const multilineLineClasses =
|
|
366
|
-
const multilineXClasses =
|
|
367
|
-
const multilineLineRtlClasses =
|
|
368
|
-
const multilineLineCenterClasses =
|
|
369
|
-
const multilineLineLiftClasses =
|
|
370
|
-
const multilineFillBaseClasses =
|
|
264
|
+
const multilineLineClasses = twJoin(twJoin(multilineBaseClasses, "duration-500 ease-exponential"), "bg-position-[0%_100%] px-px pb-px transition-[background-size]");
|
|
265
|
+
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]");
|
|
266
|
+
const multilineLineRtlClasses = twJoin([multilineXClasses, "bg-position-[100%_100%]"]);
|
|
267
|
+
const multilineLineCenterClasses = twJoin([multilineXClasses, "bg-position-[50%_100%]"]);
|
|
268
|
+
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]");
|
|
269
|
+
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");
|
|
371
270
|
const getMultilineFillColorClasses = (theme = "blue", customTheme) => {
|
|
372
|
-
let multilineFillColorClasses =
|
|
271
|
+
let multilineFillColorClasses = twJoin(multilineFillBaseClasses, "from-(--theme-color) to-(--theme-color) transition-[background-size,color]");
|
|
373
272
|
switch (theme) {
|
|
374
273
|
case "amber":
|
|
375
|
-
multilineFillColorClasses =
|
|
274
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
376
275
|
break;
|
|
377
276
|
case "blue":
|
|
378
|
-
multilineFillColorClasses =
|
|
277
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
379
278
|
break;
|
|
380
279
|
case "cyan":
|
|
381
|
-
multilineFillColorClasses =
|
|
280
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
382
281
|
break;
|
|
383
282
|
case "emerald":
|
|
384
|
-
multilineFillColorClasses =
|
|
283
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
385
284
|
break;
|
|
386
285
|
case "fuchsia":
|
|
387
|
-
multilineFillColorClasses =
|
|
286
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
388
287
|
break;
|
|
389
288
|
case "gray":
|
|
390
|
-
multilineFillColorClasses =
|
|
289
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
391
290
|
break;
|
|
392
291
|
case "green":
|
|
393
|
-
multilineFillColorClasses =
|
|
292
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
394
293
|
break;
|
|
395
294
|
case "indigo":
|
|
396
|
-
multilineFillColorClasses =
|
|
295
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
397
296
|
break;
|
|
398
297
|
case "lime":
|
|
399
|
-
multilineFillColorClasses =
|
|
298
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
400
299
|
break;
|
|
401
300
|
case "mauve":
|
|
402
|
-
multilineFillColorClasses =
|
|
301
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
403
302
|
break;
|
|
404
303
|
case "mist":
|
|
405
|
-
multilineFillColorClasses =
|
|
304
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
406
305
|
break;
|
|
407
306
|
case "neutral":
|
|
408
|
-
multilineFillColorClasses =
|
|
307
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
409
308
|
break;
|
|
410
309
|
case "olive":
|
|
411
|
-
multilineFillColorClasses =
|
|
310
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
412
311
|
break;
|
|
413
312
|
case "orange":
|
|
414
|
-
multilineFillColorClasses =
|
|
313
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
415
314
|
break;
|
|
416
315
|
case "pink":
|
|
417
|
-
multilineFillColorClasses =
|
|
316
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
418
317
|
break;
|
|
419
318
|
case "purple":
|
|
420
|
-
multilineFillColorClasses =
|
|
319
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
421
320
|
break;
|
|
422
321
|
case "red":
|
|
423
|
-
multilineFillColorClasses =
|
|
322
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
424
323
|
break;
|
|
425
324
|
case "rose":
|
|
426
|
-
multilineFillColorClasses =
|
|
325
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
427
326
|
break;
|
|
428
327
|
case "sky":
|
|
429
|
-
multilineFillColorClasses =
|
|
328
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
430
329
|
break;
|
|
431
330
|
case "slate":
|
|
432
|
-
multilineFillColorClasses =
|
|
331
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
433
332
|
break;
|
|
434
333
|
case "stone":
|
|
435
|
-
multilineFillColorClasses =
|
|
334
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
436
335
|
break;
|
|
437
336
|
case "taupe":
|
|
438
|
-
multilineFillColorClasses =
|
|
337
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
439
338
|
break;
|
|
440
339
|
case "teal":
|
|
441
|
-
multilineFillColorClasses =
|
|
340
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
442
341
|
break;
|
|
443
342
|
case "violet":
|
|
444
|
-
multilineFillColorClasses =
|
|
343
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
445
344
|
break;
|
|
446
345
|
case "yellow":
|
|
447
|
-
multilineFillColorClasses =
|
|
346
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
448
347
|
break;
|
|
449
348
|
case "zinc":
|
|
450
|
-
multilineFillColorClasses =
|
|
349
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
451
350
|
break;
|
|
452
351
|
case "custom":
|
|
453
352
|
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`.");
|
|
@@ -460,85 +359,85 @@ const getMultilineFillColorClasses = (theme = "blue", customTheme) => {
|
|
|
460
359
|
return multilineFillColorClasses;
|
|
461
360
|
};
|
|
462
361
|
const getMultilineFillClasses = (theme = "blue", customTheme) => {
|
|
463
|
-
let multilineFillColorClasses =
|
|
362
|
+
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%]");
|
|
464
363
|
switch (theme) {
|
|
465
364
|
case "amber":
|
|
466
|
-
multilineFillColorClasses =
|
|
365
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-amber-500)]");
|
|
467
366
|
break;
|
|
468
367
|
case "blue":
|
|
469
|
-
multilineFillColorClasses =
|
|
368
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-blue-500)]");
|
|
470
369
|
break;
|
|
471
370
|
case "cyan":
|
|
472
|
-
multilineFillColorClasses =
|
|
371
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-cyan-500)]");
|
|
473
372
|
break;
|
|
474
373
|
case "emerald":
|
|
475
|
-
multilineFillColorClasses =
|
|
374
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-emerald-500)]");
|
|
476
375
|
break;
|
|
477
376
|
case "fuchsia":
|
|
478
|
-
multilineFillColorClasses =
|
|
377
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-fuchsia-500)]");
|
|
479
378
|
break;
|
|
480
379
|
case "gray":
|
|
481
|
-
multilineFillColorClasses =
|
|
380
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-gray-500)]");
|
|
482
381
|
break;
|
|
483
382
|
case "green":
|
|
484
|
-
multilineFillColorClasses =
|
|
383
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-green-500)]");
|
|
485
384
|
break;
|
|
486
385
|
case "indigo":
|
|
487
|
-
multilineFillColorClasses =
|
|
386
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-indigo-500)]");
|
|
488
387
|
break;
|
|
489
388
|
case "lime":
|
|
490
|
-
multilineFillColorClasses =
|
|
389
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-lime-500)]");
|
|
491
390
|
break;
|
|
492
391
|
case "mauve":
|
|
493
|
-
multilineFillColorClasses =
|
|
392
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mauve-500)]");
|
|
494
393
|
break;
|
|
495
394
|
case "mist":
|
|
496
|
-
multilineFillColorClasses =
|
|
395
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-mist-500)]");
|
|
497
396
|
break;
|
|
498
397
|
case "neutral":
|
|
499
|
-
multilineFillColorClasses =
|
|
398
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-neutral-500)]");
|
|
500
399
|
break;
|
|
501
400
|
case "olive":
|
|
502
|
-
multilineFillColorClasses =
|
|
401
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-olive-500)]");
|
|
503
402
|
break;
|
|
504
403
|
case "orange":
|
|
505
|
-
multilineFillColorClasses =
|
|
404
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-orange-500)]");
|
|
506
405
|
break;
|
|
507
406
|
case "pink":
|
|
508
|
-
multilineFillColorClasses =
|
|
407
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-pink-500)]");
|
|
509
408
|
break;
|
|
510
409
|
case "purple":
|
|
511
|
-
multilineFillColorClasses =
|
|
410
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-purple-500)]");
|
|
512
411
|
break;
|
|
513
412
|
case "red":
|
|
514
|
-
multilineFillColorClasses =
|
|
413
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-red-500)]");
|
|
515
414
|
break;
|
|
516
415
|
case "rose":
|
|
517
|
-
multilineFillColorClasses =
|
|
416
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-rose-500)]");
|
|
518
417
|
break;
|
|
519
418
|
case "sky":
|
|
520
|
-
multilineFillColorClasses =
|
|
419
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-sky-500)]");
|
|
521
420
|
break;
|
|
522
421
|
case "slate":
|
|
523
|
-
multilineFillColorClasses =
|
|
422
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-slate-500)]");
|
|
524
423
|
break;
|
|
525
424
|
case "stone":
|
|
526
|
-
multilineFillColorClasses =
|
|
425
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-stone-500)]");
|
|
527
426
|
break;
|
|
528
427
|
case "taupe":
|
|
529
|
-
multilineFillColorClasses =
|
|
428
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-taupe-500)]");
|
|
530
429
|
break;
|
|
531
430
|
case "teal":
|
|
532
|
-
multilineFillColorClasses =
|
|
431
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-teal-500)]");
|
|
533
432
|
break;
|
|
534
433
|
case "violet":
|
|
535
|
-
multilineFillColorClasses =
|
|
434
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-violet-500)]");
|
|
536
435
|
break;
|
|
537
436
|
case "yellow":
|
|
538
|
-
multilineFillColorClasses =
|
|
437
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-yellow-500)]");
|
|
539
438
|
break;
|
|
540
439
|
case "zinc":
|
|
541
|
-
multilineFillColorClasses =
|
|
440
|
+
multilineFillColorClasses = twJoin(multilineFillColorClasses, "[--theme-color:var(--color-zinc-500)]");
|
|
542
441
|
break;
|
|
543
442
|
case "custom":
|
|
544
443
|
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`.");
|
|
@@ -551,16 +450,16 @@ const getMultilineFillClasses = (theme = "blue", customTheme) => {
|
|
|
551
450
|
return multilineFillColorClasses;
|
|
552
451
|
};
|
|
553
452
|
const getMultilineFillLiftClasses = (theme = "blue", customTheme) => {
|
|
554
|
-
return
|
|
453
|
+
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%]");
|
|
555
454
|
};
|
|
556
455
|
const getMultilineFillXClasses = (theme = "blue", customTheme) => {
|
|
557
|
-
return
|
|
456
|
+
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%]");
|
|
558
457
|
};
|
|
559
458
|
const getMultilineFillRtlClasses = (theme = "blue", customTheme) => {
|
|
560
|
-
return
|
|
459
|
+
return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[100%_auto]");
|
|
561
460
|
};
|
|
562
461
|
const getMultilineFillCenterClasses = (theme = "blue", customTheme) => {
|
|
563
|
-
return
|
|
462
|
+
return twJoin(getMultilineFillXClasses(theme, customTheme), "bg-position-[50%_auto]");
|
|
564
463
|
};
|
|
565
464
|
function getLinkClasses({ customTheme, theme, type }) {
|
|
566
465
|
switch (type) {
|
|
@@ -570,17 +469,17 @@ function getLinkClasses({ customTheme, theme, type }) {
|
|
|
570
469
|
case "center": return lineCenterClasses;
|
|
571
470
|
case "lift": return lineLiftClasses;
|
|
572
471
|
case "fill": return getFillCenterClasses(theme, customTheme);
|
|
573
|
-
case "fill-ltr": return
|
|
472
|
+
case "fill-ltr": return twJoin([
|
|
574
473
|
getFillColorTransitionClasses(theme, customTheme),
|
|
575
474
|
scaleXClasses,
|
|
576
475
|
"after:origin-left"
|
|
577
476
|
]);
|
|
578
|
-
case "fill-rtl": return
|
|
477
|
+
case "fill-rtl": return twJoin([
|
|
579
478
|
getFillColorTransitionClasses(theme, customTheme),
|
|
580
479
|
scaleXClasses,
|
|
581
480
|
"after:origin-right"
|
|
582
481
|
]);
|
|
583
|
-
case "fill-lift": return
|
|
482
|
+
case "fill-lift": return twJoin([
|
|
584
483
|
getFillColorTransitionClasses(theme, customTheme),
|
|
585
484
|
scaleYClasses,
|
|
586
485
|
"after:origin-bottom"
|
|
@@ -634,8 +533,10 @@ function Link({ as, className, customTheme, theme, type, ...props }) {
|
|
|
634
533
|
theme,
|
|
635
534
|
type
|
|
636
535
|
});
|
|
637
|
-
|
|
638
|
-
|
|
536
|
+
return /* @__PURE__ */ jsx(as || Anchor, {
|
|
537
|
+
...props,
|
|
538
|
+
className: twMerge(linkClasses, className)
|
|
539
|
+
});
|
|
639
540
|
}
|
|
640
541
|
/**
|
|
641
542
|
* # createLink
|
|
@@ -677,13 +578,28 @@ function createLink(config) {
|
|
|
677
578
|
else if (as) linkProps.as = as;
|
|
678
579
|
if (finalTheme && typeof finalTheme === "string" && config.theme && finalTheme in config.theme) {
|
|
679
580
|
const extendedTheme = config.theme[finalTheme];
|
|
680
|
-
if (customTheme) return
|
|
581
|
+
if (customTheme) return /* @__PURE__ */ jsx(Link, {
|
|
582
|
+
...linkProps,
|
|
583
|
+
theme: "custom",
|
|
584
|
+
customTheme,
|
|
585
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
586
|
+
});
|
|
681
587
|
let resolvedCustomTheme;
|
|
682
588
|
if (extendedTheme.customTheme.themeColor) resolvedCustomTheme = { themeColor: (finalType ? finalType.includes("multiline") : false) ? extendedTheme.customTheme.themeColor.multilineFill : extendedTheme.customTheme.themeColor.fill };
|
|
683
589
|
else resolvedCustomTheme = { classes: extendedTheme.customTheme.classes };
|
|
684
|
-
return
|
|
590
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
591
|
+
...linkProps,
|
|
592
|
+
theme: "custom",
|
|
593
|
+
customTheme: resolvedCustomTheme,
|
|
594
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
595
|
+
});
|
|
685
596
|
}
|
|
686
|
-
return
|
|
597
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
598
|
+
...linkProps,
|
|
599
|
+
theme: finalTheme,
|
|
600
|
+
className: twMerge(configClassName, className),
|
|
601
|
+
customTheme
|
|
602
|
+
});
|
|
687
603
|
};
|
|
688
604
|
}
|
|
689
605
|
|
|
@@ -757,8 +673,15 @@ function Button({ className, customTheme, gradient = false, padding = "md", roun
|
|
|
757
673
|
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(" "),
|
|
758
674
|
className
|
|
759
675
|
]);
|
|
760
|
-
if ("href" in props && !props.as && props.href) return
|
|
761
|
-
|
|
676
|
+
if ("href" in props && !props.as && props.href) return /* @__PURE__ */ jsx(Button$1, {
|
|
677
|
+
...props,
|
|
678
|
+
as: Anchor,
|
|
679
|
+
className: buttonClasses
|
|
680
|
+
});
|
|
681
|
+
return /* @__PURE__ */ jsx(Button$1, {
|
|
682
|
+
...props,
|
|
683
|
+
className: buttonClasses
|
|
684
|
+
});
|
|
762
685
|
}
|
|
763
686
|
/**
|
|
764
687
|
* # createButton
|
|
@@ -812,9 +735,19 @@ function createButton(config) {
|
|
|
812
735
|
} else if (as) buttonProps.as = as;
|
|
813
736
|
if (finalTheme && typeof finalTheme === "string" && config.theme && finalTheme in config.theme) {
|
|
814
737
|
const extendedTheme = config.theme[finalTheme];
|
|
815
|
-
return
|
|
738
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
739
|
+
...buttonProps,
|
|
740
|
+
theme: "custom",
|
|
741
|
+
customTheme: customTheme || extendedTheme.customTheme,
|
|
742
|
+
className: twMerge(configClassName, extendedTheme.className, className)
|
|
743
|
+
});
|
|
816
744
|
}
|
|
817
|
-
return
|
|
745
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
746
|
+
...buttonProps,
|
|
747
|
+
theme: finalTheme,
|
|
748
|
+
className: twMerge(configClassName, className),
|
|
749
|
+
customTheme
|
|
750
|
+
});
|
|
818
751
|
};
|
|
819
752
|
}
|
|
820
753
|
|
|
@@ -822,65 +755,107 @@ function createButton(config) {
|
|
|
822
755
|
//#region src/symbols/checkmark.tsx
|
|
823
756
|
function Checkmark({ weight = "regular", ...props }) {
|
|
824
757
|
switch (weight) {
|
|
825
|
-
case "ultralight": return
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
case "
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
758
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
759
|
+
viewBox: "9.76562 -66.2656 60.64 62.07",
|
|
760
|
+
...props,
|
|
761
|
+
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" })
|
|
762
|
+
});
|
|
763
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
764
|
+
viewBox: "9.76562 -66.4297 62.1 62.98",
|
|
765
|
+
...props,
|
|
766
|
+
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" })
|
|
767
|
+
});
|
|
768
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
769
|
+
viewBox: "9.76562 -66.75 64.94 64.77",
|
|
770
|
+
...props,
|
|
771
|
+
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" })
|
|
772
|
+
});
|
|
773
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
774
|
+
viewBox: "9.76562 -66.9922 67.09 66.11",
|
|
775
|
+
...props,
|
|
776
|
+
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" })
|
|
777
|
+
});
|
|
778
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
779
|
+
viewBox: "9.76562 -67.6602 68.7 67.03",
|
|
780
|
+
...props,
|
|
781
|
+
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" })
|
|
782
|
+
});
|
|
783
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
784
|
+
viewBox: "9.76562 -68.1723 69.93 67.73",
|
|
785
|
+
...props,
|
|
786
|
+
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" })
|
|
787
|
+
});
|
|
788
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
789
|
+
viewBox: "9.76562 -68.8477 71.56 68.65",
|
|
790
|
+
...props,
|
|
791
|
+
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" })
|
|
792
|
+
});
|
|
793
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
794
|
+
viewBox: "9.76562 -69.8273 73.92 69.99",
|
|
795
|
+
...props,
|
|
796
|
+
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" })
|
|
797
|
+
});
|
|
798
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
799
|
+
viewBox: "9.76562 -70.7031 76.03 71.19",
|
|
800
|
+
...props,
|
|
801
|
+
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" })
|
|
802
|
+
});
|
|
852
803
|
}
|
|
853
804
|
}
|
|
854
805
|
|
|
855
806
|
//#endregion
|
|
856
807
|
//#region src/components/checkbox.tsx
|
|
857
808
|
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 }) {
|
|
858
|
-
const [checked, setChecked] =
|
|
809
|
+
const [checked, setChecked] = useState(props.defaultChecked || false), [hasInteracted, setHasInteracted] = useState(false);
|
|
859
810
|
const handleChange = (newValue) => {
|
|
860
811
|
setHasInteracted(true);
|
|
861
812
|
setChecked(newValue);
|
|
862
813
|
onChange?.(newValue);
|
|
863
814
|
};
|
|
864
|
-
return
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
{
|
|
882
|
-
|
|
883
|
-
|
|
815
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
816
|
+
...fieldProps,
|
|
817
|
+
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),
|
|
818
|
+
...hasInteracted && required && !checked ? { "data-invalid": "true" } : {},
|
|
819
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
820
|
+
...inputContainerProps,
|
|
821
|
+
className: twMerge("flex items-start gap-2", inputContainerClassName),
|
|
822
|
+
children: [/* @__PURE__ */ jsxs(Checkbox$1, {
|
|
823
|
+
...props,
|
|
824
|
+
...required ? { "aria-required": "true" } : {},
|
|
825
|
+
...hasInteracted && required && !checked ? { "aria-invalid": "true" } : {},
|
|
826
|
+
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),
|
|
827
|
+
onChange: handleChange,
|
|
828
|
+
value,
|
|
829
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
830
|
+
checked: props.checked || checked,
|
|
831
|
+
className: "sr-only left-1/2 -translate-x-1/2",
|
|
832
|
+
onChange: () => {},
|
|
833
|
+
onInvalid: () => {
|
|
834
|
+
setHasInteracted(true);
|
|
835
|
+
},
|
|
836
|
+
required,
|
|
837
|
+
role: "presentation",
|
|
838
|
+
tabIndex: -1,
|
|
839
|
+
type: "checkbox",
|
|
840
|
+
value
|
|
841
|
+
}), checkmark ?? /* @__PURE__ */ jsx(Checkmark, {
|
|
842
|
+
className: "ease-exponential size-full scale-0 fill-(--checkmark-color) transition-transform duration-300 group-data-checked/checkbox:scale-60",
|
|
843
|
+
weight: "bold"
|
|
844
|
+
})]
|
|
845
|
+
}), /* @__PURE__ */ jsxs(Label, {
|
|
846
|
+
...labelProps,
|
|
847
|
+
className: (bag) => twMerge("text-sm font-medium", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
848
|
+
children: [children, required ? /* @__PURE__ */ jsx("span", {
|
|
849
|
+
className: "text-red-700",
|
|
850
|
+
children: "*"
|
|
851
|
+
}) : ""]
|
|
852
|
+
})]
|
|
853
|
+
}), description && /* @__PURE__ */ jsx(Description, {
|
|
854
|
+
...descriptionProps,
|
|
855
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
856
|
+
children: description
|
|
857
|
+
})]
|
|
858
|
+
});
|
|
884
859
|
}
|
|
885
860
|
|
|
886
861
|
//#endregion
|
|
@@ -1063,7 +1038,7 @@ if (isBrowser) {
|
|
|
1063
1038
|
* @param {String} str
|
|
1064
1039
|
* @return {String}
|
|
1065
1040
|
*/
|
|
1066
|
-
const toLowerCase
|
|
1041
|
+
const toLowerCase = (str) => str.replace(lowerCaseRgx, "$1-$2").toLowerCase();
|
|
1067
1042
|
/**
|
|
1068
1043
|
* Prioritize this method instead of regex when possible
|
|
1069
1044
|
* @param {String} str
|
|
@@ -1706,7 +1681,7 @@ const sanitizePropertyName = (propertyName, target, tweenType) => {
|
|
|
1706
1681
|
const cachedPropertyName = propertyNamesCache[propertyName];
|
|
1707
1682
|
if (cachedPropertyName) return cachedPropertyName;
|
|
1708
1683
|
else {
|
|
1709
|
-
const lowerCaseName = propertyName ? toLowerCase
|
|
1684
|
+
const lowerCaseName = propertyName ? toLowerCase(propertyName) : propertyName;
|
|
1710
1685
|
propertyNamesCache[propertyName] = lowerCaseName;
|
|
1711
1686
|
return lowerCaseName;
|
|
1712
1687
|
}
|
|
@@ -1739,7 +1714,7 @@ const cleanInlineStyles = (renderable) => {
|
|
|
1739
1714
|
for (let key in cachedTransforms) str += transformsFragmentStrings[key] + cachedTransforms[key] + ") ";
|
|
1740
1715
|
targetStyle.transform = str;
|
|
1741
1716
|
}
|
|
1742
|
-
} else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase
|
|
1717
|
+
} else if (tweenHadNoInlineValue) targetStyle.removeProperty(toLowerCase(tweenProperty));
|
|
1743
1718
|
else targetStyle[tweenProperty] = originalInlinedValue;
|
|
1744
1719
|
if (animation._tail === tween) animation.targets.forEach((t) => {
|
|
1745
1720
|
if (t.getAttribute && t.getAttribute("style") === emptyString) t.removeAttribute("style");
|
|
@@ -3673,129 +3648,6 @@ const morphTo = (path2, precision = .33) => ($path1) => {
|
|
|
3673
3648
|
return [v1, v2];
|
|
3674
3649
|
};
|
|
3675
3650
|
|
|
3676
|
-
//#endregion
|
|
3677
|
-
//#region src/utils/class-management.ts
|
|
3678
|
-
/**
|
|
3679
|
-
* ### Has Class
|
|
3680
|
-
* - Returns a boolean based on whether the specified element has the specified class
|
|
3681
|
-
* @param {HTMLElement} element Any HTML Element
|
|
3682
|
-
* @param {string} className A string of any class to check for
|
|
3683
|
-
* @returns {boolean} true if the specified element has the specified class, else false
|
|
3684
|
-
*/
|
|
3685
|
-
function hasClass(element, className) {
|
|
3686
|
-
return element.classList.contains(className);
|
|
3687
|
-
}
|
|
3688
|
-
/**
|
|
3689
|
-
* ### Add Class
|
|
3690
|
-
* - Adds the specified classes to the specified elements
|
|
3691
|
-
* @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)
|
|
3692
|
-
* @param {string|string[]} classList A string or an array of classes to add to each element
|
|
3693
|
-
*/
|
|
3694
|
-
function addClass(elements, classList) {
|
|
3695
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3696
|
-
let elementList, classListGroup;
|
|
3697
|
-
switch (elementsType) {
|
|
3698
|
-
case "String":
|
|
3699
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3700
|
-
break;
|
|
3701
|
-
case "NodeList":
|
|
3702
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3703
|
-
break;
|
|
3704
|
-
case "Array":
|
|
3705
|
-
if (!elementsIsString) elementList = elements;
|
|
3706
|
-
break;
|
|
3707
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3708
|
-
}
|
|
3709
|
-
switch (classListType) {
|
|
3710
|
-
case "String":
|
|
3711
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3712
|
-
else classListGroup = [classList];
|
|
3713
|
-
break;
|
|
3714
|
-
case "Array":
|
|
3715
|
-
if (!classListIsString) classListGroup = classList;
|
|
3716
|
-
break;
|
|
3717
|
-
}
|
|
3718
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3719
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3720
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3721
|
-
if (hasClass(element, classItem)) return;
|
|
3722
|
-
element.classList.add(classItem);
|
|
3723
|
-
}));
|
|
3724
|
-
}
|
|
3725
|
-
/**
|
|
3726
|
-
* ### Remove Class
|
|
3727
|
-
* - Removes the specified classes from the specified elements
|
|
3728
|
-
* @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)
|
|
3729
|
-
* @param {string|string[]} classList A string or an array of classes to remove from each element
|
|
3730
|
-
*/
|
|
3731
|
-
function removeClass(elements, classList) {
|
|
3732
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3733
|
-
let elementList, classListGroup;
|
|
3734
|
-
switch (elementsType) {
|
|
3735
|
-
case "String":
|
|
3736
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3737
|
-
break;
|
|
3738
|
-
case "NodeList":
|
|
3739
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3740
|
-
break;
|
|
3741
|
-
case "Array":
|
|
3742
|
-
if (!elementsIsString) elementList = elements;
|
|
3743
|
-
break;
|
|
3744
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3745
|
-
}
|
|
3746
|
-
switch (classListType) {
|
|
3747
|
-
case "String":
|
|
3748
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3749
|
-
else classListGroup = [classList];
|
|
3750
|
-
break;
|
|
3751
|
-
case "Array":
|
|
3752
|
-
if (!classListIsString) classListGroup = classList;
|
|
3753
|
-
break;
|
|
3754
|
-
}
|
|
3755
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3756
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3757
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3758
|
-
if (!hasClass(element, classItem)) return;
|
|
3759
|
-
element.classList.remove(classItem);
|
|
3760
|
-
}));
|
|
3761
|
-
}
|
|
3762
|
-
/**
|
|
3763
|
-
* ### Toggle Class
|
|
3764
|
-
* - Toggles the specified classes on the specified elements
|
|
3765
|
-
* @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)
|
|
3766
|
-
* @param {string|string[]} classList A string or an array of classes to toggle on each element
|
|
3767
|
-
*/
|
|
3768
|
-
function toggleClass(elements, classList) {
|
|
3769
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === "string", classListType = classList.constructor.name, classListIsString = typeof classList === "string";
|
|
3770
|
-
let elementList, classListGroup;
|
|
3771
|
-
switch (elementsType) {
|
|
3772
|
-
case "String":
|
|
3773
|
-
if (elementsIsString) elementList = Array.from(document.querySelectorAll(elements));
|
|
3774
|
-
break;
|
|
3775
|
-
case "NodeList":
|
|
3776
|
-
if (!elementsIsString) elementList = Array.from(elements);
|
|
3777
|
-
break;
|
|
3778
|
-
case "Array":
|
|
3779
|
-
if (!elementsIsString) elementList = elements;
|
|
3780
|
-
break;
|
|
3781
|
-
default: if (elementsType.startsWith("HTML") && !elementsIsString) elementList = [elements];
|
|
3782
|
-
}
|
|
3783
|
-
switch (classListType) {
|
|
3784
|
-
case "String":
|
|
3785
|
-
if (classListIsString) if (classList.split(" ").length >= 2) classListGroup = classList.split(" ");
|
|
3786
|
-
else classListGroup = [classList];
|
|
3787
|
-
break;
|
|
3788
|
-
case "Array":
|
|
3789
|
-
if (!classListIsString) classListGroup = classList;
|
|
3790
|
-
break;
|
|
3791
|
-
}
|
|
3792
|
-
if (!elementList || elementList.length < 1) throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
3793
|
-
if (!classListGroup || classListGroup.length < 1) throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
3794
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
3795
|
-
element.classList.toggle(classItem);
|
|
3796
|
-
}));
|
|
3797
|
-
}
|
|
3798
|
-
|
|
3799
3651
|
//#endregion
|
|
3800
3652
|
//#region src/utils/get-date.ts
|
|
3801
3653
|
/** The current date as a Date object */
|
|
@@ -3834,25 +3686,6 @@ const currentMonthName = getMonthName();
|
|
|
3834
3686
|
/** The name of the current day of the week */
|
|
3835
3687
|
const currentWeekdayName = getWeekdayName();
|
|
3836
3688
|
/**
|
|
3837
|
-
* ### Days In Month
|
|
3838
|
-
* - Returns the number of days in the specified month.
|
|
3839
|
-
* @param {Date} date A Date object representing the month to get the number of days for. (Preset to the current date)
|
|
3840
|
-
* @returns {number} The number of days in the specified month.
|
|
3841
|
-
*/
|
|
3842
|
-
function daysInMonth(date = d) {
|
|
3843
|
-
const selectedYear = date.getFullYear(), selectedMonth = date.getMonth() + 1;
|
|
3844
|
-
return new Date(selectedYear, selectedMonth, 0).getDate();
|
|
3845
|
-
}
|
|
3846
|
-
/**
|
|
3847
|
-
* ### First of Month
|
|
3848
|
-
* - Returns the first day of the specified month.
|
|
3849
|
-
* @param {Date} date A Date object representing the month to get the first day for. (Preset to current date)
|
|
3850
|
-
* @returns {Date} A Date object of the given month, with the first day.
|
|
3851
|
-
*/
|
|
3852
|
-
function firstOfMonth(date = d) {
|
|
3853
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
3854
|
-
}
|
|
3855
|
-
/**
|
|
3856
3689
|
* ### Get Date
|
|
3857
3690
|
* - Returns the date with two digits
|
|
3858
3691
|
* @param {number|Date} date The date to get date
|
|
@@ -3877,28 +3710,6 @@ function getHours(hours = d) {
|
|
|
3877
3710
|
return formattedHours;
|
|
3878
3711
|
}
|
|
3879
3712
|
/**
|
|
3880
|
-
* ### Get Hours in 12
|
|
3881
|
-
* - Returns the hour based on the specified 24 hour value in a 12 hour format
|
|
3882
|
-
* @param {number|Date} hour The hour to be converted to 12 hour format
|
|
3883
|
-
* @returns {number} The hour in a 12 hour format
|
|
3884
|
-
*/
|
|
3885
|
-
function getHoursIn12(hour = d) {
|
|
3886
|
-
if (typeof hour !== "number") hour = hour.getHours();
|
|
3887
|
-
if (hour > 12) return hour - 12;
|
|
3888
|
-
return hour;
|
|
3889
|
-
}
|
|
3890
|
-
/**
|
|
3891
|
-
* ### Get Meridian from Hour
|
|
3892
|
-
* - Returns either 'pm' or 'am' based on the specified 24 hour value
|
|
3893
|
-
* @param {number|Date} hour The hour to get the meridian from
|
|
3894
|
-
* @returns {'am'|'pm'} The meridian for the given hour
|
|
3895
|
-
*/
|
|
3896
|
-
function getMeridianFromHour(hour = d) {
|
|
3897
|
-
if (typeof hour !== "number") hour = hour.getHours();
|
|
3898
|
-
if (hour >= 12) return "pm";
|
|
3899
|
-
return "am";
|
|
3900
|
-
}
|
|
3901
|
-
/**
|
|
3902
3713
|
* ### Get Milliseconds
|
|
3903
3714
|
* - Returns the milliseconds with two digits
|
|
3904
3715
|
* @param {number|Date} milliseconds The date to get milliseconds
|
|
@@ -3934,9 +3745,6 @@ function getMonth(month = d) {
|
|
|
3934
3745
|
if (formattedMonth.length === 1) formattedMonth = `0${formattedMonth}`;
|
|
3935
3746
|
return formattedMonth;
|
|
3936
3747
|
}
|
|
3937
|
-
function getMonthIndexFromName(name) {
|
|
3938
|
-
return monthNamesList.findIndex((monthName) => monthName === name);
|
|
3939
|
-
}
|
|
3940
3748
|
/**
|
|
3941
3749
|
* ### Get Month Name
|
|
3942
3750
|
* - Returns the name of the specified month
|
|
@@ -3948,26 +3756,6 @@ function getMonthName(date = d) {
|
|
|
3948
3756
|
return monthNamesList[date.getMonth()];
|
|
3949
3757
|
}
|
|
3950
3758
|
/**
|
|
3951
|
-
* ### Get Next Month
|
|
3952
|
-
* - Returns the number of the following month from the specified month
|
|
3953
|
-
* @param {Date} date The Date object representing the month to get the following month from (Preset to current date)
|
|
3954
|
-
* @returns {number} The indexed month of the following month
|
|
3955
|
-
*/
|
|
3956
|
-
function getNextMonth(date = d) {
|
|
3957
|
-
const givenMonth = date.getMonth();
|
|
3958
|
-
return givenMonth === 11 ? 0 : givenMonth + 1;
|
|
3959
|
-
}
|
|
3960
|
-
/**
|
|
3961
|
-
* ### Get Previous Month
|
|
3962
|
-
* - Returns the number of the previous month from the specified month
|
|
3963
|
-
* @param {Date} date The Date object representing the month to get the previous month from (Preset to current date)
|
|
3964
|
-
* @returns {number} The indexed month of the previous month
|
|
3965
|
-
*/
|
|
3966
|
-
function getPreviousMonth(date = d) {
|
|
3967
|
-
const givenMonth = date.getMonth();
|
|
3968
|
-
return givenMonth === 0 ? 11 : givenMonth - 1;
|
|
3969
|
-
}
|
|
3970
|
-
/**
|
|
3971
3759
|
* ### Get Seconds
|
|
3972
3760
|
* - Returns the seconds with two digits
|
|
3973
3761
|
* @param {number|Date} seconds The date to get seconds
|
|
@@ -3980,25 +3768,6 @@ function getSeconds(seconds = d) {
|
|
|
3980
3768
|
return formattedSeconds;
|
|
3981
3769
|
}
|
|
3982
3770
|
/**
|
|
3983
|
-
* ### Get User Readable Date
|
|
3984
|
-
* - Returns a string of the current date in a user-friendly way
|
|
3985
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
3986
|
-
* @param date (default: `new Date()`)
|
|
3987
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
3988
|
-
*/
|
|
3989
|
-
function getUserReadableDate(date = d) {
|
|
3990
|
-
const dateTime = date.getTime();
|
|
3991
|
-
const today = /* @__PURE__ */ new Date();
|
|
3992
|
-
if (dateTime === today.getTime()) return "Today";
|
|
3993
|
-
if (dateTime === (/* @__PURE__ */ new Date(today.getDate() - 1)).getTime()) return "Yesterday";
|
|
3994
|
-
if (dateTime === new Date(today.getDate() + 1).getTime()) return "Tomorrow";
|
|
3995
|
-
const thisYear = today.getFullYear();
|
|
3996
|
-
return toFullDateString(date, {
|
|
3997
|
-
weekday: "code",
|
|
3998
|
-
year: !(date.getFullYear() === thisYear)
|
|
3999
|
-
});
|
|
4000
|
-
}
|
|
4001
|
-
/**
|
|
4002
3771
|
* ### Get Weekday Name
|
|
4003
3772
|
* - Returns the weekday name of the specified day
|
|
4004
3773
|
* @param {number | Date} weekday A Date object or number representing the day to get the weekday name from. (Preset to the current date)
|
|
@@ -4008,76 +3777,6 @@ function getWeekdayName(weekday = d) {
|
|
|
4008
3777
|
if (typeof weekday === "number") return weekdayNamesList[weekday];
|
|
4009
3778
|
return weekdayNamesList[weekday.getDay()];
|
|
4010
3779
|
}
|
|
4011
|
-
/**
|
|
4012
|
-
* ### Get Years in Range
|
|
4013
|
-
* - Returns an array of years in between the specified minimum and maximum years
|
|
4014
|
-
* @param {number} minYear The minimum year
|
|
4015
|
-
* @param {number} maxYear The maximum year
|
|
4016
|
-
* @returns {number[]} Array of years
|
|
4017
|
-
*/
|
|
4018
|
-
function getYearsInRange(minYear = 0, maxYear = year) {
|
|
4019
|
-
const yearList = [];
|
|
4020
|
-
for (let selectedYear = minYear; selectedYear <= maxYear; selectedYear++) yearList.push(selectedYear);
|
|
4021
|
-
return yearList;
|
|
4022
|
-
}
|
|
4023
|
-
/**
|
|
4024
|
-
* ### To Full Date String
|
|
4025
|
-
* - Returns a formatted string to display the date
|
|
4026
|
-
* @param {Date} date (default: `new Date()`)
|
|
4027
|
-
* @param {ToFullDateStringOptionsProps} options Change how to display the weekday, month name, day of the month, and year.
|
|
4028
|
-
* @returns {string} '`weekday`, `month` `day`, `year`'
|
|
4029
|
-
*/
|
|
4030
|
-
function toFullDateString(date = d, options) {
|
|
4031
|
-
let weekdayName = getWeekdayName(date), monthName = getMonthName(date), dayOfMonth = date.getDate(), year = date.getFullYear().toString();
|
|
4032
|
-
if (options) {
|
|
4033
|
-
const includesWeekday = options.weekday !== false, includesDay = options.day !== false, includesMonth = options.month !== false, includesYear = options.year !== false;
|
|
4034
|
-
if (includesWeekday) {
|
|
4035
|
-
if (options.weekday === "code") weekdayName = weekdayName.slice(0, 3);
|
|
4036
|
-
if (includesMonth || includesDay || includesYear) weekdayName += ", ";
|
|
4037
|
-
} else weekdayName = "";
|
|
4038
|
-
if (includesMonth) {
|
|
4039
|
-
if (options.month === "code") monthName = monthName.slice(0, 3);
|
|
4040
|
-
if (includesDay) monthName += " ";
|
|
4041
|
-
} else monthName = "";
|
|
4042
|
-
if (!includesDay) dayOfMonth = "";
|
|
4043
|
-
if (includesYear) {
|
|
4044
|
-
if (options.year === "code") year = year.slice(-2);
|
|
4045
|
-
if (includesMonth || includesDay) year = ", " + year;
|
|
4046
|
-
} else year = "";
|
|
4047
|
-
}
|
|
4048
|
-
return weekdayName + monthName + dayOfMonth + year;
|
|
4049
|
-
}
|
|
4050
|
-
/**
|
|
4051
|
-
* ### Get User Readable Date From Timestampz
|
|
4052
|
-
* - Returns a string of the current date in a user-friendly way
|
|
4053
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
4054
|
-
* @param string
|
|
4055
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
4056
|
-
*/
|
|
4057
|
-
function getUserReadableDateFromTimestampz(timestampz) {
|
|
4058
|
-
const [date, time] = timestampz.split("T") || [];
|
|
4059
|
-
const [year, month, day] = date?.split("-").map((string) => Number(string)) || [];
|
|
4060
|
-
const [hms, _timezone] = time?.includes("+") ? time?.split("+") : time?.split("-") || [];
|
|
4061
|
-
const [hours, minutes, seconds] = hms?.split(":").map((string) => Number(string)) || [];
|
|
4062
|
-
return getUserReadableDate(new Date(year, month - 1, day, hours, minutes, seconds));
|
|
4063
|
-
}
|
|
4064
|
-
function getLocalTime(time) {
|
|
4065
|
-
const date = /* @__PURE__ */ new Date(), [hours, minutes] = typeof time === "string" ? time.split(":") : time;
|
|
4066
|
-
const timezone = getTimezone();
|
|
4067
|
-
console.log(timezone);
|
|
4068
|
-
date.setUTCHours(Number(hours));
|
|
4069
|
-
date.setMinutes(Number(minutes));
|
|
4070
|
-
return date.toLocaleTimeString([], {
|
|
4071
|
-
hour: "numeric",
|
|
4072
|
-
minute: "2-digit",
|
|
4073
|
-
hour12: true
|
|
4074
|
-
});
|
|
4075
|
-
}
|
|
4076
|
-
function getTimezone() {
|
|
4077
|
-
const date = /* @__PURE__ */ new Date();
|
|
4078
|
-
const timezonePart = Intl.DateTimeFormat("en-US", { timeZoneName: "short" }).formatToParts(date).find((part) => part.type === "timeZoneName");
|
|
4079
|
-
return timezonePart ? timezonePart.value : "";
|
|
4080
|
-
}
|
|
4081
3780
|
|
|
4082
3781
|
//#endregion
|
|
4083
3782
|
//#region src/utils/math.ts
|
|
@@ -4085,156 +3784,12 @@ function easeOutExpo(time, start, end, duration) {
|
|
|
4085
3784
|
return time == duration ? start + end : end * (-Math.pow(2, -10 * time / duration) + 1) + start;
|
|
4086
3785
|
}
|
|
4087
3786
|
|
|
4088
|
-
//#endregion
|
|
4089
|
-
//#region src/utils/regex.ts
|
|
4090
|
-
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,}))$/;
|
|
4091
|
-
/**
|
|
4092
|
-
* # Is Email
|
|
4093
|
-
* Checks whether the specified string is in email format
|
|
4094
|
-
*/
|
|
4095
|
-
function isEmail(email) {
|
|
4096
|
-
return emailRegex.test(email);
|
|
4097
|
-
}
|
|
4098
|
-
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}/;
|
|
4099
|
-
/**
|
|
4100
|
-
* # Is Phone Number
|
|
4101
|
-
* Checks whether the specified string is in phone number format
|
|
4102
|
-
*/
|
|
4103
|
-
function isPhoneNumber(tel) {
|
|
4104
|
-
return telRegex.test(tel);
|
|
4105
|
-
}
|
|
4106
|
-
|
|
4107
|
-
//#endregion
|
|
4108
|
-
//#region src/utils/string-manipulation.ts
|
|
4109
|
-
/**
|
|
4110
|
-
* # Format Phone Number
|
|
4111
|
-
* Converts any string containing at least 10 numbers to a formatted phone number
|
|
4112
|
-
* @param {string} phoneNumber
|
|
4113
|
-
* @param options
|
|
4114
|
-
* @property {string} `countryCode`
|
|
4115
|
-
* @property {'continuous' | 'dot' | 'hyphenated' | 'none' | 'space' | 'standard'} `format`
|
|
4116
|
-
*
|
|
4117
|
-
* Input: a555b555c5555d
|
|
4118
|
-
*
|
|
4119
|
-
* @example
|
|
4120
|
-
* format: 'continuous'
|
|
4121
|
-
* countryCode: '1'
|
|
4122
|
-
* returns: +1 5555555555
|
|
4123
|
-
*
|
|
4124
|
-
* @example
|
|
4125
|
-
* format: 'dot'
|
|
4126
|
-
* returns: 555.555.5555
|
|
4127
|
-
*
|
|
4128
|
-
* @example
|
|
4129
|
-
* format: 'hyphenated'
|
|
4130
|
-
* returns: 555-555-5555
|
|
4131
|
-
*
|
|
4132
|
-
* @example
|
|
4133
|
-
* format: 'none'
|
|
4134
|
-
* countryCode: '1'
|
|
4135
|
-
* returns: +1 a555b555c5555d
|
|
4136
|
-
*
|
|
4137
|
-
* @example
|
|
4138
|
-
* format: 'space'
|
|
4139
|
-
* returns: 555 555 5555
|
|
4140
|
-
*
|
|
4141
|
-
* @example
|
|
4142
|
-
* format: 'standard' (default)
|
|
4143
|
-
* returns: (555) 555-5555
|
|
4144
|
-
*
|
|
4145
|
-
* @returns {string} string formatted
|
|
4146
|
-
*/
|
|
4147
|
-
function formatPhoneNumber(phoneNumber, options) {
|
|
4148
|
-
const format = options?.format || "standard";
|
|
4149
|
-
if (format !== "none") phoneNumber = phoneNumber.replace(/\D/g, "").slice(-10);
|
|
4150
|
-
switch (format) {
|
|
4151
|
-
case "dot":
|
|
4152
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4153
|
-
if (index === 2) return `${char}.`;
|
|
4154
|
-
if (index === 5) return `${char}.`;
|
|
4155
|
-
return char;
|
|
4156
|
-
}).join("");
|
|
4157
|
-
break;
|
|
4158
|
-
case "hyphenated":
|
|
4159
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4160
|
-
if (index === 2) return `${char}-`;
|
|
4161
|
-
if (index === 5) return `${char}-`;
|
|
4162
|
-
return char;
|
|
4163
|
-
}).join("");
|
|
4164
|
-
break;
|
|
4165
|
-
case "space":
|
|
4166
|
-
phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4167
|
-
if (index === 2) return `${char} `;
|
|
4168
|
-
if (index === 5) return `${char} `;
|
|
4169
|
-
return char;
|
|
4170
|
-
}).join("");
|
|
4171
|
-
break;
|
|
4172
|
-
case "standard": phoneNumber = phoneNumber.split("").map((char, index) => {
|
|
4173
|
-
if (index === 0) return `(${char}`;
|
|
4174
|
-
if (index === 2) return `${char}) `;
|
|
4175
|
-
if (index === 5) return `${char}-`;
|
|
4176
|
-
return char;
|
|
4177
|
-
}).join("");
|
|
4178
|
-
}
|
|
4179
|
-
return `${options?.countryCode ? `+${options?.countryCode} ` : ""}` + phoneNumber;
|
|
4180
|
-
}
|
|
4181
|
-
/**
|
|
4182
|
-
* ### Split Camel Case
|
|
4183
|
-
* - Separates a camel case string with a joiner (default: ' ')
|
|
4184
|
-
* @param {string} string
|
|
4185
|
-
* @returns {string} string
|
|
4186
|
-
*/
|
|
4187
|
-
function splitCamelCase(string, joiner = " ") {
|
|
4188
|
-
if (string[0].match(/[A-Z0-9]/) || string.includes(" ")) return string;
|
|
4189
|
-
let lastChar = "";
|
|
4190
|
-
return string.split("").map((char) => {
|
|
4191
|
-
let returnedString = char;
|
|
4192
|
-
if (char.match(/[A-Z0-9]/)) returnedString = ` ${char}`;
|
|
4193
|
-
if (lastChar.match(/[0-9]/) && char.match(/[0-9]/)) returnedString = char;
|
|
4194
|
-
lastChar = char;
|
|
4195
|
-
return returnedString;
|
|
4196
|
-
}).join(joiner);
|
|
4197
|
-
}
|
|
4198
|
-
/**
|
|
4199
|
-
* ### To Camel Case
|
|
4200
|
-
* - Converts any string to camel case based on spaces
|
|
4201
|
-
* - Eliminates no letter-number characters
|
|
4202
|
-
* @param {string} string
|
|
4203
|
-
* @returns {string} string
|
|
4204
|
-
*/
|
|
4205
|
-
function toCamelCase(string, delimiter = " ") {
|
|
4206
|
-
if (typeof string !== "string") return string;
|
|
4207
|
-
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("");
|
|
4208
|
-
}
|
|
4209
|
-
/**
|
|
4210
|
-
* # To Lower Case
|
|
4211
|
-
* Converts a string to lowercase, and offers easy string replacements for creating snake case, kebab case, or your own.
|
|
4212
|
-
* @param str - The string to convert to lowercase.
|
|
4213
|
-
* @param options - Configuration options.
|
|
4214
|
-
* @param options[0] - The delimiter to split the string. Defaults to space.
|
|
4215
|
-
* @param options[1] - The string to join the parts back together. Defaults to space.
|
|
4216
|
-
* @returns The lowercase version of the input string, with the replacements, if provided.
|
|
4217
|
-
*/
|
|
4218
|
-
function toLowerCase(str, [delimiter, joiner]) {
|
|
4219
|
-
return str.toLowerCase().replaceAll(delimiter || " ", joiner || " ");
|
|
4220
|
-
}
|
|
4221
|
-
/**
|
|
4222
|
-
* ### To Title Case
|
|
4223
|
-
* - Converts any string to title case based on spaces
|
|
4224
|
-
* @param {string} string
|
|
4225
|
-
* @returns {string} string
|
|
4226
|
-
*/
|
|
4227
|
-
function toTitleCase(string, delimiter = " ") {
|
|
4228
|
-
if (typeof string !== "string") return string;
|
|
4229
|
-
return string.toLowerCase().split(delimiter).map((str) => str.substring(0, 1).toUpperCase() + str.substring(1, str.length).toLowerCase()).join(" ");
|
|
4230
|
-
}
|
|
4231
|
-
|
|
4232
3787
|
//#endregion
|
|
4233
3788
|
//#region src/components/chevron-up-down-anime.tsx
|
|
4234
3789
|
function ChevronUpDownAnime({ className, isUp = false }) {
|
|
4235
|
-
const firstLoadRef =
|
|
4236
|
-
const controlPathRef =
|
|
4237
|
-
|
|
3790
|
+
const firstLoadRef = useRef(true);
|
|
3791
|
+
const controlPathRef = useRef(null), chevronDownRef = useRef(null), chevronUpRef = useRef(null);
|
|
3792
|
+
useEffect(() => {
|
|
4238
3793
|
if (firstLoadRef.current) {
|
|
4239
3794
|
firstLoadRef.current = false;
|
|
4240
3795
|
return;
|
|
@@ -4251,57 +3806,85 @@ function ChevronUpDownAnime({ className, isUp = false }) {
|
|
|
4251
3806
|
ease: "outExpo"
|
|
4252
3807
|
});
|
|
4253
3808
|
}, [isUp]);
|
|
4254
|
-
return
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
3809
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
3810
|
+
viewBox: "0 0 69 39",
|
|
3811
|
+
className: twMerge("w-4", className),
|
|
3812
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
3813
|
+
d: "M3.997,4.008l30.498,30.989l30.498,-30.989",
|
|
3814
|
+
className: "fill-none stroke-8",
|
|
3815
|
+
strokeLinecap: "round",
|
|
3816
|
+
ref: controlPathRef
|
|
3817
|
+
}), /* @__PURE__ */ jsxs("g", {
|
|
3818
|
+
className: "opacity-0",
|
|
3819
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
3820
|
+
d: "M3.997,4.008l30.498,30.989l30.498,-30.989",
|
|
3821
|
+
ref: chevronDownRef
|
|
3822
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
3823
|
+
d: "M3.997,34.997l30.498,-30.989l30.498,30.989",
|
|
3824
|
+
ref: chevronUpRef
|
|
3825
|
+
})]
|
|
3826
|
+
})]
|
|
3827
|
+
});
|
|
4263
3828
|
}
|
|
4264
3829
|
|
|
4265
3830
|
//#endregion
|
|
4266
3831
|
//#region src/components/details.tsx
|
|
4267
3832
|
function DetailsSummary({ arrow = true, children, className, onClick, ...props }) {
|
|
4268
|
-
const [isUp, setIsUp] =
|
|
3833
|
+
const [isUp, setIsUp] = useState(false);
|
|
4269
3834
|
const handleClick = (e) => {
|
|
4270
3835
|
setIsUp((previous) => !previous);
|
|
4271
3836
|
onClick?.(e);
|
|
4272
3837
|
};
|
|
4273
|
-
return
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
3838
|
+
return /* @__PURE__ */ jsx(DisclosureButton, {
|
|
3839
|
+
...props,
|
|
3840
|
+
as: Button,
|
|
3841
|
+
className: twMerge("w-full", className, Boolean(arrow) && "grid grid-cols-[1fr_1rem] gap-2"),
|
|
3842
|
+
onClick: handleClick,
|
|
3843
|
+
role: "summary",
|
|
3844
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
|
|
3845
|
+
className: "absolute top-1/2 right-3 block -translate-y-1/2",
|
|
3846
|
+
isUp
|
|
3847
|
+
}) : arrow)] })
|
|
3848
|
+
});
|
|
4280
3849
|
}
|
|
4281
3850
|
function DetailsBody({ children, className, ...props }) {
|
|
4282
|
-
return
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
3851
|
+
return /* @__PURE__ */ jsx(DisclosurePanel, {
|
|
3852
|
+
...props,
|
|
3853
|
+
className: twMerge("grid-rows-1fr transition-rows ease-exponential data-closed:grid-rows-0fr grid duration-500", className),
|
|
3854
|
+
transition: true,
|
|
3855
|
+
children: (bag) => /* @__PURE__ */ jsx("div", {
|
|
3856
|
+
className: "overflow-y-hidden px-2 pt-3 pb-1",
|
|
3857
|
+
children: typeof children === "function" ? children(bag) : children
|
|
3858
|
+
})
|
|
3859
|
+
});
|
|
4287
3860
|
}
|
|
4288
3861
|
function Details({ as = "div", className, ...props }) {
|
|
4289
|
-
return
|
|
3862
|
+
return /* @__PURE__ */ jsx(Disclosure, {
|
|
3863
|
+
...props,
|
|
3864
|
+
as,
|
|
3865
|
+
className: twMerge("rounded-2xl bg-neutral-500/25 p-2", className),
|
|
3866
|
+
role: "details"
|
|
3867
|
+
});
|
|
4290
3868
|
}
|
|
4291
3869
|
|
|
4292
3870
|
//#endregion
|
|
4293
3871
|
//#region src/components/drop-down.tsx
|
|
4294
3872
|
function DropDownButton({ arrow = true, as, children, className, ...props }) {
|
|
4295
|
-
return
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
3873
|
+
return /* @__PURE__ */ jsx(MenuButton, {
|
|
3874
|
+
...props,
|
|
3875
|
+
as: as || "button",
|
|
3876
|
+
className: twJoin("group/button", className),
|
|
3877
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [typeof children === "function" ? children(bag) : children, arrow && (typeof arrow === "boolean" ? /* @__PURE__ */ jsx(ChevronUpDownAnime, {
|
|
3878
|
+
className: "-mr-1",
|
|
3879
|
+
isUp: bag.open
|
|
3880
|
+
}) : arrow)] })
|
|
3881
|
+
});
|
|
4302
3882
|
}
|
|
4303
3883
|
function DropDownItem({ as, ...props }) {
|
|
4304
|
-
return
|
|
3884
|
+
return /* @__PURE__ */ jsx(MenuItem, {
|
|
3885
|
+
...props,
|
|
3886
|
+
as: as || "div"
|
|
3887
|
+
});
|
|
4305
3888
|
}
|
|
4306
3889
|
function DropDownItems({ anchor, children, className, containerClassName, style, ...props }) {
|
|
4307
3890
|
const getAnchorProps = () => {
|
|
@@ -4320,41 +3903,53 @@ function DropDownItems({ anchor, children, className, containerClassName, style,
|
|
|
4320
3903
|
return initialAnchor;
|
|
4321
3904
|
};
|
|
4322
3905
|
const anchorProps = getAnchorProps();
|
|
4323
|
-
return
|
|
4324
|
-
...
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
3906
|
+
return /* @__PURE__ */ jsx(MenuItems, {
|
|
3907
|
+
...props,
|
|
3908
|
+
anchor: anchorProps,
|
|
3909
|
+
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),
|
|
3910
|
+
static: props.static,
|
|
3911
|
+
style: {
|
|
3912
|
+
...style,
|
|
3913
|
+
minWidth: "var(--button-width)"
|
|
3914
|
+
},
|
|
3915
|
+
transition: true,
|
|
3916
|
+
children: (bag) => /* @__PURE__ */ jsx("div", {
|
|
3917
|
+
className: "overflow-y-scroll",
|
|
3918
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
3919
|
+
className: twMerge("rounded-xl bg-neutral-50/20 px-6 py-5 backdrop-blur-md backdrop-brightness-150", className),
|
|
3920
|
+
children: typeof children === "function" ? children(bag) : children
|
|
3921
|
+
})
|
|
3922
|
+
})
|
|
3923
|
+
});
|
|
4333
3924
|
}
|
|
4334
3925
|
function DropDownSection({ children, label, labelProps, separatorAbove, separatorBelow, ...props }) {
|
|
4335
3926
|
const { labelClassName, ...restLabelProps } = {
|
|
4336
3927
|
labelClassName: labelProps?.className || "",
|
|
4337
3928
|
...labelProps
|
|
4338
3929
|
};
|
|
4339
|
-
return
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
3930
|
+
return /* @__PURE__ */ jsx(MenuSection, {
|
|
3931
|
+
...props,
|
|
3932
|
+
children: (sectionBag) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3933
|
+
separatorAbove && /* @__PURE__ */ jsx(DropDownSeparator, {}),
|
|
3934
|
+
label && /* @__PURE__ */ jsx(MenuHeading, {
|
|
3935
|
+
...restLabelProps,
|
|
3936
|
+
className: (headingBag) => twMerge("text-[larger] font-bold text-current/80", typeof labelClassName === "function" ? labelClassName(headingBag) : labelClassName),
|
|
3937
|
+
children: label
|
|
3938
|
+
}),
|
|
3939
|
+
typeof children === "function" ? children(sectionBag) : children,
|
|
3940
|
+
separatorBelow && /* @__PURE__ */ jsx(DropDownSeparator, {})
|
|
3941
|
+
] })
|
|
3942
|
+
});
|
|
4352
3943
|
}
|
|
4353
3944
|
function DropDownSeparator({ as, className, ...props }) {
|
|
4354
|
-
return
|
|
3945
|
+
return /* @__PURE__ */ jsx(MenuSeparator, {
|
|
3946
|
+
...props,
|
|
3947
|
+
as: as || "div",
|
|
3948
|
+
className: (bag) => twMerge("my-4 block h-px rounded-full bg-neutral-950/20", typeof className === "function" ? className(bag) : className)
|
|
3949
|
+
});
|
|
4355
3950
|
}
|
|
4356
3951
|
function DropDown(props) {
|
|
4357
|
-
return
|
|
3952
|
+
return /* @__PURE__ */ jsx(Menu, { ...props });
|
|
4358
3953
|
}
|
|
4359
3954
|
|
|
4360
3955
|
//#endregion
|
|
@@ -4362,40 +3957,45 @@ function DropDown(props) {
|
|
|
4362
3957
|
function Fieldset({ children, className, legend, legendProps, name, ...props }) {
|
|
4363
3958
|
const { className: legendClassName, ...restLegendProps } = legendProps || {};
|
|
4364
3959
|
name = legend || name;
|
|
4365
|
-
return
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
3960
|
+
return /* @__PURE__ */ jsx(Fieldset$1, {
|
|
3961
|
+
...props,
|
|
3962
|
+
name,
|
|
3963
|
+
className: (bag) => twMerge("contents", typeof className === "function" ? className(bag) : className),
|
|
3964
|
+
children: (bag) => /* @__PURE__ */ jsxs(Fragment, { children: [legend && /* @__PURE__ */ jsx(Legend, {
|
|
3965
|
+
...restLegendProps,
|
|
3966
|
+
className: twMerge("text-xl font-bold text-current/80", typeof legendClassName === "function" ? legendClassName(bag) : legendClassName),
|
|
3967
|
+
children: legend
|
|
3968
|
+
}), typeof children === "function" ? children(bag) : children] })
|
|
3969
|
+
});
|
|
4374
3970
|
}
|
|
4375
3971
|
|
|
4376
3972
|
//#endregion
|
|
4377
3973
|
//#region src/components/form.tsx
|
|
4378
3974
|
function Form({ children, className, ...props }) {
|
|
4379
|
-
return
|
|
4380
|
-
|
|
4381
|
-
|
|
3975
|
+
return /* @__PURE__ */ jsx("form", {
|
|
3976
|
+
...props,
|
|
3977
|
+
className: twMerge("grid gap-3", className),
|
|
3978
|
+
children
|
|
3979
|
+
});
|
|
4382
3980
|
}
|
|
4383
3981
|
|
|
4384
3982
|
//#endregion
|
|
4385
3983
|
//#region src/components/ghost.tsx
|
|
4386
3984
|
function Ghost({ children, className, ...props }) {
|
|
4387
|
-
return
|
|
4388
|
-
|
|
4389
|
-
|
|
3985
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3986
|
+
...props,
|
|
3987
|
+
className: twMerge("block w-24 max-w-full animate-pulse rounded bg-neutral-500/15 backdrop-brightness-110", className),
|
|
3988
|
+
children: children || /* @__PURE__ */ jsx(Fragment, { children: "\xA0" })
|
|
3989
|
+
});
|
|
4390
3990
|
}
|
|
4391
3991
|
|
|
4392
3992
|
//#endregion
|
|
4393
3993
|
//#region src/components/heading.tsx
|
|
4394
3994
|
function getTextFromChildren(children) {
|
|
4395
3995
|
let text = "";
|
|
4396
|
-
|
|
3996
|
+
Children.forEach(children, (child) => {
|
|
4397
3997
|
if (typeof child === "string" || typeof child === "number") text += child;
|
|
4398
|
-
else if (
|
|
3998
|
+
else if (isValidElement(child)) text += getTextFromChildren(child.props.children);
|
|
4399
3999
|
});
|
|
4400
4000
|
return text;
|
|
4401
4001
|
}
|
|
@@ -4418,42 +4018,64 @@ function Heading({ as = "h2", children, customize, className, id, ref, ...props
|
|
|
4418
4018
|
}
|
|
4419
4019
|
};
|
|
4420
4020
|
const baseClasses = getBaseClasses();
|
|
4421
|
-
return
|
|
4422
|
-
|
|
4423
|
-
|
|
4021
|
+
return /* @__PURE__ */ jsx(HeadingElement, {
|
|
4022
|
+
ref,
|
|
4023
|
+
id: targetableID,
|
|
4024
|
+
...props,
|
|
4025
|
+
className: twMerge(baseClasses, className),
|
|
4026
|
+
children
|
|
4027
|
+
});
|
|
4424
4028
|
}
|
|
4425
4029
|
|
|
4426
4030
|
//#endregion
|
|
4427
4031
|
//#region src/symbols/chevron.forward.tsx
|
|
4428
4032
|
function ChevronForward({ weight = "regular", ...props }) {
|
|
4429
4033
|
switch (weight) {
|
|
4430
|
-
case "ultralight": return
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
case "
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4034
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
4035
|
+
viewBox: "14.6484 -64.7007 33.47 58.89",
|
|
4036
|
+
...props,
|
|
4037
|
+
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" })
|
|
4038
|
+
});
|
|
4039
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
4040
|
+
viewBox: "14.6484 -65.7364 34.55 60.96",
|
|
4041
|
+
...props,
|
|
4042
|
+
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" })
|
|
4043
|
+
});
|
|
4044
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
4045
|
+
viewBox: "14.6484 -67.7583 36.68 65.01",
|
|
4046
|
+
...props,
|
|
4047
|
+
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" })
|
|
4048
|
+
});
|
|
4049
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
4050
|
+
viewBox: "14.6484 -69.2871 38.28 68.07",
|
|
4051
|
+
...props,
|
|
4052
|
+
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" })
|
|
4053
|
+
});
|
|
4054
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
4055
|
+
viewBox: "14.8242 -69.832 39.74 69.17",
|
|
4056
|
+
...props,
|
|
4057
|
+
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" })
|
|
4058
|
+
});
|
|
4059
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
4060
|
+
viewBox: "14.959 -70.2498 40.86 70.01",
|
|
4061
|
+
...props,
|
|
4062
|
+
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" })
|
|
4063
|
+
});
|
|
4064
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
4065
|
+
viewBox: "15.1367 -70.8008 42.33 71.12",
|
|
4066
|
+
...props,
|
|
4067
|
+
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" })
|
|
4068
|
+
});
|
|
4069
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
4070
|
+
viewBox: "15.3945 -71.5999 44.47 72.73",
|
|
4071
|
+
...props,
|
|
4072
|
+
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" })
|
|
4073
|
+
});
|
|
4074
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
4075
|
+
viewBox: "15.625 -72.3145 46.39 74.17",
|
|
4076
|
+
...props,
|
|
4077
|
+
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" })
|
|
4078
|
+
});
|
|
4457
4079
|
}
|
|
4458
4080
|
}
|
|
4459
4081
|
|
|
@@ -6130,8 +5752,8 @@ function generateHumanValidationToken() {
|
|
|
6130
5752
|
}).join("")}_${weekCode}`;
|
|
6131
5753
|
}
|
|
6132
5754
|
function HumanVerification({ children = "Verify", className }) {
|
|
6133
|
-
const [dragProgress, setDragProgress] =
|
|
6134
|
-
const submitButtonRef =
|
|
5755
|
+
const [dragProgress, setDragProgress] = useState(0);
|
|
5756
|
+
const submitButtonRef = useRef(null), buttonRef = useRef(null), buttonContainerRef = useRef(null), draggableRef = useRef(null);
|
|
6135
5757
|
const handleTrySubmit = (x) => {
|
|
6136
5758
|
if (x > 239) {
|
|
6137
5759
|
const form = buttonRef.current?.closest("form");
|
|
@@ -6176,7 +5798,7 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6176
5798
|
setTimeout(() => tokenInput.remove(), 1e3);
|
|
6177
5799
|
}
|
|
6178
5800
|
};
|
|
6179
|
-
const onDraggable =
|
|
5801
|
+
const onDraggable = useEffectEvent(() => {
|
|
6180
5802
|
if (!buttonRef.current || !buttonContainerRef.current) return;
|
|
6181
5803
|
const draggable = createDraggable(buttonRef.current, {
|
|
6182
5804
|
container: buttonContainerRef.current,
|
|
@@ -6195,7 +5817,7 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6195
5817
|
}
|
|
6196
5818
|
draggableRef.current = draggable;
|
|
6197
5819
|
});
|
|
6198
|
-
|
|
5820
|
+
useEffect(() => {
|
|
6199
5821
|
onDraggable();
|
|
6200
5822
|
}, []);
|
|
6201
5823
|
const moveButton = (e) => {
|
|
@@ -6222,32 +5844,54 @@ function HumanVerification({ children = "Verify", className }) {
|
|
|
6222
5844
|
setDragProgress(Math.min(100, Math.max(0, Math.round(newX / 240 * 100))));
|
|
6223
5845
|
handleTrySubmit(newX);
|
|
6224
5846
|
};
|
|
6225
|
-
return
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
5847
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
5848
|
+
className: ["w-72", className].join(" "),
|
|
5849
|
+
children: [
|
|
5850
|
+
/* @__PURE__ */ jsxs("div", {
|
|
5851
|
+
className: "h-12 w-72 rounded-md bg-neutral-300 p-1",
|
|
5852
|
+
ref: buttonContainerRef,
|
|
5853
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
5854
|
+
"aria-describedby": "human-verification-instructions",
|
|
5855
|
+
"aria-label": `Human verification: ${children.toLowerCase()} by dragging right or pressing arrow keys`,
|
|
5856
|
+
"aria-valuemax": 100,
|
|
5857
|
+
"aria-valuemin": 0,
|
|
5858
|
+
"aria-valuenow": dragProgress,
|
|
5859
|
+
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",
|
|
5860
|
+
onKeyDown: moveButton,
|
|
5861
|
+
ref: buttonRef,
|
|
5862
|
+
role: "slider",
|
|
5863
|
+
type: "button",
|
|
5864
|
+
children: /* @__PURE__ */ jsx(ChevronForward, { className: "inline-block h-4 overflow-visible fill-neutral-500 stroke-2" })
|
|
5865
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
5866
|
+
className: "flex size-full items-center justify-center pl-8 text-center text-sm font-semibold text-neutral-800",
|
|
5867
|
+
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
5868
|
+
"Swipe to ",
|
|
5869
|
+
children,
|
|
5870
|
+
" ",
|
|
5871
|
+
/* @__PURE__ */ jsx(ChevronForward, { className: "ml-1 inline-block h-3.5 overflow-visible stroke-2" })
|
|
5872
|
+
] })
|
|
5873
|
+
})]
|
|
5874
|
+
}),
|
|
5875
|
+
/* @__PURE__ */ jsx(Button, {
|
|
5876
|
+
ref: submitButtonRef,
|
|
5877
|
+
className: "sr-only",
|
|
5878
|
+
type: "submit",
|
|
5879
|
+
children: "Complete Submit"
|
|
5880
|
+
}),
|
|
5881
|
+
/* @__PURE__ */ jsxs("div", {
|
|
5882
|
+
id: "human-verification-instructions",
|
|
5883
|
+
className: "pt-1 text-center text-xs",
|
|
5884
|
+
children: [
|
|
5885
|
+
"Human verification challenge.",
|
|
5886
|
+
" ",
|
|
5887
|
+
/* @__PURE__ */ jsx("span", {
|
|
5888
|
+
className: "sr-only",
|
|
5889
|
+
children: "Drag the button right to the end to complete the challenge. Use arrow keys or spacebar to move without a mouse."
|
|
5890
|
+
})
|
|
5891
|
+
]
|
|
5892
|
+
})
|
|
5893
|
+
]
|
|
5894
|
+
});
|
|
6251
5895
|
}
|
|
6252
5896
|
|
|
6253
5897
|
//#endregion
|
|
@@ -6309,7 +5953,14 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
|
|
|
6309
5953
|
});
|
|
6310
5954
|
return propertyDefinition.join(" ");
|
|
6311
5955
|
}) || []).join("; ");
|
|
6312
|
-
return
|
|
5956
|
+
return /* @__PURE__ */ jsx("iframe", {
|
|
5957
|
+
...props,
|
|
5958
|
+
allow: allowAttribute,
|
|
5959
|
+
allowFullScreen: allowAttribute?.includes("fullscreen") || props.src?.replace(/[^a-zA-Z]/g, "").includes("vimeo") || props.src?.replace(/[^a-zA-Z]/g, "").includes("youtube"),
|
|
5960
|
+
className: twMerge("aspect-video w-full bg-linear-60 from-neutral-700 via-neutral-500 to-neutral-600", className),
|
|
5961
|
+
referrerPolicy,
|
|
5962
|
+
sandbox: sandbox?.join(" ")
|
|
5963
|
+
});
|
|
6313
5964
|
}
|
|
6314
5965
|
|
|
6315
5966
|
//#endregion
|
|
@@ -6329,54 +5980,78 @@ function IFrame({ allow, className, referrerPolicy = "no-referrer-when-downgrade
|
|
|
6329
5980
|
* @prop descriptionProps - The props to be passed to the description component.
|
|
6330
5981
|
*/
|
|
6331
5982
|
function Input({ children, className, description, descriptionProps: { className: descriptionClassName, ...descriptionProps } = {}, fieldProps: { className: fieldClassName, ...fieldProps } = {}, label, labelProps: { className: labelClassName, ...labelProps } = {}, required = true, ...props }) {
|
|
6332
|
-
return
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
5983
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
5984
|
+
...fieldProps,
|
|
5985
|
+
className: (bag) => twMerge("grid h-fit gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
5986
|
+
children: [
|
|
5987
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
5988
|
+
...labelProps,
|
|
5989
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
5990
|
+
children: label
|
|
5991
|
+
}),
|
|
5992
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Input$1, {
|
|
5993
|
+
...props,
|
|
5994
|
+
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),
|
|
5995
|
+
required
|
|
5996
|
+
}), children] }),
|
|
5997
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
5998
|
+
...descriptionProps,
|
|
5999
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6000
|
+
children: description
|
|
6001
|
+
})
|
|
6002
|
+
]
|
|
6003
|
+
});
|
|
6347
6004
|
}
|
|
6348
6005
|
|
|
6349
6006
|
//#endregion
|
|
6350
6007
|
//#region src/symbols/xmark.tsx
|
|
6351
6008
|
function Xmark({ weight = "regular", ...props }) {
|
|
6352
6009
|
switch (weight) {
|
|
6353
|
-
case "ultralight": return
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
case "
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6010
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
6011
|
+
viewBox: "9.64746 -64.0801 57.84 57.84",
|
|
6012
|
+
...props,
|
|
6013
|
+
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" })
|
|
6014
|
+
});
|
|
6015
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
6016
|
+
viewBox: "9.58594 -64.5723 58.82 58.8",
|
|
6017
|
+
...props,
|
|
6018
|
+
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" })
|
|
6019
|
+
});
|
|
6020
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
6021
|
+
viewBox: "9.46582 -65.5332 60.72 60.69",
|
|
6022
|
+
...props,
|
|
6023
|
+
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" })
|
|
6024
|
+
});
|
|
6025
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
6026
|
+
viewBox: "9.375 -66.2598 62.16 62.11",
|
|
6027
|
+
...props,
|
|
6028
|
+
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" })
|
|
6029
|
+
});
|
|
6030
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
6031
|
+
viewBox: "9.30469 -66.7871 63.2 63.17",
|
|
6032
|
+
...props,
|
|
6033
|
+
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" })
|
|
6034
|
+
});
|
|
6035
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
6036
|
+
viewBox: "9.25078 -67.1914 63.99 63.99",
|
|
6037
|
+
...props,
|
|
6038
|
+
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" })
|
|
6039
|
+
});
|
|
6040
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
6041
|
+
viewBox: "9.17969 -67.7246 65.04 65.06",
|
|
6042
|
+
...props,
|
|
6043
|
+
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" })
|
|
6044
|
+
});
|
|
6045
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
6046
|
+
viewBox: "9.05079 -68.498 66.61 66.62",
|
|
6047
|
+
...props,
|
|
6048
|
+
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" })
|
|
6049
|
+
});
|
|
6050
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
6051
|
+
viewBox: "8.93555 -69.1895 68.02 68.02",
|
|
6052
|
+
...props,
|
|
6053
|
+
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" })
|
|
6054
|
+
});
|
|
6380
6055
|
}
|
|
6381
6056
|
}
|
|
6382
6057
|
|
|
@@ -6384,7 +6059,7 @@ function Xmark({ weight = "regular", ...props }) {
|
|
|
6384
6059
|
//#region src/hooks/create-fast-context.tsx
|
|
6385
6060
|
function createFastContext(defaultInitialState) {
|
|
6386
6061
|
function useStoreData(initialState = defaultInitialState) {
|
|
6387
|
-
const store =
|
|
6062
|
+
const store = useRef(initialState), get = () => store.current, subscribers = useRef(/* @__PURE__ */ new Set());
|
|
6388
6063
|
const set = (value) => {
|
|
6389
6064
|
if (typeof value === "function") store.current = value(store.current);
|
|
6390
6065
|
else store.current = value;
|
|
@@ -6400,18 +6075,21 @@ function createFastContext(defaultInitialState) {
|
|
|
6400
6075
|
subscribe
|
|
6401
6076
|
};
|
|
6402
6077
|
}
|
|
6403
|
-
const StoreContext =
|
|
6078
|
+
const StoreContext = createContext(null);
|
|
6404
6079
|
function Provider({ initialValue = defaultInitialState, ...props }) {
|
|
6405
|
-
return
|
|
6080
|
+
return /* @__PURE__ */ jsx(StoreContext.Provider, {
|
|
6081
|
+
value: useStoreData(initialValue),
|
|
6082
|
+
...props
|
|
6083
|
+
});
|
|
6406
6084
|
}
|
|
6407
6085
|
function useStore(selector, initialValue) {
|
|
6408
|
-
const store =
|
|
6086
|
+
const store = useContext(StoreContext);
|
|
6409
6087
|
if (!store) {
|
|
6410
6088
|
const selectedValue = selector(initialValue !== void 0 ? initialValue : defaultInitialState);
|
|
6411
6089
|
const noOpSet = () => console.warn("Attempting to set store value outside of Provider");
|
|
6412
6090
|
return [selectedValue, noOpSet];
|
|
6413
6091
|
}
|
|
6414
|
-
return [
|
|
6092
|
+
return [useSyncExternalStore(store.subscribe, () => selector(store.get()), () => selector(initialValue !== void 0 ? initialValue : defaultInitialState)), store.set];
|
|
6415
6093
|
}
|
|
6416
6094
|
return {
|
|
6417
6095
|
Provider,
|
|
@@ -6423,128 +6101,6 @@ function createFastContext(defaultInitialState) {
|
|
|
6423
6101
|
//#region src/hooks/use-form-status.tsx
|
|
6424
6102
|
const DEFAULT_STATUS = "incomplete";
|
|
6425
6103
|
const { Provider, useStore } = createFastContext(DEFAULT_STATUS);
|
|
6426
|
-
function FormStatusProvider({ children, initialStatus = DEFAULT_STATUS }) {
|
|
6427
|
-
return <react.Suspense>
|
|
6428
|
-
<Provider initialValue={initialStatus}>{children}</Provider>
|
|
6429
|
-
</react.Suspense>;
|
|
6430
|
-
}
|
|
6431
|
-
function useFormStatus() {
|
|
6432
|
-
return useStore((store) => store);
|
|
6433
|
-
}
|
|
6434
|
-
|
|
6435
|
-
//#endregion
|
|
6436
|
-
//#region src/hooks/use-pointer-movement.ts
|
|
6437
|
-
function usePointerMovement(props) {
|
|
6438
|
-
const pointerTypeRef = (0, react.useRef)("pointer"), [isTracking, setIsTracking] = (0, react.useState)(false), [delta, setDelta] = (0, react.useState)({
|
|
6439
|
-
x: 0,
|
|
6440
|
-
y: 0
|
|
6441
|
-
}), startCoordsRef = (0, react.useRef)({
|
|
6442
|
-
x: 0,
|
|
6443
|
-
y: 0
|
|
6444
|
-
});
|
|
6445
|
-
const styleID = (0, react.useId)();
|
|
6446
|
-
const changeCursor = (cursor) => {
|
|
6447
|
-
if (cursor === false) {
|
|
6448
|
-
document.querySelector(`#${styleID}`)?.remove();
|
|
6449
|
-
return;
|
|
6450
|
-
}
|
|
6451
|
-
const css = `*, *:active { cursor: ${cursor}; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; }`;
|
|
6452
|
-
const style = document.createElement("style");
|
|
6453
|
-
style.id = styleID;
|
|
6454
|
-
style.innerHTML = css;
|
|
6455
|
-
document.body.prepend(style);
|
|
6456
|
-
};
|
|
6457
|
-
const trackPointerMovement = (e) => {
|
|
6458
|
-
changeCursor(props?.activeCursor || "grabbing");
|
|
6459
|
-
const { type } = e;
|
|
6460
|
-
switch (type) {
|
|
6461
|
-
case "mousemove":
|
|
6462
|
-
case "mouseup":
|
|
6463
|
-
case "pointermove":
|
|
6464
|
-
case "pointerup":
|
|
6465
|
-
case "touchmove":
|
|
6466
|
-
case "touchend": throw new Error("To initiate the tracking of pointer movement, you must use a `mousedown`, `pointerdown`, or `touchstart`.");
|
|
6467
|
-
case "mousedown":
|
|
6468
|
-
pointerTypeRef.current = "mouse";
|
|
6469
|
-
break;
|
|
6470
|
-
case "pointerdown":
|
|
6471
|
-
pointerTypeRef.current = "pointer";
|
|
6472
|
-
break;
|
|
6473
|
-
case "touchstart":
|
|
6474
|
-
pointerTypeRef.current = "touch";
|
|
6475
|
-
break;
|
|
6476
|
-
}
|
|
6477
|
-
let x = 0, y = 0;
|
|
6478
|
-
if ("touches" in e) {
|
|
6479
|
-
const { touches } = e;
|
|
6480
|
-
if (touches.length > 1) return;
|
|
6481
|
-
x = touches[0].clientX;
|
|
6482
|
-
y = touches[0].clientY;
|
|
6483
|
-
} else {
|
|
6484
|
-
x = e.clientX;
|
|
6485
|
-
y = e.clientY;
|
|
6486
|
-
}
|
|
6487
|
-
startCoordsRef.current = {
|
|
6488
|
-
x,
|
|
6489
|
-
y
|
|
6490
|
-
};
|
|
6491
|
-
setIsTracking(true);
|
|
6492
|
-
};
|
|
6493
|
-
const updateDelta = (0, react.useCallback)((e) => {
|
|
6494
|
-
let clientX = 0, clientY = 0;
|
|
6495
|
-
if ("touches" in e) {
|
|
6496
|
-
const { touches } = e;
|
|
6497
|
-
if (touches.length > 1) return;
|
|
6498
|
-
clientX = touches[0].clientX;
|
|
6499
|
-
clientY = touches[0].clientY;
|
|
6500
|
-
} else {
|
|
6501
|
-
clientX = e.clientX;
|
|
6502
|
-
clientY = e.clientY;
|
|
6503
|
-
}
|
|
6504
|
-
const { x, y } = startCoordsRef.current, newDelta = {
|
|
6505
|
-
x: clientX - x,
|
|
6506
|
-
y: clientY - y
|
|
6507
|
-
};
|
|
6508
|
-
setDelta(newDelta);
|
|
6509
|
-
props?.onChange?.(newDelta);
|
|
6510
|
-
}, []);
|
|
6511
|
-
const stopTracking = (0, react.useCallback)(() => {
|
|
6512
|
-
changeCursor(false);
|
|
6513
|
-
setIsTracking(false);
|
|
6514
|
-
props?.onEnd?.(delta);
|
|
6515
|
-
}, [delta]);
|
|
6516
|
-
(0, react.useEffect)(() => {
|
|
6517
|
-
if (typeof window === "undefined") return;
|
|
6518
|
-
const controller = new AbortController(), signal = controller.signal;
|
|
6519
|
-
if (isTracking) switch (pointerTypeRef.current) {
|
|
6520
|
-
case "mouse":
|
|
6521
|
-
document.body.addEventListener("mousemove", updateDelta, { signal });
|
|
6522
|
-
document.body.addEventListener("mouseup", stopTracking, { signal });
|
|
6523
|
-
break;
|
|
6524
|
-
case "pointer":
|
|
6525
|
-
document.body.addEventListener("pointermove", updateDelta, { signal });
|
|
6526
|
-
document.body.addEventListener("pointerup", stopTracking, { signal });
|
|
6527
|
-
break;
|
|
6528
|
-
case "touch":
|
|
6529
|
-
document.body.addEventListener("touchmove", updateDelta, { signal });
|
|
6530
|
-
document.body.addEventListener("touchend", stopTracking, { signal });
|
|
6531
|
-
break;
|
|
6532
|
-
}
|
|
6533
|
-
else controller.abort();
|
|
6534
|
-
return () => {
|
|
6535
|
-
controller.abort();
|
|
6536
|
-
};
|
|
6537
|
-
}, [
|
|
6538
|
-
isTracking,
|
|
6539
|
-
updateDelta,
|
|
6540
|
-
stopTracking
|
|
6541
|
-
]);
|
|
6542
|
-
return {
|
|
6543
|
-
delta,
|
|
6544
|
-
stopTracking,
|
|
6545
|
-
trackPointerMovement
|
|
6546
|
-
};
|
|
6547
|
-
}
|
|
6548
6104
|
|
|
6549
6105
|
//#endregion
|
|
6550
6106
|
//#region src/components/modal.tsx
|
|
@@ -6559,7 +6115,7 @@ const { Provider: ModalControlsProvider, useStore: useModalControls } = createFa
|
|
|
6559
6115
|
dialogPanelRef: { current: null }
|
|
6560
6116
|
});
|
|
6561
6117
|
function ModalTrigger({ as, onClick, ...props }) {
|
|
6562
|
-
const ModalTriggerElement = as ||
|
|
6118
|
+
const ModalTriggerElement = as || Button$1;
|
|
6563
6119
|
const [modalControls] = useModalControls((store) => store);
|
|
6564
6120
|
const { isOpen, openModal, closeModal } = modalControls || {};
|
|
6565
6121
|
const handleClick = (e) => {
|
|
@@ -6567,10 +6123,13 @@ function ModalTrigger({ as, onClick, ...props }) {
|
|
|
6567
6123
|
if (!isOpen) openModal?.();
|
|
6568
6124
|
onClick?.(e);
|
|
6569
6125
|
};
|
|
6570
|
-
return
|
|
6126
|
+
return /* @__PURE__ */ jsx(ModalTriggerElement, {
|
|
6127
|
+
...props,
|
|
6128
|
+
onClick: handleClick
|
|
6129
|
+
});
|
|
6571
6130
|
}
|
|
6572
6131
|
function ModalTitle(props) {
|
|
6573
|
-
return
|
|
6132
|
+
return /* @__PURE__ */ jsx(DialogTitle, { ...props });
|
|
6574
6133
|
}
|
|
6575
6134
|
function ModalDialog(props) {
|
|
6576
6135
|
const [modalControls] = useModalControls((store) => store);
|
|
@@ -6584,47 +6143,63 @@ function ModalDialog(props) {
|
|
|
6584
6143
|
enableTouchClose: () => {},
|
|
6585
6144
|
dialogPanelRef: { current: null }
|
|
6586
6145
|
};
|
|
6587
|
-
return
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6146
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
6147
|
+
open: isOpen,
|
|
6148
|
+
onClose: () => closeModal?.(),
|
|
6149
|
+
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(" "),
|
|
6150
|
+
children: [/* @__PURE__ */ jsx(DialogBackdrop, {
|
|
6151
|
+
transition: true,
|
|
6152
|
+
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(" "),
|
|
6153
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
6154
|
+
padding: "none",
|
|
6155
|
+
rounded: "full",
|
|
6156
|
+
className: "group/button fixed top-4 right-4 size-7 overflow-x-hidden transition-[scale,width,filter] pointer-fine:hover:w-20",
|
|
6157
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
6158
|
+
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",
|
|
6159
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
6160
|
+
className: "block text-xs leading-none uppercase",
|
|
6161
|
+
children: ["Close", /* @__PURE__ */ jsx("span", {
|
|
6162
|
+
className: "sr-only",
|
|
6163
|
+
children: "Modal"
|
|
6164
|
+
})]
|
|
6165
|
+
}), /* @__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" })]
|
|
6166
|
+
})
|
|
6167
|
+
})
|
|
6168
|
+
}), /* @__PURE__ */ jsxs(DialogPanel, {
|
|
6169
|
+
ref: dialogPanelRef,
|
|
6170
|
+
transition: true,
|
|
6171
|
+
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),
|
|
6172
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
6173
|
+
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(" "),
|
|
6174
|
+
onTouchStart: enableTouchClose,
|
|
6175
|
+
onMouseDown: enableMouseClose,
|
|
6176
|
+
type: "button",
|
|
6177
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
6178
|
+
className: "sr-only",
|
|
6179
|
+
children: "Drag down to close"
|
|
6180
|
+
})
|
|
6181
|
+
}), /* @__PURE__ */ jsx("div", { ...props })]
|
|
6182
|
+
})]
|
|
6183
|
+
});
|
|
6608
6184
|
}
|
|
6609
6185
|
function ModalClose({ as, ...props }) {
|
|
6610
|
-
|
|
6611
|
-
return <ModalCloseElement {...props} />;
|
|
6186
|
+
return /* @__PURE__ */ jsx(as || Button$1, { ...props });
|
|
6612
6187
|
}
|
|
6613
6188
|
function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }) {
|
|
6614
|
-
const [bodyElement, setBodyElement] =
|
|
6615
|
-
const onVisible =
|
|
6189
|
+
const [bodyElement, setBodyElement] = useState(null);
|
|
6190
|
+
const onVisible = useEffectEvent(() => {
|
|
6616
6191
|
setBodyElement(document.body);
|
|
6617
6192
|
});
|
|
6618
|
-
|
|
6193
|
+
useEffect(() => {
|
|
6619
6194
|
if (typeof window !== "undefined") onVisible();
|
|
6620
6195
|
}, []);
|
|
6621
6196
|
const [, setModalControls] = useModalControls(() => null);
|
|
6622
|
-
const [isOpen, setIsOpen] =
|
|
6623
|
-
const dragMoveBoxRef =
|
|
6197
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
6198
|
+
const dragMoveBoxRef = useRef(null), startDragCoords = useRef({
|
|
6624
6199
|
x: 0,
|
|
6625
6200
|
y: 0
|
|
6626
|
-
}), localDialogPanelRef =
|
|
6627
|
-
const [allowDragClose, setAllowDragClose] =
|
|
6201
|
+
}), localDialogPanelRef = useRef(null);
|
|
6202
|
+
const [allowDragClose, setAllowDragClose] = useState(false), [readyToClose, setReadyToClose] = useState(false);
|
|
6628
6203
|
const openModal = () => {
|
|
6629
6204
|
setIsOpen((previous) => {
|
|
6630
6205
|
if (previous) return previous;
|
|
@@ -6684,7 +6259,7 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
|
|
|
6684
6259
|
const { clientY } = e;
|
|
6685
6260
|
disableDragClose(clientY);
|
|
6686
6261
|
};
|
|
6687
|
-
|
|
6262
|
+
useEffect(() => {
|
|
6688
6263
|
setModalControls?.((previous) => ({
|
|
6689
6264
|
...previous,
|
|
6690
6265
|
isOpen,
|
|
@@ -6708,49 +6283,66 @@ function ModalDisplay({ children, className, onClose, onOpen, place = "bottom" }
|
|
|
6708
6283
|
readyToClose,
|
|
6709
6284
|
setModalControls
|
|
6710
6285
|
]);
|
|
6711
|
-
return
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6286
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [allowDragClose && bodyElement && createPortal(/* @__PURE__ */ jsx("div", {
|
|
6287
|
+
ref: dragMoveBoxRef,
|
|
6288
|
+
className: "fixed inset-0 z-99 h-dvh w-screen bg-transparent active:cursor-grabbing pointer-coarse:hidden",
|
|
6289
|
+
onMouseMove: handleMouseMove,
|
|
6290
|
+
onMouseUp: disableMouseDragClose
|
|
6291
|
+
}), bodyElement), children] });
|
|
6716
6292
|
}
|
|
6717
6293
|
function Modal(props) {
|
|
6718
|
-
return
|
|
6719
|
-
<ModalDisplay {...props} />
|
|
6720
|
-
</ModalControlsProvider>;
|
|
6294
|
+
return /* @__PURE__ */ jsx(ModalControlsProvider, { children: /* @__PURE__ */ jsx(ModalDisplay, { ...props }) });
|
|
6721
6295
|
}
|
|
6722
6296
|
|
|
6723
6297
|
//#endregion
|
|
6724
6298
|
//#region src/symbols/chevron.up.chevron.down.tsx
|
|
6725
6299
|
function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
6726
6300
|
switch (weight) {
|
|
6727
|
-
case "ultralight": return
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
case "
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6301
|
+
case "ultralight": return /* @__PURE__ */ jsx("svg", {
|
|
6302
|
+
viewBox: "9.76562 -70.5083 50.44 70.51",
|
|
6303
|
+
...props,
|
|
6304
|
+
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" })
|
|
6305
|
+
});
|
|
6306
|
+
case "thin": return /* @__PURE__ */ jsx("svg", {
|
|
6307
|
+
viewBox: "9.76562 -70.9492 50.57 71.39",
|
|
6308
|
+
...props,
|
|
6309
|
+
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" })
|
|
6310
|
+
});
|
|
6311
|
+
case "light": return /* @__PURE__ */ jsx("svg", {
|
|
6312
|
+
viewBox: "9.76562 -71.8101 50.83 73.11",
|
|
6313
|
+
...props,
|
|
6314
|
+
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" })
|
|
6315
|
+
});
|
|
6316
|
+
case "regular": return /* @__PURE__ */ jsx("svg", {
|
|
6317
|
+
viewBox: "9.76562 -72.4609 51.03 74.41",
|
|
6318
|
+
...props,
|
|
6319
|
+
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" })
|
|
6320
|
+
});
|
|
6321
|
+
case "medium": return /* @__PURE__ */ jsx("svg", {
|
|
6322
|
+
viewBox: "9.76562 -74.0254 53.67 77.54",
|
|
6323
|
+
...props,
|
|
6324
|
+
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" })
|
|
6325
|
+
});
|
|
6326
|
+
case "semibold": return /* @__PURE__ */ jsx("svg", {
|
|
6327
|
+
viewBox: "9.76562 -75.2248 55.7 79.94",
|
|
6328
|
+
...props,
|
|
6329
|
+
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" })
|
|
6330
|
+
});
|
|
6331
|
+
case "bold": return /* @__PURE__ */ jsx("svg", {
|
|
6332
|
+
viewBox: "9.76562 -76.8066 58.37 83.11",
|
|
6333
|
+
...props,
|
|
6334
|
+
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" })
|
|
6335
|
+
});
|
|
6336
|
+
case "heavy": return /* @__PURE__ */ jsx("svg", {
|
|
6337
|
+
viewBox: "9.76562 -79.101 62.25 87.69",
|
|
6338
|
+
...props,
|
|
6339
|
+
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" })
|
|
6340
|
+
});
|
|
6341
|
+
case "black": return /* @__PURE__ */ jsx("svg", {
|
|
6342
|
+
viewBox: "9.76562 -81.1523 65.72 91.8",
|
|
6343
|
+
...props,
|
|
6344
|
+
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" })
|
|
6345
|
+
});
|
|
6754
6346
|
}
|
|
6755
6347
|
}
|
|
6756
6348
|
|
|
@@ -6762,7 +6354,10 @@ function ChevronUpChevronDown({ weight = "regular", ...props }) {
|
|
|
6762
6354
|
* Displays a simple title.
|
|
6763
6355
|
*/
|
|
6764
6356
|
function SelectSectionTitle({ className, ...props }) {
|
|
6765
|
-
return
|
|
6357
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6358
|
+
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),
|
|
6359
|
+
...props
|
|
6360
|
+
});
|
|
6766
6361
|
}
|
|
6767
6362
|
/**
|
|
6768
6363
|
* ## SelectOption
|
|
@@ -6772,15 +6367,17 @@ function SelectSectionTitle({ className, ...props }) {
|
|
|
6772
6367
|
* @prop value - This is used for FormData
|
|
6773
6368
|
*/
|
|
6774
6369
|
function SelectOption({ children, className, name, ...props }) {
|
|
6775
|
-
return
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6370
|
+
return /* @__PURE__ */ jsx(ListboxOption, {
|
|
6371
|
+
className: "group/option contents",
|
|
6372
|
+
...props,
|
|
6373
|
+
children: (bag) => bag.selectedOption ? /* @__PURE__ */ jsx("span", {
|
|
6374
|
+
className: "mr-3 before:absolute before:-left-3 before:content-[\",_\"]",
|
|
6375
|
+
children: name
|
|
6376
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
6377
|
+
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),
|
|
6378
|
+
children: [/* @__PURE__ */ jsx(Checkmark, { className: "invisible size-3.5 group-data-selected/option:visible" }), typeof children === "function" ? children(bag) : children]
|
|
6379
|
+
})
|
|
6380
|
+
});
|
|
6784
6381
|
}
|
|
6785
6382
|
/**
|
|
6786
6383
|
* # Select
|
|
@@ -6805,12 +6402,12 @@ function SelectOption({ children, className, name, ...props }) {
|
|
|
6805
6402
|
* @prop anchor - The anchor point for the drop down menu.
|
|
6806
6403
|
*/
|
|
6807
6404
|
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 }) {
|
|
6808
|
-
const uniqueId =
|
|
6405
|
+
const uniqueId = useId();
|
|
6809
6406
|
const multiple = props.multiple;
|
|
6810
|
-
const selectOptionList =
|
|
6811
|
-
const listboxButtonRef =
|
|
6812
|
-
const [isInvalid, setIsInvalid] =
|
|
6813
|
-
const [selectedOptionSync, setSelectedOptionSync] =
|
|
6407
|
+
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);
|
|
6408
|
+
const listboxButtonRef = useRef(null);
|
|
6409
|
+
const [isInvalid, setIsInvalid] = useState(invalid);
|
|
6410
|
+
const [selectedOptionSync, setSelectedOptionSync] = useState(multiple ? [] : "");
|
|
6814
6411
|
const handleChange = (selected) => {
|
|
6815
6412
|
setIsInvalid(false);
|
|
6816
6413
|
setSelectedOptionSync(selected);
|
|
@@ -6818,31 +6415,61 @@ function Select({ buttonProps, children, className, description, descriptionProp
|
|
|
6818
6415
|
};
|
|
6819
6416
|
const handleInvalid = () => setIsInvalid(true);
|
|
6820
6417
|
const refocus = () => listboxButtonRef.current?.focus();
|
|
6821
|
-
return
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6418
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
6419
|
+
...fieldProps,
|
|
6420
|
+
className: (bag) => twMerge("grid gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
6421
|
+
children: [
|
|
6422
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
6423
|
+
...labelProps,
|
|
6424
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6425
|
+
children: label
|
|
6426
|
+
}),
|
|
6427
|
+
/* @__PURE__ */ jsxs(Listbox, {
|
|
6428
|
+
...props,
|
|
6429
|
+
invalid: isInvalid || invalid,
|
|
6430
|
+
onChange: handleChange,
|
|
6431
|
+
children: [/* @__PURE__ */ jsxs(ListboxButton, {
|
|
6432
|
+
...buttonProps,
|
|
6433
|
+
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),
|
|
6434
|
+
ref: listboxButtonRef,
|
|
6435
|
+
children: [
|
|
6436
|
+
/* @__PURE__ */ jsx("input", {
|
|
6437
|
+
"aria-hidden": "true",
|
|
6438
|
+
className: "sr-only top-0 left-1/2",
|
|
6439
|
+
id: props.name + ":input:id" + uniqueId,
|
|
6440
|
+
name: props.name + ":input:name" + uniqueId,
|
|
6441
|
+
onChange: () => {},
|
|
6442
|
+
onInvalid: handleInvalid,
|
|
6443
|
+
onFocus: refocus,
|
|
6444
|
+
required,
|
|
6445
|
+
tabIndex: -1,
|
|
6446
|
+
value: Array.isArray(selectedOptionSync) ? selectedOptionSync.join(", ") : selectedOptionSync
|
|
6447
|
+
}),
|
|
6448
|
+
/* @__PURE__ */ jsx(ListboxSelectedOption, {
|
|
6449
|
+
...selectedOptionProps,
|
|
6450
|
+
options: selectOptionList,
|
|
6451
|
+
placeholder: /* @__PURE__ */ jsx("span", {
|
|
6452
|
+
className: "opacity-50",
|
|
6453
|
+
children: placeholder || (multiple ? "Choose Any" : "Choose One")
|
|
6454
|
+
})
|
|
6455
|
+
}),
|
|
6456
|
+
/* @__PURE__ */ jsx(ChevronUpChevronDown, { className: "absolute top-1/2 right-2 size-3 -translate-y-1/2 fill-current/50" })
|
|
6457
|
+
]
|
|
6458
|
+
}), /* @__PURE__ */ jsx(ListboxOptions, {
|
|
6459
|
+
...optionsProps,
|
|
6460
|
+
anchor: anchor || "bottom start",
|
|
6461
|
+
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),
|
|
6462
|
+
transition: transition || true,
|
|
6463
|
+
children
|
|
6464
|
+
})]
|
|
6465
|
+
}),
|
|
6466
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
6467
|
+
...descriptionProps,
|
|
6468
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6469
|
+
children: description
|
|
6470
|
+
})
|
|
6471
|
+
]
|
|
6472
|
+
});
|
|
6846
6473
|
}
|
|
6847
6474
|
|
|
6848
6475
|
//#endregion
|
|
@@ -6870,21 +6497,28 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6870
6497
|
const getButtonText = () => {
|
|
6871
6498
|
switch (formStatus) {
|
|
6872
6499
|
case "incomplete": return incomplete || "Complete Form";
|
|
6873
|
-
case "loading": return loading ||
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6500
|
+
case "loading": return loading || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6501
|
+
/* @__PURE__ */ jsx("span", {
|
|
6502
|
+
className: "animate-wave animation-delay-300 inline-block",
|
|
6503
|
+
children: "•"
|
|
6504
|
+
}),
|
|
6505
|
+
/* @__PURE__ */ jsx("span", {
|
|
6506
|
+
className: "animate-wave animation-delay-150 inline-block",
|
|
6507
|
+
children: "•"
|
|
6508
|
+
}),
|
|
6509
|
+
/* @__PURE__ */ jsx("span", {
|
|
6510
|
+
className: "animate-wave inline-block",
|
|
6511
|
+
children: "•"
|
|
6512
|
+
})
|
|
6513
|
+
] });
|
|
6514
|
+
case "error": return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6515
|
+
error || "Error",
|
|
6516
|
+
" ",
|
|
6517
|
+
/* @__PURE__ */ jsx("span", {
|
|
6518
|
+
className: "absolute top-1/2 ml-1.5 translate-y-[calc(-50%-1.5px)] text-2xl",
|
|
6519
|
+
children: "×"
|
|
6520
|
+
})
|
|
6521
|
+
] });
|
|
6888
6522
|
case "readonly": return readonly || children;
|
|
6889
6523
|
case "success": return success || "Successfully Submitted";
|
|
6890
6524
|
default: return children || "Submit";
|
|
@@ -6903,13 +6537,19 @@ function SubmitButton({ children, className, customTheme, error, formStatus = "r
|
|
|
6903
6537
|
}
|
|
6904
6538
|
};
|
|
6905
6539
|
const dataFormState = getDataFormState();
|
|
6906
|
-
return
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
className
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6540
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
6541
|
+
...props,
|
|
6542
|
+
...dataFormState,
|
|
6543
|
+
className: twMerge([
|
|
6544
|
+
formStatusButtonClasses,
|
|
6545
|
+
"w-full text-white",
|
|
6546
|
+
className
|
|
6547
|
+
]),
|
|
6548
|
+
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) },
|
|
6549
|
+
theme: "custom",
|
|
6550
|
+
type: type || "submit",
|
|
6551
|
+
children: buttonText
|
|
6552
|
+
});
|
|
6913
6553
|
}
|
|
6914
6554
|
|
|
6915
6555
|
//#endregion
|
|
@@ -6958,21 +6598,27 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6958
6598
|
}
|
|
6959
6599
|
resizeClassName = resizeClassList.join(" ");
|
|
6960
6600
|
}
|
|
6961
|
-
return
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6601
|
+
return /* @__PURE__ */ jsxs(Field, {
|
|
6602
|
+
...fieldProps,
|
|
6603
|
+
className: (bag) => twMerge("grid h-fit gap-1", typeof fieldClassName === "function" ? fieldClassName(bag) : fieldClassName),
|
|
6604
|
+
children: [
|
|
6605
|
+
label && /* @__PURE__ */ jsx(Label, {
|
|
6606
|
+
...labelProps,
|
|
6607
|
+
className: (bag) => twMerge("text-sm font-medium", required ? "after:text-red-700 after:content-[\"_*\"]" : "", typeof labelClassName === "function" ? labelClassName(bag) : labelClassName),
|
|
6608
|
+
children: label
|
|
6609
|
+
}),
|
|
6610
|
+
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Textarea$1, {
|
|
6611
|
+
...props,
|
|
6612
|
+
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),
|
|
6613
|
+
required
|
|
6614
|
+
}), children] }),
|
|
6615
|
+
description && /* @__PURE__ */ jsx(Description, {
|
|
6616
|
+
...descriptionProps,
|
|
6617
|
+
className: (bag) => twMerge("text-xs text-current/60", typeof descriptionClassName === "function" ? descriptionClassName(bag) : descriptionClassName),
|
|
6618
|
+
children: description
|
|
6619
|
+
})
|
|
6620
|
+
]
|
|
6621
|
+
});
|
|
6976
6622
|
}
|
|
6977
6623
|
|
|
6978
6624
|
//#endregion
|
|
@@ -6994,7 +6640,7 @@ function Textarea({ children, className, description, descriptionProps: { classN
|
|
|
6994
6640
|
* @prop year - Include the year in the display.
|
|
6995
6641
|
*/
|
|
6996
6642
|
function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }) {
|
|
6997
|
-
const [date, setDate] =
|
|
6643
|
+
const [date, setDate] = useState(dateObject || void 0);
|
|
6998
6644
|
const getDateAndTime = () => {
|
|
6999
6645
|
if (dateTime) return dateTime;
|
|
7000
6646
|
if (!date) return "";
|
|
@@ -7030,15 +6676,18 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
|
|
|
7030
6676
|
].filter(Boolean).join(" ");
|
|
7031
6677
|
};
|
|
7032
6678
|
const dateDisplay = getDateDisplay();
|
|
7033
|
-
const onVisible =
|
|
6679
|
+
const onVisible = useEffectEvent(() => {
|
|
7034
6680
|
if (date === void 0 && dateObject === void 0 && dateTime === void 0 && typeof window !== "undefined" && (dateAndTime === "" || dateDisplay === "")) setDate(/* @__PURE__ */ new Date());
|
|
7035
6681
|
});
|
|
7036
|
-
|
|
6682
|
+
useEffect(() => {
|
|
7037
6683
|
onVisible();
|
|
7038
6684
|
}, []);
|
|
7039
|
-
return
|
|
7040
|
-
|
|
7041
|
-
|
|
6685
|
+
return /* @__PURE__ */ jsx("time", {
|
|
6686
|
+
dateTime: dateAndTime,
|
|
6687
|
+
ref,
|
|
6688
|
+
...props,
|
|
6689
|
+
children: dateDisplay
|
|
6690
|
+
});
|
|
7042
6691
|
}
|
|
7043
6692
|
|
|
7044
6693
|
//#endregion
|
|
@@ -8298,7 +7947,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
8298
7947
|
|
|
8299
7948
|
//#endregion
|
|
8300
7949
|
//#region node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
8301
|
-
var index = typeof document !== "undefined" ?
|
|
7950
|
+
var index = typeof document !== "undefined" ? useLayoutEffect : function noop() {};
|
|
8302
7951
|
function deepEqual(a, b) {
|
|
8303
7952
|
if (a === b) return true;
|
|
8304
7953
|
if (typeof a !== typeof b) return false;
|
|
@@ -8335,7 +7984,7 @@ function roundByDPR(element, value) {
|
|
|
8335
7984
|
return Math.round(value * dpr) / dpr;
|
|
8336
7985
|
}
|
|
8337
7986
|
function useLatestRef(value) {
|
|
8338
|
-
const ref =
|
|
7987
|
+
const ref = React.useRef(value);
|
|
8339
7988
|
index(() => {
|
|
8340
7989
|
ref.current = value;
|
|
8341
7990
|
});
|
|
@@ -8348,7 +7997,7 @@ function useLatestRef(value) {
|
|
|
8348
7997
|
function useFloating(options) {
|
|
8349
7998
|
if (options === void 0) options = {};
|
|
8350
7999
|
const { placement = "bottom", strategy = "absolute", middleware = [], platform, elements: { reference: externalReference, floating: externalFloating } = {}, transform = true, whileElementsMounted, open } = options;
|
|
8351
|
-
const [data, setData] =
|
|
8000
|
+
const [data, setData] = React.useState({
|
|
8352
8001
|
x: 0,
|
|
8353
8002
|
y: 0,
|
|
8354
8003
|
strategy,
|
|
@@ -8356,17 +8005,17 @@ function useFloating(options) {
|
|
|
8356
8005
|
middlewareData: {},
|
|
8357
8006
|
isPositioned: false
|
|
8358
8007
|
});
|
|
8359
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
8008
|
+
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
|
|
8360
8009
|
if (!deepEqual(latestMiddleware, middleware)) setLatestMiddleware(middleware);
|
|
8361
|
-
const [_reference, _setReference] =
|
|
8362
|
-
const [_floating, _setFloating] =
|
|
8363
|
-
const setReference =
|
|
8010
|
+
const [_reference, _setReference] = React.useState(null);
|
|
8011
|
+
const [_floating, _setFloating] = React.useState(null);
|
|
8012
|
+
const setReference = React.useCallback((node) => {
|
|
8364
8013
|
if (node !== referenceRef.current) {
|
|
8365
8014
|
referenceRef.current = node;
|
|
8366
8015
|
_setReference(node);
|
|
8367
8016
|
}
|
|
8368
8017
|
}, []);
|
|
8369
|
-
const setFloating =
|
|
8018
|
+
const setFloating = React.useCallback((node) => {
|
|
8370
8019
|
if (node !== floatingRef.current) {
|
|
8371
8020
|
floatingRef.current = node;
|
|
8372
8021
|
_setFloating(node);
|
|
@@ -8374,14 +8023,14 @@ function useFloating(options) {
|
|
|
8374
8023
|
}, []);
|
|
8375
8024
|
const referenceEl = externalReference || _reference;
|
|
8376
8025
|
const floatingEl = externalFloating || _floating;
|
|
8377
|
-
const referenceRef =
|
|
8378
|
-
const floatingRef =
|
|
8379
|
-
const dataRef =
|
|
8026
|
+
const referenceRef = React.useRef(null);
|
|
8027
|
+
const floatingRef = React.useRef(null);
|
|
8028
|
+
const dataRef = React.useRef(data);
|
|
8380
8029
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
8381
8030
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
8382
8031
|
const platformRef = useLatestRef(platform);
|
|
8383
8032
|
const openRef = useLatestRef(open);
|
|
8384
|
-
const update =
|
|
8033
|
+
const update = React.useCallback(() => {
|
|
8385
8034
|
if (!referenceRef.current || !floatingRef.current) return;
|
|
8386
8035
|
const config = {
|
|
8387
8036
|
placement,
|
|
@@ -8396,7 +8045,7 @@ function useFloating(options) {
|
|
|
8396
8045
|
};
|
|
8397
8046
|
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
8398
8047
|
dataRef.current = fullData;
|
|
8399
|
-
|
|
8048
|
+
ReactDOM.flushSync(() => {
|
|
8400
8049
|
setData(fullData);
|
|
8401
8050
|
});
|
|
8402
8051
|
}
|
|
@@ -8417,7 +8066,7 @@ function useFloating(options) {
|
|
|
8417
8066
|
}));
|
|
8418
8067
|
}
|
|
8419
8068
|
}, [open]);
|
|
8420
|
-
const isMountedRef =
|
|
8069
|
+
const isMountedRef = React.useRef(false);
|
|
8421
8070
|
index(() => {
|
|
8422
8071
|
isMountedRef.current = true;
|
|
8423
8072
|
return () => {
|
|
@@ -8438,17 +8087,17 @@ function useFloating(options) {
|
|
|
8438
8087
|
whileElementsMountedRef,
|
|
8439
8088
|
hasWhileElementsMounted
|
|
8440
8089
|
]);
|
|
8441
|
-
const refs =
|
|
8090
|
+
const refs = React.useMemo(() => ({
|
|
8442
8091
|
reference: referenceRef,
|
|
8443
8092
|
floating: floatingRef,
|
|
8444
8093
|
setReference,
|
|
8445
8094
|
setFloating
|
|
8446
8095
|
}), [setReference, setFloating]);
|
|
8447
|
-
const elements =
|
|
8096
|
+
const elements = React.useMemo(() => ({
|
|
8448
8097
|
reference: referenceEl,
|
|
8449
8098
|
floating: floatingEl
|
|
8450
8099
|
}), [referenceEl, floatingEl]);
|
|
8451
|
-
const floatingStyles =
|
|
8100
|
+
const floatingStyles = React.useMemo(() => {
|
|
8452
8101
|
const initialStyles = {
|
|
8453
8102
|
position: strategy,
|
|
8454
8103
|
left: 0,
|
|
@@ -8474,7 +8123,7 @@ function useFloating(options) {
|
|
|
8474
8123
|
data.x,
|
|
8475
8124
|
data.y
|
|
8476
8125
|
]);
|
|
8477
|
-
return
|
|
8126
|
+
return React.useMemo(() => ({
|
|
8478
8127
|
...data,
|
|
8479
8128
|
update,
|
|
8480
8129
|
refs,
|
|
@@ -8599,7 +8248,7 @@ const { Provider: TooltipContextProvider, useStore: useTooltipContext } = create
|
|
|
8599
8248
|
* @prop asChild - Whether to render the children as the trigger element.
|
|
8600
8249
|
*/
|
|
8601
8250
|
function TooltipTrigger({ as, asChild = false, children, onMouseEnter, onMouseLeave, onFocus, onBlur, onTouchStart, ...props }) {
|
|
8602
|
-
const TooltipTriggerElement = as ||
|
|
8251
|
+
const TooltipTriggerElement = as || Button$1;
|
|
8603
8252
|
const [tooltipContext] = useTooltipContext((store) => store);
|
|
8604
8253
|
const { isOpen, openTooltip, closeTooltip, refs } = tooltipContext || {};
|
|
8605
8254
|
const handleMouseEnter = (e) => {
|
|
@@ -8632,10 +8281,11 @@ function TooltipTrigger({ as, asChild = false, children, onMouseEnter, onMouseLe
|
|
|
8632
8281
|
onTouchStart: handleTouchStart,
|
|
8633
8282
|
"aria-describedby": isOpen ? "tooltip" : void 0
|
|
8634
8283
|
};
|
|
8635
|
-
if (asChild &&
|
|
8636
|
-
return
|
|
8637
|
-
|
|
8638
|
-
|
|
8284
|
+
if (asChild && isValidElement(children)) return cloneElement(children, triggerProps);
|
|
8285
|
+
return /* @__PURE__ */ jsx(TooltipTriggerElement, {
|
|
8286
|
+
...triggerProps,
|
|
8287
|
+
children
|
|
8288
|
+
});
|
|
8639
8289
|
}
|
|
8640
8290
|
/**
|
|
8641
8291
|
* ## Tooltip Panel
|
|
@@ -8646,7 +8296,7 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
|
|
|
8646
8296
|
const TooltipPanelElement = as || "div";
|
|
8647
8297
|
const [tooltipContext] = useTooltipContext((store) => store);
|
|
8648
8298
|
const { isOpen, refs, floatingStyles, isPositioned, placement, middlewareData, arrowRef, arrow: contextArrow, arrowClassName: contextArrowClassName, openTooltip, closeTooltip } = tooltipContext || {};
|
|
8649
|
-
if (!isOpen) return
|
|
8299
|
+
if (!isOpen) return /* @__PURE__ */ jsx(Fragment, {});
|
|
8650
8300
|
const reversedAnchor = {
|
|
8651
8301
|
top: "bottom",
|
|
8652
8302
|
right: "left",
|
|
@@ -8706,33 +8356,44 @@ function TooltipPanel({ as, children, className, style, onMouseEnter, onMouseLea
|
|
|
8706
8356
|
openTooltip?.();
|
|
8707
8357
|
onTouchStart?.(e);
|
|
8708
8358
|
};
|
|
8709
|
-
return
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
if (
|
|
8713
|
-
|
|
8714
|
-
if (
|
|
8359
|
+
return /* @__PURE__ */ jsxs(TooltipPanelElement, {
|
|
8360
|
+
...props,
|
|
8361
|
+
ref: (node) => {
|
|
8362
|
+
if (node && typeof node.querySelector === "function") {
|
|
8363
|
+
refs?.setFloating(node);
|
|
8364
|
+
if (contextArrow) {
|
|
8365
|
+
const arrowElement = node.querySelector("[data-tooltip-arrow]");
|
|
8366
|
+
if (arrowElement && arrowRef) arrowRef.current = arrowElement;
|
|
8367
|
+
}
|
|
8715
8368
|
}
|
|
8716
|
-
}
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8369
|
+
},
|
|
8370
|
+
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),
|
|
8371
|
+
style: {
|
|
8372
|
+
...style,
|
|
8373
|
+
...floatingStyles,
|
|
8374
|
+
transformOrigin: reversedAnchor,
|
|
8375
|
+
pointerEvents: "none"
|
|
8376
|
+
},
|
|
8377
|
+
onMouseEnter: handleMouseEnter,
|
|
8378
|
+
onMouseLeave: handleMouseLeave,
|
|
8379
|
+
onTouchStart: handleTouchStart,
|
|
8380
|
+
role: "tooltip",
|
|
8381
|
+
...isPositioned ? { "data-ready": true } : {},
|
|
8382
|
+
children: [children, contextArrow && /* @__PURE__ */ jsx(ArrowSvg, {
|
|
8383
|
+
className: twMerge("absolute", arrowLocationClasses, contextArrowClassName),
|
|
8384
|
+
style: arrowStyles,
|
|
8385
|
+
"data-tooltip-arrow": true
|
|
8386
|
+
})]
|
|
8387
|
+
});
|
|
8727
8388
|
}
|
|
8728
8389
|
function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, children, delay = 500, offset: offset$3 = 8, onClose, onOpen, portal }) {
|
|
8729
|
-
const [isOpen, setIsOpen] =
|
|
8730
|
-
const [bodyElement, setBodyElement] =
|
|
8731
|
-
const onReady =
|
|
8390
|
+
const [isOpen, setIsOpen] = useState(false), timeoutRef = useRef(void 0), arrowRef = useRef(null);
|
|
8391
|
+
const [bodyElement, setBodyElement] = useState(() => typeof window !== "undefined" ? document.body : null);
|
|
8392
|
+
const onReady = useEffectEvent(() => {
|
|
8732
8393
|
const documentBody = document.body;
|
|
8733
8394
|
setBodyElement(documentBody);
|
|
8734
8395
|
});
|
|
8735
|
-
|
|
8396
|
+
useEffect(() => {
|
|
8736
8397
|
if (typeof window !== "undefined" && !bodyElement) onReady();
|
|
8737
8398
|
}, [bodyElement, portal]);
|
|
8738
8399
|
const { refs, floatingStyles, isPositioned, placement, middlewareData } = useFloating({
|
|
@@ -8768,13 +8429,13 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8768
8429
|
setIsOpen(false);
|
|
8769
8430
|
onClose?.();
|
|
8770
8431
|
};
|
|
8771
|
-
|
|
8432
|
+
useEffect(() => {
|
|
8772
8433
|
return () => {
|
|
8773
8434
|
clearTimeout(timeoutRef.current);
|
|
8774
8435
|
};
|
|
8775
8436
|
}, []);
|
|
8776
8437
|
const [, setTooltipContext] = useTooltipContext(() => void 0, defaultTooltipContext);
|
|
8777
|
-
|
|
8438
|
+
useEffect(() => {
|
|
8778
8439
|
setTooltipContext?.((previous) => {
|
|
8779
8440
|
const nextArrow = arrow$4 || false, nextArrowClassName = arrowClassName || "";
|
|
8780
8441
|
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;
|
|
@@ -8810,9 +8471,7 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8810
8471
|
openTooltip,
|
|
8811
8472
|
closeTooltip
|
|
8812
8473
|
}) : children;
|
|
8813
|
-
return
|
|
8814
|
-
{portal ? bodyElement ? (0, react_dom.createPortal)(content, bodyElement) : null : content}
|
|
8815
|
-
</>;
|
|
8474
|
+
return /* @__PURE__ */ jsx(Fragment, { children: portal ? bodyElement ? createPortal(content, bodyElement) : null : content });
|
|
8816
8475
|
}
|
|
8817
8476
|
/**
|
|
8818
8477
|
* # Tooltip
|
|
@@ -8830,297 +8489,29 @@ function TooltipDisplay({ anchor = "top", arrow: arrow$4, arrowClassName, childr
|
|
|
8830
8489
|
* @prop portal - Whether to use a portal for the tooltip.
|
|
8831
8490
|
*/
|
|
8832
8491
|
function Tooltip(props) {
|
|
8833
|
-
return
|
|
8834
|
-
<TooltipDisplay {...props} />
|
|
8835
|
-
</TooltipContextProvider>;
|
|
8492
|
+
return /* @__PURE__ */ jsx(TooltipContextProvider, { children: /* @__PURE__ */ jsx(TooltipDisplay, { ...props }) });
|
|
8836
8493
|
}
|
|
8837
8494
|
function ArrowSvg({ className, ...props }) {
|
|
8838
|
-
return
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
* ```
|
|
8858
|
-
*/
|
|
8859
|
-
function FacebookLogo({ className, cutout = false, targets, variant = "circle", ...props }) {
|
|
8860
|
-
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"}`}>
|
|
8861
|
-
{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" /> : <>
|
|
8862
|
-
<circle {...targets?.background} data-name="background" cx="512" cy="512" r="512" />
|
|
8863
|
-
<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" />
|
|
8864
|
-
</>)}
|
|
8865
|
-
{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" />}
|
|
8866
|
-
<defs>
|
|
8867
|
-
{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)">
|
|
8868
|
-
<stop offset="0" stopColor="rgb(0 98 224)" stopOpacity={1} />
|
|
8869
|
-
<stop offset="1" stopColor="rgb(25 175 255)" stopOpacity={1} />
|
|
8870
|
-
</linearGradient>}
|
|
8871
|
-
{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)">
|
|
8872
|
-
<stop offset="0" stopColor="rgb(0 98 224)" stopOpacity={1} />
|
|
8873
|
-
<stop offset="1" stopColor="rgb(25 175 255)" stopOpacity={1} />
|
|
8874
|
-
</linearGradient>}
|
|
8875
|
-
</defs>
|
|
8876
|
-
</svg>;
|
|
8877
|
-
}
|
|
8878
|
-
|
|
8879
|
-
//#endregion
|
|
8880
|
-
//#region src/graphics/social-media/google-logo.tsx
|
|
8881
|
-
/**
|
|
8882
|
-
* # Google Logo
|
|
8883
|
-
*
|
|
8884
|
-
* ```ts
|
|
8885
|
-
* gradient: boolean = true
|
|
8886
|
-
* ```
|
|
8887
|
-
*/
|
|
8888
|
-
function GoogleLogo({ gradient = true, ...props }) {
|
|
8889
|
-
return <svg {...props} viewBox="0 0 1003 1024">
|
|
8890
|
-
{gradient ? <>
|
|
8891
|
-
<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)" />
|
|
8892
|
-
<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)" />
|
|
8893
|
-
<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)" />
|
|
8894
|
-
<defs>
|
|
8895
|
-
<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)">
|
|
8896
|
-
<stop offset="0" stopColor="rgb(48,134,255)" stopOpacity={1} />
|
|
8897
|
-
<stop offset="1" stopColor="rgb(254,206,5)" stopOpacity={1} />
|
|
8898
|
-
</linearGradient>
|
|
8899
|
-
<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)">
|
|
8900
|
-
<stop offset="0" stopColor="rgb(15,188,92)" stopOpacity={1} />
|
|
8901
|
-
<stop offset="0.38" stopColor="rgb(15,188,92)" stopOpacity={1} />
|
|
8902
|
-
<stop offset="0.71" stopColor="rgb(15,188,92)" stopOpacity={.28} />
|
|
8903
|
-
<stop offset="1" stopColor="rgb(15,188,92)" stopOpacity={0} />
|
|
8904
|
-
</radialGradient>
|
|
8905
|
-
<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)">
|
|
8906
|
-
<stop offset="0" stopColor="rgb(251,78,90)" stopOpacity={1} />
|
|
8907
|
-
<stop offset="0.39" stopColor="rgb(255,71,63)" stopOpacity={1} />
|
|
8908
|
-
<stop offset="1" stopColor="rgb(251,78,90)" stopOpacity={0} />
|
|
8909
|
-
</linearGradient>
|
|
8910
|
-
</defs>
|
|
8911
|
-
</> : <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" />}
|
|
8912
|
-
</svg>;
|
|
8913
|
-
}
|
|
8914
|
-
|
|
8915
|
-
//#endregion
|
|
8916
|
-
//#region src/graphics/social-media/instagram-logo.tsx
|
|
8917
|
-
/**
|
|
8918
|
-
* # Instagram Logo
|
|
8919
|
-
*
|
|
8920
|
-
* ```ts
|
|
8921
|
-
* gradient: boolean = true
|
|
8922
|
-
* ```
|
|
8923
|
-
*/
|
|
8924
|
-
function InstagramLogo({ gradient = true, ...props }) {
|
|
8925
|
-
return <svg {...props} viewBox="0 0 1024 1024">
|
|
8926
|
-
{gradient ? <>
|
|
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-1)" />
|
|
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-2)" />
|
|
8929
|
-
<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)" />
|
|
8930
|
-
<defs>
|
|
8931
|
-
<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)">
|
|
8932
|
-
<stop offset="0" stopColor="rgb(255 213 1)" stopOpacity={1} />
|
|
8933
|
-
<stop offset="0.32" stopColor="rgb(255 189 7)" stopOpacity={1} />
|
|
8934
|
-
<stop offset="0.59" stopColor="rgb(255 103 29)" stopOpacity={1} />
|
|
8935
|
-
<stop offset="1" stopColor="rgb(255 0 185)" stopOpacity={1} />
|
|
8936
|
-
</radialGradient>
|
|
8937
|
-
<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)">
|
|
8938
|
-
<stop offset="0" stopColor="rgb(109 25 255)" stopOpacity={1} />
|
|
8939
|
-
<stop offset="0.43" stopColor="rgb(151 18 235)" stopOpacity={1} />
|
|
8940
|
-
<stop offset="0.96" stopColor="rgb(250 1 187)" stopOpacity={1} />
|
|
8941
|
-
<stop offset="1" stopColor="rgb(255 0 185)" stopOpacity={0} />
|
|
8942
|
-
</radialGradient>
|
|
8943
|
-
<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)">
|
|
8944
|
-
<stop offset="0" stopColor="rgb(254 21 138)" stopOpacity={1} />
|
|
8945
|
-
<stop offset="0.46" stopColor="rgb(255 2 62)" stopOpacity={1} />
|
|
8946
|
-
<stop offset="1" stopColor="rgb(255 0 55)" stopOpacity={0} />
|
|
8947
|
-
</radialGradient>
|
|
8948
|
-
</defs>
|
|
8949
|
-
</> : <>
|
|
8950
|
-
<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" />
|
|
8951
|
-
<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" />
|
|
8952
|
-
<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" />
|
|
8953
|
-
</>}
|
|
8954
|
-
</svg>;
|
|
8955
|
-
}
|
|
8956
|
-
|
|
8957
|
-
//#endregion
|
|
8958
|
-
//#region src/graphics/social-media/linkedin-logo.tsx
|
|
8959
|
-
/**
|
|
8960
|
-
* # LinkedIn Logo
|
|
8961
|
-
*
|
|
8962
|
-
* ```ts
|
|
8963
|
-
* cutout: boolean
|
|
8964
|
-
* targets: {
|
|
8965
|
-
* in: [data-name="in"]
|
|
8966
|
-
* background: [data-name="background"]
|
|
8967
|
-
* }
|
|
8968
|
-
* ```
|
|
8969
|
-
*/
|
|
8970
|
-
function LinkedInLogo({ className, cutout, targets, ...props }) {
|
|
8971
|
-
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">
|
|
8972
|
-
{!cutout && <rect {...targets?.in} data-name="in" x="112" y="112" width="800" height="800" />}
|
|
8973
|
-
<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" />
|
|
8974
|
-
</svg>;
|
|
8975
|
-
}
|
|
8976
|
-
|
|
8977
|
-
//#endregion
|
|
8978
|
-
//#region src/graphics/social-media/tiktok-logo.tsx
|
|
8979
|
-
/**
|
|
8980
|
-
* # TikTok Logo
|
|
8981
|
-
*
|
|
8982
|
-
* ```ts
|
|
8983
|
-
* variant: 'multicolor' | 'solid' = 'multicolor'
|
|
8984
|
-
* targets: {
|
|
8985
|
-
* bottom: [data-name="bottom"]
|
|
8986
|
-
* middle: [data-name="middle"]
|
|
8987
|
-
* top: [data-name="top"]
|
|
8988
|
-
* }
|
|
8989
|
-
* ```
|
|
8990
|
-
*/
|
|
8991
|
-
function TikTokLogo({ className, targets, variant = "multicolor", ...props }) {
|
|
8992
|
-
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`}>
|
|
8993
|
-
{variant === "multicolor" && <>
|
|
8994
|
-
<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" />
|
|
8995
|
-
<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" />
|
|
8996
|
-
<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" />
|
|
8997
|
-
</>}
|
|
8998
|
-
{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" />}
|
|
8999
|
-
</svg>;
|
|
9000
|
-
}
|
|
9001
|
-
|
|
9002
|
-
//#endregion
|
|
9003
|
-
//#region src/graphics/social-media/x-logo.tsx
|
|
9004
|
-
/**
|
|
9005
|
-
* # 𝕏 Logo
|
|
9006
|
-
*/
|
|
9007
|
-
function XLogo(props) {
|
|
9008
|
-
return <svg {...props} viewBox="0 0 1024 926">
|
|
9009
|
-
<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" />
|
|
9010
|
-
</svg>;
|
|
9011
|
-
}
|
|
9012
|
-
|
|
9013
|
-
//#endregion
|
|
9014
|
-
//#region src/graphics/social-media/youtube-logo.tsx
|
|
9015
|
-
/**
|
|
9016
|
-
* # YouTube Logo
|
|
9017
|
-
*
|
|
9018
|
-
* ```ts
|
|
9019
|
-
* cutout: boolean = false
|
|
9020
|
-
* targets: {
|
|
9021
|
-
* background: [data-name="background"],
|
|
9022
|
-
* play: [data-name="play"]
|
|
9023
|
-
* }
|
|
9024
|
-
* ```
|
|
9025
|
-
*/
|
|
9026
|
-
function YouTubeLogo({ className, cutout = false, targets, ...props }) {
|
|
9027
|
-
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">
|
|
9028
|
-
{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" /> : <>
|
|
9029
|
-
<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" />
|
|
9030
|
-
<path {...targets && "play" in targets ? targets?.play : {}} data-name="play" d="M409.692,512.249L675.008,358.574L409.692,204.899L409.692,512.249Z" />
|
|
9031
|
-
</>}
|
|
9032
|
-
</svg>;
|
|
8495
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8496
|
+
viewBox: "0 0 20 10",
|
|
8497
|
+
className: twMerge("h-2.5 w-5 fill-none", className),
|
|
8498
|
+
...props,
|
|
8499
|
+
children: [
|
|
8500
|
+
/* @__PURE__ */ jsx("path", {
|
|
8501
|
+
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",
|
|
8502
|
+
className: "fill-neutral-50 dark:fill-neutral-800"
|
|
8503
|
+
}),
|
|
8504
|
+
/* @__PURE__ */ jsx("path", {
|
|
8505
|
+
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",
|
|
8506
|
+
className: "fill-neutral-400 dark:fill-none"
|
|
8507
|
+
}),
|
|
8508
|
+
/* @__PURE__ */ jsx("path", {
|
|
8509
|
+
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",
|
|
8510
|
+
className: "dark:fill-neutral-600"
|
|
8511
|
+
})
|
|
8512
|
+
]
|
|
8513
|
+
});
|
|
9033
8514
|
}
|
|
9034
8515
|
|
|
9035
8516
|
//#endregion
|
|
9036
|
-
|
|
9037
|
-
exports.Button = Button;
|
|
9038
|
-
exports.Checkbox = Checkbox;
|
|
9039
|
-
exports.Details = Details;
|
|
9040
|
-
exports.DetailsBody = DetailsBody;
|
|
9041
|
-
exports.DetailsSummary = DetailsSummary;
|
|
9042
|
-
exports.DropDown = DropDown;
|
|
9043
|
-
exports.DropDownButton = DropDownButton;
|
|
9044
|
-
exports.DropDownItem = DropDownItem;
|
|
9045
|
-
exports.DropDownItems = DropDownItems;
|
|
9046
|
-
exports.DropDownSection = DropDownSection;
|
|
9047
|
-
exports.DropDownSeparator = DropDownSeparator;
|
|
9048
|
-
exports.FacebookLogo = FacebookLogo;
|
|
9049
|
-
exports.Fieldset = Fieldset;
|
|
9050
|
-
exports.Form = Form;
|
|
9051
|
-
exports.FormStatusProvider = FormStatusProvider;
|
|
9052
|
-
exports.Ghost = Ghost;
|
|
9053
|
-
exports.GoogleLogo = GoogleLogo;
|
|
9054
|
-
exports.Heading = Heading;
|
|
9055
|
-
exports.HumanVerification = HumanVerification;
|
|
9056
|
-
exports.IFrame = IFrame;
|
|
9057
|
-
exports.Input = Input;
|
|
9058
|
-
exports.InstagramLogo = InstagramLogo;
|
|
9059
|
-
exports.Link = Link;
|
|
9060
|
-
exports.LinkedInLogo = LinkedInLogo;
|
|
9061
|
-
exports.Modal = Modal;
|
|
9062
|
-
exports.ModalClose = ModalClose;
|
|
9063
|
-
exports.ModalDialog = ModalDialog;
|
|
9064
|
-
exports.ModalTitle = ModalTitle;
|
|
9065
|
-
exports.ModalTrigger = ModalTrigger;
|
|
9066
|
-
exports.Select = Select;
|
|
9067
|
-
exports.SelectOption = SelectOption;
|
|
9068
|
-
exports.SelectSectionTitle = SelectSectionTitle;
|
|
9069
|
-
exports.SubmitButton = SubmitButton;
|
|
9070
|
-
exports.Textarea = Textarea;
|
|
9071
|
-
exports.TikTokLogo = TikTokLogo;
|
|
9072
|
-
exports.Time = Time;
|
|
9073
|
-
exports.Tooltip = Tooltip;
|
|
9074
|
-
exports.TooltipPanel = TooltipPanel;
|
|
9075
|
-
exports.TooltipTrigger = TooltipTrigger;
|
|
9076
|
-
exports.XLogo = XLogo;
|
|
9077
|
-
exports.YouTubeLogo = YouTubeLogo;
|
|
9078
|
-
exports.addClass = addClass;
|
|
9079
|
-
exports.createButton = createButton;
|
|
9080
|
-
exports.createFastContext = createFastContext;
|
|
9081
|
-
exports.createLink = createLink;
|
|
9082
|
-
exports.currentMonthName = currentMonthName;
|
|
9083
|
-
exports.currentWeekdayName = currentWeekdayName;
|
|
9084
|
-
exports.daysInMonth = daysInMonth;
|
|
9085
|
-
exports.easeOutExpo = easeOutExpo;
|
|
9086
|
-
exports.emailRegex = emailRegex;
|
|
9087
|
-
exports.extendMadoTailwindMerge = extendMadoTailwindMerge;
|
|
9088
|
-
exports.firstOfMonth = firstOfMonth;
|
|
9089
|
-
exports.formatPhoneNumber = formatPhoneNumber;
|
|
9090
|
-
exports.generateHumanValidationToken = generateHumanValidationToken;
|
|
9091
|
-
exports.getDate = getDate;
|
|
9092
|
-
exports.getHours = getHours;
|
|
9093
|
-
exports.getHoursIn12 = getHoursIn12;
|
|
9094
|
-
exports.getLinkClasses = getLinkClasses;
|
|
9095
|
-
exports.getLocalTime = getLocalTime;
|
|
9096
|
-
exports.getMeridianFromHour = getMeridianFromHour;
|
|
9097
|
-
exports.getMilliseconds = getMilliseconds;
|
|
9098
|
-
exports.getMinutes = getMinutes;
|
|
9099
|
-
exports.getMonth = getMonth;
|
|
9100
|
-
exports.getMonthIndexFromName = getMonthIndexFromName;
|
|
9101
|
-
exports.getMonthName = getMonthName;
|
|
9102
|
-
exports.getNextMonth = getNextMonth;
|
|
9103
|
-
exports.getPreviousMonth = getPreviousMonth;
|
|
9104
|
-
exports.getSeconds = getSeconds;
|
|
9105
|
-
exports.getTimezone = getTimezone;
|
|
9106
|
-
exports.getUserReadableDate = getUserReadableDate;
|
|
9107
|
-
exports.getUserReadableDateFromTimestampz = getUserReadableDateFromTimestampz;
|
|
9108
|
-
exports.getWeekdayName = getWeekdayName;
|
|
9109
|
-
exports.getYearsInRange = getYearsInRange;
|
|
9110
|
-
exports.hasClass = hasClass;
|
|
9111
|
-
exports.isEmail = isEmail;
|
|
9112
|
-
exports.isPhoneNumber = isPhoneNumber;
|
|
9113
|
-
exports.monthNamesList = monthNamesList;
|
|
9114
|
-
exports.removeClass = removeClass;
|
|
9115
|
-
exports.splitCamelCase = splitCamelCase;
|
|
9116
|
-
exports.telRegex = telRegex;
|
|
9117
|
-
exports.toCamelCase = toCamelCase;
|
|
9118
|
-
exports.toFullDateString = toFullDateString;
|
|
9119
|
-
exports.toLowerCase = toLowerCase;
|
|
9120
|
-
exports.toTitleCase = toTitleCase;
|
|
9121
|
-
exports.toggleClass = toggleClass;
|
|
9122
|
-
exports.twMerge = twMerge;
|
|
9123
|
-
exports.useFormStatus = useFormStatus;
|
|
9124
|
-
exports.usePointerMovement = usePointerMovement;
|
|
9125
|
-
exports.validateHuman = validateHuman;
|
|
9126
|
-
exports.weekdayNamesList = weekdayNamesList;
|
|
8517
|
+
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 };
|