@koaris/bloom-ui 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +295 -273
- package/dist/index.mjs +292 -270
- package/dist/tailwind.css +169 -129
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,8 +47,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
47
47
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
48
|
|
|
49
49
|
// src/index.tsx
|
|
50
|
-
var
|
|
51
|
-
__export(
|
|
50
|
+
var index_exports = {};
|
|
51
|
+
__export(index_exports, {
|
|
52
52
|
Avatar: () => Avatar,
|
|
53
53
|
Box: () => Box,
|
|
54
54
|
Button: () => Button,
|
|
@@ -57,42 +57,43 @@ __export(src_exports, {
|
|
|
57
57
|
Form: () => Form,
|
|
58
58
|
Heading: () => Heading,
|
|
59
59
|
Input: () => Input,
|
|
60
|
+
Link: () => Link,
|
|
60
61
|
MultiStep: () => MultiStep,
|
|
61
62
|
RadioGroup: () => RadioGroup,
|
|
62
63
|
Text: () => Text,
|
|
63
64
|
TextArea: () => TextArea,
|
|
64
65
|
TextInput: () => TextInput
|
|
65
66
|
});
|
|
66
|
-
module.exports = __toCommonJS(
|
|
67
|
+
module.exports = __toCommonJS(index_exports);
|
|
67
68
|
|
|
68
69
|
// ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
69
70
|
var CLASS_PART_SEPARATOR = "-";
|
|
70
|
-
|
|
71
|
+
var createClassGroupUtils = (config) => {
|
|
71
72
|
const classMap = createClassMap(config);
|
|
72
73
|
const {
|
|
73
74
|
conflictingClassGroups,
|
|
74
75
|
conflictingClassGroupModifiers
|
|
75
76
|
} = config;
|
|
76
|
-
|
|
77
|
+
const getClassGroupId = (className) => {
|
|
77
78
|
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
78
79
|
if (classParts[0] === "" && classParts.length !== 1) {
|
|
79
80
|
classParts.shift();
|
|
80
81
|
}
|
|
81
82
|
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
82
|
-
}
|
|
83
|
-
|
|
83
|
+
};
|
|
84
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
84
85
|
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
85
86
|
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
86
87
|
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
87
88
|
}
|
|
88
89
|
return conflicts;
|
|
89
|
-
}
|
|
90
|
+
};
|
|
90
91
|
return {
|
|
91
92
|
getClassGroupId,
|
|
92
93
|
getConflictingClassGroupIds
|
|
93
94
|
};
|
|
94
|
-
}
|
|
95
|
-
|
|
95
|
+
};
|
|
96
|
+
var getGroupRecursive = (classParts, classPartObject) => {
|
|
96
97
|
var _a;
|
|
97
98
|
if (classParts.length === 0) {
|
|
98
99
|
return classPartObject.classGroupId;
|
|
@@ -110,9 +111,9 @@ function getGroupRecursive(classParts, classPartObject) {
|
|
|
110
111
|
return (_a = classPartObject.validators.find(({
|
|
111
112
|
validator
|
|
112
113
|
}) => validator(classRest))) == null ? void 0 : _a.classGroupId;
|
|
113
|
-
}
|
|
114
|
+
};
|
|
114
115
|
var arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
115
|
-
|
|
116
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
116
117
|
if (arbitraryPropertyRegex.test(className)) {
|
|
117
118
|
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
118
119
|
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
@@ -120,8 +121,8 @@ function getGroupIdForArbitraryProperty(className) {
|
|
|
120
121
|
return "arbitrary.." + property;
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
}
|
|
124
|
-
|
|
124
|
+
};
|
|
125
|
+
var createClassMap = (config) => {
|
|
125
126
|
const {
|
|
126
127
|
theme,
|
|
127
128
|
prefix
|
|
@@ -135,8 +136,8 @@ function createClassMap(config) {
|
|
|
135
136
|
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
136
137
|
});
|
|
137
138
|
return classMap;
|
|
138
|
-
}
|
|
139
|
-
|
|
139
|
+
};
|
|
140
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
140
141
|
classGroup.forEach((classDefinition) => {
|
|
141
142
|
if (typeof classDefinition === "string") {
|
|
142
143
|
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
@@ -158,8 +159,8 @@ function processClassesRecursively(classGroup, classPartObject, classGroupId, th
|
|
|
158
159
|
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
159
160
|
});
|
|
160
161
|
});
|
|
161
|
-
}
|
|
162
|
-
|
|
162
|
+
};
|
|
163
|
+
var getPart = (classPartObject, path) => {
|
|
163
164
|
let currentClassPartObject = classPartObject;
|
|
164
165
|
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
165
166
|
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
@@ -171,11 +172,9 @@ function getPart(classPartObject, path) {
|
|
|
171
172
|
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
172
173
|
});
|
|
173
174
|
return currentClassPartObject;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
|
|
175
|
+
};
|
|
176
|
+
var isThemeGetter = (func) => func.isThemeGetter;
|
|
177
|
+
var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
|
|
179
178
|
if (!prefix) {
|
|
180
179
|
return classGroupEntries;
|
|
181
180
|
}
|
|
@@ -191,8 +190,8 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
|
|
|
191
190
|
});
|
|
192
191
|
return [classGroupId, prefixedClassGroup];
|
|
193
192
|
});
|
|
194
|
-
}
|
|
195
|
-
|
|
193
|
+
};
|
|
194
|
+
var createLruCache = (maxCacheSize) => {
|
|
196
195
|
if (maxCacheSize < 1) {
|
|
197
196
|
return {
|
|
198
197
|
get: () => void 0,
|
|
@@ -203,7 +202,7 @@ function createLruCache(maxCacheSize) {
|
|
|
203
202
|
let cacheSize = 0;
|
|
204
203
|
let cache = /* @__PURE__ */ new Map();
|
|
205
204
|
let previousCache = /* @__PURE__ */ new Map();
|
|
206
|
-
|
|
205
|
+
const update = (key, value) => {
|
|
207
206
|
cache.set(key, value);
|
|
208
207
|
cacheSize++;
|
|
209
208
|
if (cacheSize > maxCacheSize) {
|
|
@@ -211,7 +210,7 @@ function createLruCache(maxCacheSize) {
|
|
|
211
210
|
previousCache = cache;
|
|
212
211
|
cache = /* @__PURE__ */ new Map();
|
|
213
212
|
}
|
|
214
|
-
}
|
|
213
|
+
};
|
|
215
214
|
return {
|
|
216
215
|
get(key) {
|
|
217
216
|
let value = cache.get(key);
|
|
@@ -231,14 +230,17 @@ function createLruCache(maxCacheSize) {
|
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
232
|
};
|
|
234
|
-
}
|
|
233
|
+
};
|
|
235
234
|
var IMPORTANT_MODIFIER = "!";
|
|
236
|
-
|
|
237
|
-
const
|
|
235
|
+
var createParseClassName = (config) => {
|
|
236
|
+
const {
|
|
237
|
+
separator,
|
|
238
|
+
experimentalParseClassName
|
|
239
|
+
} = config;
|
|
238
240
|
const isSeparatorSingleCharacter = separator.length === 1;
|
|
239
241
|
const firstSeparatorCharacter = separator[0];
|
|
240
242
|
const separatorLength = separator.length;
|
|
241
|
-
|
|
243
|
+
const parseClassName = (className) => {
|
|
242
244
|
const modifiers = [];
|
|
243
245
|
let bracketDepth = 0;
|
|
244
246
|
let modifierStart = 0;
|
|
@@ -273,8 +275,15 @@ function createSplitModifiers(config) {
|
|
|
273
275
|
maybePostfixModifierPosition
|
|
274
276
|
};
|
|
275
277
|
};
|
|
276
|
-
|
|
277
|
-
|
|
278
|
+
if (experimentalParseClassName) {
|
|
279
|
+
return (className) => experimentalParseClassName({
|
|
280
|
+
className,
|
|
281
|
+
parseClassName
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return parseClassName;
|
|
285
|
+
};
|
|
286
|
+
var sortModifiers = (modifiers) => {
|
|
278
287
|
if (modifiers.length <= 1) {
|
|
279
288
|
return modifiers;
|
|
280
289
|
}
|
|
@@ -291,73 +300,59 @@ function sortModifiers(modifiers) {
|
|
|
291
300
|
});
|
|
292
301
|
sortedModifiers.push(...unsortedModifiers.sort());
|
|
293
302
|
return sortedModifiers;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}, createClassUtils(config));
|
|
300
|
-
}
|
|
303
|
+
};
|
|
304
|
+
var createConfigUtils = (config) => __spreadValues({
|
|
305
|
+
cache: createLruCache(config.cacheSize),
|
|
306
|
+
parseClassName: createParseClassName(config)
|
|
307
|
+
}, createClassGroupUtils(config));
|
|
301
308
|
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
302
|
-
|
|
309
|
+
var mergeClassList = (classList, configUtils) => {
|
|
303
310
|
const {
|
|
304
|
-
|
|
311
|
+
parseClassName,
|
|
305
312
|
getClassGroupId,
|
|
306
313
|
getConflictingClassGroupIds
|
|
307
314
|
} = configUtils;
|
|
308
|
-
const classGroupsInConflict =
|
|
309
|
-
|
|
315
|
+
const classGroupsInConflict = [];
|
|
316
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
317
|
+
let result = "";
|
|
318
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
319
|
+
const originalClassName = classNames[index];
|
|
310
320
|
const {
|
|
311
321
|
modifiers,
|
|
312
322
|
hasImportantModifier,
|
|
313
323
|
baseClassName,
|
|
314
324
|
maybePostfixModifierPosition
|
|
315
|
-
} =
|
|
316
|
-
let classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
325
|
+
} = parseClassName(originalClassName);
|
|
317
326
|
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
327
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
318
328
|
if (!classGroupId) {
|
|
319
|
-
if (!
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
originalClassName
|
|
323
|
-
};
|
|
329
|
+
if (!hasPostfixModifier) {
|
|
330
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
331
|
+
continue;
|
|
324
332
|
}
|
|
325
333
|
classGroupId = getClassGroupId(baseClassName);
|
|
326
334
|
if (!classGroupId) {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
originalClassName
|
|
330
|
-
};
|
|
335
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
336
|
+
continue;
|
|
331
337
|
}
|
|
332
338
|
hasPostfixModifier = false;
|
|
333
339
|
}
|
|
334
340
|
const variantModifier = sortModifiers(modifiers).join(":");
|
|
335
341
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
336
|
-
return {
|
|
337
|
-
isTailwindClass: true,
|
|
338
|
-
modifierId,
|
|
339
|
-
classGroupId,
|
|
340
|
-
originalClassName,
|
|
341
|
-
hasPostfixModifier
|
|
342
|
-
};
|
|
343
|
-
}).reverse().filter((parsed) => {
|
|
344
|
-
if (!parsed.isTailwindClass) {
|
|
345
|
-
return true;
|
|
346
|
-
}
|
|
347
|
-
const {
|
|
348
|
-
modifierId,
|
|
349
|
-
classGroupId,
|
|
350
|
-
hasPostfixModifier
|
|
351
|
-
} = parsed;
|
|
352
342
|
const classId = modifierId + classGroupId;
|
|
353
|
-
if (classGroupsInConflict.
|
|
354
|
-
|
|
343
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
344
|
+
continue;
|
|
355
345
|
}
|
|
356
|
-
classGroupsInConflict.
|
|
357
|
-
getConflictingClassGroupIds(classGroupId, hasPostfixModifier)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
346
|
+
classGroupsInConflict.push(classId);
|
|
347
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
348
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
349
|
+
const group = conflictGroups[i];
|
|
350
|
+
classGroupsInConflict.push(modifierId + group);
|
|
351
|
+
}
|
|
352
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
353
|
+
}
|
|
354
|
+
return result;
|
|
355
|
+
};
|
|
361
356
|
function twJoin() {
|
|
362
357
|
let index = 0;
|
|
363
358
|
let argument;
|
|
@@ -373,7 +368,7 @@ function twJoin() {
|
|
|
373
368
|
}
|
|
374
369
|
return string;
|
|
375
370
|
}
|
|
376
|
-
|
|
371
|
+
var toValue = (mix) => {
|
|
377
372
|
if (typeof mix === "string") {
|
|
378
373
|
return mix;
|
|
379
374
|
}
|
|
@@ -388,7 +383,7 @@ function toValue(mix) {
|
|
|
388
383
|
}
|
|
389
384
|
}
|
|
390
385
|
return string;
|
|
391
|
-
}
|
|
386
|
+
};
|
|
392
387
|
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
393
388
|
let configUtils;
|
|
394
389
|
let cacheGet;
|
|
@@ -415,60 +410,35 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
415
410
|
return functionToCall(twJoin.apply(null, arguments));
|
|
416
411
|
};
|
|
417
412
|
}
|
|
418
|
-
|
|
413
|
+
var fromTheme = (key) => {
|
|
419
414
|
const themeGetter = (theme) => theme[key] || [];
|
|
420
415
|
themeGetter.isThemeGetter = true;
|
|
421
416
|
return themeGetter;
|
|
422
|
-
}
|
|
417
|
+
};
|
|
423
418
|
var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
|
|
424
419
|
var fractionRegex = /^\d+\/\d+$/;
|
|
425
420
|
var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
|
|
426
421
|
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
427
422
|
var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
428
|
-
var
|
|
423
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
424
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
429
425
|
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
439
|
-
function isArbitraryNumber(value) {
|
|
440
|
-
return getIsArbitraryValue(value, "number", isNumber);
|
|
441
|
-
}
|
|
442
|
-
function isInteger(value) {
|
|
443
|
-
return Boolean(value) && Number.isInteger(Number(value));
|
|
444
|
-
}
|
|
445
|
-
function isPercent(value) {
|
|
446
|
-
return value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
447
|
-
}
|
|
448
|
-
function isArbitraryValue(value) {
|
|
449
|
-
return arbitraryValueRegex.test(value);
|
|
450
|
-
}
|
|
451
|
-
function isTshirtSize(value) {
|
|
452
|
-
return tshirtUnitRegex.test(value);
|
|
453
|
-
}
|
|
426
|
+
var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
|
|
427
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
|
|
428
|
+
var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
|
|
429
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
|
|
430
|
+
var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
|
|
431
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
432
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
433
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
454
434
|
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
function isArbitraryPosition(value) {
|
|
459
|
-
return getIsArbitraryValue(value, "position", isNever);
|
|
460
|
-
}
|
|
435
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
436
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
461
437
|
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
return getIsArbitraryValue(value, "", isShadow);
|
|
467
|
-
}
|
|
468
|
-
function isAny() {
|
|
469
|
-
return true;
|
|
470
|
-
}
|
|
471
|
-
function getIsArbitraryValue(value, label, testValue) {
|
|
438
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
|
|
439
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
|
|
440
|
+
var isAny = () => true;
|
|
441
|
+
var getIsArbitraryValue = (value, label, testValue) => {
|
|
472
442
|
const result = arbitraryValueRegex.exec(value);
|
|
473
443
|
if (result) {
|
|
474
444
|
if (result[1]) {
|
|
@@ -477,20 +447,17 @@ function getIsArbitraryValue(value, label, testValue) {
|
|
|
477
447
|
return testValue(result[2]);
|
|
478
448
|
}
|
|
479
449
|
return false;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return imageRegex.test(value);
|
|
492
|
-
}
|
|
493
|
-
function getDefaultConfig() {
|
|
450
|
+
};
|
|
451
|
+
var isLengthOnly = (value) => (
|
|
452
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
453
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
454
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
455
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
456
|
+
);
|
|
457
|
+
var isNever = () => false;
|
|
458
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
459
|
+
var isImage = (value) => imageRegex.test(value);
|
|
460
|
+
var getDefaultConfig = () => {
|
|
494
461
|
const colors = fromTheme("colors");
|
|
495
462
|
const spacing = fromTheme("spacing");
|
|
496
463
|
const blur = fromTheme("blur");
|
|
@@ -524,11 +491,10 @@ function getDefaultConfig() {
|
|
|
524
491
|
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
525
492
|
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
526
493
|
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
527
|
-
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"
|
|
494
|
+
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
528
495
|
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
529
496
|
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
530
497
|
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
531
|
-
const getNumber = () => [isNumber, isArbitraryNumber];
|
|
532
498
|
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
533
499
|
return {
|
|
534
500
|
cacheSize: 500,
|
|
@@ -537,12 +503,12 @@ function getDefaultConfig() {
|
|
|
537
503
|
colors: [isAny],
|
|
538
504
|
spacing: [isLength, isArbitraryLength],
|
|
539
505
|
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
540
|
-
brightness:
|
|
506
|
+
brightness: getNumberAndArbitrary(),
|
|
541
507
|
borderColor: [colors],
|
|
542
508
|
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
543
509
|
borderSpacing: getSpacingWithArbitrary(),
|
|
544
510
|
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
545
|
-
contrast:
|
|
511
|
+
contrast: getNumberAndArbitrary(),
|
|
546
512
|
grayscale: getZeroAndEmpty(),
|
|
547
513
|
hueRotate: getNumberAndArbitrary(),
|
|
548
514
|
invert: getZeroAndEmpty(),
|
|
@@ -551,10 +517,10 @@ function getDefaultConfig() {
|
|
|
551
517
|
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
552
518
|
inset: getSpacingWithAutoAndArbitrary(),
|
|
553
519
|
margin: getSpacingWithAutoAndArbitrary(),
|
|
554
|
-
opacity:
|
|
520
|
+
opacity: getNumberAndArbitrary(),
|
|
555
521
|
padding: getSpacingWithArbitrary(),
|
|
556
|
-
saturate:
|
|
557
|
-
scale:
|
|
522
|
+
saturate: getNumberAndArbitrary(),
|
|
523
|
+
scale: getNumberAndArbitrary(),
|
|
558
524
|
sepia: getZeroAndEmpty(),
|
|
559
525
|
skew: getNumberAndArbitrary(),
|
|
560
526
|
space: getSpacingWithArbitrary(),
|
|
@@ -1255,7 +1221,7 @@ function getDefaultConfig() {
|
|
|
1255
1221
|
* Font Variant Numeric
|
|
1256
1222
|
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1257
1223
|
*/
|
|
1258
|
-
"fvn-fraction": ["diagonal-fractions", "stacked-
|
|
1224
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1259
1225
|
/**
|
|
1260
1226
|
* Letter Spacing
|
|
1261
1227
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
@@ -1779,6 +1745,20 @@ function getDefaultConfig() {
|
|
|
1779
1745
|
"border-color-y": [{
|
|
1780
1746
|
"border-y": [borderColor]
|
|
1781
1747
|
}],
|
|
1748
|
+
/**
|
|
1749
|
+
* Border Color S
|
|
1750
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1751
|
+
*/
|
|
1752
|
+
"border-color-s": [{
|
|
1753
|
+
"border-s": [borderColor]
|
|
1754
|
+
}],
|
|
1755
|
+
/**
|
|
1756
|
+
* Border Color E
|
|
1757
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1758
|
+
*/
|
|
1759
|
+
"border-color-e": [{
|
|
1760
|
+
"border-e": [borderColor]
|
|
1761
|
+
}],
|
|
1782
1762
|
/**
|
|
1783
1763
|
* Border Color Top
|
|
1784
1764
|
* @see https://tailwindcss.com/docs/border-color
|
|
@@ -1909,7 +1889,7 @@ function getDefaultConfig() {
|
|
|
1909
1889
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1910
1890
|
*/
|
|
1911
1891
|
"mix-blend": [{
|
|
1912
|
-
"mix-blend": getBlendModes()
|
|
1892
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
1913
1893
|
}],
|
|
1914
1894
|
/**
|
|
1915
1895
|
* Background Blend Mode
|
|
@@ -2525,7 +2505,7 @@ function getDefaultConfig() {
|
|
|
2525
2505
|
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2526
2506
|
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2527
2507
|
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2528
|
-
"border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2508
|
+
"border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2529
2509
|
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2530
2510
|
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2531
2511
|
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
@@ -2543,7 +2523,7 @@ function getDefaultConfig() {
|
|
|
2543
2523
|
"font-size": ["leading"]
|
|
2544
2524
|
}
|
|
2545
2525
|
};
|
|
2546
|
-
}
|
|
2526
|
+
};
|
|
2547
2527
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
2548
2528
|
|
|
2549
2529
|
// src/components/Card/index.tsx
|
|
@@ -2581,10 +2561,10 @@ var Card = (_a) => {
|
|
|
2581
2561
|
),
|
|
2582
2562
|
onClick,
|
|
2583
2563
|
children: [
|
|
2584
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: rest.image, alt: rest.title, width: imageSize }),
|
|
2585
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: twMerge(direction === "col" && "text-center"), children: [
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: rest.image, alt: rest.title, width: imageSize, height: "auto" }),
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: twMerge(direction === "col" && "text-center", "flex flex-col gap-2"), children: [
|
|
2586
2566
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-xl font-bold font-default leading-tight", children: rest.title }),
|
|
2587
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "", children: rest.content })
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-justify", children: rest.content })
|
|
2588
2568
|
] })
|
|
2589
2569
|
]
|
|
2590
2570
|
}
|
|
@@ -2611,9 +2591,9 @@ var Button = (_a) => {
|
|
|
2611
2591
|
"button",
|
|
2612
2592
|
__spreadValues({
|
|
2613
2593
|
className: twMerge(
|
|
2614
|
-
"flex items-center justify-center rounded-
|
|
2594
|
+
"flex gap-4 items-center justify-center rounded-sm px-8 py-2 text-md font-medium hover:shadow-md hover:shadow-neutral-500 w-full max-w-[180px]",
|
|
2615
2595
|
variant === "primary" && "bg-orange-500 text-neutral hover:bg-orange-700",
|
|
2616
|
-
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:bg-
|
|
2596
|
+
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:text-orange-100 hover:bg-orange-500",
|
|
2617
2597
|
size === "sm" && "px-6 py-1",
|
|
2618
2598
|
typeof rest.children !== "string" && "px-4",
|
|
2619
2599
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
@@ -2624,10 +2604,40 @@ var Button = (_a) => {
|
|
|
2624
2604
|
);
|
|
2625
2605
|
};
|
|
2626
2606
|
|
|
2607
|
+
// src/components/Link/index.tsx
|
|
2608
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2609
|
+
var Link = (_a) => {
|
|
2610
|
+
var _b = _a, {
|
|
2611
|
+
className,
|
|
2612
|
+
disabled,
|
|
2613
|
+
url,
|
|
2614
|
+
newPage = true,
|
|
2615
|
+
onClick
|
|
2616
|
+
} = _b, rest = __objRest(_b, [
|
|
2617
|
+
"className",
|
|
2618
|
+
"disabled",
|
|
2619
|
+
"url",
|
|
2620
|
+
"newPage",
|
|
2621
|
+
"onClick"
|
|
2622
|
+
]);
|
|
2623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2624
|
+
"a",
|
|
2625
|
+
__spreadValues(__spreadValues({
|
|
2626
|
+
className: twMerge(
|
|
2627
|
+
"text-blue-800 font-bold",
|
|
2628
|
+
typeof rest.children !== "string" && "px-4",
|
|
2629
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2630
|
+
className
|
|
2631
|
+
),
|
|
2632
|
+
href: url
|
|
2633
|
+
}, newPage && { target: "_blank", rel: "noopener noreferrer" }), rest)
|
|
2634
|
+
);
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2627
2637
|
// src/components/RadioGroup/index.tsx
|
|
2628
2638
|
var import_react = require("react");
|
|
2629
2639
|
var import_fi = require("react-icons/fi");
|
|
2630
|
-
var
|
|
2640
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
2631
2641
|
var RadioGroup = ({
|
|
2632
2642
|
disabled,
|
|
2633
2643
|
options = [
|
|
@@ -2641,8 +2651,8 @@ var RadioGroup = ({
|
|
|
2641
2651
|
const handleOptionChange = (value) => {
|
|
2642
2652
|
setSelectedOption(value);
|
|
2643
2653
|
};
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col ", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex py-2 items-center", children: [
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
2646
2656
|
"label",
|
|
2647
2657
|
{
|
|
2648
2658
|
htmlFor: `radio${option.id}`,
|
|
@@ -2653,7 +2663,7 @@ var RadioGroup = ({
|
|
|
2653
2663
|
className
|
|
2654
2664
|
),
|
|
2655
2665
|
children: [
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2657
2667
|
"input",
|
|
2658
2668
|
{
|
|
2659
2669
|
type: "radio",
|
|
@@ -2667,24 +2677,24 @@ var RadioGroup = ({
|
|
|
2667
2677
|
disabled
|
|
2668
2678
|
}
|
|
2669
2679
|
),
|
|
2670
|
-
selectedOption === option.value && /* @__PURE__ */ (0,
|
|
2680
|
+
selectedOption === option.value && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_fi.FiCheck, { color: "#FFFFFF", size: 12, style: { strokeWidth: 4 } })
|
|
2671
2681
|
]
|
|
2672
2682
|
}
|
|
2673
2683
|
),
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
2684
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "px-2", children: option.label })
|
|
2675
2685
|
] }, option.id)) });
|
|
2676
2686
|
};
|
|
2677
2687
|
|
|
2678
2688
|
// src/components/Checkbox/index.tsx
|
|
2679
2689
|
var import_react2 = require("react");
|
|
2680
2690
|
var import_fi2 = require("react-icons/fi");
|
|
2681
|
-
var
|
|
2691
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2682
2692
|
var Checkbox = ({ className, required, disabled }) => {
|
|
2683
2693
|
const [selected, setSelected] = (0, import_react2.useState)(false);
|
|
2684
2694
|
const handleCheckboxChange = (value) => {
|
|
2685
2695
|
setSelected(!value);
|
|
2686
2696
|
};
|
|
2687
|
-
return /* @__PURE__ */ (0,
|
|
2697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
2688
2698
|
"label",
|
|
2689
2699
|
{
|
|
2690
2700
|
className: twMerge(
|
|
@@ -2694,7 +2704,7 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2694
2704
|
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2695
2705
|
),
|
|
2696
2706
|
children: [
|
|
2697
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2698
2708
|
"input",
|
|
2699
2709
|
{
|
|
2700
2710
|
type: "checkbox",
|
|
@@ -2708,7 +2718,7 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2708
2718
|
)
|
|
2709
2719
|
}
|
|
2710
2720
|
),
|
|
2711
|
-
selected && /* @__PURE__ */ (0,
|
|
2721
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi2.FiCheck, { color: "#FFFFFF", size: 14, style: { strokeWidth: 4 } })
|
|
2712
2722
|
]
|
|
2713
2723
|
}
|
|
2714
2724
|
) });
|
|
@@ -2780,65 +2790,102 @@ var masks = {
|
|
|
2780
2790
|
var masks_default = masks;
|
|
2781
2791
|
|
|
2782
2792
|
// src/components/Input/index.tsx
|
|
2783
|
-
var
|
|
2784
|
-
var Input = (
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
/* @__PURE__ */ (0,
|
|
2793
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2794
|
+
var Input = (0, import_react3.forwardRef)(
|
|
2795
|
+
(_a, ref) => {
|
|
2796
|
+
var _b = _a, {
|
|
2797
|
+
className,
|
|
2798
|
+
disabled,
|
|
2799
|
+
placeholder,
|
|
2800
|
+
value,
|
|
2801
|
+
validated,
|
|
2802
|
+
error,
|
|
2803
|
+
required,
|
|
2804
|
+
type,
|
|
2805
|
+
onClick
|
|
2806
|
+
} = _b, rest = __objRest(_b, [
|
|
2807
|
+
"className",
|
|
2808
|
+
"disabled",
|
|
2809
|
+
"placeholder",
|
|
2810
|
+
"value",
|
|
2811
|
+
"validated",
|
|
2812
|
+
"error",
|
|
2813
|
+
"required",
|
|
2814
|
+
"type",
|
|
2815
|
+
"onClick"
|
|
2816
|
+
]);
|
|
2817
|
+
const [selected, setSelected] = (0, import_react3.useState)(false);
|
|
2818
|
+
const [inputValue, setInputValue] = (0, import_react3.useState)(value);
|
|
2819
|
+
const [hasNumber, setHasNumber] = (0, import_react3.useState)(false);
|
|
2820
|
+
const [hasSpecialCharacteres, setHasSpecialCharacteres] = (0, import_react3.useState)(false);
|
|
2821
|
+
const [hasEightCharacteres, setHasEightCharacteres] = (0, import_react3.useState)(false);
|
|
2822
|
+
const handleFocus = () => {
|
|
2823
|
+
setSelected(!selected);
|
|
2824
|
+
};
|
|
2825
|
+
const handleBlur = () => {
|
|
2826
|
+
setSelected(false);
|
|
2827
|
+
};
|
|
2828
|
+
const handleInput = (event) => {
|
|
2829
|
+
setInputValue(event.currentTarget.value);
|
|
2830
|
+
checkPassword(event.currentTarget.value);
|
|
2831
|
+
};
|
|
2832
|
+
(0, import_react3.useEffect)(() => {
|
|
2833
|
+
setInputValue(value);
|
|
2834
|
+
}, [value]);
|
|
2835
|
+
const checkPassword = (value2) => {
|
|
2836
|
+
setHasSpecialCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[0])) !== null);
|
|
2837
|
+
setHasNumber((value2 == null ? void 0 : value2.match(masks_default.password[1])) !== null);
|
|
2838
|
+
setHasEightCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[2])) !== null);
|
|
2839
|
+
};
|
|
2840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2841
|
+
type === "text" || type === "password" || type === "date" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2842
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2843
|
+
"input",
|
|
2844
|
+
__spreadValues({
|
|
2845
|
+
type,
|
|
2846
|
+
required,
|
|
2847
|
+
ref,
|
|
2848
|
+
className: twMerge(
|
|
2849
|
+
"flex items-center justify-center border-2 border-neutral rounded-sm w-full px-3 py-2 text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2850
|
+
className,
|
|
2851
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2852
|
+
selected === true && "border-2 border-orange-500",
|
|
2853
|
+
validated === true && "border-2 border-green-900",
|
|
2854
|
+
error === true && "border-2 border-red-900"
|
|
2855
|
+
),
|
|
2856
|
+
onClick,
|
|
2857
|
+
onFocus: handleFocus,
|
|
2858
|
+
onChange: handleInput,
|
|
2859
|
+
onBlur: handleBlur,
|
|
2860
|
+
placeholder,
|
|
2861
|
+
value: inputValue
|
|
2862
|
+
}, rest)
|
|
2863
|
+
),
|
|
2864
|
+
type === "password" && (!hasEightCharacteres || !hasSpecialCharacteres || !hasNumber) && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("ul", { className: "py-1", children: [
|
|
2865
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2866
|
+
hasEightCharacteres ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiX, {}),
|
|
2867
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "px-1", children: "Pelo menos 8 caracteres" })
|
|
2868
|
+
] }),
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2870
|
+
hasSpecialCharacteres ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiX, {}),
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2872
|
+
] }),
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2874
|
+
hasNumber ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_fi3.FiX, {}),
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2876
|
+
] })
|
|
2877
|
+
] })
|
|
2878
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2832
2879
|
"input",
|
|
2833
2880
|
__spreadValues({
|
|
2834
2881
|
type,
|
|
2835
2882
|
required,
|
|
2883
|
+
ref,
|
|
2836
2884
|
className: twMerge(
|
|
2837
2885
|
"flex items-center justify-center border-2 border-neutral rounded-sm w-full px-3 py-2 text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2838
2886
|
className,
|
|
2839
2887
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2840
2888
|
selected === true && "border-2 border-orange-500",
|
|
2841
|
-
validated === true && "border-2 border-green-900",
|
|
2842
2889
|
error === true && "border-2 border-red-900"
|
|
2843
2890
|
),
|
|
2844
2891
|
onClick,
|
|
@@ -2849,47 +2896,15 @@ var Input = (_a) => {
|
|
|
2849
2896
|
value: inputValue
|
|
2850
2897
|
}, rest)
|
|
2851
2898
|
),
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2858
|
-
hasSpecialCharacteres ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiX, {}),
|
|
2859
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2860
|
-
] }),
|
|
2861
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2862
|
-
hasNumber ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiX, {}),
|
|
2863
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2864
|
-
] })
|
|
2865
|
-
] })
|
|
2866
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2867
|
-
"input",
|
|
2868
|
-
__spreadValues({
|
|
2869
|
-
type,
|
|
2870
|
-
required,
|
|
2871
|
-
className: twMerge(
|
|
2872
|
-
"flex items-center justify-center border-2 border-neutral rounded-sm w-full px-3 py-2 text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2873
|
-
className,
|
|
2874
|
-
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2875
|
-
selected === true && "border-2 border-orange-500",
|
|
2876
|
-
error === true && "border-2 border-red-900"
|
|
2877
|
-
),
|
|
2878
|
-
onClick,
|
|
2879
|
-
onFocus: handleFocus,
|
|
2880
|
-
onChange: handleInput,
|
|
2881
|
-
onBlur: handleBlur,
|
|
2882
|
-
placeholder,
|
|
2883
|
-
value: inputValue
|
|
2884
|
-
}, rest)
|
|
2885
|
-
),
|
|
2886
|
-
error === true && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2887
|
-
] });
|
|
2888
|
-
};
|
|
2899
|
+
error === true && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2900
|
+
] });
|
|
2901
|
+
}
|
|
2902
|
+
);
|
|
2903
|
+
Input.displayName = "Input";
|
|
2889
2904
|
|
|
2890
2905
|
// src/components/TextInput/index.tsx
|
|
2891
2906
|
var import_react4 = require("react");
|
|
2892
|
-
var
|
|
2907
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2893
2908
|
var TextInput = (0, import_react4.forwardRef)(
|
|
2894
2909
|
(_a, ref) => {
|
|
2895
2910
|
var _b = _a, {
|
|
@@ -2927,7 +2942,7 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
|
2927
2942
|
(0, import_react4.useEffect)(() => {
|
|
2928
2943
|
setInputValue(value);
|
|
2929
2944
|
}, [value]);
|
|
2930
|
-
return /* @__PURE__ */ (0,
|
|
2945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
2931
2946
|
"div",
|
|
2932
2947
|
{
|
|
2933
2948
|
className: twMerge(
|
|
@@ -2939,8 +2954,8 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
|
2939
2954
|
error === true && "border-2 border-red-900"
|
|
2940
2955
|
),
|
|
2941
2956
|
children: [
|
|
2942
|
-
!!prefix && /* @__PURE__ */ (0,
|
|
2943
|
-
/* @__PURE__ */ (0,
|
|
2957
|
+
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-neutral-500 sm:text-sm", children: prefix }),
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2944
2959
|
"input",
|
|
2945
2960
|
__spreadValues({
|
|
2946
2961
|
type,
|
|
@@ -2971,23 +2986,27 @@ TextInput.displayName = "TextInput";
|
|
|
2971
2986
|
|
|
2972
2987
|
// src/components/TextArea/index.tsx
|
|
2973
2988
|
var import_react5 = require("react");
|
|
2974
|
-
var
|
|
2989
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2975
2990
|
var TextArea = (_a) => {
|
|
2976
2991
|
var _b = _a, {
|
|
2977
2992
|
className,
|
|
2978
2993
|
disabled,
|
|
2994
|
+
reference,
|
|
2979
2995
|
value,
|
|
2980
2996
|
error,
|
|
2981
2997
|
required,
|
|
2982
2998
|
placeholder,
|
|
2999
|
+
resize,
|
|
2983
3000
|
onClick
|
|
2984
3001
|
} = _b, rest = __objRest(_b, [
|
|
2985
3002
|
"className",
|
|
2986
3003
|
"disabled",
|
|
3004
|
+
"reference",
|
|
2987
3005
|
"value",
|
|
2988
3006
|
"error",
|
|
2989
3007
|
"required",
|
|
2990
3008
|
"placeholder",
|
|
3009
|
+
"resize",
|
|
2991
3010
|
"onClick"
|
|
2992
3011
|
]);
|
|
2993
3012
|
const [selected, setSelected] = (0, import_react5.useState)(false);
|
|
@@ -3004,10 +3023,11 @@ var TextArea = (_a) => {
|
|
|
3004
3023
|
(0, import_react5.useEffect)(() => {
|
|
3005
3024
|
setInputValue(value);
|
|
3006
3025
|
}, [value]);
|
|
3007
|
-
return /* @__PURE__ */ (0,
|
|
3026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
3008
3027
|
"textarea",
|
|
3009
3028
|
__spreadValues({
|
|
3010
3029
|
required,
|
|
3030
|
+
ref: reference,
|
|
3011
3031
|
disabled,
|
|
3012
3032
|
className: twMerge(
|
|
3013
3033
|
"rounded-sm w-full px-3 py-2 border-2 border-neutral text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
@@ -3015,7 +3035,8 @@ var TextArea = (_a) => {
|
|
|
3015
3035
|
className,
|
|
3016
3036
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
3017
3037
|
selected === true && "border-2 border-orange-500",
|
|
3018
|
-
error === true && "border-2 border-red-900"
|
|
3038
|
+
error === true && "border-2 border-red-900",
|
|
3039
|
+
resize === false && "resize-none overflow-hidden"
|
|
3019
3040
|
),
|
|
3020
3041
|
onClick,
|
|
3021
3042
|
onFocus: handleFocus,
|
|
@@ -3028,7 +3049,7 @@ var TextArea = (_a) => {
|
|
|
3028
3049
|
};
|
|
3029
3050
|
|
|
3030
3051
|
// src/components/Text/index.tsx
|
|
3031
|
-
var
|
|
3052
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
3032
3053
|
var Text = (_a) => {
|
|
3033
3054
|
var _b = _a, {
|
|
3034
3055
|
children,
|
|
@@ -3060,11 +3081,11 @@ var Text = (_a) => {
|
|
|
3060
3081
|
"9xl": "text-9xl"
|
|
3061
3082
|
}[size];
|
|
3062
3083
|
const Tag = tag;
|
|
3063
|
-
return /* @__PURE__ */ (0,
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
3064
3085
|
};
|
|
3065
3086
|
|
|
3066
3087
|
// src/components/Heading/index.tsx
|
|
3067
|
-
var
|
|
3088
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
3068
3089
|
var Heading = ({
|
|
3069
3090
|
children,
|
|
3070
3091
|
color = "neutral-800",
|
|
@@ -3087,11 +3108,11 @@ var Heading = ({
|
|
|
3087
3108
|
"9xl": "text-9xl"
|
|
3088
3109
|
}[size];
|
|
3089
3110
|
const Tag = tag;
|
|
3090
|
-
return /* @__PURE__ */ (0,
|
|
3111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Tag, { className: twMerge(`text-${color} ${fontSize}`, className), children });
|
|
3091
3112
|
};
|
|
3092
3113
|
|
|
3093
3114
|
// src/components/Box/index.tsx
|
|
3094
|
-
var
|
|
3115
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3095
3116
|
var Box = ({
|
|
3096
3117
|
className,
|
|
3097
3118
|
children,
|
|
@@ -3099,7 +3120,7 @@ var Box = ({
|
|
|
3099
3120
|
variant = "secondary"
|
|
3100
3121
|
}) => {
|
|
3101
3122
|
const Tag = tag;
|
|
3102
|
-
return /* @__PURE__ */ (0,
|
|
3123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3103
3124
|
Tag,
|
|
3104
3125
|
{
|
|
3105
3126
|
className: twMerge(
|
|
@@ -3114,7 +3135,7 @@ var Box = ({
|
|
|
3114
3135
|
};
|
|
3115
3136
|
|
|
3116
3137
|
// src/components/Form/index.tsx
|
|
3117
|
-
var
|
|
3138
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3118
3139
|
var Form = (_a) => {
|
|
3119
3140
|
var _b = _a, {
|
|
3120
3141
|
className,
|
|
@@ -3127,7 +3148,7 @@ var Form = (_a) => {
|
|
|
3127
3148
|
"variant",
|
|
3128
3149
|
"orientation"
|
|
3129
3150
|
]);
|
|
3130
|
-
return /* @__PURE__ */ (0,
|
|
3151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3131
3152
|
"form",
|
|
3132
3153
|
__spreadProps(__spreadValues({
|
|
3133
3154
|
className: twMerge(
|
|
@@ -3145,10 +3166,10 @@ var Form = (_a) => {
|
|
|
3145
3166
|
|
|
3146
3167
|
// src/components/Avatar/index.tsx
|
|
3147
3168
|
var import_fa = require("react-icons/fa");
|
|
3148
|
-
var
|
|
3169
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3149
3170
|
var Avatar = (_a) => {
|
|
3150
3171
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
3151
|
-
return /* @__PURE__ */ (0,
|
|
3172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3152
3173
|
"div",
|
|
3153
3174
|
{
|
|
3154
3175
|
className: twMerge(
|
|
@@ -3157,18 +3178,18 @@ var Avatar = (_a) => {
|
|
|
3157
3178
|
bg-neutral-600 justify-center`,
|
|
3158
3179
|
className
|
|
3159
3180
|
),
|
|
3160
|
-
children: rest.src ? /* @__PURE__ */ (0,
|
|
3181
|
+
children: rest.src ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", __spreadValues({ className: "w-full h-full object-cover rounded-full" }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_fa.FaUser, { color: "#FFFFFF", size: 24 })
|
|
3161
3182
|
}
|
|
3162
3183
|
);
|
|
3163
3184
|
};
|
|
3164
3185
|
|
|
3165
3186
|
// src/components/MultiStep/index.tsx
|
|
3166
|
-
var
|
|
3187
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3167
3188
|
var MultiStep = ({ className, size, currentStep }) => {
|
|
3168
|
-
return /* @__PURE__ */ (0,
|
|
3169
|
-
/* @__PURE__ */ (0,
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3171
|
-
return /* @__PURE__ */ (0,
|
|
3189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-full", children: [
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text, { tag: "label", color: "neutral-100", size: "xs", children: `Passo ${currentStep} de ${size}` }),
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: `grid gap-2 grid-cols-${size} grid-flow-col mt-1`, children: Array.from(Array(size).keys()).map((_, index) => {
|
|
3192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3172
3193
|
"div",
|
|
3173
3194
|
{
|
|
3174
3195
|
className: twMerge(
|
|
@@ -3192,6 +3213,7 @@ var MultiStep = ({ className, size, currentStep }) => {
|
|
|
3192
3213
|
Form,
|
|
3193
3214
|
Heading,
|
|
3194
3215
|
Input,
|
|
3216
|
+
Link,
|
|
3195
3217
|
MultiStep,
|
|
3196
3218
|
RadioGroup,
|
|
3197
3219
|
Text,
|