@koaris/bloom-ui 1.0.5 → 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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +138 -154
- package/dist/index.mjs +135 -151
- package/dist/tailwind.css +156 -130
- 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,61 +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
387
|
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
394
|
-
var shadowRegex =
|
|
388
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
395
389
|
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
function isArbitraryNumber(value) {
|
|
406
|
-
return getIsArbitraryValue(value, "number", isNumber);
|
|
407
|
-
}
|
|
408
|
-
function isInteger(value) {
|
|
409
|
-
return Boolean(value) && Number.isInteger(Number(value));
|
|
410
|
-
}
|
|
411
|
-
function isPercent(value) {
|
|
412
|
-
return value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
413
|
-
}
|
|
414
|
-
function isArbitraryValue(value) {
|
|
415
|
-
return arbitraryValueRegex.test(value);
|
|
416
|
-
}
|
|
417
|
-
function isTshirtSize(value) {
|
|
418
|
-
return tshirtUnitRegex.test(value);
|
|
419
|
-
}
|
|
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);
|
|
420
398
|
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
function isArbitraryPosition(value) {
|
|
425
|
-
return getIsArbitraryValue(value, "position", isNever);
|
|
426
|
-
}
|
|
399
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
400
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
427
401
|
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
return getIsArbitraryValue(value, "", isShadow);
|
|
433
|
-
}
|
|
434
|
-
function isAny() {
|
|
435
|
-
return true;
|
|
436
|
-
}
|
|
437
|
-
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) => {
|
|
438
406
|
const result = arbitraryValueRegex.exec(value);
|
|
439
407
|
if (result) {
|
|
440
408
|
if (result[1]) {
|
|
@@ -443,20 +411,17 @@ function getIsArbitraryValue(value, label, testValue) {
|
|
|
443
411
|
return testValue(result[2]);
|
|
444
412
|
}
|
|
445
413
|
return false;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
return imageRegex.test(value);
|
|
458
|
-
}
|
|
459
|
-
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 = () => {
|
|
460
425
|
const colors = fromTheme("colors");
|
|
461
426
|
const spacing = fromTheme("spacing");
|
|
462
427
|
const blur = fromTheme("blur");
|
|
@@ -490,11 +455,10 @@ function getDefaultConfig() {
|
|
|
490
455
|
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
491
456
|
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
492
457
|
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
493
|
-
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"];
|
|
494
459
|
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
495
460
|
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
496
461
|
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
497
|
-
const getNumber = () => [isNumber, isArbitraryNumber];
|
|
498
462
|
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
499
463
|
return {
|
|
500
464
|
cacheSize: 500,
|
|
@@ -503,12 +467,12 @@ function getDefaultConfig() {
|
|
|
503
467
|
colors: [isAny],
|
|
504
468
|
spacing: [isLength, isArbitraryLength],
|
|
505
469
|
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
506
|
-
brightness:
|
|
470
|
+
brightness: getNumberAndArbitrary(),
|
|
507
471
|
borderColor: [colors],
|
|
508
472
|
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
509
473
|
borderSpacing: getSpacingWithArbitrary(),
|
|
510
474
|
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
511
|
-
contrast:
|
|
475
|
+
contrast: getNumberAndArbitrary(),
|
|
512
476
|
grayscale: getZeroAndEmpty(),
|
|
513
477
|
hueRotate: getNumberAndArbitrary(),
|
|
514
478
|
invert: getZeroAndEmpty(),
|
|
@@ -517,10 +481,10 @@ function getDefaultConfig() {
|
|
|
517
481
|
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
518
482
|
inset: getSpacingWithAutoAndArbitrary(),
|
|
519
483
|
margin: getSpacingWithAutoAndArbitrary(),
|
|
520
|
-
opacity:
|
|
484
|
+
opacity: getNumberAndArbitrary(),
|
|
521
485
|
padding: getSpacingWithArbitrary(),
|
|
522
|
-
saturate:
|
|
523
|
-
scale:
|
|
486
|
+
saturate: getNumberAndArbitrary(),
|
|
487
|
+
scale: getNumberAndArbitrary(),
|
|
524
488
|
sepia: getZeroAndEmpty(),
|
|
525
489
|
skew: getNumberAndArbitrary(),
|
|
526
490
|
space: getSpacingWithArbitrary(),
|
|
@@ -1221,7 +1185,7 @@ function getDefaultConfig() {
|
|
|
1221
1185
|
* Font Variant Numeric
|
|
1222
1186
|
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
1223
1187
|
*/
|
|
1224
|
-
"fvn-fraction": ["diagonal-fractions", "stacked-
|
|
1188
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
1225
1189
|
/**
|
|
1226
1190
|
* Letter Spacing
|
|
1227
1191
|
* @see https://tailwindcss.com/docs/letter-spacing
|
|
@@ -1745,6 +1709,20 @@ function getDefaultConfig() {
|
|
|
1745
1709
|
"border-color-y": [{
|
|
1746
1710
|
"border-y": [borderColor]
|
|
1747
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
|
+
}],
|
|
1748
1726
|
/**
|
|
1749
1727
|
* Border Color Top
|
|
1750
1728
|
* @see https://tailwindcss.com/docs/border-color
|
|
@@ -1875,7 +1853,7 @@ function getDefaultConfig() {
|
|
|
1875
1853
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
1876
1854
|
*/
|
|
1877
1855
|
"mix-blend": [{
|
|
1878
|
-
"mix-blend": getBlendModes()
|
|
1856
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
1879
1857
|
}],
|
|
1880
1858
|
/**
|
|
1881
1859
|
* Background Blend Mode
|
|
@@ -2491,7 +2469,7 @@ function getDefaultConfig() {
|
|
|
2491
2469
|
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
2492
2470
|
"border-w-x": ["border-w-r", "border-w-l"],
|
|
2493
2471
|
"border-w-y": ["border-w-t", "border-w-b"],
|
|
2494
|
-
"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"],
|
|
2495
2473
|
"border-color-x": ["border-color-r", "border-color-l"],
|
|
2496
2474
|
"border-color-y": ["border-color-t", "border-color-b"],
|
|
2497
2475
|
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
@@ -2509,7 +2487,7 @@ function getDefaultConfig() {
|
|
|
2509
2487
|
"font-size": ["leading"]
|
|
2510
2488
|
}
|
|
2511
2489
|
};
|
|
2512
|
-
}
|
|
2490
|
+
};
|
|
2513
2491
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
2514
2492
|
|
|
2515
2493
|
// src/components/Card/index.tsx
|
|
@@ -2547,10 +2525,10 @@ var Card = (_a) => {
|
|
|
2547
2525
|
),
|
|
2548
2526
|
onClick,
|
|
2549
2527
|
children: [
|
|
2550
|
-
/* @__PURE__ */ jsx("img", { src: rest.image, alt: rest.title, width: imageSize }),
|
|
2551
|
-
/* @__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: [
|
|
2552
2530
|
/* @__PURE__ */ jsx("h1", { className: "text-xl font-bold font-default leading-tight", children: rest.title }),
|
|
2553
|
-
/* @__PURE__ */ jsx("p", { className: "", children: rest.content })
|
|
2531
|
+
/* @__PURE__ */ jsx("p", { className: "text-justify", children: rest.content })
|
|
2554
2532
|
] })
|
|
2555
2533
|
]
|
|
2556
2534
|
}
|
|
@@ -2577,7 +2555,7 @@ var Button = (_a) => {
|
|
|
2577
2555
|
"button",
|
|
2578
2556
|
__spreadValues({
|
|
2579
2557
|
className: twMerge(
|
|
2580
|
-
"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",
|
|
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]",
|
|
2581
2559
|
variant === "primary" && "bg-orange-500 text-neutral hover:bg-orange-700",
|
|
2582
2560
|
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:text-orange-100 hover:bg-orange-500",
|
|
2583
2561
|
size === "sm" && "px-6 py-1",
|
|
@@ -2680,7 +2658,7 @@ var Checkbox = ({ className, required, disabled }) => {
|
|
|
2680
2658
|
const handleCheckboxChange = (value) => {
|
|
2681
2659
|
setSelected(!value);
|
|
2682
2660
|
};
|
|
2683
|
-
return /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center
|
|
2661
|
+
return /* @__PURE__ */ jsx5("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxs3(
|
|
2684
2662
|
"label",
|
|
2685
2663
|
{
|
|
2686
2664
|
className: twMerge(
|
|
@@ -2988,18 +2966,22 @@ var TextArea = (_a) => {
|
|
|
2988
2966
|
var _b = _a, {
|
|
2989
2967
|
className,
|
|
2990
2968
|
disabled,
|
|
2969
|
+
reference,
|
|
2991
2970
|
value,
|
|
2992
2971
|
error,
|
|
2993
2972
|
required,
|
|
2994
2973
|
placeholder,
|
|
2974
|
+
resize,
|
|
2995
2975
|
onClick
|
|
2996
2976
|
} = _b, rest = __objRest(_b, [
|
|
2997
2977
|
"className",
|
|
2998
2978
|
"disabled",
|
|
2979
|
+
"reference",
|
|
2999
2980
|
"value",
|
|
3000
2981
|
"error",
|
|
3001
2982
|
"required",
|
|
3002
2983
|
"placeholder",
|
|
2984
|
+
"resize",
|
|
3003
2985
|
"onClick"
|
|
3004
2986
|
]);
|
|
3005
2987
|
const [selected, setSelected] = useState5(false);
|
|
@@ -3020,6 +3002,7 @@ var TextArea = (_a) => {
|
|
|
3020
3002
|
"textarea",
|
|
3021
3003
|
__spreadValues({
|
|
3022
3004
|
required,
|
|
3005
|
+
ref: reference,
|
|
3023
3006
|
disabled,
|
|
3024
3007
|
className: twMerge(
|
|
3025
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",
|
|
@@ -3027,7 +3010,8 @@ var TextArea = (_a) => {
|
|
|
3027
3010
|
className,
|
|
3028
3011
|
disabled === true && "opacity-50 cursor-not-allowed",
|
|
3029
3012
|
selected === true && "border-2 border-orange-500",
|
|
3030
|
-
error === true && "border-2 border-red-900"
|
|
3013
|
+
error === true && "border-2 border-red-900",
|
|
3014
|
+
resize === false && "resize-none overflow-hidden"
|
|
3031
3015
|
),
|
|
3032
3016
|
onClick,
|
|
3033
3017
|
onFocus: handleFocus,
|