@canopytax/styleguide 0.0.46 → 1.1.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/README.md +9 -22
- package/package.json +128 -87
- package/.babelrc +0 -14
- package/.eslintrc +0 -4
- package/.fontcustom-manifest.json +0 -750
- package/fontcustom.yml +0 -96
- package/jest.json +0 -28
- package/module/module.js +0 -16718
- package/postcss.config.js +0 -5
- package/webpack.config.goat.js +0 -140
- package/webpack.config.js +0 -138
- package/webpack.config.module.js +0 -104
- package/yarn-error.log +0 -14384
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ The primary components of the design system are
|
|
|
12
12
|
## Contributing
|
|
13
13
|
See [Canopy's live storybook](https://storybook.canopytax.com/)
|
|
14
14
|
|
|
15
|
-
Creating a new story is easy and can be done in any directory. Simply create a file with the extension `*.
|
|
15
|
+
Creating a new story is easy and can be done in any directory. Simply create a file with the extension `*.story.(ts|js)`.
|
|
16
16
|
|
|
17
17
|
If I am looking to create a story that will illustrate a new button, I might add a new file for it like so:
|
|
18
18
|
|
|
@@ -21,38 +21,25 @@ If I am looking to create a story that will illustrate a new button, I might add
|
|
|
21
21
|
│ ├── button.component.js
|
|
22
22
|
│ ├── button.stories.js
|
|
23
23
|
```
|
|
24
|
-
|
|
24
|
+
Stories are defined as ES modules. A default export marks the title and named exports introduce the story functions.
|
|
25
25
|
|
|
26
26
|
```js
|
|
27
|
-
import React from
|
|
28
|
-
import {
|
|
27
|
+
import React from "react";
|
|
28
|
+
import { CpButton } from "@components";
|
|
29
29
|
|
|
30
30
|
export default {
|
|
31
|
-
title:
|
|
32
|
-
|
|
33
|
-
component: CprButton,
|
|
31
|
+
title: "Button",
|
|
32
|
+
component: CpButton,
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
export const withEmojis = () => <
|
|
37
|
-
export const withText = () => <
|
|
35
|
+
export const withEmojis = () => <CpButton btnType="unstyled">😀 😎 👍 💯</CpButton>
|
|
36
|
+
export const withText = () => <CpButton btnType="unstyled">click me</CpButton>
|
|
38
37
|
```
|
|
39
38
|
|
|
40
39
|
This will give us
|
|
41
40
|
|
|
42
41
|
<img src='./img/Button.png' alt='storybook button example'>
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
# GOAT (deprecated)
|
|
45
44
|
|
|
46
|
-
### [storysource](https://github.com/storybookjs/storybook/tree/next/addons/storysource): show stories source in the addon panel
|
|
47
|
-
|
|
48
|
-
### [knobs](https://github.com/storybookjs/storybook/tree/master/addons/knobs): edit props dynamically using the Storybook UI
|
|
49
|
-
|
|
50
|
-
See [CprEmptyState](http://localhost:6006/?path=/story/cpremptystate--empty-state-knobs) for an example
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
See [CSF](https://storybook.js.org/docs/formats/component-story-format/) docs and stories in this project for more
|
|
54
|
-
|
|
55
|
-
[A useful recent (Jan 2020) blog post about storybook config](https://medium.com/storybookjs/declarative-storybook-configuration-49912f77b78)
|
|
56
|
-
|
|
57
|
-
# GOAT (deprecating)
|
|
58
45
|
[G.O.A.T website](https://goat.canopytax.com)
|
package/package.json
CHANGED
|
@@ -1,118 +1,159 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopytax/styleguide",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"main": "module/module.js",
|
|
5
|
-
"
|
|
5
|
+
"types": "module/module.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"module/"
|
|
8
|
+
],
|
|
9
|
+
"description": "Component library for Canopy",
|
|
6
10
|
"scripts": {
|
|
7
11
|
"clean": "rimraf sofe build",
|
|
8
|
-
"watch-tests": "jest --watch --config jest.
|
|
9
|
-
"test": "jest --coverage --config jest.
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"build": "
|
|
15
|
-
"storybook": "
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"build
|
|
12
|
+
"watch-tests": "jest --watch --config jest.config.js",
|
|
13
|
+
"test": "jest --coverage --config jest.config.js",
|
|
14
|
+
"eslint": "eslint src",
|
|
15
|
+
"lint": "yarn eslint && yarn type-check",
|
|
16
|
+
"start": "yarn prep && webpack serve --config webpack.config.js --port",
|
|
17
|
+
"build": "yarn prep && webpack --config webpack.config.js --env mode=production",
|
|
18
|
+
"build-storybook": "yarn prep && storybook build -o storybook-build",
|
|
19
|
+
"storybook": "yarn prep && storybook dev -p 6006",
|
|
20
|
+
"npm-publish": "npm publish --registry https://registry.npmjs.org --ignore-scripts",
|
|
21
|
+
"build:type-declarations": "tsc -p tsconfig.module.json",
|
|
22
|
+
"build:module": "rimraf ./module && yarn prep && webpack --config webpack.config.module.js && yarn build:type-declarations",
|
|
23
|
+
"prep": "node icons-build-types.js",
|
|
24
|
+
"type-check": "tsc --noEmit",
|
|
25
|
+
"type-check-watch": "tsc --noEmit --watch",
|
|
26
|
+
"postinstall": "husky && fe-ai",
|
|
27
|
+
"prepack": "pinst --disable",
|
|
28
|
+
"postpack": "pinst --enable"
|
|
19
29
|
},
|
|
20
30
|
"browserslist": [
|
|
21
31
|
"extends browserslist-config-canopy"
|
|
22
32
|
],
|
|
23
33
|
"devDependencies": {
|
|
24
|
-
"@babel/
|
|
25
|
-
"@babel/
|
|
26
|
-
"@babel/plugin-
|
|
27
|
-
"@babel/
|
|
28
|
-
"@babel/
|
|
29
|
-
"@babel/preset-
|
|
30
|
-
"@babel/
|
|
31
|
-
"@
|
|
34
|
+
"@babel/cli": "^7.23.9",
|
|
35
|
+
"@babel/core": "^7.24.0",
|
|
36
|
+
"@babel/plugin-transform-runtime": "^7.24.0",
|
|
37
|
+
"@babel/preset-env": "^7.24.0",
|
|
38
|
+
"@babel/preset-react": "^7.23.3",
|
|
39
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
40
|
+
"@babel/runtime": "^7.24.0",
|
|
41
|
+
"@canopytax/fe-ai-config": "^1.1.0",
|
|
32
42
|
"@icoset/icoset": "^0.4.12",
|
|
33
43
|
"@icoset/icoset-webpack-plugin": "^0.0.13",
|
|
34
|
-
"@
|
|
35
|
-
"@storybook/addon-
|
|
36
|
-
"@storybook/addon-
|
|
37
|
-
"@storybook/addon-links": "^
|
|
38
|
-
"@storybook/addon-
|
|
39
|
-
"@storybook/
|
|
40
|
-
"@storybook/
|
|
41
|
-
"@storybook/
|
|
42
|
-
"@storybook/
|
|
43
|
-
"@
|
|
44
|
-
"@testing-library/
|
|
45
|
-
"@testing-library/
|
|
46
|
-
"@
|
|
44
|
+
"@mdx-js/react": "^3.0.1",
|
|
45
|
+
"@storybook/addon-a11y": "^9.0.18",
|
|
46
|
+
"@storybook/addon-docs": "^9.0.18",
|
|
47
|
+
"@storybook/addon-links": "^9.0.18",
|
|
48
|
+
"@storybook/addon-styling": "^1.3.7",
|
|
49
|
+
"@storybook/addon-styling-webpack": "^2.0.0",
|
|
50
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
51
|
+
"@storybook/cli": "^9.0.18",
|
|
52
|
+
"@storybook/preset-scss": "1.0.3",
|
|
53
|
+
"@storybook/react-webpack5": "^9.0.18",
|
|
54
|
+
"@testing-library/dom": "^10.3.0",
|
|
55
|
+
"@testing-library/jest-dom": "^6.4.6",
|
|
56
|
+
"@testing-library/react": "^16.0.0",
|
|
57
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
58
|
+
"@testing-library/user-event": "^14.5.2",
|
|
59
|
+
"@types/eslint-plugin-jsx-a11y": "^6",
|
|
60
|
+
"@types/jest": "^29.1.2",
|
|
61
|
+
"@types/lodash": "^4.17.13",
|
|
62
|
+
"@types/luxon": "^3.4.2",
|
|
63
|
+
"@types/react": "^18",
|
|
64
|
+
"@types/react-dom": "^18",
|
|
65
|
+
"@types/react-router": "^5.1.20",
|
|
66
|
+
"@types/uuid": "^9.0.7",
|
|
67
|
+
"@types/validator": "^13.12.3",
|
|
47
68
|
"autoprefixer": "^9.8.6",
|
|
48
|
-
"babel-
|
|
49
|
-
"babel-
|
|
50
|
-
"babel-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"canopy-sofe-extensions": "^3.0.2",
|
|
55
|
-
"canopy-webpack-config": "^3.1.0",
|
|
69
|
+
"babel-jest": "^29.7.0",
|
|
70
|
+
"babel-loader": "^9.1.3",
|
|
71
|
+
"babel-plugin-react-docgen": "^4.2.1",
|
|
72
|
+
"browserslist-config-canopy": "^4.0.0",
|
|
73
|
+
"caniuse-lite": "^1.0.30001202",
|
|
74
|
+
"canopy-webpack-config": "^4.3.0",
|
|
56
75
|
"css-loader": "^4.2.1",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"eslint-config-canopy": "^2.3.0",
|
|
63
|
-
"html-loader": "^1.1.0",
|
|
64
|
-
"html-webpack-plugin": "^4.3.0",
|
|
65
|
-
"husky": "^4.2.5",
|
|
76
|
+
"eslint": "^9.25.1",
|
|
77
|
+
"eslint-config-canopy": "^5.0.1",
|
|
78
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
79
|
+
"eslint-plugin-storybook": "9.0.18",
|
|
80
|
+
"husky": "^9.1.7",
|
|
66
81
|
"identity-obj-proxy": "^3.0.0",
|
|
67
|
-
"jest": "^
|
|
68
|
-
"jest-cli": "^
|
|
69
|
-
"
|
|
70
|
-
"
|
|
82
|
+
"jest": "^29.5.0",
|
|
83
|
+
"jest-cli": "^29.2.0",
|
|
84
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
85
|
+
"jest-jasmine2": "^29.2.0",
|
|
86
|
+
"kremling-babel-plugin": "^2.0.0",
|
|
87
|
+
"kremling-loader": "^3.0.2",
|
|
71
88
|
"less": "^3.12.2",
|
|
72
|
-
"less-loader": "^
|
|
89
|
+
"less-loader": "^11.1.3",
|
|
90
|
+
"lint-staged": "^15.5.1",
|
|
73
91
|
"mini-css-extract-plugin": "^0.10.0",
|
|
74
|
-
"
|
|
75
|
-
"postcss
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"react
|
|
80
|
-
"react-
|
|
81
|
-
"react-
|
|
82
|
-
"
|
|
83
|
-
"
|
|
92
|
+
"pinst": "^3.0.0",
|
|
93
|
+
"postcss": "^8.4.27",
|
|
94
|
+
"postcss-loader": "^7.3.3",
|
|
95
|
+
"postcss-prefixer": "^3.0.0",
|
|
96
|
+
"prettier": "^3.5.3",
|
|
97
|
+
"react": "18.3.1",
|
|
98
|
+
"react-dom": "18.3.1",
|
|
99
|
+
"react-element-to-jsx-string": "^15.0.0",
|
|
100
|
+
"react-highlight": "^0.15.0",
|
|
101
|
+
"react-router-dom": "^6.30.2",
|
|
84
102
|
"rimraf": "^3.0.2",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
103
|
+
"sass": "^1.81.0",
|
|
104
|
+
"sass-loader": "^16.0.3",
|
|
105
|
+
"semantic-release": "^24.2.3",
|
|
106
|
+
"storybook": "^9.1.17",
|
|
107
|
+
"storybook-dark-mode": "^4.0.1",
|
|
108
|
+
"style-loader": "^3.3.3",
|
|
109
|
+
"tailwindcss": "^3.4.3",
|
|
110
|
+
"tailwindcss-base-font-size": "^1.0.1",
|
|
111
|
+
"ts-loader": "^9.5.0",
|
|
112
|
+
"typescript": "^5.8.3",
|
|
113
|
+
"url-loader": "^4.1.1",
|
|
114
|
+
"webpack": "^5.88.2",
|
|
115
|
+
"webpack-bundle-analyzer": "^4.9.0",
|
|
116
|
+
"webpack-cli": "^5.1.4",
|
|
117
|
+
"webpack-dev-server": "^4.15.1"
|
|
91
118
|
},
|
|
92
119
|
"dependencies": {
|
|
93
|
-
"@
|
|
120
|
+
"@floating-ui/react": "^0.27.5",
|
|
121
|
+
"@hookform/resolvers": "^5.2.2",
|
|
122
|
+
"@tanstack/react-virtual": "^3.0.1",
|
|
123
|
+
"@tippyjs/react": "^4.2.4",
|
|
124
|
+
"@vvo/tzdb": "^6.71.1",
|
|
94
125
|
"@webcomponents/custom-elements": "^1.4.2",
|
|
95
|
-
"auto-trace": "^3.2
|
|
96
|
-
"chroma-js": "^2.1.0",
|
|
126
|
+
"auto-trace": "^3.3.2",
|
|
97
127
|
"color": "^3.1.2",
|
|
98
128
|
"dompurify": "^2.0.12",
|
|
99
|
-
"
|
|
100
|
-
"
|
|
129
|
+
"framer-motion": "^6.5.1",
|
|
130
|
+
"kremling": "^2.2.0",
|
|
131
|
+
"libphonenumber-js": "^1.9.14",
|
|
132
|
+
"lodash": "^4.17.21",
|
|
101
133
|
"luxon": "^1.25.0",
|
|
102
134
|
"moment": "^2.24.0",
|
|
103
135
|
"moment-timezone": "^0.5.27",
|
|
104
136
|
"prop-types": "^15.7.2",
|
|
105
|
-
"react": "
|
|
106
|
-
"react-
|
|
107
|
-
"
|
|
137
|
+
"react-calendar": "^6.0.0",
|
|
138
|
+
"react-hook-form": "^7.31.3",
|
|
139
|
+
"rxjs": "^7.5.5",
|
|
108
140
|
"sanitize-html": "^1.27.3",
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
141
|
+
"single-spa": "^5.5.5",
|
|
142
|
+
"tailwind-merge": "^3.4.0",
|
|
143
|
+
"tailwind-variants": "^1.0.0",
|
|
144
|
+
"uuid": "^8.3.2",
|
|
145
|
+
"validator": "^13.6.0",
|
|
146
|
+
"zod": "^4.1.12",
|
|
147
|
+
"zustand": "^5.0.3"
|
|
148
|
+
},
|
|
149
|
+
"packageManager": "yarn@4.1.0",
|
|
150
|
+
"lint-staged": {
|
|
151
|
+
"*.{js,ts,jsx,tsx,cjs,cts,mjs,mts,css,less,scss,md,mdx}": [
|
|
152
|
+
"prettier --write"
|
|
153
|
+
]
|
|
112
154
|
},
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
}
|
|
155
|
+
"resolutions": {
|
|
156
|
+
"react": "18.3.1",
|
|
157
|
+
"react-dom": "18.3.1"
|
|
117
158
|
}
|
|
118
159
|
}
|
package/.babelrc
DELETED
package/.eslintrc
DELETED