@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.
- package/.github/workflows/ci.yml +21 -0
- package/.github-export-ignore +30 -0
- package/.tmp-cem/custom-elements.json +13705 -0
- package/CONTRIBUTING.md +59 -0
- package/DEV.md +54 -0
- package/LICENSE +21 -0
- package/OPEN_SOURCE_CHECKPOINT.md +133 -0
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3960 -0
- package/concorde-3d.es.js +33433 -0
- package/concorde-core.bundle.js +196 -196
- package/concorde-core.es.js +3685 -3405
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-interactive.bundle.js +1157 -0
- package/concorde-interactive.es.js +10734 -0
- package/concorde-shader.bundle.js +116 -0
- package/concorde-shader.es.js +8353 -0
- package/concorde-webgpu.bundle.js +307 -0
- package/concorde-webgpu.es.js +8627 -0
- package/custom-elements-manifest.config.mjs +14 -0
- package/dist/concorde-core.bundle.js +196 -196
- package/dist/concorde-core.es.js +3685 -3405
- package/docs/assets/{index-wVZpLVYW.js → index-D8MVWqY6.js} +1351 -1222
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/alert/alert.html +71 -172
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +5 -113
- package/docs/crawl/core/components/ui/badge/badge.html +79 -157
- package/docs/crawl/core/components/ui/button/button.html +0 -1
- package/docs/crawl/core/components/ui/captcha/captcha.html +8 -90
- package/docs/crawl/core/components/ui/card/card.html +68 -222
- package/docs/crawl/core/components/ui/divider/divider.html +31 -117
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +101 -232
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +52 -95
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +38 -97
- package/docs/crawl/core/components/ui/form/input/input.html +3 -3
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
- package/docs/crawl/core/components/ui/group/group.html +38 -60
- package/docs/crawl/core/components/ui/icon/icon.html +47 -136
- package/docs/crawl/core/components/ui/image/image.html +56 -244
- package/docs/crawl/core/components/ui/link/link.html +9 -67
- package/docs/crawl/core/components/ui/loader/loader.html +23 -97
- package/docs/crawl/core/components/ui/menu/menu.html +90 -162
- package/docs/crawl/core/components/ui/modal/modal.html +50 -275
- package/docs/crawl/core/components/ui/pop/pop.html +66 -260
- package/docs/crawl/core/components/ui/progress/progress.html +30 -103
- package/docs/crawl/core/components/ui/table/table.html +171 -303
- package/docs/crawl/core/components/ui/toast/toast.html +59 -170
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +29 -90
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +2 -3
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +63 -311
- package/docs/crawl/hubs/form-components.html +53 -75
- package/docs/crawl/index.html +6 -7
- package/docs/docs-mock-api-sw.js +0 -2
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +7 -9
- package/docs/llms-full.txt +456 -1703
- package/docs/llms.txt +32 -25
- package/docs/sitemap.xml +0 -3
- package/docs/src/core/components/functional/fetch/fetch.md +0 -0
- package/docs/src/core/components/functional/if/if.md +0 -0
- package/docs/src/core/components/functional/list/list.md +0 -0
- package/docs/src/core/components/functional/router/router.md +0 -0
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/functional/states/states.md +0 -0
- package/docs/src/core/components/functional/submit/submit.md +0 -0
- package/docs/src/core/components/ui/alert/alert.md +72 -147
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
- package/docs/src/core/components/ui/badge/badge.md +80 -141
- package/docs/src/core/components/ui/button/button.md +0 -1
- package/docs/src/core/components/ui/captcha/captcha.md +6 -65
- package/docs/src/core/components/ui/card/card.md +65 -183
- package/docs/src/core/components/ui/divider/divider.md +13 -107
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +99 -175
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +52 -75
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +34 -109
- package/docs/src/core/components/ui/form/input/input.md +1 -1
- package/docs/src/core/components/ui/form/radio/radio.md +0 -0
- package/docs/src/core/components/ui/form/select/select.md +0 -0
- package/docs/src/core/components/ui/form/switch/switch.md +0 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +43 -132
- package/docs/src/core/components/ui/image/image.md +53 -179
- package/docs/src/core/components/ui/link/link.md +7 -45
- package/docs/src/core/components/ui/loader/loader.md +22 -79
- package/docs/src/core/components/ui/menu/menu.md +92 -133
- package/docs/src/core/components/ui/modal/modal.md +47 -163
- package/docs/src/core/components/ui/pop/pop.md +64 -262
- package/docs/src/core/components/ui/progress/progress.md +30 -76
- package/docs/src/core/components/ui/table/table.md +171 -147
- package/docs/src/core/components/ui/toast/toast.md +58 -108
- package/docs/src/core/components/ui/tooltip/tooltip.md +26 -68
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +2 -3
- package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/docs/src/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +61 -223
- package/docs/src/docs/search/docs-search.json +348 -3083
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +3 -63
- package/gitlab/job_github_mirror.sh +39 -0
- package/package.json +36 -2
- package/scripts/generate-sdui-catalog.mjs +250 -0
- package/scripts/generate-sdui-catalog.spec.ts +91 -0
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -0
- package/scripts/pre-build.mjs +15 -0
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/if/if.ts +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
- package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
- package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
- package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
- package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
- package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
- package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
- package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
- package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
- package/src/core/components/functional/sdui/sdui.md +122 -0
- package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
- package/src/core/components/functional/sdui/sdui.ts +442 -34
- package/src/core/components/functional/sdui/types.ts +49 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/submit/submit.md +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/css.d.ts +19 -0
- package/src/docs/_core-concept/subscriber.md +0 -0
- package/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/src/docs/_getting-started/pubsub.md +0 -0
- package/src/docs/example/users.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +90 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/docs/assets/index-CD4WyL6o.css +0 -1
- package/docs/crawl/core/components/ui/theme/theme.html +0 -131
- package/docs/src/core/components/ui/theme/theme.md +0 -122
|
@@ -1,216 +1,166 @@
|
|
|
1
1
|
# Toast
|
|
2
2
|
|
|
3
|
-
|
|
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: '
|
|
12
|
-
|
|
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
|
-
##
|
|
13
|
+
## Statut
|
|
18
14
|
|
|
19
|
-
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
54
|
+
## Avec contenu HTML
|
|
65
55
|
|
|
66
|
-
|
|
56
|
+
Le contenu du toast peut contenir du HTML.
|
|
67
57
|
|
|
68
58
|
<sonic-code>
|
|
69
59
|
<template>
|
|
70
|
-
<sonic-button
|
|
71
|
-
|
|
72
|
-
>
|
|
73
|
-
Toast with HTML
|
|
60
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Message avec <strong>HTML</strong> et un <a href="#">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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
79
|
+
## Masquer définitivement
|
|
93
80
|
|
|
94
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
91
|
+
## Fantôme
|
|
107
92
|
|
|
108
|
-
|
|
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
|
-
|
|
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
|
-
|
|
104
|
+
## Méthodes de suppression
|
|
123
105
|
|
|
124
|
-
###
|
|
106
|
+
### Tout supprimer
|
|
125
107
|
|
|
126
|
-
|
|
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' })">
|
|
132
|
-
<sonic-button onclick="SonicToast.add({ text: 'Toast 2', status: 'success' })">
|
|
133
|
-
<sonic-button onclick="SonicToast.add({ text: 'Toast 3', status: 'warning' })">
|
|
134
|
-
<sonic-button onclick="SonicToast.removeAll()">
|
|
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
|
-
###
|
|
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: '
|
|
145
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
146
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
147
|
-
<sonic-button onclick="SonicToast.removeItemsByStatus('success')">
|
|
148
|
-
<sonic-button onclick="SonicToast.removeItemsByStatus('error')">
|
|
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
|
-
###
|
|
137
|
+
### Supprimer les éléments temporaires
|
|
154
138
|
|
|
155
|
-
|
|
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: '
|
|
161
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
162
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
177
|
-
text: '
|
|
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="
|
|
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
|
-
|
|
11
|
+
By default, tooltip is centered next to its content
|
|
18
12
|
|
|
19
13
|
<sonic-code>
|
|
20
14
|
<template>
|
|
21
|
-
<
|
|
22
|
-
<sonic-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<sonic-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<sonic-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<sonic-
|
|
32
|
-
|
|
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
|
-
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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="
|
|
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; **` `** 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 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
|
-
|
|
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="
|
|
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**
|
|
73
|
-
- the
|
|
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="
|
|
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
|
|
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
|
|
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
|
|