@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.
Files changed (132) hide show
  1. package/.dddignore +36 -0
  2. package/.editorconfig +29 -0
  3. package/.github/workflows/main.yml +33 -0
  4. package/.nojekyll +0 -0
  5. package/.surgeignore +1 -0
  6. package/.travis.yml +15 -0
  7. package/LICENSE +201 -0
  8. package/NOTICE +41 -0
  9. package/README.md +45 -2
  10. package/custom-elements.json +310 -0
  11. package/demo/files/thumb-a11y.svg +1 -0
  12. package/demo/files/thumb-banner.svg +1 -0
  13. package/demo/files/thumb-button.svg +1 -0
  14. package/demo/files/thumb-code.svg +1 -0
  15. package/demo/files/thumb-color.svg +1 -0
  16. package/demo/files/thumb-type.svg +1 -0
  17. package/demo/index.html +49 -0
  18. package/demo/pages/item-b7d4e9a1-accessibility/index.html +6 -0
  19. package/demo/pages/item-b7d4e9a1-components/index.html +4 -0
  20. package/demo/pages/item-b7d4e9a1-components-banner/index.html +8 -0
  21. package/demo/pages/item-b7d4e9a1-components-button/index.html +9 -0
  22. package/demo/pages/item-b7d4e9a1-foundations/index.html +4 -0
  23. package/demo/pages/item-b7d4e9a1-foundations-color/index.html +8 -0
  24. package/demo/pages/item-b7d4e9a1-foundations-typography/index.html +5 -0
  25. package/demo/pages/item-b7d4e9a1-getting-started/index.html +7 -0
  26. package/demo/pages/item-b7d4e9a1-getting-started-developing/index.html +14 -0
  27. package/demo/site.json +231 -0
  28. package/design-system/bridge.json +498 -0
  29. package/gulpfile.cjs +14 -0
  30. package/icons/alert.svg +1 -0
  31. package/icons/apps.svg +1 -0
  32. package/icons/archive.svg +1 -0
  33. package/icons/arrow-down.svg +1 -0
  34. package/icons/arrow-left.svg +1 -0
  35. package/icons/arrow-right.svg +1 -0
  36. package/icons/arrow-switch.svg +1 -0
  37. package/icons/arrow-up.svg +1 -0
  38. package/icons/bold.svg +1 -0
  39. package/icons/book.svg +1 -0
  40. package/icons/bookmark.svg +1 -0
  41. package/icons/briefcase.svg +1 -0
  42. package/icons/calendar.svg +1 -0
  43. package/icons/check-circle.svg +1 -0
  44. package/icons/check.svg +1 -0
  45. package/icons/checklist.svg +1 -0
  46. package/icons/chevron-down.svg +1 -0
  47. package/icons/chevron-left.svg +1 -0
  48. package/icons/chevron-right.svg +1 -0
  49. package/icons/chevron-up.svg +1 -0
  50. package/icons/clock.svg +1 -0
  51. package/icons/cloud.svg +1 -0
  52. package/icons/code.svg +1 -0
  53. package/icons/columns.svg +1 -0
  54. package/icons/comment-discussion.svg +1 -0
  55. package/icons/comment.svg +1 -0
  56. package/icons/copy.svg +1 -0
  57. package/icons/dash.svg +1 -0
  58. package/icons/device-desktop.svg +1 -0
  59. package/icons/device-mobile.svg +1 -0
  60. package/icons/download.svg +1 -0
  61. package/icons/eye-closed.svg +1 -0
  62. package/icons/eye.svg +1 -0
  63. package/icons/file-directory-open-fill.svg +1 -0
  64. package/icons/file-directory.svg +1 -0
  65. package/icons/file.svg +1 -0
  66. package/icons/gear.svg +1 -0
  67. package/icons/globe.svg +1 -0
  68. package/icons/graph.svg +1 -0
  69. package/icons/heading.svg +1 -0
  70. package/icons/history.svg +1 -0
  71. package/icons/home.svg +1 -0
  72. package/icons/image.svg +1 -0
  73. package/icons/info.svg +1 -0
  74. package/icons/italic.svg +1 -0
  75. package/icons/light-bulb.svg +1 -0
  76. package/icons/link-external.svg +1 -0
  77. package/icons/link.svg +1 -0
  78. package/icons/list-ordered.svg +1 -0
  79. package/icons/list-unordered.svg +1 -0
  80. package/icons/location.svg +1 -0
  81. package/icons/lock.svg +1 -0
  82. package/icons/mail.svg +1 -0
  83. package/icons/move-to-end.svg +1 -0
  84. package/icons/move-to-start.svg +1 -0
  85. package/icons/paperclip.svg +1 -0
  86. package/icons/pencil.svg +1 -0
  87. package/icons/people.svg +1 -0
  88. package/icons/person.svg +1 -0
  89. package/icons/play.svg +1 -0
  90. package/icons/plug.svg +1 -0
  91. package/icons/plus-circle.svg +1 -0
  92. package/icons/plus.svg +1 -0
  93. package/icons/question.svg +1 -0
  94. package/icons/quote.svg +1 -0
  95. package/icons/redo.svg +1 -0
  96. package/icons/report.svg +1 -0
  97. package/icons/rss.svg +1 -0
  98. package/icons/screen-full.svg +1 -0
  99. package/icons/search.svg +1 -0
  100. package/icons/share.svg +1 -0
  101. package/icons/shield-check.svg +1 -0
  102. package/icons/sign-out.svg +1 -0
  103. package/icons/sliders.svg +1 -0
  104. package/icons/smiley.svg +1 -0
  105. package/icons/sort-desc.svg +1 -0
  106. package/icons/star.svg +1 -0
  107. package/icons/stop.svg +1 -0
  108. package/icons/strikethrough.svg +1 -0
  109. package/icons/sync.svg +1 -0
  110. package/icons/table.svg +1 -0
  111. package/icons/tag.svg +1 -0
  112. package/icons/three-bars.svg +1 -0
  113. package/icons/thumbsup.svg +1 -0
  114. package/icons/trash.svg +1 -0
  115. package/icons/triangle-down.svg +1 -0
  116. package/icons/undo.svg +1 -0
  117. package/icons/upload.svg +1 -0
  118. package/icons/video.svg +1 -0
  119. package/icons/x-circle.svg +1 -0
  120. package/icons/x.svg +1 -0
  121. package/icons/zoom-in.svg +1 -0
  122. package/icons/zoom-out.svg +1 -0
  123. package/lib/PrimerDDDMap.js +147 -0
  124. package/lib/PrimerDesignSystem.js +43 -0
  125. package/lib/PrimerIcons.js +144 -0
  126. package/lib/PrimerTokens.js +97 -0
  127. package/lib/primer-theme.docs.json +43 -0
  128. package/lib/primer.ddd-map.json +1292 -0
  129. package/locales/primer-theme.en.json +9 -0
  130. package/package.json +56 -4
  131. package/primer-theme.js +495 -0
  132. package/test/primer-theme.test.js +73 -0
package/demo/site.json ADDED
@@ -0,0 +1,231 @@
1
+ {
2
+ "id": "b7d4e9a1-0000-4000-8000-primer000001",
3
+ "title": "Design system site",
4
+ "author": "",
5
+ "description": "A demo site for primer-theme in the layout of the Primer documentation, built from HAX blocks.",
6
+ "license": "by-sa",
7
+ "metadata": {
8
+ "author": {
9
+ "image": "",
10
+ "name": "",
11
+ "email": "",
12
+ "socialLink": ""
13
+ },
14
+ "site": {
15
+ "name": "primer-theme",
16
+ "logo": "",
17
+ "lang": "en",
18
+ "created": 1736889000,
19
+ "updated": 1736889000,
20
+ "git": {},
21
+ "version": "9.0.6",
22
+ "domain": "",
23
+ "static": {},
24
+ "settings": {
25
+ "pathauto": false,
26
+ "publishPagesOn": true,
27
+ "sw": false,
28
+ "forceUpgrade": false,
29
+ "lang": "",
30
+ "gaID": ""
31
+ },
32
+ "tags": ""
33
+ },
34
+ "theme": {
35
+ "element": "primer-theme",
36
+ "path": "@haxtheweb/primer-theme/primer-theme.js",
37
+ "name": "primer-theme",
38
+ "regions": {}
39
+ },
40
+ "node": {
41
+ "fields": {}
42
+ },
43
+ "build": {
44
+ "version": "6.0.1",
45
+ "structure": "flat",
46
+ "type": ""
47
+ }
48
+ },
49
+ "items": [
50
+ {
51
+ "id": "item-b7d4e9a1-getting-started",
52
+ "indent": 0,
53
+ "location": "pages/item-b7d4e9a1-getting-started/index.html",
54
+ "slug": "getting-started",
55
+ "order": 0,
56
+ "parent": null,
57
+ "title": "Getting started",
58
+ "description": "Primer is GitHub's design system. This demo shows its foundations and components through HAX blocks.",
59
+ "metadata": {
60
+ "created": 1736889000,
61
+ "updated": 1736889000,
62
+ "published": true,
63
+ "hideInMenu": false,
64
+ "locked": false,
65
+ "readtime": 1,
66
+ "tags": "",
67
+ "status": ""
68
+ }
69
+ },
70
+ {
71
+ "id": "item-b7d4e9a1-getting-started-developing",
72
+ "indent": 1,
73
+ "location": "pages/item-b7d4e9a1-getting-started-developing/index.html",
74
+ "slug": "getting-started/developing",
75
+ "order": 0,
76
+ "parent": "item-b7d4e9a1-getting-started",
77
+ "title": "Developing",
78
+ "description": "Use Primer as a whole theme, or keep your theme and pick Primer as the site's design system.",
79
+ "metadata": {
80
+ "created": 1736889000,
81
+ "updated": 1736889000,
82
+ "published": true,
83
+ "hideInMenu": false,
84
+ "locked": false,
85
+ "readtime": 1,
86
+ "tags": "",
87
+ "status": ""
88
+ }
89
+ },
90
+ {
91
+ "id": "item-b7d4e9a1-foundations",
92
+ "indent": 0,
93
+ "location": "pages/item-b7d4e9a1-foundations/index.html",
94
+ "slug": "foundations",
95
+ "order": 1,
96
+ "parent": null,
97
+ "title": "Foundations",
98
+ "description": "Primer's functional tokens describe what a color does (fgColor-muted, bgColor-accent-emphasis) rather than what it is.",
99
+ "metadata": {
100
+ "created": 1736889000,
101
+ "updated": 1736889000,
102
+ "published": true,
103
+ "hideInMenu": false,
104
+ "locked": false,
105
+ "readtime": 1,
106
+ "tags": "",
107
+ "status": ""
108
+ }
109
+ },
110
+ {
111
+ "id": "item-b7d4e9a1-foundations-color",
112
+ "indent": 1,
113
+ "location": "pages/item-b7d4e9a1-foundations-color/index.html",
114
+ "slug": "foundations/color",
115
+ "order": 0,
116
+ "parent": "item-b7d4e9a1-foundations",
117
+ "title": "Color",
118
+ "description": "Primer's colors are named by role and change with the color mode; named DDD colors take their light-mode values.",
119
+ "metadata": {
120
+ "created": 1736889000,
121
+ "updated": 1736889000,
122
+ "published": true,
123
+ "hideInMenu": false,
124
+ "locked": false,
125
+ "readtime": 1,
126
+ "tags": "",
127
+ "status": ""
128
+ }
129
+ },
130
+ {
131
+ "id": "item-b7d4e9a1-foundations-typography",
132
+ "indent": 1,
133
+ "location": "pages/item-b7d4e9a1-foundations-typography/index.html",
134
+ "slug": "foundations/typography",
135
+ "order": 1,
136
+ "parent": "item-b7d4e9a1-foundations",
137
+ "title": "Typography",
138
+ "description": "Primer sets text in Mona Sans with system font fallbacks, and code in the system monospace stack.",
139
+ "metadata": {
140
+ "created": 1736889000,
141
+ "updated": 1736889000,
142
+ "published": true,
143
+ "hideInMenu": false,
144
+ "locked": false,
145
+ "readtime": 1,
146
+ "tags": "",
147
+ "status": ""
148
+ }
149
+ },
150
+ {
151
+ "id": "item-b7d4e9a1-components",
152
+ "indent": 0,
153
+ "location": "pages/item-b7d4e9a1-components/index.html",
154
+ "slug": "components",
155
+ "order": 2,
156
+ "parent": null,
157
+ "title": "Components",
158
+ "description": "How HAX blocks look in Primer: buttons, banners, tables and learning checks.",
159
+ "metadata": {
160
+ "created": 1736889000,
161
+ "updated": 1736889000,
162
+ "published": true,
163
+ "hideInMenu": false,
164
+ "locked": false,
165
+ "readtime": 1,
166
+ "tags": "",
167
+ "status": ""
168
+ }
169
+ },
170
+ {
171
+ "id": "item-b7d4e9a1-components-button",
172
+ "indent": 1,
173
+ "location": "pages/item-b7d4e9a1-components-button/index.html",
174
+ "slug": "components/button",
175
+ "order": 0,
176
+ "parent": "item-b7d4e9a1-components",
177
+ "title": "Button",
178
+ "description": "Buttons start actions. Use the primary variant for the main action on a page.",
179
+ "metadata": {
180
+ "created": 1736889000,
181
+ "updated": 1736889000,
182
+ "published": true,
183
+ "hideInMenu": false,
184
+ "locked": false,
185
+ "readtime": 1,
186
+ "tags": "",
187
+ "status": ""
188
+ }
189
+ },
190
+ {
191
+ "id": "item-b7d4e9a1-components-banner",
192
+ "indent": 1,
193
+ "location": "pages/item-b7d4e9a1-components-banner/index.html",
194
+ "slug": "components/banner",
195
+ "order": 1,
196
+ "parent": "item-b7d4e9a1-components",
197
+ "title": "Banner",
198
+ "description": "Banners highlight important information. HAX's stop-note keeps its own icons and look under every design system.",
199
+ "metadata": {
200
+ "created": 1736889000,
201
+ "updated": 1736889000,
202
+ "published": true,
203
+ "hideInMenu": false,
204
+ "locked": false,
205
+ "readtime": 1,
206
+ "tags": "",
207
+ "status": ""
208
+ }
209
+ },
210
+ {
211
+ "id": "item-b7d4e9a1-accessibility",
212
+ "indent": 0,
213
+ "location": "pages/item-b7d4e9a1-accessibility/index.html",
214
+ "slug": "accessibility",
215
+ "order": 3,
216
+ "parent": null,
217
+ "title": "Accessibility",
218
+ "description": "Contrast, focus and meaning beyond color, checked for every block under the Primer bridge.",
219
+ "metadata": {
220
+ "created": 1736889000,
221
+ "updated": 1736889000,
222
+ "published": true,
223
+ "hideInMenu": false,
224
+ "locked": false,
225
+ "readtime": 1,
226
+ "tags": "",
227
+ "status": ""
228
+ }
229
+ }
230
+ ]
231
+ }