tailwind-preset-mantine 1.0.2 → 1.0.4

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": "tailwind-preset-mantine",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Integrate Mantine with Tailwind CSS",
5
5
  "keywords": [
6
6
  "mantine",
package/src/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { MantineThemeColors } from "@mantine/core";
1
+ import type { MantineThemeColorsOverride } from "@mantine/core";
2
2
  import type { Config } from "tailwindcss";
3
3
 
4
4
  declare function tailwindPresetMantine(
5
- options?: Partial<{ mantineColors: MantineThemeColors }>,
5
+ options?: Partial<{ mantineColors: MantineThemeColorsOverride }>,
6
6
  ): Config;
7
7
 
8
8
  export = tailwindPresetMantine;
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /// for reference: https://github.com/mantinedev/mantine/blob/master/packages/%40mantine/core/src/core/MantineProvider/global.css
2
2
 
3
3
  /**
4
- * @typedef {import('@mantine/core').MantineThemeColors} MantineThemeColors
4
+ * @typedef {import('@mantine/core').MantineThemeColorsOverride} MantineThemeColorsOverride
5
5
  * @typedef {import('tailwindcss').Config} TailwindConfig
6
6
  */
7
7
 
@@ -176,7 +176,7 @@ module.exports = function tailwindPresetMantine({
176
176
  };
177
177
 
178
178
  /**
179
- * @param {MantineThemeColors} mantineColors
179
+ * @param {MantineThemeColorsOverride} mantineColors
180
180
  */
181
181
  function generateColors(mantineColors) {
182
182
  /**
@@ -184,7 +184,7 @@ function generateColors(mantineColors) {
184
184
  */
185
185
  const colors = {};
186
186
 
187
- for (const color of mantineColors) {
187
+ for (const color of Object.keys(mantineColors)) {
188
188
  colors[color] = {
189
189
  50: `var(--mantine-color-${color}-0)`,
190
190
  100: `var(--mantine-color-${color}-1)`,
@@ -224,7 +224,7 @@ function generatePrimaryColors() {
224
224
  }
225
225
 
226
226
  /**
227
- * @param {MantineThemeColors} mantineColors
227
+ * @param {MantineThemeColorsOverride} mantineColors
228
228
  */
229
229
  function generateVariantSpecificColors(mantineColors) {
230
230
  /**
@@ -232,7 +232,7 @@ function generateVariantSpecificColors(mantineColors) {
232
232
  */
233
233
  const colors = {};
234
234
 
235
- for (const color of mantineColors) {
235
+ for (const color of Object.keys(mantineColors)) {
236
236
  colors[`${color}-filled`] = `var(--mantine-color-${color}-filled)`;
237
237
  colors[`${color}-filled-hover`] =
238
238
  `var(--mantine-color-${color}-filled-hover)`;