@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.mjs
CHANGED
|
@@ -32,32 +32,32 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
|
|
33
33
|
// ../../node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
34
34
|
var CLASS_PART_SEPARATOR = "-";
|
|
35
|
-
|
|
35
|
+
var createClassGroupUtils = (config) => {
|
|
36
36
|
const classMap = createClassMap(config);
|
|
37
37
|
const {
|
|
38
38
|
conflictingClassGroups,
|
|
39
39
|
conflictingClassGroupModifiers
|
|
40
40
|
} = config;
|
|
41
|
-
|
|
41
|
+
const getClassGroupId = (className) => {
|
|
42
42
|
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
43
43
|
if (classParts[0] === "" && classParts.length !== 1) {
|
|
44
44
|
classParts.shift();
|
|
45
45
|
}
|
|
46
46
|
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
47
|
-
}
|
|
48
|
-
|
|
47
|
+
};
|
|
48
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
49
49
|
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
50
50
|
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
51
51
|
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
52
52
|
}
|
|
53
53
|
return conflicts;
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
return {
|
|
56
56
|
getClassGroupId,
|
|
57
57
|
getConflictingClassGroupIds
|
|
58
58
|
};
|
|
59
|
-
}
|
|
60
|
-
|
|
59
|
+
};
|
|
60
|
+
var getGroupRecursive = (classParts, classPartObject) => {
|
|
61
61
|
var _a;
|
|
62
62
|
if (classParts.length === 0) {
|
|
63
63
|
return classPartObject.classGroupId;
|
|
@@ -75,9 +75,9 @@ function getGroupRecursive(classParts, classPartObject) {
|
|
|
75
75
|
return (_a = classPartObject.validators.find(({
|
|
76
76
|
validator
|
|
77
77
|
}) => validator(classRest))) == null ? void 0 : _a.classGroupId;
|
|
78
|
-
}
|
|
78
|
+
};
|
|
79
79
|
var arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
80
|
-
|
|
80
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
81
81
|
if (arbitraryPropertyRegex.test(className)) {
|
|
82
82
|
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
83
83
|
const property = arbitraryPropertyClassName == null ? void 0 : arbitraryPropertyClassName.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
@@ -85,8 +85,8 @@ function getGroupIdForArbitraryProperty(className) {
|
|
|
85
85
|
return "arbitrary.." + property;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
}
|
|
89
|
-
|
|
88
|
+
};
|
|
89
|
+
var createClassMap = (config) => {
|
|
90
90
|
const {
|
|
91
91
|
theme,
|
|
92
92
|
prefix
|
|
@@ -100,8 +100,8 @@ function createClassMap(config) {
|
|
|
100
100
|
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
101
101
|
});
|
|
102
102
|
return classMap;
|
|
103
|
-
}
|
|
104
|
-
|
|
103
|
+
};
|
|
104
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
105
105
|
classGroup.forEach((classDefinition) => {
|
|
106
106
|
if (typeof classDefinition === "string") {
|
|
107
107
|
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
@@ -123,8 +123,8 @@ function processClassesRecursively(classGroup, classPartObject, classGroupId, th
|
|
|
123
123
|
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
|
-
}
|
|
127
|
-
|
|
126
|
+
};
|
|
127
|
+
var getPart = (classPartObject, path) => {
|
|
128
128
|
let currentClassPartObject = classPartObject;
|
|
129
129
|
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
130
130
|
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
@@ -136,11 +136,9 @@ function getPart(classPartObject, path) {
|
|
|
136
136
|
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
137
137
|
});
|
|
138
138
|
return currentClassPartObject;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
|
|
139
|
+
};
|
|
140
|
+
var isThemeGetter = (func) => func.isThemeGetter;
|
|
141
|
+
var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
|
|
144
142
|
if (!prefix) {
|
|
145
143
|
return classGroupEntries;
|
|
146
144
|
}
|
|
@@ -156,8 +154,8 @@ function getPrefixedClassGroupEntries(classGroupEntries, prefix) {
|
|
|
156
154
|
});
|
|
157
155
|
return [classGroupId, prefixedClassGroup];
|
|
158
156
|
});
|
|
159
|
-
}
|
|
160
|
-
|
|
157
|
+
};
|
|
158
|
+
var createLruCache = (maxCacheSize) => {
|
|
161
159
|
if (maxCacheSize < 1) {
|
|
162
160
|
return {
|
|
163
161
|
get: () => void 0,
|
|
@@ -168,7 +166,7 @@ function createLruCache(maxCacheSize) {
|
|
|
168
166
|
let cacheSize = 0;
|
|
169
167
|
let cache = /* @__PURE__ */ new Map();
|
|
170
168
|
let previousCache = /* @__PURE__ */ new Map();
|
|
171
|
-
|
|
169
|
+
const update = (key, value) => {
|
|
172
170
|
cache.set(key, value);
|
|
173
171
|
cacheSize++;
|
|
174
172
|
if (cacheSize > maxCacheSize) {
|
|
@@ -176,7 +174,7 @@ function createLruCache(maxCacheSize) {
|
|
|
176
174
|
previousCache = cache;
|
|
177
175
|
cache = /* @__PURE__ */ new Map();
|
|
178
176
|
}
|
|
179
|
-
}
|
|
177
|
+
};
|
|
180
178
|
return {
|
|
181
179
|
get(key) {
|
|
182
180
|
let value = cache.get(key);
|
|
@@ -196,14 +194,17 @@ function createLruCache(maxCacheSize) {
|
|
|
196
194
|
}
|
|
197
195
|
}
|
|
198
196
|
};
|
|
199
|
-
}
|
|
197
|
+
};
|
|
200
198
|
var IMPORTANT_MODIFIER = "!";
|
|
201
|
-
|
|
202
|
-
const
|
|
199
|
+
var createParseClassName = (config) => {
|
|
200
|
+
const {
|
|
201
|
+
separator,
|
|
202
|
+
experimentalParseClassName
|
|
203
|
+
} = config;
|
|
203
204
|
const isSeparatorSingleCharacter = separator.length === 1;
|
|
204
205
|
const firstSeparatorCharacter = separator[0];
|
|
205
206
|
const separatorLength = separator.length;
|
|
206
|
-
|
|
207
|
+
const parseClassName = (className) => {
|
|
207
208
|
const modifiers = [];
|
|
208
209
|
let bracketDepth = 0;
|
|
209
210
|
let modifierStart = 0;
|
|
@@ -238,8 +239,15 @@ function createSplitModifiers(config) {
|
|
|
238
239
|
maybePostfixModifierPosition
|
|
239
240
|
};
|
|
240
241
|
};
|
|
241
|
-
|
|
242
|
-
|
|
242
|
+
if (experimentalParseClassName) {
|
|
243
|
+
return (className) => experimentalParseClassName({
|
|
244
|
+
className,
|
|
245
|
+
parseClassName
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return parseClassName;
|
|
249
|
+
};
|
|
250
|
+
var sortModifiers = (modifiers) => {
|
|
243
251
|
if (modifiers.length <= 1) {
|
|
244
252
|
return modifiers;
|
|
245
253
|
}
|
|
@@ -256,73 +264,59 @@ function sortModifiers(modifiers) {
|
|
|
256
264
|
});
|
|
257
265
|
sortedModifiers.push(...unsortedModifiers.sort());
|
|
258
266
|
return sortedModifiers;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}, createClassUtils(config));
|
|
265
|
-
}
|
|
267
|
+
};
|
|
268
|
+
var createConfigUtils = (config) => __spreadValues({
|
|
269
|
+
cache: createLruCache(config.cacheSize),
|
|
270
|
+
parseClassName: createParseClassName(config)
|
|
271
|
+
}, createClassGroupUtils(config));
|
|
266
272
|
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
267
|
-
|
|
273
|
+
var mergeClassList = (classList, configUtils) => {
|
|
268
274
|
const {
|
|
269
|
-
|
|
275
|
+
parseClassName,
|
|
270
276
|
getClassGroupId,
|
|
271
277
|
getConflictingClassGroupIds
|
|
272
278
|
} = configUtils;
|
|
273
|
-
const classGroupsInConflict =
|
|
274
|
-
|
|
279
|
+
const classGroupsInConflict = [];
|
|
280
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
281
|
+
let result = "";
|
|
282
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
283
|
+
const originalClassName = classNames[index];
|
|
275
284
|
const {
|
|
276
285
|
modifiers,
|
|
277
286
|
hasImportantModifier,
|
|
278
287
|
baseClassName,
|
|
279
288
|
maybePostfixModifierPosition
|
|
280
|
-
} =
|
|
281
|
-
let classGroupId = getClassGroupId(maybePostfixModifierPosition ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
289
|
+
} = parseClassName(originalClassName);
|
|
282
290
|
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
291
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
283
292
|
if (!classGroupId) {
|
|
284
|
-
if (!
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
originalClassName
|
|
288
|
-
};
|
|
293
|
+
if (!hasPostfixModifier) {
|
|
294
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
295
|
+
continue;
|
|
289
296
|
}
|
|
290
297
|
classGroupId = getClassGroupId(baseClassName);
|
|
291
298
|
if (!classGroupId) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
originalClassName
|
|
295
|
-
};
|
|
299
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
300
|
+
continue;
|
|
296
301
|
}
|
|
297
302
|
hasPostfixModifier = false;
|
|
298
303
|
}
|
|
299
304
|
const variantModifier = sortModifiers(modifiers).join(":");
|
|
300
305
|
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
301
|
-
return {
|
|
302
|
-
isTailwindClass: true,
|
|
303
|
-
modifierId,
|
|
304
|
-
classGroupId,
|
|
305
|
-
originalClassName,
|
|
306
|
-
hasPostfixModifier
|
|
307
|
-
};
|
|
308
|
-
}).reverse().filter((parsed) => {
|
|
309
|
-
if (!parsed.isTailwindClass) {
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
const {
|
|
313
|
-
modifierId,
|
|
314
|
-
classGroupId,
|
|
315
|
-
hasPostfixModifier
|
|
316
|
-
} = parsed;
|
|
317
306
|
const classId = modifierId + classGroupId;
|
|
318
|
-
if (classGroupsInConflict.
|
|
319
|
-
|
|
307
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
308
|
+
continue;
|
|
320
309
|
}
|
|
321
|
-
classGroupsInConflict.
|
|
322
|
-
getConflictingClassGroupIds(classGroupId, hasPostfixModifier)
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
310
|
+
classGroupsInConflict.push(classId);
|
|
311
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
312
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
313
|
+
const group = conflictGroups[i];
|
|
314
|
+
classGroupsInConflict.push(modifierId + group);
|
|
315
|
+
}
|
|
316
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
317
|
+
}
|
|
318
|
+
return result;
|
|
319
|
+
};
|
|
326
320
|
function twJoin() {
|
|
327
321
|
let index = 0;
|
|
328
322
|
let argument;
|
|
@@ -338,7 +332,7 @@ function twJoin() {
|
|
|
338
332
|
}
|
|
339
333
|
return string;
|
|
340
334
|
}
|
|
341
|
-
|
|
335
|
+
var toValue = (mix) => {
|
|
342
336
|
if (typeof mix === "string") {
|
|
343
337
|
return mix;
|
|
344
338
|
}
|
|
@@ -353,7 +347,7 @@ function toValue(mix) {
|
|
|
353
347
|
}
|
|
354
348
|
}
|
|
355
349
|
return string;
|
|
356
|
-
}
|
|
350
|
+
};
|
|
357
351
|
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
358
352
|
let configUtils;
|
|
359
353
|
let cacheGet;
|
|
@@ -380,60 +374,35 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
380
374
|
return functionToCall(twJoin.apply(null, arguments));
|
|
381
375
|
};
|
|
382
376
|
}
|
|
383
|
-
|
|
377
|
+
var fromTheme = (key) => {
|
|
384
378
|
const themeGetter = (theme) => theme[key] || [];
|
|
385
379
|
themeGetter.isThemeGetter = true;
|
|
386
380
|
return themeGetter;
|
|
387
|
-
}
|
|
381
|
+
};
|
|
388
382
|
var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
|
|
389
383
|
var fractionRegex = /^\d+\/\d+$/;
|
|
390
384
|
var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
|
|
391
385
|
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
392
386
|
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$/;
|
|
393
|
-
var
|
|
387
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
388
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
394
389
|
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
function isArbitraryNumber(value) {
|
|
405
|
-
return getIsArbitraryValue(value, "number", isNumber);
|
|
406
|
-
}
|
|
407
|
-
function isInteger(value) {
|
|
408
|
-
return Boolean(value) && Number.isInteger(Number(value));
|
|
409
|
-
}
|
|
410
|
-
function isPercent(value) {
|
|
411
|
-
return value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
412
|
-
}
|
|
413
|
-
function isArbitraryValue(value) {
|
|
414
|
-
return arbitraryValueRegex.test(value);
|
|
415
|
-
}
|
|
416
|
-
function isTshirtSize(value) {
|
|
417
|
-
return tshirtUnitRegex.test(value);
|
|
418
|
-
}
|
|
390
|
+
var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
|
|
391
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
|
|
392
|
+
var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
|
|
393
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
|
|
394
|
+
var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
|
|
395
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
396
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
397
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
419
398
|
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}
|
|
423
|
-
function isArbitraryPosition(value) {
|
|
424
|
-
return getIsArbitraryValue(value, "position", isNever);
|
|
425
|
-
}
|
|
399
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
400
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
426
401
|
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
return getIsArbitraryValue(value, "", isShadow);
|
|
432
|
-
}
|
|
433
|
-
function isAny() {
|
|
434
|
-
return true;
|
|
435
|
-
}
|
|
436
|
-
function getIsArbitraryValue(value, label, testValue) {
|
|
402
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
|
|
403
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
|
|
404
|
+
var isAny = () => true;
|
|
405
|
+
var getIsArbitraryValue = (value, label, testValue) => {
|
|
437
406
|
const result = arbitraryValueRegex.exec(value);
|
|
438
407
|
if (result) {
|
|
439
408
|
if (result[1]) {
|
|
@@ -442,20 +411,17 @@ function getIsArbitraryValue(value, label, testValue) {
|
|
|
442
411
|
return testValue(result[2]);
|
|
443
412
|
}
|
|
444
413
|
return false;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
return imageRegex.test(value);
|
|
457
|
-
}
|
|
458
|
-
function getDefaultConfig() {
|
|
414
|
+
};
|
|
415
|
+
var isLengthOnly = (value) => (
|
|
416
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
417
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
418
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
419
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
420
|
+
);
|
|
421
|
+
var isNever = () => false;
|
|
422
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
423
|
+
var isImage = (value) => imageRegex.test(value);
|
|
424
|
+
var getDefaultConfig = () => {
|
|
459
425
|
const colors = fromTheme("colors");
|
|
460
426
|
const spacing = fromTheme("spacing");
|
|
461
427
|
const blur = fromTheme("blur");
|
|
@@ -489,11 +455,10 @@ function getDefaultConfig() {
|
|
|
489
455
|
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
490
456
|
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
491
457
|
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
492
|
-
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"
|
|
458
|
+
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
493
459
|
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
494
460
|
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
495
461
|
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
496
|
-
const getNumber = () => [isNumber, isArbitraryNumber];
|
|
497
462
|
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
498
463
|
return {
|
|
499
464
|
cacheSize: 500,
|
|
@@ -502,12 +467,12 @@ function getDefaultConfig() {
|
|
|
502
467
|
colors: [isAny],
|
|
503
468
|
spacing: [isLength, isArbitraryLength],
|
|
504
469
|
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
505
|
-
brightness:
|
|
470
|
+
brightness: getNumberAndArbitrary(),
|
|
506
471
|
borderColor: [colors],
|
|
507
472
|
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
508
473
|
borderSpacing: getSpacingWithArbitrary(),
|
|
509
474
|
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
510
|
-
contrast:
|
|
475
|
+
contrast: getNumberAndArbitrary(),
|
|
511
476
|
grayscale: getZeroAndEmpty(),
|
|
512
477
|
hueRotate: getNumberAndArbitrary(),
|
|
513
478
|
invert: getZeroAndEmpty(),
|
|
@@ -516,10 +481,10 @@ function getDefaultConfig() {
|
|
|
516
481
|
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
517
482
|
inset: getSpacingWithAutoAndArbitrary(),
|
|
518
483
|
margin: getSpacingWithAutoAndArbitrary(),
|
|
519
|
-
opacity:
|
|
484
|
+
opacity: getNumberAndArbitrary(),
|
|
520
485
|
padding: getSpacingWithArbitrary(),
|
|
521
|
-
saturate:
|
|
522
|
-
scale:
|
|
486
|
+
saturate: getNumberAndArbitrary(),
|
|
487
|
+
scale: getNumberAndArbitrary(),
|
|
523
488
|
sepia: getZeroAndEmpty(),
|
|
524
489
|
skew: getNumberAndArbitrary(),
|
|
525
490
|
space: getSpacingWithArbitrary(),
|
|
@@ -1220,7 +1185,7 @@ function getDefaultConfig() {
|
|
|
1220
1185
|
* Font Variant Numeric
|
|
1221
1186
|
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1222
1187
|
*/
|
|
1223
|
-
"fvn-fraction": ["diagonal-fractions", "stacked-
|
|
1188
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1224
1189
|
/**
|
|
1225
1190
|
* Letter Spacing
|
|
1226
1191
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
@@ -1744,6 +1709,20 @@ function getDefaultConfig() {
|
|
|
1744
1709
|
"border-color-y": [{
|
|
1745
1710
|
"border-y": [borderColor]
|
|
1746
1711
|
}],
|
|
1712
|
+
/**
|
|
1713
|
+
* Border Color S
|
|
1714
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1715
|
+
*/
|
|
1716
|
+
"border-color-s": [{
|
|
1717
|
+
"border-s": [borderColor]
|
|
1718
|
+
}],
|
|
1719
|
+
/**
|
|
1720
|
+
* Border Color E
|
|
1721
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
1722
|
+
*/
|
|
1723
|
+
"border-color-e": [{
|
|
1724
|
+
"border-e": [borderColor]
|
|
1725
|
+
}],
|
|
1747
1726
|
/**
|
|
1748
1727
|
* Border Color Top
|
|
1749
1728
|
* @see https://tailwindcss.com/docs/border-color
|
|
@@ -1874,7 +1853,7 @@ function getDefaultConfig() {
|
|
|
1874
1853
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1875
1854
|
*/
|
|
1876
1855
|
"mix-blend": [{
|
|
1877
|
-
"mix-blend": getBlendModes()
|
|
1856
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
1878
1857
|
}],
|
|
1879
1858
|
/**
|
|
1880
1859
|
* Background Blend Mode
|
|
@@ -2490,7 +2469,7 @@ function getDefaultConfig() {
|
|
|
2490
2469
|
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2491
2470
|
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2492
2471
|
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2493
|
-
"border-color": ["border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2472
|
+
"border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
2494
2473
|
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2495
2474
|
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2496
2475
|
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
@@ -2508,7 +2487,7 @@ function getDefaultConfig() {
|
|
|
2508
2487
|
"font-size": ["leading"]
|
|
2509
2488
|
}
|
|
2510
2489
|
};
|
|
2511
|
-
}
|
|
2490
|
+
};
|
|
2512
2491
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
2513
2492
|
|
|
2514
2493
|
// src/components/Card/index.tsx
|
|
@@ -2546,10 +2525,10 @@ var Card = (_a) => {
|
|
|
2546
2525
|
),
|
|
2547
2526
|
onClick,
|
|
2548
2527
|
children: [
|
|
2549
|
-
/* @__PURE__ */ jsx("img", { src: rest.image, alt: rest.title, width: imageSize }),
|
|
2550
|
-
/* @__PURE__ */ jsxs("aside", { className: twMerge(direction === "col" && "text-center"), children: [
|
|
2528
|
+
/* @__PURE__ */ jsx("img", { src: rest.image, alt: rest.title, width: imageSize, height: "auto" }),
|
|
2529
|
+
/* @__PURE__ */ jsxs("aside", { className: twMerge(direction === "col" && "text-center", "flex flex-col gap-2"), children: [
|
|
2551
2530
|
/* @__PURE__ */ jsx("h1", { className: "text-xl font-bold font-default leading-tight", children: rest.title }),
|
|
2552
|
-
/* @__PURE__ */ jsx("p", { className: "", children: rest.content })
|
|
2531
|
+
/* @__PURE__ */ jsx("p", { className: "text-justify", children: rest.content })
|
|
2553
2532
|
] })
|
|
2554
2533
|
]
|
|
2555
2534
|
}
|
|
@@ -2576,9 +2555,9 @@ var Button = (_a) => {
|
|
|
2576
2555
|
"button",
|
|
2577
2556
|
__spreadValues({
|
|
2578
2557
|
className: twMerge(
|
|
2579
|
-
"flex items-center justify-center rounded-
|
|
2558
|
+
"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]",
|
|
2580
2559
|
variant === "primary" && "bg-orange-500 text-neutral hover:bg-orange-700",
|
|
2581
|
-
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:bg-
|
|
2560
|
+
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:text-orange-100 hover:bg-orange-500",
|
|
2582
2561
|
size === "sm" && "px-6 py-1",
|
|
2583
2562
|
typeof rest.children !== "string" && "px-4",
|
|
2584
2563
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
@@ -2589,10 +2568,40 @@ var Button = (_a) => {
|
|
|
2589
2568
|
);
|
|
2590
2569
|
};
|
|
2591
2570
|
|
|
2571
|
+
// src/components/Link/index.tsx
|
|
2572
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
2573
|
+
var Link = (_a) => {
|
|
2574
|
+
var _b = _a, {
|
|
2575
|
+
className,
|
|
2576
|
+
disabled,
|
|
2577
|
+
url,
|
|
2578
|
+
newPage = true,
|
|
2579
|
+
onClick
|
|
2580
|
+
} = _b, rest = __objRest(_b, [
|
|
2581
|
+
"className",
|
|
2582
|
+
"disabled",
|
|
2583
|
+
"url",
|
|
2584
|
+
"newPage",
|
|
2585
|
+
"onClick"
|
|
2586
|
+
]);
|
|
2587
|
+
return /* @__PURE__ */ jsx3(
|
|
2588
|
+
"a",
|
|
2589
|
+
__spreadValues(__spreadValues({
|
|
2590
|
+
className: twMerge(
|
|
2591
|
+
"text-blue-800 font-bold",
|
|
2592
|
+
typeof rest.children !== "string" && "px-4",
|
|
2593
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2594
|
+
className
|
|
2595
|
+
),
|
|
2596
|
+
href: url
|
|
2597
|
+
}, newPage && { target: "_blank", rel: "noopener noreferrer" }), rest)
|
|
2598
|
+
);
|
|
2599
|
+
};
|
|
2600
|
+
|
|
2592
2601
|
// src/components/RadioGroup/index.tsx
|
|
2593
2602
|
import { useState } from "react";
|
|
2594
2603
|
import { FiCheck } from "react-icons/fi";
|
|
2595
|
-
import { jsx as
|
|
2604
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2596
2605
|
var RadioGroup = ({
|
|
2597
2606
|
disabled,
|
|
2598
2607
|
options = [
|
|
@@ -2606,7 +2615,7 @@ var RadioGroup = ({
|
|
|
2606
2615
|
const handleOptionChange = (value) => {
|
|
2607
2616
|
setSelectedOption(value);
|
|
2608
2617
|
};
|
|
2609
|
-
return /* @__PURE__ */
|
|
2618
|
+
return /* @__PURE__ */ jsx4("div", { className: "flex flex-col ", children: options.map((option) => /* @__PURE__ */ jsxs2("div", { className: "flex py-2 items-center", children: [
|
|
2610
2619
|
/* @__PURE__ */ jsxs2(
|
|
2611
2620
|
"label",
|
|
2612
2621
|
{
|
|
@@ -2618,7 +2627,7 @@ var RadioGroup = ({
|
|
|
2618
2627
|
className
|
|
2619
2628
|
),
|
|
2620
2629
|
children: [
|
|
2621
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ jsx4(
|
|
2622
2631
|
"input",
|
|
2623
2632
|
{
|
|
2624
2633
|
type: "radio",
|
|
@@ -2632,24 +2641,24 @@ var RadioGroup = ({
|
|
|
2632
2641
|
disabled
|
|
2633
2642
|
}
|
|
2634
2643
|
),
|
|
2635
|
-
selectedOption === option.value && /* @__PURE__ */
|
|
2644
|
+
selectedOption === option.value && /* @__PURE__ */ jsx4(FiCheck, { color: "#FFFFFF", size: 12, style: { strokeWidth: 4 } })
|
|
2636
2645
|
]
|
|
2637
2646
|
}
|
|
2638
2647
|
),
|
|
2639
|
-
/* @__PURE__ */
|
|
2648
|
+
/* @__PURE__ */ jsx4("span", { className: "px-2", children: option.label })
|
|
2640
2649
|
] }, option.id)) });
|
|
2641
2650
|
};
|
|
2642
2651
|
|
|
2643
2652
|
// src/components/Checkbox/index.tsx
|
|
2644
2653
|
import { useState as useState2 } from "react";
|
|
2645
2654
|
import { FiCheck as FiCheck2 } from "react-icons/fi";
|
|
2646
|
-
import { jsx as
|
|
2655
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2647
2656
|
var Checkbox = ({ className, required, disabled }) => {
|
|
2648
2657
|
const [selected, setSelected] = useState2(false);
|
|
2649
2658
|
const handleCheckboxChange = (value) => {
|
|
2650
2659
|
setSelected(!value);
|
|
2651
2660
|
};
|
|
2652
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxs3(
|
|
2653
2662
|
"label",
|
|
2654
2663
|
{
|
|
2655
2664
|
className: twMerge(
|
|
@@ -2659,7 +2668,7 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2659
2668
|
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2660
2669
|
),
|
|
2661
2670
|
children: [
|
|
2662
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ jsx5(
|
|
2663
2672
|
"input",
|
|
2664
2673
|
{
|
|
2665
2674
|
type: "checkbox",
|
|
@@ -2673,7 +2682,7 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2673
2682
|
)
|
|
2674
2683
|
}
|
|
2675
2684
|
),
|
|
2676
|
-
selected && /* @__PURE__ */
|
|
2685
|
+
selected && /* @__PURE__ */ jsx5(FiCheck2, { color: "#FFFFFF", size: 14, style: { strokeWidth: 4 } })
|
|
2677
2686
|
]
|
|
2678
2687
|
}
|
|
2679
2688
|
) });
|
|
@@ -2682,7 +2691,8 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2682
2691
|
// src/components/Input/index.tsx
|
|
2683
2692
|
import {
|
|
2684
2693
|
useEffect,
|
|
2685
|
-
useState as useState3
|
|
2694
|
+
useState as useState3,
|
|
2695
|
+
forwardRef
|
|
2686
2696
|
} from "react";
|
|
2687
2697
|
import { FiCheck as FiCheck3, FiX } from "react-icons/fi";
|
|
2688
2698
|
|
|
@@ -2748,65 +2758,102 @@ var masks = {
|
|
|
2748
2758
|
var masks_default = masks;
|
|
2749
2759
|
|
|
2750
2760
|
// src/components/Input/index.tsx
|
|
2751
|
-
import { Fragment, jsx as
|
|
2752
|
-
var Input = (
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
/* @__PURE__ */
|
|
2761
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2762
|
+
var Input = forwardRef(
|
|
2763
|
+
(_a, ref) => {
|
|
2764
|
+
var _b = _a, {
|
|
2765
|
+
className,
|
|
2766
|
+
disabled,
|
|
2767
|
+
placeholder,
|
|
2768
|
+
value,
|
|
2769
|
+
validated,
|
|
2770
|
+
error,
|
|
2771
|
+
required,
|
|
2772
|
+
type,
|
|
2773
|
+
onClick
|
|
2774
|
+
} = _b, rest = __objRest(_b, [
|
|
2775
|
+
"className",
|
|
2776
|
+
"disabled",
|
|
2777
|
+
"placeholder",
|
|
2778
|
+
"value",
|
|
2779
|
+
"validated",
|
|
2780
|
+
"error",
|
|
2781
|
+
"required",
|
|
2782
|
+
"type",
|
|
2783
|
+
"onClick"
|
|
2784
|
+
]);
|
|
2785
|
+
const [selected, setSelected] = useState3(false);
|
|
2786
|
+
const [inputValue, setInputValue] = useState3(value);
|
|
2787
|
+
const [hasNumber, setHasNumber] = useState3(false);
|
|
2788
|
+
const [hasSpecialCharacteres, setHasSpecialCharacteres] = useState3(false);
|
|
2789
|
+
const [hasEightCharacteres, setHasEightCharacteres] = useState3(false);
|
|
2790
|
+
const handleFocus = () => {
|
|
2791
|
+
setSelected(!selected);
|
|
2792
|
+
};
|
|
2793
|
+
const handleBlur = () => {
|
|
2794
|
+
setSelected(false);
|
|
2795
|
+
};
|
|
2796
|
+
const handleInput = (event) => {
|
|
2797
|
+
setInputValue(event.currentTarget.value);
|
|
2798
|
+
checkPassword(event.currentTarget.value);
|
|
2799
|
+
};
|
|
2800
|
+
useEffect(() => {
|
|
2801
|
+
setInputValue(value);
|
|
2802
|
+
}, [value]);
|
|
2803
|
+
const checkPassword = (value2) => {
|
|
2804
|
+
setHasSpecialCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[0])) !== null);
|
|
2805
|
+
setHasNumber((value2 == null ? void 0 : value2.match(masks_default.password[1])) !== null);
|
|
2806
|
+
setHasEightCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[2])) !== null);
|
|
2807
|
+
};
|
|
2808
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
2809
|
+
type === "text" || type === "password" || type === "date" ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
2810
|
+
/* @__PURE__ */ jsx6(
|
|
2811
|
+
"input",
|
|
2812
|
+
__spreadValues({
|
|
2813
|
+
type,
|
|
2814
|
+
required,
|
|
2815
|
+
ref,
|
|
2816
|
+
className: twMerge(
|
|
2817
|
+
"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",
|
|
2818
|
+
className,
|
|
2819
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2820
|
+
selected === true && "border-2 border-orange-500",
|
|
2821
|
+
validated === true && "border-2 border-green-900",
|
|
2822
|
+
error === true && "border-2 border-red-900"
|
|
2823
|
+
),
|
|
2824
|
+
onClick,
|
|
2825
|
+
onFocus: handleFocus,
|
|
2826
|
+
onChange: handleInput,
|
|
2827
|
+
onBlur: handleBlur,
|
|
2828
|
+
placeholder,
|
|
2829
|
+
value: inputValue
|
|
2830
|
+
}, rest)
|
|
2831
|
+
),
|
|
2832
|
+
type === "password" && (!hasEightCharacteres || !hasSpecialCharacteres || !hasNumber) && /* @__PURE__ */ jsxs4("ul", { className: "py-1", children: [
|
|
2833
|
+
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2834
|
+
hasEightCharacteres ? /* @__PURE__ */ jsx6(FiCheck3, {}) : /* @__PURE__ */ jsx6(FiX, {}),
|
|
2835
|
+
/* @__PURE__ */ jsx6("span", { className: "px-1", children: "Pelo menos 8 caracteres" })
|
|
2836
|
+
] }),
|
|
2837
|
+
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2838
|
+
hasSpecialCharacteres ? /* @__PURE__ */ jsx6(FiCheck3, {}) : /* @__PURE__ */ jsx6(FiX, {}),
|
|
2839
|
+
/* @__PURE__ */ jsx6("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2840
|
+
] }),
|
|
2841
|
+
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2842
|
+
hasNumber ? /* @__PURE__ */ jsx6(FiCheck3, {}) : /* @__PURE__ */ jsx6(FiX, {}),
|
|
2843
|
+
/* @__PURE__ */ jsx6("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2844
|
+
] })
|
|
2845
|
+
] })
|
|
2846
|
+
] }) : /* @__PURE__ */ jsx6(
|
|
2800
2847
|
"input",
|
|
2801
2848
|
__spreadValues({
|
|
2802
2849
|
type,
|
|
2803
2850
|
required,
|
|
2851
|
+
ref,
|
|
2804
2852
|
className: twMerge(
|
|
2805
2853
|
"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",
|
|
2806
2854
|
className,
|
|
2807
2855
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2808
2856
|
selected === true && "border-2 border-orange-500",
|
|
2809
|
-
validated === true && "border-2 border-green-900",
|
|
2810
2857
|
error === true && "border-2 border-red-900"
|
|
2811
2858
|
),
|
|
2812
2859
|
onClick,
|
|
@@ -2817,52 +2864,20 @@ var Input = (_a) => {
|
|
|
2817
2864
|
value: inputValue
|
|
2818
2865
|
}, rest)
|
|
2819
2866
|
),
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2826
|
-
hasSpecialCharacteres ? /* @__PURE__ */ jsx5(FiCheck3, {}) : /* @__PURE__ */ jsx5(FiX, {}),
|
|
2827
|
-
/* @__PURE__ */ jsx5("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2828
|
-
] }),
|
|
2829
|
-
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2830
|
-
hasNumber ? /* @__PURE__ */ jsx5(FiCheck3, {}) : /* @__PURE__ */ jsx5(FiX, {}),
|
|
2831
|
-
/* @__PURE__ */ jsx5("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2832
|
-
] })
|
|
2833
|
-
] })
|
|
2834
|
-
] }) : /* @__PURE__ */ jsx5(
|
|
2835
|
-
"input",
|
|
2836
|
-
__spreadValues({
|
|
2837
|
-
type,
|
|
2838
|
-
required,
|
|
2839
|
-
className: twMerge(
|
|
2840
|
-
"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",
|
|
2841
|
-
className,
|
|
2842
|
-
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2843
|
-
selected === true && "border-2 border-orange-500",
|
|
2844
|
-
error === true && "border-2 border-red-900"
|
|
2845
|
-
),
|
|
2846
|
-
onClick,
|
|
2847
|
-
onFocus: handleFocus,
|
|
2848
|
-
onChange: handleInput,
|
|
2849
|
-
onBlur: handleBlur,
|
|
2850
|
-
placeholder,
|
|
2851
|
-
value: inputValue
|
|
2852
|
-
}, rest)
|
|
2853
|
-
),
|
|
2854
|
-
error === true && /* @__PURE__ */ jsx5("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2855
|
-
] });
|
|
2856
|
-
};
|
|
2867
|
+
error === true && /* @__PURE__ */ jsx6("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2868
|
+
] });
|
|
2869
|
+
}
|
|
2870
|
+
);
|
|
2871
|
+
Input.displayName = "Input";
|
|
2857
2872
|
|
|
2858
2873
|
// src/components/TextInput/index.tsx
|
|
2859
2874
|
import {
|
|
2860
2875
|
useEffect as useEffect2,
|
|
2861
2876
|
useState as useState4,
|
|
2862
|
-
forwardRef
|
|
2877
|
+
forwardRef as forwardRef2
|
|
2863
2878
|
} from "react";
|
|
2864
|
-
import { jsx as
|
|
2865
|
-
var TextInput =
|
|
2879
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2880
|
+
var TextInput = forwardRef2(
|
|
2866
2881
|
(_a, ref) => {
|
|
2867
2882
|
var _b = _a, {
|
|
2868
2883
|
className,
|
|
@@ -2911,8 +2926,8 @@ var TextInput = forwardRef(
|
|
|
2911
2926
|
error === true && "border-2 border-red-900"
|
|
2912
2927
|
),
|
|
2913
2928
|
children: [
|
|
2914
|
-
!!prefix && /* @__PURE__ */
|
|
2915
|
-
/* @__PURE__ */
|
|
2929
|
+
!!prefix && /* @__PURE__ */ jsx7("span", { className: "text-neutral-500 sm:text-sm", children: prefix }),
|
|
2930
|
+
/* @__PURE__ */ jsx7(
|
|
2916
2931
|
"input",
|
|
2917
2932
|
__spreadValues({
|
|
2918
2933
|
type,
|
|
@@ -2946,23 +2961,27 @@ import {
|
|
|
2946
2961
|
useEffect as useEffect3,
|
|
2947
2962
|
useState as useState5
|
|
2948
2963
|
} from "react";
|
|
2949
|
-
import { jsx as
|
|
2964
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
2950
2965
|
var TextArea = (_a) => {
|
|
2951
2966
|
var _b = _a, {
|
|
2952
2967
|
className,
|
|
2953
2968
|
disabled,
|
|
2969
|
+
reference,
|
|
2954
2970
|
value,
|
|
2955
2971
|
error,
|
|
2956
2972
|
required,
|
|
2957
2973
|
placeholder,
|
|
2974
|
+
resize,
|
|
2958
2975
|
onClick
|
|
2959
2976
|
} = _b, rest = __objRest(_b, [
|
|
2960
2977
|
"className",
|
|
2961
2978
|
"disabled",
|
|
2979
|
+
"reference",
|
|
2962
2980
|
"value",
|
|
2963
2981
|
"error",
|
|
2964
2982
|
"required",
|
|
2965
2983
|
"placeholder",
|
|
2984
|
+
"resize",
|
|
2966
2985
|
"onClick"
|
|
2967
2986
|
]);
|
|
2968
2987
|
const [selected, setSelected] = useState5(false);
|
|
@@ -2979,10 +2998,11 @@ var TextArea = (_a) => {
|
|
|
2979
2998
|
useEffect3(() => {
|
|
2980
2999
|
setInputValue(value);
|
|
2981
3000
|
}, [value]);
|
|
2982
|
-
return /* @__PURE__ */
|
|
3001
|
+
return /* @__PURE__ */ jsx8(
|
|
2983
3002
|
"textarea",
|
|
2984
3003
|
__spreadValues({
|
|
2985
3004
|
required,
|
|
3005
|
+
ref: reference,
|
|
2986
3006
|
disabled,
|
|
2987
3007
|
className: twMerge(
|
|
2988
3008
|
"rounded-sm w-full px-3 py-2 border-2 border-neutral text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
@@ -2990,7 +3010,8 @@ var TextArea = (_a) => {
|
|
|
2990
3010
|
className,
|
|
2991
3011
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2992
3012
|
selected === true && "border-2 border-orange-500",
|
|
2993
|
-
error === true && "border-2 border-red-900"
|
|
3013
|
+
error === true && "border-2 border-red-900",
|
|
3014
|
+
resize === false && "resize-none overflow-hidden"
|
|
2994
3015
|
),
|
|
2995
3016
|
onClick,
|
|
2996
3017
|
onFocus: handleFocus,
|
|
@@ -3003,7 +3024,7 @@ var TextArea = (_a) => {
|
|
|
3003
3024
|
};
|
|
3004
3025
|
|
|
3005
3026
|
// src/components/Text/index.tsx
|
|
3006
|
-
import { jsx as
|
|
3027
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3007
3028
|
var Text = (_a) => {
|
|
3008
3029
|
var _b = _a, {
|
|
3009
3030
|
children,
|
|
@@ -3035,11 +3056,11 @@ var Text = (_a) => {
|
|
|
3035
3056
|
"9xl": "text-9xl"
|
|
3036
3057
|
}[size];
|
|
3037
3058
|
const Tag = tag;
|
|
3038
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsx9(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
3039
3060
|
};
|
|
3040
3061
|
|
|
3041
3062
|
// src/components/Heading/index.tsx
|
|
3042
|
-
import { jsx as
|
|
3063
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3043
3064
|
var Heading = ({
|
|
3044
3065
|
children,
|
|
3045
3066
|
color = "neutral-800",
|
|
@@ -3062,11 +3083,11 @@ var Heading = ({
|
|
|
3062
3083
|
"9xl": "text-9xl"
|
|
3063
3084
|
}[size];
|
|
3064
3085
|
const Tag = tag;
|
|
3065
|
-
return /* @__PURE__ */
|
|
3086
|
+
return /* @__PURE__ */ jsx10(Tag, { className: twMerge(`text-${color} ${fontSize}`, className), children });
|
|
3066
3087
|
};
|
|
3067
3088
|
|
|
3068
3089
|
// src/components/Box/index.tsx
|
|
3069
|
-
import { jsx as
|
|
3090
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
3070
3091
|
var Box = ({
|
|
3071
3092
|
className,
|
|
3072
3093
|
children,
|
|
@@ -3074,7 +3095,7 @@ var Box = ({
|
|
|
3074
3095
|
variant = "secondary"
|
|
3075
3096
|
}) => {
|
|
3076
3097
|
const Tag = tag;
|
|
3077
|
-
return /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsx11(
|
|
3078
3099
|
Tag,
|
|
3079
3100
|
{
|
|
3080
3101
|
className: twMerge(
|
|
@@ -3089,7 +3110,7 @@ var Box = ({
|
|
|
3089
3110
|
};
|
|
3090
3111
|
|
|
3091
3112
|
// src/components/Form/index.tsx
|
|
3092
|
-
import { jsx as
|
|
3113
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3093
3114
|
var Form = (_a) => {
|
|
3094
3115
|
var _b = _a, {
|
|
3095
3116
|
className,
|
|
@@ -3102,7 +3123,7 @@ var Form = (_a) => {
|
|
|
3102
3123
|
"variant",
|
|
3103
3124
|
"orientation"
|
|
3104
3125
|
]);
|
|
3105
|
-
return /* @__PURE__ */
|
|
3126
|
+
return /* @__PURE__ */ jsx12(
|
|
3106
3127
|
"form",
|
|
3107
3128
|
__spreadProps(__spreadValues({
|
|
3108
3129
|
className: twMerge(
|
|
@@ -3120,10 +3141,10 @@ var Form = (_a) => {
|
|
|
3120
3141
|
|
|
3121
3142
|
// src/components/Avatar/index.tsx
|
|
3122
3143
|
import { FaUser } from "react-icons/fa";
|
|
3123
|
-
import { jsx as
|
|
3144
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
3124
3145
|
var Avatar = (_a) => {
|
|
3125
3146
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
3126
|
-
return /* @__PURE__ */
|
|
3147
|
+
return /* @__PURE__ */ jsx13(
|
|
3127
3148
|
"div",
|
|
3128
3149
|
{
|
|
3129
3150
|
className: twMerge(
|
|
@@ -3132,18 +3153,18 @@ var Avatar = (_a) => {
|
|
|
3132
3153
|
bg-neutral-600 justify-center`,
|
|
3133
3154
|
className
|
|
3134
3155
|
),
|
|
3135
|
-
children: rest.src ? /* @__PURE__ */
|
|
3156
|
+
children: rest.src ? /* @__PURE__ */ jsx13("img", __spreadValues({ className: "w-full h-full object-cover rounded-full" }, rest)) : /* @__PURE__ */ jsx13(FaUser, { color: "#FFFFFF", size: 24 })
|
|
3136
3157
|
}
|
|
3137
3158
|
);
|
|
3138
3159
|
};
|
|
3139
3160
|
|
|
3140
3161
|
// src/components/MultiStep/index.tsx
|
|
3141
|
-
import { jsx as
|
|
3162
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3142
3163
|
var MultiStep = ({ className, size, currentStep }) => {
|
|
3143
3164
|
return /* @__PURE__ */ jsxs6("div", { className: "w-full", children: [
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
return /* @__PURE__ */
|
|
3165
|
+
/* @__PURE__ */ jsx14(Text, { tag: "label", color: "neutral-100", size: "xs", children: `Passo ${currentStep} de ${size}` }),
|
|
3166
|
+
/* @__PURE__ */ jsx14("div", { className: `grid gap-2 grid-cols-${size} grid-flow-col mt-1`, children: Array.from(Array(size).keys()).map((_, index) => {
|
|
3167
|
+
return /* @__PURE__ */ jsx14(
|
|
3147
3168
|
"div",
|
|
3148
3169
|
{
|
|
3149
3170
|
className: twMerge(
|
|
@@ -3166,6 +3187,7 @@ export {
|
|
|
3166
3187
|
Form,
|
|
3167
3188
|
Heading,
|
|
3168
3189
|
Input,
|
|
3190
|
+
Link,
|
|
3169
3191
|
MultiStep,
|
|
3170
3192
|
RadioGroup,
|
|
3171
3193
|
Text,
|