@noctuatech/uswds 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/README.md +66 -0
- package/package.json +25 -3
- package/public/uswds.min.js +2554 -0
package/README.md
CHANGED
|
@@ -4,6 +4,72 @@ An implementaiton of the US Web Design System using web components.
|
|
|
4
4
|
|
|
5
5
|
https://designsystem.digital.gov/
|
|
6
6
|
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<style>
|
|
11
|
+
body:has(:not(:defined)) {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
* {
|
|
16
|
+
font-family:
|
|
17
|
+
Source Sans Pro Web,
|
|
18
|
+
Helvetica Neue,
|
|
19
|
+
Helvetica,
|
|
20
|
+
Roboto,
|
|
21
|
+
Arial,
|
|
22
|
+
sans-serif;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
|
|
26
|
+
<script src="https://cdn.jsdelivr.net/npm/@noctuatech/uswds@latest/uswds.min.js"></script>
|
|
27
|
+
|
|
28
|
+
<usa-config
|
|
29
|
+
spritesheet="https://cdn.jsdelivr.net/npm/@noctuatech/uswds@latest/assets/img/sprite.svg"
|
|
30
|
+
>
|
|
31
|
+
<usa-alert type="info">
|
|
32
|
+
<h3 slot="heading">Informative status</h3>
|
|
33
|
+
|
|
34
|
+
Lorem ipsum dolor sit amet,
|
|
35
|
+
<usa-link href="#">consectetur adipiscing</usa-link> elit, sed do
|
|
36
|
+
eiusmod.
|
|
37
|
+
</usa-alert>
|
|
38
|
+
|
|
39
|
+
<usa-alert type="warning">
|
|
40
|
+
<h3 slot="heading">Warning status</h3>
|
|
41
|
+
|
|
42
|
+
Lorem ipsum dolor sit amet,
|
|
43
|
+
<usa-link href="#">consectetur adipiscing</usa-link> elit, sed do
|
|
44
|
+
eiusmod.
|
|
45
|
+
</usa-alert>
|
|
46
|
+
|
|
47
|
+
<usa-alert type="success">
|
|
48
|
+
<h3 slot="heading">Success status</h3>
|
|
49
|
+
|
|
50
|
+
Lorem ipsum dolor sit amet,
|
|
51
|
+
<usa-link href="#">consectetur adipiscing</usa-link> elit, sed do
|
|
52
|
+
eiusmod.
|
|
53
|
+
</usa-alert>
|
|
54
|
+
|
|
55
|
+
<usa-alert type="error">
|
|
56
|
+
<h3 slot="heading">Error status</h3>
|
|
57
|
+
|
|
58
|
+
Lorem ipsum dolor sit amet,
|
|
59
|
+
<usa-link href="#">consectetur adipiscing</usa-link> elit, sed do
|
|
60
|
+
eiusmod.
|
|
61
|
+
</usa-alert>
|
|
62
|
+
|
|
63
|
+
<usa-alert type="emergency">
|
|
64
|
+
<h3 slot="heading">Emergency status</h3>
|
|
65
|
+
|
|
66
|
+
Lorem ipsum dolor sit amet,
|
|
67
|
+
<usa-link href="#">consectetur adipiscing</usa-link> elit, sed do
|
|
68
|
+
eiusmod.
|
|
69
|
+
</usa-alert>
|
|
70
|
+
</usa-config>
|
|
71
|
+
```
|
|
72
|
+
|
|
7
73
|
## Development
|
|
8
74
|
|
|
9
75
|
### Install
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noctuatech/uswds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"packages/**"
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"src",
|
|
16
|
-
"target"
|
|
16
|
+
"target",
|
|
17
|
+
"public"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"test": "wireit",
|
|
@@ -33,7 +34,8 @@
|
|
|
33
34
|
"build": {
|
|
34
35
|
"dependencies": [
|
|
35
36
|
"tsc",
|
|
36
|
-
"build-storybook"
|
|
37
|
+
"build-storybook",
|
|
38
|
+
"rollup"
|
|
37
39
|
]
|
|
38
40
|
},
|
|
39
41
|
"build-storybook": {
|
|
@@ -53,6 +55,22 @@
|
|
|
53
55
|
"dependencies": [
|
|
54
56
|
"./packages/testing:build"
|
|
55
57
|
]
|
|
58
|
+
},
|
|
59
|
+
"rollup": {
|
|
60
|
+
"command": "rollup -c rollup.config.js",
|
|
61
|
+
"files": [
|
|
62
|
+
"target/**",
|
|
63
|
+
"rollup.config.js"
|
|
64
|
+
],
|
|
65
|
+
"output": [
|
|
66
|
+
"assets/uswds.min.js"
|
|
67
|
+
],
|
|
68
|
+
"dependencies": [
|
|
69
|
+
{
|
|
70
|
+
"script": "tsc",
|
|
71
|
+
"cascade": false
|
|
72
|
+
}
|
|
73
|
+
]
|
|
56
74
|
}
|
|
57
75
|
},
|
|
58
76
|
"author": "",
|
|
@@ -66,6 +84,8 @@
|
|
|
66
84
|
},
|
|
67
85
|
"devDependencies": {
|
|
68
86
|
"@open-wc/testing": "^4.0.0",
|
|
87
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
88
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
69
89
|
"@storybook/addon-essentials": "^8.4.4",
|
|
70
90
|
"@storybook/web-components": "^8.4.4",
|
|
71
91
|
"@storybook/web-components-vite": "^8.4.4",
|
|
@@ -76,9 +96,11 @@
|
|
|
76
96
|
"js-beautify": "^1.15.1",
|
|
77
97
|
"lint-staged": "^15.2.2",
|
|
78
98
|
"lit": "^3.2.1",
|
|
99
|
+
"minify-html-literals": "^1.3.5",
|
|
79
100
|
"mocha": "^11.0.0",
|
|
80
101
|
"plop": "^4.0.1",
|
|
81
102
|
"prettier": "^3.3.3",
|
|
103
|
+
"rollup": "^4.28.0",
|
|
82
104
|
"storybook": "^8.4.4",
|
|
83
105
|
"typescript": "^5.6.3",
|
|
84
106
|
"wireit": "^0.14.9"
|