@crowdstrike/tailwind-toucan-base 3.1.1 → 3.3.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/index.css +16 -0
- package/{theme-data.d.ts → index.d.ts} +45 -3
- package/package.json +32 -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} +1 -0
- package/{theme-data.js → src/theme-data.js} +0 -0
- package/{themes.json → src/themes.json} +0 -0
- package/toucan.css +16 -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/index.css
CHANGED
@@ -7036,6 +7036,10 @@ video {
|
|
7036
7036
|
z-index: var(--z-index-overlay);
|
7037
7037
|
}
|
7038
7038
|
|
7039
|
+
.z-overlay-loader {
|
7040
|
+
z-index: var(--z-index-overlay-loader);
|
7041
|
+
}
|
7042
|
+
|
7039
7043
|
.z-tooltip {
|
7040
7044
|
z-index: var(--z-index-tooltip);
|
7041
7045
|
}
|
@@ -7136,6 +7140,10 @@ video {
|
|
7136
7140
|
z-index: var(--z-index-overlay);
|
7137
7141
|
}
|
7138
7142
|
|
7143
|
+
.hover\:z-overlay-loader:hover {
|
7144
|
+
z-index: var(--z-index-overlay-loader);
|
7145
|
+
}
|
7146
|
+
|
7139
7147
|
.hover\:z-tooltip:hover {
|
7140
7148
|
z-index: var(--z-index-tooltip);
|
7141
7149
|
}
|
@@ -7236,6 +7244,10 @@ video {
|
|
7236
7244
|
z-index: var(--z-index-overlay);
|
7237
7245
|
}
|
7238
7246
|
|
7247
|
+
.active\:z-overlay-loader:active {
|
7248
|
+
z-index: var(--z-index-overlay-loader);
|
7249
|
+
}
|
7250
|
+
|
7239
7251
|
.active\:z-tooltip:active {
|
7240
7252
|
z-index: var(--z-index-tooltip);
|
7241
7253
|
}
|
@@ -7336,6 +7348,10 @@ video {
|
|
7336
7348
|
z-index: var(--z-index-overlay);
|
7337
7349
|
}
|
7338
7350
|
|
7351
|
+
.group:hover .group-hover\:z-overlay-loader {
|
7352
|
+
z-index: var(--z-index-overlay-loader);
|
7353
|
+
}
|
7354
|
+
|
7339
7355
|
.group:hover .group-hover\:z-tooltip {
|
7340
7356
|
z-index: var(--z-index-tooltip);
|
7341
7357
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
// Strict type for the themes.json structure
|
2
|
+
interface ThemeData {
|
2
3
|
"themes": {
|
3
4
|
"dark": {
|
4
5
|
"cssSelector": ".theme-dark",
|
@@ -2705,6 +2706,47 @@ declare let ThemeData = {
|
|
2705
2706
|
]
|
2706
2707
|
}
|
2707
2708
|
}
|
2708
|
-
}
|
2709
|
+
}
|
2709
2710
|
|
2710
|
-
|
2711
|
+
// Full Built CSS
|
2712
|
+
declare module '@crowdstrike/tailwind-toucan-base/index.css';
|
2713
|
+
declare module '@crowdstrike/tailwind-toucan-base/toucan.css';
|
2714
|
+
|
2715
|
+
|
2716
|
+
// Raw Theme JSON -- also available as theme-data.js
|
2717
|
+
declare module '@crowdstrike/tailwind-toucan-base/themes' {
|
2718
|
+
export = ThemeData;
|
2719
|
+
}
|
2720
|
+
declare module '@crowdstrike/tailwind-toucan-base/themes.json' {
|
2721
|
+
export = ThemeData;
|
2722
|
+
}
|
2723
|
+
|
2724
|
+
// Tailwind Config
|
2725
|
+
declare module '@crowdstrike/tailwind-toucan-base';
|
2726
|
+
|
2727
|
+
declare module '@crowdstrike/tailwind-toucan-base/theme-data' {
|
2728
|
+
/**
|
2729
|
+
* Utility type which describes the shape and properties of a particular color.
|
2730
|
+
*/
|
2731
|
+
export interface ColorInfo {
|
2732
|
+
category: string[];
|
2733
|
+
hasAlpha: boolean;
|
2734
|
+
rgbFill: string;
|
2735
|
+
fill: {
|
2736
|
+
r: number;
|
2737
|
+
g: number;
|
2738
|
+
b: number;
|
2739
|
+
a: number;
|
2740
|
+
};
|
2741
|
+
name: string;
|
2742
|
+
value: string;
|
2743
|
+
}
|
2744
|
+
|
2745
|
+
const _ThemeData: ThemeData;
|
2746
|
+
|
2747
|
+
/**
|
2748
|
+
* The data from the generated theme.json document containing all of the
|
2749
|
+
* Toucan colors, shadows, etc
|
2750
|
+
*/
|
2751
|
+
export default _ThemeData;
|
2752
|
+
}
|
package/package.json
CHANGED
@@ -1,44 +1,51 @@
|
|
1
1
|
{
|
2
2
|
"name": "@crowdstrike/tailwind-toucan-base",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.3.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
|
+
"index.d.ts",
|
12
13
|
"index.css",
|
13
14
|
"themes.json",
|
14
|
-
"
|
15
|
-
"theme-data.d.ts",
|
16
|
-
"toucan.css",
|
17
|
-
"plugins/**/*.js"
|
15
|
+
"toucan.css"
|
18
16
|
],
|
19
17
|
"exports": {
|
20
|
-
".": "./
|
21
|
-
"./themes": "./themes.json",
|
22
|
-
"./themes.json": "./themes.json",
|
23
|
-
"./theme-data": "./theme-data.js"
|
18
|
+
".": "./src/tailwind.config.js",
|
19
|
+
"./themes": "./src/themes.json",
|
20
|
+
"./themes.json": "./src/themes.json",
|
21
|
+
"./theme-data": "./src/theme-data.js"
|
24
22
|
},
|
25
23
|
"typesVersions": {
|
26
24
|
"*": {
|
25
|
+
"*": [
|
26
|
+
"./index.d.ts"
|
27
|
+
],
|
28
|
+
"themes": [
|
29
|
+
"./index.d.ts"
|
30
|
+
],
|
31
|
+
"themes.json": [
|
32
|
+
"./index.d.ts"
|
33
|
+
],
|
27
34
|
"theme-data": [
|
28
|
-
"./
|
35
|
+
"./index.d.ts"
|
29
36
|
]
|
30
37
|
}
|
31
38
|
},
|
32
39
|
"scripts": {
|
33
40
|
"start": "pnpm run build && npx http-server ./dist",
|
34
41
|
"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 ./
|
42
|
+
"build:theme-data": "node ./build/theme-data.mjs",
|
43
|
+
"build:preview": "node ./build/preview/index.mjs",
|
44
|
+
"build:cdn": "NODE_ENV=production tailwind build -i ./build/input.css -o ./index.css -c ./build/tailwind.config.cdn.js",
|
38
45
|
"clean": "rm -f ./toucan.css ./index.css",
|
39
46
|
"build:alias": "cp index.css toucan.css",
|
40
47
|
"figma:export-styles": "figma-export use-config",
|
41
|
-
"test": "pnpm exec vitest --coverage --run",
|
48
|
+
"test": "pnpm --filter='tests' exec vitest --coverage --run",
|
42
49
|
"lint:fix": "pnpm run lint:js --fix",
|
43
50
|
"lint:js": "eslint .",
|
44
51
|
"prepublishOnly": "pnpm build"
|
@@ -48,23 +55,23 @@
|
|
48
55
|
},
|
49
56
|
"devDependencies": {
|
50
57
|
"@figma-export/cli": "4.4.0",
|
51
|
-
"@nullvoxpopuli/eslint-configs": "2.2.
|
58
|
+
"@nullvoxpopuli/eslint-configs": "2.2.35",
|
52
59
|
"@semantic-release/changelog": "^6.0.1",
|
53
60
|
"@semantic-release/git": "^10.0.1",
|
54
61
|
"@types/fs-extra": "^9.0.13",
|
55
62
|
"autoprefixer": "^10.4.7",
|
56
63
|
"c8": "^7.11.3",
|
57
64
|
"common-tags": "^1.8.2",
|
58
|
-
"eslint": "^8.
|
65
|
+
"eslint": "^8.19.0",
|
59
66
|
"execa": "^6.1.0",
|
60
67
|
"fs-extra": "^10.1.0",
|
61
68
|
"npm-run-all": "^4.1.5",
|
62
|
-
"pnpm": "^7.1
|
69
|
+
"pnpm": "^7.5.1",
|
63
70
|
"postcss": "^8.4.14",
|
64
|
-
"semantic-release": "^19.0.
|
71
|
+
"semantic-release": "^19.0.3",
|
65
72
|
"tailwind-config-viewer": "^1.7.1",
|
66
|
-
"typescript": "^4.7.
|
67
|
-
"vitest": "0.
|
73
|
+
"typescript": "^4.7.4",
|
74
|
+
"vitest": "0.18.0"
|
68
75
|
},
|
69
76
|
"engines": {
|
70
77
|
"node": ">=14.15.0"
|
@@ -86,10 +93,10 @@
|
|
86
93
|
"@semantic-release/git"
|
87
94
|
]
|
88
95
|
},
|
89
|
-
"packageManager": "pnpm@7.1
|
96
|
+
"packageManager": "pnpm@7.5.1",
|
90
97
|
"volta": {
|
91
|
-
"node": "16.
|
98
|
+
"node": "16.16.0",
|
92
99
|
"yarn": "1.22.19",
|
93
|
-
"npm": "8.
|
100
|
+
"npm": "8.13.2"
|
94
101
|
}
|
95
102
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -80,6 +80,7 @@ module.exports = {
|
|
80
80
|
10: '10',
|
81
81
|
'flash-messages': 'var(--z-index-flash-messages)',
|
82
82
|
overlay: 'var(--z-index-overlay)',
|
83
|
+
'overlay-loader': 'var(--z-index-overlay-loader)',
|
83
84
|
tooltip: 'var(--z-index-tooltip)',
|
84
85
|
'popover-sticky': 'var(--z-index-popover-sticky)',
|
85
86
|
popover: 'var(--z-index-popover)',
|
File without changes
|
File without changes
|
package/toucan.css
CHANGED
@@ -7036,6 +7036,10 @@ video {
|
|
7036
7036
|
z-index: var(--z-index-overlay);
|
7037
7037
|
}
|
7038
7038
|
|
7039
|
+
.z-overlay-loader {
|
7040
|
+
z-index: var(--z-index-overlay-loader);
|
7041
|
+
}
|
7042
|
+
|
7039
7043
|
.z-tooltip {
|
7040
7044
|
z-index: var(--z-index-tooltip);
|
7041
7045
|
}
|
@@ -7136,6 +7140,10 @@ video {
|
|
7136
7140
|
z-index: var(--z-index-overlay);
|
7137
7141
|
}
|
7138
7142
|
|
7143
|
+
.hover\:z-overlay-loader:hover {
|
7144
|
+
z-index: var(--z-index-overlay-loader);
|
7145
|
+
}
|
7146
|
+
|
7139
7147
|
.hover\:z-tooltip:hover {
|
7140
7148
|
z-index: var(--z-index-tooltip);
|
7141
7149
|
}
|
@@ -7236,6 +7244,10 @@ video {
|
|
7236
7244
|
z-index: var(--z-index-overlay);
|
7237
7245
|
}
|
7238
7246
|
|
7247
|
+
.active\:z-overlay-loader:active {
|
7248
|
+
z-index: var(--z-index-overlay-loader);
|
7249
|
+
}
|
7250
|
+
|
7239
7251
|
.active\:z-tooltip:active {
|
7240
7252
|
z-index: var(--z-index-tooltip);
|
7241
7253
|
}
|
@@ -7336,6 +7348,10 @@ video {
|
|
7336
7348
|
z-index: var(--z-index-overlay);
|
7337
7349
|
}
|
7338
7350
|
|
7351
|
+
.group:hover .group-hover\:z-overlay-loader {
|
7352
|
+
z-index: var(--z-index-overlay-loader);
|
7353
|
+
}
|
7354
|
+
|
7339
7355
|
.group:hover .group-hover\:z-tooltip {
|
7340
7356
|
z-index: var(--z-index-tooltip);
|
7341
7357
|
}
|