@lotte-innovate/ui-component-test 0.1.62 → 0.1.64
Sign up to get free protection for your applications and to get access to all the features.
package/dist/tailwind.config.js
CHANGED
@@ -21,44 +21,48 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
21
21
|
import * as lightColors from './lib/color/light';
|
22
22
|
import * as darkColors from './lib/color/dark';
|
23
23
|
import * as alphaColors from './lib/color/alpha';
|
24
|
-
import { colorOptions, alphaColorOptions
|
24
|
+
import { colorOptions, alphaColorOptions } from './lib/color/constants';
|
25
25
|
var classes = [];
|
26
|
-
var darkClasses = [];
|
27
|
-
var colorScale = Array.from({ length: 12 }, function (_, i) { return (i + 1).toString(); });
|
28
26
|
var allColorOptions = [colorOptions, alphaColorOptions];
|
29
|
-
var
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
var classPrefixesByScale = {
|
28
|
+
fill: [9, 12],
|
29
|
+
border: [4, 6, 7, 8, 9],
|
30
|
+
bg: [1, 2, 3, 4, 5, 6, 7, 9, 10, 12],
|
31
|
+
text: [1, 8, 9, 10, 11, 12],
|
32
|
+
'hover:bg': [2, 3, 4, 6, 9, 10],
|
33
|
+
'hover:border': [4, 6, 7, 8, 9],
|
34
|
+
'hover:text': [1, 10, 11, 12],
|
35
|
+
'active:bg': [3, 4, 5, 6, 8, 9, 10],
|
36
|
+
'active:border': [6, 8, 9],
|
37
|
+
'active:text': [10, 11, 12],
|
38
|
+
'data-[state=on]:bg': [3, 4, 5, 9, 10],
|
39
|
+
'data-[state=on]:border': [8, 9],
|
40
|
+
'data-[state=on]:text': [1, 11],
|
41
|
+
'data-[state=on]:hover:bg': [2, 3, 4, 10],
|
42
|
+
'data-[state=on]:hover:border': [8, 9],
|
43
|
+
'data-[state=on]:hover:text': [1, 11],
|
44
|
+
'data-[state=open]:bg': [5],
|
45
|
+
'data-[state=checked]:bg': [2, 3, 5, 6, 7, 9, 10],
|
46
|
+
'data-[state=checked]:border': [6],
|
47
|
+
'data-[state=checked]:text': [1, 8, 11],
|
48
|
+
'data-[state=unchecked]:bg': [2, 3, 5, 6, 7],
|
49
|
+
'data-[state=unchecked]:border': [4, 6, 7, 8, 9],
|
50
|
+
'data-[state=unchecked]:text': [8],
|
34
51
|
};
|
35
|
-
var
|
36
|
-
var classPrefixes = [
|
37
|
-
'dark:fill',
|
38
|
-
'dark:border',
|
39
|
-
'dark:bg',
|
40
|
-
'dark:text',
|
41
|
-
'dark:hover:bg',
|
42
|
-
'dark:hover:border',
|
43
|
-
'dark:hover:text',
|
44
|
-
'dark:active:bg',
|
45
|
-
'dark:active:border',
|
46
|
-
'dark:active:text',
|
47
|
-
'dark:data-[state=on]:bg',
|
48
|
-
'dark:data-[state=open]:bg',
|
49
|
-
'dark:data-[state=on]:text',
|
50
|
-
'dark:data-[state=on]:hover:bg',
|
51
|
-
'dark:data-[state=on]:hover:border',
|
52
|
-
'dark:data-[state=on]:hover:text',
|
53
|
-
];
|
52
|
+
var generateClasses = function (colorList, mode) {
|
54
53
|
return colorList.flatMap(function (color) {
|
55
|
-
return
|
54
|
+
return Object.entries(classPrefixesByScale).flatMap(function (_a) {
|
55
|
+
var key = _a[0], values = _a[1];
|
56
|
+
return values.map(function (value) {
|
57
|
+
return mode ? "".concat(mode).concat(key, "-").concat(color, "-").concat(value) : "".concat(key, "-").concat(color, "-").concat(value);
|
58
|
+
});
|
59
|
+
});
|
56
60
|
});
|
57
61
|
};
|
58
62
|
allColorOptions.forEach(function (options) {
|
59
|
-
classes = classes.concat(generateClasses(options
|
63
|
+
classes = classes.concat(generateClasses(options));
|
64
|
+
classes = classes.concat(generateClasses(options, 'dark:'));
|
60
65
|
});
|
61
|
-
darkClasses.push.apply(darkClasses, generateDarkClasses(darkColorOptions, colorScale));
|
62
66
|
var config = {
|
63
67
|
content: [
|
64
68
|
'./src/app/**/*.{js,ts,jsx,tsx,mdx,zip}',
|
@@ -66,7 +70,7 @@ var config = {
|
|
66
70
|
'./src/stories/**/*.{js,ts,jsx,tsx,mdx,zip}',
|
67
71
|
'./src/**/*.{js,ts,jsx,tsx,mdx,zip}',
|
68
72
|
],
|
69
|
-
safelist: __spreadArray(
|
73
|
+
safelist: __spreadArray([], classes, true),
|
70
74
|
theme: {
|
71
75
|
extend: {
|
72
76
|
fontFamily: {
|