@supersoniks/concorde 5.0.5 → 5.1.1

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 (282) hide show
  1. package/.claude/launch.json +15 -0
  2. package/.claude/vite.http.config.mjs +7 -0
  3. package/.taste-skill/after/desktop-fold.jpg +0 -0
  4. package/.taste-skill/after/desktop-page-01.jpg +0 -0
  5. package/.taste-skill/after/desktop-page-02.jpg +0 -0
  6. package/.taste-skill/after/desktop-page-03.jpg +0 -0
  7. package/.taste-skill/after/mobile-fold.jpg +0 -0
  8. package/.taste-skill/after/mobile-page-01.jpg +0 -0
  9. package/.taste-skill/after/report.json +4103 -0
  10. package/.taste-skill/after/tablet-fold.jpg +0 -0
  11. package/.taste-skill/after/tablet-page-01.jpg +0 -0
  12. package/.taste-skill/after/tablet-page-02.jpg +0 -0
  13. package/.taste-skill/before/desktop-fold.jpg +0 -0
  14. package/.taste-skill/before/desktop-page-01.jpg +0 -0
  15. package/.taste-skill/before/desktop-page-02.jpg +0 -0
  16. package/.taste-skill/before/mobile-fold.jpg +0 -0
  17. package/.taste-skill/before/mobile-page-01.jpg +0 -0
  18. package/.taste-skill/before/report.json +2556 -0
  19. package/.taste-skill/before/tablet-fold.jpg +0 -0
  20. package/.taste-skill/before/tablet-page-01.jpg +0 -0
  21. package/.taste-skill/direction.json +510 -0
  22. package/.taste-skill/notes.md +84 -0
  23. package/.taste-skill/prod/desktop-fold.jpg +0 -0
  24. package/.taste-skill/prod/desktop-page-01.jpg +0 -0
  25. package/.taste-skill/prod/desktop-page-02.jpg +0 -0
  26. package/.taste-skill/prod/desktop-page-03.jpg +0 -0
  27. package/.taste-skill/prod/mobile-fold.jpg +0 -0
  28. package/.taste-skill/prod/mobile-page-01.jpg +0 -0
  29. package/.taste-skill/prod/mobile-page-02.jpg +0 -0
  30. package/.taste-skill/prod/report.json +1973 -0
  31. package/.taste-skill/prod/tablet-fold.jpg +0 -0
  32. package/.taste-skill/prod/tablet-page-01.jpg +0 -0
  33. package/.taste-skill/prod/tablet-page-02.jpg +0 -0
  34. package/.tmp-cem/custom-elements.json +13705 -0
  35. package/AUDIT.md +228 -0
  36. package/PLAN-AMELIORATION.md +220 -0
  37. package/build-infos.json +1 -1
  38. package/concorde-core.bundle.js +196 -196
  39. package/concorde-core.es.js +3854 -3572
  40. package/custom-elements-manifest.config.mjs +14 -0
  41. package/dist/concorde-core.bundle.js +196 -196
  42. package/dist/concorde-core.es.js +3854 -3572
  43. package/dist/img/archive/concorde-001-2cv.webp +0 -0
  44. package/dist/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
  45. package/dist/img/archive/concorde-red-arrows-2002.webm +0 -0
  46. package/dist/img/archive/credits.json +28 -0
  47. package/docs/assets/index-Bb-_LRyY.js +12280 -0
  48. package/docs/index.html +1 -1
  49. package/index.html +27 -63
  50. package/package.json +44 -3
  51. package/public/img/archive/concorde-001-2cv.webp +0 -0
  52. package/public/img/archive/concorde-red-arrows-2002-poster.jpg +0 -0
  53. package/public/img/archive/concorde-red-arrows-2002.webm +0 -0
  54. package/public/img/archive/credits.json +28 -0
  55. package/scripts/generate-sdui-catalog.mjs +250 -0
  56. package/scripts/generate-sdui-catalog.spec.ts +91 -0
  57. package/scripts/pre-build.mjs +15 -0
  58. package/src/core/components/functional/fetch/fetch.md +2 -2
  59. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
  60. package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
  61. package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
  62. package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
  63. package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
  64. package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
  65. package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
  66. package/src/core/components/functional/sdui/component-catalog.json +3103 -0
  67. package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
  68. package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
  69. package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
  70. package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
  71. package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
  72. package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
  73. package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
  74. package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
  75. package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
  76. package/src/core/components/functional/sdui/sdui.md +122 -0
  77. package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
  78. package/src/core/components/functional/sdui/sdui.ts +442 -34
  79. package/src/core/components/functional/sdui/types.ts +49 -0
  80. package/src/core/components/ui/modal/modal.ts +14 -11
  81. package/src/docs/_getting-started/components.md +5 -0
  82. package/src/docs/_getting-started/theming.md +2 -2
  83. package/src/docs/code.ts +88 -75
  84. package/src/docs/components/docs-demo-sources.ts +16 -8
  85. package/src/docs/components/docs-lit-demo.ts +19 -37
  86. package/src/docs/docs.ts +5 -0
  87. package/src/docs/example/docs-boarding-pass-demo.ts +134 -0
  88. package/src/docs/example/docs-provider-keys.ts +12 -0
  89. package/src/docs/header/header.ts +233 -69
  90. package/src/docs/home/catalog.ts +44 -0
  91. package/src/docs/home/home.ts +513 -0
  92. package/src/docs/home/mach-stage.ts +389 -0
  93. package/src/docs/layout.ts +3 -1
  94. package/src/docs/navigation/components-index.ts +56 -0
  95. package/src/docs/navigation/navigation.ts +240 -232
  96. package/src/docs/navigation/pager.ts +67 -0
  97. package/src/docs/navigation/toc.ts +98 -0
  98. package/src/docs/search/docs-search.json +330 -20
  99. package/src/docs/search/markdown-renderer.ts +11 -3
  100. package/src/docs/shiki/index.ts +109 -0
  101. package/src/docs/tailwind/css/base/scrollbar.css +22 -0
  102. package/src/docs/tailwind/css/base/theme.css +96 -0
  103. package/src/docs/tailwind/css/base/typography.css +4 -0
  104. package/src/docs/tailwind/css/docs/boarding-pass.css +65 -0
  105. package/src/docs/tailwind/css/docs/content.css +32 -0
  106. package/src/docs/tailwind/css/docs/page.css +10 -0
  107. package/src/docs/tailwind/css/docs.css +9 -0
  108. package/src/docs/tailwind/css/home/hero.css +210 -0
  109. package/src/docs/tailwind/css/home/motion.css +84 -0
  110. package/src/docs/tailwind/css/home/sections.css +416 -0
  111. package/src/docs/tailwind/css/tailwind.css +7 -185
  112. package/src/tsconfig.json +113 -2
  113. package/src/tsconfig.tsbuildinfo +1 -1
  114. package/tailwind.config.js +8 -4
  115. package/docs/assets/index-wVZpLVYW.js +0 -12122
  116. package/docs/crawl/core/components/functional/date/date.html +0 -190
  117. package/docs/crawl/core/components/functional/fetch/fetch.html +0 -109
  118. package/docs/crawl/core/components/functional/if/if.html +0 -27
  119. package/docs/crawl/core/components/functional/jsonata/jsonata.html +0 -79
  120. package/docs/crawl/core/components/functional/list/list.html +0 -70
  121. package/docs/crawl/core/components/functional/mix/mix.html +0 -45
  122. package/docs/crawl/core/components/functional/queue/queue.html +0 -96
  123. package/docs/crawl/core/components/functional/router/router.html +0 -106
  124. package/docs/crawl/core/components/functional/sdui/sdui.html +0 -269
  125. package/docs/crawl/core/components/functional/states/states.html +0 -66
  126. package/docs/crawl/core/components/functional/submit/submit.html +0 -160
  127. package/docs/crawl/core/components/functional/subscriber/subscriber.html +0 -67
  128. package/docs/crawl/core/components/functional/value/value.html +0 -51
  129. package/docs/crawl/core/components/ui/alert/alert.html +0 -211
  130. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +0 -131
  131. package/docs/crawl/core/components/ui/badge/badge.html +0 -197
  132. package/docs/crawl/core/components/ui/button/button.html +0 -150
  133. package/docs/crawl/core/components/ui/captcha/captcha.html +0 -112
  134. package/docs/crawl/core/components/ui/card/card.html +0 -253
  135. package/docs/crawl/core/components/ui/divider/divider.html +0 -144
  136. package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +0 -73
  137. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +0 -266
  138. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +0 -122
  139. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +0 -121
  140. package/docs/crawl/core/components/ui/form/input/input.html +0 -109
  141. package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +0 -38
  142. package/docs/crawl/core/components/ui/form/radio/radio.html +0 -56
  143. package/docs/crawl/core/components/ui/form/select/select.html +0 -73
  144. package/docs/crawl/core/components/ui/form/switch/switch.html +0 -56
  145. package/docs/crawl/core/components/ui/form/textarea/textarea.html +0 -59
  146. package/docs/crawl/core/components/ui/group/group.html +0 -104
  147. package/docs/crawl/core/components/ui/icon/icon.html +0 -222
  148. package/docs/crawl/core/components/ui/image/image.html +0 -298
  149. package/docs/crawl/core/components/ui/link/link.html +0 -100
  150. package/docs/crawl/core/components/ui/loader/loader.html +0 -124
  151. package/docs/crawl/core/components/ui/menu/menu.html +0 -394
  152. package/docs/crawl/core/components/ui/modal/modal.html +0 -342
  153. package/docs/crawl/core/components/ui/pop/pop.html +0 -296
  154. package/docs/crawl/core/components/ui/progress/progress.html +0 -131
  155. package/docs/crawl/core/components/ui/table/table.html +0 -545
  156. package/docs/crawl/core/components/ui/theme/theme.html +0 -131
  157. package/docs/crawl/core/components/ui/toast/toast.html +0 -233
  158. package/docs/crawl/core/components/ui/tooltip/tooltip.html +0 -140
  159. package/docs/crawl/docs/_core-concept/dataFlow.html +0 -177
  160. package/docs/crawl/docs/_core-concept/overview.html +0 -66
  161. package/docs/crawl/docs/_core-concept/subscriber.html +0 -75
  162. package/docs/crawl/docs/_decorators/ancestor-attribute.html +0 -117
  163. package/docs/crawl/docs/_decorators/auto-subscribe.html +0 -202
  164. package/docs/crawl/docs/_decorators/bind.html +0 -141
  165. package/docs/crawl/docs/_decorators/get.html +0 -149
  166. package/docs/crawl/docs/_decorators/handle.html +0 -165
  167. package/docs/crawl/docs/_decorators/on-assign.html +0 -355
  168. package/docs/crawl/docs/_decorators/patch.html +0 -78
  169. package/docs/crawl/docs/_decorators/post.html +0 -139
  170. package/docs/crawl/docs/_decorators/publish.html +0 -61
  171. package/docs/crawl/docs/_decorators/put.html +0 -78
  172. package/docs/crawl/docs/_decorators/subscribe.html +0 -109
  173. package/docs/crawl/docs/_decorators/wait-for-ancestors.html +0 -137
  174. package/docs/crawl/docs/_directives/sub.html +0 -93
  175. package/docs/crawl/docs/_getting-started/ai-agents.html +0 -173
  176. package/docs/crawl/docs/_getting-started/concorde-manual-install.html +0 -100
  177. package/docs/crawl/docs/_getting-started/concorde-outside.html +0 -58
  178. package/docs/crawl/docs/_getting-started/create-a-component.html +0 -111
  179. package/docs/crawl/docs/_getting-started/my-first-component.html +0 -189
  180. package/docs/crawl/docs/_getting-started/my-first-subscriber.html +0 -110
  181. package/docs/crawl/docs/_getting-started/pubsub.html +0 -62
  182. package/docs/crawl/docs/_getting-started/start.html +0 -76
  183. package/docs/crawl/docs/_getting-started/theming.html +0 -333
  184. package/docs/crawl/docs/_misc/api-configuration.html +0 -149
  185. package/docs/crawl/docs/_misc/dataProviderKey.html +0 -135
  186. package/docs/crawl/docs/_misc/docs-mock-api.html +0 -158
  187. package/docs/crawl/docs/_misc/dynamic-path.html +0 -180
  188. package/docs/crawl/docs/_misc/endpoint.html +0 -50
  189. package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +0 -138
  190. package/docs/crawl/docs/_misc/html-integration.html +0 -48
  191. package/docs/crawl/hubs/decorators.html +0 -547
  192. package/docs/crawl/hubs/form-components.html +0 -381
  193. package/docs/crawl/hubs/remote-data.html +0 -452
  194. package/docs/crawl/index.html +0 -102
  195. package/docs/llms-full.txt +0 -7008
  196. package/docs/llms.txt +0 -97
  197. package/docs/sitemap.xml +0 -240
  198. package/docs/src/core/components/functional/date/date.md +0 -290
  199. package/docs/src/core/components/functional/fetch/fetch.md +0 -125
  200. package/docs/src/core/components/functional/if/if.md +0 -9
  201. package/docs/src/core/components/functional/jsonata/jsonata.md +0 -56
  202. package/docs/src/core/components/functional/list/list.md +0 -65
  203. package/docs/src/core/components/functional/mix/mix.md +0 -41
  204. package/docs/src/core/components/functional/queue/queue.md +0 -72
  205. package/docs/src/core/components/functional/router/router.md +0 -94
  206. package/docs/src/core/components/functional/sdui/default-library.json +0 -108
  207. package/docs/src/core/components/functional/sdui/example.json +0 -99
  208. package/docs/src/core/components/functional/sdui/sdui.md +0 -356
  209. package/docs/src/core/components/functional/states/states.md +0 -87
  210. package/docs/src/core/components/functional/submit/submit.md +0 -114
  211. package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
  212. package/docs/src/core/components/functional/value/value.md +0 -35
  213. package/docs/src/core/components/ui/alert/alert.md +0 -196
  214. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
  215. package/docs/src/core/components/ui/badge/badge.md +0 -188
  216. package/docs/src/core/components/ui/button/button.md +0 -183
  217. package/docs/src/core/components/ui/captcha/captcha.md +0 -71
  218. package/docs/src/core/components/ui/card/card.md +0 -215
  219. package/docs/src/core/components/ui/divider/divider.md +0 -129
  220. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -77
  221. package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -205
  222. package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -100
  223. package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -119
  224. package/docs/src/core/components/ui/form/input/input.md +0 -142
  225. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -29
  226. package/docs/src/core/components/ui/form/radio/radio.md +0 -57
  227. package/docs/src/core/components/ui/form/select/select.md +0 -71
  228. package/docs/src/core/components/ui/form/switch/switch.md +0 -57
  229. package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
  230. package/docs/src/core/components/ui/group/group.md +0 -75
  231. package/docs/src/core/components/ui/icon/icon.md +0 -214
  232. package/docs/src/core/components/ui/icon/icons.json +0 -1
  233. package/docs/src/core/components/ui/image/image.md +0 -233
  234. package/docs/src/core/components/ui/link/link.md +0 -81
  235. package/docs/src/core/components/ui/loader/loader.md +0 -112
  236. package/docs/src/core/components/ui/menu/menu.md +0 -370
  237. package/docs/src/core/components/ui/modal/modal.md +0 -235
  238. package/docs/src/core/components/ui/pop/pop.md +0 -294
  239. package/docs/src/core/components/ui/progress/progress.md +0 -109
  240. package/docs/src/core/components/ui/table/table.md +0 -431
  241. package/docs/src/core/components/ui/theme/theme.md +0 -122
  242. package/docs/src/core/components/ui/toast/toast.md +0 -216
  243. package/docs/src/core/components/ui/tooltip/tooltip.md +0 -124
  244. package/docs/src/docs/_core-concept/dataFlow.md +0 -88
  245. package/docs/src/docs/_core-concept/overview.md +0 -57
  246. package/docs/src/docs/_core-concept/subscriber.md +0 -75
  247. package/docs/src/docs/_decorators/ancestor-attribute.md +0 -128
  248. package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
  249. package/docs/src/docs/_decorators/bind.md +0 -167
  250. package/docs/src/docs/_decorators/get.md +0 -162
  251. package/docs/src/docs/_decorators/handle.md +0 -175
  252. package/docs/src/docs/_decorators/on-assign.md +0 -390
  253. package/docs/src/docs/_decorators/patch.md +0 -70
  254. package/docs/src/docs/_decorators/post.md +0 -146
  255. package/docs/src/docs/_decorators/publish.md +0 -55
  256. package/docs/src/docs/_decorators/put.md +0 -70
  257. package/docs/src/docs/_decorators/subscribe.md +0 -100
  258. package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
  259. package/docs/src/docs/_directives/sub.md +0 -91
  260. package/docs/src/docs/_getting-started/ai-agents.md +0 -76
  261. package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
  262. package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
  263. package/docs/src/docs/_getting-started/create-a-component.md +0 -139
  264. package/docs/src/docs/_getting-started/my-first-component.md +0 -236
  265. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
  266. package/docs/src/docs/_getting-started/pubsub.md +0 -37
  267. package/docs/src/docs/_getting-started/start.md +0 -47
  268. package/docs/src/docs/_getting-started/theming.md +0 -253
  269. package/docs/src/docs/_misc/api-configuration.md +0 -81
  270. package/docs/src/docs/_misc/dataProviderKey.md +0 -168
  271. package/docs/src/docs/_misc/docs-mock-api.md +0 -63
  272. package/docs/src/docs/_misc/dynamic-path.md +0 -71
  273. package/docs/src/docs/_misc/endpoint.md +0 -45
  274. package/docs/src/docs/_misc/formelement-subscriber-removal.md +0 -115
  275. package/docs/src/docs/_misc/html-integration.md +0 -15
  276. package/docs/src/docs/search/docs-search.json +0 -12242
  277. package/docs/src/tag-list.json +0 -1
  278. package/docs/src/tsconfig-model.json +0 -23
  279. package/docs/src/tsconfig.json +0 -1242
  280. package/src/docs/prism/index.ts +0 -6
  281. package/src/docs/prism/prism.css +0 -158
  282. package/src/docs/prism/prism.js +0 -1022
@@ -1,4 +1,4 @@
1
- import { html, LitElement, nothing } from "lit";
1
+ import { css, html, LitElement, nothing } from "lit";
2
2
  import { customElement, state } from "lit/decorators.js";
3
3
  import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
4
4
  import { tailwind } from "../tailwind";
@@ -7,11 +7,95 @@ import { Theme } from "@supersoniks/concorde/core/components/ui/theme/theme";
7
7
  const tagName = "sonic-docs-header"; // For Astro.build
8
8
  @customElement(tagName)
9
9
  export class SonicComponent extends Subscriber(LitElement) {
10
- static styles = [tailwind];
10
+ static styles = [
11
+ tailwind,
12
+ css`
13
+ /* paint the page gutters too, so content never shows beside the sticky bar */
14
+ .header-bar {
15
+ box-shadow:
16
+ -5rem 0 0 var(--sc-base),
17
+ 5rem 0 0 var(--sc-base);
18
+ }
19
+ /* the rule under the bar runs on through the gutters, edge to edge */
20
+ .header-bar::after {
21
+ content: "";
22
+ position: absolute;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: -0.18rem;
26
+ height: 0.18rem;
27
+ background: currentColor;
28
+ box-shadow:
29
+ -5rem 0 0 currentColor,
30
+ 5rem 0 0 currentColor;
31
+ }
32
+ .logo-plane path {
33
+ transform-box: view-box;
34
+ transform-origin: 33px 33px;
35
+ /* takes off every 6s (flight in the first ~1.1s, then parked) */
36
+ animation: takeoff 6s cubic-bezier(0.5, 0, 0.3, 1) 0.5s infinite;
37
+ }
38
+ .logo:hover .logo-plane path,
39
+ .logo:focus-visible .logo-plane path {
40
+ animation: takeoff-again 1.1s cubic-bezier(0.5, 0, 0.3, 1);
41
+ }
42
+ @keyframes takeoff-again {
43
+ 12% {
44
+ transform: translateY(3px);
45
+ }
46
+ 50% {
47
+ transform: translateY(-64px) scale(0.85);
48
+ }
49
+ 50.01% {
50
+ transform: translateY(64px) scale(0.85);
51
+ }
52
+ }
53
+ @keyframes takeoff {
54
+ 0% {
55
+ transform: translateY(0);
56
+ }
57
+ 2% {
58
+ transform: translateY(3px);
59
+ }
60
+ 9% {
61
+ transform: translateY(-64px) scale(0.85);
62
+ }
63
+ 9.01% {
64
+ transform: translateY(64px) scale(0.85);
65
+ }
66
+ 18%,
67
+ 100% {
68
+ transform: translateY(0);
69
+ }
70
+ }
71
+ @media (prefers-reduced-motion: reduce) {
72
+ .logo-plane path,
73
+ .logo:hover .logo-plane path {
74
+ animation: none;
75
+ }
76
+ }
77
+ `,
78
+ ];
11
79
 
12
80
  @state() theme: "dark" | "light" = "light";
13
81
  @state() searchVisible = false;
14
82
 
83
+ /** Publishes the bar's height as --docs-header-h so sticky panels sit right under it. */
84
+ private headerResize = new ResizeObserver(([entry]) => {
85
+ const h = Math.round(entry.target.getBoundingClientRect().height);
86
+ document.documentElement.style.setProperty("--docs-header-h", `${h}px`);
87
+ });
88
+
89
+ firstUpdated() {
90
+ const bar = this.shadowRoot?.querySelector(".header-bar");
91
+ if (bar) this.headerResize.observe(bar);
92
+ }
93
+
94
+ disconnectedCallback() {
95
+ this.headerResize.disconnect();
96
+ super.disconnectedCallback();
97
+ }
98
+
15
99
  connectedCallback() {
16
100
  this.handleColorScheme();
17
101
  super.connectedCallback();
@@ -36,9 +120,10 @@ export class SonicComponent extends Subscriber(LitElement) {
36
120
  }
37
121
  });
38
122
 
39
- // on hash change, hide search
123
+ // on hash change, hide search and mobile navigation
40
124
  window.addEventListener("hashchange", () => {
41
125
  this.hideSearch();
126
+ this.closeNavigation();
42
127
  });
43
128
  }
44
129
 
@@ -63,6 +148,17 @@ export class SonicComponent extends Subscriber(LitElement) {
63
148
  this.handleColorScheme();
64
149
  }
65
150
 
151
+ openNavigation() {
152
+ this.shadowRoot
153
+ ?.querySelector<HTMLElement & { show(): void }>("#mobile-nav")
154
+ ?.show();
155
+ }
156
+ closeNavigation() {
157
+ this.shadowRoot
158
+ ?.querySelector<HTMLElement & { hide(): void }>("#mobile-nav")
159
+ ?.hide();
160
+ }
161
+
66
162
  hideSearch() {
67
163
  this.searchVisible = false;
68
164
  }
@@ -72,12 +168,22 @@ export class SonicComponent extends Subscriber(LitElement) {
72
168
 
73
169
  render() {
74
170
  return html`<div
75
- class="flex items-center gap-4 border-b-[.18rem] text-content border-current py-3 sticky top-0 z-40 bg-neutral-0"
171
+ class="flex items-center gap-2 sm:gap-4 border-b-[.18rem] text-content border-current py-3 sticky top-0 z-40 bg-neutral-0 header-bar"
76
172
  >
77
- <div class="">
78
- <sonic-link href="/" class="flex items-end gap-x-1">
173
+ <sonic-button
174
+ class="lg:hidden"
175
+ shape="circle"
176
+ variant="ghost"
177
+ icon
178
+ data-aria-label="Open navigation"
179
+ @click=${() => this.openNavigation()}
180
+ >
181
+ <sonic-icon name="menu" library="iconoir"></sonic-icon>
182
+ </sonic-button>
183
+ <div class="min-w-0">
184
+ <sonic-link href="/" class="logo flex items-end gap-x-1">
79
185
  <svg
80
- class="size-[2.4rem] inline-block rotate-[55deg] "
186
+ class="size-8 sm:size-[2.4rem] inline-block rotate-[55deg]"
81
187
  viewBox="0 0 66 66"
82
188
  fill="none"
83
189
  xmlns="http://www.w3.org/2000/svg"
@@ -88,47 +194,60 @@ export class SonicComponent extends Subscriber(LitElement) {
88
194
  r="30"
89
195
  fill="var(--sc-base-content, #000)"
90
196
  />
91
- <path
92
- d="M33.2499 62.03C33.8799 59.24 34.26 56.17 34.39 53.08C34.57 52.78 34.9099 52.6 35.2599 52.64H35.39C35.48 52.64 35.5799 52.64 35.6899 52.64H35.7599C35.7599 52.64 35.7999 52.64 35.8299 52.64C36.2499 52.62 36.6799 52.58 36.9099 52.56C36.9399 52.56 36.9599 52.56 36.9799 52.56C37.0099 52.56 37.0299 52.56 37.0499 52.56H37.0899L37.2099 51.93H37.4799L37.5799 52.4L37.6899 52.49H39.2699L39.39 52.38L39.5099 51.93H39.7899L39.8399 52.21L39.9999 52.29L45.2099 51.86L46.2799 51.29C46.2799 51.29 46.2799 50.85 46.2399 50.25V50.18C46.2399 50.18 46.2399 50.13 46.2399 50.11C46.2099 49.62 46.1399 49.13 46.0399 48.65C45.7899 47.45 45.29 46 42.2 41.58C39.11 37.16 38.04 35.52 35.89 27.63C35.85 27.48 35.8199 27.35 35.7899 27.2C35.1399 24.53 34.6899 22.95 34.5199 22.38V10.89C34.4999 9.60996 34.3999 8.33996 34.2099 7.07996C34.0499 5.97996 33.6099 4.89996 33.3499 3.95996H32.6299C32.3599 4.89996 31.9299 5.97996 31.7699 7.06996C31.5799 8.33996 31.4799 9.60996 31.4599 10.89V22.38C31.2899 22.95 30.8299 24.52 30.1899 27.2C30.1599 27.35 30.1199 27.49 30.0899 27.63C27.9499 35.52 26.8699 37.16 23.7799 41.58C20.6899 46 20.1899 47.45 19.9399 48.65C19.8399 49.13 19.7799 49.62 19.7399 50.11C19.7399 50.13 19.7399 50.16 19.7399 50.18V50.25C19.6999 50.85 19.7 51.29 19.7 51.29L20.7699 51.86L25.9799 52.29L26.14 52.21L26.1899 51.93H26.4799L26.5999 52.38L26.7299 52.49H28.2999L28.4099 52.4L28.5099 51.93H28.7699L28.89 52.56H28.9399C28.9399 52.56 28.9799 52.56 29.0099 52.56C29.0299 52.56 29.0499 52.56 29.0799 52.56C29.3099 52.58 29.7499 52.63 30.1599 52.64C30.1799 52.64 30.2099 52.64 30.2299 52.64H30.2999C30.4099 52.64 30.5099 52.64 30.5999 52.64H30.7299C31.0799 52.6 31.4299 52.77 31.6099 53.08C31.7299 56.17 32.1099 59.24 32.7399 62.03H33.2499Z"
93
- fill="var(--sc-base, #fff)"
94
- />
197
+ <clipPath id="logo-circle">
198
+ <circle cx="33" cy="33" r="30" />
199
+ </clipPath>
200
+ <g class="logo-plane" clip-path="url(#logo-circle)">
201
+ <path
202
+ d="M33.2499 62.03C33.8799 59.24 34.26 56.17 34.39 53.08C34.57 52.78 34.9099 52.6 35.2599 52.64H35.39C35.48 52.64 35.5799 52.64 35.6899 52.64H35.7599C35.7599 52.64 35.7999 52.64 35.8299 52.64C36.2499 52.62 36.6799 52.58 36.9099 52.56C36.9399 52.56 36.9599 52.56 36.9799 52.56C37.0099 52.56 37.0299 52.56 37.0499 52.56H37.0899L37.2099 51.93H37.4799L37.5799 52.4L37.6899 52.49H39.2699L39.39 52.38L39.5099 51.93H39.7899L39.8399 52.21L39.9999 52.29L45.2099 51.86L46.2799 51.29C46.2799 51.29 46.2799 50.85 46.2399 50.25V50.18C46.2399 50.18 46.2399 50.13 46.2399 50.11C46.2099 49.62 46.1399 49.13 46.0399 48.65C45.7899 47.45 45.29 46 42.2 41.58C39.11 37.16 38.04 35.52 35.89 27.63C35.85 27.48 35.8199 27.35 35.7899 27.2C35.1399 24.53 34.6899 22.95 34.5199 22.38V10.89C34.4999 9.60996 34.3999 8.33996 34.2099 7.07996C34.0499 5.97996 33.6099 4.89996 33.3499 3.95996H32.6299C32.3599 4.89996 31.9299 5.97996 31.7699 7.06996C31.5799 8.33996 31.4799 9.60996 31.4599 10.89V22.38C31.2899 22.95 30.8299 24.52 30.1899 27.2C30.1599 27.35 30.1199 27.49 30.0899 27.63C27.9499 35.52 26.8699 37.16 23.7799 41.58C20.6899 46 20.1899 47.45 19.9399 48.65C19.8399 49.13 19.7799 49.62 19.7399 50.11C19.7399 50.13 19.7399 50.16 19.7399 50.18V50.25C19.6999 50.85 19.7 51.29 19.7 51.29L20.7699 51.86L25.9799 52.29L26.14 52.21L26.1899 51.93H26.4799L26.5999 52.38L26.7299 52.49H28.2999L28.4099 52.4L28.5099 51.93H28.7699L28.89 52.56H28.9399C28.9399 52.56 28.9799 52.56 29.0099 52.56C29.0299 52.56 29.0499 52.56 29.0799 52.56C29.3099 52.58 29.7499 52.63 30.1599 52.64C30.1799 52.64 30.2099 52.64 30.2299 52.64H30.2999C30.4099 52.64 30.5099 52.64 30.5999 52.64H30.7299C31.0799 52.6 31.4299 52.77 31.6099 53.08C31.7299 56.17 32.1099 59.24 32.7399 62.03H33.2499Z"
203
+ fill="var(--sc-base, #fff)"
204
+ />
205
+ </g>
95
206
  </svg>
96
207
 
97
208
  <span
98
- class="font-headings text-4xl leading-none inline-block italic font-semibold"
209
+ class="font-headings text-3xl sm:text-4xl leading-none inline-block italic font-semibold"
99
210
  >concorde</span
100
211
  >
101
212
  </sonic-link>
102
213
  </div>
103
214
 
104
- <div class="ml-auto flex gap-x-3 ">
215
+ <div class="ml-auto flex items-center gap-x-1 sm:gap-x-3">
105
216
  <sonic-button
106
- class="lg:hidden"
107
- shape="circle"
108
- icon
109
- @click=${() => (this.searchVisible = !this.searchVisible)}
217
+ class="hidden md:block"
218
+ variant="ghost"
219
+ size="sm"
220
+ href="#docs/_getting-started/start.md/start"
221
+ >Docs</sonic-button
110
222
  >
111
- <sonic-icon name="magnifying-glass" library="custom"></sonic-icon>
112
- </sonic-button>
113
223
  <sonic-button
114
- @click=${() => (this.searchVisible = !this.searchVisible)}
115
- class="hidden lg:block lg:w-[19rem]"
116
- shape="block"
117
- align="left"
224
+ class="hidden md:block"
225
+ variant="ghost"
226
+ size="sm"
227
+ href="#docs/_getting-started/components.md/components"
228
+ >Components</sonic-button
229
+ >
230
+ <sonic-button
231
+ variant="ghost"
232
+ shape="circle"
233
+ icon
234
+ target="_blank"
235
+ data-aria-label="npm package"
236
+ href="https://www.npmjs.com/package/@supersoniks/concorde"
118
237
  >
119
- Search...
120
238
  <sonic-icon
121
- name="magnifying-glass"
122
- library="custom"
123
- slot="prefix"
239
+ name="npm"
240
+ library="fontAwesome"
241
+ prefix="brands"
124
242
  ></sonic-icon>
125
243
  </sonic-button>
126
-
127
244
  <sonic-pop>
128
245
  <sonic-button shape="circle" variant="ghost" icon>
129
- ${this.theme == "light"
130
- ? html`<sonic-icon name="sun" library="custom"></sonic-icon>`
131
- : html`<sonic-icon name="moon" library="custom"></sonic-icon>`}
246
+ ${
247
+ this.theme == "light"
248
+ ? html`<sonic-icon name="sun" library="custom"></sonic-icon>`
249
+ : html`<sonic-icon name="moon" library="custom"></sonic-icon>`
250
+ }
132
251
  </sonic-button>
133
252
 
134
253
  <sonic-menu slot="content">
@@ -156,67 +275,112 @@ export class SonicComponent extends Subscriber(LitElement) {
156
275
  </sonic-menu-item>
157
276
  </sonic-menu>
158
277
  </sonic-pop>
278
+ <sonic-button
279
+ class="lg:hidden"
280
+ shape="circle"
281
+ variant="ghost"
282
+ icon
283
+ @click=${() => (this.searchVisible = !this.searchVisible)}
284
+ >
285
+ <sonic-icon name="magnifying-glass" library="custom"></sonic-icon>
286
+ </sonic-button>
287
+ <sonic-button
288
+ @click=${() => (this.searchVisible = !this.searchVisible)}
289
+ class="hidden lg:block lg:w-[19rem]"
290
+ shape="block"
291
+ align="left"
292
+ >
293
+ Search...
294
+ <sonic-icon
295
+ name="magnifying-glass"
296
+ library="custom"
297
+ slot="prefix"
298
+ ></sonic-icon>
299
+ </sonic-button>
159
300
  </div>
160
301
  </div>
161
302
 
162
- ${this.searchVisible
163
- ? html`
164
- <div
165
- ${animate({
166
- keyframeOptions: {
167
- duration: 250,
168
- },
169
- in: [
170
- {
171
- opacity: 0,
172
- },
173
- ],
174
- out: [
175
- {
176
- opacity: 0,
177
- },
178
- ],
179
- stabilizeOut: true,
180
- })}
181
- class="fixed top-0 w-full left-0 z-[3000] pt-[20vh] flex items-center justify-center "
182
- >
183
- <div
184
- @click=${() => this.hideSearch()}
185
- class="bg-neutral-0 dark:bg-neutral-300 opacity-90 fixed top-0 left-0 w-full h-full "
186
- ></div>
303
+ <sonic-modal
304
+ id="mobile-nav"
305
+ effect="fade"
306
+ maxWidth="min(92vw, 22rem)"
307
+ maxHeight="88vh"
308
+ closeOnLocationChange
309
+ >
310
+ <sonic-modal-title>Documentation</sonic-modal-title>
311
+ <sonic-modal-content>
312
+ <docs-navigation
313
+ class="block"
314
+ @click=${(e: Event) => {
315
+ const onItem = e
316
+ .composedPath()
317
+ .some((n) => (n as HTMLElement).tagName === "SONIC-MENU-ITEM");
318
+ if (onItem) this.closeNavigation();
319
+ }}
320
+ ></docs-navigation>
321
+ </sonic-modal-content>
322
+ </sonic-modal>
187
323
 
324
+ ${
325
+ this.searchVisible
326
+ ? html`
188
327
  <div
189
328
  ${animate({
190
329
  keyframeOptions: {
191
330
  duration: 250,
192
- easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
193
331
  },
194
332
  in: [
195
333
  {
196
- transform: "translateY(1rem) scale(1.05)",
197
334
  opacity: 0,
198
335
  },
199
336
  ],
200
337
  out: [
201
338
  {
202
- transform: "scale(.90) ",
203
339
  opacity: 0,
204
- duration: 3000,
205
- easing: `ease-in-out`,
206
340
  },
207
341
  ],
208
342
  stabilizeOut: true,
209
343
  })}
210
- class="relative z-20 max-w-[30rem] lg:max-w-[35rem] w-full block "
344
+ class="fixed top-0 w-full left-0 z-[3000] pt-[20vh] flex items-center justify-center "
211
345
  >
212
- <docs-search
213
- setFocus
214
- class="max-w-[30rem] lg:max-w-[35rem] w-full block"
346
+ <div
347
+ @click=${() => this.hideSearch()}
348
+ class="bg-neutral-0 dark:bg-neutral-300 opacity-90 fixed top-0 left-0 w-full h-full "
349
+ ></div>
350
+
351
+ <div
352
+ ${animate({
353
+ keyframeOptions: {
354
+ duration: 250,
355
+ easing: `cubic-bezier(0.250, 0.250, 0.420, 1.225)`,
356
+ },
357
+ in: [
358
+ {
359
+ transform: "translateY(1rem) scale(1.05)",
360
+ opacity: 0,
361
+ },
362
+ ],
363
+ out: [
364
+ {
365
+ transform: "scale(.90) ",
366
+ opacity: 0,
367
+ duration: 3000,
368
+ easing: `ease-in-out`,
369
+ },
370
+ ],
371
+ stabilizeOut: true,
372
+ })}
373
+ class="relative z-20 max-w-[30rem] lg:max-w-[35rem] w-full block "
215
374
  >
216
- </docs-search>
375
+ <docs-search
376
+ setFocus
377
+ class="max-w-[30rem] lg:max-w-[35rem] w-full block"
378
+ >
379
+ </docs-search>
380
+ </div>
217
381
  </div>
218
- </div>
219
- `
220
- : nothing}`;
382
+ `
383
+ : nothing
384
+ }`;
221
385
  }
222
386
  }
@@ -0,0 +1,44 @@
1
+ /** One-line notes for the home index, keyed by sidebar label (taken from each component page). */
2
+ export const COMPONENT_NOTES: Record<string, { tag: string; note: string }> = {
3
+ Alert: { tag: "sonic-alert", note: "Inline feedback: errors, confirmations, contextual help." },
4
+ Badge: { tag: "sonic-badge", note: "Compact label for a status, a count or a category." },
5
+ Button: { tag: "sonic-button", note: "Action or link, with types, variants, sizes and loading." },
6
+ Captcha: { tag: "sonic-captcha", note: "ALTCHA widget wired to the surrounding form data." },
7
+ Card: { tag: "sonic-card", note: "Groups related content on a padded, themed surface." },
8
+ Checkbox: { tag: "sonic-checkbox", note: "Boolean or multi-value field that publishes to a form." },
9
+ Divider: { tag: "sonic-divider", note: "Horizontal or vertical separator, with an optional label." },
10
+ Fieldset: { tag: "sonic-fieldset", note: "Groups related controls under a legend." },
11
+ "Form actions": { tag: "sonic-form-actions", note: "Lays out submit, cancel and other form footer controls." },
12
+ "Form layout": { tag: "sonic-form-layout", note: "Responsive grid for form fields with steady spacing." },
13
+ Group: { tag: "sonic-group", note: "Joins buttons, inputs and selects into one row." },
14
+ Icon: { tag: "sonic-icon", note: "Inline SVG icons from the core set or a CDN library." },
15
+ Image: { tag: "sonic-image", note: "Responsive image with ratio, cover fit and load transition." },
16
+ Input: { tag: "sonic-input", note: "Text field that publishes its value to a form provider." },
17
+ "Input autocomplete": { tag: "sonic-input-autocomplete", note: "Field with suggestions fed by a queue." },
18
+ Link: { tag: "sonic-link", note: "Navigation for routes, anchors and external URLs." },
19
+ Loader: { tag: "sonic-loader", note: "Loading animation, inline or as an overlay." },
20
+ Menu: { tag: "sonic-menu", note: "Row or column of menu items for navigation or actions." },
21
+ Modal: { tag: "sonic-modal", note: "Dialog overlay with title, content and actions." },
22
+ Pop: { tag: "sonic-pop", note: "Floating panel anchored to a trigger." },
23
+ Progress: { tag: "sonic-progress", note: "Completion bar on a value and max scale, or indeterminate." },
24
+ Radio: { tag: "sonic-radio", note: "One choice among several, published to a form." },
25
+ Select: { tag: "sonic-select", note: "Drop-down choice that publishes to a form." },
26
+ Switch: { tag: "sonic-switch", note: "On and off toggle that publishes to a form." },
27
+ Table: { tag: "sonic-table", note: "Tabular data from composable rows and cells." },
28
+ Textarea: { tag: "sonic-textarea", note: "Multi-line text field for forms." },
29
+ Theme: { tag: "sonic-theme", note: "Registers the design tokens and wraps the app." },
30
+ Toast: { tag: "sonic-toast", note: "Short-lived feedback in a fixed stack." },
31
+ Tooltip: { tag: "sonic-tooltip", note: "Short label on hover and focus." },
32
+ Date: { tag: "sonic-date", note: "Formats dates and durations, localised." },
33
+ Fetch: { tag: "sonic-fetch", note: "Loads an endpoint into a data provider." },
34
+ If: { tag: "sonic-if", note: "Shows its content while a condition holds." },
35
+ List: { tag: "sonic-list", note: "Renders a fetched collection with a template." },
36
+ Mix: { tag: "sonic-mix", note: "Merges several data providers into one." },
37
+ Jsonata: { tag: "sonic-jsonata", note: "Transforms data with a JSONata expression." },
38
+ Queue: { tag: "sonic-queue", note: "Paginated, lazy-loaded lists, page after page." },
39
+ Router: { tag: "sonic-router", note: "Renders the view that matches the location." },
40
+ SDUI: { tag: "sonic-sdui", note: "Builds an interface from a JSON descriptor." },
41
+ States: { tag: "sonic-states", note: "Switches content on a data value or a pattern." },
42
+ Submit: { tag: "sonic-submit", note: "Sends a form provider to an API endpoint." },
43
+ Value: { tag: "sonic-value", note: "Prints a live value from a data provider." },
44
+ };