@docsplain-kit/core 0.0.1 → 0.0.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/MIGRATION_GUIDE.md +16 -16
- package/config/colors/control.js +11 -11
- package/config/colors/danger.js +11 -11
- package/config/colors/info.js +11 -11
- package/config/colors/primary.js +11 -11
- package/config/colors/secondary.js +11 -11
- package/config/colors/success.js +11 -11
- package/config/colors/warning.js +11 -11
- package/package.json +2 -2
- package/config/colors/tertiary.d.ts +0 -13
- package/config/colors/tertiary.js +0 -18
- package/config/colors/tertiary.js.map +0 -1
package/MIGRATION_GUIDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Docsplain-Kit Tailwind v4 Migration Guide
|
|
2
2
|
|
|
3
|
-
This guide helps you migrate from Tailwind v3 to v4 while using
|
|
3
|
+
This guide helps you migrate from Tailwind v3 to v4 while using Docsplain-Kit components.
|
|
4
4
|
|
|
5
5
|
## Quick Start for Tailwind v4
|
|
6
6
|
|
|
@@ -8,17 +8,17 @@ This guide helps you migrate from Tailwind v3 to v4 while using PF-Kit component
|
|
|
8
8
|
|
|
9
9
|
1. Install the package:
|
|
10
10
|
```bash
|
|
11
|
-
npm install @
|
|
11
|
+
npm install @docsplain-kit/core
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
2. Import the CSS in your global styles (e.g., `globals.css` or `app.css`):
|
|
15
15
|
```css
|
|
16
|
-
@import "@
|
|
16
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
3. Create a minimal `tailwind.config.js`:
|
|
20
20
|
```js
|
|
21
|
-
const withUiKitV4 = require('@
|
|
21
|
+
const withUiKitV4 = require('@docsplain-kit/core/withUiKitV4');
|
|
22
22
|
|
|
23
23
|
module.exports = withUiKitV4({
|
|
24
24
|
content: [
|
|
@@ -40,7 +40,7 @@ module.exports = withUiKitV4({
|
|
|
40
40
|
If you need to support both Tailwind v3 and v4 or prefer configuration-based setup:
|
|
41
41
|
|
|
42
42
|
```js
|
|
43
|
-
const withUiKit = require('@
|
|
43
|
+
const withUiKit = require('@docsplain-kit/core/withUiKit'); // v3 compatible
|
|
44
44
|
|
|
45
45
|
module.exports = withUiKit({
|
|
46
46
|
content: [
|
|
@@ -70,7 +70,7 @@ module.exports = withUiKit({
|
|
|
70
70
|
3. **Better performance**: Faster builds and smaller bundles
|
|
71
71
|
4. **Native CSS features**: Better support for modern CSS
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Docsplain-Kit Changes
|
|
74
74
|
|
|
75
75
|
- **New**: `ui-kit.css` - Contains all theme definitions as CSS custom properties
|
|
76
76
|
- **New**: `withUiKitV4.js` - Minimal config for Tailwind v4
|
|
@@ -84,10 +84,10 @@ module.exports = withUiKit({
|
|
|
84
84
|
```css
|
|
85
85
|
/* Wrong */
|
|
86
86
|
@import "tailwindcss";
|
|
87
|
-
@import "@
|
|
87
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
88
88
|
|
|
89
89
|
/* Correct */
|
|
90
|
-
@import "@
|
|
90
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
2. **Check Tailwind version**:
|
|
@@ -99,7 +99,7 @@ module.exports = withUiKit({
|
|
|
99
99
|
3. **Verify content paths** in your config include the UI kit:
|
|
100
100
|
```js
|
|
101
101
|
content: [
|
|
102
|
-
"./node_modules/@
|
|
102
|
+
"./node_modules/@docsplain-kit/core/**/*",
|
|
103
103
|
// your other paths
|
|
104
104
|
]
|
|
105
105
|
```
|
|
@@ -109,7 +109,7 @@ module.exports = withUiKit({
|
|
|
109
109
|
Add your font definitions in your global CSS after importing ui-kit.css:
|
|
110
110
|
|
|
111
111
|
```css
|
|
112
|
-
@import "@
|
|
112
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
113
113
|
|
|
114
114
|
@font-face {
|
|
115
115
|
font-family: 'fontRegular';
|
|
@@ -138,12 +138,12 @@ The CSS approach defines colors as custom properties. If you're having issues:
|
|
|
138
138
|
|
|
139
139
|
1. In your `app/globals.css`:
|
|
140
140
|
```css
|
|
141
|
-
@import "@
|
|
141
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
2. In your `tailwind.config.js`:
|
|
145
145
|
```js
|
|
146
|
-
const withUiKitV4 = require('@
|
|
146
|
+
const withUiKitV4 = require('@docsplain-kit/core/withUiKitV4');
|
|
147
147
|
|
|
148
148
|
module.exports = withUiKitV4({
|
|
149
149
|
content: [
|
|
@@ -158,7 +158,7 @@ module.exports = withUiKitV4({
|
|
|
158
158
|
|
|
159
159
|
1. In your `styles/globals.css`:
|
|
160
160
|
```css
|
|
161
|
-
@import "@
|
|
161
|
+
@import "@docsplain-kit/core/ui-kit.css";
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
2. Same `tailwind.config.js` as above
|
|
@@ -169,7 +169,7 @@ module.exports = withUiKitV4({
|
|
|
169
169
|
- [ ] Choose CSS import or config-based approach
|
|
170
170
|
- [ ] Import ui-kit.css in global styles
|
|
171
171
|
- [ ] Update tailwind.config.js to use withUiKitV4
|
|
172
|
-
- [ ] Test all
|
|
172
|
+
- [ ] Test all Docsplain-Kit components in your app
|
|
173
173
|
- [ ] Update custom fonts if needed
|
|
174
174
|
- [ ] Verify responsive breakpoints work
|
|
175
175
|
- [ ] Check dark mode functionality
|
|
@@ -181,7 +181,7 @@ If you encounter issues during migration:
|
|
|
181
181
|
1. Check this guide first
|
|
182
182
|
2. Verify your Tailwind v4 setup
|
|
183
183
|
3. Test with a minimal reproduction
|
|
184
|
-
4. Check the [
|
|
184
|
+
4. Check the [Docsplain-Kit Storybook](https://core.docsplain.ca) for working examples
|
|
185
185
|
|
|
186
186
|
## Rollback Plan
|
|
187
187
|
|
package/config/colors/control.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var control = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#FAFAFA',
|
|
4
|
+
100: '#F5F5F5',
|
|
5
|
+
200: '#E5E5E5',
|
|
6
|
+
300: '#D4D4D4',
|
|
7
|
+
400: '#A3A3A3',
|
|
8
|
+
500: '#737373',
|
|
9
|
+
600: '#525252',
|
|
10
|
+
700: '#404040',
|
|
11
|
+
800: '#262626',
|
|
12
|
+
900: '#171717',
|
|
13
|
+
950: '#0A0A0A'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
control: control
|
package/config/colors/danger.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var danger = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#FEF2F2',
|
|
4
|
+
100: '#FEE2E2',
|
|
5
|
+
200: '#FECACA',
|
|
6
|
+
300: '#FCA5A5',
|
|
7
|
+
400: '#F87171',
|
|
8
|
+
500: '#EF4444',
|
|
9
|
+
600: '#DC2626',
|
|
10
|
+
700: '#B91C1C',
|
|
11
|
+
800: '#991B1B',
|
|
12
|
+
900: '#7F1D1D',
|
|
13
|
+
950: '#450A0A'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
danger: danger
|
package/config/colors/info.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var info = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#F0F9FF',
|
|
4
|
+
100: '#E0F2FE',
|
|
5
|
+
200: '#BAE6FD',
|
|
6
|
+
300: '#7DD3FC',
|
|
7
|
+
400: '#38BDF8',
|
|
8
|
+
500: '#0EA5E9',
|
|
9
|
+
600: '#0284C7',
|
|
10
|
+
700: '#0369A1',
|
|
11
|
+
800: '#075985',
|
|
12
|
+
900: '#0C4A6E',
|
|
13
|
+
950: '#082F49'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
info: info
|
package/config/colors/primary.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var primary = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#E6E6F3',
|
|
4
|
+
100: '#CCCDE7',
|
|
5
|
+
200: '#B3B4DB',
|
|
6
|
+
300: '#999BCF',
|
|
7
|
+
400: '#666AB8',
|
|
8
|
+
500: '#3338A0',
|
|
9
|
+
600: '#000688',
|
|
10
|
+
700: '#00056D',
|
|
11
|
+
800: '#000452',
|
|
12
|
+
900: '#000236',
|
|
13
|
+
950: '#00011B'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
primary: primary
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var secondary = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#E6F9FC',
|
|
4
|
+
100: '#CCF3FA',
|
|
5
|
+
200: '#B3ECF7',
|
|
6
|
+
300: '#81E0F2',
|
|
7
|
+
400: '#4ED4EC',
|
|
8
|
+
500: '#02C1E4',
|
|
9
|
+
600: '#029AB6',
|
|
10
|
+
700: '#017489',
|
|
11
|
+
800: '#014D5B',
|
|
12
|
+
900: '#014D5B',
|
|
13
|
+
950: '#013A44'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
secondary: secondary
|
package/config/colors/success.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var success = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#F0FDF4',
|
|
4
|
+
100: '#DCFCE7',
|
|
5
|
+
200: '#BBF7D0',
|
|
6
|
+
300: '#86EFAC',
|
|
7
|
+
400: '#4ADE80',
|
|
8
|
+
500: '#22C55E',
|
|
9
|
+
600: '#16A34A',
|
|
10
|
+
700: '#15803D',
|
|
11
|
+
800: '#166534',
|
|
12
|
+
900: '#14532D',
|
|
13
|
+
950: '#052E16'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
success: success
|
package/config/colors/warning.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var warning = {
|
|
3
|
-
50: '#
|
|
4
|
-
100: '#
|
|
5
|
-
200: '#
|
|
6
|
-
300: '#
|
|
7
|
-
400: '#
|
|
8
|
-
500: '#
|
|
9
|
-
600: '#
|
|
10
|
-
700: '#
|
|
11
|
-
800: '#
|
|
12
|
-
900: '#
|
|
13
|
-
950: '#
|
|
3
|
+
50: '#FFF7ED',
|
|
4
|
+
100: '#FFEDD5',
|
|
5
|
+
200: '#FED7AA',
|
|
6
|
+
300: '#FDBA74',
|
|
7
|
+
400: '#FB923C',
|
|
8
|
+
500: '#F97316',
|
|
9
|
+
600: '#EA580C',
|
|
10
|
+
700: '#C2410C',
|
|
11
|
+
800: '#9A3412',
|
|
12
|
+
900: '#7C2D12',
|
|
13
|
+
950: '#431407'
|
|
14
14
|
};
|
|
15
15
|
module.exports = {
|
|
16
16
|
warning: warning
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docsplain-kit/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"author": "Docsplain Company",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Docsplain Kit components for use in React or Next.js.",
|
|
9
9
|
"homepage": "core.docsplain.ca",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"files": [
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var tertiary = {
|
|
3
|
-
50: '#E9FBF6',
|
|
4
|
-
100: '#A9EEDC',
|
|
5
|
-
200: '#7DE5CB',
|
|
6
|
-
300: '#52DDB9',
|
|
7
|
-
400: '#27D4A8',
|
|
8
|
-
500: '#1FAA86',
|
|
9
|
-
600: '#177F65',
|
|
10
|
-
700: '#105543',
|
|
11
|
-
800: '#082A22',
|
|
12
|
-
900: '#041511',
|
|
13
|
-
950: '#03110D'
|
|
14
|
-
};
|
|
15
|
-
module.exports = {
|
|
16
|
-
tertiary: tertiary
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=tertiary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tertiary.js","sourceRoot":"","sources":["../../../config/colors/tertiary.ts"],"names":[],"mappings":";AAAA,IAAM,QAAQ,GAAG;IACf,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE,QAAQ;CACnB,CAAC"}
|