@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
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Toast — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/toast/toast, toast, Toast, UI component, sonic-toast, web component,
|
|
7
|
+
<meta name="description" content="Afficher un toast">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/toast/toast, toast, Toast, UI component, sonic-toast, web component, success, error, warning, info, preserve: true, dismissForever: true, id, ghost: true">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/toast/toast">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/toast/toast.html">
|
|
11
11
|
</head>
|
|
@@ -15,217 +15,106 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Toast</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Toast</strong>. Afficher un toast <span>Doc ID: <code>core/components/ui/toast/toast</code>. Keywords: Concorde, supersoniks, core/components/ui/toast/toast, toast, Toast, UI component, sonic-toast, web component, success, error, warning, info, preserve: true, dismissForever: true, id, ghost: true. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/toast/toast.html">https://concorde.supersoniks.org/crawl/core/components/ui/toast/toast.html</a>.</span></p>
|
|
19
19
|
<h1 id="toast">Toast</h1>
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
<pre><code><sonic-button onclick="SonicToast.add({ text: 'Simple notification' })">
|
|
24
|
-
Show toast
|
|
20
|
+
<h2 id="utilisation-de-base">Utilisation de base</h2>
|
|
21
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({ text: 'Message de notification simple' })">
|
|
22
|
+
Afficher un toast
|
|
25
23
|
</sonic-button>
|
|
26
24
|
</code></pre>
|
|
27
|
-
<h2 id="
|
|
28
|
-
<p
|
|
25
|
+
<h2 id="statut">Statut</h2>
|
|
26
|
+
<p>Les statuts disponibles sont : <code>success</code>, <code>error</code>, <code>warning</code>, <code>info</code> ou vide (par défaut).</p>
|
|
29
27
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
30
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
28
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Message par défaut', status: '' })">
|
|
31
29
|
Default
|
|
32
30
|
</sonic-button>
|
|
33
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
31
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Opération réussie !', status: 'success' })">
|
|
34
32
|
Success
|
|
35
33
|
</sonic-button>
|
|
36
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
34
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Une erreur est survenue', status: 'error' })">
|
|
37
35
|
Error
|
|
38
36
|
</sonic-button>
|
|
39
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
37
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Attention à ce point', status: 'warning' })">
|
|
40
38
|
Warning
|
|
41
39
|
</sonic-button>
|
|
42
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
40
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Information importante', status: 'info' })">
|
|
43
41
|
Info
|
|
44
42
|
</sonic-button>
|
|
45
43
|
</div>
|
|
46
44
|
</code></pre>
|
|
47
|
-
<h2 id="
|
|
48
|
-
<p>Set <strong><code>label</code></strong> for a bold title above <strong><code>text</code></strong>. <strong><code>title</code></strong> still works but is deprecated—use <strong><code>label</code></strong> in new code.</p>
|
|
45
|
+
<h2 id="avec-titre">Avec titre</h2>
|
|
49
46
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
50
|
-
<sonic-button
|
|
51
|
-
|
|
52
|
-
>
|
|
53
|
-
Toast with label
|
|
47
|
+
<sonic-button onclick="window.SonicToast.add({ title: 'Succès', text: 'Votre demande a été traitée avec succès.', status: 'success' })">
|
|
48
|
+
Toast avec titre
|
|
54
49
|
</sonic-button>
|
|
55
|
-
<sonic-button
|
|
56
|
-
|
|
57
|
-
>
|
|
58
|
-
Error with label
|
|
50
|
+
<sonic-button onclick="window.SonicToast.add({ title: 'Test', text: 'Une erreur est survenue lors du traitement.', status: 'error' })">
|
|
51
|
+
Toast d'erreur avec titre
|
|
59
52
|
</sonic-button>
|
|
60
53
|
</div>
|
|
61
54
|
</code></pre>
|
|
62
|
-
<h2 id="
|
|
63
|
-
<p
|
|
64
|
-
<pre><code><sonic-button
|
|
65
|
-
|
|
66
|
-
>
|
|
67
|
-
Toast with HTML
|
|
55
|
+
<h2 id="avec-contenu-html">Avec contenu HTML</h2>
|
|
56
|
+
<p>Le contenu du toast peut contenir du HTML.</p>
|
|
57
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({ text: 'Message avec <strong>HTML</strong> et un <a href=&quot;#&quot;>lien cliquable</a>', status: 'info' })">
|
|
58
|
+
Toast avec HTML
|
|
68
59
|
</sonic-button>
|
|
69
60
|
</code></pre>
|
|
70
|
-
<h2 id="
|
|
71
|
-
<p>
|
|
72
|
-
<pre><code><sonic-button
|
|
73
|
-
|
|
74
|
-
>
|
|
75
|
-
Persistent toast
|
|
61
|
+
<h2 id="persistance">Persistance</h2>
|
|
62
|
+
<p>Par défaut, les toasts disparaissent automatiquement. Avec <code>preserve: true</code>, le toast reste affiché jusqu'à ce qu'il soit fermé manuellement.</p>
|
|
63
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({ text: 'Ce toast ne disparaîtra pas automatiquement', status: 'info', preserve: true })">
|
|
64
|
+
Toast persistant
|
|
76
65
|
</sonic-button>
|
|
77
66
|
</code></pre>
|
|
78
|
-
<h2 id="
|
|
79
|
-
<p>
|
|
80
|
-
<pre><code><sonic-button
|
|
81
|
-
|
|
82
|
-
>
|
|
83
|
-
Dismiss forever
|
|
67
|
+
<h2 id="masquer-définitivement">Masquer définitivement</h2>
|
|
68
|
+
<p>Avec <code>dismissForever: true</code> et un <code>id</code>, le toast peut être masqué définitivement. Une fois fermé, il ne réapparaîtra plus même après rechargement de la page.</p>
|
|
69
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({ id: 'unique-toast-id', text: 'Ce toast peut être masqué définitivement', status: 'info', dismissForever: true })">
|
|
70
|
+
Toast avec dismiss forever
|
|
84
71
|
</sonic-button>
|
|
85
72
|
</code></pre>
|
|
86
|
-
<h2 id="
|
|
87
|
-
<p
|
|
88
|
-
<pre><code><sonic-button
|
|
89
|
-
|
|
90
|
-
>
|
|
91
|
-
Ghost toast
|
|
73
|
+
<h2 id="fantôme">Fantôme</h2>
|
|
74
|
+
<p>Avec <code>ghost: true</code>, le toast devient semi-transparent et non-interactif.</p>
|
|
75
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({ text: 'Toast fantôme (semi-transparent)', status: 'info', ghost: true })">
|
|
76
|
+
Toast ghost
|
|
92
77
|
</sonic-button>
|
|
93
78
|
</code></pre>
|
|
94
|
-
<h2 id="
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
<p>Removes every toast except <strong><code>ghost</code></strong> items.</p>
|
|
79
|
+
<h2 id="méthodes-de-suppression">Méthodes de suppression</h2>
|
|
80
|
+
<h3 id="tout-supprimer">Tout supprimer</h3>
|
|
81
|
+
<p>Supprime tous les toasts sauf ceux marqués comme <code>ghost</code>.</p>
|
|
98
82
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
99
|
-
<sonic-button onclick="SonicToast.add({ text: 'Toast 1', status: 'info' })">
|
|
100
|
-
<sonic-button onclick="SonicToast.add({ text: 'Toast 2', status: 'success' })">
|
|
101
|
-
<sonic-button onclick="SonicToast.add({ text: 'Toast 3', status: 'warning' })">
|
|
102
|
-
<sonic-button onclick="SonicToast.removeAll()">
|
|
83
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast 1', status: 'info' })">Ajouter toast 1</sonic-button>
|
|
84
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast 2', status: 'success' })">Ajouter toast 2</sonic-button>
|
|
85
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast 3', status: 'warning' })">Ajouter toast 3</sonic-button>
|
|
86
|
+
<sonic-button onclick="window.SonicToast.removeAll()">Supprimer tous</sonic-button>
|
|
103
87
|
</div>
|
|
104
88
|
</code></pre>
|
|
105
|
-
<h3 id="
|
|
89
|
+
<h3 id="supprimer-par-statut">Supprimer par statut</h3>
|
|
90
|
+
<p>Supprime tous les toasts d'un statut spécifique.</p>
|
|
106
91
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
107
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
108
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
109
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
110
|
-
<sonic-button onclick="SonicToast.removeItemsByStatus('success')">
|
|
111
|
-
<sonic-button onclick="SonicToast.removeItemsByStatus('error')">
|
|
92
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast success', status: 'success' })">Success</sonic-button>
|
|
93
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast error', status: 'error' })">Error</sonic-button>
|
|
94
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast warning', status: 'warning' })">Warning</sonic-button>
|
|
95
|
+
<sonic-button onclick="window.SonicToast.removeItemsByStatus('success')">Supprimer success</sonic-button>
|
|
96
|
+
<sonic-button onclick="window.SonicToast.removeItemsByStatus('error')">Supprimer error</sonic-button>
|
|
112
97
|
</div>
|
|
113
98
|
</code></pre>
|
|
114
|
-
<h3 id="
|
|
115
|
-
<p>
|
|
99
|
+
<h3 id="supprimer-les-éléments-temporaires">Supprimer les éléments temporaires</h3>
|
|
100
|
+
<p>Supprime tous les toasts qui ne sont pas marqués comme <code>preserve</code>.</p>
|
|
116
101
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
117
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
118
|
-
<sonic-button onclick="SonicToast.add({ text: '
|
|
119
|
-
|
|
120
|
-
</sonic-button>
|
|
121
|
-
<sonic-button onclick="SonicToast.removeTemporaryItems()">Remove temporary</sonic-button>
|
|
102
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast temporaire', status: 'info' })">Temporaire</sonic-button>
|
|
103
|
+
<sonic-button onclick="window.SonicToast.add({ text: 'Toast persistant', status: 'success', preserve: true })">Persistant</sonic-button>
|
|
104
|
+
<sonic-button onclick="window.SonicToast.removeTemporaryItems()">Supprimer temporaires</sonic-button>
|
|
122
105
|
</div>
|
|
123
106
|
</code></pre>
|
|
124
|
-
<h2 id="
|
|
125
|
-
<pre><code><sonic-button
|
|
126
|
-
onclick="SonicToast.add({
|
|
107
|
+
<h2 id="exemple-complet">Exemple complet</h2>
|
|
108
|
+
<pre><code><sonic-button onclick="window.SonicToast.add({
|
|
127
109
|
id: 'welcome-toast',
|
|
128
|
-
|
|
129
|
-
text: '
|
|
110
|
+
title: 'Bienvenue',
|
|
111
|
+
text: 'Bienvenue sur notre plateforme ! Vous pouvez commencer à explorer les fonctionnalités.',
|
|
130
112
|
status: 'success',
|
|
131
113
|
dismissForever: true
|
|
132
|
-
})"
|
|
133
|
-
|
|
134
|
-
Full example
|
|
114
|
+
})">
|
|
115
|
+
Toast complet
|
|
135
116
|
</sonic-button>
|
|
136
117
|
</code></pre>
|
|
137
|
-
<h2 id="accessibility">Accessibility</h2>
|
|
138
|
-
<p>Each toast uses <strong><code>role="alert"</code></strong> for <strong><code>error</code></strong> and <strong><code>role="status"</code></strong> otherwise (with <strong><code>aria-live="polite"</code></strong> when applicable). Status icons are decorative (<strong><code>aria-hidden</code></strong>). The close control has an i18n <strong><code>aria-label</code></strong>. When there is no <strong><code>label</code></strong>, a truncated string <strong><code>aria-label</code></strong> may be derived from plain <strong><code>text</code></strong>.</p>
|
|
139
|
-
<h2 id="api-reference">API reference</h2>
|
|
140
|
-
<p>Options passed to <strong><code>SonicToast.add(conf)</code></strong>:</p>
|
|
141
|
-
<table>
|
|
142
|
-
<thead>
|
|
143
|
-
<tr>
|
|
144
|
-
<th>Option</th>
|
|
145
|
-
<th>Values</th>
|
|
146
|
-
<th>Description</th>
|
|
147
|
-
</tr>
|
|
148
|
-
</thead>
|
|
149
|
-
<tbody><tr>
|
|
150
|
-
<td><code>text</code></td>
|
|
151
|
-
<td>string · Lit template</td>
|
|
152
|
-
<td>Main body; HTML strings are supported</td>
|
|
153
|
-
</tr>
|
|
154
|
-
<tr>
|
|
155
|
-
<td><code>label</code></td>
|
|
156
|
-
<td>string · Lit template</td>
|
|
157
|
-
<td>Optional heading above <strong><code>text</code></strong></td>
|
|
158
|
-
</tr>
|
|
159
|
-
<tr>
|
|
160
|
-
<td><code>title</code></td>
|
|
161
|
-
<td>string · Lit template</td>
|
|
162
|
-
<td>Deprecated alias for <strong><code>label</code></strong></td>
|
|
163
|
-
</tr>
|
|
164
|
-
<tr>
|
|
165
|
-
<td><code>status</code></td>
|
|
166
|
-
<td><code>success</code> · <code>error</code> · <code>warning</code> · <code>info</code> · `` (empty)</td>
|
|
167
|
-
<td>Semantic styling and live region behavior</td>
|
|
168
|
-
</tr>
|
|
169
|
-
<tr>
|
|
170
|
-
<td><code>id</code></td>
|
|
171
|
-
<td>string · number</td>
|
|
172
|
-
<td>Stable id for deduplication and <strong><code>dismissForever</code></strong> (defaults to timestamp)</td>
|
|
173
|
-
</tr>
|
|
174
|
-
<tr>
|
|
175
|
-
<td><code>preserve</code></td>
|
|
176
|
-
<td>boolean</td>
|
|
177
|
-
<td>Skip auto-hide; forced when <strong><code>text</code></strong> contains interactive markup</td>
|
|
178
|
-
</tr>
|
|
179
|
-
<tr>
|
|
180
|
-
<td><code>ghost</code></td>
|
|
181
|
-
<td>boolean</td>
|
|
182
|
-
<td>Semi-transparent and non-interactive; kept by <strong><code>removeAll</code></strong></td>
|
|
183
|
-
</tr>
|
|
184
|
-
<tr>
|
|
185
|
-
<td><code>dismissForever</code></td>
|
|
186
|
-
<td>boolean</td>
|
|
187
|
-
<td>Persist dismissal in <strong><code>localStorage</code></strong> when closed (requires stable <strong><code>id</code></strong>)</td>
|
|
188
|
-
</tr>
|
|
189
|
-
<tr>
|
|
190
|
-
<td><code>styleSheet</code></td>
|
|
191
|
-
<td>modal style input</td>
|
|
192
|
-
<td>Extra adopted styles on the toast item shadow root</td>
|
|
193
|
-
</tr>
|
|
194
|
-
<tr>
|
|
195
|
-
<td><code>useSlot</code></td>
|
|
196
|
-
<td>boolean</td>
|
|
197
|
-
<td>Legacy: project <strong><code>text</code></strong> into the light DOM slot</td>
|
|
198
|
-
</tr>
|
|
199
|
-
</tbody></table>
|
|
200
|
-
<table>
|
|
201
|
-
<thead>
|
|
202
|
-
<tr>
|
|
203
|
-
<th>Method</th>
|
|
204
|
-
<th>Description</th>
|
|
205
|
-
</tr>
|
|
206
|
-
</thead>
|
|
207
|
-
<tbody><tr>
|
|
208
|
-
<td><code>SonicToast.add(conf)</code></td>
|
|
209
|
-
<td>Append a toast; returns the config or <strong><code>null</code></strong> if skipped (dismissed forever or duplicate)</td>
|
|
210
|
-
</tr>
|
|
211
|
-
<tr>
|
|
212
|
-
<td><code>SonicToast.removeAll()</code></td>
|
|
213
|
-
<td>Remove all non-<strong><code>ghost</code></strong> toasts</td>
|
|
214
|
-
</tr>
|
|
215
|
-
<tr>
|
|
216
|
-
<td><code>SonicToast.removeItemsByStatus(status)</code></td>
|
|
217
|
-
<td>Remove toasts matching <strong><code>status</code></strong></td>
|
|
218
|
-
</tr>
|
|
219
|
-
<tr>
|
|
220
|
-
<td><code>SonicToast.removeItemById(id)</code></td>
|
|
221
|
-
<td>Remove a single toast by <strong><code>id</code></strong></td>
|
|
222
|
-
</tr>
|
|
223
|
-
<tr>
|
|
224
|
-
<td><code>SonicToast.removeTemporaryItems()</code></td>
|
|
225
|
-
<td>Remove toasts without <strong><code>preserve</code></strong></td>
|
|
226
|
-
</tr>
|
|
227
|
-
</tbody></table>
|
|
228
|
-
<p><strong><code>sonic-toast</code></strong> is mounted automatically; <strong><code>sonic-toast-item</code></strong> is internal. In iframes, toasts can delegate to the parent window via <strong><code>postMessage</code></strong>.</p>
|
|
229
118
|
|
|
230
119
|
</article>
|
|
231
120
|
</main>
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Tooltip — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/tooltip/tooltip, tooltip, Tooltip, UI component, sonic-tooltip, web component
|
|
7
|
+
<meta name="description" content="By default, tooltip is centered next to its content">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/tooltip/tooltip, tooltip, Tooltip, UI component, sonic-tooltip, web component">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/tooltip/tooltip">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/tooltip/tooltip.html">
|
|
11
11
|
</head>
|
|
@@ -15,124 +15,63 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Tooltip</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Tooltip</strong>. By default, tooltip is centered next to its content <span>Doc ID: <code>core/components/ui/tooltip/tooltip</code>. Keywords: Concorde, supersoniks, core/components/ui/tooltip/tooltip, tooltip, Tooltip, UI component, sonic-tooltip, web component. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/tooltip/tooltip.html">https://concorde.supersoniks.org/crawl/core/components/ui/tooltip/tooltip.html</a>.</span></p>
|
|
19
19
|
<h1 id="tooltip">Tooltip</h1>
|
|
20
|
-
<
|
|
21
|
-
<h2 id="basic-example">Basic example</h2>
|
|
22
|
-
<pre><code><sonic-tooltip label="Additional context on hover">
|
|
23
|
-
<sonic-button variant="outline">Hover me</sonic-button>
|
|
24
|
-
</sonic-tooltip>
|
|
20
|
+
<pre><code><sonic-tooltip label="Tada : Text appears">hover me</sonic-tooltip>
|
|
25
21
|
</code></pre>
|
|
26
22
|
<h2 id="placement">Placement</h2>
|
|
27
|
-
<p>
|
|
28
|
-
<pre><code><
|
|
29
|
-
<sonic-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<sonic-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<sonic-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<sonic-
|
|
39
|
-
|
|
40
|
-
</sonic-tooltip>
|
|
41
|
-
</div>
|
|
23
|
+
<p>By default, tooltip is centered next to its content</p>
|
|
24
|
+
<pre><code><sonic-tooltip placement="top" label="Top text">
|
|
25
|
+
<sonic-button>Top</sonic-button>
|
|
26
|
+
</sonic-tooltip>
|
|
27
|
+
<sonic-tooltip placement="bottom" label="Bottom text">
|
|
28
|
+
<sonic-button>Bottom</sonic-button>
|
|
29
|
+
</sonic-tooltip>
|
|
30
|
+
<sonic-tooltip placement="right" label="Right text">
|
|
31
|
+
<sonic-button>Right</sonic-button>
|
|
32
|
+
</sonic-tooltip>
|
|
33
|
+
<sonic-tooltip placement="left" label="Left text">
|
|
34
|
+
<sonic-button>Left</sonic-button>
|
|
35
|
+
</sonic-tooltip>
|
|
42
36
|
</code></pre>
|
|
43
|
-
<
|
|
37
|
+
<h2 id="more-placement">More placement</h2>
|
|
44
38
|
<pre><code><div class="flex gap-3 flex-wrap">
|
|
45
|
-
<sonic-tooltip placement="top-start" label="
|
|
39
|
+
<sonic-tooltip placement="top-start" label="My tooltip">
|
|
46
40
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Top start</sonic-button>
|
|
47
41
|
</sonic-tooltip>
|
|
48
|
-
<sonic-tooltip placement="top-end" label="
|
|
42
|
+
<sonic-tooltip placement="top-end" label="My tooltip">
|
|
49
43
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Top end</sonic-button>
|
|
50
44
|
</sonic-tooltip>
|
|
51
|
-
<sonic-tooltip placement="bottom-start" label="
|
|
45
|
+
<sonic-tooltip placement="bottom-start" label="My tooltip">
|
|
52
46
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom start</sonic-button>
|
|
53
47
|
</sonic-tooltip>
|
|
54
|
-
<sonic-tooltip placement="bottom-end" label="
|
|
48
|
+
<sonic-tooltip placement="bottom-end" label="My tooltip">
|
|
55
49
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Bottom end</sonic-button>
|
|
56
50
|
</sonic-tooltip>
|
|
57
|
-
<sonic-tooltip placement="right-start" label="
|
|
51
|
+
<sonic-tooltip placement="right-start" label="My tooltip">
|
|
58
52
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Right start</sonic-button>
|
|
59
53
|
</sonic-tooltip>
|
|
60
|
-
<sonic-tooltip placement="right-end" label="
|
|
54
|
+
<sonic-tooltip placement="right-end" label="My tooltip">
|
|
61
55
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Right end</sonic-button>
|
|
62
56
|
</sonic-tooltip>
|
|
63
|
-
<sonic-tooltip placement="left-start" label="
|
|
57
|
+
<sonic-tooltip placement="left-start" label="My tooltip">
|
|
64
58
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Left start</sonic-button>
|
|
65
59
|
</sonic-tooltip>
|
|
66
|
-
<sonic-tooltip placement="left-end" label="
|
|
60
|
+
<sonic-tooltip placement="left-end" label="My tooltip">
|
|
67
61
|
<sonic-button class="size-40 bg-neutral-200 rounded-lg">Left end</sonic-button>
|
|
68
62
|
</sonic-tooltip>
|
|
69
63
|
</div>
|
|
70
64
|
</code></pre>
|
|
71
|
-
<h2 id="label-formatting">Label formatting</h2>
|
|
72
|
-
<p><strong><code>label</code></strong> supports line breaks (<code>\n</code> in markup or multiline text). Lines are trimmed; <strong><code>&nbsp;</code></strong> is normalized to spaces. <strong><code>white-space: pre-line</code></strong> preserves breaks in the bubble (max width <strong>18rem</strong>).</p>
|
|
73
|
-
<pre><code><sonic-tooltip label="First line&#10;Second line">
|
|
74
|
-
<sonic-button variant="outline">Multiline label</sonic-button>
|
|
75
|
-
</sonic-tooltip>
|
|
76
|
-
</code></pre>
|
|
77
65
|
<h2 id="focusable">Focusable</h2>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
focusable
|
|
81
|
-
label="The Concorde made its first transatlantic crossing on September 26, 1973"
|
|
82
|
-
>
|
|
83
|
-
<sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon>
|
|
84
|
-
Focus or hover this text
|
|
66
|
+
<pre><code><sonic-tooltip focusable label="The Concorde made its first transatlantic crossing on September 26, 1973">
|
|
67
|
+
<sonic-icon library="iconoir" name="chat-bubble-question"></sonic-icon> Focus or hover non interactive element
|
|
85
68
|
</sonic-tooltip>
|
|
86
69
|
</code></pre>
|
|
87
70
|
<h2 id="disabled">Disabled</h2>
|
|
88
|
-
<pre><code><sonic-tooltip disabled label="
|
|
71
|
+
<pre><code><sonic-tooltip disabled label="Disabled text">
|
|
89
72
|
<sonic-button>Tooltip disabled</sonic-button>
|
|
90
73
|
</sonic-tooltip>
|
|
91
74
|
</code></pre>
|
|
92
|
-
<h2 id="accessibility">Accessibility</h2>
|
|
93
|
-
<p>The bubble uses <strong><code>popover="hint"</code></strong> (non-modal, no pointer capture). Prefer <strong><code>focusable</code></strong> when the slotted content is not already focusable. When the Popover API is unavailable, the host falls back to the native <strong><code>title</code></strong> attribute with a single-line label. Opacity transitions respect <strong><code>prefers-reduced-motion</code></strong>.</p>
|
|
94
|
-
<h2 id="api-reference">API reference</h2>
|
|
95
|
-
<table>
|
|
96
|
-
<thead>
|
|
97
|
-
<tr>
|
|
98
|
-
<th>Attribute</th>
|
|
99
|
-
<th>Values</th>
|
|
100
|
-
<th>Description</th>
|
|
101
|
-
</tr>
|
|
102
|
-
</thead>
|
|
103
|
-
<tbody><tr>
|
|
104
|
-
<td><code>label</code></td>
|
|
105
|
-
<td>string</td>
|
|
106
|
-
<td>Tooltip copy; whitespace-only values suppress the bubble</td>
|
|
107
|
-
</tr>
|
|
108
|
-
<tr>
|
|
109
|
-
<td><code>placement</code></td>
|
|
110
|
-
<td><code>top</code> (default) · <code>bottom</code> · <code>left</code> · <code>right</code> · <code>top-start</code> · <code>top-end</code> · <code>bottom-start</code> · <code>bottom-end</code> · <code>left-start</code> · <code>left-end</code> · <code>right-start</code> · <code>right-end</code></td>
|
|
111
|
-
<td>Position relative to the trigger; repositions while open</td>
|
|
112
|
-
</tr>
|
|
113
|
-
<tr>
|
|
114
|
-
<td><code>disabled</code></td>
|
|
115
|
-
<td>boolean</td>
|
|
116
|
-
<td>Suppress show/hide; sets <strong><code>tabindex="-1"</code></strong> on the host</td>
|
|
117
|
-
</tr>
|
|
118
|
-
<tr>
|
|
119
|
-
<td><code>focusable</code></td>
|
|
120
|
-
<td>boolean</td>
|
|
121
|
-
<td>Add <strong><code>tabindex="0"</code></strong> on the host for keyboard access</td>
|
|
122
|
-
</tr>
|
|
123
|
-
</tbody></table>
|
|
124
|
-
<table>
|
|
125
|
-
<thead>
|
|
126
|
-
<tr>
|
|
127
|
-
<th>Slot</th>
|
|
128
|
-
<th>Description</th>
|
|
129
|
-
</tr>
|
|
130
|
-
</thead>
|
|
131
|
-
<tbody><tr>
|
|
132
|
-
<td><em>(default)</em></td>
|
|
133
|
-
<td>Trigger content (hover target)</td>
|
|
134
|
-
</tr>
|
|
135
|
-
</tbody></table>
|
|
136
75
|
|
|
137
76
|
</article>
|
|
138
77
|
</main>
|
|
@@ -66,11 +66,10 @@ export class DemoAncestorAttribute extends LitElement {
|
|
|
66
66
|
<li>By default (<code>dynamic: false</code>), the value is read once at connect time and is not updated afterward</li>
|
|
67
67
|
<li>With <code>{ dynamic: true }</code>, the property stays in sync when:<ul>
|
|
68
68
|
<li>an ancestor <strong>changes</strong> the attribute value</li>
|
|
69
|
-
<li>a <strong>closer</strong> ancestor <strong>gains</strong>
|
|
70
|
-
<li>the
|
|
69
|
+
<li>a <strong>closer</strong> ancestor <strong>gains</strong> the attribute (that value wins)</li>
|
|
70
|
+
<li>the <strong>nearest</strong> ancestor <strong>loses</strong> the attribute (falls back to the next one up, or <code>null</code>)</li>
|
|
71
71
|
</ul>
|
|
72
72
|
</li>
|
|
73
|
-
<li>Observers are <strong>shared</strong> (one per ancestor attribute / one per parent) so large lists of <code>sonic-icon</code> stay cheap on Firefox.</li>
|
|
74
73
|
<li>When <code>dynamic</code> is enabled, updates also propagate to <code>@subscribe</code> / <code>@bind</code> paths that depend on the decorated property (e.g. <code>${dataProvider}</code>)</li>
|
|
75
74
|
</ul>
|
|
76
75
|
<h3 id="dynamic-mode">Dynamic mode</h3>
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<article>
|
|
18
18
|
<p class="doc-lead" id="doc-summary"><strong>Concorde guide — Installation</strong>. The following command creates a new Vite project in TypeScript mode with Tailwind and an example component to get started. <span>Doc ID: <code>docs/_getting-started/concorde-outside</code>. Keywords: Concorde, supersoniks, docs/_getting-started/concorde-outside, concorde-outside, Installation, guide, yarn ai:sync. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_getting-started/concorde-outside.html">https://concorde.supersoniks.org/crawl/docs/_getting-started/concorde-outside.html</a>.</span></p>
|
|
19
19
|
<h1 id="installation">Installation</h1>
|
|
20
|
-
<sonic-alert status="
|
|
21
|
-
<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>
|
|
22
|
-
<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="./ai-agents.html#ai-agents">AI agent skills</a> (<code>AGENTS.md</code>, Cursor / JetBrains rules) without extra setup.</p>
|
|
20
|
+
<sonic-alert status="success" label="Recommended — use the starter" size="xl" background>
|
|
21
|
+
<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>
|
|
22
|
+
<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="./ai-agents.html#ai-agents">AI agent skills</a> (<code>AGENTS.md</code>, Cursor / JetBrains rules) without extra setup.</p>
|
|
23
23
|
</sonic-alert>
|
|
24
24
|
|
|
25
25
|
<h2 id="starter">Starter</h2>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<p class="doc-lead" id="doc-summary"><strong>Concorde guide — Introduction</strong>. Based on lit.dev, Concorde is a collection of web components for shared apps and websites. <span>Doc ID: <code>docs/_getting-started/start</code>. Keywords: Concorde, supersoniks, docs/_getting-started/start, start, Introduction, guide, get, set, formDataProvider, @ancestorAttribute, @bind, serviceURL, yarn ai:sync, AGENTS.md. URL: <a href="https://concorde.supersoniks.org/crawl/docs/_getting-started/start.html">https://concorde.supersoniks.org/crawl/docs/_getting-started/start.html</a>.</span></p>
|
|
19
19
|
<h1 id="introduction">Introduction</h1>
|
|
20
20
|
<h2 id="what-is-concorde">What is Concorde?</h2>
|
|
21
|
-
<p>Based on <strong><a href="https://lit.dev">lit.dev</a></strong>, Concorde is a collection of web components for shared apps and websites.<br>Build UIs without tying components to a specific host stack, while keeping visual consistency through
|
|
21
|
+
<p>Based on <strong><a href="https://lit.dev">lit.dev</a></strong>, Concorde is a collection of web components for shared apps and websites.<br>Build UIs without tying components to a specific host stack, while keeping visual consistency through a small set of CSS variables.</p>
|
|
22
22
|
<h2 id="why-and-use-case">Why and use case</h2>
|
|
23
23
|
<p>In 2022, Supersoniks needed a new ticketing stack for nearly 100 sites — mobile apps, modern sites, and legacy PHP without bundlers.<br>One composable web-component library replaced many one-off apps. Lit was chosen for broad runtime compatibility.</p>
|
|
24
24
|
<h3 id="stack">Stack</h3>
|