winduum 2.2.9 → 2.2.11
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/main.css +1 -1
- package/package.json +13 -14
- package/plugin/index.cjs +219 -217
- package/plugin/index.js +94 -94
- package/plugin/utilities/color.js +52 -50
- package/plugin/utilities/common.js +60 -60
- package/plugin/utilities/divide-gap.js +19 -19
- package/plugin/utilities/dot.js +10 -10
- package/src/base/defaults.css +2 -2
- package/src/base/reset.css +4 -2
- package/src/common.js +6 -6
- package/src/components/badge/props/default.css +2 -1
- package/src/components/breadcrumb/default.css +2 -1
- package/src/components/breadcrumb/props/default.css +2 -1
- package/src/components/button/interactive.css +3 -1
- package/src/components/button/props/default.css +2 -1
- package/src/components/button/props/interactive.css +2 -1
- package/src/components/card/props/default.css +2 -1
- package/src/components/carousel/content.css +2 -1
- package/src/components/carousel/index.js +128 -126
- package/src/components/check/default.css +1 -1
- package/src/components/check/props/default.css +4 -3
- package/src/components/color/default.css +2 -1
- package/src/components/color/interactive.css +2 -1
- package/src/components/color/props/default.css +3 -2
- package/src/components/compare/default.css +2 -1
- package/src/components/compare/index.js +9 -9
- package/src/components/control/icon.css +4 -2
- package/src/components/control/interactive.css +2 -1
- package/src/components/control/props/color.css +2 -1
- package/src/components/control/props/default.css +5 -4
- package/src/components/control/props/floating.css +2 -1
- package/src/components/control/props/icon.css +2 -1
- package/src/components/control/props/select-picker.css +4 -3
- package/src/components/control/props/select.css +2 -1
- package/src/components/control/select-picker.css +4 -2
- package/src/components/control/select.css +1 -1
- package/src/components/details/index.js +39 -38
- package/src/components/dialog/default.css +2 -1
- package/src/components/dialog/index.d.ts +1 -1
- package/src/components/dialog/index.js +42 -40
- package/src/components/dialog/props/content.css +2 -1
- package/src/components/dialog/props/default.css +2 -1
- package/src/components/drawer/default.css +2 -1
- package/src/components/drawer/index.js +29 -29
- package/src/components/drawer/props/content.css +2 -1
- package/src/components/drawer/props/default.css +2 -1
- package/src/components/form/index.js +83 -80
- package/src/components/heading/props/default.css +2 -1
- package/src/components/info/props/default.css +2 -1
- package/src/components/label/props/default.css +2 -1
- package/src/components/link/props/default.css +2 -1
- package/src/components/notice/props/default.css +2 -1
- package/src/components/popover/content.css +4 -2
- package/src/components/popover/index.js +45 -44
- package/src/components/popover/props/content.css +2 -1
- package/src/components/progress/props/default.css +2 -1
- package/src/components/range/index.js +37 -37
- package/src/components/range/props/default.css +2 -1
- package/src/components/rating/default.css +1 -1
- package/src/components/rating/props/default.css +2 -1
- package/src/components/switch/props/default.css +4 -3
- package/src/components/table/interactive.css +10 -5
- package/src/components/table/props/default.css +2 -1
- package/src/components/tabs/index.js +5 -5
- package/src/components/text/default.css +16 -1
- package/src/components/text/props/default.css +2 -1
- package/src/components/title/props/default.css +2 -1
- package/src/components/toast/index.js +25 -25
- package/src/components/toast/props/content.css +2 -1
- package/src/components/toast/props/default.css +2 -1
- package/src/components/toaster/index.js +3 -3
- package/src/components/toaster/props/default.css +2 -1
- package/src/components/tooltip/default.css +4 -2
- package/src/components/tooltip/props/default.css +2 -1
- package/src/theme/config/font.css +2 -1
- package/src/theme/config/radius.css +2 -1
- package/src/theme/config/spacing.css +2 -1
- package/src/theme/config/transition.css +2 -1
- package/src/theme/config/z.css +2 -1
- package/src/theme/dark-rgb.css +2 -1
- package/src/theme/dark.css +2 -1
- package/src/theme/default-p3.css +2 -1
- package/src/theme/default-rgb.css +3 -2
- package/src/theme/default.css +3 -2
- package/src/utilities/container/props/default.css +2 -1
- package/src/utilities/divider.css +5 -3
- package/src/utilities/dot.css +1 -1
- package/src/utilities/ripple/index.js +13 -13
- package/src/utilities/skeleton/props/default.css +2 -1
- package/src/utilities/spinner/default.css +4 -4
- package/src/utilities/spinner/ring.css +1 -1
- package/src/utilities/swap/index.js +4 -4
- package/tailwind.config.js +16 -17
- package/tailwindcss/base/defaults.css +3 -2
- package/tailwindcss/theme/config/transition.css +2 -1
- package/tailwindcss/theme/default.css +1 -1
- package/tailwindcss/utilities/divider.css +4 -2
- package/tailwindcss/utilities/dot.css +1 -1
- package/tailwindcss/utilities/spinner.css +5 -5
- package/types/index.d.ts +1 -1
package/plugin/index.cjs
CHANGED
|
@@ -12,91 +12,93 @@ const node_path = require('node:path')
|
|
|
12
12
|
|
|
13
13
|
const _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null
|
|
14
14
|
function divideGap({ theme, e }) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
return [
|
|
16
|
+
...Object.entries(theme('spacing')).map(([key, value]) => {
|
|
17
|
+
return {
|
|
18
|
+
[`.${e(`divide-gap-x-${key}`)}`]: {
|
|
19
|
+
'& > :where(*:not(:first-child))': {
|
|
20
|
+
paddingLeft: value,
|
|
21
|
+
marginLeft: value,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
[`.${e(`divide-gap-y-${key}`)}`]: {
|
|
25
|
+
'& > :where(*:not(:first-child))': {
|
|
26
|
+
paddingTop: value,
|
|
27
|
+
marginTop: value,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
]
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
const accentColor = ({ value }, settings) => {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const matchValue = toColorValue(value).match(/var\((--color-.*?)\)/)
|
|
37
|
+
const colorProperties = {}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (matchValue) {
|
|
40
|
+
if (settings.rgb) {
|
|
41
|
+
colorProperties['--color-accent-rgb']
|
|
42
42
|
= `var(${matchValue[1].includes('-rgb') ? matchValue[1] : matchValue[1] + '-rgb'})`
|
|
43
|
-
|
|
43
|
+
colorProperties['--color-accent-foreground-rgb']
|
|
44
44
|
= `var(${matchValue[1].includes('-rgb') ? matchValue[1].replace('-rgb', '-foreground-rgb') : matchValue[1] + '-foreground-rgb, var(--color-light-rgb)'})`
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (toColorValue(value).includes('calc(1 * 100%)') || toColorValue(value).includes(' / 1')) {
|
|
48
|
-
colorProperties['--color-accent'] = matchValue[0].replace('-rgb', '')
|
|
49
|
-
colorProperties['--color-accent-foreground'] = `var(${matchValue[1].replace('-rgb', '')}-foreground, var(--color-light))`
|
|
50
|
-
|
|
51
|
-
return {
|
|
52
|
-
...colorProperties,
|
|
53
|
-
'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
if (matchValue[1].includes('-rgb')) {
|
|
57
|
-
colorProperties['--color-accent'] = toColorValue(value)
|
|
58
|
-
} else {
|
|
59
|
-
colorProperties['--color-accent'] = settings.rgb ? `rgb(var(--color-accent-rgb) / ${toColorValue(value).match(/calc\((.*?)\)/)[0]})` : toColorValue(value)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
colorProperties['--color-accent-foreground'] = settings.rgb ? 'rgb(var(--color-accent-foreground-rgb))' : `var(${matchValue[1]}-foreground, var(--color-light))`
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
...colorProperties,
|
|
66
|
-
'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
45
|
}
|
|
70
46
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
47
|
+
if (toColorValue(value).includes('calc(1 * 100%)') || toColorValue(value).includes(' / 1')) {
|
|
48
|
+
colorProperties['--color-accent'] = matchValue[0].replace('-rgb', '')
|
|
49
|
+
colorProperties['--color-accent-foreground'] = `var(${matchValue[1].replace('-rgb', '')}-foreground, var(--color-light))`
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
...colorProperties,
|
|
53
|
+
'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))',
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
if (matchValue[1].includes('-rgb')) {
|
|
58
|
+
colorProperties['--color-accent'] = toColorValue(value)
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
colorProperties['--color-accent'] = settings.rgb ? `rgb(var(--color-accent-rgb) / ${toColorValue(value).match(/calc\((.*?)\)/)[0]})` : toColorValue(value)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
colorProperties['--color-accent-foreground'] = settings.rgb ? 'rgb(var(--color-accent-foreground-rgb))' : `var(${matchValue[1]}-foreground, var(--color-light))`
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
...colorProperties,
|
|
68
|
+
'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))',
|
|
69
|
+
}
|
|
74
70
|
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
'--color-accent': toColorValue(value),
|
|
75
|
+
'accent-color': 'var(--color-accent)',
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
const textColor = ({ value, corePlugins }, settings) => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (matchValue && settings.rgb) {
|
|
82
|
-
withCurrentRgb['--tw-text-current-rgb'] = matchValue[1].includes('rgb') ? matchValue[0] : `var(${matchValue[1]}-rgb)`
|
|
83
|
-
}
|
|
80
|
+
const matchValue = toColorValue(value).match(/var\((--color-.*?)\)/)
|
|
81
|
+
const withCurrentRgb = {}
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
color: toColorValue(value)
|
|
89
|
-
}
|
|
90
|
-
}
|
|
83
|
+
if (matchValue && settings.rgb) {
|
|
84
|
+
withCurrentRgb['--tw-text-current-rgb'] = matchValue[1].includes('rgb') ? matchValue[0] : `var(${matchValue[1]}-rgb)`
|
|
85
|
+
}
|
|
91
86
|
|
|
87
|
+
if (!corePlugins('textOpacity')) {
|
|
92
88
|
return {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
color: value,
|
|
96
|
-
property: 'color',
|
|
97
|
-
variable: '--tw-text-opacity'
|
|
98
|
-
})
|
|
89
|
+
...withCurrentRgb,
|
|
90
|
+
color: toColorValue(value),
|
|
99
91
|
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
...withCurrentRgb,
|
|
96
|
+
...withAlphaVariable({
|
|
97
|
+
color: value,
|
|
98
|
+
property: 'color',
|
|
99
|
+
variable: '--tw-text-opacity',
|
|
100
|
+
}),
|
|
101
|
+
}
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
/**
|
|
@@ -106,21 +108,21 @@ const textColor = ({ value, corePlugins }, settings) => {
|
|
|
106
108
|
* @returns {Object}
|
|
107
109
|
*/
|
|
108
110
|
const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
const result = {
|
|
112
|
+
current: 'color-mix(in var(--default-color-space), currentcolor calc(<alpha-value> * 100%), var(--default-color-mix, transparent))',
|
|
113
|
+
}
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
colors.forEach((name) => {
|
|
116
|
+
if (rgb) {
|
|
117
|
+
result[name + '-rgb'] = `rgb(var(--color-${name}-rgb) / <alpha-value>)`
|
|
118
|
+
}
|
|
117
119
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
result[name] = colorMix
|
|
121
|
+
? `color-mix(in var(--default-color-space), var(--color-${name}) calc(<alpha-value> * 100%), var(--default-color-mix, transparent))`
|
|
122
|
+
: `rgb(var(--color-${name}) / <alpha-value>)`
|
|
123
|
+
})
|
|
122
124
|
|
|
123
|
-
|
|
125
|
+
return result
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
/**
|
|
@@ -130,46 +132,46 @@ const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
|
|
|
130
132
|
* @returns {Object}
|
|
131
133
|
*/
|
|
132
134
|
const tailwindVariables = (type, variables = [], values = {}) => {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
if (!Array.isArray(variables)) {
|
|
136
|
+
return values
|
|
137
|
+
}
|
|
136
138
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
variables.forEach((name) => {
|
|
140
|
+
values[name] = `var(--${type}-${name.replace(/\./g, '_')})`
|
|
141
|
+
})
|
|
140
142
|
|
|
141
|
-
|
|
143
|
+
return values
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
const tailwindParseVariables = (type, file, customValues = {}, customPath, initialValues = true) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
const parseFile = (fileContent) => {
|
|
148
|
+
const regex = /(--[\w-]+):\s*([^;]+);/g
|
|
149
|
+
const matches = [...fileContent.matchAll(regex)]
|
|
150
|
+
const variables = matches.map(match => [match[1], match[2]])
|
|
151
|
+
const values = {}
|
|
150
152
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
variables.forEach((match, index) => {
|
|
154
|
+
if (!match[0].startsWith(`--${type}-`) || match[0].endsWith('--line-height')) {
|
|
155
|
+
return
|
|
156
|
+
}
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
const name = match[0].replace(`--${type}-`, '')
|
|
157
159
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
+
values[name.replace(/_/g, '.')] = type === 'font-size' ? [`var(${match})`, `var(${variables[index + 1]})`] : `var(${initialValues ? match : match[0]})`
|
|
161
|
+
})
|
|
160
162
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
return values
|
|
164
|
+
}
|
|
163
165
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
const fileContent = node_fs.readFileSync(file).toString()
|
|
167
|
+
const values = parseFile(fileContent)
|
|
166
168
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
if (customPath && !Array.isArray(customPath)) {
|
|
170
|
+
const customFileContent = node_fs.readFileSync(node_path.resolve(process.cwd(), customPath)).toString()
|
|
171
|
+
customValues = { ...customValues, ...parseFile(customFileContent) }
|
|
172
|
+
}
|
|
171
173
|
|
|
172
|
-
|
|
174
|
+
return { ...values, ...customValues }
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
/**
|
|
@@ -179,11 +181,11 @@ const tailwindParseVariables = (type, file, customValues = {}, customPath, initi
|
|
|
179
181
|
* @returns {Object}
|
|
180
182
|
*/
|
|
181
183
|
const tailwindVariablesFont = (type, variables = [], values = {}) => {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
184
|
+
variables.forEach(({ value, initial }) => {
|
|
185
|
+
values[value] = [`var(--${type}-${value}, ${initial})`, `calc(var(--${type}-${value}) + 0.5rem)`]
|
|
186
|
+
})
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
return values
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
/**
|
|
@@ -192,15 +194,15 @@ const tailwindVariablesFont = (type, variables = [], values = {}) => {
|
|
|
192
194
|
* @returns {Object}
|
|
193
195
|
*/
|
|
194
196
|
const tailwindPropertyUtilities = (type, variables = []) => {
|
|
195
|
-
|
|
197
|
+
const result = {}
|
|
196
198
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
variables.forEach((name) => {
|
|
200
|
+
result[`.${type}-${name}`] = {
|
|
201
|
+
[type]: `var(--${type}-${name})`,
|
|
202
|
+
}
|
|
203
|
+
})
|
|
202
204
|
|
|
203
|
-
|
|
205
|
+
return result
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
/**
|
|
@@ -208,15 +210,15 @@ const tailwindPropertyUtilities = (type, variables = []) => {
|
|
|
208
210
|
* @returns {Object}
|
|
209
211
|
*/
|
|
210
212
|
const tailwindAnimations = (values) => {
|
|
211
|
-
|
|
213
|
+
const result = {}
|
|
212
214
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
values.forEach((value) => {
|
|
216
|
+
result[`.animation-${value}`] = {
|
|
217
|
+
'animation-name': value,
|
|
218
|
+
}
|
|
219
|
+
})
|
|
218
220
|
|
|
219
|
-
|
|
221
|
+
return result
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
const relativePath = file => node_path.resolve(node_path.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))), file)
|
|
@@ -225,103 +227,103 @@ const relativePath = file => node_path.resolve(node_path.dirname(node_url.fileUR
|
|
|
225
227
|
* @type {import('./').PluginOptions} options.
|
|
226
228
|
*/
|
|
227
229
|
const defaultConfig = {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
animations: ['ripple', 'spin', 'move-indeterminate', 'fade-in', 'fade-out'],
|
|
231
|
+
screens: {
|
|
232
|
+
'xs': '22.5rem',
|
|
233
|
+
'sm': '26rem',
|
|
234
|
+
'md': '46.5rem',
|
|
235
|
+
'lg': '60rem',
|
|
236
|
+
'xl': '76rem',
|
|
237
|
+
'2xl': '82rem',
|
|
238
|
+
'3xl': '88rem',
|
|
239
|
+
'4xl': '100rem',
|
|
240
|
+
'xxl': '126rem',
|
|
241
|
+
'2xxl': '158rem',
|
|
242
|
+
},
|
|
243
|
+
settings: {
|
|
244
|
+
rgb: false,
|
|
245
|
+
colorMix: true,
|
|
246
|
+
},
|
|
245
247
|
}
|
|
246
248
|
|
|
247
249
|
/**
|
|
248
250
|
* @param {import('./').PluginOptions} userConfig
|
|
249
251
|
*/
|
|
250
252
|
const createPlugin = (userConfig = {}) => {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
253
|
+
const settings = {
|
|
254
|
+
...defaultConfig.settings,
|
|
255
|
+
...userConfig.settings,
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
userConfig = {
|
|
259
|
+
...defaultConfig,
|
|
260
|
+
...userConfig,
|
|
261
|
+
settings,
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return plugin(({ addComponents, matchUtilities, theme, e, corePlugins }) => {
|
|
265
|
+
matchUtilities(
|
|
266
|
+
{
|
|
267
|
+
accent: value => accentColor({ value }, userConfig.settings),
|
|
268
|
+
},
|
|
269
|
+
{ values: flattenColorPalette(theme('accentColor')), type: ['color', 'any'] },
|
|
270
|
+
)
|
|
271
|
+
matchUtilities(
|
|
272
|
+
{
|
|
273
|
+
text: value => textColor({ value, corePlugins }, userConfig.settings),
|
|
274
|
+
},
|
|
275
|
+
{ values: flattenColorPalette(theme('textColor')), type: ['color', 'any'] },
|
|
276
|
+
)
|
|
277
|
+
addComponents(tailwindAnimations(userConfig.animations))
|
|
278
|
+
addComponents(tailwindPropertyUtilities('mask', Object.keys(tailwindParseVariables('mask', relativePath('../src/theme/config/mask.css'), {
|
|
279
|
+
...tailwindVariables('mask', userConfig.mask ?? []),
|
|
280
|
+
}, userConfig.mask, false))))
|
|
281
|
+
addComponents(divideGap({ theme, e }))
|
|
282
|
+
}, {
|
|
283
|
+
corePlugins: {
|
|
284
|
+
preflight: false,
|
|
285
|
+
textColor: false,
|
|
286
|
+
accentColor: false,
|
|
287
|
+
},
|
|
288
|
+
theme: {
|
|
289
|
+
extend: {
|
|
290
|
+
transitionProperty: {
|
|
291
|
+
DEFAULT: 'var(--default-transition-property)',
|
|
285
292
|
},
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}, userConfig.borderRadius),
|
|
321
|
-
screens: userConfig.screens
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
})
|
|
293
|
+
transitionDuration: {
|
|
294
|
+
DEFAULT: 'var(--default-transition-duration)',
|
|
295
|
+
},
|
|
296
|
+
transitionTimingFunction: tailwindParseVariables('ease', relativePath('../src/theme/config/transition.css'), {
|
|
297
|
+
...tailwindVariables('ease', userConfig.ease ?? []),
|
|
298
|
+
}, userConfig.ease),
|
|
299
|
+
colors: tailwindColors(Object.keys(tailwindParseVariables('color', relativePath('../src/theme/default.css'), {
|
|
300
|
+
...tailwindVariables('color', userConfig.colors ?? []),
|
|
301
|
+
}, userConfig.colors)), settings.colorMix, settings.rgb),
|
|
302
|
+
fontSize: tailwindParseVariables('text', relativePath('../src/theme/config/font.css'), {
|
|
303
|
+
...tailwindVariables('text', userConfig.fontSize ?? []),
|
|
304
|
+
}, userConfig.fontSize),
|
|
305
|
+
fontFamily: tailwindParseVariables('font', relativePath('../src/theme/config/font.css'), {
|
|
306
|
+
...tailwindVariables('font', userConfig.fontFamily ?? []),
|
|
307
|
+
}, userConfig.fontFamily),
|
|
308
|
+
fontWeight: tailwindParseVariables('font-weight', relativePath('../src/theme/config/font.css'), {
|
|
309
|
+
...tailwindVariables('font-weight', userConfig.fontWeight ?? []),
|
|
310
|
+
}, userConfig.fontWeight),
|
|
311
|
+
zIndex: tailwindParseVariables('z-index', relativePath('../src/theme/config/z.css'), {
|
|
312
|
+
...tailwindVariables('z-index', userConfig.zIndex ?? []),
|
|
313
|
+
0: 0,
|
|
314
|
+
auto: 'auto',
|
|
315
|
+
}, userConfig.zIndex),
|
|
316
|
+
spacing: tailwindParseVariables('spacing', relativePath('../src/theme/config/spacing.css'), {
|
|
317
|
+
...tailwindVariables('spacing', userConfig.spacing ?? []),
|
|
318
|
+
}, userConfig.spacing),
|
|
319
|
+
borderRadius: tailwindParseVariables('radius', relativePath('../src/theme/config/radius.css'), {
|
|
320
|
+
...tailwindVariables('radius', userConfig.borderRadius ?? []),
|
|
321
|
+
DEFAULT: 'var(--radius-xl)',
|
|
322
|
+
}, userConfig.borderRadius),
|
|
323
|
+
screens: userConfig.screens,
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
})
|
|
325
327
|
}
|
|
326
328
|
|
|
327
329
|
exports.createPlugin = createPlugin
|