@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,216 +1,166 @@
1
1
  # Toast
2
2
 
3
- Toasts surface **short-lived feedback** in a fixed stack (bottom-right in the main window). Queue messages with **`SonicToast.add()`** on the global **`SonicToast`** class—the host **`sonic-toast`** is created automatically. Prefer **`label`** for a heading; use **`preserve`** or interactive **`text`** when the user must read or act before dismiss.
4
-
5
- ## Basic example
6
-
7
- Click the button to show a toast.
3
+ ## Utilisation de base
8
4
 
9
5
  <sonic-code>
10
6
  <template>
11
- <sonic-button onclick="SonicToast.add({ text: 'Simple notification' })">
12
- Show toast
7
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message de notification simple' })">
8
+ Afficher un toast
13
9
  </sonic-button>
14
10
  </template>
15
11
  </sonic-code>
16
12
 
17
- ## Status
13
+ ## Statut
18
14
 
19
- **`status`** drives color, icon, and live-region behavior. Omit **`status`** or pass an empty string for a neutral toast.
15
+ Les statuts disponibles sont : `success`, `error`, `warning`, `info` ou vide (par défaut).
20
16
 
21
17
  <sonic-code>
22
18
  <template>
23
19
  <div class="flex flex-wrap gap-2">
24
- <sonic-button onclick="SonicToast.add({ text: 'Default message', status: '' })">
20
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message par défaut', status: '' })">
25
21
  Default
26
22
  </sonic-button>
27
- <sonic-button onclick="SonicToast.add({ text: 'Operation succeeded', status: 'success' })">
23
+ <sonic-button onclick="window.SonicToast.add({ text: 'Opération réussie !', status: 'success' })">
28
24
  Success
29
25
  </sonic-button>
30
- <sonic-button onclick="SonicToast.add({ text: 'Something went wrong', status: 'error' })">
26
+ <sonic-button onclick="window.SonicToast.add({ text: 'Une erreur est survenue', status: 'error' })">
31
27
  Error
32
28
  </sonic-button>
33
- <sonic-button onclick="SonicToast.add({ text: 'Check this detail', status: 'warning' })">
29
+ <sonic-button onclick="window.SonicToast.add({ text: 'Attention à ce point', status: 'warning' })">
34
30
  Warning
35
31
  </sonic-button>
36
- <sonic-button onclick="SonicToast.add({ text: 'Helpful context', status: 'info' })">
32
+ <sonic-button onclick="window.SonicToast.add({ text: 'Information importante', status: 'info' })">
37
33
  Info
38
34
  </sonic-button>
39
35
  </div>
40
36
  </template>
41
37
  </sonic-code>
42
38
 
43
- ## Label
44
-
45
- Set **`label`** for a bold title above **`text`**. **`title`** still works but is deprecated—use **`label`** in new code.
39
+ ## Avec titre
46
40
 
47
41
  <sonic-code>
48
42
  <template>
49
43
  <div class="flex flex-wrap gap-2">
50
- <sonic-button
51
- onclick="SonicToast.add({ label: 'Success', text: 'Your request was processed.', status: 'success' })"
52
- >
53
- Toast with label
44
+ <sonic-button onclick="window.SonicToast.add({ title: 'Succès', text: 'Votre demande a été traitée avec succès.', status: 'success' })">
45
+ Toast avec titre
54
46
  </sonic-button>
55
- <sonic-button
56
- onclick="SonicToast.add({ label: 'Error', text: 'Processing failed. Try again.', status: 'error' })"
57
- >
58
- Error with label
47
+ <sonic-button onclick="window.SonicToast.add({ title: 'Test', text: 'Une erreur est survenue lors du traitement.', status: 'error' })">
48
+ Toast d'erreur avec titre
59
49
  </sonic-button>
60
50
  </div>
61
51
  </template>
62
52
  </sonic-code>
63
53
 
64
- ## HTML in text
54
+ ## Avec contenu HTML
65
55
 
66
- **`text`** (and **`label`**) can include HTML strings. Links and controls in **`text`** automatically enable **`preserve`** so the toast does not auto-hide while the user interacts.
56
+ Le contenu du toast peut contenir du HTML.
67
57
 
68
58
  <sonic-code>
69
59
  <template>
70
- <sonic-button
71
- onclick="SonicToast.add({ text: 'Message with <strong>HTML</strong> and an <a href=&quot;#&quot;>action link</a>', status: 'info' })"
72
- >
73
- Toast with HTML
60
+ <sonic-button onclick="window.SonicToast.add({ text: 'Message avec <strong>HTML</strong> et un <a href=&quot;#&quot;>lien cliquable</a>', status: 'info' })">
61
+ Toast avec HTML
74
62
  </sonic-button>
75
63
  </template>
76
64
  </sonic-code>
77
65
 
78
- ## Preserve
79
66
 
80
- Without **`preserve`**, toasts auto-hide after about six seconds (timer pauses on hover or focus). Set **`preserve`** to keep the toast until the user closes it.
67
+ ## Persistance
68
+
69
+ Par défaut, les toasts disparaissent automatiquement. Avec `preserve: true`, le toast reste affiché jusqu'à ce qu'il soit fermé manuellement.
81
70
 
82
71
  <sonic-code>
83
72
  <template>
84
- <sonic-button
85
- onclick="SonicToast.add({ text: 'This toast stays until you dismiss it', status: 'info', preserve: true })"
86
- >
87
- Persistent toast
73
+ <sonic-button onclick="window.SonicToast.add({ text: 'Ce toast ne disparaîtra pas automatiquement', status: 'info', preserve: true })">
74
+ Toast persistant
88
75
  </sonic-button>
89
76
  </template>
90
77
  </sonic-code>
91
78
 
92
- ## Dismiss forever
79
+ ## Masquer définitivement
93
80
 
94
- With **`dismissForever`** and a stable **`id`**, closing the toast stores dismissal in **`localStorage`**—**`SonicToast.add`** skips it on later visits. Duplicate payloads (same fields, ignoring **`id`**) are not queued twice.
81
+ Avec `dismissForever: true` et un `id`, le toast peut être masqué définitivement. Une fois fermé, il ne réapparaîtra plus même après rechargement de la page.
95
82
 
96
83
  <sonic-code>
97
84
  <template>
98
- <sonic-button
99
- onclick="SonicToast.add({ id: 'unique-toast-id', text: 'Dismiss forever hides this across reloads', status: 'info', dismissForever: true })"
100
- >
101
- Dismiss forever
85
+ <sonic-button onclick="window.SonicToast.add({ id: 'unique-toast-id', text: 'Ce toast peut être masqué définitivement', status: 'info', dismissForever: true })">
86
+ Toast avec dismiss forever
102
87
  </sonic-button>
103
88
  </template>
104
89
  </sonic-code>
105
90
 
106
- ## Ghost
91
+ ## Fantôme
107
92
 
108
- **`ghost`** renders a semi-transparent, non-interactive toast—useful for loading or background states. **`SonicToast.removeAll`** leaves ghost toasts in place.
93
+ Avec `ghost: true`, le toast devient semi-transparent et non-interactif.
109
94
 
110
95
  <sonic-code>
111
96
  <template>
112
- <sonic-button
113
- onclick="SonicToast.add({ text: 'Ghost toast (non-interactive)', status: 'info', ghost: true })"
114
- >
115
- Ghost toast
97
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast fantôme (semi-transparent)', status: 'info', ghost: true })">
98
+ Toast ghost
116
99
  </sonic-button>
117
100
  </template>
118
101
  </sonic-code>
119
102
 
120
- ## Dismissal
121
103
 
122
- Use static helpers to clear the stack from app logic (for example after navigation).
104
+ ## Méthodes de suppression
123
105
 
124
- ### Remove all
106
+ ### Tout supprimer
125
107
 
126
- Removes every toast except **`ghost`** items.
108
+ Supprime tous les toasts sauf ceux marqués comme `ghost`.
127
109
 
128
110
  <sonic-code>
129
111
  <template>
130
112
  <div class="flex flex-wrap gap-2">
131
- <sonic-button onclick="SonicToast.add({ text: 'Toast 1', status: 'info' })">Add toast 1</sonic-button>
132
- <sonic-button onclick="SonicToast.add({ text: 'Toast 2', status: 'success' })">Add toast 2</sonic-button>
133
- <sonic-button onclick="SonicToast.add({ text: 'Toast 3', status: 'warning' })">Add toast 3</sonic-button>
134
- <sonic-button onclick="SonicToast.removeAll()">Remove all</sonic-button>
113
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 1', status: 'info' })">Ajouter toast 1</sonic-button>
114
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 2', status: 'success' })">Ajouter toast 2</sonic-button>
115
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast 3', status: 'warning' })">Ajouter toast 3</sonic-button>
116
+ <sonic-button onclick="window.SonicToast.removeAll()">Supprimer tous</sonic-button>
135
117
  </div>
136
118
  </template>
137
119
  </sonic-code>
138
120
 
139
- ### Remove by status
121
+ ### Supprimer par statut
122
+
123
+ Supprime tous les toasts d'un statut spécifique.
140
124
 
141
125
  <sonic-code>
142
126
  <template>
143
127
  <div class="flex flex-wrap gap-2">
144
- <sonic-button onclick="SonicToast.add({ text: 'Success toast', status: 'success' })">Success</sonic-button>
145
- <sonic-button onclick="SonicToast.add({ text: 'Error toast', status: 'error' })">Error</sonic-button>
146
- <sonic-button onclick="SonicToast.add({ text: 'Warning toast', status: 'warning' })">Warning</sonic-button>
147
- <sonic-button onclick="SonicToast.removeItemsByStatus('success')">Remove success</sonic-button>
148
- <sonic-button onclick="SonicToast.removeItemsByStatus('error')">Remove error</sonic-button>
128
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast success', status: 'success' })">Success</sonic-button>
129
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast error', status: 'error' })">Error</sonic-button>
130
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast warning', status: 'warning' })">Warning</sonic-button>
131
+ <sonic-button onclick="window.SonicToast.removeItemsByStatus('success')">Supprimer success</sonic-button>
132
+ <sonic-button onclick="window.SonicToast.removeItemsByStatus('error')">Supprimer error</sonic-button>
149
133
  </div>
150
134
  </template>
151
135
  </sonic-code>
152
136
 
153
- ### Remove temporary items
137
+ ### Supprimer les éléments temporaires
154
138
 
155
- Removes toasts that are not **`preserve`**.
139
+ Supprime tous les toasts qui ne sont pas marqués comme `preserve`.
156
140
 
157
141
  <sonic-code>
158
142
  <template>
159
143
  <div class="flex flex-wrap gap-2">
160
- <sonic-button onclick="SonicToast.add({ text: 'Temporary toast', status: 'info' })">Temporary</sonic-button>
161
- <sonic-button onclick="SonicToast.add({ text: 'Persistent toast', status: 'success', preserve: true })">
162
- Persistent
163
- </sonic-button>
164
- <sonic-button onclick="SonicToast.removeTemporaryItems()">Remove temporary</sonic-button>
144
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast temporaire', status: 'info' })">Temporaire</sonic-button>
145
+ <sonic-button onclick="window.SonicToast.add({ text: 'Toast persistant', status: 'success', preserve: true })">Persistant</sonic-button>
146
+ <sonic-button onclick="window.SonicToast.removeTemporaryItems()">Supprimer temporaires</sonic-button>
165
147
  </div>
166
148
  </template>
167
149
  </sonic-code>
168
150
 
169
- ## Combined options
151
+ ## Exemple complet
170
152
 
171
153
  <sonic-code>
172
154
  <template>
173
- <sonic-button
174
- onclick="SonicToast.add({
155
+ <sonic-button onclick="window.SonicToast.add({
175
156
  id: 'welcome-toast',
176
- label: 'Welcome',
177
- text: 'Welcome to the platform. Explore the docs to get started.',
157
+ title: 'Bienvenue',
158
+ text: 'Bienvenue sur notre plateforme ! Vous pouvez commencer à explorer les fonctionnalités.',
178
159
  status: 'success',
179
160
  dismissForever: true
180
- })"
181
- >
182
- Full example
161
+ })">
162
+ Toast complet
183
163
  </sonic-button>
184
164
  </template>
185
165
  </sonic-code>
186
166
 
187
- ## Accessibility
188
-
189
- Each toast uses **`role="alert"`** for **`error`** and **`role="status"`** otherwise (with **`aria-live="polite"`** when applicable). Status icons are decorative (**`aria-hidden`**). The close control has an i18n **`aria-label`**. When there is no **`label`**, a truncated string **`aria-label`** may be derived from plain **`text`**.
190
-
191
- ## API reference
192
-
193
- Options passed to **`SonicToast.add(conf)`**:
194
-
195
- | Option | Values | Description |
196
- |----------|---------|-------------|
197
- | `text` | string · Lit template | Main body; HTML strings are supported |
198
- | `label` | string · Lit template | Optional heading above **`text`** |
199
- | `title` | string · Lit template | Deprecated alias for **`label`** |
200
- | `status` | `success` · `error` · `warning` · `info` · `` (empty) | Semantic styling and live region behavior |
201
- | `id` | string · number | Stable id for deduplication and **`dismissForever`** (defaults to timestamp) |
202
- | `preserve` | boolean | Skip auto-hide; forced when **`text`** contains interactive markup |
203
- | `ghost` | boolean | Semi-transparent and non-interactive; kept by **`removeAll`** |
204
- | `dismissForever` | boolean | Persist dismissal in **`localStorage`** when closed (requires stable **`id`**) |
205
- | `styleSheet` | modal style input | Extra adopted styles on the toast item shadow root |
206
- | `useSlot` | boolean | Legacy: project **`text`** into the light DOM slot |
207
-
208
- | Method | Description |
209
- |--------|-------------|
210
- | `SonicToast.add(conf)` | Append a toast; returns the config or **`null`** if skipped (dismissed forever or duplicate) |
211
- | `SonicToast.removeAll()` | Remove all non-**`ghost`** toasts |
212
- | `SonicToast.removeItemsByStatus(status)` | Remove toasts matching **`status`** |
213
- | `SonicToast.removeItemById(id)` | Remove a single toast by **`id`** |
214
- | `SonicToast.removeTemporaryItems()` | Remove toasts without **`preserve`** |
215
-
216
- **`sonic-toast`** is mounted automatically; **`sonic-toast-item`** is internal. In iframes, toasts can delegate to the parent window via **`postMessage`**.
@@ -1,97 +1,71 @@
1
1
  # Tooltip
2
2
 
3
- Tooltip shows a short **`label`** on hover (and on focus when the trigger can receive focus). Wrap the trigger in the default slot—buttons, icons, or plain text. Default **`placement`** is **`top`** (center-aligned). An empty **`label`** hides the bubble the same way as **`disabled`**.
4
-
5
- ## Basic example
6
-
7
3
  <sonic-code>
8
4
  <template>
9
- <sonic-tooltip label="Additional context on hover">
10
- <sonic-button variant="outline">Hover me</sonic-button>
11
- </sonic-tooltip>
5
+ <sonic-tooltip label="Tada : Text appears">hover me</sonic-tooltip>
12
6
  </template>
13
7
  </sonic-code>
14
8
 
15
9
  ## Placement
16
10
 
17
- Use **`top`** · **`bottom`** · **`left`** · **`right`** for the main axis. Add **`-start`** or **`-end`** to align the bubble along the anchor edge.
11
+ By default, tooltip is centered next to its content
18
12
 
19
13
  <sonic-code>
20
14
  <template>
21
- <div class="flex flex-wrap gap-2">
22
- <sonic-tooltip placement="top" label="Top">
23
- <sonic-button>Top</sonic-button>
24
- </sonic-tooltip>
25
- <sonic-tooltip placement="bottom" label="Bottom">
26
- <sonic-button>Bottom</sonic-button>
27
- </sonic-tooltip>
28
- <sonic-tooltip placement="right" label="Right">
29
- <sonic-button>Right</sonic-button>
30
- </sonic-tooltip>
31
- <sonic-tooltip placement="left" label="Left">
32
- <sonic-button>Left</sonic-button>
33
- </sonic-tooltip>
34
- </div>
15
+ <sonic-tooltip placement="top" label="Top text">
16
+ <sonic-button>Top</sonic-button>
17
+ </sonic-tooltip>
18
+ <sonic-tooltip placement="bottom" label="Bottom text">
19
+ <sonic-button>Bottom</sonic-button>
20
+ </sonic-tooltip>
21
+ <sonic-tooltip placement="right" label="Right text">
22
+ <sonic-button>Right</sonic-button>
23
+ </sonic-tooltip>
24
+ <sonic-tooltip placement="left" label="Left text">
25
+ <sonic-button>Left</sonic-button>
26
+ </sonic-tooltip>
35
27
  </template>
36
28
  </sonic-code>
37
29
 
38
- ### Aligned placements
39
-
30
+ ## More placement
40
31
  <sonic-code>
41
32
  <template>
42
33
  <div class="flex gap-3 flex-wrap">
43
- <sonic-tooltip placement="top-start" label="Top start">
34
+ <sonic-tooltip placement="top-start" label="My tooltip">
44
35
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Top start</sonic-button>
45
36
  </sonic-tooltip>
46
- <sonic-tooltip placement="top-end" label="Top end">
37
+ <sonic-tooltip placement="top-end" label="My tooltip">
47
38
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Top end</sonic-button>
48
39
  </sonic-tooltip>
49
- <sonic-tooltip placement="bottom-start" label="Bottom start">
40
+ <sonic-tooltip placement="bottom-start" label="My tooltip">
50
41
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom start</sonic-button>
51
42
  </sonic-tooltip>
52
- <sonic-tooltip placement="bottom-end" label="Bottom end">
43
+ <sonic-tooltip placement="bottom-end" label="My tooltip">
53
44
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom end</sonic-button>
54
45
  </sonic-tooltip>
55
- <sonic-tooltip placement="right-start" label="Right start">
46
+ <sonic-tooltip placement="right-start" label="My tooltip">
56
47
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Right start</sonic-button>
57
48
  </sonic-tooltip>
58
- <sonic-tooltip placement="right-end" label="Right end">
49
+ <sonic-tooltip placement="right-end" label="My tooltip">
59
50
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Right end</sonic-button>
60
51
  </sonic-tooltip>
61
- <sonic-tooltip placement="left-start" label="Left start">
52
+ <sonic-tooltip placement="left-start" label="My tooltip">
62
53
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Left start</sonic-button>
63
54
  </sonic-tooltip>
64
- <sonic-tooltip placement="left-end" label="Left end">
55
+ <sonic-tooltip placement="left-end" label="My tooltip">
65
56
  <sonic-button class="size-40 bg-neutral-200 rounded-lg">Left end</sonic-button>
66
57
  </sonic-tooltip>
67
58
  </div>
68
59
  </template>
69
60
  </sonic-code>
70
61
 
71
- ## Label formatting
72
-
73
- **`label`** supports line breaks (`\n` in markup or multiline text). Lines are trimmed; **`&nbsp;`** is normalized to spaces. **`white-space: pre-line`** preserves breaks in the bubble (max width **18rem**).
74
-
75
- <sonic-code>
76
- <template>
77
- <sonic-tooltip label="First line&#10;Second line">
78
- <sonic-button variant="outline">Multiline label</sonic-button>
79
- </sonic-tooltip>
80
- </template>
81
- </sonic-code>
82
62
 
83
63
  ## Focusable
84
64
 
85
- On non-interactive triggers, set **`focusable`** so the host gets **`tabindex="0"`** and the tooltip opens on keyboard focus as well as hover.
86
-
87
65
  <sonic-code>
88
66
  <template>
89
- <sonic-tooltip
90
- focusable
91
- label="The Concorde made its first transatlantic crossing on September 26, 1973"
92
- >
93
- <sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon>
94
- Focus or hover this text
67
+ <sonic-tooltip focusable label="The Concorde made its first transatlantic crossing on September 26, 1973">
68
+ <sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon> Focus or hover non interactive element
95
69
  </sonic-tooltip>
96
70
  </template>
97
71
  </sonic-code>
@@ -100,25 +74,9 @@ On non-interactive triggers, set **`focusable`** so the host gets **`tabindex="0
100
74
 
101
75
  <sonic-code>
102
76
  <template>
103
- <sonic-tooltip disabled label="Not shown">
77
+ <sonic-tooltip disabled label="Disabled text">
104
78
  <sonic-button>Tooltip disabled</sonic-button>
105
79
  </sonic-tooltip>
106
80
  </template>
107
81
  </sonic-code>
108
82
 
109
- ## Accessibility
110
-
111
- The bubble uses **`popover="hint"`** (non-modal, no pointer capture). Prefer **`focusable`** when the slotted content is not already focusable. When the Popover API is unavailable, the host falls back to the native **`title`** attribute with a single-line label. Opacity transitions respect **`prefers-reduced-motion`**.
112
-
113
- ## API reference
114
-
115
- | Attribute | Values | Description |
116
- |----------|---------|-------------|
117
- | `label` | string | Tooltip copy; whitespace-only values suppress the bubble |
118
- | `placement` | `top` (default) · `bottom` · `left` · `right` · `top-start` · `top-end` · `bottom-start` · `bottom-end` · `left-start` · `left-end` · `right-start` · `right-end` | Position relative to the trigger; repositions while open |
119
- | `disabled` | boolean | Suppress show/hide; sets **`tabindex="-1"`** on the host |
120
- | `focusable` | boolean | Add **`tabindex="0"`** on the host for keyboard access |
121
-
122
- | Slot | Description |
123
- |------|-------------|
124
- | *(default)* | Trigger content (hover target) |
File without changes
@@ -69,9 +69,8 @@ This decorator is particularly useful for:
69
69
  - By default (`dynamic: false`), the value is read once at connect time and is not updated afterward
70
70
  - With `{ dynamic: true }`, the property stays in sync when:
71
71
  - an ancestor **changes** the attribute value
72
- - a **closer** ancestor **gains** / **loses** the attribute (fallback / `null`)
73
- - the component is **reparented** (no extra opt-in) — parent `childList` only reacts if *this* node moves
74
- - Observers are **shared** (one per ancestor attribute / one per parent) so large lists of `sonic-icon` stay cheap on Firefox.
72
+ - a **closer** ancestor **gains** the attribute (that value wins)
73
+ - the **nearest** ancestor **loses** the attribute (falls back to the next one up, or `null`)
75
74
  - When `dynamic` is enabled, updates also propagate to `@subscribe` / `@bind` paths that depend on the decorated property (e.g. `${dataProvider}`)
76
75
 
77
76
  ### Dynamic mode
@@ -1,8 +1,8 @@
1
1
  # Installation
2
2
 
3
- <sonic-alert status="info" label="Recommended — use the starter" background>
4
- <p>For almost all new projects, use <a href="https://www.npmjs.com/package/@supersoniks/create-concorde-ts-starter">create-concorde-ts-starter</a></p>
5
- <p>You get Vite + TypeScript + Lit + Tailwind, an example component, <code>npx concorde enable-short-paths</code> ready to run, and <code>yarn ai:sync</code> for <a href="#docs/_getting-started/ai-agents.md/ai-agents">AI agent skills</a> (<code>AGENTS.md</code>, Cursor / JetBrains rules) without extra setup.</p>
3
+ <sonic-alert status="success" label="Recommended — use the starter" size="xl" background>
4
+ <p><strong>For almost all new projects, use <a href="https://www.npmjs.com/package/@supersoniks/create-concorde-ts-starter">create-concorde-ts-starter</a>.</strong></p>
5
+ <p>You get Vite + TypeScript + Lit + Tailwind, an example component, <code>npx concorde enable-short-paths</code> ready to run, and <code>yarn ai:sync</code> for <a href="#docs/_getting-started/ai-agents.md/ai-agents">AI agent skills</a> (<code>AGENTS.md</code>, Cursor / JetBrains rules) without extra setup.</p>
6
6
  </sonic-alert>
7
7
 
8
8
  ## Starter
File without changes
@@ -3,7 +3,7 @@
3
3
  ## What is Concorde?
4
4
 
5
5
  Based on **[lit.dev](https://lit.dev)**, Concorde is a collection of web components for shared apps and websites.
6
- Build UIs without tying components to a specific host stack, while keeping visual consistency through the smallest set of CSS variables needed to define a theme.
6
+ Build UIs without tying components to a specific host stack, while keeping visual consistency through a small set of CSS variables.
7
7
 
8
8
  ## Why and use case
9
9