@kvell-group/ui 1.20.0 → 1.21.0

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/theme/index.ts +5 -18
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@kvell-group/ui",
3
3
  "author": "Kvell Group",
4
4
  "private": false,
5
- "version": "1.20.0",
5
+ "version": "1.21.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/kvell-group/ui.git"
@@ -1,4 +1,4 @@
1
- import { colorsTuple, type MantineThemeOverride } from '@mantine/core'
1
+ import { colorsTuple, defaultVariantColorsResolver, type MantineThemeOverride } from '@mantine/core'
2
2
  import { Notification } from '../components/Notifications/Notification'
3
3
  import { CloseButton } from '../components/CloseButton'
4
4
 
@@ -59,23 +59,10 @@ export const theme: MantineThemeOverride = {
59
59
  },
60
60
  primaryShade: 6, // { light: 6, dark: 8 } default mantine by theme
61
61
  primaryColor: 'primary',
62
- /* variantColorResolver: ({ color, variant, gradient, theme }) => {
63
- if (variant === 'primary') {
64
- return {
65
- background: 'var(--mantine-color-red-9)',
66
- hover: 'var(--mantine-color-red-8)',
67
- color: 'var(--mantine-color-white)',
68
- border: 'none',
69
- }
70
- }
71
-
72
- return {
73
- background: 'var(--mantine-color-red-9)',
74
- hover: 'var(--mantine-color-red-8)',
75
- color: 'var(--mantine-color-white)',
76
- border: 'none',
77
- }
78
- }, //color by variant */
62
+ variantColorResolver: (input) =>
63
+ defaultVariantColorsResolver(
64
+ input.variant === 'primary' ? { ...input, variant: 'filled' } : input
65
+ ),
79
66
  autoContrast: false, //default value
80
67
  luminanceThreshold: 0.3, //default value
81
68
  fontFamily: 'Onest, Arial, Helvetica, sans-serif',