@crowdstrike/tailwind-toucan-base 3.1.1 → 3.2.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.
- package/README.md +20 -0
- package/package.json +25 -25
- package/{plugins → src/plugins}/form-fields.js +0 -0
- package/{plugins → src/plugins}/index.js +0 -0
- package/{plugins → src/plugins}/interaction.js +0 -0
- package/{plugins → src/plugins}/line-clamp.js +0 -0
- package/{plugins → src/plugins}/theme-plugin.js +0 -0
- package/{plugins → src/plugins}/typography.js +0 -0
- package/{plugins → src/plugins}/variables.js +0 -0
- package/{index.js → src/tailwind.config.js} +0 -0
- package/{theme-data.d.ts → src/theme-data.d.ts} +0 -0
- package/{theme-data.js → src/theme-data.js} +0 -0
- package/{themes.json → src/themes.json} +0 -0
- package/src/types.d.ts +48 -0
package/README.md
CHANGED
@@ -57,6 +57,26 @@ pnpm run build:preview
|
|
57
57
|
npx http-server ./dist
|
58
58
|
```
|
59
59
|
|
60
|
+
Note that changes to `src` or `build` scripts will require re-running `pnpm start`.
|
61
|
+
|
62
|
+
## Previewing manual tests locally
|
63
|
+
|
64
|
+
```bash
|
65
|
+
pnpm build
|
66
|
+
```
|
67
|
+
|
68
|
+
then, open the `manual-test.html`
|
69
|
+
```bash
|
70
|
+
firefox ./manual-test.html
|
71
|
+
```
|
72
|
+
|
73
|
+
Or, along with the tailwind-preview
|
74
|
+
```bash
|
75
|
+
pnpm start
|
76
|
+
```
|
77
|
+
|
78
|
+
and visit `http://localhost:8080/manual`
|
79
|
+
|
60
80
|
## Importing colors and shadows from Figma
|
61
81
|
|
62
82
|
This addon provides the ability to pull our palette information directly from Figma files and store them in
|
package/package.json
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crowdstrike/tailwind-toucan-base",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.2.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "Tailwind preset for CrowdStrike's Toucan design system",
|
6
6
|
"repository": "https://github.com/CrowdStrike/tailwind-toucan-base",
|
7
7
|
"license": "MIT",
|
8
8
|
"author": "CrowdStrike UX Team",
|
9
|
-
"main": "
|
9
|
+
"main": "src/tailwind.config.js",
|
10
10
|
"files": [
|
11
|
-
"
|
11
|
+
"src",
|
12
12
|
"index.css",
|
13
13
|
"themes.json",
|
14
|
-
"
|
15
|
-
"theme-data.d.ts",
|
16
|
-
"toucan.css",
|
17
|
-
"plugins/**/*.js"
|
14
|
+
"toucan.css"
|
18
15
|
],
|
19
16
|
"exports": {
|
20
|
-
".": "./
|
21
|
-
"./themes": "./themes.json",
|
22
|
-
"./themes.json": "./themes.json",
|
23
|
-
"./theme-data": "./theme-data.js"
|
17
|
+
".": "./src/tailwind.config.js",
|
18
|
+
"./themes": "./src/themes.json",
|
19
|
+
"./themes.json": "./src/themes.json",
|
20
|
+
"./theme-data": "./src/theme-data.js"
|
24
21
|
},
|
25
22
|
"typesVersions": {
|
26
23
|
"*": {
|
24
|
+
"types": [
|
25
|
+
"./src/types.d.ts"
|
26
|
+
],
|
27
27
|
"theme-data": [
|
28
|
-
"./theme-data.d.ts"
|
28
|
+
"./src/theme-data.d.ts"
|
29
29
|
]
|
30
30
|
}
|
31
31
|
},
|
32
32
|
"scripts": {
|
33
33
|
"start": "pnpm run build && npx http-server ./dist",
|
34
34
|
"build": "npm-run-all clean build:cdn build:alias build:preview build:theme-data",
|
35
|
-
"build:theme-data": "node ./
|
36
|
-
"build:preview": "node ./
|
37
|
-
"build:cdn": "NODE_ENV=production tailwind build -i ./
|
35
|
+
"build:theme-data": "node ./build/theme-data.mjs",
|
36
|
+
"build:preview": "node ./build/preview/index.mjs",
|
37
|
+
"build:cdn": "NODE_ENV=production tailwind build -i ./build/input.css -o ./index.css -c ./build/tailwind.config.cdn.js",
|
38
38
|
"clean": "rm -f ./toucan.css ./index.css",
|
39
39
|
"build:alias": "cp index.css toucan.css",
|
40
40
|
"figma:export-styles": "figma-export use-config",
|
41
|
-
"test": "pnpm exec vitest --coverage --run",
|
41
|
+
"test": "pnpm --filter='tests' exec vitest --coverage --run",
|
42
42
|
"lint:fix": "pnpm run lint:js --fix",
|
43
43
|
"lint:js": "eslint .",
|
44
44
|
"prepublishOnly": "pnpm build"
|
@@ -48,23 +48,23 @@
|
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
50
|
"@figma-export/cli": "4.4.0",
|
51
|
-
"@nullvoxpopuli/eslint-configs": "2.2.
|
51
|
+
"@nullvoxpopuli/eslint-configs": "2.2.33",
|
52
52
|
"@semantic-release/changelog": "^6.0.1",
|
53
53
|
"@semantic-release/git": "^10.0.1",
|
54
54
|
"@types/fs-extra": "^9.0.13",
|
55
55
|
"autoprefixer": "^10.4.7",
|
56
56
|
"c8": "^7.11.3",
|
57
57
|
"common-tags": "^1.8.2",
|
58
|
-
"eslint": "^8.
|
58
|
+
"eslint": "^8.19.0",
|
59
59
|
"execa": "^6.1.0",
|
60
60
|
"fs-extra": "^10.1.0",
|
61
61
|
"npm-run-all": "^4.1.5",
|
62
|
-
"pnpm": "^7.
|
62
|
+
"pnpm": "^7.5.0",
|
63
63
|
"postcss": "^8.4.14",
|
64
|
-
"semantic-release": "^19.0.
|
64
|
+
"semantic-release": "^19.0.3",
|
65
65
|
"tailwind-config-viewer": "^1.7.1",
|
66
|
-
"typescript": "^4.7.
|
67
|
-
"vitest": "0.
|
66
|
+
"typescript": "^4.7.4",
|
67
|
+
"vitest": "0.17.0"
|
68
68
|
},
|
69
69
|
"engines": {
|
70
70
|
"node": ">=14.15.0"
|
@@ -86,10 +86,10 @@
|
|
86
86
|
"@semantic-release/git"
|
87
87
|
]
|
88
88
|
},
|
89
|
-
"packageManager": "pnpm@7.
|
89
|
+
"packageManager": "pnpm@7.5.0",
|
90
90
|
"volta": {
|
91
|
-
"node": "16.15.
|
91
|
+
"node": "16.15.0",
|
92
92
|
"yarn": "1.22.19",
|
93
|
-
"npm": "8.
|
93
|
+
"npm": "8.13.2"
|
94
94
|
}
|
95
95
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/src/types.d.ts
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* Generic loosley typed version of the strict types provided by
|
3
|
+
* ```ts
|
4
|
+
* import type ThemeData from '@crowdstrike/tailwind-toucan-base/theme-data';
|
5
|
+
* ```
|
6
|
+
*/
|
7
|
+
export interface ColorInfo {
|
8
|
+
category: string[];
|
9
|
+
hasAlpha: boolean;
|
10
|
+
rgbFill: string;
|
11
|
+
fill: {
|
12
|
+
r: number;
|
13
|
+
g: number;
|
14
|
+
b: number;
|
15
|
+
a: number;
|
16
|
+
};
|
17
|
+
name: string;
|
18
|
+
value: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Generic loosley typed version of the strict types provided by
|
23
|
+
* ```ts
|
24
|
+
* import type ThemeData from '@crowdstrike/tailwind-toucan-base/theme-data';
|
25
|
+
* ```
|
26
|
+
*/
|
27
|
+
export interface Theme {
|
28
|
+
colors: ColorInfo[];
|
29
|
+
cssSelector: string;
|
30
|
+
shadows: Array<{
|
31
|
+
name: string;
|
32
|
+
effects: string[];
|
33
|
+
}>;
|
34
|
+
}
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Generic loosley typed version of the strict types provided by
|
38
|
+
* ```ts
|
39
|
+
* import type ThemeData from '@crowdstrike/tailwind-toucan-base/theme-data';
|
40
|
+
* ```
|
41
|
+
*/
|
42
|
+
export interface ThemeData {
|
43
|
+
aliases: { name: string; value: string }[];
|
44
|
+
themes: {
|
45
|
+
dark: Theme;
|
46
|
+
light: Theme;
|
47
|
+
};
|
48
|
+
}
|