@mcnivendev/design-system 1.0.3 → 1.0.5
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 +2 -3
- package/tailwind/index.js +21 -3
- package/tailwind/components.css +0 -18
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcnivendev/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
|
-
"./tailwind": "./tailwind/index.js"
|
|
11
|
-
"./tailwind/components.css": "./tailwind/components.css"
|
|
10
|
+
"./tailwind": "./tailwind/index.js"
|
|
12
11
|
},
|
|
13
12
|
"peerDependencies": {
|
|
14
13
|
"tailwindcss": "^4.0.0"
|
package/tailwind/index.js
CHANGED
|
@@ -2,25 +2,43 @@ import plugin from 'tailwindcss/plugin'
|
|
|
2
2
|
|
|
3
3
|
export default plugin(
|
|
4
4
|
({ addBase, addComponents, theme }) => {
|
|
5
|
+
/* ---------- Base tokens (optional) ---------- */
|
|
5
6
|
addBase({
|
|
6
7
|
':root': {
|
|
7
|
-
'--color-brand-primary': '
|
|
8
|
+
'--color-brand-primary': theme('colors.brand.primary'),
|
|
8
9
|
},
|
|
9
10
|
})
|
|
10
11
|
|
|
12
|
+
/* ---------- Components ---------- */
|
|
11
13
|
addComponents({
|
|
12
14
|
'.btn': {
|
|
13
|
-
|
|
15
|
+
display: 'inline-flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
fontWeight: theme('fontWeight.medium'),
|
|
14
19
|
borderRadius: theme('borderRadius.md'),
|
|
15
|
-
|
|
20
|
+
transitionProperty: theme('transitionProperty.DEFAULT'),
|
|
21
|
+
transitionDuration: theme('transitionDuration.150'),
|
|
16
22
|
},
|
|
23
|
+
|
|
17
24
|
'.btn-primary': {
|
|
18
25
|
backgroundColor: theme('colors.brand.primary'),
|
|
19
26
|
color: '#fff',
|
|
27
|
+
'&:hover': {
|
|
28
|
+
opacity: '0.9',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
'.card': {
|
|
33
|
+
backgroundColor: theme('colors.white'),
|
|
34
|
+
borderRadius: theme('borderRadius.lg'),
|
|
35
|
+
boxShadow: theme('boxShadow.md'),
|
|
36
|
+
padding: theme('spacing.6'),
|
|
20
37
|
},
|
|
21
38
|
})
|
|
22
39
|
},
|
|
23
40
|
{
|
|
41
|
+
/* ---------- Theme ---------- */
|
|
24
42
|
theme: {
|
|
25
43
|
extend: {
|
|
26
44
|
colors: {
|
package/tailwind/components.css
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* tailwind/components.css */
|
|
2
|
-
@tailwind base;
|
|
3
|
-
@tailwind components;
|
|
4
|
-
@tailwind utilities;
|
|
5
|
-
|
|
6
|
-
@layer components {
|
|
7
|
-
.btn {
|
|
8
|
-
@apply inline-flex items-center justify-center font-medium transition rounded-md;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.btn-primary {
|
|
12
|
-
@apply bg-brand-primary text-white hover:bg-brand-primary/90;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.card {
|
|
16
|
-
@apply bg-white rounded-lg shadow-md p-6;
|
|
17
|
-
}
|
|
18
|
-
}
|