@krosoft/react 0.0.41 → 0.0.43
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/dist/tailwind/index.d.ts +106 -0
- package/dist/tailwind/index.d.ts.map +1 -0
- package/dist/tailwind/index.js +72 -0
- package/package.json +3 -3
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Tailwind CSS preset for @krosoft/react projects.
|
|
3
|
+
*
|
|
4
|
+
* Contains the common shadcn/ui design tokens shared across all projects:
|
|
5
|
+
* - Dark mode configuration
|
|
6
|
+
* - Container settings
|
|
7
|
+
* - Base color mappings (border, input, ring, background, foreground, primary, etc.)
|
|
8
|
+
* - Border radius tokens
|
|
9
|
+
* - Accordion keyframes & animations
|
|
10
|
+
* - Content scanning for @krosoft/react compiled components
|
|
11
|
+
*
|
|
12
|
+
* Usage in a consuming project's tailwind.config.ts:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import krosoftPreset from "@krosoft/react/tailwind";
|
|
16
|
+
*
|
|
17
|
+
* export default {
|
|
18
|
+
* presets: [krosoftPreset],
|
|
19
|
+
* content: ["./src/**\/*.{ts,tsx}"],
|
|
20
|
+
* theme: {
|
|
21
|
+
* extend: {
|
|
22
|
+
* // project-specific overrides
|
|
23
|
+
* },
|
|
24
|
+
* },
|
|
25
|
+
* } satisfies Config;
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare const krosoftPreset: {
|
|
29
|
+
darkMode: "class";
|
|
30
|
+
content: string[];
|
|
31
|
+
theme: {
|
|
32
|
+
container: {
|
|
33
|
+
center: true;
|
|
34
|
+
padding: string;
|
|
35
|
+
screens: {
|
|
36
|
+
"2xl": string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
extend: {
|
|
40
|
+
colors: {
|
|
41
|
+
border: string;
|
|
42
|
+
input: string;
|
|
43
|
+
ring: string;
|
|
44
|
+
background: string;
|
|
45
|
+
foreground: string;
|
|
46
|
+
primary: {
|
|
47
|
+
DEFAULT: string;
|
|
48
|
+
foreground: string;
|
|
49
|
+
};
|
|
50
|
+
secondary: {
|
|
51
|
+
DEFAULT: string;
|
|
52
|
+
foreground: string;
|
|
53
|
+
};
|
|
54
|
+
destructive: {
|
|
55
|
+
DEFAULT: string;
|
|
56
|
+
foreground: string;
|
|
57
|
+
};
|
|
58
|
+
muted: {
|
|
59
|
+
DEFAULT: string;
|
|
60
|
+
foreground: string;
|
|
61
|
+
};
|
|
62
|
+
accent: {
|
|
63
|
+
DEFAULT: string;
|
|
64
|
+
foreground: string;
|
|
65
|
+
};
|
|
66
|
+
popover: {
|
|
67
|
+
DEFAULT: string;
|
|
68
|
+
foreground: string;
|
|
69
|
+
};
|
|
70
|
+
card: {
|
|
71
|
+
DEFAULT: string;
|
|
72
|
+
foreground: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
borderRadius: {
|
|
76
|
+
lg: string;
|
|
77
|
+
md: string;
|
|
78
|
+
sm: string;
|
|
79
|
+
};
|
|
80
|
+
keyframes: {
|
|
81
|
+
"accordion-down": {
|
|
82
|
+
from: {
|
|
83
|
+
height: string;
|
|
84
|
+
};
|
|
85
|
+
to: {
|
|
86
|
+
height: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
"accordion-up": {
|
|
90
|
+
from: {
|
|
91
|
+
height: string;
|
|
92
|
+
};
|
|
93
|
+
to: {
|
|
94
|
+
height: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
animation: {
|
|
99
|
+
"accordion-down": string;
|
|
100
|
+
"accordion-up": string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export default krosoftPreset;
|
|
106
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tailwind/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoED,CAAC;AAEnB,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
darkMode: "class",
|
|
3
|
+
content: ["./node_modules/@krosoft/react/dist/**/*.js"],
|
|
4
|
+
theme: {
|
|
5
|
+
container: {
|
|
6
|
+
center: !0,
|
|
7
|
+
padding: "2rem",
|
|
8
|
+
screens: {
|
|
9
|
+
"2xl": "1400px"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
extend: {
|
|
13
|
+
colors: {
|
|
14
|
+
border: "hsl(var(--border))",
|
|
15
|
+
input: "hsl(var(--input))",
|
|
16
|
+
ring: "hsl(var(--ring))",
|
|
17
|
+
background: "hsl(var(--background))",
|
|
18
|
+
foreground: "hsl(var(--foreground))",
|
|
19
|
+
primary: {
|
|
20
|
+
DEFAULT: "hsl(var(--primary))",
|
|
21
|
+
foreground: "hsl(var(--primary-foreground))"
|
|
22
|
+
},
|
|
23
|
+
secondary: {
|
|
24
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
25
|
+
foreground: "hsl(var(--secondary-foreground))"
|
|
26
|
+
},
|
|
27
|
+
destructive: {
|
|
28
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
29
|
+
foreground: "hsl(var(--destructive-foreground))"
|
|
30
|
+
},
|
|
31
|
+
muted: {
|
|
32
|
+
DEFAULT: "hsl(var(--muted))",
|
|
33
|
+
foreground: "hsl(var(--muted-foreground))"
|
|
34
|
+
},
|
|
35
|
+
accent: {
|
|
36
|
+
DEFAULT: "hsl(var(--accent))",
|
|
37
|
+
foreground: "hsl(var(--accent-foreground))"
|
|
38
|
+
},
|
|
39
|
+
popover: {
|
|
40
|
+
DEFAULT: "hsl(var(--popover))",
|
|
41
|
+
foreground: "hsl(var(--popover-foreground))"
|
|
42
|
+
},
|
|
43
|
+
card: {
|
|
44
|
+
DEFAULT: "hsl(var(--card))",
|
|
45
|
+
foreground: "hsl(var(--card-foreground))"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
borderRadius: {
|
|
49
|
+
lg: "var(--radius)",
|
|
50
|
+
md: "calc(var(--radius) - 2px)",
|
|
51
|
+
sm: "calc(var(--radius) - 4px)"
|
|
52
|
+
},
|
|
53
|
+
keyframes: {
|
|
54
|
+
"accordion-down": {
|
|
55
|
+
from: { height: "0" },
|
|
56
|
+
to: { height: "var(--radix-accordion-content-height)" }
|
|
57
|
+
},
|
|
58
|
+
"accordion-up": {
|
|
59
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
60
|
+
to: { height: "0" }
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
animation: {
|
|
64
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
65
|
+
"accordion-up": "accordion-up 0.2s ease-out"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
r as default
|
|
72
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krosoft/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Krosoft shared React package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@storybook/addon-essentials": "^8.6.18",
|
|
49
49
|
"@storybook/react": "^8.6.18",
|
|
50
50
|
"@storybook/react-vite": "^8.6.18",
|
|
51
|
-
"@tailwindcss/vite": "^4.2.2",
|
|
52
51
|
"@types/node": "^25.6.0",
|
|
53
52
|
"@types/react": "^18.3.28",
|
|
54
53
|
"jsdom": "^26.1.0",
|
|
@@ -57,7 +56,8 @@
|
|
|
57
56
|
"react-dom": "^18.3.1",
|
|
58
57
|
"react-i18next": "^17.0.2",
|
|
59
58
|
"storybook": "^8.6.18",
|
|
60
|
-
"
|
|
59
|
+
"autoprefixer": "^10.4.21",
|
|
60
|
+
"tailwindcss": "^3.4.17",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
62
|
"vite": "^6.4.2",
|
|
63
63
|
"vitest": "^4.1.4"
|