winduum 1.2.0 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "winduum",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "types": "types/index.d.ts",
6
6
  "main": "plugin/index.cjs",
package/plugin/index.cjs CHANGED
@@ -28,7 +28,9 @@ var DotUtility = {
28
28
  height: '0.625rem',
29
29
  borderRadius: 'var(--rounded-full)',
30
30
  backgroundColor: 'color-mix(in srgb, var(--color-accent) calc(var(--tw-bg-opacity) * 100%), transparent)',
31
- flexShrink: '0'
31
+ flexShrink: '0',
32
+ justifyContent: 'center',
33
+ alignItems: 'center'
32
34
  }
33
35
  };
34
36
 
@@ -124,20 +126,24 @@ const textColor = ({ value, corePlugins }, settings) => {
124
126
  * @param {[]} colors
125
127
  * @param {boolean} colorMix
126
128
  * @param {boolean} rgb
127
- * @returns {[]}
129
+ * @returns {Object}
128
130
  */
129
131
  const tailwindColors = (colors = [], colorMix = true, rgb = false) => {
132
+ const result = {
133
+ current: 'color-mix(in var(--space), currentcolor calc(<alpha-value> * 100%), transparent)'
134
+ };
135
+
130
136
  colors.forEach(name => {
131
137
  if (rgb) {
132
- colors[name + '-rgb'] = `rgb(var(--color-${name}-rgb) / <alpha-value>)`;
138
+ result[name + '-rgb'] = `rgb(var(--color-${name}-rgb) / <alpha-value>)`;
133
139
  }
134
140
 
135
- colors[name] = colorMix
141
+ result[name] = colorMix
136
142
  ? `color-mix(in var(--space), var(--color-${name}) calc(<alpha-value> * 100%), transparent)`
137
143
  : `rgb(var(--color-${name}) / <alpha-value>)`;
138
144
  });
139
145
 
140
- return colors
146
+ return result
141
147
  };
142
148
 
143
149
  /**
@@ -210,7 +216,7 @@ const defaultConfig = {
210
216
  'warning', 'error', 'info', 'success', 'light', 'dark',
211
217
  'main', 'main-primary', 'main-secondary', 'main-tertiary',
212
218
  'body', 'body-primary', 'body-secondary', 'body-tertiary',
213
- 'primary-foreground', 'accent-foreground', 'current-foreground',
219
+ 'primary-foreground', 'accent-foreground',
214
220
  'warning-foreground', 'error-foreground', 'info-foreground', 'success-foreground', 'light-foreground', 'dark-foreground',
215
221
  'main-foreground', 'main-primary-foreground', 'main-secondary-foreground', 'main-tertiary-foreground',
216
222
  'body-foreground', 'body-primary-foreground', 'body-secondary-foreground', 'body-tertiary-foreground'
@@ -222,7 +228,7 @@ const defaultConfig = {
222
228
  fontSize: ['xs', 'sm', 'base', 'md', 'lg', 'xl', '2xl', '3xl', '3xl', '4xl', '5xl', '6xl', '7xl', '7xl', '8xl', '9xl'],
223
229
  spacing: ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'],
224
230
  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'],
231
+ animations: ['ripple', 'spin', 'move-indeterminate'],
226
232
  mask: ['check', 'radio', 'angle-up', 'angle-down'],
227
233
  screens: {
228
234
  xs: '22.5em',
@@ -88,6 +88,8 @@ export const closeDialog = async (element, options = {}) => {
88
88
  ...options
89
89
  }
90
90
 
91
+ element.dispatchEvent(new CustomEvent('c-dialog:close'))
92
+
91
93
  window.HTMLDialogElement
92
94
  ? element.close()
93
95
  : element.removeAttribute('open')