@supersoniks/concorde 5.0.5 → 5.1.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 (168) hide show
  1. package/.github/workflows/ci.yml +21 -0
  2. package/.github-export-ignore +30 -0
  3. package/.tmp-cem/custom-elements.json +13705 -0
  4. package/CONTRIBUTING.md +59 -0
  5. package/DEV.md +54 -0
  6. package/LICENSE +21 -0
  7. package/OPEN_SOURCE_CHECKPOINT.md +133 -0
  8. package/build-infos.json +1 -1
  9. package/concorde-3d.bundle.js +3960 -0
  10. package/concorde-3d.es.js +33433 -0
  11. package/concorde-core.bundle.js +196 -196
  12. package/concorde-core.es.js +3685 -3405
  13. package/concorde-hugging-face-infer.bundle.js +32 -0
  14. package/concorde-hugging-face-infer.es.js +2952 -0
  15. package/concorde-interactive.bundle.js +1157 -0
  16. package/concorde-interactive.es.js +10734 -0
  17. package/concorde-shader.bundle.js +116 -0
  18. package/concorde-shader.es.js +8353 -0
  19. package/concorde-webgpu.bundle.js +307 -0
  20. package/concorde-webgpu.es.js +8627 -0
  21. package/custom-elements-manifest.config.mjs +14 -0
  22. package/dist/concorde-core.bundle.js +196 -196
  23. package/dist/concorde-core.es.js +3685 -3405
  24. package/docs/assets/{index-wVZpLVYW.js → index-D8MVWqY6.js} +1351 -1222
  25. package/docs/assets/index-DiD0qYvE.css +1 -0
  26. package/docs/crawl/core/components/ui/alert/alert.html +71 -172
  27. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +5 -113
  28. package/docs/crawl/core/components/ui/badge/badge.html +79 -157
  29. package/docs/crawl/core/components/ui/button/button.html +0 -1
  30. package/docs/crawl/core/components/ui/captcha/captcha.html +8 -90
  31. package/docs/crawl/core/components/ui/card/card.html +68 -222
  32. package/docs/crawl/core/components/ui/divider/divider.html +31 -117
  33. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +101 -232
  34. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +52 -95
  35. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +38 -97
  36. package/docs/crawl/core/components/ui/form/input/input.html +3 -3
  37. package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
  38. package/docs/crawl/core/components/ui/group/group.html +38 -60
  39. package/docs/crawl/core/components/ui/icon/icon.html +47 -136
  40. package/docs/crawl/core/components/ui/image/image.html +56 -244
  41. package/docs/crawl/core/components/ui/link/link.html +9 -67
  42. package/docs/crawl/core/components/ui/loader/loader.html +23 -97
  43. package/docs/crawl/core/components/ui/menu/menu.html +90 -162
  44. package/docs/crawl/core/components/ui/modal/modal.html +50 -275
  45. package/docs/crawl/core/components/ui/pop/pop.html +66 -260
  46. package/docs/crawl/core/components/ui/progress/progress.html +30 -103
  47. package/docs/crawl/core/components/ui/table/table.html +171 -303
  48. package/docs/crawl/core/components/ui/toast/toast.html +59 -170
  49. package/docs/crawl/core/components/ui/tooltip/tooltip.html +29 -90
  50. package/docs/crawl/docs/_decorators/ancestor-attribute.html +2 -3
  51. package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
  52. package/docs/crawl/docs/_getting-started/start.html +1 -1
  53. package/docs/crawl/docs/_getting-started/theming.html +63 -311
  54. package/docs/crawl/hubs/form-components.html +53 -75
  55. package/docs/crawl/index.html +6 -7
  56. package/docs/docs-mock-api-sw.js +0 -2
  57. package/docs/docs-mock-api-sw.js.map +2 -2
  58. package/docs/index.html +7 -9
  59. package/docs/llms-full.txt +456 -1703
  60. package/docs/llms.txt +32 -25
  61. package/docs/sitemap.xml +0 -3
  62. package/docs/src/core/components/functional/fetch/fetch.md +0 -0
  63. package/docs/src/core/components/functional/if/if.md +0 -0
  64. package/docs/src/core/components/functional/list/list.md +0 -0
  65. package/docs/src/core/components/functional/router/router.md +0 -0
  66. package/docs/src/core/components/functional/sdui/sdui.md +0 -0
  67. package/docs/src/core/components/functional/states/states.md +0 -0
  68. package/docs/src/core/components/functional/submit/submit.md +0 -0
  69. package/docs/src/core/components/ui/alert/alert.md +72 -147
  70. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
  71. package/docs/src/core/components/ui/badge/badge.md +80 -141
  72. package/docs/src/core/components/ui/button/button.md +0 -1
  73. package/docs/src/core/components/ui/captcha/captcha.md +6 -65
  74. package/docs/src/core/components/ui/card/card.md +65 -183
  75. package/docs/src/core/components/ui/divider/divider.md +13 -107
  76. package/docs/src/core/components/ui/form/fieldset/fieldset.md +99 -175
  77. package/docs/src/core/components/ui/form/form-actions/form-actions.md +52 -75
  78. package/docs/src/core/components/ui/form/form-layout/form-layout.md +34 -109
  79. package/docs/src/core/components/ui/form/input/input.md +1 -1
  80. package/docs/src/core/components/ui/form/radio/radio.md +0 -0
  81. package/docs/src/core/components/ui/form/select/select.md +0 -0
  82. package/docs/src/core/components/ui/form/switch/switch.md +0 -0
  83. package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
  84. package/docs/src/core/components/ui/group/group.md +36 -36
  85. package/docs/src/core/components/ui/icon/icon.md +43 -132
  86. package/docs/src/core/components/ui/image/image.md +53 -179
  87. package/docs/src/core/components/ui/link/link.md +7 -45
  88. package/docs/src/core/components/ui/loader/loader.md +22 -79
  89. package/docs/src/core/components/ui/menu/menu.md +92 -133
  90. package/docs/src/core/components/ui/modal/modal.md +47 -163
  91. package/docs/src/core/components/ui/pop/pop.md +64 -262
  92. package/docs/src/core/components/ui/progress/progress.md +30 -76
  93. package/docs/src/core/components/ui/table/table.md +171 -147
  94. package/docs/src/core/components/ui/toast/toast.md +58 -108
  95. package/docs/src/core/components/ui/tooltip/tooltip.md +26 -68
  96. package/docs/src/docs/_core-concept/subscriber.md +0 -0
  97. package/docs/src/docs/_decorators/ancestor-attribute.md +2 -3
  98. package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
  99. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
  100. package/docs/src/docs/_getting-started/pubsub.md +0 -0
  101. package/docs/src/docs/_getting-started/start.md +1 -1
  102. package/docs/src/docs/_getting-started/theming.md +61 -223
  103. package/docs/src/docs/search/docs-search.json +348 -3083
  104. package/docs/src/tsconfig.declarations.json +22 -0
  105. package/docs/src/tsconfig.emit.json +23 -0
  106. package/docs/src/tsconfig.json +3 -63
  107. package/gitlab/job_github_mirror.sh +39 -0
  108. package/package.json +36 -2
  109. package/scripts/generate-sdui-catalog.mjs +250 -0
  110. package/scripts/generate-sdui-catalog.spec.ts +91 -0
  111. package/scripts/github-export.mjs +150 -0
  112. package/scripts/post-build-docs.js +0 -0
  113. package/scripts/post-build.mjs +0 -0
  114. package/scripts/pre-build.mjs +15 -0
  115. package/src/core/components/functional/fetch/fetch.md +0 -0
  116. package/src/core/components/functional/if/if.md +0 -0
  117. package/src/core/components/functional/if/if.ts +0 -0
  118. package/src/core/components/functional/list/list.demo.ts +0 -0
  119. package/src/core/components/functional/list/list.md +0 -0
  120. package/src/core/components/functional/router/router.md +0 -0
  121. package/src/core/components/functional/router/router.ts +0 -0
  122. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
  123. package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
  124. package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
  125. package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
  126. package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
  127. package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
  128. package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
  129. package/src/core/components/functional/sdui/component-catalog.json +3103 -0
  130. package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
  131. package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
  132. package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
  133. package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
  134. package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
  135. package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
  136. package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
  137. package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
  138. package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
  139. package/src/core/components/functional/sdui/sdui.md +122 -0
  140. package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
  141. package/src/core/components/functional/sdui/sdui.ts +442 -34
  142. package/src/core/components/functional/sdui/types.ts +49 -0
  143. package/src/core/components/functional/states/states.md +0 -0
  144. package/src/core/components/functional/submit/submit.md +0 -0
  145. package/src/core/components/functional/subscriber/subscriber.ts +0 -0
  146. package/src/core/components/functional/value/value.ts +0 -0
  147. package/src/core/components/ui/_css/size.ts +0 -0
  148. package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
  149. package/src/core/components/ui/form/radio/radio.md +0 -0
  150. package/src/core/components/ui/form/select/select.md +0 -0
  151. package/src/core/components/ui/form/switch/switch.md +0 -0
  152. package/src/core/mixins/Subscriber.ts +0 -0
  153. package/src/core/utils/DataBindObserver.ts +0 -0
  154. package/src/core/utils/Objects.ts +0 -0
  155. package/src/core/utils/route.ts +0 -0
  156. package/src/css.d.ts +19 -0
  157. package/src/docs/_core-concept/subscriber.md +0 -0
  158. package/src/docs/_getting-started/my-first-subscriber.md +0 -0
  159. package/src/docs/_getting-started/pubsub.md +0 -0
  160. package/src/docs/example/users.ts +0 -0
  161. package/src/docs/search/page.ts +0 -0
  162. package/src/tsconfig.declarations.json +22 -0
  163. package/src/tsconfig.emit.json +23 -0
  164. package/src/tsconfig.json +90 -0
  165. package/src/tsconfig.tsbuildinfo +1 -1
  166. package/docs/assets/index-CD4WyL6o.css +0 -1
  167. package/docs/crawl/core/components/ui/theme/theme.html +0 -131
  168. package/docs/src/core/components/ui/theme/theme.md +0 -122
@@ -1,119 +1,44 @@
1
- # Form layout
2
-
3
- **`sonic-form-layout`** arranges slotted form controls in a **responsive CSS grid** with consistent vertical spacing. Pair **`sonic-input`** · **`sonic-select`** and **`sonic-input-autocomplete`** fields side by side when the host is wider than **440px**; **textareas**, **toggles**, **dividers**, and **`sonic-form-actions`** span the full width. Wrap a **`form`** or **`sonic-fieldset`** body—no attributes are required.
4
-
5
- ## Basic example
6
-
7
- Typical registration-style form: short fields flow in two columns on wide layouts; long or grouped blocks stay full width.
8
-
9
- <sonic-code>
10
- <template>
11
- <form>
12
- <sonic-form-layout>
13
- <sonic-input autocomplete="family-name" label="Last name" name="last_name"></sonic-input>
14
- <sonic-input autocomplete="given-name" label="First name" name="first_name"></sonic-input>
15
- <sonic-select autocomplete="sex" label="Gender" name="gender">
16
- <option value="" selected="selected">— Select —</option>
17
- <option value="prefer-not">Prefer not to say</option>
18
- <option value="male">Male</option>
19
- <option value="female">Female</option>
20
- </sonic-select>
21
- <sonic-input autocomplete="bday" label="Date of birth" name="birth_date" type="date"></sonic-input>
22
- <sonic-divider></sonic-divider>
23
- <sonic-input autocomplete="email" label="Email" name="email" type="email"></sonic-input>
24
- <sonic-input
25
- autocomplete="email"
26
- label="Confirm email"
27
- name="email_confirmation"
28
- type="email"
29
- ></sonic-input>
30
- <sonic-input autocomplete="new-password" label="Password" name="password" type="password"></sonic-input>
31
- <sonic-input
32
- autocomplete="new-password"
33
- label="Confirm password"
34
- name="password_confirmation"
35
- type="password"
36
- ></sonic-input>
37
- <sonic-divider></sonic-divider>
38
- <sonic-textarea label="Message" rows="5"></sonic-textarea>
39
- <sonic-switch>Enable optional feature</sonic-switch>
40
- <sonic-checkbox>Subscribe to newsletter</sonic-checkbox>
41
- <sonic-checkbox>
42
- I accept the
43
- <sonic-link href="#" class="underline">terms and conditions</sonic-link>
44
- </sonic-checkbox>
45
- <sonic-form-actions>
46
- <sonic-button type="success">Submit</sonic-button>
47
- </sonic-form-actions>
48
- </sonic-form-layout>
49
- </form>
50
- </template>
51
- </sonic-code>
52
-
53
- ## Responsive columns
54
-
55
- When the host **`offsetWidth`** is **greater than 440px**, the grid uses **two equal columns** with slightly larger gap (**1.75rem**). Below that breakpoint, fields stack in a **single column** (**1.5rem** gap).
56
-
57
- If the slot contains **exactly one** direct **`sonic-input`**, **`sonic-select`**, or **`sonic-input-autocomplete`**, the layout stays **one column** even above the breakpoint so a lone field does not sit in half an empty row.
58
-
59
- <sonic-code>
60
- <template>
61
- <div class="grid gap-8 md:grid-cols-2 mb-6">
62
- <div>
63
- <sonic-form-layout style="max-width: 20rem">
64
- <sonic-divider align="left">Narrow host (single column)</sonic-divider>
65
- <sonic-input label="Email" name="email_narrow" type="email"></sonic-input>
66
- <sonic-input label="Confirm email" name="email_confirm_narrow" type="email"></sonic-input>
67
- </sonic-form-layout>
68
- </div>
69
- </div>
70
- <div>
71
- <sonic-form-layout>
72
- <sonic-divider align="left">Wide host (two columns for inputs)</sonic-divider>
73
- <sonic-input label="Email" name="email_wide" type="email"></sonic-input>
74
- <sonic-input label="Confirm email" name="email_confirm_wide" type="email"></sonic-input>
75
- </sonic-form-layout>
76
- </div>
77
- </template>
78
- </sonic-code>
79
-
80
- ## Full-width slotted blocks
81
-
82
- Everything except **`sonic-input`**, **`sonic-select`**, **`sonic-input-autocomplete`**, and slotted elements with class **`form-item-container`** is assigned **`grid-column: 1 / -1`**. Use this for **`sonic-textarea`**, **`sonic-checkbox`**, **`sonic-switch`**, **`sonic-form-actions`**, **`sonic-divider`**, and similar blocks.
83
-
84
- Slotted **`sonic-divider`** sets **`--sc-divider-my: 0`** so divider spacing matches the grid rhythm. Slotted **`sonic-submit`** uses **`display: contents`** so submit controls participate in the grid without an extra wrapper box.
1
+ # Form-layout
85
2
 
86
3
  <sonic-code>
87
4
  <template>
5
+ <form>
88
6
  <sonic-form-layout>
89
- <sonic-input label="Subject" name="subject"></sonic-input>
90
- <sonic-textarea label="Details" rows="4"></sonic-textarea>
7
+ <sonic-input autocomplete="family-name" label="Nom" name="nom"></sonic-input>
8
+ <sonic-input autocomplete="given-name" label="Prénom" name="prenom"></sonic-input>
9
+ <sonic-select autocomplete="sex" label="Sexe" name="sexe">
10
+ <option value="" selected="selected">- Sélectionner -</option>
11
+ <option value="-">Je préfère ne pas le dire</option>
12
+ <option value="Homme">Homme</option>
13
+ <option value="Femme">Femme</option>
14
+ </sonic-select>
15
+ <sonic-input autocomplete="bday" label="Date de naissance" name="date_naissance" type="date"></sonic-input>
16
+ <sonic-divider></sonic-divider>
17
+ <sonic-input autocomplete="email" label="e-mail" name="email" type="email"></sonic-input>
18
+ <sonic-input
19
+ autocomplete="email"
20
+ label="Confirmer votre e-mail"
21
+ name="email_confirmation"
22
+ type="email"
23
+ ></sonic-input>
24
+ <sonic-input autocomplete="new-password" label="Mot de passe" name="password" type="password"></sonic-input>
25
+ <sonic-input
26
+ autocomplete="new-password"
27
+ label="Confirmer votre mot de passe"
28
+ name="password_confirmation"
29
+ type="password"
30
+ ></sonic-input>
31
+ <sonic-divider></sonic-divider>
32
+ <sonic-textarea label="Message" rows="5">
33
+ </sonic-textarea>
34
+ <sonic-switch>Activer une superbe option</sonic-switch>
35
+ <sonic-checkbox>Inscription à la newsletter</sonic-checkbox>
36
+ <sonic-checkbox>J'ai lu et accepte les <sonic-link href="#" class="underline">Conditions générales de ventes</sonic-link></sonic-checkbox>
91
37
  <sonic-form-actions>
92
- <sonic-button type="primary">Send</sonic-button>
38
+ <sonic-button type="success">Valider</sonic-button>
93
39
  </sonic-form-actions>
94
40
  </sonic-form-layout>
41
+ </form >
95
42
  </template>
96
43
  </sonic-code>
97
44
 
98
- ## Custom column wrapper
99
-
100
- Add class **`form-item-container`** on a slotted wrapper (for example a **`div`**) when a field is not a direct **`sonic-input`** / **`sonic-select`** / **`sonic-input-autocomplete`** but should still share the two-column flow with short inputs.
101
-
102
- <sonic-code>
103
- <template>
104
- <sonic-form-layout>
105
- <sonic-input label="City" name="city"></sonic-input>
106
- <div class="form-item-container">
107
- <sonic-input label="Postal code" name="postal_code"></sonic-input>
108
- </div>
109
- </sonic-form-layout>
110
- </template>
111
- </sonic-code>
112
-
113
- ## API reference
114
-
115
- No public attributes — layout follows slotted children and host width.
116
-
117
- | Slot | Description |
118
- |------|-------------|
119
- | *(default)* | Form fields and blocks in visual order; column vs full-width rules apply per slotted tag or **`form-item-container`** class |
@@ -2,7 +2,7 @@
2
2
 
3
3
  <sonic-button type="info" size="sm" target="_blank" href="https://www.w3schools.com/tags/tag_input.asp#midcontentadcontainer">
4
4
  <sonic-icon library="iconoir" name="open-new-window" slot="prefix" ></sonic-icon>
5
- Native attributes list
5
+ Native attibutes list
6
6
  </sonic-button>
7
7
 
8
8
  ## Label
File without changes
File without changes
File without changes
@@ -2,7 +2,7 @@
2
2
 
3
3
  <sonic-button type="info" size="sm" target="_blank" href="https://www.w3schools.com/tags/tag_textarea.asp#midcontentadcontainer">
4
4
  <sonic-icon library="iconoir" name="open-new-window" slot="prefix" ></sonic-icon>
5
- Native attributes list
5
+ Native attibutes list
6
6
  </sonic-button>
7
7
 
8
8
 
@@ -1,11 +1,6 @@
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
-
5
3
  ## Radio group
6
-
7
- Pair with **`sonic-button`** **`radio`** and a shared **`name`**; ancestor **`formDataProvider`** stores the selected **`value`**.
8
-
9
4
  <sonic-code>
10
5
  <template>
11
6
  <sonic-group formDataProvider="subscriptionData">
@@ -17,13 +12,10 @@ Pair with **`sonic-button`** **`radio`** and a shared **`name`**; ancestor **`fo
17
12
  </sonic-code>
18
13
 
19
14
  ## Button group
20
-
21
- Adjacent link or action buttons without merging into one control.
22
-
23
15
  <sonic-code>
24
16
  <template>
25
17
  <sonic-group>
26
- <sonic-button type="info" target="_blank" href="https://wwws.airfrance.fr/">🗼 Air France</sonic-button>
18
+ <sonic-button type="info" target="_blank" href="https://wwws.airfrance.fr/">🗼Air France</sonic-button>
27
19
  <sonic-button type="success" target="_blank" href="https://www.airtahitinui.com/">🌴 Air Tahiti</sonic-button>
28
20
  <sonic-button type="danger" target="_blank" href="https://www.aircorsica.com/">💣 Air Corsica</sonic-button>
29
21
  </sonic-group>
@@ -31,45 +23,53 @@ Adjacent link or action buttons without merging into one control.
31
23
  </sonic-code>
32
24
 
33
25
  ## Input actions prefix
34
-
35
- Action control before the field. **`label`** or **`description`** on **`sonic-group`** annotate the row.
36
-
37
26
  <sonic-code>
38
27
  <template>
39
- <sonic-group label="Label" description="Description">
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">
40
42
  <sonic-button type="info" shape="square">
41
- <sonic-icon library="iconoir" name="info-empty"></sonic-icon>
43
+ <sonic-icon library="iconoir" library="iconoir" name="info-empty"></sonic-icon>
42
44
  </sonic-button>
43
- <sonic-input></sonic-input>
45
+ <sonic-input ></sonic-input>
44
46
  </sonic-group>
47
+ </div>
45
48
  </template>
46
49
  </sonic-code>
47
50
 
48
51
  ## Input actions suffix
49
-
50
- Field first, action after (submit, validate, etc.).
51
-
52
52
  <sonic-code>
53
53
  <template>
54
- <sonic-group label="Label" description="Description">
55
- <sonic-input></sonic-input>
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>
56
69
  <sonic-button type="primary" shape="square">
57
- <sonic-icon library="iconoir" name="check"></sonic-icon>
70
+ <sonic-icon library="iconoir" library="iconoir" name="check"></sonic-icon>
58
71
  </sonic-button>
59
72
  </sonic-group>
73
+ </div>
60
74
  </template>
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 |
75
+ </sonic-code>
@@ -1,214 +1,125 @@
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.
4
3
 
5
- ## Core library
4
+ ## Custom
6
5
 
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`.
6
+ <p >Icons located in the following folder : <span class="text-info">/svg/$prefix/$name.svg<span></p>
8
7
 
9
- <sonic-code>
8
+ <sonic-code customIconLibraryPath="/svg/$prefix/$name.svg"
9
+ customIconDefaultPrefix="regular">
10
10
  <template>
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>
15
- </div>
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>
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>
55
29
  </div>
56
- </div>
30
+ </sonic-scope>
57
31
  </template>
58
32
  </sonic-code>
59
33
 
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).
63
34
 
35
+ ## External
64
36
  <sonic-code>
65
37
  <template>
66
38
  <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
67
39
  <sonic-link href="https://heroicons.com/" target="_blank" class="text-center underline">
68
40
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
69
- <br />
41
+ <br>
70
42
  <div class="text-xs mt-1">heroicons</div>
71
43
  </sonic-link>
72
44
  <sonic-link href="https://iconoir.com/" target="_blank" class="text-center underline">
73
- <sonic-icon library="iconoir" name="2x2-cell" size="lg"></sonic-icon>
74
- <br />
45
+ <sonic-icon library="iconoir" name="2x2-cell" size="lg"></sonic-icon>
46
+ <br>
75
47
  <div class="text-xs mt-1">iconoir</div>
76
48
  </sonic-link>
77
49
  <sonic-link href="https://materialdesignicons.com/" target="_blank" class="text-center underline">
78
50
  <sonic-icon library="material" prefix="outline" name="email" size="lg"></sonic-icon>
79
- <br />
51
+ <br>
80
52
  <div class="text-xs mt-1">material design</div>
81
53
  </sonic-link>
82
54
  <sonic-link href="https://fontawesome.com/search?o=r&m=free&s=regular" target="_blank" class="text-center underline">
83
55
  <sonic-icon library="fontAwesome" prefix="regular" name="user" size="lg"></sonic-icon>
84
- <br />
56
+ <br>
85
57
  <div class="text-xs mt-1">fontAwesome regular</div>
86
58
  </sonic-link>
87
59
  <sonic-link href="https://fontawesome.com/search?o=r&m=free&s=solid" target="_blank" class="text-center underline">
88
60
  <sonic-icon library="fontAwesome" prefix="solid" name="book" size="lg"></sonic-icon>
89
- <br />
61
+ <br>
90
62
  <div class="text-xs mt-1">fontAwesome solid</div>
91
63
  </sonic-link>
92
64
  <sonic-link href="https://feathericons.com/" target="_blank" class="text-center underline">
93
- <sonic-icon library="feathers" name="activity" size="lg"></sonic-icon>
94
- <br />
65
+ <sonic-icon library="feathers" name="activity" size="lg"></sonic-icon>
66
+ <br>
95
67
  <div class="text-xs mt-1">feathers</div>
96
68
  </sonic-link>
97
69
  <sonic-link href="https://lucide.dev/" target="_blank" class="text-center underline">
98
- <sonic-icon library="lucide" name="album" size="lg"></sonic-icon>
99
- <br />
70
+ <sonic-icon library="lucide" name="album" size="lg"></sonic-icon>
71
+ <br>
100
72
  <div class="text-xs mt-1">lucide</div>
101
73
  </sonic-link>
102
74
  </div>
103
75
  </template>
104
76
  </sonic-code>
105
77
 
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
-
140
78
  ## Size
141
-
142
- Omit **`size`** for the default scale (`1em` height). Larger steps use **`3xl`**.
143
-
144
79
  <sonic-code>
145
80
  <template>
146
- <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
81
+ <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-8">
147
82
  <div class="text-center">
148
83
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xs"></sonic-icon>
149
- <br />
84
+ <br>
150
85
  <div class="text-xs mt-1">2xs</div>
151
86
  </div>
152
87
  <div class="text-center">
153
88
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xs"></sonic-icon>
154
- <br />
89
+ <br>
155
90
  <div class="text-xs mt-1">xs</div>
156
91
  </div>
157
92
  <div class="text-center">
158
93
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="sm"></sonic-icon>
159
- <br />
94
+ <br>
160
95
  <div class="text-xs mt-1">sm</div>
161
96
  </div>
162
97
  <div class="text-center">
163
98
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap"></sonic-icon>
164
- <br />
99
+ <br>
165
100
  <div class="text-xs mt-1">default</div>
166
101
  </div>
167
102
  <div class="text-center">
168
103
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="lg"></sonic-icon>
169
- <br />
104
+ <br>
170
105
  <div class="text-xs mt-1">lg</div>
171
106
  </div>
172
107
  <div class="text-center">
173
108
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="xl"></sonic-icon>
174
- <br />
109
+ <br>
175
110
  <div class="text-xs mt-1">xl</div>
176
111
  </div>
177
112
  <div class="text-center">
178
113
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="2xl"></sonic-icon>
179
- <br />
114
+ <br>
180
115
  <div class="text-xs mt-1">2xl</div>
181
116
  </div>
182
117
  <div class="text-center">
183
118
  <sonic-icon library="heroicons" prefix="outline" name="academic-cap" size="3xl"></sonic-icon>
184
- <br />
119
+ <br>
185
120
  <div class="text-xs mt-1">3xl</div>
186
121
  </div>
187
122
  </div>
188
123
  </template>
189
124
  </sonic-code>
190
125
 
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.