winduum 0.6.0 → 0.7.0-next.2

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.
Files changed (106) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/tailwind.css +1 -1
  3. package/package.json +1 -1
  4. package/plugin/tailwind.cjs +198 -163
  5. package/plugin/tailwind.d.ts +19 -0
  6. package/plugin/tailwind.js +30 -184
  7. package/plugin/utilities/color.js +69 -0
  8. package/plugin/utilities/common.js +80 -0
  9. package/plugin/utilities/divide-gap.js +20 -0
  10. package/plugin/utilities/dot.js +11 -0
  11. package/plugin/utilities/flex.js +12 -0
  12. package/src/base/config/transition.css +1 -1
  13. package/src/base/defaults.css +2 -2
  14. package/src/base/theme/default.css +0 -2
  15. package/src/common.js +11 -0
  16. package/src/components/{compare.css → compare/default.css} +10 -11
  17. package/src/components/compare/index.css +1 -0
  18. package/src/components/{compare.js → compare/index.js} +10 -4
  19. package/src/components/compare/readme.md +1 -0
  20. package/src/components/details/index.js +57 -0
  21. package/src/components/details/readme.md +1 -0
  22. package/src/components/dialog/content.css +1 -1
  23. package/src/components/dialog/default.css +7 -7
  24. package/src/components/{dialog.js → dialog/index.js} +16 -14
  25. package/src/components/dialog/readme.md +1 -0
  26. package/src/components/field/index.css +1 -0
  27. package/src/components/index.css +8 -4
  28. package/src/components/popover/content.css +62 -0
  29. package/src/components/popover/default.css +4 -0
  30. package/src/components/popover/index.css +2 -0
  31. package/src/components/toast/content.css +20 -0
  32. package/src/components/toast/default.css +26 -0
  33. package/src/components/toast/index.css +2 -0
  34. package/src/components/toaster/default.css +17 -0
  35. package/src/components/toaster/index.css +1 -0
  36. package/src/components/toaster/index.js +122 -0
  37. package/src/components/toaster/readme.md +1 -0
  38. package/src/components/toaster/types/index.d.ts +25 -0
  39. package/src/components/tooltip/default.css +81 -0
  40. package/src/components/tooltip/index.css +1 -0
  41. package/src/ui/badge/bordered.css +2 -2
  42. package/src/ui/badge/default.css +5 -11
  43. package/src/ui/badge/muted.css +2 -2
  44. package/src/ui/btn/bordered.css +5 -5
  45. package/src/ui/btn/default.css +15 -11
  46. package/src/ui/btn/ghosted.css +4 -4
  47. package/src/ui/btn/gradient-bordered.css +7 -7
  48. package/src/ui/btn/gradient.css +1 -1
  49. package/src/ui/btn/hover-fill.css +4 -4
  50. package/src/ui/btn/interactive.css +16 -9
  51. package/src/ui/btn/loading.css +1 -1
  52. package/src/ui/btn/muted.css +4 -4
  53. package/src/ui/btn/raised.css +5 -10
  54. package/src/ui/check/default.css +34 -23
  55. package/src/ui/control/default.css +35 -14
  56. package/src/ui/control/file.css +11 -8
  57. package/src/ui/control/select.css +2 -2
  58. package/src/ui/group/default.css +9 -4
  59. package/src/ui/image/index.css +1 -0
  60. package/src/ui/index.css +17 -17
  61. package/src/ui/{info.css → info/default.css} +1 -1
  62. package/src/ui/info/index.css +1 -0
  63. package/src/ui/label/index.css +1 -0
  64. package/src/ui/link/interactive.css +5 -8
  65. package/src/ui/notice/default.css +13 -6
  66. package/src/ui/progress/default.css +5 -7
  67. package/src/ui/range/default-props.css +3 -3
  68. package/src/ui/range/default.css +48 -35
  69. package/src/ui/{range.js → range/index.js} +11 -4
  70. package/src/ui/range/multi.css +12 -33
  71. package/src/ui/range/vertical.css +3 -4
  72. package/src/ui/switch/default.css +32 -24
  73. package/src/ui/text/default.css +5 -5
  74. package/src/ui/title/default.css +1 -1
  75. package/src/utilities/divider.css +25 -0
  76. package/src/utilities/index.css +2 -0
  77. package/src/utilities/ripple/index.css +12 -0
  78. package/src/utilities/{ripple.js → ripple/index.js} +1 -1
  79. package/src/utilities/ripple.css +1 -10
  80. package/src/utilities/swap/default.css +20 -0
  81. package/src/utilities/swap/index.css +1 -0
  82. package/src/utilities/swap/index.js +16 -0
  83. package/tailwind.config.js +5 -1
  84. package/src/components/card.css +0 -1
  85. package/src/components/details.js +0 -51
  86. package/src/components/dialog.css +0 -1
  87. package/src/ui/badge.css +0 -1
  88. package/src/ui/btn.css +0 -1
  89. package/src/ui/check.css +0 -1
  90. package/src/ui/control.css +0 -1
  91. package/src/ui/group.css +0 -1
  92. package/src/ui/heading.css +0 -1
  93. package/src/ui/link.css +0 -1
  94. package/src/ui/notice.css +0 -1
  95. package/src/ui/progress.css +0 -1
  96. package/src/ui/range.css +0 -1
  97. package/src/ui/rating.css +0 -1
  98. package/src/ui/switch.css +0 -1
  99. package/src/ui/text.css +0 -1
  100. package/src/ui/title.css +0 -1
  101. package/src/components/{compare.d.ts → compare/types/index.d.ts} +0 -0
  102. package/src/components/{dialog.d.ts → dialog/types/index.d.ts} +0 -0
  103. package/src/components/{field.css → field/default.css} +1 -1
  104. /package/src/ui/{image.css → image/default.css} +0 -0
  105. /package/src/ui/{label.css → label/default.css} +0 -0
  106. /package/src/ui/{range.d.ts → range/types/index.d.ts} +0 -0
@@ -3,55 +3,136 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var plugin = require('tailwindcss/plugin');
6
- var withAlphaVariable = require('tailwindcss/src/util/withAlphaVariable');
7
6
  var flattenColorPalette = require('tailwindcss/src/util/flattenColorPalette');
7
+ var withAlphaVariable = require('tailwindcss/src/util/withAlphaVariable');
8
8
  var toColorValue = require('tailwindcss/src/util/toColorValue');
9
9
 
10
- const defaultConfig = {
11
- colors: [
12
- 'primary', 'accent', 'current',
13
- 'warning', 'error', 'info', 'success', 'light', 'dark',
14
- 'main', 'main-primary', 'main-secondary', 'main-tertiary',
15
- 'body', 'body-primary', 'body-secondary', 'body-tertiary',
16
- 'primary-foreground', 'accent-foreground', 'current-foreground',
17
- 'warning-foreground', 'error-foreground', 'info-foreground', 'success-foreground', 'light-foreground', 'dark-foreground',
18
- 'main-foreground', 'main-primary-foreground', 'main-secondary-foreground', 'main-tertiary-foreground',
19
- 'body-foreground', 'body-primary-foreground', 'body-secondary-foreground', 'body-tertiary-foreground'
20
- ],
21
- fontFamily: ['primary', 'secondary'],
22
- fontWeight: ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold'],
23
- ease: ['linear', 'in', 'out', 'in-out'],
24
- zIndex: [10, 20, 30, 40, 50, 60],
25
- fontSize: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '3xl', '4xl', '5xl', '6xl', '7xl', '7xl', '8xl', '9xl'],
26
- spacing: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'],
27
- borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', 'full'],
28
- animations: ['fade-in', 'fade-out', 'fade-in-down', 'fade-out-up', 'ripple', 'spin', 'move-indeterminate'],
29
- mask: ['check', 'radio', 'angle-up', 'angle-down'],
30
- screens: {
31
- xs: '22.5em',
32
- sm: '26em',
33
- md: '48em',
34
- lg: '60em',
35
- xl: '76em',
36
- '2xl': '82em',
37
- '3xl': '88em',
38
- '4xl': '100em',
39
- xxl: '126em',
40
- '2xxl': '158em'
10
+ var FlexUtility = {
11
+ '.flex-center': {
12
+ display: 'flex',
13
+ alignItems: 'center',
14
+ gap: 'var(--spacing-sm)'
41
15
  },
42
- settings: {
43
- rgb: false,
44
- colorMix: true
16
+ '.flex-between': {
17
+ display: 'flex',
18
+ justifyContent: 'space-between',
19
+ gap: 'var(--spacing-sm)'
20
+ }
21
+ };
22
+
23
+ var DotUtility = {
24
+ '.dot': {
25
+ '--tw-bg-opacity': '1',
26
+ display: 'inline-flex',
27
+ width: '0.625rem',
28
+ height: '0.625rem',
29
+ borderRadius: 'var(--rounded-full)',
30
+ backgroundColor: 'color-mix(in srgb, var(--color-accent) calc(var(--tw-bg-opacity) * 100%), transparent)',
31
+ flexShrink: '0'
32
+ }
33
+ };
34
+
35
+ function divideGap ({ theme, e }) {
36
+ return [
37
+ ...Object.entries(theme('spacing')).map(([key, value]) => {
38
+ return {
39
+ [`.${e(`divide-gap-x-${key}`)}`]: {
40
+ '& > :where(*:not(:first-child))': {
41
+ paddingLeft: value,
42
+ marginLeft: value
43
+ }
44
+ },
45
+ [`.${e(`divide-gap-y-${key}`)}`]: {
46
+ '& > :where(*:not(:first-child))': {
47
+ paddingTop: value,
48
+ marginTop: value
49
+ }
50
+ }
51
+ }
52
+ })
53
+ ]
54
+ }
55
+
56
+ const accentColor = ({ value }, settings) => {
57
+ const matchValue = toColorValue(value).match(/var\((--color-.*?)\)/);
58
+ const colorProperties = {};
59
+
60
+ if (matchValue) {
61
+ if (settings.rgb) {
62
+ colorProperties['--color-accent-rgb'] =
63
+ `var(${matchValue[1].includes('-rgb') ? matchValue[1] : matchValue[1] + '-rgb'})`;
64
+ colorProperties['--color-accent-foreground-rgb'] =
65
+ `var(${matchValue[1].includes('-rgb') ? matchValue[1].replace('-rgb', '-foreground-rgb') : matchValue[1] + '-foreground-rgb, var(--color-light-rgb)'})`;
66
+ }
67
+
68
+ if (toColorValue(value).includes('calc(1 * 100%)') || toColorValue(value).includes(' / 1')) {
69
+ colorProperties['--color-accent'] = matchValue[0].replace('-rgb', '');
70
+ colorProperties['--color-accent-foreground'] = `var(${matchValue[1].replace('-rgb', '')}-foreground, var(--color-light))`;
71
+
72
+ return {
73
+ ...colorProperties,
74
+ 'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
75
+ }
76
+ } else {
77
+ if (matchValue[1].includes('-rgb')) {
78
+ colorProperties['--color-accent'] = toColorValue(value);
79
+ } else {
80
+ colorProperties['--color-accent'] = settings.rgb ? `rgb(var(--color-accent-rgb) / ${toColorValue(value).match(/calc\((.*?)\)/)[0]})` : toColorValue(value);
81
+ }
82
+
83
+ colorProperties['--color-accent-foreground'] = settings.rgb ? 'rgb(var(--color-accent-foreground-rgb))' : `var(${matchValue[1]}-foreground, var(--color-light))`;
84
+
85
+ return {
86
+ ...colorProperties,
87
+ 'accent-color': settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
88
+ }
89
+ }
90
+ }
91
+
92
+ return {
93
+ '--color-accent': toColorValue(value),
94
+ 'accent-color': 'var(--color-accent)'
95
+ }
96
+ };
97
+
98
+ const textColor = ({ value, corePlugins }, settings) => {
99
+ const matchValue = toColorValue(value).match(/var\((--color-.*?)\)/);
100
+ const withCurrentRgb = {};
101
+
102
+ if (matchValue && settings.rgb) {
103
+ withCurrentRgb['--tw-text-current-rgb'] = matchValue[1].includes('rgb') ? matchValue[0] : `var(${matchValue[1]}-rgb)`;
104
+ }
105
+
106
+ if (!corePlugins('textOpacity')) {
107
+ return {
108
+ ...withCurrentRgb,
109
+ color: toColorValue(value)
110
+ }
111
+ }
112
+
113
+ return {
114
+ ...withCurrentRgb,
115
+ ...withAlphaVariable({
116
+ color: value,
117
+ property: 'color',
118
+ variable: '--tw-text-opacity'
119
+ })
45
120
  }
46
121
  };
47
122
 
48
- const tailwindColors = (colors = []) => {
123
+ /**
124
+ * @param {[]} colors
125
+ * @param {boolean} colorMix
126
+ * @param {boolean} rgb
127
+ * @returns {[]}
128
+ */
129
+ const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
49
130
  colors.forEach(name => {
50
- if (defaultConfig.settings.rgb) {
131
+ if (rgb) {
51
132
  colors[name + '-rgb'] = `rgb(var(--color-${name}-rgb) / <alpha-value>)`;
52
133
  }
53
134
 
54
- colors[name] = defaultConfig.settings.colorMix
135
+ colors[name] = colorMix
55
136
  ? `color-mix(in var(--space), var(--color-${name}) calc(<alpha-value> * 100%), transparent)`
56
137
  : `rgb(var(--color-${name}) / <alpha-value>)`;
57
138
  });
@@ -59,6 +140,12 @@ const tailwindColors = (colors = []) => {
59
140
  return colors
60
141
  };
61
142
 
143
+ /**
144
+ * @param {string} type
145
+ * @param {string[]} variables
146
+ * @param {Object} values
147
+ * @returns {Object}
148
+ */
62
149
  const tailwindVariables = (type, variables = [], values = {}) => {
63
150
  variables.forEach(name => {
64
151
  values[name] = `var(--${type}-${name})`;
@@ -67,6 +154,12 @@ const tailwindVariables = (type, variables = [], values = {}) => {
67
154
  return values
68
155
  };
69
156
 
157
+ /**
158
+ * @param {string} type
159
+ * @param {string[]} variables
160
+ * @param {Object} values
161
+ * @returns {Object}
162
+ */
70
163
  const tailwindVariablesFont = (type, variables = [], values = {}) => {
71
164
  variables.forEach(name => {
72
165
  values[name] = [`var(--${type}-${name})`, `calc(var(--${type}-${name}) + 0.5rem)`];
@@ -75,6 +168,11 @@ const tailwindVariablesFont = (type, variables = [], values = {}) => {
75
168
  return values
76
169
  };
77
170
 
171
+ /**
172
+ * @param {string} type
173
+ * @param {string[]} variables
174
+ * @returns {Object}
175
+ */
78
176
  const tailwindPropertyUtilities = (type, variables = []) => {
79
177
  const result = {};
80
178
 
@@ -87,6 +185,10 @@ const tailwindPropertyUtilities = (type, variables = []) => {
87
185
  return result
88
186
  };
89
187
 
188
+ /**
189
+ * @param {string[]} values
190
+ * @returns {Object}
191
+ */
90
192
  const tailwindAnimations = (values) => {
91
193
  const result = {};
92
194
 
@@ -99,148 +201,81 @@ const tailwindAnimations = (values) => {
99
201
  return result
100
202
  };
101
203
 
204
+ /**
205
+ * @type {import('./tailwind').PluginOptions} options.
206
+ */
207
+ const defaultConfig = {
208
+ colors: [
209
+ 'primary', 'accent',
210
+ 'warning', 'error', 'info', 'success', 'light', 'dark',
211
+ 'main', 'main-primary', 'main-secondary', 'main-tertiary',
212
+ 'body', 'body-primary', 'body-secondary', 'body-tertiary',
213
+ 'primary-foreground', 'accent-foreground', 'current-foreground',
214
+ 'warning-foreground', 'error-foreground', 'info-foreground', 'success-foreground', 'light-foreground', 'dark-foreground',
215
+ 'main-foreground', 'main-primary-foreground', 'main-secondary-foreground', 'main-tertiary-foreground',
216
+ 'body-foreground', 'body-primary-foreground', 'body-secondary-foreground', 'body-tertiary-foreground'
217
+ ],
218
+ fontFamily: ['primary', 'secondary'],
219
+ fontWeight: ['light', 'normal', 'medium', 'semibold', 'bold', 'extrabold'],
220
+ ease: ['linear', 'in', 'out', 'in-out'],
221
+ zIndex: ['10', '20', '30', '40', '50', '60'],
222
+ fontSize: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '3xl', '4xl', '5xl', '6xl', '7xl', '7xl', '8xl', '9xl'],
223
+ spacing: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'],
224
+ borderRadius: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', 'full'],
225
+ animations: ['fade-in', 'fade-out', 'fade-in-down', 'fade-out-up', 'ripple', 'spin', 'move-indeterminate'],
226
+ mask: ['check', 'radio', 'angle-up', 'angle-down'],
227
+ screens: {
228
+ xs: '22.5em',
229
+ sm: '26em',
230
+ md: '48em',
231
+ lg: '60em',
232
+ xl: '76em',
233
+ '2xl': '82em',
234
+ '3xl': '88em',
235
+ '4xl': '100em',
236
+ xxl: '126em',
237
+ '2xxl': '158em'
238
+ },
239
+ settings: {
240
+ rgb: false,
241
+ colorMix: true
242
+ }
243
+ };
244
+
245
+ /**
246
+ * @param {import('./tailwind').PluginOptions} userConfig
247
+ */
102
248
  const createPlugin = (userConfig = {}) => {
249
+ const settings = {
250
+ ...defaultConfig.settings,
251
+ ...userConfig.settings
252
+ };
253
+
103
254
  userConfig = {
104
255
  ...defaultConfig,
105
- ...userConfig
256
+ ...userConfig,
257
+ settings
106
258
  };
107
259
 
108
- return plugin(({ addUtilities, addComponents, matchUtilities, theme, e, corePlugins }) => {
260
+ return plugin(({ addComponents, matchUtilities, theme, e, corePlugins }) => {
109
261
  matchUtilities(
110
262
  {
111
- accent: (value) => {
112
- const matchValue = toColorValue(value).match(/var\((--color-.*?)\)/);
113
- const fallbackRgb = matchValue && matchValue[0].includes('-rgb');
114
-
115
- const colorProperties = {};
116
-
117
- if (fallbackRgb) {
118
- colorProperties['--color-accent-rgb'] = matchValue[0];
119
- }
120
-
121
- if ((matchValue && matchValue[0] === 'var(--color-accent)') || (matchValue && matchValue[0] === 'var(--color-accent-rgb)')) {
122
- return {
123
- 'accent-color': matchValue && toColorValue(value).includes('calc(1 * 100%)') ? matchValue[0] : toColorValue(value)
124
- }
125
- }
126
-
127
- if (matchValue) {
128
- if (fallbackRgb) {
129
- colorProperties['--color-accent-foreground-rgb'] = `var(${matchValue[1].replace('-rgb', '-foreground-rgb')})`;
130
- }
131
-
132
- if (toColorValue(value).includes('calc(1 * 100%)') || toColorValue(value).includes(' / 1')) {
133
- return {
134
- ...colorProperties,
135
- '--color-accent': fallbackRgb ? toColorValue(value) : matchValue[0],
136
- '--color-accent-foreground': fallbackRgb ? `rgb(var(${matchValue[1].replace('-rgb', '-foreground-rgb')}, var(--color-light-rgb)))` : `var(${matchValue[1]}-foreground, var(--color-light))`,
137
- 'accent-color': defaultConfig.settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
138
- }
139
- } else {
140
- return {
141
- ...colorProperties,
142
- '--color-accent': toColorValue(value),
143
- '--color-accent-foreground': fallbackRgb ? `rgb(var(${matchValue[1].replace('-rgb', '-foreground-rgb')}, var(--color-light-rgb)))` : `var(${matchValue[1]}-foreground, var(--color-light))`,
144
- 'accent-color': defaultConfig.settings.colorMix ? 'var(--color-accent)' : 'rgb(var(--color-accent))'
145
- }
146
- }
147
- }
148
-
149
- return {
150
- '--color-accent': toColorValue(value),
151
- 'accent-color': 'var(--color-accent)'
152
- }
153
- }
263
+ accent: value => accentColor({ value }, userConfig.settings)
154
264
  },
155
265
  { values: flattenColorPalette(theme('accentColor')), type: ['color', 'any'] }
156
266
  );
157
267
  matchUtilities(
158
268
  {
159
- text: (value) => {
160
- const matchValue = toColorValue(value).match(/var\((.*?)\)/);
161
- const fallbackRgb = matchValue && matchValue[0].includes('-rgb');
162
-
163
- const colorProperties = {};
164
-
165
- if (fallbackRgb) {
166
- colorProperties['--color-current-rgb'] = matchValue[0];
167
- }
168
-
169
- if ((matchValue && matchValue[0] === 'var(--color-current)') || (matchValue && matchValue[0] === 'var(--color-current-rgb)')) {
170
- return {
171
- color: toColorValue(value)
172
- }
173
- }
174
-
175
- const color = {
176
- ...withAlphaVariable({
177
- color: value,
178
- property: 'color',
179
- variable: '--tw-text-opacity'
180
- })
181
- };
182
-
183
- if (!corePlugins('textOpacity')) {
184
- return {
185
- ...colorProperties,
186
- '--color-current': toColorValue(value),
187
- ...color
188
- }
189
- }
190
-
191
- return {
192
- ...colorProperties,
193
- ...withAlphaVariable({
194
- color: value,
195
- property: '--color-current',
196
- variable: '--tw-text-opacity'
197
- }),
198
- ...color
199
- }
200
- }
269
+ text: value => textColor({ value, corePlugins }, userConfig.settings)
201
270
  },
202
271
  { values: flattenColorPalette(theme('textColor')), type: ['color', 'any'] }
203
272
  );
204
273
  addComponents(tailwindAnimations(userConfig.animations));
205
274
  addComponents(tailwindPropertyUtilities('mask', userConfig.mask));
206
- addComponents([
207
- Object.entries(theme('spacing')).map(([key, value]) => {
208
- return {
209
- [`.${e(`divide-gap-x-${key}`)}`]: {
210
- '& > :where(*:not(:first-child))': {
211
- paddingLeft: value,
212
- marginLeft: value
213
- }
214
- },
215
- [`.${e(`divide-gap-y-${key}`)}`]: {
216
- '& > :where(*:not(:first-child))': {
217
- paddingTop: value,
218
- marginTop: value
219
- }
220
- }
221
- }
222
- })
223
- ]);
275
+ addComponents(divideGap({ theme, e }));
224
276
  addComponents({
225
- '.flex-center': {
226
- display: 'flex',
227
- alignItems: 'center',
228
- gap: 'var(--spacing-sm)'
229
- },
230
- '.flex-between': {
231
- display: 'flex',
232
- justifyContent: 'space-between',
233
- gap: 'var(--spacing-sm)'
234
- },
235
- '.dot': {
236
- '--tw-bg-opacity': '1',
237
- display: 'inline-flex',
238
- width: '0.625rem',
239
- height: '0.625rem',
240
- borderRadius: 'var(--rounded-full)',
241
- backgroundColor: 'color-mix(in srgb, var(--color-accent) calc(var(--tw-bg-opacity) * 100%), transparent)',
242
- flexShrink: '0'
243
- }
277
+ ...FlexUtility,
278
+ ...DotUtility
244
279
  });
245
280
  }, {
246
281
  corePlugins: {
@@ -257,7 +292,7 @@ const createPlugin = (userConfig = {}) => {
257
292
  DEFAULT: 'var(--duration)'
258
293
  },
259
294
  transitionTimingFunction: tailwindVariables('ease', userConfig.ease),
260
- colors: tailwindColors(userConfig.colors),
295
+ colors: tailwindColors(userConfig.colors, settings.colorMix, settings.rgb),
261
296
  fontSize: tailwindVariablesFont('text', userConfig.fontSize),
262
297
  fontFamily: tailwindVariables('font', userConfig.fontFamily),
263
298
  fontWeight: tailwindVariables('font', userConfig.fontWeight),
@@ -0,0 +1,19 @@
1
+ export interface PluginOptions {
2
+ colors?: string[]
3
+ fontFamily?: string[],
4
+ fontWeight?: string[],
5
+ ease?: string[],
6
+ zIndex?: string[],
7
+ fontSize?: string[],
8
+ spacing?: string[],
9
+ borderRadius?: string[],
10
+ animations?: string[],
11
+ mask?: string[],
12
+ screens?: {
13
+ [key: string]: string
14
+ },
15
+ settings?: {
16
+ rgb?: boolean,
17
+ colorMix?: boolean
18
+ }
19
+ }