@sfgov/design-system 0.0.0-0969b8a
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/LICENSE +21 -0
- package/README.md +7 -0
- package/css/base.css +2 -0
- package/css/base.css.map +1 -0
- package/css/components.css +2 -0
- package/css/components.css.map +1 -0
- package/css/fonts.css +2 -0
- package/css/fonts.css.map +1 -0
- package/css/icons.css +2 -0
- package/css/icons.css.map +1 -0
- package/css/overrides.css +2 -0
- package/css/overrides.css.map +1 -0
- package/css/sfds.css +2 -0
- package/css/sfds.css.map +1 -0
- package/css/src/base.css +26 -0
- package/css/src/components/button.css +61 -0
- package/css/src/components/details.css +10 -0
- package/css/src/components/grid.css +12 -0
- package/css/src/components/index.css +4 -0
- package/css/src/components/kbd.css +5 -0
- package/css/src/components.css +1 -0
- package/css/src/fonts.css +1 -0
- package/css/src/icons.css +7 -0
- package/css/src/overrides.css +3 -0
- package/css/src/sfds.css +6 -0
- package/css/src/theme.js +104 -0
- package/css/src/tokens/breakpoints.js +5 -0
- package/css/src/tokens/colors.js +116 -0
- package/css/src/tokens/index.js +8 -0
- package/css/src/tokens/spacing.js +27 -0
- package/css/src/tokens/typography.js +66 -0
- package/css/src/tokens/widths.js +11 -0
- package/css/src/typography.css +103 -0
- package/css/src/utilities.css +1 -0
- package/css/typography.css +2 -0
- package/css/typography.css.map +1 -0
- package/css/utilities.css +2 -0
- package/css/utilities.css.map +1 -0
- package/css/utilities.json +7350 -0
- package/elements/index.d.mts +30 -0
- package/elements/index.d.mts.map +1 -0
- package/elements/index.d.ts +30 -0
- package/elements/index.d.ts.map +1 -0
- package/elements/index.js +1 -0
- package/elements/index.mjs +1 -0
- package/elements/src/index.js +7 -0
- package/elements/src/sfgov-icon.js +109 -0
- package/icons/index.json +439 -0
- package/icons/svg/accessibility.svg +4 -0
- package/icons/svg/alert.svg +5 -0
- package/icons/svg/archive.svg +4 -0
- package/icons/svg/arrow-down.svg +3 -0
- package/icons/svg/arrow-left.svg +3 -0
- package/icons/svg/arrow-right.svg +3 -0
- package/icons/svg/arrow-up.svg +3 -0
- package/icons/svg/building.svg +7 -0
- package/icons/svg/calendar.svg +3 -0
- package/icons/svg/caution.svg +3 -0
- package/icons/svg/chart.svg +6 -0
- package/icons/svg/check.svg +3 -0
- package/icons/svg/chevron-down.svg +3 -0
- package/icons/svg/chevron-left.svg +3 -0
- package/icons/svg/chevron-right.svg +3 -0
- package/icons/svg/chevron-up.svg +3 -0
- package/icons/svg/clock.svg +4 -0
- package/icons/svg/close.svg +3 -0
- package/icons/svg/document.svg +3 -0
- package/icons/svg/globe.svg +3 -0
- package/icons/svg/hamburger-button.svg +5 -0
- package/icons/svg/index.json +346 -0
- package/icons/svg/info.svg +5 -0
- package/icons/svg/location.svg +4 -0
- package/icons/svg/mail.svg +3 -0
- package/icons/svg/minus.svg +3 -0
- package/icons/svg/pencil.svg +3 -0
- package/icons/svg/phone.svg +3 -0
- package/icons/svg/plus.svg +3 -0
- package/icons/svg/question.svg +4 -0
- package/icons/svg/search.svg +3 -0
- package/icons/svg/wip.svg +3 -0
- package/lib/markdownlint/frontmatter.js +51 -0
- package/lib/markdownlint/no-empty.js +19 -0
- package/lib/tailwind/details.js +14 -0
- package/package.json +359 -0
- package/react/README.md +36 -0
- package/react/index.d.mts +5725 -0
- package/react/index.d.mts.map +1 -0
- package/react/index.d.ts +5725 -0
- package/react/index.d.ts.map +1 -0
- package/react/index.js +1 -0
- package/react/index.mjs +1 -0
- package/react/src/components/Box.tsx +6 -0
- package/react/src/components/Button.tsx +94 -0
- package/react/src/components/Container.tsx +19 -0
- package/react/src/components/Flex.tsx +16 -0
- package/react/src/components/GlobalStyle.tsx +35 -0
- package/react/src/components/GoogleFonts.tsx +67 -0
- package/react/src/components/Grid.tsx +15 -0
- package/react/src/components/SSRStyle.tsx +47 -0
- package/react/src/components/SVGIcon.tsx +42 -0
- package/react/src/components/Text.tsx +78 -0
- package/react/src/components/Tile.tsx +93 -0
- package/react/src/components/index.ts +11 -0
- package/react/src/components/page/AboutSection.tsx +90 -0
- package/react/src/components/page/AgencyHeader.tsx +56 -0
- package/react/src/components/page/ArchiveInformation.tsx +43 -0
- package/react/src/components/page/ContactSection.tsx +92 -0
- package/react/src/components/page/Section.tsx +53 -0
- package/react/src/components/page/Spotlight.tsx +70 -0
- package/react/src/components/page/index.ts +6 -0
- package/react/src/constants.ts +48 -0
- package/react/src/icons/IconAccessibility.jsx +3 -0
- package/react/src/icons/IconAlert.jsx +3 -0
- package/react/src/icons/IconArchive.jsx +3 -0
- package/react/src/icons/IconArrowDown.jsx +3 -0
- package/react/src/icons/IconArrowLeft.jsx +3 -0
- package/react/src/icons/IconArrowRight.jsx +3 -0
- package/react/src/icons/IconArrowUp.jsx +3 -0
- package/react/src/icons/IconBuilding.jsx +3 -0
- package/react/src/icons/IconCalendar.jsx +3 -0
- package/react/src/icons/IconCaution.jsx +3 -0
- package/react/src/icons/IconChart.jsx +3 -0
- package/react/src/icons/IconCheck.jsx +3 -0
- package/react/src/icons/IconChevronDown.jsx +3 -0
- package/react/src/icons/IconChevronLeft.jsx +3 -0
- package/react/src/icons/IconChevronRight.jsx +3 -0
- package/react/src/icons/IconChevronUp.jsx +3 -0
- package/react/src/icons/IconClock.jsx +3 -0
- package/react/src/icons/IconClose.jsx +3 -0
- package/react/src/icons/IconDocument.jsx +3 -0
- package/react/src/icons/IconGlobe.jsx +3 -0
- package/react/src/icons/IconHamburgerButton.jsx +3 -0
- package/react/src/icons/IconInfo.jsx +3 -0
- package/react/src/icons/IconLocation.jsx +3 -0
- package/react/src/icons/IconMail.jsx +3 -0
- package/react/src/icons/IconMinus.jsx +3 -0
- package/react/src/icons/IconPencil.jsx +3 -0
- package/react/src/icons/IconPhone.jsx +3 -0
- package/react/src/icons/IconPlus.jsx +3 -0
- package/react/src/icons/IconQuestion.jsx +3 -0
- package/react/src/icons/IconSearch.jsx +3 -0
- package/react/src/icons/IconWIP.jsx +3 -0
- package/react/src/icons/index.js +31 -0
- package/react/src/icons/index.json +346 -0
- package/react/src/icons.tsx +34 -0
- package/react/src/index.ts +4 -0
- package/react/src/stitches.config.ts +85 -0
- package/react/src/theme/breakpoints.ts +14 -0
- package/react/src/theme/colors.ts +34 -0
- package/react/src/theme/index.tsx +31 -0
- package/react/src/theme/space.ts +16 -0
- package/react/src/theme/typography.ts +136 -0
- package/react/src/types.ts +31 -0
- package/react/src/utils.tsx +25 -0
- package/svgo.config.js +27 -0
- package/tailwind.config.js +5 -0
- package/tailwind.preset.js +128 -0
package/package.json
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sfgov/design-system",
|
|
3
|
+
"version": "0.0.0-0969b8a",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": "16.x",
|
|
6
|
+
"npm": "8.x"
|
|
7
|
+
},
|
|
8
|
+
"config": {
|
|
9
|
+
"website_port": 3002,
|
|
10
|
+
"storybook_port": 3001
|
|
11
|
+
},
|
|
12
|
+
"repository": "SFDigitalServices/design-system",
|
|
13
|
+
"files": [
|
|
14
|
+
"css",
|
|
15
|
+
"elements",
|
|
16
|
+
"icons",
|
|
17
|
+
"react",
|
|
18
|
+
"dist",
|
|
19
|
+
"lib",
|
|
20
|
+
"tailwind.*",
|
|
21
|
+
"svgo.config.*",
|
|
22
|
+
"!website/**",
|
|
23
|
+
"!storybook/**",
|
|
24
|
+
"!**/.eslint*"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "wireit",
|
|
28
|
+
"build:ci": "wireit",
|
|
29
|
+
"build:css": "wireit",
|
|
30
|
+
"build:css-manifest": "wireit",
|
|
31
|
+
"build:docs": "wireit",
|
|
32
|
+
"build:favicon": "mkdir -p public && curl -O https://sf.gov/favicon.ico --output-dir public",
|
|
33
|
+
"build:js": "wireit",
|
|
34
|
+
"build:manifest": "wireit",
|
|
35
|
+
"build:storybook": "wireit",
|
|
36
|
+
"build:urls": "wireit",
|
|
37
|
+
"build:website": "wireit",
|
|
38
|
+
"build:website-index": "wireit",
|
|
39
|
+
"figma-export": "env-cmd -f .env figma-export use-config",
|
|
40
|
+
"lint": "wireit",
|
|
41
|
+
"lint:css": "stylelint '**/src/*.css'",
|
|
42
|
+
"lint:js": "eslint --ext js,jsx,mjs,ts,tsx css elements icons react lib '*.{js,mjs}'",
|
|
43
|
+
"lint:docs": "markdownlint --rules './lib/markdownlint/*.js' --ignore '**/node_modules/**' '**/*.md'",
|
|
44
|
+
"lint:scripts": "shellcheck scripts/*.sh",
|
|
45
|
+
"lint:storybook": "eslint --ext js,jsx,ts,tsx stories .storybook",
|
|
46
|
+
"lint:website": "npx eslint --ext js,jsx,ts,tsx website",
|
|
47
|
+
"postbuild:website": "scripts/check-website.sh",
|
|
48
|
+
"postbuild:css": "npm run build:css-manifest",
|
|
49
|
+
"postfigma-export": "eslint --fix react/src/icons",
|
|
50
|
+
"prepublishOnly": "scripts/check-prepublish-files.sh",
|
|
51
|
+
"public-dir": "mkdir -p public",
|
|
52
|
+
"serve:docs": "docusaurus serve website --dir public",
|
|
53
|
+
"start": "wireit",
|
|
54
|
+
"start:website": "wireit",
|
|
55
|
+
"start:storybook": "wireit",
|
|
56
|
+
"swizzle": "docusaurus swizzle",
|
|
57
|
+
"watch": "wireit",
|
|
58
|
+
"watch:css": "wireit",
|
|
59
|
+
"watch:js": "wireit",
|
|
60
|
+
"watch:icons": "echo 'watch icons (noop)'"
|
|
61
|
+
},
|
|
62
|
+
"wireit": {
|
|
63
|
+
"build": {
|
|
64
|
+
"dependencies": [
|
|
65
|
+
"build:css",
|
|
66
|
+
"build:js",
|
|
67
|
+
"build:manifest",
|
|
68
|
+
"build:website",
|
|
69
|
+
"build:storybook"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"build:ci": {
|
|
73
|
+
"dependencies": [
|
|
74
|
+
"build:css",
|
|
75
|
+
"build:js",
|
|
76
|
+
"build:manifest"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"build:css": {
|
|
80
|
+
"command": "postcss --verbose -d css 'css/src/*.css'",
|
|
81
|
+
"files": [
|
|
82
|
+
"css/src/**",
|
|
83
|
+
"postcss.config.js",
|
|
84
|
+
"package.json"
|
|
85
|
+
],
|
|
86
|
+
"output": [
|
|
87
|
+
"css/*.css{,.map,.json}"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"build:css-manifest": {
|
|
91
|
+
"command": "node scripts/build-css-manifest.js",
|
|
92
|
+
"output": [
|
|
93
|
+
"css/utilties.json"
|
|
94
|
+
],
|
|
95
|
+
"files": [
|
|
96
|
+
"css/*.css"
|
|
97
|
+
],
|
|
98
|
+
"dependencies": [
|
|
99
|
+
"build:css"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"build:docs": {
|
|
103
|
+
"command": "docusaurus build website --out-dir $(pwd)/public",
|
|
104
|
+
"dependencies": [
|
|
105
|
+
"build:css",
|
|
106
|
+
"build:js",
|
|
107
|
+
"build:manifest"
|
|
108
|
+
],
|
|
109
|
+
"files": [
|
|
110
|
+
"website/**"
|
|
111
|
+
],
|
|
112
|
+
"output": [
|
|
113
|
+
"public",
|
|
114
|
+
"!public/{index,urls}.txt",
|
|
115
|
+
"!public/storybook"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"build:js": {
|
|
119
|
+
"command": "rollup -c",
|
|
120
|
+
"files": [
|
|
121
|
+
"{elements,react}/src/**",
|
|
122
|
+
"*.config.*",
|
|
123
|
+
"package.json"
|
|
124
|
+
],
|
|
125
|
+
"output": [
|
|
126
|
+
"{elements,react}/*.{js,mjs,ts}{,.map}"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"build:website-index": {
|
|
130
|
+
"command": "find public -type f | grep -v '^storybook/' | perl -pe 's#^public/#/#' | sort > public/index.txt",
|
|
131
|
+
"dependencies": [
|
|
132
|
+
"build:docs"
|
|
133
|
+
],
|
|
134
|
+
"clean": true,
|
|
135
|
+
"files": [
|
|
136
|
+
"public/**",
|
|
137
|
+
"!public/storybook"
|
|
138
|
+
],
|
|
139
|
+
"output": [
|
|
140
|
+
"public/index.txt"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
"build:manifest": {
|
|
144
|
+
"command": "scripts/manifest.mjs 'css/*.css' '{elements,react}/*.{js,mjs}' 'icons/svg/*.svg'",
|
|
145
|
+
"dependencies": [
|
|
146
|
+
"build:css",
|
|
147
|
+
"build:js",
|
|
148
|
+
"build:css-manifest"
|
|
149
|
+
],
|
|
150
|
+
"output": [
|
|
151
|
+
"manifest.json"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"build:storybook": {
|
|
155
|
+
"command": "build-storybook -o public/storybook",
|
|
156
|
+
"clean": true,
|
|
157
|
+
"files": [
|
|
158
|
+
"public/storybook"
|
|
159
|
+
],
|
|
160
|
+
"dependencies": [
|
|
161
|
+
"public-dir",
|
|
162
|
+
"build:css",
|
|
163
|
+
"build:js"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
"build:urls": {
|
|
167
|
+
"command": "scripts/build-urls.sh",
|
|
168
|
+
"files": [
|
|
169
|
+
"public/index.txt"
|
|
170
|
+
],
|
|
171
|
+
"output": [
|
|
172
|
+
"public/urls.txt"
|
|
173
|
+
],
|
|
174
|
+
"dependencies": [
|
|
175
|
+
"build:website-index"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"build:website": {
|
|
179
|
+
"dependencies": [
|
|
180
|
+
"build:docs",
|
|
181
|
+
"build:storybook",
|
|
182
|
+
"build:urls",
|
|
183
|
+
"build:favicon"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
"lint": {
|
|
187
|
+
"dependencies": [
|
|
188
|
+
"lint:css",
|
|
189
|
+
"lint:js",
|
|
190
|
+
"lint:docs",
|
|
191
|
+
"lint:scripts",
|
|
192
|
+
"lint:website",
|
|
193
|
+
"lint:storybook"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"start": {
|
|
197
|
+
"dependencies": [
|
|
198
|
+
"watch",
|
|
199
|
+
"start:website",
|
|
200
|
+
"start:storybook"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
"start:website": {
|
|
204
|
+
"command": "docusaurus start website --port=3002",
|
|
205
|
+
"service": true,
|
|
206
|
+
"files": [
|
|
207
|
+
"website/*.js",
|
|
208
|
+
"package.json"
|
|
209
|
+
],
|
|
210
|
+
"dependencies": [
|
|
211
|
+
"build:css",
|
|
212
|
+
"build:js",
|
|
213
|
+
"build:manifest"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"start:storybook": {
|
|
217
|
+
"command": "start-storybook --port=3001",
|
|
218
|
+
"service": true,
|
|
219
|
+
"files": [
|
|
220
|
+
".storybook/*",
|
|
221
|
+
"package.json"
|
|
222
|
+
],
|
|
223
|
+
"dependencies": [
|
|
224
|
+
"build:css",
|
|
225
|
+
"build:js"
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"watch": {
|
|
229
|
+
"dependencies": [
|
|
230
|
+
"watch:css",
|
|
231
|
+
"watch:icons",
|
|
232
|
+
"watch:js"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"watch:css": {
|
|
236
|
+
"command": "npm run build:css -- --watch",
|
|
237
|
+
"service": true,
|
|
238
|
+
"files": [
|
|
239
|
+
"postcss.config.js"
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
"watch:js": {
|
|
243
|
+
"command": "rollup -c --watch",
|
|
244
|
+
"service": true,
|
|
245
|
+
"files": [
|
|
246
|
+
"rollup.config.*"
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"peerDependencies": {
|
|
251
|
+
"react": "^18.2.0",
|
|
252
|
+
"react-dom": "^18.2.0",
|
|
253
|
+
"tailwindcss": "^2.2.19"
|
|
254
|
+
},
|
|
255
|
+
"peerDependenciesMeta": {
|
|
256
|
+
"react": {
|
|
257
|
+
"optional": true
|
|
258
|
+
},
|
|
259
|
+
"react-dom": {
|
|
260
|
+
"optional": true
|
|
261
|
+
},
|
|
262
|
+
"tailwindcss": {
|
|
263
|
+
"optional": true
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"devDependencies": {
|
|
267
|
+
"@babel/cli": "^7.20.7",
|
|
268
|
+
"@babel/core": "^7.20.12",
|
|
269
|
+
"@babel/preset-env": "^7.20.2",
|
|
270
|
+
"@babel/preset-react": "^7.18.6",
|
|
271
|
+
"@babel/preset-typescript": "^7.18.6",
|
|
272
|
+
"@docusaurus/core": "^2.2.0",
|
|
273
|
+
"@docusaurus/eslint-plugin": "^2.2.0",
|
|
274
|
+
"@docusaurus/module-type-aliases": "^2.2.0",
|
|
275
|
+
"@docusaurus/plugin-client-redirects": "^2.2.0",
|
|
276
|
+
"@docusaurus/preset-classic": "^2.2.0",
|
|
277
|
+
"@docusaurus/theme-live-codeblock": "^2.2.0",
|
|
278
|
+
"@figma-export/cli": "^4.5.0",
|
|
279
|
+
"@figma-export/output-components-as-svg": "^4.5.0",
|
|
280
|
+
"@figma-export/output-components-as-svgr": "^4.5.0",
|
|
281
|
+
"@figma-export/transform-svg-with-svgo": "^4.5.0",
|
|
282
|
+
"@figma-export/types": "^4.5.0",
|
|
283
|
+
"@mdx-js/react": "^1.6.22",
|
|
284
|
+
"@rollup/plugin-babel": "^6.0.3",
|
|
285
|
+
"@rollup/plugin-commonjs": "^24.0.0",
|
|
286
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
287
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
288
|
+
"@stitches/react": "^1.2.8",
|
|
289
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
290
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
291
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
292
|
+
"@storybook/addon-links": "^6.5.15",
|
|
293
|
+
"@storybook/addon-storysource": "^6.5.15",
|
|
294
|
+
"@storybook/builder-webpack5": "^6.5.15",
|
|
295
|
+
"@storybook/manager-webpack5": "^6.5.15",
|
|
296
|
+
"@storybook/react": "^6.5.15",
|
|
297
|
+
"@storybook/testing-library": "^0.0.13",
|
|
298
|
+
"@tsconfig/docusaurus": "^1.0.6",
|
|
299
|
+
"@types/eslint": "^8.4.2",
|
|
300
|
+
"@types/node": "^16.18.6",
|
|
301
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
302
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
303
|
+
"autoprefixer": "^10.4.7",
|
|
304
|
+
"babel-loader": "^8.2.5",
|
|
305
|
+
"clsx": "^1.1.0",
|
|
306
|
+
"core-js": "^3.27.1",
|
|
307
|
+
"cssnano": "^5.1.14",
|
|
308
|
+
"dedent": "^0.7.0",
|
|
309
|
+
"dotenv": "^16.0.3",
|
|
310
|
+
"env-cmd": "^10.1.0",
|
|
311
|
+
"eslint": "^8.24.0",
|
|
312
|
+
"eslint-plugin-html": "^6.2.0",
|
|
313
|
+
"eslint-plugin-import": "^2.26.0",
|
|
314
|
+
"eslint-plugin-n": "^15.5.1",
|
|
315
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
316
|
+
"eslint-plugin-react": "^7.30.0",
|
|
317
|
+
"eslint-plugin-sfgov": "^2.0.0",
|
|
318
|
+
"eslint-plugin-storybook": "^0.6.4",
|
|
319
|
+
"eslint-plugin-unicorn": "^42.0.0",
|
|
320
|
+
"filesize": "^8.0.7",
|
|
321
|
+
"fs-extra": "^11.1.0",
|
|
322
|
+
"globby": "^13.1.3",
|
|
323
|
+
"js-yaml": "^4.1.0",
|
|
324
|
+
"lodash.startcase": "^4.4.0",
|
|
325
|
+
"markdownlint-cli": "^0.31.1",
|
|
326
|
+
"postcss": "^8.4.14",
|
|
327
|
+
"postcss-cli": "^10.1.0",
|
|
328
|
+
"postcss-import": "^15.1.0",
|
|
329
|
+
"postcss-nested": "^6.0.0",
|
|
330
|
+
"prettysize": "^2.0.0",
|
|
331
|
+
"prism-react-renderer": "^1.3.1",
|
|
332
|
+
"prop-types": "^15.8.1",
|
|
333
|
+
"raw-loader": "^4.0.2",
|
|
334
|
+
"react": "^18.2.0",
|
|
335
|
+
"react-copy-to-clipboard": "^5.1.0",
|
|
336
|
+
"react-dom": "^18.2.0",
|
|
337
|
+
"react-masonry-css": "^1.0.16",
|
|
338
|
+
"react-shadow": "^19.0.3",
|
|
339
|
+
"rollup": "^3.9.1",
|
|
340
|
+
"rollup-cache": "^1.2.0",
|
|
341
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
342
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
343
|
+
"rollup-plugin-ts": "^3.1.1",
|
|
344
|
+
"shellcheck": "^1.1.0",
|
|
345
|
+
"storybook-addon-designs": "^6.3.1",
|
|
346
|
+
"storybook-source-link": "^2.0.4",
|
|
347
|
+
"stylelint": "^14.8.4",
|
|
348
|
+
"stylelint-config-standard": "^25.0.0",
|
|
349
|
+
"stylelint-config-tailwindcss": "^0.0.7",
|
|
350
|
+
"stylelint-expiring-todo-comments": "^0.0.1",
|
|
351
|
+
"svgo": "^3.0.2",
|
|
352
|
+
"tailwind-styled-components": "^2.2.0",
|
|
353
|
+
"tailwindcss": "^2.2.19",
|
|
354
|
+
"tailwindcss-interaction-variants": "^5.0.0",
|
|
355
|
+
"typescript": "^4.9.3",
|
|
356
|
+
"use-bus": "^2.5.1",
|
|
357
|
+
"wireit": "^0.9.3"
|
|
358
|
+
}
|
|
359
|
+
}
|
package/react/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: React
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## @sfgov/design-system/react
|
|
6
|
+
|
|
7
|
+
This package provides the [SF.gov Design System's][website] React components.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
You can install the package via [npm] or a similar package manager. In addition
|
|
12
|
+
to the `@sfgov/design-system/react` package, you'll also need to install its
|
|
13
|
+
[peer dependencies]. (See the `peerDependencies` field in
|
|
14
|
+
[package.json](./package.json) for version requirements.)
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install @sfgov/design-system react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Our styling library, [Stitches], exposes the `css` prop on our React components.
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
import { ThemeProvider } from '@sfgov/design-system/react'
|
|
26
|
+
|
|
27
|
+
const MyPage = () =>
|
|
28
|
+
<TitleXl css={{ color: 'red' }}>
|
|
29
|
+
A red title
|
|
30
|
+
</TitleXl>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[npm]: https://npmjs.com
|
|
34
|
+
[peer dependencies]: https://nodejs.org/es/blog/npm/peer-dependencies/
|
|
35
|
+
[Stitches]: https://stitches.dev/
|
|
36
|
+
[website]: https://design-system.sf.gov
|