@haxtheweb/primer-theme 0.0.0-stage → 26.8.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/.dddignore +36 -0
- package/.editorconfig +29 -0
- package/.github/workflows/main.yml +33 -0
- package/.nojekyll +0 -0
- package/.surgeignore +1 -0
- package/.travis.yml +15 -0
- package/LICENSE +201 -0
- package/NOTICE +41 -0
- package/README.md +45 -2
- package/custom-elements.json +310 -0
- package/demo/files/thumb-a11y.svg +1 -0
- package/demo/files/thumb-banner.svg +1 -0
- package/demo/files/thumb-button.svg +1 -0
- package/demo/files/thumb-code.svg +1 -0
- package/demo/files/thumb-color.svg +1 -0
- package/demo/files/thumb-type.svg +1 -0
- package/demo/index.html +49 -0
- package/demo/pages/item-b7d4e9a1-accessibility/index.html +6 -0
- package/demo/pages/item-b7d4e9a1-components/index.html +4 -0
- package/demo/pages/item-b7d4e9a1-components-banner/index.html +8 -0
- package/demo/pages/item-b7d4e9a1-components-button/index.html +9 -0
- package/demo/pages/item-b7d4e9a1-foundations/index.html +4 -0
- package/demo/pages/item-b7d4e9a1-foundations-color/index.html +8 -0
- package/demo/pages/item-b7d4e9a1-foundations-typography/index.html +5 -0
- package/demo/pages/item-b7d4e9a1-getting-started/index.html +7 -0
- package/demo/pages/item-b7d4e9a1-getting-started-developing/index.html +14 -0
- package/demo/site.json +231 -0
- package/design-system/bridge.json +498 -0
- package/gulpfile.cjs +14 -0
- package/icons/alert.svg +1 -0
- package/icons/apps.svg +1 -0
- package/icons/archive.svg +1 -0
- package/icons/arrow-down.svg +1 -0
- package/icons/arrow-left.svg +1 -0
- package/icons/arrow-right.svg +1 -0
- package/icons/arrow-switch.svg +1 -0
- package/icons/arrow-up.svg +1 -0
- package/icons/bold.svg +1 -0
- package/icons/book.svg +1 -0
- package/icons/bookmark.svg +1 -0
- package/icons/briefcase.svg +1 -0
- package/icons/calendar.svg +1 -0
- package/icons/check-circle.svg +1 -0
- package/icons/check.svg +1 -0
- package/icons/checklist.svg +1 -0
- package/icons/chevron-down.svg +1 -0
- package/icons/chevron-left.svg +1 -0
- package/icons/chevron-right.svg +1 -0
- package/icons/chevron-up.svg +1 -0
- package/icons/clock.svg +1 -0
- package/icons/cloud.svg +1 -0
- package/icons/code.svg +1 -0
- package/icons/columns.svg +1 -0
- package/icons/comment-discussion.svg +1 -0
- package/icons/comment.svg +1 -0
- package/icons/copy.svg +1 -0
- package/icons/dash.svg +1 -0
- package/icons/device-desktop.svg +1 -0
- package/icons/device-mobile.svg +1 -0
- package/icons/download.svg +1 -0
- package/icons/eye-closed.svg +1 -0
- package/icons/eye.svg +1 -0
- package/icons/file-directory-open-fill.svg +1 -0
- package/icons/file-directory.svg +1 -0
- package/icons/file.svg +1 -0
- package/icons/gear.svg +1 -0
- package/icons/globe.svg +1 -0
- package/icons/graph.svg +1 -0
- package/icons/heading.svg +1 -0
- package/icons/history.svg +1 -0
- package/icons/home.svg +1 -0
- package/icons/image.svg +1 -0
- package/icons/info.svg +1 -0
- package/icons/italic.svg +1 -0
- package/icons/light-bulb.svg +1 -0
- package/icons/link-external.svg +1 -0
- package/icons/link.svg +1 -0
- package/icons/list-ordered.svg +1 -0
- package/icons/list-unordered.svg +1 -0
- package/icons/location.svg +1 -0
- package/icons/lock.svg +1 -0
- package/icons/mail.svg +1 -0
- package/icons/move-to-end.svg +1 -0
- package/icons/move-to-start.svg +1 -0
- package/icons/paperclip.svg +1 -0
- package/icons/pencil.svg +1 -0
- package/icons/people.svg +1 -0
- package/icons/person.svg +1 -0
- package/icons/play.svg +1 -0
- package/icons/plug.svg +1 -0
- package/icons/plus-circle.svg +1 -0
- package/icons/plus.svg +1 -0
- package/icons/question.svg +1 -0
- package/icons/quote.svg +1 -0
- package/icons/redo.svg +1 -0
- package/icons/report.svg +1 -0
- package/icons/rss.svg +1 -0
- package/icons/screen-full.svg +1 -0
- package/icons/search.svg +1 -0
- package/icons/share.svg +1 -0
- package/icons/shield-check.svg +1 -0
- package/icons/sign-out.svg +1 -0
- package/icons/sliders.svg +1 -0
- package/icons/smiley.svg +1 -0
- package/icons/sort-desc.svg +1 -0
- package/icons/star.svg +1 -0
- package/icons/stop.svg +1 -0
- package/icons/strikethrough.svg +1 -0
- package/icons/sync.svg +1 -0
- package/icons/table.svg +1 -0
- package/icons/tag.svg +1 -0
- package/icons/three-bars.svg +1 -0
- package/icons/thumbsup.svg +1 -0
- package/icons/trash.svg +1 -0
- package/icons/triangle-down.svg +1 -0
- package/icons/undo.svg +1 -0
- package/icons/upload.svg +1 -0
- package/icons/video.svg +1 -0
- package/icons/x-circle.svg +1 -0
- package/icons/x.svg +1 -0
- package/icons/zoom-in.svg +1 -0
- package/icons/zoom-out.svg +1 -0
- package/lib/PrimerDDDMap.js +147 -0
- package/lib/PrimerDesignSystem.js +43 -0
- package/lib/PrimerIcons.js +144 -0
- package/lib/PrimerTokens.js +97 -0
- package/lib/primer-theme.docs.json +43 -0
- package/lib/primer.ddd-map.json +1292 -0
- package/locales/primer-theme.en.json +9 -0
- package/package.json +56 -4
- package/primer-theme.js +495 -0
- package/test/primer-theme.test.js +73 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "primer-theme.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "`primer-theme`\nA HAXcms theme in the layout of the Primer documentation site: a 64px\nheader on the default background with a hairline border, a NavList\nsidebar whose current item is a muted pill with Primer's accent bar, and\npage content in a 1012px column with a muted lead. Built on the Primer\nDDD bridge: every HAX block reads --ddd-* tokens, which point at Primer\ntokens while this theme is active.",
|
|
12
|
+
"name": "PrimerTheme",
|
|
13
|
+
"members": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "field",
|
|
16
|
+
"name": "tag",
|
|
17
|
+
"static": true,
|
|
18
|
+
"readonly": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"kind": "method",
|
|
22
|
+
"name": "HAXCMSGlobalStyleSheetContent"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"kind": "method",
|
|
26
|
+
"name": "toggleSidebar"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "method",
|
|
30
|
+
"name": "toggleDarkMode"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"kind": "field",
|
|
34
|
+
"name": "t",
|
|
35
|
+
"type": {
|
|
36
|
+
"text": "object"
|
|
37
|
+
},
|
|
38
|
+
"default": "{ ...this.t, skipToContent: \"Skip to content\", toggleSiteMenu: \"Toggle site menu\", siteNavigation: \"Site navigation\", searchSite: \"Search site\", search: \"Search\", toggleDarkMode: \"Toggle dark mode\", pageNavigation: \"Page navigation\", }"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"kind": "field",
|
|
42
|
+
"name": "autoScroll",
|
|
43
|
+
"type": {
|
|
44
|
+
"text": "boolean"
|
|
45
|
+
},
|
|
46
|
+
"default": "true"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"kind": "field",
|
|
50
|
+
"name": "sidebarOpen",
|
|
51
|
+
"privacy": "public",
|
|
52
|
+
"type": {
|
|
53
|
+
"text": "boolean"
|
|
54
|
+
},
|
|
55
|
+
"default": "true",
|
|
56
|
+
"attribute": "sidebar-open",
|
|
57
|
+
"reflects": true
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"kind": "field",
|
|
61
|
+
"name": "_mobile",
|
|
62
|
+
"privacy": "public",
|
|
63
|
+
"type": {
|
|
64
|
+
"text": "boolean"
|
|
65
|
+
},
|
|
66
|
+
"default": "false",
|
|
67
|
+
"attribute": "_mobile"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"kind": "field",
|
|
71
|
+
"name": "__primerDisposers",
|
|
72
|
+
"type": {
|
|
73
|
+
"text": "array"
|
|
74
|
+
},
|
|
75
|
+
"default": "[]"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"kind": "field",
|
|
79
|
+
"name": "_dark",
|
|
80
|
+
"privacy": "public",
|
|
81
|
+
"type": {
|
|
82
|
+
"text": "boolean"
|
|
83
|
+
},
|
|
84
|
+
"attribute": "_dark"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "field",
|
|
88
|
+
"name": "_lead",
|
|
89
|
+
"privacy": "public",
|
|
90
|
+
"type": {
|
|
91
|
+
"text": "string"
|
|
92
|
+
},
|
|
93
|
+
"attribute": "_lead"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"attributes": [
|
|
97
|
+
{
|
|
98
|
+
"name": "sidebar-open",
|
|
99
|
+
"type": {
|
|
100
|
+
"text": "boolean"
|
|
101
|
+
},
|
|
102
|
+
"default": "true",
|
|
103
|
+
"fieldName": "sidebarOpen"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "_mobile",
|
|
107
|
+
"type": {
|
|
108
|
+
"text": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"default": "false",
|
|
111
|
+
"fieldName": "_mobile"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "_dark",
|
|
115
|
+
"type": {
|
|
116
|
+
"text": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"fieldName": "_dark"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "_lead",
|
|
122
|
+
"type": {
|
|
123
|
+
"text": "string"
|
|
124
|
+
},
|
|
125
|
+
"fieldName": "_lead"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"mixins": [
|
|
129
|
+
{
|
|
130
|
+
"name": "HAXCMSThemeParts",
|
|
131
|
+
"package": "@haxtheweb/haxcms-elements/lib/core/utils/HAXCMSThemeParts.js"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "DDDSuper",
|
|
135
|
+
"package": "@haxtheweb/d-d-d/d-d-d.js"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"superclass": {
|
|
139
|
+
"name": "HAXCMSLitElementTheme",
|
|
140
|
+
"package": "@haxtheweb/haxcms-elements/lib/core/HAXCMSLitElementTheme.js"
|
|
141
|
+
},
|
|
142
|
+
"tagName": "primer-theme",
|
|
143
|
+
"customElement": true
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"exports": [
|
|
147
|
+
{
|
|
148
|
+
"kind": "custom-element-definition",
|
|
149
|
+
"declaration": {
|
|
150
|
+
"name": "PrimerTheme",
|
|
151
|
+
"module": "primer-theme.js"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"kind": "js",
|
|
156
|
+
"name": "PrimerTheme",
|
|
157
|
+
"declaration": {
|
|
158
|
+
"name": "PrimerTheme",
|
|
159
|
+
"module": "primer-theme.js"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "javascript-module",
|
|
166
|
+
"path": "lib/PrimerDDDMap.js",
|
|
167
|
+
"declarations": [
|
|
168
|
+
{
|
|
169
|
+
"kind": "variable",
|
|
170
|
+
"name": "PrimerDDDMap",
|
|
171
|
+
"default": "css` :root, :host { --ddd-theme-default-beaverBlue: #0969da; --ddd-theme-default-nittanyNavy: #002b75; --ddd-theme-default-potentialMidnight: #25292e; --ddd-theme-default-pughBlue: #75c8ff; --ddd-theme-default-accent: #75c8ff; --ddd-theme-default-skyBlue: #47afff; --ddd-theme-default-skyLight: #ade1ff; --ddd-theme-default-skyMaxLight: #ddf4ff; --ddd-theme-default-slateGray: #4e535a; --ddd-theme-default-slateLight: #b4c0cf; --ddd-theme-default-slateMaxLight: #f6f8fa; --ddd-theme-default-coalyGray: #1f2328; --ddd-theme-default-black: #1f2328; --ddd-theme-default-white: #ffffff; --ddd-theme-default-limestoneGray: #9ba9bb; --ddd-theme-default-limestoneLight: #eff2f5; --ddd-theme-default-limestoneMaxLight: #f6f8fa; --ddd-theme-default-background: #f6f8fa; --ddd-theme-default-disabled: #eff2f5; --ddd-theme-default-keystoneYellow: #ffd642; --ddd-theme-default-globalNeon: #f0db3d; --ddd-theme-default-roarGolden: #ebb400; --ddd-theme-default-roarLight: #ffec9e; --ddd-theme-default-roarMaxlight: #fff8c5; --ddd-theme-default-shrineTan: #b8a484; --ddd-theme-default-shrineLight: #dfd7c8; --ddd-theme-default-shrineMaxLight: #eeeae2; --ddd-theme-default-inventOrange: #f68c41; --ddd-theme-default-landgrantBrown: #64513a; --ddd-theme-default-creekTeal: #1db9b4; --ddd-theme-default-creekLight: #89ebe1; --ddd-theme-default-creekMaxLight: #c7f5ef; --ddd-theme-default-opportunityGreen: #1a7f37; --ddd-theme-default-forestGreen: #285c3b; --ddd-theme-default-futureLime: #31bf46; --ddd-theme-default-athertonViolet: #bc91f8; --ddd-theme-default-wonderPurple: #8250df; --ddd-theme-default-original87Pink: #8e2e66; --ddd-theme-default-discoveryCoral: #f88768; --ddd-theme-default-link: #004db3; --ddd-theme-default-linkLight: #4493f8; --ddd-theme-default-error: #d1242f; --ddd-theme-default-errorLight: #ffebe9; --ddd-theme-default-warning: #9a6700; --ddd-theme-default-warningLight: #fff8c5; --ddd-theme-default-info: #0969da; --ddd-theme-default-infoLight: #ddf4ff; --ddd-theme-default-success: #1a7f37; --ddd-theme-default-successLight: #dafbe1; --ddd-theme-default-alertImmediate: #fecdcd; --ddd-theme-default-alertUrgent: #ffec9e; --ddd-theme-default-alertAllClear: #caf7ca; --ddd-theme-default-alertNonEmergency: #d1f0ff; --ddd-font-primary: \"Mona Sans\", \"Mona Sans VF\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif; --ddd-font-secondary: \"Mona Sans\", \"Mona Sans VF\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif; --ddd-font-navigation: \"Mona Sans\", \"Mona Sans VF\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif; --ddd-font-mono: var(--fontStack-monospace); --ddd-font-weight-light: var(--base-text-weight-light); --ddd-font-weight-regular: var(--base-text-weight-normal); --ddd-font-weight-medium: var(--base-text-weight-medium); --ddd-font-weight-bold: var(--base-text-weight-semibold); --ddd-radius-xs: 3px; --ddd-radius-sm: 6px; --ddd-radius-md: 6px; --ddd-radius-lg: 12px; --ddd-radius-xl: 12px; --ddd-boxShadow-sm: var(--shadow-resting-xsmall); --ddd-boxShadow-md: var(--shadow-resting-medium); --ddd-boxShadow-lg: var(--shadow-floating-small); --ddd-boxShadow-xl: var(--shadow-floating-medium); --ddd-focus-ring: 2px solid var(--focus-outlineColor); --ddd-focus-offset: 0px; --ddd-duration-fast: var(--base-duration-100); --ddd-duration-normal: var(--base-duration-200); --ddd-duration-slow: var(--base-duration-300); --ddd-timing-ease: var(--base-easing-ease); --ddd-timing-enter: var(--base-easing-easeOut); --ddd-timing-exit: var(--base-easing-easeIn); --ddd-timing-emphasized: var(--base-easing-easeInOut); --ddd-control-height-xs: 24px; --ddd-control-height-sm: 28px; --ddd-control-height-md: 32px; --ddd-control-height-lg: 40px; --ddd-textfield-height-sm: 28px; --ddd-textfield-height-md: 32px; --ddd-textfield-height-lg: 40px; --ddd-surface-padding: 16px; --ddd-surface-padding-lg: 24px; --ddd-stack-gap: 16px; --ddd-inline-gap: 8px; --ddd-control-padding-inline: 12px; --ddd-card-padding: 16px; --ddd-card-border-width: 1px; --ddd-card-shadow: none; --ddd-card-radius: 6px; --ddd-card-background: var(--bgColor-default); --ddd-control-radius: 6px; --ddd-control-height: 32px; --ddd-tag-radius: 999px; /* rgb channels follow their mapped color */ --ddd-primary-0-rgb: 117, 200, 255, 0.7; --ddd-primary-1-rgb: 9, 105, 218; --ddd-primary-2-rgb: 0, 43, 117; --ddd-primary-3-rgb: 37, 41, 46; --ddd-primary-4-rgb: 31, 35, 40; --ddd-primary-5-rgb: 155, 169, 187; --ddd-primary-6-rgb: 78, 83, 90; --ddd-primary-7-rgb: 29, 185, 180; --ddd-primary-8-rgb: 71, 175, 255; --ddd-primary-9-rgb: 184, 164, 132; --ddd-primary-10-rgb: 235, 180, 0; --ddd-primary-11-rgb: 142, 46, 102, 0.7; --ddd-primary-12-rgb: 248, 135, 104; --ddd-primary-13-rgb: 130, 80, 223; --ddd-primary-14-rgb: 188, 145, 248; --ddd-primary-15-rgb: 246, 140, 65; --ddd-primary-16-rgb: 255, 214, 66; --ddd-primary-17-rgb: 26, 127, 55; --ddd-primary-18-rgb: 49, 191, 70; --ddd-primary-19-rgb: 40, 92, 59; --ddd-primary-20-rgb: 100, 81, 58; --ddd-primary-21-rgb: 240, 219, 61; --ddd-primary-22-rgb: 209, 36, 47; --ddd-primary-23-rgb: 154, 103, 0; --ddd-primary-24-rgb: 9, 105, 218; --ddd-primary-25-rgb: 26, 127, 55; /* text color paired with each remapped palette, where DDD's own no longer reads */ --ddd-primary-17-on: white; } `"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"exports": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "js",
|
|
177
|
+
"name": "PrimerDDDMap",
|
|
178
|
+
"declaration": {
|
|
179
|
+
"name": "PrimerDDDMap",
|
|
180
|
+
"module": "lib/PrimerDDDMap.js"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"kind": "javascript-module",
|
|
187
|
+
"path": "lib/PrimerDesignSystem.js",
|
|
188
|
+
"declarations": [
|
|
189
|
+
{
|
|
190
|
+
"kind": "variable",
|
|
191
|
+
"name": "PRIMER_SYSTEM",
|
|
192
|
+
"type": {
|
|
193
|
+
"text": "string"
|
|
194
|
+
},
|
|
195
|
+
"default": "\"primer\""
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"kind": "function",
|
|
199
|
+
"name": "registerPrimerDesignSystem",
|
|
200
|
+
"parameters": [
|
|
201
|
+
{
|
|
202
|
+
"name": "manager",
|
|
203
|
+
"default": "DesignSystemManager"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"description": "register Primer with the design system manager (once)"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"kind": "function",
|
|
210
|
+
"name": "activatePrimerDesignSystem",
|
|
211
|
+
"parameters": [
|
|
212
|
+
{
|
|
213
|
+
"name": "manager",
|
|
214
|
+
"default": "DesignSystemManager"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"description": "make Primer the active design system"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"exports": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "js",
|
|
223
|
+
"name": "PRIMER_SYSTEM",
|
|
224
|
+
"declaration": {
|
|
225
|
+
"name": "PRIMER_SYSTEM",
|
|
226
|
+
"module": "lib/PrimerDesignSystem.js"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"kind": "js",
|
|
231
|
+
"name": "registerPrimerDesignSystem",
|
|
232
|
+
"declaration": {
|
|
233
|
+
"name": "registerPrimerDesignSystem",
|
|
234
|
+
"module": "lib/PrimerDesignSystem.js"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "js",
|
|
239
|
+
"name": "activatePrimerDesignSystem",
|
|
240
|
+
"declaration": {
|
|
241
|
+
"name": "activatePrimerDesignSystem",
|
|
242
|
+
"module": "lib/PrimerDesignSystem.js"
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"kind": "javascript-module",
|
|
249
|
+
"path": "lib/PrimerIcons.js",
|
|
250
|
+
"declarations": [
|
|
251
|
+
{
|
|
252
|
+
"kind": "variable",
|
|
253
|
+
"name": "PrimerIcons",
|
|
254
|
+
"type": {
|
|
255
|
+
"text": "object"
|
|
256
|
+
},
|
|
257
|
+
"default": "{ set: \"primer-icons\", basePath: new URL(\"../icons/\", import.meta.url).href, aliases: { \"av:play-arrow\": \"primer-icons:play\", \"av:play-circle-filled\": \"primer-icons:play\", \"av:play-circle-outline\": \"primer-icons:play\", \"av:stop\": \"primer-icons:stop\", \"av:videocam\": \"primer-icons:video\", \"communication:chat\": \"primer-icons:comment\", \"communication:email\": \"primer-icons:mail\", \"communication:location-on\": \"primer-icons:location\", \"communication:message\": \"primer-icons:comment\", \"communication:rss-feed\": \"primer-icons:rss\", \"device:access-time\": \"primer-icons:clock\", \"editor:attach-file\": \"primer-icons:paperclip\", \"editor:border-all\": \"primer-icons:table\", \"editor:format-bold\": \"primer-icons:bold\", \"editor:format-italic\": \"primer-icons:italic\", \"editor:format-list-bulleted\": \"primer-icons:list-unordered\", \"editor:format-list-numbered\": \"primer-icons:list-ordered\", \"editor:format-quote\": \"primer-icons:quote\", \"editor:format-strikethrough\": \"primer-icons:strikethrough\", \"editor:insert-chart\": \"primer-icons:graph\", \"editor:insert-drive-file\": \"primer-icons:file\", \"editor:insert-emoticon\": \"primer-icons:smiley\", \"editor:insert-link\": \"primer-icons:link\", \"editor:insert-photo\": \"primer-icons:image\", \"editor:mode-edit\": \"primer-icons:pencil\", \"editor:show-chart\": \"primer-icons:graph\", \"editor:title\": \"primer-icons:heading\", \"hardware:computer\": \"primer-icons:device-desktop\", \"hardware:desktop-windows\": \"primer-icons:device-desktop\", \"hardware:keyboard-arrow-down\": \"primer-icons:chevron-down\", \"hardware:keyboard-arrow-left\": \"primer-icons:chevron-left\", \"hardware:keyboard-arrow-right\": \"primer-icons:chevron-right\", \"hardware:keyboard-arrow-up\": \"primer-icons:chevron-up\", \"hardware:phone-iphone\": \"primer-icons:device-mobile\", \"icons:add\": \"primer-icons:plus\", \"icons:add-circle\": \"primer-icons:plus-circle\", \"icons:add-circle-outline\": \"primer-icons:plus-circle\", \"icons:archive\": \"primer-icons:archive\", \"icons:arrow-back\": \"primer-icons:arrow-left\", \"icons:arrow-downward\": \"primer-icons:arrow-down\", \"icons:arrow-drop-down\": \"primer-icons:triangle-down\", \"icons:arrow-forward\": \"primer-icons:arrow-right\", \"icons:arrow-upward\": \"primer-icons:arrow-up\", \"icons:assignment\": \"primer-icons:checklist\", \"icons:book\": \"primer-icons:book\", \"icons:bookmark\": \"primer-icons:bookmark\", \"icons:bookmark-border\": \"primer-icons:bookmark\", \"icons:cancel\": \"primer-icons:x-circle\", \"icons:check\": \"primer-icons:check\", \"icons:check-circle\": \"primer-icons:check-circle\", \"icons:chevron-left\": \"primer-icons:chevron-left\", \"icons:chevron-right\": \"primer-icons:chevron-right\", \"icons:clear\": \"primer-icons:x\", \"icons:close\": \"primer-icons:x\", \"icons:cloud\": \"primer-icons:cloud\", \"icons:cloud-download\": \"primer-icons:download\", \"icons:code\": \"primer-icons:code\", \"icons:content-copy\": \"primer-icons:copy\", \"icons:create\": \"primer-icons:pencil\", \"icons:dashboard\": \"primer-icons:apps\", \"icons:date-range\": \"primer-icons:calendar\", \"icons:delete\": \"primer-icons:trash\", \"icons:description\": \"primer-icons:file\", \"icons:error\": \"primer-icons:stop\", \"icons:exit-to-app\": \"primer-icons:sign-out\", \"icons:expand-less\": \"primer-icons:chevron-up\", \"icons:expand-more\": \"primer-icons:chevron-down\", \"icons:extension\": \"primer-icons:plug\", \"icons:face\": \"primer-icons:smiley\", \"icons:feedback\": \"primer-icons:comment-discussion\", \"icons:file-download\": \"primer-icons:download\", \"icons:file-upload\": \"primer-icons:upload\", \"icons:first-page\": \"primer-icons:move-to-start\", \"icons:flag\": \"primer-icons:report\", \"icons:folder\": \"primer-icons:file-directory\", \"icons:folder-open\": \"primer-icons:file-directory-open-fill\", \"icons:fullscreen\": \"primer-icons:screen-full\", \"icons:help-outline\": \"primer-icons:question\", \"icons:history\": \"primer-icons:history\", \"icons:home\": \"primer-icons:home\", \"icons:info\": \"primer-icons:info\", \"icons:info-outline\": \"primer-icons:info\", \"icons:label\": \"primer-icons:tag\", \"icons:label-outline\": \"primer-icons:tag\", \"icons:language\": \"primer-icons:globe\", \"icons:last-page\": \"primer-icons:move-to-end\", \"icons:launch\": \"primer-icons:link-external\", \"icons:lightbulb-outline\": \"primer-icons:light-bulb\", \"icons:link\": \"primer-icons:link\", \"icons:list\": \"primer-icons:list-unordered\", \"icons:lock\": \"primer-icons:lock\", \"icons:mail\": \"primer-icons:mail\", \"icons:menu\": \"primer-icons:three-bars\", \"icons:open-in-browser\": \"primer-icons:link-external\", \"icons:open-in-new\": \"primer-icons:link-external\", \"icons:redo\": \"primer-icons:redo\", \"icons:refresh\": \"primer-icons:sync\", \"icons:remove\": \"primer-icons:dash\", \"icons:room\": \"primer-icons:location\", \"icons:search\": \"primer-icons:search\", \"icons:settings\": \"primer-icons:gear\", \"icons:sort\": \"primer-icons:sort-desc\", \"icons:star\": \"primer-icons:star\", \"icons:swap-vert\": \"primer-icons:arrow-switch\", \"icons:thumbs-up-down\": \"primer-icons:thumbsup\", \"icons:toc\": \"primer-icons:list-unordered\", \"icons:undo\": \"primer-icons:undo\", \"icons:verified-user\": \"primer-icons:shield-check\", \"icons:view-column\": \"primer-icons:columns\", \"icons:view-module\": \"primer-icons:apps\", \"icons:visibility\": \"primer-icons:eye\", \"icons:visibility-off\": \"primer-icons:eye-closed\", \"icons:warning\": \"primer-icons:alert\", \"icons:work\": \"primer-icons:briefcase\", \"icons:zoom-in\": \"primer-icons:zoom-in\", \"icons:zoom-out\": \"primer-icons:zoom-out\", \"image:collections\": \"primer-icons:image\", \"image:grid-on\": \"primer-icons:table\", \"image:image\": \"primer-icons:image\", \"image:photo\": \"primer-icons:image\", \"image:photo-library\": \"primer-icons:image\", \"image:picture-as-pdf\": \"primer-icons:file\", \"image:remove-red-eye\": \"primer-icons:eye\", \"image:tune\": \"primer-icons:sliders\", \"maps:place\": \"primer-icons:location\", \"social:mood\": \"primer-icons:smiley\", \"social:people\": \"primer-icons:people\", \"social:person\": \"primer-icons:person\", \"social:public\": \"primer-icons:globe\", \"social:share\": \"primer-icons:share\", }, }",
|
|
258
|
+
"description": "Generated by elements/d-d-d/design-system/bridge/build-bridge.js from"
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"exports": [
|
|
262
|
+
{
|
|
263
|
+
"kind": "js",
|
|
264
|
+
"name": "PrimerIcons",
|
|
265
|
+
"declaration": {
|
|
266
|
+
"name": "PrimerIcons",
|
|
267
|
+
"module": "lib/PrimerIcons.js"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"kind": "javascript-module",
|
|
274
|
+
"path": "lib/PrimerTokens.js",
|
|
275
|
+
"declarations": [
|
|
276
|
+
{
|
|
277
|
+
"kind": "variable",
|
|
278
|
+
"name": "PrimerTokens",
|
|
279
|
+
"default": "css` :root, :host { --base-duration-100: 100ms; --base-duration-200: 200ms; --base-duration-300: 300ms; --base-easing-ease: cubic-bezier(0.25, 0.1, 0.25, 1); --base-easing-easeIn: cubic-bezier(0.7, 0.1, 0.75, 0.9); --base-easing-easeInOut: cubic-bezier(0.6, 0, 0.2, 1); --base-easing-easeOut: cubic-bezier(0.3, 0.8, 0.6, 1); --base-text-weight-light: 300; --base-text-weight-medium: 500; --base-text-weight-normal: 400; --base-text-weight-semibold: 600; --bgColor-accent-muted: light-dark(#ddf4ff, #388bfd1a); --bgColor-attention-muted: light-dark(#fff8c5, #bb800926); --bgColor-danger-muted: light-dark(#ffebe9, #f851491a); --bgColor-default: light-dark(#ffffff, #0d1117); --bgColor-disabled: light-dark(#eff2f5, #212830); --bgColor-emphasis: light-dark(#25292e, #3d444d); --bgColor-muted: light-dark(#f6f8fa, #151b23); --bgColor-success-muted: light-dark(#dafbe1, #2ea04326); --borderColor-default: light-dark(#d1d9e0, #3d444d); --borderColor-muted: light-dark(#d1d9e0b3, #3d444db3); --button-default-bgColor-hover: light-dark(#eff2f5, #262c36); --control-bgColor-hover: light-dark(#eff2f5, #262c36); --control-transparent-bgColor-hover: light-dark(#818b981a, #656c7633); --control-transparent-bgColor-selected: light-dark(#818b9826, #656c7633); --display-blue-scale-0: light-dark(#d1f0ff, #001a47); --display-blue-scale-1: light-dark(#ade1ff, #002766); --display-blue-scale-2: light-dark(#75c8ff, #00378a); --display-blue-scale-3: light-dark(#47afff, #0046a8); --display-blue-scale-7: light-dark(#004db3, #61adff); --display-blue-scale-9: light-dark(#002b75, #a3d3ff); --display-brown-scale-0: light-dark(#eeeae2, #241c14); --display-brown-scale-1: light-dark(#dfd7c8, #342a1d); --display-brown-scale-3: light-dark(#b8a484, #5d4a32); --display-brown-scale-7: light-dark(#64513a, #bfa77d); --display-coral-scale-3: light-dark(#f88768, #902a0e); --display-gray-scale-2: light-dark(#b4c0cf, #393d41); --display-gray-scale-3: light-dark(#9ba9bb, #474e57); --display-gray-scale-7: light-dark(#4e535a, #9babbf); --display-green-scale-0: light-dark(#caf7ca, #122117); --display-green-scale-3: light-dark(#31bf46, #285830); --display-green-scale-7: light-dark(#285c3b, #46c144); --display-lemon-scale-1: light-dark(#f0db3d, #372901); --display-orange-scale-3: light-dark(#f68c41, #7b3c0e); --display-pink-scale-7: light-dark(#8e2e66, #ec8dbd); --display-purple-scale-3: light-dark(#bc91f8, #5b1cca); --display-red-scale-1: light-dark(#fecdcd, #58091a); --display-teal-scale-0: light-dark(#c7f5ef, #041f25); --display-teal-scale-1: light-dark(#89ebe1, #073036); --display-teal-scale-3: light-dark(#1db9b4, #0c555a); --display-yellow-scale-0: light-dark(#ffec9e, #2e1a00); --display-yellow-scale-1: light-dark(#ffd642, #3d2401); --display-yellow-scale-2: light-dark(#ebb400, #5a3702); --fgColor-accent: light-dark(#0969da, #4493f8); --fgColor-attention: light-dark(#9a6700, #d29922); --fgColor-black: light-dark(#1f2328, #010409); --fgColor-danger: light-dark(#d1242f, #f85149); --fgColor-default: light-dark(#1f2328, #f0f6fc); --fgColor-done: light-dark(#8250df, #ab7df8); --fgColor-muted: light-dark(#59636e, #9198a1); --fgColor-success: light-dark(#1a7f37, #3fb950); --fgColor-white: #ffffff; --focus-outlineColor: light-dark(#0969da, #1f6feb); --fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace; --shadow-floating-medium: 0 0 0 1px light-dark(#d1d9e000, #3d444d), 0 8px 16px -4px light-dark(#25292e14, #01040966), 0 4px 32px -4px light-dark(#25292e14, #01040966), 0 24px 48px -12px light-dark(#25292e14, #01040966), 0 48px 96px -24px light-dark(#25292e14, #01040966); --shadow-floating-small: 0 0 0 1px light-dark(#d1d9e040, #3d444d), 0 6px 12px -3px light-dark(#25292e0a, #01040966), 0 6px 18px 0 light-dark(#25292e1f, #01040966); --shadow-resting-medium: 0 1px 1px 0 light-dark(#25292e1a, #01040966), 0 3px 6px 0 light-dark(#25292e1f, #010409cc); --shadow-resting-xsmall: 0 1px 1px 0 light-dark(#1f23280d, #010409cc); } `"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"kind": "variable",
|
|
283
|
+
"name": "PrimerFonts",
|
|
284
|
+
"type": {
|
|
285
|
+
"text": "array"
|
|
286
|
+
},
|
|
287
|
+
"default": "[ \"https://fonts.googleapis.com/css2?family=Mona+Sans:wght@300..600&display=swap\", ]"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"exports": [
|
|
291
|
+
{
|
|
292
|
+
"kind": "js",
|
|
293
|
+
"name": "PrimerTokens",
|
|
294
|
+
"declaration": {
|
|
295
|
+
"name": "PrimerTokens",
|
|
296
|
+
"module": "lib/PrimerTokens.js"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"kind": "js",
|
|
301
|
+
"name": "PrimerFonts",
|
|
302
|
+
"declaration": {
|
|
303
|
+
"name": "PrimerFonts",
|
|
304
|
+
"module": "lib/PrimerTokens.js"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="A focus outline around a button"><path fill="#fff" d="M0 0h400v225H0z"/><rect x="132" y="88" width="136" height="48" rx="8" fill="none" stroke="#0969da" stroke-width="3"/><rect x="140" y="96" width="120" height="32" rx="6" fill="#f6f8fa" stroke="#d1d9e0"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="An info banner"><path fill="#fff" d="M0 0h400v225H0z"/><rect x="56" y="80" width="288" height="64" rx="6" fill="#ddf4ff" stroke="#54aeff"/><circle cx="84" cy="112" r="10" fill="#0969da"/><rect x="104" y="106" width="180" height="12" rx="4" fill="#1f2328"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="A primary and a default button"><path fill="#f6f8fa" d="M0 0h400v225H0z"/><rect x="92" y="96" width="108" height="32" rx="6" fill="#1f883d"/><rect x="110" y="108" width="72" height="8" rx="4" fill="#fff"/><rect x="216" y="96" width="96" height="32" rx="6" fill="#f6f8fa" stroke="#d1d9e0"/><rect x="232" y="108" width="64" height="8" rx="4" fill="#25292e"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="Code in a bordered box"><path fill="#fff" d="M0 0h400v225H0z"/><rect x="60" y="56" width="280" height="112" rx="6" fill="#f6f8fa" stroke="#d1d9e0"/><rect x="80" y="80" width="70" height="10" rx="4" fill="#cf222e"/><rect x="160" y="80" width="110" height="10" rx="4" fill="#0550ae"/><rect x="96" y="104" width="170" height="10" rx="4" fill="#116329"/><rect x="80" y="128" width="50" height="10" rx="4" fill="#cf222e"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="Accent, success, attention and danger swatches"><path fill="#f6f8fa" d="M0 0h400v225H0z"/><rect x="60" y="76" width="56" height="56" rx="6" fill="#0969da"/><rect x="132" y="76" width="56" height="56" rx="6" fill="#1a7f37"/><rect x="204" y="76" width="56" height="56" rx="6" fill="#9a6700"/><rect x="276" y="76" width="56" height="56" rx="6" fill="#d1242f"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 225" aria-label="A heading and lines of body text"><path fill="#f6f8fa" d="M0 0h400v225H0z"/><rect x="60" y="64" width="190" height="22" rx="4" fill="#1f2328"/><rect x="60" y="104" width="280" height="10" rx="4" fill="#59636e"/><rect x="60" y="126" width="250" height="10" rx="4" fill="#59636e"/><rect x="60" y="148" width="210" height="10" rx="4" fill="#59636e"/></svg>
|
package/demo/index.html
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<script>
|
|
6
|
+
// anchor the HAXcms router + relative paths to this demo folder so the
|
|
7
|
+
// site renders whether served from the element or the monorepo root
|
|
8
|
+
(() => {
|
|
9
|
+
const loc = globalThis.location;
|
|
10
|
+
if (loc.pathname.endsWith("/index.html")) {
|
|
11
|
+
globalThis.history.replaceState(null, "", loc.pathname.replace(/index\.html$/, "") + loc.search + loc.hash);
|
|
12
|
+
}
|
|
13
|
+
const i = loc.pathname.lastIndexOf("/demo/");
|
|
14
|
+
const base = globalThis.document.createElement("base");
|
|
15
|
+
base.href = i === -1 ? "./" : loc.pathname.slice(0, i + 6);
|
|
16
|
+
globalThis.document.head.appendChild(base);
|
|
17
|
+
})();
|
|
18
|
+
</script>
|
|
19
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
20
|
+
<meta name="Description" content="Demonstration for primer-theme">
|
|
21
|
+
<title>Primer theme: primer-theme Demo</title>
|
|
22
|
+
<script src="../../../node_modules/@haxtheweb/deduping-fix/deduping-fix.js"></script>
|
|
23
|
+
<script>
|
|
24
|
+
globalThis.process = globalThis.process || {
|
|
25
|
+
env: {
|
|
26
|
+
NODE_ENV: "production"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
</script>
|
|
30
|
+
<script>
|
|
31
|
+
// a static demo of the theme: there is no backend to ask for editing
|
|
32
|
+
// settings, and the site's components load through the registry the
|
|
33
|
+
// HAXcms demo uses (otherwise the menu and other lazily loaded parts
|
|
34
|
+
// stay as "Loading" placeholders)
|
|
35
|
+
globalThis.HAXCMSContext = globalThis.HAXCMSContext || "published";
|
|
36
|
+
globalThis.WCAutoloadRegistryFile =
|
|
37
|
+
globalThis.WCAutoloadRegistryFile ||
|
|
38
|
+
"../../haxcms-elements/demo/wc-registry.json";
|
|
39
|
+
globalThis.WCGlobalBasePath = globalThis.WCGlobalBasePath || "/node_modules/";
|
|
40
|
+
</script>
|
|
41
|
+
<script type="module">
|
|
42
|
+
import "@haxtheweb/haxcms-elements/lib/core/haxcms-site-builder.js";
|
|
43
|
+
import '../primer-theme.js';
|
|
44
|
+
</script>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<haxcms-site-builder id="site" file="site.json"></haxcms-site-builder>
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<ul>
|
|
2
|
+
<li>Every key color pair keeps at least 4.5:1 contrast; the bridge build fails otherwise.</li>
|
|
3
|
+
<li>Focus uses Primer's 2px focus outline.</li>
|
|
4
|
+
<li>Correct and incorrect answers keep their icon, label and line style as well as color.</li>
|
|
5
|
+
</ul>
|
|
6
|
+
<p>The values come from <code>@primer/primitives</code> 11.10.0 (MIT) and icons from <code>@primer/octicons</code> 19.42.0 (MIT) (<a href="https://primer.style">primer.style</a>). No Primer stylesheet is loaded. GitHub and Primer are trademarks of GitHub, Inc.; this theme is an independent HAX integration and is not affiliated with or endorsed by GitHub.</p>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<grid-plate layout="1-1">
|
|
2
|
+
<ddd-card slot="col-1" title="Button" href="components/button" label="Read" src="files/thumb-button.svg" alt=""><p>Primary and default buttons.</p></ddd-card>
|
|
3
|
+
<ddd-card slot="col-2" title="Banner" href="components/banner" label="Read" src="files/thumb-banner.svg" alt=""><p>Notes and alerts in Primer's status colors.</p></ddd-card>
|
|
4
|
+
</grid-plate>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<stop-note status="info" title="Heads up"><span slot="message">This is an informational note.</span></stop-note>
|
|
2
|
+
<stop-note status="success" title="Saved"><span slot="message">Your changes were saved.</span></stop-note>
|
|
3
|
+
<stop-note status="stop" title="Read before you continue"><span slot="message">This step cannot be undone.</span></stop-note>
|
|
4
|
+
<multiple-choice question="Which of these does the Primer bridge change?">
|
|
5
|
+
<input data-correct="true" value="Brand colors"/>
|
|
6
|
+
<input data-correct="true" value="Fonts"/>
|
|
7
|
+
<input value="The content you authored"/>
|
|
8
|
+
</multiple-choice>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<a11y-tabs>
|
|
2
|
+
<a11y-tab label="Usage">
|
|
3
|
+
<p><simple-cta link="components" label="Primary action" data-primary="1"></simple-cta> <simple-cta link="components" label="Default action" data-primary="4"></simple-cta></p>
|
|
4
|
+
<stop-note status="warning" title="One primary button"><span slot="message">Two primary buttons compete for attention. Make the second one a default button.</span></stop-note>
|
|
5
|
+
</a11y-tab>
|
|
6
|
+
<a11y-tab label="Code">
|
|
7
|
+
<code-sample type="html"><template preserve-content="preserve-content"><simple-cta link="/next" label="Primary action"></simple-cta></template></code-sample>
|
|
8
|
+
</a11y-tab>
|
|
9
|
+
</a11y-tabs>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<grid-plate layout="1-1">
|
|
2
|
+
<ddd-card slot="col-1" title="Color" href="foundations/color" label="Read" src="files/thumb-color.svg" alt=""><p>Functional colors and the display scales.</p></ddd-card>
|
|
3
|
+
<ddd-card slot="col-2" title="Typography" href="foundations/typography" label="Read" src="files/thumb-type.svg" alt=""><p>Mona Sans and the system font stack.</p></ddd-card>
|
|
4
|
+
</grid-plate>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<p>DDD palettes are set with <code>data-primary</code> and <code>data-accent</code>. Each named DDD color points at the Primer color with the same role.</p>
|
|
2
|
+
<grid-plate layout="1-1">
|
|
3
|
+
<ddd-card slot="col-1" title="Primary 1" data-primary="1" href="#" label="Accent" src="files/thumb-color.svg" alt=""><p>DDD beaverBlue → fgColor-accent.</p></ddd-card>
|
|
4
|
+
<ddd-card slot="col-2" title="Primary 2" data-primary="2" href="#" label="Dark blue" src="files/thumb-color.svg" alt=""><p>DDD nittanyNavy → display blue 9.</p></ddd-card>
|
|
5
|
+
<ddd-card slot="col-1" title="Primary 7" data-primary="7" href="#" label="Teal" src="files/thumb-banner.svg" alt=""><p>DDD creekTeal → display teal 3.</p></ddd-card>
|
|
6
|
+
<ddd-card slot="col-2" title="Primary 13" data-primary="13" href="#" label="Purple" src="files/thumb-banner.svg" alt=""><p>DDD wonderPurple → fgColor-done.</p></ddd-card>
|
|
7
|
+
</grid-plate>
|
|
8
|
+
<p data-accent="1" data-padding="m" data-border-radius="sm">An accent surface on bgColor-muted, with Primer's 6px corner radius.</p>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<p>Mona Sans is GitHub's open source typeface (SIL Open Font License 1.1), loaded from Google Fonts. Code uses <code>fontStack-monospace</code>.</p>
|
|
2
|
+
<editable-table bordered>
|
|
3
|
+
<table><caption>Primer weights as DDD tokens</caption><thead><tr><th scope="col">DDD token</th><th scope="col">Primer token</th><th scope="col">Value</th></tr></thead>
|
|
4
|
+
<tbody><tr><td>--ddd-font-weight-light</td><td>base-text-weight-light</td><td>300</td></tr><tr><td>--ddd-font-weight-regular</td><td>base-text-weight-normal</td><td>400</td></tr><tr><td>--ddd-font-weight-bold</td><td>base-text-weight-semibold</td><td>600</td></tr></tbody></table>
|
|
5
|
+
</editable-table>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<p>This demo site follows the layout of the Primer documentation: a header on the default background, a NavList sidebar, and a page header with a muted lead. Every page is plain HAX content that renders in any other theme.</p>
|
|
2
|
+
<grid-plate layout="1-1">
|
|
3
|
+
<ddd-card slot="col-1" title="Foundations" href="foundations" label="Read" src="files/thumb-color.svg" alt=""><p>Color, typography and the functional token model.</p></ddd-card>
|
|
4
|
+
<ddd-card slot="col-2" title="Components" href="components" label="Read" src="files/thumb-button.svg" alt=""><p>How HAX blocks look in Primer.</p></ddd-card>
|
|
5
|
+
<ddd-card slot="col-1" title="Developing" href="getting-started/developing" label="Read" src="files/thumb-code.svg" alt=""><p>Turn the theme or the design system on for a site.</p></ddd-card>
|
|
6
|
+
<ddd-card slot="col-2" title="Accessibility" href="accessibility" label="Read" src="files/thumb-a11y.svg" alt=""><p>Focus, contrast and meaning beyond color.</p></ddd-card>
|
|
7
|
+
</grid-plate>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<ddd-steps-list>
|
|
2
|
+
<ddd-steps-list-item title="As a theme"><p>Choose Primer from the theme list in site settings. The layout and the blocks both take on Primer.</p></ddd-steps-list-item>
|
|
3
|
+
<ddd-steps-list-item title="As a design system"><p>Keep your theme and pick Primer as the design system. Blocks take on Primer colors, type and corners inside your layout.</p></ddd-steps-list-item>
|
|
4
|
+
<ddd-steps-list-item title="Author as usual"><p>Blocks read DDD tokens and the bridge answers with Primer values.</p></ddd-steps-list-item>
|
|
5
|
+
</ddd-steps-list>
|
|
6
|
+
<h2>Set it in site.json</h2>
|
|
7
|
+
<code-sample type="json"><template preserve-content="preserve-content">{
|
|
8
|
+
"metadata": {
|
|
9
|
+
"theme": {
|
|
10
|
+
"element": "primer-theme",
|
|
11
|
+
"path": "@haxtheweb/primer-theme/primer-theme.js"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}</template></code-sample>
|