mado-ui 0.1.2 → 0.2.1
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/css/index.css +161 -88
- package/dist/components/button.d.ts +1 -1
- package/dist/components/form/index.d.ts +2 -1
- package/dist/components/form/input/index.d.ts +4 -4
- package/dist/components/form/submit-button.d.ts +1 -1
- package/dist/components/form/textarea.d.ts +18 -0
- package/dist/components/heading.d.ts +9 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/link.d.ts +6 -11
- package/dist/components.esm.js +1329 -0
- package/dist/components.esm.js.map +1 -0
- package/dist/components.js +1343 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks.esm.js +73 -0
- package/dist/hooks.esm.js.map +1 -0
- package/dist/hooks.js +80 -0
- package/dist/hooks.js.map +1 -0
- package/dist/icons.esm.js +416 -0
- package/dist/icons.esm.js.map +1 -0
- package/dist/icons.js +520 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.esm.js +294 -592
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +293 -628
- package/dist/index.js.map +1 -1
- package/dist/types.esm.js +2 -0
- package/dist/types.esm.js.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.esm.js +751 -0
- package/dist/utils.esm.js.map +1 -0
- package/dist/utils.js +790 -0
- package/dist/utils.js.map +1 -0
- package/package.json +34 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,189 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
2
|
import { extendTailwindMerge, twJoin } from 'tailwind-merge';
|
|
3
3
|
import { Children, isValidElement, Fragment, createContext, useContext, useSyncExternalStore, useRef, Suspense, useId, useEffect, useState, cloneElement } from 'react';
|
|
4
|
-
import { Button as Button$1, Field, Label, Input as Input$1, Description, Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
|
|
4
|
+
import { Button as Button$1, Field, Label, Input as Input$1, Description, Textarea as Textarea$1, Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* ### Has Class
|
|
9
|
-
* - Returns a boolean based on whether the specified element has the specified class
|
|
10
|
-
* @param {HTMLElement} element Any HTML Element
|
|
11
|
-
* @param {string} className A string of any class to check for
|
|
12
|
-
* @returns {boolean} true if the specified element has the specified class, else false
|
|
13
|
-
*/
|
|
14
|
-
function hasClass(element, className) {
|
|
15
|
-
return element.classList.contains(className);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* ### Add Class
|
|
19
|
-
* - Adds the specified classes to the specified elements
|
|
20
|
-
* @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)
|
|
21
|
-
* @param {string|string[]} classList A string or an array of classes to add to each element
|
|
22
|
-
*/
|
|
23
|
-
function addClass(elements, classList) {
|
|
24
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === 'string', classListType = classList.constructor.name, classListIsString = typeof classList === 'string';
|
|
25
|
-
let elementList, classListGroup;
|
|
26
|
-
// & Convert elements to array
|
|
27
|
-
switch (elementsType) {
|
|
28
|
-
// Selector
|
|
29
|
-
case 'String':
|
|
30
|
-
if (elementsIsString)
|
|
31
|
-
elementList = Array.from(document.querySelectorAll(elements));
|
|
32
|
-
break;
|
|
33
|
-
// Multiple HTML Elements
|
|
34
|
-
case 'NodeList':
|
|
35
|
-
if (!elementsIsString)
|
|
36
|
-
elementList = Array.from(elements);
|
|
37
|
-
break;
|
|
38
|
-
// Array of Elements
|
|
39
|
-
case 'Array':
|
|
40
|
-
if (!elementsIsString)
|
|
41
|
-
elementList = elements;
|
|
42
|
-
break;
|
|
43
|
-
// Single HTML Element
|
|
44
|
-
default:
|
|
45
|
-
if (elementsType.startsWith('HTML') && !elementsIsString)
|
|
46
|
-
elementList = [elements];
|
|
47
|
-
}
|
|
48
|
-
// & Convert classList to array
|
|
49
|
-
switch (classListType) {
|
|
50
|
-
case 'String':
|
|
51
|
-
if (classListIsString)
|
|
52
|
-
if (classList.split(' ').length >= 2) {
|
|
53
|
-
classListGroup = classList.split(' ');
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
classListGroup = [classList];
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
case 'Array':
|
|
60
|
-
if (!classListIsString)
|
|
61
|
-
classListGroup = classList;
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
if (!elementList || elementList.length < 1)
|
|
65
|
-
throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
66
|
-
if (!classListGroup || classListGroup.length < 1)
|
|
67
|
-
throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
68
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
69
|
-
if (hasClass(element, classItem))
|
|
70
|
-
return;
|
|
71
|
-
element.classList.add(classItem);
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* ### Remove Class
|
|
76
|
-
* - Removes the specified classes from the specified elements
|
|
77
|
-
* @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)
|
|
78
|
-
* @param {string|string[]} classList A string or an array of classes to remove from each element
|
|
79
|
-
*/
|
|
80
|
-
function removeClass(elements, classList) {
|
|
81
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === 'string', classListType = classList.constructor.name, classListIsString = typeof classList === 'string';
|
|
82
|
-
let elementList, classListGroup;
|
|
83
|
-
// & Convert elements to array
|
|
84
|
-
switch (elementsType) {
|
|
85
|
-
// Selector
|
|
86
|
-
case 'String':
|
|
87
|
-
if (elementsIsString)
|
|
88
|
-
elementList = Array.from(document.querySelectorAll(elements));
|
|
89
|
-
break;
|
|
90
|
-
// Multiple HTML Elements
|
|
91
|
-
case 'NodeList':
|
|
92
|
-
if (!elementsIsString)
|
|
93
|
-
elementList = Array.from(elements);
|
|
94
|
-
break;
|
|
95
|
-
// Array of Elements
|
|
96
|
-
case 'Array':
|
|
97
|
-
if (!elementsIsString)
|
|
98
|
-
elementList = elements;
|
|
99
|
-
break;
|
|
100
|
-
// Single HTML Element
|
|
101
|
-
default:
|
|
102
|
-
if (elementsType.startsWith('HTML') && !elementsIsString)
|
|
103
|
-
elementList = [elements];
|
|
104
|
-
}
|
|
105
|
-
// & Convert classList to array
|
|
106
|
-
switch (classListType) {
|
|
107
|
-
case 'String':
|
|
108
|
-
if (classListIsString)
|
|
109
|
-
if (classList.split(' ').length >= 2) {
|
|
110
|
-
classListGroup = classList.split(' ');
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
classListGroup = [classList];
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
case 'Array':
|
|
117
|
-
if (!classListIsString)
|
|
118
|
-
classListGroup = classList;
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
if (!elementList || elementList.length < 1)
|
|
122
|
-
throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
123
|
-
if (!classListGroup || classListGroup.length < 1)
|
|
124
|
-
throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
125
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
126
|
-
if (!hasClass(element, classItem))
|
|
127
|
-
return;
|
|
128
|
-
element.classList.remove(classItem);
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* ### Toggle Class
|
|
133
|
-
* - Toggles the specified classes on the specified elements
|
|
134
|
-
* @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)
|
|
135
|
-
* @param {string|string[]} classList A string or an array of classes to toggle on each element
|
|
136
|
-
*/
|
|
137
|
-
function toggleClass(elements, classList) {
|
|
138
|
-
const elementsType = elements.constructor.name, elementsIsString = typeof elements === 'string', classListType = classList.constructor.name, classListIsString = typeof classList === 'string';
|
|
139
|
-
let elementList, classListGroup;
|
|
140
|
-
// & Convert elements to array
|
|
141
|
-
switch (elementsType) {
|
|
142
|
-
// Selector
|
|
143
|
-
case 'String':
|
|
144
|
-
if (elementsIsString)
|
|
145
|
-
elementList = Array.from(document.querySelectorAll(elements));
|
|
146
|
-
break;
|
|
147
|
-
// Multiple HTML Elements
|
|
148
|
-
case 'NodeList':
|
|
149
|
-
if (!elementsIsString)
|
|
150
|
-
elementList = Array.from(elements);
|
|
151
|
-
break;
|
|
152
|
-
// Array of Elements
|
|
153
|
-
case 'Array':
|
|
154
|
-
if (!elementsIsString)
|
|
155
|
-
elementList = elements;
|
|
156
|
-
break;
|
|
157
|
-
// Single HTML Element
|
|
158
|
-
default:
|
|
159
|
-
if (elementsType.startsWith('HTML') && !elementsIsString)
|
|
160
|
-
elementList = [elements];
|
|
161
|
-
}
|
|
162
|
-
// & Convert classList to array
|
|
163
|
-
switch (classListType) {
|
|
164
|
-
case 'String':
|
|
165
|
-
if (classListIsString)
|
|
166
|
-
if (classList.split(' ').length >= 2) {
|
|
167
|
-
classListGroup = classList.split(' ');
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
classListGroup = [classList];
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
|
-
case 'Array':
|
|
174
|
-
if (!classListIsString)
|
|
175
|
-
classListGroup = classList;
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
if (!elementList || elementList.length < 1)
|
|
179
|
-
throw new Error(`Elements are invalid or undefined. elements: ${elements} → elementList: ${elementList}`);
|
|
180
|
-
if (!classListGroup || classListGroup.length < 1)
|
|
181
|
-
throw new Error(`Class List is invalid or undefined. classList: ${classList} → classListGroup: ${classListGroup}`);
|
|
182
|
-
elementList.forEach((element) => classListGroup.forEach((classItem) => {
|
|
183
|
-
element.classList.toggle(classItem);
|
|
184
|
-
}));
|
|
185
|
-
}
|
|
186
|
-
|
|
187
7
|
const integerList = Array.from({ length: 100 }, (_, i) => `${i + 1}`);
|
|
188
8
|
const twMerge = extendTailwindMerge({
|
|
189
9
|
extend: {
|
|
@@ -260,105 +80,13 @@ const twMerge = extendTailwindMerge({
|
|
|
260
80
|
},
|
|
261
81
|
},
|
|
262
82
|
});
|
|
263
|
-
function extendMadoTailwindMerge(configExtension) {
|
|
264
|
-
const extend = configExtension.extend || {};
|
|
265
|
-
const theme = extend.theme || {};
|
|
266
|
-
const color = 'color' in theme ? theme.color : [];
|
|
267
|
-
const classGroups = extend.classGroups || {};
|
|
268
|
-
const themeRest = { ...theme };
|
|
269
|
-
if ('color' in themeRest)
|
|
270
|
-
delete themeRest.color;
|
|
271
|
-
const extendRest = { ...extend };
|
|
272
|
-
delete extendRest.theme;
|
|
273
|
-
delete extendRest.classGroups;
|
|
274
|
-
return extendTailwindMerge({
|
|
275
|
-
extend: {
|
|
276
|
-
theme: {
|
|
277
|
-
color: [
|
|
278
|
-
{
|
|
279
|
-
ui: [
|
|
280
|
-
'red',
|
|
281
|
-
'orange',
|
|
282
|
-
'yellow',
|
|
283
|
-
'green',
|
|
284
|
-
'sky-blue',
|
|
285
|
-
'blue',
|
|
286
|
-
'violet',
|
|
287
|
-
'magenta',
|
|
288
|
-
'purple',
|
|
289
|
-
'brown',
|
|
290
|
-
'grey',
|
|
291
|
-
'pink',
|
|
292
|
-
],
|
|
293
|
-
},
|
|
294
|
-
...color,
|
|
295
|
-
],
|
|
296
|
-
...themeRest,
|
|
297
|
-
},
|
|
298
|
-
classGroups: {
|
|
299
|
-
animate: [
|
|
300
|
-
{
|
|
301
|
-
animate: [
|
|
302
|
-
'bounce',
|
|
303
|
-
'double-spin',
|
|
304
|
-
'drop-in',
|
|
305
|
-
'flip',
|
|
306
|
-
'flip-again',
|
|
307
|
-
'grid-rows',
|
|
308
|
-
'heartbeat',
|
|
309
|
-
'ping',
|
|
310
|
-
'pulse',
|
|
311
|
-
'slide-up',
|
|
312
|
-
'spin',
|
|
313
|
-
'wave',
|
|
314
|
-
],
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
'animation-direction': [
|
|
318
|
-
{
|
|
319
|
-
'animation-direction': ['normal', 'reverse', 'alternate', 'alternate-reverse'],
|
|
320
|
-
},
|
|
321
|
-
],
|
|
322
|
-
'animation-fill': [
|
|
323
|
-
{
|
|
324
|
-
'animation-fill': ['none', 'forwards', 'backwards', 'both'],
|
|
325
|
-
},
|
|
326
|
-
],
|
|
327
|
-
'animation-iteration': [
|
|
328
|
-
{
|
|
329
|
-
'animation-iteration': [...integerList, 'infinite'],
|
|
330
|
-
},
|
|
331
|
-
],
|
|
332
|
-
'animation-state': [
|
|
333
|
-
{
|
|
334
|
-
'animation-state': ['running', 'paused'],
|
|
335
|
-
},
|
|
336
|
-
],
|
|
337
|
-
'grid-cols': [
|
|
338
|
-
{
|
|
339
|
-
'grid-cols': ['0fr', '1fr'],
|
|
340
|
-
},
|
|
341
|
-
],
|
|
342
|
-
'grid-rows': [
|
|
343
|
-
{
|
|
344
|
-
'grid-rows': ['0fr', '1fr'],
|
|
345
|
-
},
|
|
346
|
-
],
|
|
347
|
-
transition: ['transition-rows'],
|
|
348
|
-
...classGroups,
|
|
349
|
-
},
|
|
350
|
-
...extendRest,
|
|
351
|
-
},
|
|
352
|
-
...configExtension,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
83
|
|
|
356
84
|
/** The current date as a Date object */
|
|
357
85
|
const d = new Date();
|
|
358
86
|
/** The current minute of the current hour */
|
|
359
87
|
const minutes = d.getMinutes();
|
|
360
88
|
/** The current year */
|
|
361
|
-
|
|
89
|
+
d.getFullYear();
|
|
362
90
|
/** An array of the names of month in order */
|
|
363
91
|
const monthNamesList = [
|
|
364
92
|
'January',
|
|
@@ -385,29 +113,9 @@ const weekdayNamesList = [
|
|
|
385
113
|
'Saturday',
|
|
386
114
|
];
|
|
387
115
|
/** The name of the current month */
|
|
388
|
-
|
|
116
|
+
getMonthName();
|
|
389
117
|
/** The name of the current day of the week */
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* ### Days In Month
|
|
393
|
-
* - Returns the number of days in the specified month.
|
|
394
|
-
* @param {Date} date A Date object representing the month to get the number of days for. (Preset to the current date)
|
|
395
|
-
* @returns {number} The number of days in the specified month.
|
|
396
|
-
*/
|
|
397
|
-
function daysInMonth(date = d) {
|
|
398
|
-
const selectedYear = date.getFullYear(), selectedMonth = date.getMonth() + 1;
|
|
399
|
-
return new Date(selectedYear, selectedMonth, 0).getDate();
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* ### First of Month
|
|
403
|
-
* - Returns the first day of the specified month.
|
|
404
|
-
* @param {Date} date A Date object representing the month to get the first day for. (Preset to current date)
|
|
405
|
-
* @returns {Date} A Date object of the given month, with the first day.
|
|
406
|
-
*/
|
|
407
|
-
function firstOfMonth(date = d) {
|
|
408
|
-
// Return a new Date object with the first of the month selected
|
|
409
|
-
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
410
|
-
}
|
|
118
|
+
getWeekdayName();
|
|
411
119
|
/**
|
|
412
120
|
* ### Get Date
|
|
413
121
|
* - Returns the date with two digits
|
|
@@ -436,32 +144,6 @@ function getHours(hours = d) {
|
|
|
436
144
|
formattedHours = `0${formattedHours}`;
|
|
437
145
|
return formattedHours;
|
|
438
146
|
}
|
|
439
|
-
/**
|
|
440
|
-
* ### Get Hours in 12
|
|
441
|
-
* - Returns the hour based on the specified 24 hour value in a 12 hour format
|
|
442
|
-
* @param {number|Date} hour The hour to be converted to 12 hour format
|
|
443
|
-
* @returns {number} The hour in a 12 hour format
|
|
444
|
-
*/
|
|
445
|
-
function getHoursIn12(hour = d) {
|
|
446
|
-
if (typeof hour !== 'number')
|
|
447
|
-
hour = hour.getHours();
|
|
448
|
-
if (hour > 12)
|
|
449
|
-
return hour - 12;
|
|
450
|
-
return hour;
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* ### Get Meridian from Hour
|
|
454
|
-
* - Returns either 'pm' or 'am' based on the specified 24 hour value
|
|
455
|
-
* @param {number|Date} hour The hour to get the meridian from
|
|
456
|
-
* @returns {'am'|'pm'} The meridian for the given hour
|
|
457
|
-
*/
|
|
458
|
-
function getMeridianFromHour(hour = d) {
|
|
459
|
-
if (typeof hour !== 'number')
|
|
460
|
-
hour = hour.getHours();
|
|
461
|
-
if (hour >= 12)
|
|
462
|
-
return 'pm';
|
|
463
|
-
return 'am';
|
|
464
|
-
}
|
|
465
147
|
/**
|
|
466
148
|
* ### Get Milliseconds
|
|
467
149
|
* - Returns the milliseconds with two digits
|
|
@@ -504,9 +186,6 @@ function getMonth(month = d) {
|
|
|
504
186
|
formattedMonth = `0${formattedMonth}`;
|
|
505
187
|
return formattedMonth;
|
|
506
188
|
}
|
|
507
|
-
function getMonthIndexFromName(name) {
|
|
508
|
-
return monthNamesList.findIndex(monthName => monthName === name);
|
|
509
|
-
}
|
|
510
189
|
/**
|
|
511
190
|
* ### Get Month Name
|
|
512
191
|
* - Returns the name of the specified month
|
|
@@ -518,28 +197,6 @@ function getMonthName(date = d) {
|
|
|
518
197
|
return monthNamesList[date];
|
|
519
198
|
return monthNamesList[date.getMonth()];
|
|
520
199
|
}
|
|
521
|
-
/**
|
|
522
|
-
* ### Get Next Month
|
|
523
|
-
* - Returns the number of the following month from the specified month
|
|
524
|
-
* @param {Date} date The Date object representing the month to get the following month from (Preset to current date)
|
|
525
|
-
* @returns {number} The indexed month of the following month
|
|
526
|
-
*/
|
|
527
|
-
function getNextMonth(date = d) {
|
|
528
|
-
const givenMonth = date.getMonth(); // Get the month from date
|
|
529
|
-
// Return the indexed month. min 0, max 11
|
|
530
|
-
return givenMonth === 11 ? 0 : givenMonth + 1;
|
|
531
|
-
}
|
|
532
|
-
/**
|
|
533
|
-
* ### Get Previous Month
|
|
534
|
-
* - Returns the number of the previous month from the specified month
|
|
535
|
-
* @param {Date} date The Date object representing the month to get the previous month from (Preset to current date)
|
|
536
|
-
* @returns {number} The indexed month of the previous month
|
|
537
|
-
*/
|
|
538
|
-
function getPreviousMonth(date = d) {
|
|
539
|
-
const givenMonth = date.getMonth(); // Get the month from date
|
|
540
|
-
// Return the indexed month. min 0, max 11
|
|
541
|
-
return givenMonth === 0 ? 11 : givenMonth - 1;
|
|
542
|
-
}
|
|
543
200
|
/**
|
|
544
201
|
* ### Get Seconds
|
|
545
202
|
* - Returns the seconds with two digits
|
|
@@ -554,31 +211,6 @@ function getSeconds(seconds = d) {
|
|
|
554
211
|
formattedSeconds = `0${formattedSeconds}`;
|
|
555
212
|
return formattedSeconds;
|
|
556
213
|
}
|
|
557
|
-
/**
|
|
558
|
-
* ### Get User Readable Date
|
|
559
|
-
* - Returns a string of the current date in a user-friendly way
|
|
560
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
561
|
-
* @param date (default: `new Date()`)
|
|
562
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
563
|
-
*/
|
|
564
|
-
function getUserReadableDate(date = d) {
|
|
565
|
-
const dateTime = date.getTime();
|
|
566
|
-
const today = new Date(), isToday = dateTime === today.getTime();
|
|
567
|
-
if (isToday)
|
|
568
|
-
return 'Today';
|
|
569
|
-
const yesterday = new Date(today.getDate() - 1), isYesterday = dateTime === yesterday.getTime();
|
|
570
|
-
if (isYesterday)
|
|
571
|
-
return 'Yesterday';
|
|
572
|
-
const tomorrow = new Date(today.getDate() + 1), isTomorrow = dateTime === tomorrow.getTime();
|
|
573
|
-
if (isTomorrow)
|
|
574
|
-
return 'Tomorrow';
|
|
575
|
-
const thisYear = today.getFullYear(), isSameYear = date.getFullYear() === thisYear;
|
|
576
|
-
const fullDateString = toFullDateString(date, {
|
|
577
|
-
weekday: 'code',
|
|
578
|
-
year: !isSameYear,
|
|
579
|
-
});
|
|
580
|
-
return fullDateString;
|
|
581
|
-
}
|
|
582
214
|
/**
|
|
583
215
|
* ### Get Weekday Name
|
|
584
216
|
* - Returns the weekday name of the specified day
|
|
@@ -591,80 +223,6 @@ function getWeekdayName(weekday = d) {
|
|
|
591
223
|
// Return the name of the day of the week
|
|
592
224
|
return weekdayNamesList[weekday.getDay()];
|
|
593
225
|
}
|
|
594
|
-
/**
|
|
595
|
-
* ### Get Years in Range
|
|
596
|
-
* - Returns an array of years in between the specified minimum and maximum years
|
|
597
|
-
* @param {number} minYear The minimum year
|
|
598
|
-
* @param {number} maxYear The maximum year
|
|
599
|
-
* @returns {number[]} Array of years
|
|
600
|
-
*/
|
|
601
|
-
function getYearsInRange(minYear = 0, maxYear = year) {
|
|
602
|
-
const yearList = [];
|
|
603
|
-
for (let selectedYear = minYear; selectedYear <= maxYear; selectedYear++) {
|
|
604
|
-
yearList.push(selectedYear);
|
|
605
|
-
}
|
|
606
|
-
return yearList;
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* ### To Full Date String
|
|
610
|
-
* - Returns a formatted string to display the date
|
|
611
|
-
* @param {Date} date (default: `new Date()`)
|
|
612
|
-
* @param {ToFullDateStringOptionsProps} options Change how to display the weekday, month name, day of the month, and year.
|
|
613
|
-
* @returns {string} '`weekday`, `month` `day`, `year`'
|
|
614
|
-
*/
|
|
615
|
-
function toFullDateString(date = d, options) {
|
|
616
|
-
let weekdayName = getWeekdayName(date), monthName = getMonthName(date), dayOfMonth = date.getDate(), year = date.getFullYear().toString();
|
|
617
|
-
if (options) {
|
|
618
|
-
const includesWeekday = options.weekday !== false, includesDay = options.day !== false, includesMonth = options.month !== false, includesYear = options.year !== false;
|
|
619
|
-
if (includesWeekday) {
|
|
620
|
-
if (options.weekday === 'code')
|
|
621
|
-
weekdayName = weekdayName.slice(0, 3);
|
|
622
|
-
if (includesMonth || includesDay || includesYear)
|
|
623
|
-
weekdayName += ', ';
|
|
624
|
-
}
|
|
625
|
-
else {
|
|
626
|
-
weekdayName = '';
|
|
627
|
-
}
|
|
628
|
-
if (includesMonth) {
|
|
629
|
-
if (options.month === 'code')
|
|
630
|
-
monthName = monthName.slice(0, 3);
|
|
631
|
-
if (includesDay)
|
|
632
|
-
monthName += ' ';
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
monthName = '';
|
|
636
|
-
}
|
|
637
|
-
if (!includesDay)
|
|
638
|
-
dayOfMonth = '';
|
|
639
|
-
if (includesYear) {
|
|
640
|
-
if (options.year === 'code')
|
|
641
|
-
year = year.slice(-2);
|
|
642
|
-
if (includesMonth || includesDay)
|
|
643
|
-
year = ', ' + year;
|
|
644
|
-
}
|
|
645
|
-
else {
|
|
646
|
-
year = '';
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
return weekdayName + monthName + dayOfMonth + year;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* ### Get User Readable Date From Timestampz
|
|
653
|
-
* - Returns a string of the current date in a user-friendly way
|
|
654
|
-
* - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
|
|
655
|
-
* @param string
|
|
656
|
-
* @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
|
|
657
|
-
*/
|
|
658
|
-
function getUserReadableDateFromTimestampz(timestampz) {
|
|
659
|
-
const [date, time] = timestampz.split('T') || [];
|
|
660
|
-
const [year, month, day] = date?.split('-').map(string => Number(string)) || [];
|
|
661
|
-
const timezoneIsAheadOfUTC = time?.includes('+');
|
|
662
|
-
const [hms, _timezone] = timezoneIsAheadOfUTC ? time?.split('+') : time?.split('-') || [];
|
|
663
|
-
const [hours, minutes, seconds] = hms?.split(':').map(string => Number(string)) || [];
|
|
664
|
-
// const [timezoneHours, timezoneMinutes] = timezone?.split(':').map(string => Number(string)) || []
|
|
665
|
-
const dateAndTime = new Date(year, month - 1, day, hours, minutes, seconds), userReadableDateAndTime = getUserReadableDate(dateAndTime);
|
|
666
|
-
return userReadableDateAndTime;
|
|
667
|
-
}
|
|
668
226
|
|
|
669
227
|
function findComponentByType(children, componentType) {
|
|
670
228
|
const childrenArray = Children.toArray(children);
|
|
@@ -717,7 +275,7 @@ function isPhoneNumber(tel) {
|
|
|
717
275
|
* @returns {string} string formatted (000) 000-0000
|
|
718
276
|
*/
|
|
719
277
|
function formatPhoneNumber(string, countryCode) {
|
|
720
|
-
return (`${
|
|
278
|
+
return (`${`+${countryCode} ` }` +
|
|
721
279
|
string
|
|
722
280
|
.replace(/\D/g, '')
|
|
723
281
|
.slice(-10)
|
|
@@ -767,15 +325,15 @@ function Anchor({ className, disabled, href, onClick, ref, target, rel, ...props
|
|
|
767
325
|
: 'prefetch' }));
|
|
768
326
|
}
|
|
769
327
|
// * Styles
|
|
770
|
-
const baseClasses = twSort('
|
|
771
|
-
const lineStaticClasses = twJoin(baseClasses, '
|
|
772
|
-
const lineClasses = twJoin(lineStaticClasses, '
|
|
328
|
+
const baseClasses = twSort('isolate inline-block cursor-pointer duration-300 ease-exponential after:absolute after:left-1/2 after:-z-10 after:-translate-x-1/2 after:duration-500 active:scale-95 active:after:opacity-100');
|
|
329
|
+
const lineStaticClasses = twJoin(baseClasses, 'whitespace-nowrap after:-bottom-0.5 after:w-[calc(100%+0.15rem)] after:rounded-full after:border-1 after:border-current');
|
|
330
|
+
const lineClasses = twJoin(lineStaticClasses, 'whitespace-nowrap transition-transform after:transition-transform after:ease-exponential');
|
|
773
331
|
const scaleXClasses = 'after:scale-x-0 pointer-fine:hover:after:scale-x-100 active:after:scale-x-100';
|
|
774
332
|
const scaleYClasses = 'after:scale-y-0 pointer-fine:hover:after:scale-y-100 active:after:scale-y-100';
|
|
775
333
|
const lineNormalClasses = twJoin([
|
|
776
334
|
lineClasses,
|
|
777
335
|
scaleYClasses,
|
|
778
|
-
'
|
|
336
|
+
'after:origin-bottom after:translate-y-0.5 active:after:translate-y-0 pointer-fine:hover:after:translate-y-0',
|
|
779
337
|
]);
|
|
780
338
|
const lineLtrClasses = twJoin([lineClasses, scaleXClasses, 'after:origin-left']);
|
|
781
339
|
const lineRtlClasses = twJoin([lineClasses, scaleXClasses, 'after:origin-right']);
|
|
@@ -783,160 +341,151 @@ const lineCenterClasses = twJoin([lineClasses, scaleXClasses]);
|
|
|
783
341
|
const lineLiftClasses = twJoin([
|
|
784
342
|
lineClasses,
|
|
785
343
|
scaleYClasses,
|
|
786
|
-
'
|
|
344
|
+
'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',
|
|
787
345
|
]);
|
|
788
|
-
const fillClasses = twJoin(baseClasses, '
|
|
346
|
+
const fillClasses = twJoin(baseClasses, 'whitespace-nowrap 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-zinc-50 pointer-fine:hover:text-zinc-50');
|
|
789
347
|
// Define theme-specific fill color transition classes
|
|
790
348
|
const getFillColorTransitionClasses = (theme = 'blue') => {
|
|
791
349
|
switch (theme) {
|
|
792
350
|
case 'brown':
|
|
793
|
-
return twJoin(fillClasses, 'after:bg-ui-brown contrast-more:after:bg-ui-brown
|
|
351
|
+
return twJoin(fillClasses, 'after:bg-ui-brown after:transition-transform contrast-more:after:bg-ui-brown');
|
|
794
352
|
case 'green':
|
|
795
|
-
return twJoin(fillClasses, 'after:bg-ui-green contrast-more:after:bg-ui-green
|
|
353
|
+
return twJoin(fillClasses, 'after:bg-ui-green after:transition-transform contrast-more:after:bg-ui-green');
|
|
796
354
|
case 'grey':
|
|
797
|
-
return twJoin(fillClasses, 'after:bg-ui-grey contrast-more:after:bg-ui-grey
|
|
355
|
+
return twJoin(fillClasses, 'after:bg-ui-grey after:transition-transform contrast-more:after:bg-ui-grey');
|
|
798
356
|
case 'sky-blue':
|
|
799
|
-
return twJoin(fillClasses, 'after:bg-ui-sky-blue contrast-more:after:bg-ui-sky-blue
|
|
357
|
+
return twJoin(fillClasses, 'after:bg-ui-sky-blue after:transition-transform contrast-more:after:bg-ui-sky-blue');
|
|
800
358
|
case 'magenta':
|
|
801
|
-
return twJoin(fillClasses, 'after:bg-ui-magenta contrast-more:after:bg-ui-magenta
|
|
359
|
+
return twJoin(fillClasses, 'after:bg-ui-magenta after:transition-transform contrast-more:after:bg-ui-magenta');
|
|
802
360
|
case 'neutral':
|
|
803
361
|
return twJoin(fillClasses, 'after:bg-zinc-700 after:transition-transform contrast-more:after:bg-zinc-700 dark:after:bg-zinc-300 dark:contrast-more:after:bg-zinc-300');
|
|
804
362
|
case 'orange':
|
|
805
|
-
return twJoin(fillClasses, 'after:bg-ui-orange contrast-more:after:bg-ui-orange
|
|
363
|
+
return twJoin(fillClasses, 'after:bg-ui-orange after:transition-transform contrast-more:after:bg-ui-orange');
|
|
806
364
|
case 'pink':
|
|
807
|
-
return twJoin(fillClasses, 'after:bg-ui-pink contrast-more:after:bg-ui-pink
|
|
808
|
-
case 'primary':
|
|
809
|
-
return twJoin(fillClasses, 'after:bg-primary-500 contrast-more:after:bg-primary-500 after:transition-transform');
|
|
365
|
+
return twJoin(fillClasses, 'after:bg-ui-pink after:transition-transform contrast-more:after:bg-ui-pink');
|
|
810
366
|
case 'purple':
|
|
811
|
-
return twJoin(fillClasses, 'after:bg-ui-purple contrast-more:after:bg-ui-purple
|
|
367
|
+
return twJoin(fillClasses, 'after:bg-ui-purple after:transition-transform contrast-more:after:bg-ui-purple');
|
|
812
368
|
case 'red':
|
|
813
|
-
return twJoin(fillClasses, 'after:bg-ui-red contrast-more:after:bg-ui-red
|
|
369
|
+
return twJoin(fillClasses, 'after:bg-ui-red after:transition-transform contrast-more:after:bg-ui-red');
|
|
814
370
|
case 'violet':
|
|
815
|
-
return twJoin(fillClasses, 'after:bg-ui-violet contrast-more:after:bg-ui-violet
|
|
371
|
+
return twJoin(fillClasses, 'after:bg-ui-violet after:transition-transform contrast-more:after:bg-ui-violet');
|
|
816
372
|
case 'yellow':
|
|
817
|
-
return twJoin(fillClasses, 'after:bg-ui-yellow contrast-more:after:bg-ui-yellow
|
|
373
|
+
return twJoin(fillClasses, 'after:bg-ui-yellow after:transition-transform contrast-more:after:bg-ui-yellow');
|
|
818
374
|
case 'blue':
|
|
819
375
|
default:
|
|
820
|
-
return twJoin(fillClasses, 'after:bg-ui-blue contrast-more:after:bg-ui-blue
|
|
376
|
+
return twJoin(fillClasses, 'after:bg-ui-blue after:transition-transform contrast-more:after:bg-ui-blue');
|
|
821
377
|
}
|
|
822
378
|
};
|
|
823
379
|
// Define theme-specific fill center classes
|
|
824
380
|
const getFillCenterClasses = (theme = 'blue') => {
|
|
825
381
|
switch (theme) {
|
|
826
382
|
case 'brown':
|
|
827
|
-
return twJoin(fillClasses, 'after:bg-ui-brown/0
|
|
383
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-brown/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-brown pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-brown');
|
|
828
384
|
case 'green':
|
|
829
|
-
return twJoin(fillClasses, 'after:bg-ui-green/0
|
|
385
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-green/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-green pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-green');
|
|
830
386
|
case 'grey':
|
|
831
|
-
return twJoin(fillClasses, 'after:bg-ui-grey/0
|
|
387
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-grey/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-grey pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-grey');
|
|
832
388
|
case 'sky-blue':
|
|
833
|
-
return twJoin(fillClasses, 'after:
|
|
389
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-sky-blue/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-sky-blue pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-sky-blue');
|
|
834
390
|
case 'magenta':
|
|
835
|
-
return twJoin(fillClasses, 'after:bg-ui-magenta/0
|
|
391
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-magenta/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-magenta pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-magenta');
|
|
836
392
|
case 'neutral':
|
|
837
|
-
return twJoin(fillClasses, '
|
|
393
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-zinc-700/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-zinc-700 dark:after:bg-zinc-300/0 dark:active:after:bg-zinc-300 pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-zinc-700 dark:pointer-fine:hover:after:bg-zinc-300');
|
|
838
394
|
case 'orange':
|
|
839
|
-
return twJoin(fillClasses, 'after:bg-ui-orange/0
|
|
395
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-orange/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-orange pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-orange');
|
|
840
396
|
case 'pink':
|
|
841
|
-
return twJoin(fillClasses, 'after:bg-ui-pink/0
|
|
842
|
-
case 'primary':
|
|
843
|
-
return twJoin(fillClasses, 'after:bg-primary-500/0 active:after:bg-primary-500 pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-primary-500 after:scale-x-50 after:scale-y-[0.25] after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100');
|
|
397
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-pink/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-pink pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-pink');
|
|
844
398
|
case 'purple':
|
|
845
|
-
return twJoin(fillClasses, 'after:bg-ui-purple/0
|
|
399
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-purple/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-purple pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-purple');
|
|
846
400
|
case 'red':
|
|
847
|
-
return twJoin(fillClasses, 'after:bg-ui-red/0
|
|
401
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-red/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-red pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-red');
|
|
848
402
|
case 'violet':
|
|
849
|
-
return twJoin(fillClasses, 'after:bg-ui-violet/0
|
|
403
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-violet/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-violet pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-violet');
|
|
850
404
|
case 'yellow':
|
|
851
|
-
return twJoin(fillClasses, 'after:bg-ui-yellow/0
|
|
405
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-yellow/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-yellow pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-yellow');
|
|
852
406
|
case 'blue':
|
|
853
407
|
default:
|
|
854
|
-
return twJoin(fillClasses, 'after:bg-ui-blue/0
|
|
408
|
+
return twJoin(fillClasses, 'after:scale-x-50 after:scale-y-[0.25] after:bg-ui-blue/0 after:transition-[transform_background-color] active:after:scale-x-100 active:after:scale-y-100 active:after:bg-ui-blue pointer-fine:hover:after:scale-x-100 pointer-fine:hover:after:scale-y-100 pointer-fine:hover:after:bg-ui-blue');
|
|
855
409
|
}
|
|
856
410
|
};
|
|
857
411
|
const multilineBaseClasses = twSort('bg-linear-to-r from-current to-current bg-no-repeat active:scale-95');
|
|
858
412
|
const multilineLineStaticClasses = 'underline';
|
|
859
|
-
const multilineNormalClasses = twSort('
|
|
860
|
-
const multilineClasses = twJoin(multilineBaseClasses, 'ease-exponential
|
|
413
|
+
const multilineNormalClasses = twSort('underline-offset-1 active:underline pointer-fine:hover:underline');
|
|
414
|
+
const multilineClasses = twJoin(multilineBaseClasses, 'duration-500 ease-exponential');
|
|
861
415
|
const multilineLineClasses = twJoin(multilineClasses, 'bg-[position:0%_100%] px-px pb-px transition-[background-size]');
|
|
862
|
-
const multilineXClasses = twJoin(multilineLineClasses, '
|
|
416
|
+
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]');
|
|
863
417
|
const multilineLineRtlClasses = twJoin([multilineXClasses, 'bg-[position:100%_100%]']);
|
|
864
418
|
const multilineLineCenterClasses = twJoin([multilineXClasses, 'bg-[position:50%_100%]']);
|
|
865
|
-
const multilineLineLiftClasses = twJoin(multilineLineClasses, '
|
|
866
|
-
const multilineFillBaseClasses = twJoin(multilineBaseClasses, 'py-0.75
|
|
867
|
-
// Define theme-specific multiline fill color classes
|
|
419
|
+
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]');
|
|
420
|
+
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');
|
|
868
421
|
const getMultilineFillColorClasses = (theme = 'blue') => {
|
|
869
422
|
switch (theme) {
|
|
870
423
|
case 'brown':
|
|
871
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-brown to-ui-brown contrast-more:from-ui-brown contrast-more:to-ui-brown
|
|
424
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-brown to-ui-brown transition-[background-size_color] contrast-more:from-ui-brown contrast-more:to-ui-brown');
|
|
872
425
|
case 'green':
|
|
873
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-green to-ui-green contrast-more:from-ui-green contrast-more:to-ui-green
|
|
426
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-green to-ui-green transition-[background-size_color] contrast-more:from-ui-green contrast-more:to-ui-green');
|
|
874
427
|
case 'grey':
|
|
875
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-grey to-ui-grey contrast-more:from-ui-grey contrast-more:to-ui-grey
|
|
428
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-grey to-ui-grey transition-[background-size_color] contrast-more:from-ui-grey contrast-more:to-ui-grey');
|
|
876
429
|
case 'sky-blue':
|
|
877
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-sky-blue to-ui-sky-blue contrast-more:from-ui-sky-blue contrast-more:to-ui-sky-blue
|
|
430
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-sky-blue to-ui-sky-blue transition-[background-size_color] contrast-more:from-ui-sky-blue contrast-more:to-ui-sky-blue');
|
|
878
431
|
case 'magenta':
|
|
879
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-magenta to-ui-magenta contrast-more:from-ui-magenta contrast-more:to-ui-magenta
|
|
432
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-magenta to-ui-magenta transition-[background-size_color] contrast-more:from-ui-magenta contrast-more:to-ui-magenta');
|
|
880
433
|
case 'neutral':
|
|
881
434
|
return twJoin(multilineFillBaseClasses, 'from-zinc-700 to-zinc-700 transition-[background-size_color] contrast-more:from-zinc-700 contrast-more:to-zinc-700 dark:from-zinc-300 dark:to-zinc-300 dark:contrast-more:from-zinc-300 dark:contrast-more:to-zinc-300');
|
|
882
435
|
case 'orange':
|
|
883
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-orange to-ui-orange contrast-more:from-ui-orange contrast-more:to-ui-orange
|
|
436
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-orange to-ui-orange transition-[background-size_color] contrast-more:from-ui-orange contrast-more:to-ui-orange');
|
|
884
437
|
case 'pink':
|
|
885
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-pink to-ui-pink contrast-more:from-ui-pink contrast-more:to-ui-pink
|
|
886
|
-
case 'primary':
|
|
887
|
-
return twJoin(multilineFillBaseClasses, 'from-primary-500 to-primary-500 contrast-more:from-primary-500 contrast-more:to-primary-500 transition-[background-size_color]');
|
|
438
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-pink to-ui-pink transition-[background-size_color] contrast-more:from-ui-pink contrast-more:to-ui-pink');
|
|
888
439
|
case 'purple':
|
|
889
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-purple to-ui-purple contrast-more:from-ui-purple contrast-more:to-ui-purple
|
|
440
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-purple to-ui-purple transition-[background-size_color] contrast-more:from-ui-purple contrast-more:to-ui-purple');
|
|
890
441
|
case 'red':
|
|
891
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-red to-ui-red contrast-more:from-ui-red contrast-more:to-ui-red
|
|
442
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-red to-ui-red transition-[background-size_color] contrast-more:from-ui-red contrast-more:to-ui-red');
|
|
892
443
|
case 'violet':
|
|
893
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-violet to-ui-violet contrast-more:from-ui-violet contrast-more:to-ui-violet
|
|
444
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-violet to-ui-violet transition-[background-size_color] contrast-more:from-ui-violet contrast-more:to-ui-violet');
|
|
894
445
|
case 'yellow':
|
|
895
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-yellow to-ui-yellow contrast-more:from-ui-yellow contrast-more:to-ui-yellow
|
|
446
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-yellow to-ui-yellow transition-[background-size_color] contrast-more:from-ui-yellow contrast-more:to-ui-yellow');
|
|
896
447
|
case 'blue':
|
|
897
448
|
default:
|
|
898
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-blue to-ui-blue contrast-more:from-ui-blue contrast-more:to-ui-blue
|
|
449
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-blue to-ui-blue transition-[background-size_color] contrast-more:from-ui-blue contrast-more:to-ui-blue');
|
|
899
450
|
}
|
|
900
451
|
};
|
|
901
452
|
// Define theme-specific multiline fill classes
|
|
902
453
|
const getMultilineFillClasses = (theme = 'blue') => {
|
|
903
454
|
switch (theme) {
|
|
904
455
|
case 'brown':
|
|
905
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-brown/0 to-ui-brown/0 focus-visible:from-ui-brown focus-visible:to-ui-brown active:from-ui-brown active:to-ui-brown contrast-more:from-ui-brown/0 contrast-more:to-ui-brown/0 focus-visible:contrast-more:from-ui-brown focus-visible:contrast-more:to-ui-brown active:contrast-more:from-ui-brown active:contrast-more:to-ui-brown pointer-fine:hover:from-ui-brown pointer-fine:hover:to-ui-brown pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-brown pointer-fine:hover:contrast-more:to-ui-brown
|
|
456
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-brown/0 to-ui-brown/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-brown focus-visible:to-ui-brown focus-visible:bg-[size:100%_100%] active:from-ui-brown active:to-ui-brown active:bg-[size:100%_100%] contrast-more:from-ui-brown/0 contrast-more:to-ui-brown/0 focus-visible:contrast-more:from-ui-brown focus-visible:contrast-more:to-ui-brown active:contrast-more:from-ui-brown active:contrast-more:to-ui-brown pointer-fine:hover:from-ui-brown pointer-fine:hover:to-ui-brown pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-brown pointer-fine:hover:contrast-more:to-ui-brown');
|
|
906
457
|
case 'green':
|
|
907
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-green/0 to-ui-green/0 focus-visible:from-ui-green focus-visible:to-ui-green active:from-ui-green active:to-ui-green contrast-more:from-ui-green/0 contrast-more:to-ui-green/0 focus-visible:contrast-more:from-ui-green focus-visible:contrast-more:to-ui-green active:contrast-more:from-ui-green active:contrast-more:to-ui-green pointer-fine:hover:from-ui-green pointer-fine:hover:to-ui-green pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-green pointer-fine:hover:contrast-more:to-ui-green
|
|
458
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-green/0 to-ui-green/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-green focus-visible:to-ui-green focus-visible:bg-[size:100%_100%] active:from-ui-green active:to-ui-green active:bg-[size:100%_100%] contrast-more:from-ui-green/0 contrast-more:to-ui-green/0 focus-visible:contrast-more:from-ui-green focus-visible:contrast-more:to-ui-green active:contrast-more:from-ui-green active:contrast-more:to-ui-green pointer-fine:hover:from-ui-green pointer-fine:hover:to-ui-green pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-green pointer-fine:hover:contrast-more:to-ui-green');
|
|
908
459
|
case 'grey':
|
|
909
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-grey/0 to-ui-grey/0 focus-visible:from-ui-grey focus-visible:to-ui-grey active:from-ui-grey active:to-ui-grey contrast-more:from-ui-grey/0 contrast-more:to-ui-grey/0 focus-visible:contrast-more:from-ui-grey focus-visible:contrast-more:to-ui-grey active:contrast-more:from-ui-grey active:contrast-more:to-ui-grey pointer-fine:hover:from-ui-grey pointer-fine:hover:to-ui-grey pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-grey pointer-fine:hover:contrast-more:to-ui-grey
|
|
460
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-grey/0 to-ui-grey/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-grey focus-visible:to-ui-grey focus-visible:bg-[size:100%_100%] active:from-ui-grey active:to-ui-grey active:bg-[size:100%_100%] contrast-more:from-ui-grey/0 contrast-more:to-ui-grey/0 focus-visible:contrast-more:from-ui-grey focus-visible:contrast-more:to-ui-grey active:contrast-more:from-ui-grey active:contrast-more:to-ui-grey pointer-fine:hover:from-ui-grey pointer-fine:hover:to-ui-grey pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-grey pointer-fine:hover:contrast-more:to-ui-grey');
|
|
910
461
|
case 'sky-blue':
|
|
911
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-sky-blue/0 to-ui-sky-blue/0 focus-visible:from-ui-sky-blue focus-visible:to-ui-sky-blue active:from-ui-sky-blue active:to-ui-sky-blue contrast-more:from-ui-sky-blue/0 contrast-more:to-ui-sky-blue/0 focus-visible:contrast-more:from-ui-sky-blue focus-visible:contrast-more:to-ui-sky-blue active:contrast-more:from-ui-sky-blue active:contrast-more:to-ui-sky-blue pointer-fine:hover:from-ui-sky-blue pointer-fine:hover:to-ui-sky-blue pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-sky-blue pointer-fine:hover:contrast-more:to-ui-sky-blue
|
|
462
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-sky-blue/0 to-ui-sky-blue/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-sky-blue focus-visible:to-ui-sky-blue focus-visible:bg-[size:100%_100%] active:from-ui-sky-blue active:to-ui-sky-blue active:bg-[size:100%_100%] contrast-more:from-ui-sky-blue/0 contrast-more:to-ui-sky-blue/0 focus-visible:contrast-more:from-ui-sky-blue focus-visible:contrast-more:to-ui-sky-blue active:contrast-more:from-ui-sky-blue active:contrast-more:to-ui-sky-blue pointer-fine:hover:from-ui-sky-blue pointer-fine:hover:to-ui-sky-blue pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-sky-blue pointer-fine:hover:contrast-more:to-ui-sky-blue');
|
|
912
463
|
case 'magenta':
|
|
913
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-magenta/0 to-ui-magenta/0 focus-visible:from-ui-magenta focus-visible:to-ui-magenta active:from-ui-magenta active:to-ui-magenta contrast-more:from-ui-magenta/0 contrast-more:to-ui-magenta/0 focus-visible:contrast-more:from-ui-magenta focus-visible:contrast-more:to-ui-magenta active:contrast-more:from-ui-magenta active:contrast-more:to-ui-magenta pointer-fine:hover:from-ui-magenta pointer-fine:hover:to-ui-magenta pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-magenta pointer-fine:hover:contrast-more:to-ui-magenta
|
|
464
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-magenta/0 to-ui-magenta/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-magenta focus-visible:to-ui-magenta focus-visible:bg-[size:100%_100%] active:from-ui-magenta active:to-ui-magenta active:bg-[size:100%_100%] contrast-more:from-ui-magenta/0 contrast-more:to-ui-magenta/0 focus-visible:contrast-more:from-ui-magenta focus-visible:contrast-more:to-ui-magenta active:contrast-more:from-ui-magenta active:contrast-more:to-ui-magenta pointer-fine:hover:from-ui-magenta pointer-fine:hover:to-ui-magenta pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-magenta pointer-fine:hover:contrast-more:to-ui-magenta');
|
|
914
465
|
case 'neutral':
|
|
915
|
-
return twJoin(multilineFillBaseClasses, '
|
|
466
|
+
return twJoin(multilineFillBaseClasses, 'from-zinc-700/0 to-zinc-700/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-zinc-700 focus-visible:to-zinc-700 focus-visible:bg-[size:100%_100%] active:from-zinc-700 active:to-zinc-700 active:bg-[size:100%_100%] contrast-more:from-zinc-700/0 contrast-more:to-zinc-700/0 focus-visible:contrast-more:from-zinc-700 focus-visible:contrast-more:to-zinc-700 active:contrast-more:from-zinc-700 active:contrast-more:to-zinc-700 dark:from-zinc-300/0 dark:to-zinc-300/0 dark:focus-visible:from-zinc-300 dark:focus-visible:to-zinc-300 dark:active:from-zinc-300 dark:active:to-zinc-300 dark:contrast-more:from-zinc-300/0 dark:contrast-more:to-zinc-300/0 dark:focus-visible:contrast-more:from-zinc-300 dark:focus-visible:contrast-more:to-zinc-300 dark:active:contrast-more:from-zinc-300 dark:active:contrast-more:to-zinc-300 pointer-fine:hover:from-zinc-700 pointer-fine:hover:to-zinc-700 pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-zinc-700 pointer-fine:hover:contrast-more:to-zinc-700 dark:pointer-fine:hover:from-zinc-300 dark:pointer-fine:hover:to-zinc-300 dark:pointer-fine:hover:contrast-more:from-zinc-300 dark:pointer-fine:hover:contrast-more:to-zinc-300');
|
|
916
467
|
case 'orange':
|
|
917
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-orange/0 to-ui-orange/0 focus-visible:from-ui-orange focus-visible:to-ui-orange active:from-ui-orange active:to-ui-orange contrast-more:from-ui-orange/0 contrast-more:to-ui-orange/0 focus-visible:contrast-more:from-ui-orange focus-visible:contrast-more:to-ui-orange active:contrast-more:from-ui-orange active:contrast-more:to-ui-orange pointer-fine:hover:from-ui-orange pointer-fine:hover:to-ui-orange pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-orange pointer-fine:hover:contrast-more:to-ui-orange
|
|
468
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-orange/0 to-ui-orange/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-orange focus-visible:to-ui-orange focus-visible:bg-[size:100%_100%] active:from-ui-orange active:to-ui-orange active:bg-[size:100%_100%] contrast-more:from-ui-orange/0 contrast-more:to-ui-orange/0 focus-visible:contrast-more:from-ui-orange focus-visible:contrast-more:to-ui-orange active:contrast-more:from-ui-orange active:contrast-more:to-ui-orange pointer-fine:hover:from-ui-orange pointer-fine:hover:to-ui-orange pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-orange pointer-fine:hover:contrast-more:to-ui-orange');
|
|
918
469
|
case 'pink':
|
|
919
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-pink/0 to-ui-pink/0 focus-visible:from-ui-pink focus-visible:to-ui-pink active:from-ui-pink active:to-ui-pink contrast-more:from-ui-pink/0 contrast-more:to-ui-pink/0 focus-visible:contrast-more:from-ui-pink focus-visible:contrast-more:to-ui-pink active:contrast-more:from-ui-pink active:contrast-more:to-ui-pink pointer-fine:hover:from-ui-pink pointer-fine:hover:to-ui-pink pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-pink pointer-fine:hover:contrast-more:to-ui-pink
|
|
920
|
-
case 'primary':
|
|
921
|
-
return twJoin(multilineFillBaseClasses, 'from-primary-500/0 to-primary-500/0 focus-visible:from-primary-500 focus-visible:to-primary-500 active:from-primary-500 active:to-primary-500 contrast-more:from-primary-500/0 contrast-more:to-primary-500/0 focus-visible:contrast-more:from-primary-500 focus-visible:contrast-more:to-primary-500 active:contrast-more:from-primary-500 active:contrast-more:to-primary-500 pointer-fine:hover:from-primary-500 pointer-fine:hover:to-primary-500 pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-primary-500 pointer-fine:hover:contrast-more:to-primary-500 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:bg-[size:100%_100%] active:bg-[size:100%_100%]');
|
|
470
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-pink/0 to-ui-pink/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-pink focus-visible:to-ui-pink focus-visible:bg-[size:100%_100%] active:from-ui-pink active:to-ui-pink active:bg-[size:100%_100%] contrast-more:from-ui-pink/0 contrast-more:to-ui-pink/0 focus-visible:contrast-more:from-ui-pink focus-visible:contrast-more:to-ui-pink active:contrast-more:from-ui-pink active:contrast-more:to-ui-pink pointer-fine:hover:from-ui-pink pointer-fine:hover:to-ui-pink pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-pink pointer-fine:hover:contrast-more:to-ui-pink');
|
|
922
471
|
case 'purple':
|
|
923
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-purple/0 to-ui-purple/0 focus-visible:from-ui-purple focus-visible:to-ui-purple active:from-ui-purple active:to-ui-purple contrast-more:from-ui-purple/0 contrast-more:to-ui-purple/0 focus-visible:contrast-more:from-ui-purple focus-visible:contrast-more:to-ui-purple active:contrast-more:from-ui-purple active:contrast-more:to-ui-purple pointer-fine:hover:from-ui-purple pointer-fine:hover:to-ui-purple pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-purple pointer-fine:hover:contrast-more:to-ui-purple
|
|
472
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-purple/0 to-ui-purple/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-purple focus-visible:to-ui-purple focus-visible:bg-[size:100%_100%] active:from-ui-purple active:to-ui-purple active:bg-[size:100%_100%] contrast-more:from-ui-purple/0 contrast-more:to-ui-purple/0 focus-visible:contrast-more:from-ui-purple focus-visible:contrast-more:to-ui-purple active:contrast-more:from-ui-purple active:contrast-more:to-ui-purple pointer-fine:hover:from-ui-purple pointer-fine:hover:to-ui-purple pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-purple pointer-fine:hover:contrast-more:to-ui-purple');
|
|
924
473
|
case 'red':
|
|
925
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-red/0 to-ui-red/0 focus-visible:from-ui-red focus-visible:to-ui-red active:from-ui-red active:to-ui-red contrast-more:from-ui-red/0 contrast-more:to-ui-red/0 focus-visible:contrast-more:from-ui-red focus-visible:contrast-more:to-ui-red active:contrast-more:from-ui-red active:contrast-more:to-ui-red pointer-fine:hover:from-ui-red pointer-fine:hover:to-ui-red pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-red pointer-fine:hover:contrast-more:to-ui-red
|
|
474
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-red/0 to-ui-red/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-red focus-visible:to-ui-red focus-visible:bg-[size:100%_100%] active:from-ui-red active:to-ui-red active:bg-[size:100%_100%] contrast-more:from-ui-red/0 contrast-more:to-ui-red/0 focus-visible:contrast-more:from-ui-red focus-visible:contrast-more:to-ui-red active:contrast-more:from-ui-red active:contrast-more:to-ui-red pointer-fine:hover:from-ui-red pointer-fine:hover:to-ui-red pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-red pointer-fine:hover:contrast-more:to-ui-red');
|
|
926
475
|
case 'violet':
|
|
927
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-violet/0 to-ui-violet/0 focus-visible:from-ui-violet focus-visible:to-ui-violet active:from-ui-violet active:to-ui-violet contrast-more:from-ui-violet/0 contrast-more:to-ui-violet/0 focus-visible:contrast-more:from-ui-violet focus-visible:contrast-more:to-ui-violet active:contrast-more:from-ui-violet active:contrast-more:to-ui-violet pointer-fine:hover:from-ui-violet pointer-fine:hover:to-ui-violet pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-violet pointer-fine:hover:contrast-more:to-ui-violet
|
|
476
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-violet/0 to-ui-violet/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-violet focus-visible:to-ui-violet focus-visible:bg-[size:100%_100%] active:from-ui-violet active:to-ui-violet active:bg-[size:100%_100%] contrast-more:from-ui-violet/0 contrast-more:to-ui-violet/0 focus-visible:contrast-more:from-ui-violet focus-visible:contrast-more:to-ui-violet active:contrast-more:from-ui-violet active:contrast-more:to-ui-violet pointer-fine:hover:from-ui-violet pointer-fine:hover:to-ui-violet pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-violet pointer-fine:hover:contrast-more:to-ui-violet');
|
|
928
477
|
case 'yellow':
|
|
929
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-yellow/0 to-ui-yellow/0 focus-visible:from-ui-yellow focus-visible:to-ui-yellow active:from-ui-yellow active:to-ui-yellow contrast-more:from-ui-yellow/0 contrast-more:to-ui-yellow/0 focus-visible:contrast-more:from-ui-yellow focus-visible:contrast-more:to-ui-yellow active:contrast-more:from-ui-yellow active:contrast-more:to-ui-yellow pointer-fine:hover:from-ui-yellow pointer-fine:hover:to-ui-yellow pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-yellow pointer-fine:hover:contrast-more:to-ui-yellow
|
|
478
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-yellow/0 to-ui-yellow/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-yellow focus-visible:to-ui-yellow focus-visible:bg-[size:100%_100%] active:from-ui-yellow active:to-ui-yellow active:bg-[size:100%_100%] contrast-more:from-ui-yellow/0 contrast-more:to-ui-yellow/0 focus-visible:contrast-more:from-ui-yellow focus-visible:contrast-more:to-ui-yellow active:contrast-more:from-ui-yellow active:contrast-more:to-ui-yellow pointer-fine:hover:from-ui-yellow pointer-fine:hover:to-ui-yellow pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-yellow pointer-fine:hover:contrast-more:to-ui-yellow');
|
|
930
479
|
case 'blue':
|
|
931
480
|
default:
|
|
932
|
-
return twJoin(multilineFillBaseClasses, 'from-ui-blue/0 to-ui-blue/0 focus-visible:from-ui-blue focus-visible:to-ui-blue active:from-ui-blue active:to-ui-blue contrast-more:from-ui-blue/0 contrast-more:to-ui-blue/0 focus-visible:contrast-more:from-ui-blue focus-visible:contrast-more:to-ui-blue active:contrast-more:from-ui-blue active:contrast-more:to-ui-blue pointer-fine:hover:from-ui-blue pointer-fine:hover:to-ui-blue pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-blue pointer-fine:hover:contrast-more:to-ui-blue
|
|
481
|
+
return twJoin(multilineFillBaseClasses, 'from-ui-blue/0 to-ui-blue/0 bg-[size:50%_0px] bg-[position:50%_50%] transition-[background-size_background-image_color] focus-visible:from-ui-blue focus-visible:to-ui-blue focus-visible:bg-[size:100%_100%] active:from-ui-blue active:to-ui-blue active:bg-[size:100%_100%] contrast-more:from-ui-blue/0 contrast-more:to-ui-blue/0 focus-visible:contrast-more:from-ui-blue focus-visible:contrast-more:to-ui-blue active:contrast-more:from-ui-blue active:contrast-more:to-ui-blue pointer-fine:hover:from-ui-blue pointer-fine:hover:to-ui-blue pointer-fine:hover:bg-[size:100%_100%] pointer-fine:hover:contrast-more:from-ui-blue pointer-fine:hover:contrast-more:to-ui-blue');
|
|
933
482
|
}
|
|
934
483
|
};
|
|
935
484
|
const getMultilineFillLiftClasses = (theme = 'blue') => {
|
|
936
|
-
return twJoin(getMultilineFillColorClasses(theme), '
|
|
485
|
+
return twJoin(getMultilineFillColorClasses(theme), '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%]');
|
|
937
486
|
};
|
|
938
487
|
const getMultilineFillXClasses = (theme = 'blue') => {
|
|
939
|
-
return twJoin(getMultilineFillColorClasses(theme), '
|
|
488
|
+
return twJoin(getMultilineFillColorClasses(theme), 'bg-[size:0%_100%] focus-visible:bg-[size:100%_100%] active:bg-[size:100%_100%] pointer-fine:hover:bg-[size:100%_100%]');
|
|
940
489
|
};
|
|
941
490
|
const getMultilineFillRtlClasses = (theme = 'blue') => {
|
|
942
491
|
return twJoin(getMultilineFillXClasses(theme), 'bg-[position:100%_auto]');
|
|
@@ -973,7 +522,7 @@ const getMultilineFillCenterClasses = (theme = 'blue') => {
|
|
|
973
522
|
* @example
|
|
974
523
|
* <Link href='/about' type='fill-ltr' theme='red' title='About Us'>Learn more about our company</Link>
|
|
975
524
|
*/
|
|
976
|
-
function Link({
|
|
525
|
+
function Link({ as, className, ref, theme = 'blue', type, ...props }) {
|
|
977
526
|
const getLinkClasses = () => {
|
|
978
527
|
switch (type) {
|
|
979
528
|
case 'static':
|
|
@@ -1021,14 +570,15 @@ function Link({ type, theme = 'blue', className, ref, ...props }) {
|
|
|
1021
570
|
}
|
|
1022
571
|
};
|
|
1023
572
|
const linkClasses = getLinkClasses();
|
|
1024
|
-
|
|
573
|
+
const LinkElement = as || Anchor;
|
|
574
|
+
return jsx(LinkElement, { ...props, className: twMerge(linkClasses, className), ref: ref });
|
|
1025
575
|
}
|
|
1026
576
|
|
|
1027
577
|
/**
|
|
1028
578
|
* # Button
|
|
1029
579
|
* - A pre-styled button with utility props for easy customization depending on use case.
|
|
1030
580
|
*/
|
|
1031
|
-
function Button({ className, padding = 'md', rounded = 'lg', theme = '
|
|
581
|
+
function Button({ className, padding = 'md', rounded = 'lg', theme = 'blue', ref, ...props }) {
|
|
1032
582
|
const getPaddingClasses = () => {
|
|
1033
583
|
switch (padding) {
|
|
1034
584
|
case 'xs':
|
|
@@ -1060,71 +610,92 @@ function Button({ className, padding = 'md', rounded = 'lg', theme = 'primary',
|
|
|
1060
610
|
}
|
|
1061
611
|
};
|
|
1062
612
|
const getThemeClasses = () => {
|
|
613
|
+
const classList = [];
|
|
1063
614
|
switch (theme) {
|
|
1064
615
|
case 'blue':
|
|
1065
|
-
|
|
616
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-blue/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-blue before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
617
|
+
break;
|
|
1066
618
|
case 'blue-gradient':
|
|
1067
|
-
|
|
619
|
+
classList.push(twSort('bg-ui-blue text-white shadow-lg shadow-ui-blue/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
620
|
+
break;
|
|
1068
621
|
case 'brown':
|
|
1069
|
-
|
|
622
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-brown/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-brown before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
623
|
+
break;
|
|
1070
624
|
case 'brown-gradient':
|
|
1071
|
-
|
|
625
|
+
classList.push(twSort('bg-ui-brown text-white shadow-lg shadow-ui-brown/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
626
|
+
break;
|
|
1072
627
|
case 'green':
|
|
1073
|
-
|
|
628
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-green/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-green before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
629
|
+
break;
|
|
1074
630
|
case 'green-gradient':
|
|
1075
|
-
|
|
631
|
+
classList.push(twSort('bg-ui-green text-white shadow-lg shadow-ui-green/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
632
|
+
break;
|
|
1076
633
|
case 'grey':
|
|
1077
|
-
|
|
634
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-grey/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-grey before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
635
|
+
break;
|
|
1078
636
|
case 'grey-gradient':
|
|
1079
|
-
|
|
637
|
+
classList.push(twSort('bg-ui-grey text-white shadow-lg shadow-ui-grey/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
638
|
+
break;
|
|
1080
639
|
case 'sky-blue':
|
|
1081
|
-
|
|
640
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-sky-blue/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-sky-blue before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
641
|
+
break;
|
|
1082
642
|
case 'sky-blue-gradient':
|
|
1083
|
-
|
|
643
|
+
classList.push(twSort('bg-ui-sky-blue text-white shadow-lg shadow-ui-sky-blue/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
644
|
+
break;
|
|
1084
645
|
case 'magenta':
|
|
1085
|
-
|
|
646
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-magenta/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-magenta before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
647
|
+
break;
|
|
1086
648
|
case 'magenta-gradient':
|
|
1087
|
-
|
|
649
|
+
classList.push(twSort('bg-ui-magenta text-white shadow-lg shadow-ui-magenta/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
650
|
+
break;
|
|
1088
651
|
case 'neutral':
|
|
1089
|
-
|
|
652
|
+
classList.push(twSort('pointer-fine:active:before:brightness-90text-white dark bg-zinc-200 text-black before:absolute before:inset-0 before:rounded-[inherit] before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 dark:bg-zinc-800 pointer-fine:hover:before:brightness-110'));
|
|
653
|
+
break;
|
|
1090
654
|
case 'neutral-gradient':
|
|
1091
|
-
|
|
655
|
+
classList.push(twSort('dark bg-linear-to-t from-zinc-300 via-zinc-200 to-zinc-100 text-black before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 dark:from-zinc-900 dark:via-zinc-800 dark:to-zinc-700 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
656
|
+
break;
|
|
1092
657
|
case 'orange':
|
|
1093
|
-
|
|
658
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-orange/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-orange before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
659
|
+
break;
|
|
1094
660
|
case 'orange-gradient':
|
|
1095
|
-
|
|
661
|
+
classList.push(twSort('bg-ui-orange text-white shadow-lg shadow-ui-orange/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
662
|
+
break;
|
|
1096
663
|
case 'pink':
|
|
1097
|
-
|
|
664
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-pink/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-pink before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
665
|
+
break;
|
|
1098
666
|
case 'pink-gradient':
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
return twSort('bg-primary-50 text-primary-600 active:bg-primary-600 active:text-primary-50 pointer-fine:hover:bg-primary-600 pointer-fine:hover:text-primary-50 pointer-fine:active:bg-primary-700 transition-[transform_background-color_color_box-shadow]');
|
|
1102
|
-
case 'primary-gradient':
|
|
1103
|
-
return twSort('bg-linear-to-t from-primary-700 via-primary-500 to-primary-300 bg-size-y-[200%] shadow-primary-600/25 pointer-fine:hover:[background-position:50%_0%] transition-[transform_background-position] [background-position:50%_50%] active:[background-position:50%_75%]');
|
|
667
|
+
classList.push(twSort('before:to-white/75/75 bg-ui-pink text-white shadow-lg shadow-ui-pink/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
668
|
+
break;
|
|
1104
669
|
case 'purple':
|
|
1105
|
-
|
|
670
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-purple/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-purple before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
671
|
+
break;
|
|
1106
672
|
case 'purple-gradient':
|
|
1107
|
-
|
|
673
|
+
classList.push(twSort('bg-ui-purple text-white shadow-lg shadow-ui-purple/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
674
|
+
break;
|
|
1108
675
|
case 'red':
|
|
1109
|
-
|
|
676
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-red/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-red before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
677
|
+
break;
|
|
1110
678
|
case 'red-gradient':
|
|
1111
|
-
|
|
679
|
+
classList.push(twSort('bg-ui-red text-white shadow-lg shadow-ui-red/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
680
|
+
break;
|
|
1112
681
|
case 'violet':
|
|
1113
|
-
|
|
682
|
+
classList.push(twSort('text-white shadow-lg shadow-ui-violet/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-violet before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
683
|
+
break;
|
|
1114
684
|
case 'violet-gradient':
|
|
1115
|
-
|
|
685
|
+
classList.push(twSort('bg-ui-violet text-white shadow-lg shadow-ui-violet/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black/75 before:via-transparent before:to-white/75 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
686
|
+
break;
|
|
1116
687
|
case 'yellow':
|
|
1117
|
-
|
|
688
|
+
classList.push(twSort('text-black shadow-lg shadow-ui-yellow/25 transition-transform before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:bg-ui-yellow before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
689
|
+
break;
|
|
1118
690
|
case 'yellow-gradient':
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
default:
|
|
1122
|
-
return twSort('bg-primary-500 shadow-primary-700/25 active:bg-primary-600 pointer-fine:hover:bg-primary-400 pointer-fine:active:bg-primary-600 text-white shadow-lg transition-[transform_background-color_box-shadow]');
|
|
691
|
+
classList.push(twSort('bg-ui-yellow text-black shadow-lg shadow-ui-yellow/25 transition-transform before:absolute before:inset-0 before:rounded-[inherit] before:bg-linear-to-t before:from-black before:via-black/50 before:to-white/50 before:opacity-75 before:mix-blend-soft-light before:transition-[filter] before:duration-300 before:ease-exponential active:before:brightness-90 pointer-fine:hover:before:brightness-110 pointer-fine:active:before:brightness-90'));
|
|
692
|
+
break;
|
|
1123
693
|
}
|
|
694
|
+
return classList.join(' ');
|
|
1124
695
|
};
|
|
1125
696
|
const paddingClasses = getPaddingClasses(), roundedClasses = getRoundedClasses(), themeClasses = getThemeClasses();
|
|
1126
697
|
const buttonClasses = twMerge([
|
|
1127
|
-
'ease-exponential focus-visible:scale-101 pointer-fine:hover:scale-101 pointer-fine:active:scale-99
|
|
698
|
+
'block w-fit min-w-fit text-center font-semibold duration-300 ease-exponential focus-visible:scale-101 active:scale-95 pointer-fine:hover:scale-101 pointer-fine:active:scale-99',
|
|
1128
699
|
paddingClasses,
|
|
1129
700
|
roundedClasses,
|
|
1130
701
|
themeClasses,
|
|
@@ -1201,7 +772,7 @@ function useFormStatus() {
|
|
|
1201
772
|
return useStore(store => store);
|
|
1202
773
|
}
|
|
1203
774
|
|
|
1204
|
-
function validateField(value, { required, type }) {
|
|
775
|
+
function validateField$1(value, { required, type }) {
|
|
1205
776
|
const noValue = !value || value === '';
|
|
1206
777
|
if (!required && noValue)
|
|
1207
778
|
return true;
|
|
@@ -1218,8 +789,8 @@ function validateField(value, { required, type }) {
|
|
|
1218
789
|
return true;
|
|
1219
790
|
}
|
|
1220
791
|
}
|
|
1221
|
-
function Input({ checked, className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid = true, label, labelProps, name, onChange, placeholder, ref, required = true, type, value, ...props }) {
|
|
1222
|
-
const [formContext, setFormContext] = useFormContext()
|
|
792
|
+
function Input({ checked, className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid = true, label, labelProps, name, onBlur, onChange, placeholder, ref, required = true, type, value, ...props }) {
|
|
793
|
+
const [formContext, setFormContext] = useFormContext();
|
|
1223
794
|
if (placeholder === '*')
|
|
1224
795
|
placeholder = name + (required && !label ? '*' : '');
|
|
1225
796
|
if (label === '*')
|
|
@@ -1244,7 +815,7 @@ function Input({ checked, className, defaultValue, description, descriptionProps
|
|
|
1244
815
|
}
|
|
1245
816
|
};
|
|
1246
817
|
const fieldContextType = getFieldContextType();
|
|
1247
|
-
const
|
|
818
|
+
const initialFieldContext = defineField({
|
|
1248
819
|
type: fieldContextType,
|
|
1249
820
|
id: fieldContextID,
|
|
1250
821
|
invalid,
|
|
@@ -1256,13 +827,14 @@ function Input({ checked, className, defaultValue, description, descriptionProps
|
|
|
1256
827
|
if (!setFormContext)
|
|
1257
828
|
return;
|
|
1258
829
|
setFormContext(prevContext => {
|
|
1259
|
-
const otherFields = (prevContext || []).filter(field => field.id !==
|
|
1260
|
-
return [...otherFields,
|
|
830
|
+
const otherFields = (prevContext || []).filter(field => field.id !== initialFieldContext.id);
|
|
831
|
+
return [...otherFields, initialFieldContext];
|
|
1261
832
|
});
|
|
1262
833
|
return () => {
|
|
1263
|
-
setFormContext(prevContext => (prevContext || []).filter(field => field.id !==
|
|
834
|
+
setFormContext(prevContext => (prevContext || []).filter(field => field.id !== initialFieldContext.id));
|
|
1264
835
|
};
|
|
1265
836
|
}, [setFormContext]);
|
|
837
|
+
const fieldContext = formContext?.find(({ id: fieldID }) => fieldID === initialFieldContext.id) || initialFieldContext;
|
|
1266
838
|
const debounceTimerRef = useRef(undefined);
|
|
1267
839
|
const handleChange = e => {
|
|
1268
840
|
if (disabled) {
|
|
@@ -1274,32 +846,66 @@ function Input({ checked, className, defaultValue, description, descriptionProps
|
|
|
1274
846
|
setFormContext?.(prevContext => {
|
|
1275
847
|
if (!prevContext)
|
|
1276
848
|
return [];
|
|
1277
|
-
const field = prevContext.find(({ id: fieldID }) => fieldID ===
|
|
849
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1278
850
|
if (!field)
|
|
1279
|
-
throw new Error(`Field with id "${
|
|
1280
|
-
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !==
|
|
851
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
852
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
1281
853
|
const updatedField = { ...field, value: newValue };
|
|
1282
854
|
return [...otherFields, updatedField];
|
|
1283
855
|
});
|
|
1284
856
|
debounceTimerRef.current = setTimeout(() => {
|
|
1285
|
-
const field = formContext?.find(({ id: fieldID }) => fieldID ===
|
|
857
|
+
const field = formContext?.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1286
858
|
if (!field)
|
|
1287
859
|
return;
|
|
1288
|
-
const invalid = validateField(newValue, field) === false;
|
|
860
|
+
const invalid = validateField$1(newValue, field) === false;
|
|
1289
861
|
if (invalid !== field.invalid)
|
|
1290
862
|
setFormContext?.(prevContext => {
|
|
1291
863
|
if (!prevContext)
|
|
1292
864
|
return [];
|
|
1293
|
-
const field = prevContext.find(({ id: fieldID }) => fieldID ===
|
|
865
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1294
866
|
if (!field)
|
|
1295
|
-
throw new Error(`Field with id "${
|
|
1296
|
-
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !==
|
|
867
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
868
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
1297
869
|
const updatedField = { ...field, invalid };
|
|
1298
870
|
return [...otherFields, updatedField];
|
|
1299
871
|
});
|
|
1300
872
|
}, 500);
|
|
1301
873
|
onChange?.(e);
|
|
1302
874
|
};
|
|
875
|
+
const handleBlur = e => {
|
|
876
|
+
if (disabled) {
|
|
877
|
+
e.preventDefault();
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
const { currentTarget } = e, { value: newValue } = currentTarget;
|
|
881
|
+
switch (type) {
|
|
882
|
+
case 'email':
|
|
883
|
+
setFormContext?.(prevContext => {
|
|
884
|
+
if (!prevContext)
|
|
885
|
+
return [];
|
|
886
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
887
|
+
if (!field)
|
|
888
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
889
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
890
|
+
const updatedField = { ...field, value: newValue.toLowerCase() };
|
|
891
|
+
return [...otherFields, updatedField];
|
|
892
|
+
});
|
|
893
|
+
break;
|
|
894
|
+
case 'tel':
|
|
895
|
+
setFormContext?.(prevContext => {
|
|
896
|
+
if (!prevContext)
|
|
897
|
+
return [];
|
|
898
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
899
|
+
if (!field)
|
|
900
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
901
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
902
|
+
const updatedField = { ...field, value: formatPhoneNumber(newValue, '1') };
|
|
903
|
+
return [...otherFields, updatedField];
|
|
904
|
+
});
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
onBlur?.(e);
|
|
908
|
+
};
|
|
1303
909
|
const restFieldProps = fieldProps
|
|
1304
910
|
? Object.fromEntries(Object.entries(fieldProps).filter(([key]) => key !== 'className'))
|
|
1305
911
|
: {};
|
|
@@ -1309,25 +915,25 @@ function Input({ checked, className, defaultValue, description, descriptionProps
|
|
|
1309
915
|
const restDescriptionProps = descriptionProps
|
|
1310
916
|
? Object.fromEntries(Object.entries(descriptionProps).filter(([key]) => key !== 'className'))
|
|
1311
917
|
: {};
|
|
1312
|
-
return (jsxs(Field, { ...restFieldProps, className: bag => twMerge('grid gap-1', typeof fieldProps?.className === 'function' ? fieldProps?.className(bag) : fieldProps?.className), disabled: disabled, children: [label && (jsx(Label, { ...restLabelProps, className: bag => twMerge('text-sm font-medium', required ? 'after:text-ui-red after:content-["_*"]' : '', typeof labelProps?.className === 'function' ? labelProps?.className(bag) : labelProps?.className), children: label })), jsx(Input$1, { ...props, className: bag => twMerge(
|
|
918
|
+
return (jsxs(Field, { ...restFieldProps, className: bag => twMerge('grid gap-1', typeof fieldProps?.className === 'function' ? fieldProps?.className(bag) : fieldProps?.className), disabled: disabled, children: [label && (jsx(Label, { ...restLabelProps, className: bag => twMerge('text-sm font-medium', required ? 'after:text-ui-red after:content-["_*"]' : '', typeof labelProps?.className === 'function' ? labelProps?.className(bag) : labelProps?.className), children: label })), jsx(Input$1, { ...props, className: bag => twMerge(
|
|
919
|
+
// Base styles
|
|
920
|
+
'rounded-xl border-1 border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-ui-sky-blue/95 transition-[background-color] duration-300 ease-exponential dark:bg-neutral-700 dark:text-neutral-50',
|
|
921
|
+
// Pseudo styles
|
|
922
|
+
'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',
|
|
923
|
+
// user-invalid styles
|
|
924
|
+
'user-invalid:border-ui-red user-invalid:bg-[color-mix(in_oklab,var(--color-ui-red)_20%,var(--color-neutral-100))] user-invalid:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklab,var(--color-ui-red)_20%,var(--color-neutral-800))] dark:user-invalid:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-800))] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklab,var(--color-ui-red)_10%,var(--color-neutral-100))] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklab,var(--color-ui-red)_10%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-800))]',
|
|
925
|
+
// Custom styles
|
|
926
|
+
typeof className === 'function' ? className(bag) : className), id: fieldContext?.id, invalid: invalid, onBlur: handleBlur, onChange: handleChange, placeholder: placeholder, ref: ref, required: required, type: type, value: fieldContext?.value }), description && (jsx(Description, { ...restDescriptionProps, className: bag => twMerge('text-xs', typeof descriptionProps?.className === 'function'
|
|
1313
927
|
? descriptionProps?.className(bag)
|
|
1314
928
|
: descriptionProps?.className), children: description }))] }));
|
|
1315
929
|
}
|
|
1316
930
|
|
|
1317
|
-
function SubmitButton({ children, className,
|
|
931
|
+
function SubmitButton({ children, className, error, incomplete, loading, success, theme, type = 'submit', ref, ...props }) {
|
|
1318
932
|
const [formStatus] = useFormStatus();
|
|
1319
|
-
const getDisabledStatus = () => {
|
|
1320
|
-
if (ariaDisabled !== undefined)
|
|
1321
|
-
return ariaDisabled;
|
|
1322
|
-
if (formStatus !== 'ready')
|
|
1323
|
-
return 'true';
|
|
1324
|
-
return 'false';
|
|
1325
|
-
};
|
|
1326
|
-
const disabled = getDisabledStatus();
|
|
1327
933
|
const getFormStatusButtonClasses = () => {
|
|
1328
934
|
switch (formStatus) {
|
|
1329
935
|
case 'loading':
|
|
1330
|
-
return twSort('animate-pulse cursor-wait text-lg font-black
|
|
936
|
+
return twSort('animate-pulse cursor-wait text-lg leading-6 font-black tracking-widest');
|
|
1331
937
|
case 'error':
|
|
1332
938
|
case 'success':
|
|
1333
939
|
return 'cursor-not-allowed';
|
|
@@ -1356,7 +962,7 @@ function SubmitButton({ children, className, 'aria-disabled': ariaDisabled, erro
|
|
|
1356
962
|
case 'incomplete':
|
|
1357
963
|
return incomplete || 'Complete Form';
|
|
1358
964
|
case 'loading':
|
|
1359
|
-
return (loading || (jsxs(Fragment$1, { children: [jsx("span", { className: 'animate-wave animation-delay-300
|
|
965
|
+
return (loading || (jsxs(Fragment$1, { children: [jsx("span", { className: 'inline-block animate-wave animation-delay-300', children: "\u2022" }), jsx("span", { className: 'inline-block animate-wave animation-delay-150', children: "\u2022" }), jsx("span", { className: 'inline-block animate-wave', children: "\u2022" })] })));
|
|
1360
966
|
case 'error':
|
|
1361
967
|
return (jsxs(Fragment$1, { children: [error || 'Error', ' ', jsx("span", { className: 'absolute top-1/2 ml-1.5 translate-y-[calc(-50%-1.5px)] text-2xl', children: "\u00D7" })] }));
|
|
1362
968
|
case 'success':
|
|
@@ -1366,7 +972,103 @@ function SubmitButton({ children, className, 'aria-disabled': ariaDisabled, erro
|
|
|
1366
972
|
}
|
|
1367
973
|
};
|
|
1368
974
|
const buttonText = getButtonText();
|
|
1369
|
-
return (jsx(Button, { ...props,
|
|
975
|
+
return (jsx(Button, { ...props, className: twMerge([formStatusButtonClasses, 'w-full', className]), ref: ref, theme: formStatusButtonTheme, type: type, children: buttonText }));
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
function validateField(value, { required }) {
|
|
979
|
+
const noValue = !value || value === '';
|
|
980
|
+
if (!required && noValue)
|
|
981
|
+
return true;
|
|
982
|
+
if (noValue)
|
|
983
|
+
return false;
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
function Textarea({ className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid = true, label, labelProps, name, onBlur, onChange, placeholder, ref, required = true, value, ...props }) {
|
|
987
|
+
const [formContext, setFormContext] = useFormContext();
|
|
988
|
+
if (placeholder === '*')
|
|
989
|
+
placeholder = name + (required && !label ? '*' : '');
|
|
990
|
+
if (label === '*')
|
|
991
|
+
label = name;
|
|
992
|
+
const uniqueID = useId(), fieldContextID = toLowerCase(name, [, '_']) + '§' + uniqueID;
|
|
993
|
+
if (Boolean(formContext?.find(field => field.id === fieldContextID)?.invalid))
|
|
994
|
+
invalid = true;
|
|
995
|
+
const initialFieldContext = defineField({
|
|
996
|
+
type: 'textarea',
|
|
997
|
+
id: fieldContextID,
|
|
998
|
+
invalid,
|
|
999
|
+
name,
|
|
1000
|
+
required,
|
|
1001
|
+
value: value ? `${value}` : defaultValue ? `${defaultValue}` : '',
|
|
1002
|
+
});
|
|
1003
|
+
useEffect(() => {
|
|
1004
|
+
if (!setFormContext)
|
|
1005
|
+
return;
|
|
1006
|
+
setFormContext(prevContext => {
|
|
1007
|
+
const otherFields = (prevContext || []).filter(field => field.id !== initialFieldContext.id);
|
|
1008
|
+
return [...otherFields, initialFieldContext];
|
|
1009
|
+
});
|
|
1010
|
+
return () => {
|
|
1011
|
+
setFormContext(prevContext => (prevContext || []).filter(field => field.id !== initialFieldContext.id));
|
|
1012
|
+
};
|
|
1013
|
+
}, [setFormContext]);
|
|
1014
|
+
const fieldContext = formContext?.find(({ id: fieldID }) => fieldID === initialFieldContext.id) || initialFieldContext;
|
|
1015
|
+
const debounceTimerRef = useRef(undefined);
|
|
1016
|
+
const handleChange = e => {
|
|
1017
|
+
if (disabled) {
|
|
1018
|
+
e.preventDefault();
|
|
1019
|
+
return;
|
|
1020
|
+
}
|
|
1021
|
+
clearTimeout(debounceTimerRef.current);
|
|
1022
|
+
const { currentTarget } = e, { value: newValue } = currentTarget;
|
|
1023
|
+
setFormContext?.(prevContext => {
|
|
1024
|
+
if (!prevContext)
|
|
1025
|
+
return [];
|
|
1026
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1027
|
+
if (!field)
|
|
1028
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
1029
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
1030
|
+
const updatedField = { ...field, value: newValue };
|
|
1031
|
+
return [...otherFields, updatedField];
|
|
1032
|
+
});
|
|
1033
|
+
debounceTimerRef.current = setTimeout(() => {
|
|
1034
|
+
const field = formContext?.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1035
|
+
if (!field)
|
|
1036
|
+
return;
|
|
1037
|
+
const invalid = validateField(newValue, field) === false;
|
|
1038
|
+
if (invalid !== field.invalid)
|
|
1039
|
+
setFormContext?.(prevContext => {
|
|
1040
|
+
if (!prevContext)
|
|
1041
|
+
return [];
|
|
1042
|
+
const field = prevContext.find(({ id: fieldID }) => fieldID === initialFieldContext.id);
|
|
1043
|
+
if (!field)
|
|
1044
|
+
throw new Error(`Field with id "${initialFieldContext.id}" not found in form context.`);
|
|
1045
|
+
const otherFields = prevContext.filter(({ id: fieldID }) => fieldID !== initialFieldContext.id);
|
|
1046
|
+
const updatedField = { ...field, invalid };
|
|
1047
|
+
return [...otherFields, updatedField];
|
|
1048
|
+
});
|
|
1049
|
+
}, 500);
|
|
1050
|
+
onChange?.(e);
|
|
1051
|
+
};
|
|
1052
|
+
const restFieldProps = fieldProps
|
|
1053
|
+
? Object.fromEntries(Object.entries(fieldProps).filter(([key]) => key !== 'className'))
|
|
1054
|
+
: {};
|
|
1055
|
+
const restLabelProps = labelProps
|
|
1056
|
+
? Object.fromEntries(Object.entries(labelProps).filter(([key]) => key !== 'className'))
|
|
1057
|
+
: {};
|
|
1058
|
+
const restDescriptionProps = descriptionProps
|
|
1059
|
+
? Object.fromEntries(Object.entries(descriptionProps).filter(([key]) => key !== 'className'))
|
|
1060
|
+
: {};
|
|
1061
|
+
return (jsxs(Field, { ...restFieldProps, className: bag => twMerge('grid gap-1', typeof fieldProps?.className === 'function' ? fieldProps?.className(bag) : fieldProps?.className), disabled: disabled, children: [label && (jsx(Label, { ...restLabelProps, className: bag => twMerge('text-sm font-medium', required ? 'after:text-ui-red after:content-["_*"]' : '', typeof labelProps?.className === 'function' ? labelProps?.className(bag) : labelProps?.className), children: label })), jsx(Textarea$1, { ...props, className: bag => twMerge(
|
|
1062
|
+
// Base styles
|
|
1063
|
+
'field-sizing-content resize-none rounded-xl border-1 border-neutral-500/50 bg-neutral-100 py-1 pl-2 text-neutral-950 outline-offset-1 outline-ui-sky-blue/95 transition-[background-color] duration-300 ease-exponential dark:bg-neutral-700 dark:text-neutral-50',
|
|
1064
|
+
// Pseudo styles
|
|
1065
|
+
'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',
|
|
1066
|
+
// user-invalid styles
|
|
1067
|
+
'user-invalid:border-ui-red user-invalid:bg-[color-mix(in_oklab,var(--color-ui-red)_20%,var(--color-neutral-100))] user-invalid:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-100))] user-invalid:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-100))] dark:user-invalid:bg-[color-mix(in_oklab,var(--color-ui-red)_20%,var(--color-neutral-800))] dark:user-invalid:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-800))] dark:user-invalid:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-800))] user-invalid:pointer-fine:hover:bg-[color-mix(in_oklab,var(--color-ui-red)_10%,var(--color-neutral-100))] user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-100))] user-invalid:pointer-fine:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-100))] dark:user-invalid:pointer-fine:hover:bg-[color-mix(in_oklab,var(--color-ui-red)_10%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:focus-visible:bg-[color-mix(in_oklab,var(--color-ui-red)_1%,var(--color-neutral-800))] dark:user-invalid:pointer-fine:active:bg-[color-mix(in_oklab,var(--color-ui-red)_25%,var(--color-neutral-800))]',
|
|
1068
|
+
// Custom styles
|
|
1069
|
+
typeof className === 'function' ? className(bag) : className), id: fieldContext?.id, invalid: invalid, onChange: handleChange, placeholder: placeholder, ref: ref, required: required, value: fieldContext?.value }), description && (jsx(Description, { ...restDescriptionProps, className: bag => twMerge('text-xs', typeof descriptionProps?.className === 'function'
|
|
1070
|
+
? descriptionProps?.className(bag)
|
|
1071
|
+
: descriptionProps?.className), children: description }))] }));
|
|
1370
1072
|
}
|
|
1371
1073
|
|
|
1372
1074
|
// import { findComponentByType } from '../../utils'
|
|
@@ -1426,23 +1128,23 @@ function getTextFromChildren(children) {
|
|
|
1426
1128
|
* A heading component that renders HTML heading elements (h1-h6) with appropriate styling.
|
|
1427
1129
|
* Automatically generates an ID for the heading based on its content if none is provided.
|
|
1428
1130
|
*/
|
|
1429
|
-
function Heading({ as = 'h2', children, className, id, ref, ...props }) {
|
|
1131
|
+
function Heading({ as = 'h2', children, customize, className, id, ref, ...props }) {
|
|
1430
1132
|
const H = as;
|
|
1431
1133
|
const targetableID = id || getTextFromChildren(children).replace(/\s+/g, '-').toLowerCase();
|
|
1432
1134
|
const getBaseClasses = () => {
|
|
1433
1135
|
switch (as) {
|
|
1434
1136
|
case 'h1':
|
|
1435
|
-
return twSort('pb-2.5 text-6xl font-black last:pb-0');
|
|
1137
|
+
return customize?.h1 || twSort('pb-2.5 text-6xl font-black last:pb-0');
|
|
1436
1138
|
case 'h3':
|
|
1437
|
-
return twSort('pb-2 text-4xl font-extralight last:pb-0');
|
|
1139
|
+
return customize?.h3 || twSort('pb-2 text-4xl font-extralight last:pb-0');
|
|
1438
1140
|
case 'h4':
|
|
1439
|
-
return twSort('pb-2 text-3xl font-extrabold last:pb-0');
|
|
1141
|
+
return customize?.h4 || twSort('pb-2 text-3xl font-extrabold last:pb-0');
|
|
1440
1142
|
case 'h5':
|
|
1441
|
-
return twSort('pb-1.5 text-2xl font-semibold last:pb-0');
|
|
1143
|
+
return customize?.h5 || twSort('pb-1.5 text-2xl font-semibold last:pb-0');
|
|
1442
1144
|
case 'h6':
|
|
1443
|
-
return twSort('pb-1 text-xl font-bold last:pb-0');
|
|
1145
|
+
return customize?.h6 || twSort('pb-1 text-xl font-bold last:pb-0');
|
|
1444
1146
|
default:
|
|
1445
|
-
return twSort('pb-2.5 text-5xl font-medium last:pb-0');
|
|
1147
|
+
return customize?.h2 || twSort('pb-2.5 text-5xl font-medium last:pb-0');
|
|
1446
1148
|
}
|
|
1447
1149
|
};
|
|
1448
1150
|
const baseClasses = getBaseClasses();
|
|
@@ -2031,5 +1733,5 @@ function Time({ children, dateObject, dateTime, day, hours, milliseconds, minute
|
|
|
2031
1733
|
return (jsx("time", { dateTime: dateAndTime, ref: ref, ...props, children: dateDisplay }));
|
|
2032
1734
|
}
|
|
2033
1735
|
|
|
2034
|
-
export { Airplane, Anchor, ArrowTriangle2CirclepathCircle, ArrowTriangle2CirclepathCircleFill, BagFill, Banknote, BellFill, BoltCar, BoltFill, BoltRingClosed, BoltTrianglebadgeExclamationmark, BookFill, BookmarkFill, BriefcaseFill, BubbleLeftFill, Building2Fill, Button, Calendar, CameraFill, CarFill, CartFill, ChartBarDocHorizontal, Checkmark, CheckmarkSeal, ChevronCompactDown, ChevronDown, ChevronLeft, ChevronLeftForwardslashChevronRight, ChevronRight, ChevronUpChevronDown, CircleFill, ClockBadgeCheckmark, ClockFill, CloudFill, CubeFill, CurvePointLeft, DialHigh, DocFill, DocOnClipboard, DocOnDoc, DocOnDocFill, DocOnMagnifyingglass as DocTextMagnifyingglass, DollarSign, EllipsisCircle, EllipsisCircleFill, Envelope, EnvelopeFill, ExclamationmarkOctagon, Eye, FigureWaterFitness, FlagFill, FlameFill, Folder, FolderFill, Form, FormContextProvider, FormStatusProvider, Gearshape, GearshapeFill, Ghost, GiftFill, GlobeAmericasFill, HareFill, Heading, House, HouseDeskclock, HouseFill, IPhoneHouse, Input, LightRibbon, LightbulbFill, LightbulbLed, Link, ListBulletClipboardFill, Magnifyingglass, MapPinEllipse, MinusPlusBatteryblock, Modal, ModalDialog, ModalTrigger, Network, NetworkShield, NewspaperFill, Number$1 as Number, PaperplaneFill, Person, PersonCropSquare, PersonFill, PersonFillQuestionmark, Phone, PhoneArrowUpRight, PhoneFill, PlayRectangleFill, Plus, Qrcode, RectanglePortraitAndArrowLeft, RectanglePortraitAndArrowLeftFill, Sensor, Signature, SolarPanel, SquareAndArrowDown, SquareAndArrowDownFill, SquareAndArrowUp, SquareAndArrowUpFill, SquareAndPencil, SquareAndPencilFill, SubmitButton, TextBubble, ThreePeople, ThreeRectanglesDesktop, ThreeRectanglesDesktopFill, Time, Trash, TrashFill, Tree, UmbrellaFill, xmark as Xmark,
|
|
1736
|
+
export { Airplane, Anchor, ArrowTriangle2CirclepathCircle, ArrowTriangle2CirclepathCircleFill, BagFill, Banknote, BellFill, BoltCar, BoltFill, BoltRingClosed, BoltTrianglebadgeExclamationmark, BookFill, BookmarkFill, BriefcaseFill, BubbleLeftFill, Building2Fill, Button, Calendar, CameraFill, CarFill, CartFill, ChartBarDocHorizontal, Checkmark, CheckmarkSeal, ChevronCompactDown, ChevronDown, ChevronLeft, ChevronLeftForwardslashChevronRight, ChevronRight, ChevronUpChevronDown, CircleFill, ClockBadgeCheckmark, ClockFill, CloudFill, CubeFill, CurvePointLeft, DialHigh, DocFill, DocOnClipboard, DocOnDoc, DocOnDocFill, DocOnMagnifyingglass as DocTextMagnifyingglass, DollarSign, EllipsisCircle, EllipsisCircleFill, Envelope, EnvelopeFill, ExclamationmarkOctagon, Eye, FigureWaterFitness, FlagFill, FlameFill, Folder, FolderFill, Form, FormContextProvider, FormStatusProvider, Gearshape, GearshapeFill, Ghost, GiftFill, GlobeAmericasFill, HareFill, Heading, House, HouseDeskclock, HouseFill, IPhoneHouse, Input, LightRibbon, LightbulbFill, LightbulbLed, Link, ListBulletClipboardFill, Magnifyingglass, MapPinEllipse, MinusPlusBatteryblock, Modal, ModalDialog, ModalTrigger, Network, NetworkShield, NewspaperFill, Number$1 as Number, PaperplaneFill, Person, PersonCropSquare, PersonFill, PersonFillQuestionmark, Phone, PhoneArrowUpRight, PhoneFill, PlayRectangleFill, Plus, Qrcode, RectanglePortraitAndArrowLeft, RectanglePortraitAndArrowLeftFill, Sensor, Signature, SolarPanel, SquareAndArrowDown, SquareAndArrowDownFill, SquareAndArrowUp, SquareAndArrowUpFill, SquareAndPencil, SquareAndPencilFill, SubmitButton, TextBubble, Textarea, ThreePeople, ThreeRectanglesDesktop, ThreeRectanglesDesktopFill, Time, Trash, TrashFill, Tree, UmbrellaFill, xmark as Xmark, defineField, useFormContext, useFormStatus };
|
|
2035
1737
|
//# sourceMappingURL=index.esm.js.map
|