@supersoniks/concorde 5.0.4 → 5.0.5

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 (208) hide show
  1. package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
  2. package/.agents/skills/concorde-component-docs/template.md +45 -0
  3. package/ai/cursor/rules/concorde-theme.mdc +1 -1
  4. package/ai/cursor/rules/concorde.mdc +1 -1
  5. package/ai/skills/concorde/SKILL.md +1 -1
  6. package/ai/skills/concorde-theme/SKILL.md +21 -10
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +528 -534
  9. package/concorde-core.es.js +4257 -4212
  10. package/dist/concorde-core.bundle.js +528 -534
  11. package/dist/concorde-core.es.js +4257 -4212
  12. package/dist/docs-mock-api-sw.js +2 -0
  13. package/dist/docs-mock-api-sw.js.map +2 -2
  14. package/docs/assets/index-CD4WyL6o.css +1 -0
  15. package/docs/assets/{index-D8MVWqY6.js → index-wVZpLVYW.js} +1221 -1350
  16. package/docs/crawl/core/components/ui/alert/alert.html +172 -71
  17. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
  18. package/docs/crawl/core/components/ui/badge/badge.html +157 -79
  19. package/docs/crawl/core/components/ui/button/button.html +1 -0
  20. package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
  21. package/docs/crawl/core/components/ui/card/card.html +222 -68
  22. package/docs/crawl/core/components/ui/divider/divider.html +117 -31
  23. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
  24. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
  25. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
  26. package/docs/crawl/core/components/ui/form/input/input.html +3 -3
  27. package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
  28. package/docs/crawl/core/components/ui/group/group.html +60 -38
  29. package/docs/crawl/core/components/ui/icon/icon.html +136 -47
  30. package/docs/crawl/core/components/ui/image/image.html +244 -56
  31. package/docs/crawl/core/components/ui/link/link.html +67 -9
  32. package/docs/crawl/core/components/ui/loader/loader.html +97 -23
  33. package/docs/crawl/core/components/ui/menu/menu.html +162 -90
  34. package/docs/crawl/core/components/ui/modal/modal.html +275 -50
  35. package/docs/crawl/core/components/ui/pop/pop.html +260 -66
  36. package/docs/crawl/core/components/ui/progress/progress.html +103 -30
  37. package/docs/crawl/core/components/ui/table/table.html +303 -171
  38. package/docs/crawl/core/components/ui/theme/theme.html +131 -0
  39. package/docs/crawl/core/components/ui/toast/toast.html +170 -59
  40. package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
  41. package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
  42. package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
  43. package/docs/crawl/docs/_getting-started/start.html +1 -1
  44. package/docs/crawl/docs/_getting-started/theming.html +311 -63
  45. package/docs/crawl/hubs/form-components.html +75 -53
  46. package/docs/crawl/index.html +7 -6
  47. package/docs/docs-mock-api-sw.js +2 -0
  48. package/docs/docs-mock-api-sw.js.map +2 -2
  49. package/docs/index.html +9 -7
  50. package/docs/llms-full.txt +1703 -456
  51. package/docs/llms.txt +25 -32
  52. package/docs/sitemap.xml +3 -0
  53. package/docs/src/core/components/functional/fetch/fetch.md +0 -0
  54. package/docs/src/core/components/functional/if/if.md +0 -0
  55. package/docs/src/core/components/functional/list/list.md +0 -0
  56. package/docs/src/core/components/functional/router/router.md +0 -0
  57. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  58. package/docs/src/core/components/functional/states/states.md +0 -0
  59. package/docs/src/core/components/functional/submit/submit.md +0 -0
  60. package/docs/src/core/components/ui/alert/alert.md +147 -72
  61. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  62. package/docs/src/core/components/ui/badge/badge.md +141 -80
  63. package/docs/src/core/components/ui/button/button.md +1 -0
  64. package/docs/src/core/components/ui/captcha/captcha.md +65 -6
  65. package/docs/src/core/components/ui/card/card.md +183 -65
  66. package/docs/src/core/components/ui/divider/divider.md +107 -13
  67. package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  68. package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  69. package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  70. package/docs/src/core/components/ui/form/input/input.md +1 -1
  71. package/docs/src/core/components/ui/form/radio/radio.md +0 -0
  72. package/docs/src/core/components/ui/form/select/select.md +0 -0
  73. package/docs/src/core/components/ui/form/switch/switch.md +0 -0
  74. package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
  75. package/docs/src/core/components/ui/group/group.md +36 -36
  76. package/docs/src/core/components/ui/icon/icon.md +132 -43
  77. package/docs/src/core/components/ui/image/image.md +179 -53
  78. package/docs/src/core/components/ui/link/link.md +45 -7
  79. package/docs/src/core/components/ui/loader/loader.md +79 -22
  80. package/docs/src/core/components/ui/menu/menu.md +133 -92
  81. package/docs/src/core/components/ui/modal/modal.md +163 -47
  82. package/docs/src/core/components/ui/pop/pop.md +262 -64
  83. package/docs/src/core/components/ui/progress/progress.md +76 -30
  84. package/docs/src/core/components/ui/table/table.md +147 -171
  85. package/docs/src/core/components/ui/theme/theme.md +122 -0
  86. package/docs/src/core/components/ui/toast/toast.md +108 -58
  87. package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
  88. package/docs/src/docs/_core-concept/subscriber.md +0 -0
  89. package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
  90. package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
  91. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
  92. package/docs/src/docs/_getting-started/pubsub.md +0 -0
  93. package/docs/src/docs/_getting-started/start.md +1 -1
  94. package/docs/src/docs/_getting-started/theming.md +223 -61
  95. package/docs/src/docs/search/docs-search.json +3083 -348
  96. package/docs/src/tsconfig.json +63 -3
  97. package/gitlab/job_tests.sh +0 -0
  98. package/index.html +4 -2
  99. package/package.json +7 -1
  100. package/public/docs-mock-api-sw.js +2 -0
  101. package/public/docs-mock-api-sw.js.map +2 -2
  102. package/scripts/post-build-docs.js +0 -0
  103. package/scripts/post-build.mjs +0 -0
  104. package/src/core/components/functional/fetch/fetch.md +0 -0
  105. package/src/core/components/functional/if/if.md +0 -0
  106. package/src/core/components/functional/list/list.demo.ts +0 -0
  107. package/src/core/components/functional/list/list.md +0 -0
  108. package/src/core/components/functional/router/router.md +0 -0
  109. package/src/core/components/functional/router/router.ts +0 -0
  110. package/src/core/components/functional/sdui/sdui.md +0 -0
  111. package/src/core/components/functional/states/states.md +0 -0
  112. package/src/core/components/functional/submit/submit.md +0 -0
  113. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  114. package/src/core/components/ui/_css/align.ts +1 -0
  115. package/src/core/components/ui/_css/size.ts +0 -0
  116. package/src/core/components/ui/_css/type.ts +86 -8
  117. package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
  118. package/src/core/components/ui/alert/alert.md +21 -2
  119. package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  120. package/src/core/components/ui/badge/badge.md +19 -6
  121. package/src/core/components/ui/badge/badge.ts +8 -9
  122. package/src/core/components/ui/button/button.ts +5 -15
  123. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  124. package/src/core/components/ui/captcha/captcha.md +65 -6
  125. package/src/core/components/ui/card/card.md +73 -10
  126. package/src/core/components/ui/card/card.ts +24 -22
  127. package/src/core/components/ui/divider/divider.md +107 -13
  128. package/src/core/components/ui/divider/divider.ts +40 -33
  129. package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  130. package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
  131. package/src/core/components/ui/form/fieldset/legend.ts +13 -13
  132. package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  133. package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
  134. package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  135. package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
  136. package/src/core/components/ui/form/radio/radio.md +0 -0
  137. package/src/core/components/ui/form/select/select.md +0 -0
  138. package/src/core/components/ui/form/switch/switch.md +0 -0
  139. package/src/core/components/ui/form/textarea/textarea.ts +4 -3
  140. package/src/core/components/ui/group/group.md +36 -36
  141. package/src/core/components/ui/group/group.ts +5 -10
  142. package/src/core/components/ui/icon/icon.md +132 -43
  143. package/src/core/components/ui/image/image.md +35 -3
  144. package/src/core/components/ui/link/link.md +43 -5
  145. package/src/core/components/ui/loader/loader.md +79 -22
  146. package/src/core/components/ui/loader/loader.ts +67 -27
  147. package/src/core/components/ui/loader/styles/fixed.ts +6 -11
  148. package/src/core/components/ui/menu/menu.md +133 -92
  149. package/src/core/components/ui/menu/menu.ts +53 -58
  150. package/src/core/components/ui/modal/modal.md +163 -47
  151. package/src/core/components/ui/modal/modal.ts +2 -4
  152. package/src/core/components/ui/pop/pop.md +217 -123
  153. package/src/core/components/ui/pop/pop.ts +0 -1
  154. package/src/core/components/ui/progress/progress.md +76 -30
  155. package/src/core/components/ui/progress/progress.ts +25 -56
  156. package/src/core/components/ui/table/table-caption.ts +2 -2
  157. package/src/core/components/ui/table/table-tbody.ts +3 -3
  158. package/src/core/components/ui/table/table-td.ts +23 -18
  159. package/src/core/components/ui/table/table-th.ts +8 -8
  160. package/src/core/components/ui/table/table-tr.ts +4 -4
  161. package/src/core/components/ui/table/table.md +147 -171
  162. package/src/core/components/ui/table/table.ts +20 -19
  163. package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
  164. package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
  165. package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
  166. package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
  167. package/src/core/components/ui/theme/theme.md +122 -0
  168. package/src/core/components/ui/theme/theme.ts +30 -7
  169. package/src/core/components/ui/toast/toast-item.ts +6 -9
  170. package/src/core/components/ui/toast/toast.md +108 -58
  171. package/src/core/components/ui/toast/types.ts +1 -1
  172. package/src/core/components/ui/tooltip/tooltip.md +68 -26
  173. package/src/core/mixins/Subscriber.ts +0 -0
  174. package/src/core/utils/DataBindObserver.ts +0 -0
  175. package/src/core/utils/Objects.ts +0 -0
  176. package/src/core/utils/route.ts +0 -0
  177. package/src/docs/_core-concept/subscriber.md +0 -0
  178. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  179. package/src/docs/_getting-started/pubsub.md +0 -0
  180. package/src/docs/_getting-started/start.md +1 -1
  181. package/src/docs/_getting-started/theming.md +223 -61
  182. package/src/docs/code.ts +125 -58
  183. package/src/docs/example/users.ts +0 -0
  184. package/src/docs/header/header.ts +62 -54
  185. package/src/docs/mock-api/router.ts +2 -0
  186. package/src/docs/navigation/navigation.ts +6 -3
  187. package/src/docs/search/docs-search.json +2504 -399
  188. package/src/docs/search/markdown-renderer.ts +6 -6
  189. package/src/docs/search/page.ts +0 -0
  190. package/src/docs/search/search.ts +4 -4
  191. package/src/docs/tailwind/css/tailwind.css +6 -5
  192. package/src/tsconfig.json +18 -0
  193. package/src/tsconfig.tsbuildinfo +1 -1
  194. package/tailwind.config.js +19 -0
  195. package/.github/workflows/ci.yml +0 -21
  196. package/.github-export-ignore +0 -30
  197. package/CONTRIBUTING.md +0 -59
  198. package/DEV.md +0 -54
  199. package/LICENSE +0 -21
  200. package/OPEN_SOURCE_CHECKPOINT.md +0 -133
  201. package/docs/assets/index-DiD0qYvE.css +0 -1
  202. package/docs/src/tsconfig.declarations.json +0 -22
  203. package/docs/src/tsconfig.emit.json +0 -23
  204. package/gitlab/job_github_mirror.sh +0 -39
  205. package/scripts/github-export.mjs +0 -150
  206. package/src/css.d.ts +0 -19
  207. package/src/tsconfig.declarations.json +0 -22
  208. package/src/tsconfig.emit.json +0 -23
@@ -1,6 +1,11 @@
1
1
  # Group
2
2
 
3
+ **`sonic-group`** lays out slotted **`sonic-button`** · **`sonic-input`** and **`sonic-select`** controls in a single horizontal row with **shared corner radius** (first / middle / last items). Optional **`label`** and **`description`** follow form field styling. Use it for **button groups**, **radio rows**, or **input + action** toolbars.
4
+
3
5
  ## Radio group
6
+
7
+ Pair with **`sonic-button`** **`radio`** and a shared **`name`**; ancestor **`formDataProvider`** stores the selected **`value`**.
8
+
4
9
  <sonic-code>
5
10
  <template>
6
11
  <sonic-group formDataProvider="subscriptionData">
@@ -12,10 +17,13 @@
12
17
  </sonic-code>
13
18
 
14
19
  ## Button group
20
+
21
+ Adjacent link or action buttons without merging into one control.
22
+
15
23
  <sonic-code>
16
24
  <template>
17
25
  <sonic-group>
18
- <sonic-button type="info" target="_blank" href="https://wwws.airfrance.fr/">🗼Air France</sonic-button>
26
+ <sonic-button type="info" target="_blank" href="https://wwws.airfrance.fr/">🗼 Air France</sonic-button>
19
27
  <sonic-button type="success" target="_blank" href="https://www.airtahitinui.com/">🌴 Air Tahiti</sonic-button>
20
28
  <sonic-button type="danger" target="_blank" href="https://www.aircorsica.com/">💣 Air Corsica</sonic-button>
21
29
  </sonic-group>
@@ -23,53 +31,45 @@
23
31
  </sonic-code>
24
32
 
25
33
  ## Input actions prefix
34
+
35
+ Action control before the field. **`label`** or **`description`** on **`sonic-group`** annotate the row.
36
+
26
37
  <sonic-code>
27
38
  <template>
28
- <div class="grid grid-cols-3 gap-3">
29
- <sonic-group>
30
- <sonic-button type="info" shape="square">
31
- <sonic-icon library="iconoir" library="iconoir" name="info-empty"></sonic-icon>
32
- </sonic-button>
33
- <sonic-input placeholder="placeholder" ></sonic-input>
34
- </sonic-group>
35
- <sonic-group label="Label">
36
- <sonic-button type="info" shape="square">
37
- <sonic-icon library="iconoir" library="iconoir" name="info-empty"></sonic-icon>
38
- </sonic-button>
39
- <sonic-input ></sonic-input>
40
- </sonic-group>
41
- <sonic-group description="Description">
39
+ <sonic-group label="Label" description="Description">
42
40
  <sonic-button type="info" shape="square">
43
- <sonic-icon library="iconoir" library="iconoir" name="info-empty"></sonic-icon>
41
+ <sonic-icon library="iconoir" name="info-empty"></sonic-icon>
44
42
  </sonic-button>
45
- <sonic-input ></sonic-input>
43
+ <sonic-input></sonic-input>
46
44
  </sonic-group>
47
- </div>
48
45
  </template>
49
46
  </sonic-code>
50
47
 
51
48
  ## Input actions suffix
49
+
50
+ Field first, action after (submit, validate, etc.).
51
+
52
52
  <sonic-code>
53
53
  <template>
54
- <div class="grid grid-cols-3 gap-3">
55
- <sonic-group>
56
- <sonic-input placeholder="placeholder" ></sonic-input>
57
- <sonic-button type="primary" shape="square">
58
- <sonic-icon library="iconoir" library="iconoir" name="check"></sonic-icon>
59
- </sonic-button>
60
- </sonic-group>
61
- <sonic-group label="Label">
62
- <sonic-input ></sonic-input>
63
- <sonic-button type="primary" shape="square">
64
- <sonic-icon library="iconoir" library="iconoir" name="check"></sonic-icon>
65
- </sonic-button>
66
- </sonic-group>
67
- <sonic-group description="Description">
68
- <sonic-input ></sonic-input>
54
+ <sonic-group label="Label" description="Description">
55
+ <sonic-input></sonic-input>
69
56
  <sonic-button type="primary" shape="square">
70
- <sonic-icon library="iconoir" library="iconoir" name="check"></sonic-icon>
57
+ <sonic-icon library="iconoir" name="check"></sonic-icon>
71
58
  </sonic-button>
72
59
  </sonic-group>
73
- </div>
74
60
  </template>
75
- </sonic-code>
61
+ </sonic-code>
62
+
63
+ ## API reference
64
+
65
+ | Attribute | Values | Description |
66
+ |----------|---------|-------------|
67
+ | `label` | string (HTML) | Label above the row; **`slot="label"`** overrides / extends |
68
+ | `description` | string (HTML) | Help text below the row; **`slot="description"`** overrides / extends |
69
+ | `alignItems` | CSS align-items (default `center`) | Cross-axis alignment of the main flex row |
70
+
71
+ | Slot | Description |
72
+ |------|-------------|
73
+ | *(default)* | **`sonic-button`** · **`sonic-input`** · **`sonic-select`** in visual order |
74
+ | `label` | Custom label markup |
75
+ | `description` | Custom description markup |
@@ -1,4 +1,4 @@
1
- import { html, LitElement, css, PropertyValues } from "lit";
1
+ import { html, LitElement, css, PropertyValues, nothing } from "lit";
2
2
  import { styleMap } from "lit/directives/style-map.js";
3
3
  import {
4
4
  customElement,
@@ -58,7 +58,7 @@ export class Group extends LitElement {
58
58
 
59
59
  updated(): void {
60
60
  const children = this.querySelectorAll(
61
- "sonic-input, sonic-button, sonic-select"
61
+ "sonic-input, sonic-button, sonic-select",
62
62
  );
63
63
  const nbChildren = children.length;
64
64
 
@@ -81,14 +81,9 @@ export class Group extends LitElement {
81
81
  }
82
82
  }
83
83
 
84
- connectedCallback() {
85
- super.connectedCallback();
86
- this.hasSlotOrProps();
87
- }
88
-
89
84
  willUpdate(changedProperties: PropertyValues) {
90
- this.hasSlotOrProps();
91
85
  super.willUpdate(changedProperties);
86
+ this.hasSlotOrProps();
92
87
  }
93
88
 
94
89
  hasSlotOrProps() {
@@ -103,7 +98,7 @@ export class Group extends LitElement {
103
98
  };
104
99
 
105
100
  return html`<span class="${this.hasLabel ? "form-label" : "hidden"}"
106
- >${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
101
+ >${this.label ? unsafeHTML(this.label) : nothing}<slot
107
102
  name="label"
108
103
  @slotchange=${this.hasSlotOrProps}
109
104
  ></slot
@@ -114,7 +109,7 @@ export class Group extends LitElement {
114
109
  @slotchange=${this.hasSlotOrProps}
115
110
  class="${this.hasDescription ? "form-description" : "hidden"}"
116
111
  >
117
- ${this.description ? html`${unsafeHTML(this.description)}` : ""}
112
+ ${this.description ? html`${unsafeHTML(this.description)}` : nothing}
118
113
  </slot>`;
119
114
  }
120
115
  }
@@ -1,125 +1,214 @@
1
1
  # Icon
2
2
 
3
+ **`sonic-icon`** renders inline SVG icons from the **bundled core set** or from **CDN libraries**. Set **`name`** (and **`library`** / **`prefix`** when needed); scale with **`size`**. Icons inherit **`currentColor`** and are **`aria-hidden`** by default—keep visible text nearby or label the control that contains them.
3
4
 
4
- ## Custom
5
+ ## Core library
5
6
 
6
- <p >Icons located in the following folder : <span class="text-info">/svg/$prefix/$name.svg<span></p>
7
+ Omit **`library`** to use the bundled set in `icons.json`. Available **`name`** values: `cancel` · `check` · `check-circled-outline` · `emoji-puzzled` · `info-empty` · `loader` · `minus-small` · `more-horiz` · `more-vert` · `nav-arrow-down` · `warning-circled-outline`.
7
8
 
8
- <sonic-code customIconLibraryPath="/svg/$prefix/$name.svg"
9
- customIconDefaultPrefix="regular">
9
+ <sonic-code>
10
10
  <template>
11
- <sonic-scope customIconLibraryPath="/svg/$prefix/$name.svg"
12
- customIconDefaultPrefix="regular">
13
- <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
14
- <div class="text-center">
15
- <sonic-icon library="custom" prefix="regular" name="plane"></sonic-icon>
16
- <br>
17
- <div class="text-xs mt-1">regular</div>
18
- </div>
19
- <div class="text-center">
20
- <sonic-icon library="custom" prefix="solid" name="plane"></sonic-icon>
21
- <br>
22
- <div class="text-xs mt-1">solid</div>
23
- </div>
24
- <div class="text-center">
25
- <sonic-icon library="custom" name="plane"></sonic-icon>
26
- <br>
27
- <div class="text-xs mt-1">default prefix</div>
28
- </div>
11
+ <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
12
+ <div class="text-center">
13
+ <sonic-icon name="cancel" size="lg"></sonic-icon>
14
+ <div class="text-xs mt-1">cancel</div>
29
15
  </div>
30
- </sonic-scope>
16
+ <div class="text-center">
17
+ <sonic-icon name="check" size="lg"></sonic-icon>
18
+ <div class="text-xs mt-1">check</div>
19
+ </div>
20
+ <div class="text-center">
21
+ <sonic-icon name="check-circled-outline" size="lg"></sonic-icon>
22
+ <div class="text-xs mt-1">check-circled-outline</div>
23
+ </div>
24
+ <div class="text-center">
25
+ <sonic-icon name="emoji-puzzled" size="lg"></sonic-icon>
26
+ <div class="text-xs mt-1">emoji-puzzled</div>
27
+ </div>
28
+ <div class="text-center">
29
+ <sonic-icon name="info-empty" size="lg"></sonic-icon>
30
+ <div class="text-xs mt-1">info-empty</div>
31
+ </div>
32
+ <div class="text-center">
33
+ <sonic-icon name="loader" size="lg"></sonic-icon>
34
+ <div class="text-xs mt-1">loader</div>
35
+ </div>
36
+ <div class="text-center">
37
+ <sonic-icon name="minus-small" size="lg"></sonic-icon>
38
+ <div class="text-xs mt-1">minus-small</div>
39
+ </div>
40
+ <div class="text-center">
41
+ <sonic-icon name="more-horiz" size="lg"></sonic-icon>
42
+ <div class="text-xs mt-1">more-horiz</div>
43
+ </div>
44
+ <div class="text-center">
45
+ <sonic-icon name="more-vert" size="lg"></sonic-icon>
46
+ <div class="text-xs mt-1">more-vert</div>
47
+ </div>
48
+ <div class="text-center">
49
+ <sonic-icon name="nav-arrow-down" size="lg"></sonic-icon>
50
+ <div class="text-xs mt-1">nav-arrow-down</div>
51
+ </div>
52
+ <div class="text-center">
53
+ <sonic-icon name="warning-circled-outline" size="lg"></sonic-icon>
54
+ <div class="text-xs mt-1">warning-circled-outline</div>
55
+ </div>
56
+ </div>
31
57
  </template>
32
58
  </sonic-code>
33
59
 
60
+ ## External libraries
61
+
62
+ Set **`library`** to load SVGs from a built-in CDN template. **`prefix`** falls back to each library’s default when omitted (`outline` for **`heroicons`**, **`regular`** for **`fontAwesome`** and **`material`**, and so on).
34
63
 
35
- ## External
36
64
  <sonic-code>
37
65
  <template>
38
66
  <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
39
67
  <sonic-link href="https://heroicons.com/" target="_blank" class="text-center underline">
40
68
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
41
- <br>
69
+ <br />
42
70
  <div class="text-xs mt-1">heroicons</div>
43
71
  </sonic-link>
44
72
  <sonic-link href="https://iconoir.com/" target="_blank" class="text-center underline">
45
- <sonic-icon library="iconoir" name="2x2-cell" size="lg"></sonic-icon>
46
- <br>
73
+ <sonic-icon library="iconoir" name="2x2-cell" size="lg"></sonic-icon>
74
+ <br />
47
75
  <div class="text-xs mt-1">iconoir</div>
48
76
  </sonic-link>
49
77
  <sonic-link href="https://materialdesignicons.com/" target="_blank" class="text-center underline">
50
78
  <sonic-icon library="material" prefix="outline" name="email" size="lg"></sonic-icon>
51
- <br>
79
+ <br />
52
80
  <div class="text-xs mt-1">material design</div>
53
81
  </sonic-link>
54
82
  <sonic-link href="https://fontawesome.com/search?o=r&m=free&s=regular" target="_blank" class="text-center underline">
55
83
  <sonic-icon library="fontAwesome" prefix="regular" name="user" size="lg"></sonic-icon>
56
- <br>
84
+ <br />
57
85
  <div class="text-xs mt-1">fontAwesome regular</div>
58
86
  </sonic-link>
59
87
  <sonic-link href="https://fontawesome.com/search?o=r&m=free&s=solid" target="_blank" class="text-center underline">
60
88
  <sonic-icon library="fontAwesome" prefix="solid" name="book" size="lg"></sonic-icon>
61
- <br>
89
+ <br />
62
90
  <div class="text-xs mt-1">fontAwesome solid</div>
63
91
  </sonic-link>
64
92
  <sonic-link href="https://feathericons.com/" target="_blank" class="text-center underline">
65
- <sonic-icon library="feathers" name="activity" size="lg"></sonic-icon>
66
- <br>
93
+ <sonic-icon library="feathers" name="activity" size="lg"></sonic-icon>
94
+ <br />
67
95
  <div class="text-xs mt-1">feathers</div>
68
96
  </sonic-link>
69
97
  <sonic-link href="https://lucide.dev/" target="_blank" class="text-center underline">
70
- <sonic-icon library="lucide" name="album" size="lg"></sonic-icon>
71
- <br>
98
+ <sonic-icon library="lucide" name="album" size="lg"></sonic-icon>
99
+ <br />
72
100
  <div class="text-xs mt-1">lucide</div>
73
101
  </sonic-link>
74
102
  </div>
75
103
  </template>
76
104
  </sonic-code>
77
105
 
106
+ ## Custom library
107
+
108
+ Use **`library="custom"`** with SVG files on your origin. On an ancestor (for example **`sonic-scope`** or **`sonic-code`**), set **`customIconLibraryPath`** to a URL template with **`$prefix`** and **`$name`** placeholders, and optionally **`customIconDefaultPrefix`** when **`prefix`** is omitted.
109
+
110
+ <sonic-code
111
+ customIconLibraryPath="/svg/$prefix/$name.svg"
112
+ customIconDefaultPrefix="regular"
113
+ >
114
+ <template>
115
+ <sonic-scope
116
+ customIconLibraryPath="/svg/$prefix/$name.svg"
117
+ customIconDefaultPrefix="regular"
118
+ >
119
+ <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
120
+ <div class="text-center">
121
+ <sonic-icon library="custom" prefix="regular" name="plane"></sonic-icon>
122
+ <br />
123
+ <div class="text-xs mt-1">regular</div>
124
+ </div>
125
+ <div class="text-center">
126
+ <sonic-icon library="custom" prefix="solid" name="plane"></sonic-icon>
127
+ <br />
128
+ <div class="text-xs mt-1">solid</div>
129
+ </div>
130
+ <div class="text-center">
131
+ <sonic-icon library="custom" name="plane"></sonic-icon>
132
+ <br />
133
+ <div class="text-xs mt-1">default prefix</div>
134
+ </div>
135
+ </div>
136
+ </sonic-scope>
137
+ </template>
138
+ </sonic-code>
139
+
78
140
  ## Size
141
+
142
+ Omit **`size`** for the default scale (`1em` height). Larger steps use **`3xl`**.
143
+
79
144
  <sonic-code>
80
145
  <template>
81
- <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
146
+ <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
82
147
  <div class="text-center">
83
148
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xs"></sonic-icon>
84
- <br>
149
+ <br />
85
150
  <div class="text-xs mt-1">2xs</div>
86
151
  </div>
87
152
  <div class="text-center">
88
153
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xs"></sonic-icon>
89
- <br>
154
+ <br />
90
155
  <div class="text-xs mt-1">xs</div>
91
156
  </div>
92
157
  <div class="text-center">
93
158
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="sm"></sonic-icon>
94
- <br>
159
+ <br />
95
160
  <div class="text-xs mt-1">sm</div>
96
161
  </div>
97
162
  <div class="text-center">
98
163
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap"></sonic-icon>
99
- <br>
164
+ <br />
100
165
  <div class="text-xs mt-1">default</div>
101
166
  </div>
102
167
  <div class="text-center">
103
168
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
104
- <br>
169
+ <br />
105
170
  <div class="text-xs mt-1">lg</div>
106
171
  </div>
107
172
  <div class="text-center">
108
173
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xl"></sonic-icon>
109
- <br>
174
+ <br />
110
175
  <div class="text-xs mt-1">xl</div>
111
176
  </div>
112
177
  <div class="text-center">
113
178
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xl"></sonic-icon>
114
- <br>
179
+ <br />
115
180
  <div class="text-xs mt-1">2xl</div>
116
181
  </div>
117
182
  <div class="text-center">
118
183
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="3xl"></sonic-icon>
119
- <br>
184
+ <br />
120
185
  <div class="text-xs mt-1">3xl</div>
121
186
  </div>
122
187
  </div>
123
188
  </template>
124
189
  </sonic-code>
125
190
 
191
+ ## Accessibility
192
+
193
+ On connect, the host sets **`aria-hidden="true"`**. Treat icons as decorative unless the surrounding control already has an accessible name. Do not rely on **`sonic-icon`** alone for meaning—use visible text or **`aria-label`** on the parent button / link.
194
+
195
+ <sonic-code>
196
+ <template>
197
+ <sonic-button type="neutral" variant="outline" shape="circle" aria-label="User profile">
198
+ <sonic-icon library="iconoir" name="user"></sonic-icon>
199
+ </sonic-button>
200
+ </template>
201
+ </sonic-code>
202
+
203
+ ## API reference
204
+
205
+ | Attribute | Values | Description |
206
+ |----------|---------|-------------|
207
+ | `name` | string | Icon id in the core bundle or in the remote library |
208
+ | `library` | `heroicons` · `iconoir` · `feathers` · `lucide` · `material` · `fontAwesome` · `custom` | CDN or custom template; omit for bundled core icons |
209
+ | `prefix` | string | Library-specific variant; defaults per library when empty |
210
+ | `size` | `2xs` · `xs` · `sm` · `lg` · `xl` · `2xl` · `3xl` (default `md`) | `em`-based SVG scale on the host |
211
+
212
+ Ancestor attributes (for **`library="custom"`** only): **`customIconLibraryPath`** (URL template with **`$prefix`** and **`$name`**) and **`customIconDefaultPrefix`**. May be set on **`sonic-scope`**, theme roots, or globally in the document.
213
+
214
+ No slots — the component inlines fetched or bundled SVG markup.
@@ -1,6 +1,6 @@
1
1
  # Image
2
2
 
3
- Responsive **`<img>`** wrapper: aspect ratio, `object-fit: cover`, rounded corners, and optional fade-in on load. The host uses a light placeholder background (`--sc-placeholder-bg`) until the file is ready. Default **`loading`** is `lazy`; set **`loading="eager"`** for above-the-fold heroes.
3
+ **`sonic-image`** wraps a responsive **`<img>`** with aspect ratio, `object-fit: cover`, optional rounded corners, and load transitions. The host shows a placeholder background (`--sc-placeholder-bg`) until the asset loads. Default **`loading`** is `lazy`; use **`loading="eager"`** for above-the-fold heroes.
4
4
 
5
5
  ## Rounded
6
6
 
@@ -149,7 +149,7 @@ Click **Add image** to append small thumbnails and replay the transition. **Clea
149
149
  img.ratio = '1/1';
150
150
  img.rounded = 'md';
151
151
  img.loading = 'eager';
152
- img.style.width = '5rem';
152
+ img.style.width = '8rem';
153
153
  img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
154
154
  host.appendChild(img);
155
155
  })()"
@@ -166,7 +166,7 @@ Click **Add image** to append small thumbnails and replay the transition. **Clea
166
166
  img.ratio = '1/1';
167
167
  img.rounded = 'md';
168
168
  img.loading = 'eager';
169
- img.style.width = '5rem';
169
+ img.style.width = '8rem';
170
170
  img.src = 'https://picsum.photos/seed/' + Date.now() + '/120/120';
171
171
  host.appendChild(img);
172
172
  })()"
@@ -199,3 +199,35 @@ Always set meaningful **`alt`** text (empty string only for decorative images).
199
199
  ></sonic-image>
200
200
  </template>
201
201
  </sonic-code>
202
+
203
+ ## API reference
204
+
205
+ | Attribute | Values | Description |
206
+ |----------|---------|-------------|
207
+ | `src` | URL | Image URL passed to `<img src>` |
208
+ | `alt` | string | Accessible description; use `""` only for decorative images |
209
+ | `loading` | `lazy` (default), `eager` | Native lazy loading |
210
+ | `ratio` | CSS ratio, `auto` (default) | Host `aspect-ratio` on the image (ignored when `cover` is set) |
211
+ | `rounded` | `none` (default), boolean, `base`, `sm`, `md`, `lg`, `xl`, `full` | Corner radius from theme tokens; `full` is a circle (often with `ratio="1/1"`) |
212
+ | `objectPosition` | CSS position | Maps to `object-position` (default `center center`) |
213
+ | `imageRendering` | CSS value | Maps to `image-rendering` (default `auto`) |
214
+ | `cover` | boolean | Absolutely fills a positioned parent; host aspect ratio is ignored |
215
+ | `transition` | `fade`, `fade-scale-out` | Opacity (and scale) animation after `load`; remount to replay on `src` change |
216
+
217
+ No slots — content is driven entirely by attributes on the inner `<img>`.
218
+
219
+ ## API reference
220
+
221
+ | Attribute | Values | Description |
222
+ |----------|---------|-------------|
223
+ | `src` | URL | Image URL passed to `<img src>` |
224
+ | `alt` | string | Accessible description; use `""` only for decorative images |
225
+ | `loading` | `lazy` (default), `eager` | Native lazy loading |
226
+ | `ratio` | CSS ratio, `auto` (default) | Host `aspect-ratio` on the image (ignored when `cover` is set) |
227
+ | `rounded` | `none` (default), boolean, `base`, `sm`, `md`, `lg`, `xl`, `full` | Corner radius from theme tokens; `full` is a circle (often with `ratio="1/1"`) |
228
+ | `objectPosition` | CSS position | Maps to `object-position` (default `center center`) |
229
+ | `imageRendering` | CSS value | Maps to `image-rendering` (default `auto`) |
230
+ | `cover` | boolean | Absolutely fills a positioned parent; host aspect ratio is ignored |
231
+ | `transition` | `fade`, `fade-scale-out` | Opacity (and scale) animation after `load`; remount to replay on `src` change |
232
+
233
+ No slots — content is driven entirely by attributes on the inner `<img>`.
@@ -1,6 +1,9 @@
1
1
  # Link
2
2
 
3
- ## Href
3
+ Links **navigate** with inherited typography: internal routes, anchors, or external URLs. The default slot is the anchor label. For in-app routing, pair **`href`** with **`pushstate`**; use **`autoActive`** to reflect the current URL on the host (`active`).
4
+
5
+ ## Basic example
6
+
4
7
  <sonic-code>
5
8
  <template>
6
9
  <sonic-link href="/">Basic link with href attribute</sonic-link>
@@ -8,27 +11,45 @@
8
11
  </sonic-code>
9
12
 
10
13
  ## Target
14
+
15
+ **`target="_blank"`** opens a new browsing context and sets **`rel="noopener noreferrer"`**.
16
+
11
17
  <sonic-code>
12
18
  <template>
13
19
  <sonic-link href="/" target="_blank">Link with target attribute</sonic-link>
14
20
  </template>
15
21
  </sonic-code>
16
22
 
23
+ ## Pushstate
24
+
25
+ Set **`pushstate`** on same-origin **`href`** values to intercept clicks and navigate through Concorde’s client router without a full reload.
26
+
27
+ <sonic-code>
28
+ <template>
29
+ <sonic-link href="/#core/components" pushstate>Client navigation (pushstate)</sonic-link>
30
+ </template>
31
+ </sonic-code>
32
+
17
33
  ## AutoActive
18
34
 
35
+ Default **`autoActive`** is **`partial`**: the host gets **`active`** when the current URL starts with **`href`**. Style with **`[&[active]]:`** utilities or host selectors.
36
+
19
37
  <sonic-code>
20
38
  <template>
21
- <sonic-link href="/#core/components" class="[&[active]]:text-success">autoActive partial (default)</sonic-link>
39
+ <sonic-link href="/#core/components" class="[&[active]]:text-success">autoActive partial (default)</sonic-link>
22
40
  </template>
23
41
  </sonic-code>
24
42
 
25
- ### AutoActive Strict vs partial
43
+ ### AutoActive strict vs partial
44
+
45
+ **`strict`** requires pathname, search, and hash to match. **`strict-path-only`** matches pathname and hash but ignores search.
26
46
 
27
47
  <sonic-code>
28
48
  <template>
29
49
  <div class="grid gap-3">
30
50
  <sonic-link href="/#core" autoActive="strict" class="[&[active]]:text-success">autoActive strict</sonic-link>
31
- <sonic-link href="/#core/components/ui/link/link.md/link" autoActive="strict" class="[&[active]]:text-success">autoActive strict</sonic-link>
51
+ <sonic-link href="/#core/components/ui/link/link.md/link" autoActive="strict" class="[&[active]]:text-success">autoActive strict (long href)</sonic-link>
52
+ <sonic-link href="/#core/components" autoActive="strict-path-only" class="[&[active]]:text-success">autoActive strict-path-only</sonic-link>
32
53
  </div>
33
54
  </template>
34
55
  </sonic-code>
@@ -37,7 +58,24 @@
37
58
 
38
59
  <sonic-code>
39
60
  <template>
40
- <sonic-link href="/#core/components/ui/link/link.md/link" autoActive="disabled" class="[&[active]]:text-success">autoActive disabled</sonic-link>
61
+ <sonic-link href="/#core/components/ui/link/link.md/link" autoActive="disabled" class="[&[active]]:text-success">autoActive disabled</sonic-link>
41
62
  </template>
42
63
  </sonic-code>
43
64
 
65
+ ## Accessibility
66
+
67
+ The inner **`<a>`** uses **`focus-visible`** outline styling. Set **`data-aria-label`** when the slot text is not sufficient on its own.
68
+
69
+ ## API reference
70
+
71
+ | Attribute | Values | Description |
72
+ |----------|---------|-------------|
73
+ | `href` | URL | Link target; without **`href`**, only the slot is rendered (no **`<a>`**) |
74
+ | `target` | e.g. `_blank` | Navigation target; **`_blank`** adds **`rel="noopener noreferrer"`** |
75
+ | `pushstate` | boolean | Intercepts click for Concorde client navigation without reload |
76
+ | `autoActive` | `partial` (default) · `strict` · `strict-path-only` · `disabled` | When the host gets the **`active`** attribute (same-origin **`href`** only) |
77
+ | `data-aria-label` | string | Accessible **`aria-label`** when the slot text is not enough |
78
+
79
+ | Slot | Description |
80
+ |------|-------------|
81
+ | *(default)* | Link content (text, icons) |