@supersoniks/concorde 5.0.2 → 5.0.3
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/build-infos.json +1 -1
- package/concorde-core.bundle.js +1 -1
- package/concorde-core.es.js +1 -1
- package/dist/concorde-core.bundle.js +1 -1
- package/dist/concorde-core.es.js +1 -1
- package/docs/altcha-widget.js +2662 -0
- package/docs/assets/index--GpD7R7a.css +1 -0
- package/docs/assets/index-BnK6OS7w.js +12115 -0
- package/docs/crawl/core/components/functional/date/date.html +190 -0
- package/docs/crawl/core/components/functional/fetch/fetch.html +109 -0
- package/docs/crawl/core/components/functional/if/if.html +27 -0
- package/docs/crawl/core/components/functional/jsonata/jsonata.html +79 -0
- package/docs/crawl/core/components/functional/list/list.html +70 -0
- package/docs/crawl/core/components/functional/mix/mix.html +45 -0
- package/docs/crawl/core/components/functional/queue/queue.html +96 -0
- package/docs/crawl/core/components/functional/router/router.html +106 -0
- package/docs/crawl/core/components/functional/sdui/sdui.html +269 -0
- package/docs/crawl/core/components/functional/states/states.html +66 -0
- package/docs/crawl/core/components/functional/submit/submit.html +160 -0
- package/docs/crawl/core/components/functional/subscriber/subscriber.html +67 -0
- package/docs/crawl/core/components/functional/value/value.html +51 -0
- package/docs/crawl/core/components/ui/alert/alert.html +140 -0
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +23 -0
- package/docs/crawl/core/components/ui/badge/badge.html +148 -0
- package/docs/crawl/core/components/ui/button/button.html +150 -0
- package/docs/crawl/core/components/ui/captcha/captcha.html +30 -0
- package/docs/crawl/core/components/ui/card/card.html +143 -0
- package/docs/crawl/core/components/ui/divider/divider.html +58 -0
- package/docs/crawl/core/components/ui/form/checkbox/checkbox.html +73 -0
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +135 -0
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +79 -0
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +62 -0
- package/docs/crawl/core/components/ui/form/input/input.html +109 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +38 -0
- package/docs/crawl/core/components/ui/form/radio/radio.html +56 -0
- package/docs/crawl/core/components/ui/form/select/select.html +73 -0
- package/docs/crawl/core/components/ui/form/switch/switch.html +56 -0
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +59 -0
- package/docs/crawl/core/components/ui/group/group.html +82 -0
- package/docs/crawl/core/components/ui/icon/icon.html +133 -0
- package/docs/crawl/core/components/ui/image/image.html +186 -0
- package/docs/crawl/core/components/ui/link/link.html +42 -0
- package/docs/crawl/core/components/ui/loader/loader.html +50 -0
- package/docs/crawl/core/components/ui/menu/menu.html +322 -0
- package/docs/crawl/core/components/ui/modal/modal.html +117 -0
- package/docs/crawl/core/components/ui/pop/pop.html +178 -0
- package/docs/crawl/core/components/ui/progress/progress.html +58 -0
- package/docs/crawl/core/components/ui/table/table.html +413 -0
- package/docs/crawl/core/components/ui/toast/toast.html +122 -0
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +79 -0
- package/docs/crawl/docs/_core-concept/dataFlow.html +177 -0
- package/docs/crawl/docs/_core-concept/overview.html +66 -0
- package/docs/crawl/docs/_core-concept/subscriber.html +75 -0
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +116 -0
- package/docs/crawl/docs/_decorators/auto-subscribe.html +202 -0
- package/docs/crawl/docs/_decorators/bind.html +141 -0
- package/docs/crawl/docs/_decorators/get.html +149 -0
- package/docs/crawl/docs/_decorators/handle.html +165 -0
- package/docs/crawl/docs/_decorators/on-assign.html +355 -0
- package/docs/crawl/docs/_decorators/patch.html +78 -0
- package/docs/crawl/docs/_decorators/post.html +139 -0
- package/docs/crawl/docs/_decorators/publish.html +61 -0
- package/docs/crawl/docs/_decorators/put.html +78 -0
- package/docs/crawl/docs/_decorators/subscribe.html +109 -0
- package/docs/crawl/docs/_decorators/wait-for-ancestors.html +137 -0
- package/docs/crawl/docs/_directives/sub.html +93 -0
- package/docs/crawl/docs/_getting-started/ai-agents.html +173 -0
- package/docs/crawl/docs/_getting-started/concorde-manual-install.html +100 -0
- package/docs/crawl/docs/_getting-started/concorde-outside.html +58 -0
- package/docs/crawl/docs/_getting-started/create-a-component.html +111 -0
- package/docs/crawl/docs/_getting-started/my-first-component.html +189 -0
- package/docs/crawl/docs/_getting-started/my-first-subscriber.html +110 -0
- package/docs/crawl/docs/_getting-started/pubsub.html +62 -0
- package/docs/crawl/docs/_getting-started/start.html +76 -0
- package/docs/crawl/docs/_getting-started/theming.html +85 -0
- package/docs/crawl/docs/_misc/api-configuration.html +149 -0
- package/docs/crawl/docs/_misc/dataProviderKey.html +135 -0
- package/docs/crawl/docs/_misc/docs-mock-api.html +158 -0
- package/docs/crawl/docs/_misc/dynamic-path.html +180 -0
- package/docs/crawl/docs/_misc/endpoint.html +50 -0
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +138 -0
- package/docs/crawl/docs/_misc/html-integration.html +48 -0
- package/docs/crawl/hubs/decorators.html +547 -0
- package/docs/crawl/hubs/form-components.html +359 -0
- package/docs/crawl/hubs/remote-data.html +452 -0
- package/docs/crawl/index.html +101 -0
- package/docs/css/docs.css +0 -0
- package/docs/docs-mock-api-sw.js +724 -0
- package/docs/docs-mock-api-sw.js.map +7 -0
- package/docs/fonts/ClashGrotesk-Bold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Bold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Bold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.eot +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff +0 -0
- package/docs/fonts/ClashGrotesk-Extralight.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Light.eot +0 -0
- package/docs/fonts/ClashGrotesk-Light.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff +0 -0
- package/docs/fonts/ClashGrotesk-Light.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Medium.eot +0 -0
- package/docs/fonts/ClashGrotesk-Medium.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff +0 -0
- package/docs/fonts/ClashGrotesk-Medium.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Regular.eot +0 -0
- package/docs/fonts/ClashGrotesk-Regular.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff +0 -0
- package/docs/fonts/ClashGrotesk-Regular.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.eot +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff +0 -0
- package/docs/fonts/ClashGrotesk-Semibold.woff2 +0 -0
- package/docs/fonts/ClashGrotesk-Variable.eot +0 -0
- package/docs/fonts/ClashGrotesk-Variable.ttf +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff +0 -0
- package/docs/fonts/ClashGrotesk-Variable.woff2 +0 -0
- package/docs/img/concorde-icon.svg +5 -0
- package/docs/img/concorde-logo.svg +1 -0
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/img/concorde_seuil.png.webp +0 -0
- package/docs/img/concorde_seuil_invert.png +0 -0
- package/docs/img/paul_metrand.jpg +0 -0
- package/docs/img/paul_metrand_xs.jpg +0 -0
- package/docs/index.html +93 -0
- package/docs/llms-full.txt +5945 -0
- package/docs/llms.txt +104 -0
- package/docs/robots.txt +16 -0
- package/docs/sitemap.xml +237 -0
- package/docs/src/core/components/functional/date/date.md +290 -0
- package/docs/src/core/components/functional/fetch/fetch.md +125 -0
- package/docs/src/core/components/functional/if/if.md +9 -0
- package/docs/src/core/components/functional/jsonata/jsonata.md +56 -0
- package/docs/src/core/components/functional/list/list.md +65 -0
- package/docs/src/core/components/functional/mix/mix.md +41 -0
- package/docs/src/core/components/functional/queue/queue.md +72 -0
- package/docs/src/core/components/functional/router/router.md +94 -0
- package/docs/src/core/components/functional/sdui/default-library.json +108 -0
- package/docs/src/core/components/functional/sdui/example.json +99 -0
- package/docs/src/core/components/functional/sdui/sdui.md +356 -0
- package/docs/src/core/components/functional/states/states.md +87 -0
- package/docs/src/core/components/functional/submit/submit.md +114 -0
- package/docs/src/core/components/functional/subscriber/subscriber.md +91 -0
- package/docs/src/core/components/functional/value/value.md +35 -0
- package/docs/src/core/components/ui/alert/alert.md +177 -0
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
- package/docs/src/core/components/ui/badge/badge.md +175 -0
- package/docs/src/core/components/ui/button/button.md +183 -0
- package/docs/src/core/components/ui/captcha/captcha.md +12 -0
- package/docs/src/core/components/ui/card/card.md +152 -0
- package/docs/src/core/components/ui/divider/divider.md +35 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +77 -0
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +129 -0
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +77 -0
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +44 -0
- package/docs/src/core/components/ui/form/input/input.md +142 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +29 -0
- package/docs/src/core/components/ui/form/radio/radio.md +57 -0
- package/docs/src/core/components/ui/form/select/select.md +71 -0
- package/docs/src/core/components/ui/form/switch/switch.md +57 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +65 -0
- package/docs/src/core/components/ui/group/group.md +75 -0
- package/docs/src/core/components/ui/icon/icon.md +125 -0
- package/docs/src/core/components/ui/icon/icons.json +1 -0
- package/docs/src/core/components/ui/image/image.md +201 -0
- package/docs/src/core/components/ui/link/link.md +43 -0
- package/docs/src/core/components/ui/loader/loader.md +55 -0
- package/docs/src/core/components/ui/menu/menu.md +329 -0
- package/docs/src/core/components/ui/modal/modal.md +119 -0
- package/docs/src/core/components/ui/pop/pop.md +200 -0
- package/docs/src/core/components/ui/progress/progress.md +63 -0
- package/docs/src/core/components/ui/table/table.md +455 -0
- package/docs/src/core/components/ui/toast/toast.md +166 -0
- package/docs/src/core/components/ui/tooltip/tooltip.md +82 -0
- package/docs/src/docs/_core-concept/dataFlow.md +88 -0
- package/docs/src/docs/_core-concept/overview.md +57 -0
- package/docs/src/docs/_core-concept/subscriber.md +75 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +127 -0
- package/docs/src/docs/_decorators/auto-subscribe.md +202 -0
- package/docs/src/docs/_decorators/bind.md +167 -0
- package/docs/src/docs/_decorators/get.md +162 -0
- package/docs/src/docs/_decorators/handle.md +175 -0
- package/docs/src/docs/_decorators/on-assign.md +390 -0
- package/docs/src/docs/_decorators/patch.md +70 -0
- package/docs/src/docs/_decorators/post.md +146 -0
- package/docs/src/docs/_decorators/publish.md +55 -0
- package/docs/src/docs/_decorators/put.md +70 -0
- package/docs/src/docs/_decorators/subscribe.md +100 -0
- package/docs/src/docs/_decorators/wait-for-ancestors.md +163 -0
- package/docs/src/docs/_directives/sub.md +91 -0
- package/docs/src/docs/_getting-started/ai-agents.md +76 -0
- package/docs/src/docs/_getting-started/concorde-manual-install.md +133 -0
- package/docs/src/docs/_getting-started/concorde-outside.md +33 -0
- package/docs/src/docs/_getting-started/create-a-component.md +139 -0
- package/docs/src/docs/_getting-started/my-first-component.md +236 -0
- package/docs/src/docs/_getting-started/my-first-subscriber.md +120 -0
- package/docs/src/docs/_getting-started/pubsub.md +37 -0
- package/docs/src/docs/_getting-started/start.md +47 -0
- package/docs/src/docs/_getting-started/theming.md +91 -0
- package/docs/src/docs/_misc/api-configuration.md +81 -0
- package/docs/src/docs/_misc/dataProviderKey.md +168 -0
- package/docs/src/docs/_misc/docs-mock-api.md +63 -0
- package/docs/src/docs/_misc/dynamic-path.md +71 -0
- package/docs/src/docs/_misc/endpoint.md +45 -0
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/docs/src/docs/_misc/html-integration.md +15 -0
- package/docs/src/docs/search/docs-search.json +10137 -0
- package/docs/src/tag-list.json +1 -0
- package/docs/src/tsconfig-model.json +23 -0
- package/docs/src/tsconfig.json +1224 -0
- package/docs/svg/regular/plane.svg +1 -0
- package/docs/svg/solid/plane.svg +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/functional/submit/submit.html" data-doc-id="core/components/functional/submit/submit">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Submit — Concorde</title>
|
|
7
|
+
<meta name="description" content="> Live demos: <docs-lit-demo> + src/docs/example/docs-submit-demos.ts. Use Local API demos (serviceURL="/docs-mock-api").">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/functional/submit/submit, submit, Submit, functional component, sonic-submit, web component, , src/docs/example/docs-submit-demos.ts, serviceURL="/docs-mock-api", serviceURL, dataProvider, endPoint, onClick, onEnterKey, formDataProvider, sonic-input">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/functional/submit/submit">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/functional/submit/submit.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/functional/submit/submit.md/submit" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde functional component — Submit</strong>. > Live demos: <docs-lit-demo> + src/docs/example/docs-submit-demos.ts. Use Local API demos (serviceURL="/docs-mock-api"). <span>Doc ID: <code>core/components/functional/submit/submit</code>. Keywords: Concorde, supersoniks, core/components/functional/submit/submit, submit, Submit, functional component, sonic-submit, web component, , src/docs/example/docs-submit-demos.ts, serviceURL="/docs-mock-api", serviceURL, dataProvider, endPoint, onClick, onEnterKey, formDataProvider, sonic-input. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/functional/submit/submit.html">https://concorde.supersoniks.org/crawl/core/components/functional/submit/submit.html</a>.</span></p>
|
|
19
|
+
<h1 id="submit">Submit</h1>
|
|
20
|
+
<blockquote>
|
|
21
|
+
<p><strong>Live demos:</strong> <code><docs-lit-demo></code> + <code>src/docs/example/docs-submit-demos.ts</code>. Use <a href="../../../../docs/_misc/docs-mock-api.html#docs-mock-api">Local API demos</a> (<code>serviceURL="/docs-mock-api"</code>).</p>
|
|
22
|
+
</blockquote>
|
|
23
|
+
<h2 id="overview">Overview</h2>
|
|
24
|
+
<p><strong>sonic-submit</strong> sends the <strong>formDataProvider</strong> publisher to a REST endpoint (same configuration model as <a href="../fetch/fetch.html#fetch">fetch</a>: <code>serviceURL</code> on an ancestor, path via <code>dataProvider</code> or <code>endPoint</code>).</p>
|
|
25
|
+
<table>
|
|
26
|
+
<thead>
|
|
27
|
+
<tr>
|
|
28
|
+
<th>Trigger</th>
|
|
29
|
+
<th>Attribute</th>
|
|
30
|
+
</tr>
|
|
31
|
+
</thead>
|
|
32
|
+
<tbody><tr>
|
|
33
|
+
<td>Click inside the slot</td>
|
|
34
|
+
<td><code>onClick</code></td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr>
|
|
37
|
+
<td>Enter in a focused field inside the slot</td>
|
|
38
|
+
<td><code>onEnterKey</code></td>
|
|
39
|
+
</tr>
|
|
40
|
+
</tbody></table>
|
|
41
|
+
<table>
|
|
42
|
+
<thead>
|
|
43
|
+
<tr>
|
|
44
|
+
<th>Data / API</th>
|
|
45
|
+
<th>Attribute / property</th>
|
|
46
|
+
<th>Notes</th>
|
|
47
|
+
</tr>
|
|
48
|
+
</thead>
|
|
49
|
+
<tbody><tr>
|
|
50
|
+
<td>Form fields</td>
|
|
51
|
+
<td><code>formDataProvider</code> on ancestor</td>
|
|
52
|
+
<td>Filled by <code>sonic-input</code>, <code>sonic-select</code>, etc. via <code>name</code></td>
|
|
53
|
+
</tr>
|
|
54
|
+
<tr>
|
|
55
|
+
<td>Result after call</td>
|
|
56
|
+
<td><code>submitResultDataProvider</code> on ancestor</td>
|
|
57
|
+
<td>Whole result object (after optional <code>submit-result-key</code>)</td>
|
|
58
|
+
</tr>
|
|
59
|
+
<tr>
|
|
60
|
+
<td>Slice of JSON result</td>
|
|
61
|
+
<td><code>submit-result-key</code> on <strong>sonic-submit</strong></td>
|
|
62
|
+
<td>Dot path, e.g. <code>data</code> when the API returns <code>{ data: { … } }</code></td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<td>HTTP verb</td>
|
|
66
|
+
<td><code>method</code> on <strong>sonic-submit</strong></td>
|
|
67
|
+
<td><code>post</code> (default), <code>put</code>, <code>patch</code>, <code>delete</code>, <code>get</code> — not inherited from <code>sonic-scope</code></td>
|
|
68
|
+
</tr>
|
|
69
|
+
<tr>
|
|
70
|
+
<td>Path override</td>
|
|
71
|
+
<td><code>endPoint</code> on <strong>sonic-submit</strong></td>
|
|
72
|
+
<td>Wins over ancestor <code>dataProvider</code></td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td>JSON vs multipart</td>
|
|
76
|
+
<td><code>sendAsFormData</code> on <strong>sonic-submit</strong></td>
|
|
77
|
+
<td><code>FormData</code> body, still expects JSON response</td>
|
|
78
|
+
</tr>
|
|
79
|
+
<tr>
|
|
80
|
+
<td>Reset publishers</td>
|
|
81
|
+
<td><code>clearedDataOnSuccess</code> on ancestor</td>
|
|
82
|
+
<td>Space-separated <code>DataProviderKey.path</code> values; runs when a <strong>result object</strong> is returned (including error payloads with <code>messages</code>)</td>
|
|
83
|
+
</tr>
|
|
84
|
+
<tr>
|
|
85
|
+
<td>Browser form POST</td>
|
|
86
|
+
<td><code>native</code> on <strong>sonic-submit</strong></td>
|
|
87
|
+
<td>See <a href="#native-html-form">Native HTML form</a></td>
|
|
88
|
+
</tr>
|
|
89
|
+
<tr>
|
|
90
|
+
<td>Result event</td>
|
|
91
|
+
<td>—</td>
|
|
92
|
+
<td>Bubbles <code>submit</code> <code>CustomEvent</code> with <code>detail</code> = result</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td>Credential Management API</td>
|
|
96
|
+
<td><code>usernameKey</code>, <code>passwordKey</code> on <strong>sonic-submit</strong></td>
|
|
97
|
+
<td>After a <strong>successful</strong> HTTP response, stores login if those keys exist in the payload (defaults: <code>username</code>, <code>password</code>)</td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td>ALTCHA / captcha</td>
|
|
101
|
+
<td><code>needsCaptchaValidation</code> on form/header publisher</td>
|
|
102
|
+
<td>Defers send until token is set — see <a href="../../ui/captcha/captcha.html#captcha">Captcha</a></td>
|
|
103
|
+
</tr>
|
|
104
|
+
</tbody></table>
|
|
105
|
+
<p>While a REST submit runs, the slot is wrapped with <code>data-disabled</code> (faded, no pointer events). With <strong><code>native</code></strong>, validation and loader still run, then the browser performs a normal form submission.</p>
|
|
106
|
+
<h2 id="form-and-result-handling">Form and result handling</h2>
|
|
107
|
+
<p>POST to mock <code>api/register</code>; result publisher <code>submit-example-result</code>.</p>
|
|
108
|
+
<p><docs-lit-demo for="docs-submit-demo"></docs-lit-demo></p>
|
|
109
|
+
<h2 id="native-html-form">Native HTML form</h2>
|
|
110
|
+
<p>With <strong><code>native</code></strong>, Concorde does <strong>not</strong> call <code>fetch</code>. After form validation it:</p>
|
|
111
|
+
<ol>
|
|
112
|
+
<li>Copies <strong>formDataProvider</strong> values into matching <code><input></code> / <code><select></code> / <code><textarea></code> inside the closest <strong><code><form></code></strong> (creates hidden inputs if needed).</li>
|
|
113
|
+
<li>Programmatically clicks a hidden native <code>type="submit"</code> control (<code>name</code> / <code>value</code> on <strong>sonic-submit</strong> if you need them).</li>
|
|
114
|
+
</ol>
|
|
115
|
+
<p>Use a real <code><form action="…" method="post"></code> ancestor. For SPAs, a named <strong><code>target</code></strong> (e.g. iframe) avoids leaving the doc page.</p>
|
|
116
|
+
<p><docs-lit-demo for="docs-submit-native-demo"></docs-lit-demo></p>
|
|
117
|
+
<h2 id="sendasformdata">sendAsFormData</h2>
|
|
118
|
+
<p>Sends fields as <strong><code>multipart/form-data</code></strong> instead of <code>application/json</code> (response is still parsed as JSON).</p>
|
|
119
|
+
<p><docs-lit-demo for="docs-submit-formdata-demo"></docs-lit-demo></p>
|
|
120
|
+
<h2 id="submit-result-key">submit-result-key</h2>
|
|
121
|
+
<p>When the API wraps the payload (e.g. <code>{ data: { id, token } }</code>), set <strong><code>submit-result-key="data"</code></strong> on <strong>sonic-submit</strong> so <strong>submitResultDataProvider</strong> receives only the inner object.</p>
|
|
122
|
+
<p><docs-lit-demo for="docs-submit-result-key-demo"></docs-lit-demo></p>
|
|
123
|
+
<p>Mock endpoint: <code>POST /docs-mock-api/api/register/nested</code>.</p>
|
|
124
|
+
<h2 id="cleareddataonsuccess">clearedDataOnSuccess</h2>
|
|
125
|
+
<p>Lists one or more publisher ids (space-separated). After the API returns a result object, each is set to <code>{}</code> — useful to reset the form publisher.</p>
|
|
126
|
+
<p><docs-lit-demo for="docs-submit-clear-demo"></docs-lit-demo></p>
|
|
127
|
+
<h2 id="custom-submit-event">Custom <code>submit</code> event</h2>
|
|
128
|
+
<p>Listen for the bubbling <strong><code>submit</code></strong> event; <strong><code>event.detail</code></strong> is the same result written to <strong>submitResultDataProvider</strong> (if configured).</p>
|
|
129
|
+
<p><docs-lit-demo for="docs-submit-event-demo"></docs-lit-demo></p>
|
|
130
|
+
<h2 id="endpoint-vs-dataprovider">endPoint vs dataProvider</h2>
|
|
131
|
+
<p>Ancestor <strong><code>dataProvider</code></strong> is the default path; <strong><code>endPoint</code></strong> on <strong>sonic-submit</strong> overrides it for that button only.</p>
|
|
132
|
+
<p><docs-lit-demo for="docs-submit-endpoint-demo"></docs-lit-demo></p>
|
|
133
|
+
<h2 id="methodget">method="get"</h2>
|
|
134
|
+
<p>Appends publisher fields as a query string on the endpoint, then performs a GET. The mock route <code>api/register/echo</code> returns the query for inspection.</p>
|
|
135
|
+
<p><docs-lit-demo for="docs-submit-get-demo"></docs-lit-demo></p>
|
|
136
|
+
<h2 id="dot-notation-formdataprovider-shape">dot notation (formDataProvider shape)</h2>
|
|
137
|
+
<p>You can use dot notation in <strong><code>name</code></strong> on form controls; the publisher stores nested objects:</p>
|
|
138
|
+
<pre><code><sonic-scope formDataProvider="submit-example-dot-notation">
|
|
139
|
+
<div class="grid grid-cols-2 gap-4 mb-4 ">
|
|
140
|
+
<sonic-input required name="email.value" type="email" value="eve.holt@reqres.in"></sonic-input>
|
|
141
|
+
<sonic-input required type="password" name="details.password.value" value="pistol"></sonic-input>
|
|
142
|
+
</div>
|
|
143
|
+
</sonic-scope>
|
|
144
|
+
</code></pre>
|
|
145
|
+
<p>Stored shape:</p>
|
|
146
|
+
<pre><code class="language-typescript">{
|
|
147
|
+
email: { value: "eve.holt@reqres.in" },
|
|
148
|
+
details: { password: { value: "pistol" } }
|
|
149
|
+
}
|
|
150
|
+
</code></pre>
|
|
151
|
+
<h2 id="related">Related</h2>
|
|
152
|
+
<ul>
|
|
153
|
+
<li><a href="../../ui/captcha/captcha.html#captcha">Captcha</a> — submit waits for <code>captchaToken</code> when validation is required.</li>
|
|
154
|
+
<li><a href="../../../../docs/_misc/html-integration.html#html-integration">HTML integration</a> — legacy <code>data-bind</code> result blocks; prefer <strong>submitResultDataProvider</strong> + <code>@subscribe</code> in Lit demos.</li>
|
|
155
|
+
</ul>
|
|
156
|
+
|
|
157
|
+
</article>
|
|
158
|
+
</main>
|
|
159
|
+
</body>
|
|
160
|
+
</html>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/functional/subscriber/subscriber.html" data-doc-id="core/components/functional/subscriber/subscriber">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Subscriber — Concorde</title>
|
|
7
|
+
<meta name="description" content="La mixin Subscriber permet lier un composant à un publisher.">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/functional/subscriber/subscriber, subscriber, Subscriber, functional component, sonic-subscriber, web component">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/functional/subscriber/subscriber">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/functional/subscriber/subscriber.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/functional/subscriber/subscriber.md/subscriber" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde functional component — Subscriber</strong>. La mixin Subscriber permet lier un composant à un publisher. <span>Doc ID: <code>core/components/functional/subscriber/subscriber</code>. Keywords: Concorde, supersoniks, core/components/functional/subscriber/subscriber, subscriber, Subscriber, functional component, sonic-subscriber, web component. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/functional/subscriber/subscriber.html">https://concorde.supersoniks.org/crawl/core/components/functional/subscriber/subscriber.html</a>.</span></p>
|
|
19
|
+
<h1 id="subscriber">Subscriber</h1>
|
|
20
|
+
<p>La mixin Subscriber permet lier un composant à un publisher.
|
|
21
|
+
La liaison à un publisher se fait via l'attribut <em>dataProvider</em> du composant qui représente ce que l'on obtient en appellant PublisherManager.get(dataProvider).</p>
|
|
22
|
+
<p>Les propriétés du composant sont automatiquement remplies avec les propriétés du même nom dans les données du publisher.</p>
|
|
23
|
+
<p>Le composant est automatiquement mis à jour lorsque les données du publisher sont mises à jour.</p>
|
|
24
|
+
<h2 id="dataprovider">DataProvider</h2>
|
|
25
|
+
<p><strong>Id</strong> of the dataProvider that the component will <strong>subscribe</strong> to</p>
|
|
26
|
+
<pre><code><sonic-subscriber dataProvider="id_that_the_subsriber_will_subscribe_to" debug>
|
|
27
|
+
<sonic-button> custom dataProvider id</sonic-button>
|
|
28
|
+
</sonic-subscriber>
|
|
29
|
+
<sonic-subscriber debug>
|
|
30
|
+
<sonic-button> default id : pageHTML</sonic-button>
|
|
31
|
+
</sonic-subscriber>
|
|
32
|
+
</code></pre>
|
|
33
|
+
<h2 id="props">Props</h2>
|
|
34
|
+
<p>Data object (json) that will be passed to the dataProvider</p>
|
|
35
|
+
<pre><code><sonic-subscriber props='{"data":"Hello world"}' debug>
|
|
36
|
+
<sonic-button> Hover to see the data</sonic-button>
|
|
37
|
+
</sonic-subscriber>
|
|
38
|
+
</code></pre>
|
|
39
|
+
<h2 id="debug">Debug</h2>
|
|
40
|
+
<p><strong>Helper</strong>, display the data held by the dataProvider in a floating div</p>
|
|
41
|
+
<pre><code><sonic-subscriber debug>
|
|
42
|
+
<sonic-button> see the dataProvider'data </sonic-button>
|
|
43
|
+
</sonic-subscriber>
|
|
44
|
+
</code></pre>
|
|
45
|
+
<h2 id="noautofill">NoAutofill</h2>
|
|
46
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
47
|
+
<h2 id="propertymap">PropertyMap</h2>
|
|
48
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
49
|
+
<p>Permet de mapper un nom de propriété de donnée source vers une propriété du subscriber à la volée</p>
|
|
50
|
+
<h2 id="bindpublisher">BindPublisher</h2>
|
|
51
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
52
|
+
<p>On peut utiliser cette fonction pour lier un publisher spécifique au composant si besoin.</p>
|
|
53
|
+
<h2 id="instancecounter">instanceCounter</h2>
|
|
54
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
55
|
+
<h2 id="publisher">Publisher</h2>
|
|
56
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
57
|
+
<h2 id="args">Args</h2>
|
|
58
|
+
<p><sonic-alert status="info">Docs coming soon</sonic-alert></p>
|
|
59
|
+
<h2 id="noshadowdom">NoShadowDom</h2>
|
|
60
|
+
<p>Par défaut on crée un shadow dom mais on peut demander à ne pas en avoir via cette propriété et un attribut associé.<br>Cela se fait à l'initialisation uniquement et n'est pas modifiable lors de la vie du composant.</p>
|
|
61
|
+
<h2 id="other-attributes-gathered-from-subscriberstoriests">Other attributes gathered from subscriber.stories.ts</h2>
|
|
62
|
+
<p>styles ??<br>title ??<br>_props ??<br>onAssign ??<br>defferedDebug ??</p>
|
|
63
|
+
|
|
64
|
+
</article>
|
|
65
|
+
</main>
|
|
66
|
+
</body>
|
|
67
|
+
</html>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/functional/value/value.html" data-doc-id="core/components/functional/value/value">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Value — Concorde</title>
|
|
7
|
+
<meta name="description" content="Simply shows a value from a data provider.">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/functional/value/value, value, Value, functional component, sonic-value, web component">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/functional/value/value">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/functional/value/value.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/functional/value/value.md/value" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde functional component — Value</strong>. Simply shows a value from a data provider. <span>Doc ID: <code>core/components/functional/value/value</code>. Keywords: Concorde, supersoniks, core/components/functional/value/value, value, Value, functional component, sonic-value, web component. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/functional/value/value.html">https://concorde.supersoniks.org/crawl/core/components/functional/value/value.html</a>.</span></p>
|
|
19
|
+
<h1 id="value">Value</h1>
|
|
20
|
+
<p>Simply shows a value from a data provider.
|
|
21
|
+
You can target sub data value using dot syntax.
|
|
22
|
+
The value reacts to changes.</p>
|
|
23
|
+
<ul>
|
|
24
|
+
<li>Below is a form that helps you to set a value for the field "preference" in the data target with id "value-example"</li>
|
|
25
|
+
</ul>
|
|
26
|
+
<pre><code><div formDataProvider="value-example">
|
|
27
|
+
which one do you prefer ?
|
|
28
|
+
<sonic-radio name="preference" checked value="dogs"> Dogs</sonic-radio>
|
|
29
|
+
<sonic-radio name="preference" value="cats"> Cats</sonic-radio>
|
|
30
|
+
</div>
|
|
31
|
+
</code></pre>
|
|
32
|
+
<ul>
|
|
33
|
+
<li>Then you can see live value of the preference using this code :</li>
|
|
34
|
+
</ul>
|
|
35
|
+
<pre><code>I prefer <sonic-value dataProvider="value-example" key="preference"></sonic-value>
|
|
36
|
+
</code></pre>
|
|
37
|
+
<ul>
|
|
38
|
+
<li>If you have more complex data like this</li>
|
|
39
|
+
</ul>
|
|
40
|
+
<pre><code><sonic-subscriber dataProvider="value-example-2" props='{"my":{"complex":[{"data":"👋 Hi There"}]}}'></sonic-subscriber>
|
|
41
|
+
</code></pre>
|
|
42
|
+
<ul>
|
|
43
|
+
<li>You can target it with the dot syntax</li>
|
|
44
|
+
</ul>
|
|
45
|
+
<pre><code><sonic-value dataProvider="value-example-2" key="my.complex.0.data"></sonic-value>
|
|
46
|
+
</code></pre>
|
|
47
|
+
|
|
48
|
+
</article>
|
|
49
|
+
</main>
|
|
50
|
+
</body>
|
|
51
|
+
</html>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/ui/alert/alert.html" data-doc-id="core/components/ui/alert/alert">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Alert — Concorde</title>
|
|
7
|
+
<meta name="description" content="Inline message in the page: title (label), body (text or default slot), icon from status. For HTML or actions, use the slot instead of label / text (plain text only).">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert/alert, alert, Alert, UI component, sonic-alert, web component, label, text, status, default, info, success, warning">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/ui/alert/alert">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/alert/alert.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/ui/alert/alert.md/alert" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Alert</strong>. Inline message in the page: title (label), body (text or default slot), icon from status. For HTML or actions, use the slot instead of label / text (plain text only). <span>Doc ID: <code>core/components/ui/alert/alert</code>. Keywords: Concorde, supersoniks, core/components/ui/alert/alert, alert, Alert, UI component, sonic-alert, web component, label, text, status, default, info, success, warning. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/alert/alert.html">https://concorde.supersoniks.org/crawl/core/components/ui/alert/alert.html</a>.</span></p>
|
|
19
|
+
<h1 id="alert">Alert</h1>
|
|
20
|
+
<p>Inline message in the page: title (<code>label</code>), body (<code>text</code> or default slot), icon from <code>status</code>. For HTML or actions, use the slot instead of <code>label</code> / <code>text</code> (plain text only).</p>
|
|
21
|
+
<p>Use <strong><code>status</code></strong>: <code>default</code>, <code>info</code>, <code>success</code>, <code>warning</code>, <code>error</code>.</p>
|
|
22
|
+
<pre><code><sonic-alert status="error" label="Email error" text="This address is already in use" background></sonic-alert>
|
|
23
|
+
</code></pre>
|
|
24
|
+
<h2 id="status">Status</h2>
|
|
25
|
+
<p>Color and icon follow <code>status</code>. With no <code>status</code>, behavior is <code>default</code>.</p>
|
|
26
|
+
<pre><code><div class="grid gap-4">
|
|
27
|
+
<sonic-alert label="Default">This address is already in use.</sonic-alert>
|
|
28
|
+
<sonic-alert status="success" label="Success">This address is already in use.</sonic-alert>
|
|
29
|
+
<sonic-alert status="error" label="Error">This address is already in use.</sonic-alert>
|
|
30
|
+
<sonic-alert status="warning" label="Warning">This address is already in use.</sonic-alert>
|
|
31
|
+
<sonic-alert status="info" label="Info">This address is already in use.</sonic-alert>
|
|
32
|
+
</div>
|
|
33
|
+
</code></pre>
|
|
34
|
+
<h2 id="accessibility-announce">Accessibility (<code>announce</code>)</h2>
|
|
35
|
+
<p>By default, an alert already in the DOM is <strong>not</strong> announced (no <code>role</code> / <code>aria-live</code>). Set <strong><code>announce</code></strong> when the message appears <strong>after</strong> user action (API response, validation, etc.): screen readers get <code>role="alert"</code> for <code>error</code>, otherwise <code>role="status"</code> and <code>aria-live="polite"</code>.</p>
|
|
36
|
+
<p><code>sonic-alert-messages</code> sets <code>announce</code> on every rendered alert.</p>
|
|
37
|
+
<pre><code><sonic-alert announce status="success" label="Saved" text="Your changes were saved."></sonic-alert>
|
|
38
|
+
</code></pre>
|
|
39
|
+
<h2 id="content-and-icon">Content and icon</h2>
|
|
40
|
+
<p><code>label</code> and <code>text</code> accept plain text only. The default slot is rendered after <code>text</code>. Use the <strong><code>icon</code></strong> slot to replace the default <code>sonic-icon</code>. <strong><code>noIcon</code></strong> hides the icon.</p>
|
|
41
|
+
<pre><code><sonic-alert status="info" noIcon label="No icon" text="Informational message."></sonic-alert>
|
|
42
|
+
</code></pre>
|
|
43
|
+
<h2 id="custom-icon-slot">Custom icon slot</h2>
|
|
44
|
+
<p>Project any markup into <strong><code>slot="icon"</code></strong> (emoji, image, custom component). Keep it decorative with <code>aria-hidden="true"</code> when the message text already conveys meaning.</p>
|
|
45
|
+
<pre><code><sonic-alert status="success" label="Achievement unlocked" background>
|
|
46
|
+
<span slot="icon" aria-hidden="true" class="text-lg leading-none">🎉</span>
|
|
47
|
+
You unlocked a new badge.
|
|
48
|
+
</sonic-alert>
|
|
49
|
+
</code></pre>
|
|
50
|
+
<h2 id="sizes">Sizes</h2>
|
|
51
|
+
<pre><code><div class="grid gap-4">
|
|
52
|
+
<sonic-alert status="error" label="Email error" size="2xs">
|
|
53
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
54
|
+
</sonic-alert>
|
|
55
|
+
<sonic-alert status="error" label="Email error" size="xs">
|
|
56
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
57
|
+
</sonic-alert>
|
|
58
|
+
<sonic-alert status="error" label="Email error" size="sm">
|
|
59
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
60
|
+
</sonic-alert>
|
|
61
|
+
<sonic-alert status="error" label="Email error">
|
|
62
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
63
|
+
</sonic-alert>
|
|
64
|
+
<sonic-alert status="error" label="Email error" size="lg">
|
|
65
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
66
|
+
</sonic-alert>
|
|
67
|
+
<sonic-alert status="error" label="Email error" size="xl">
|
|
68
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
69
|
+
</sonic-alert>
|
|
70
|
+
<sonic-alert status="error" label="Email error" size="2xl">
|
|
71
|
+
This address is already in use. Lorem ipsum dolor sit amet.
|
|
72
|
+
</sonic-alert>
|
|
73
|
+
</div>
|
|
74
|
+
</code></pre>
|
|
75
|
+
<h2 id="alert-with-link">Alert with link</h2>
|
|
76
|
+
<p>Rich content in the slot (buttons, links).</p>
|
|
77
|
+
<pre><code><sonic-alert status="info" label="New messages !">
|
|
78
|
+
You have 2 unread messages<br />
|
|
79
|
+
<div class="flex gap-2 mt-1">
|
|
80
|
+
<sonic-button variant="outline" type="info" size="xs">See messages</sonic-button>
|
|
81
|
+
<sonic-button variant="ghost" type="info" size="xs">Dismiss</sonic-button>
|
|
82
|
+
</div>
|
|
83
|
+
</sonic-alert>
|
|
84
|
+
</code></pre>
|
|
85
|
+
<h2 id="background">Background</h2>
|
|
86
|
+
<p>Tinted background from the <code>status</code> color (<code>color-mix</code> on <code>currentColor</code>).</p>
|
|
87
|
+
<pre><code><div class="grid gap-4">
|
|
88
|
+
<sonic-alert background label="Lorem ipsum dolor">This address is already in use.</sonic-alert>
|
|
89
|
+
<sonic-alert status="success" background label="Lorem ipsum dolor">
|
|
90
|
+
This address is already in use.
|
|
91
|
+
</sonic-alert>
|
|
92
|
+
<sonic-alert status="error" background label="Lorem ipsum dolor">
|
|
93
|
+
This address is already in use.
|
|
94
|
+
</sonic-alert>
|
|
95
|
+
<sonic-alert status="warning" background label="Lorem ipsum dolor">
|
|
96
|
+
This address is already in use.
|
|
97
|
+
</sonic-alert>
|
|
98
|
+
<sonic-alert status="info" background label="Lorem ipsum dolor">
|
|
99
|
+
This address is already in use.
|
|
100
|
+
</sonic-alert>
|
|
101
|
+
</div>
|
|
102
|
+
</code></pre>
|
|
103
|
+
<h2 id="dismissible">Dismissible</h2>
|
|
104
|
+
<p><code>dismissible</code> removes the alert from the DOM when the close control is clicked (i18n aria label). <strong><code>dismissible</code></strong> and <strong><code>background</code></strong> are independent: without <code>background</code>, close sits at the end of the row; with <code>background</code>, top-right.</p>
|
|
105
|
+
<pre><code><sonic-alert status="info" class="mb-3" dismissible label="This address is already in use.">
|
|
106
|
+
</sonic-alert>
|
|
107
|
+
<sonic-alert class="mb-3" dismissible background label="Lorem ipsum dolor">
|
|
108
|
+
This address is already in use.
|
|
109
|
+
</sonic-alert>
|
|
110
|
+
<sonic-alert status="success" class="mb-3" dismissible background label="Lorem ipsum dolor">
|
|
111
|
+
This address is already in use.
|
|
112
|
+
</sonic-alert>
|
|
113
|
+
<sonic-alert status="error" class="mb-3" dismissible background label="Lorem ipsum dolor">
|
|
114
|
+
This address is already in use.
|
|
115
|
+
</sonic-alert>
|
|
116
|
+
<sonic-alert status="warning" class="mb-3" dismissible background label="Lorem ipsum dolor">
|
|
117
|
+
This address is already in use.
|
|
118
|
+
</sonic-alert>
|
|
119
|
+
<sonic-alert status="info" class="mb-3" dismissible background label="Lorem ipsum dolor">
|
|
120
|
+
This address is already in use.
|
|
121
|
+
</sonic-alert>
|
|
122
|
+
</code></pre>
|
|
123
|
+
<h2 id="dismiss-forever">Dismiss forever</h2>
|
|
124
|
+
<p>With <strong><code>dismissForever</code></strong>, dismissal is stored in <code>localStorage</code> (key <code>sonic-alert-dismissed</code>). A stable <strong><code>id</code></strong> on the element is <strong>required</strong>; without <code>id</code>, a warning is logged and nothing is persisted.</p>
|
|
125
|
+
<pre><code><sonic-alert
|
|
126
|
+
class="mb-3"
|
|
127
|
+
dismissible
|
|
128
|
+
background
|
|
129
|
+
dismissForever
|
|
130
|
+
label="Lorem ipsum dolor"
|
|
131
|
+
id="addressUniqueId"
|
|
132
|
+
>
|
|
133
|
+
This address is already in use.
|
|
134
|
+
</sonic-alert>
|
|
135
|
+
</code></pre>
|
|
136
|
+
|
|
137
|
+
</article>
|
|
138
|
+
</main>
|
|
139
|
+
</body>
|
|
140
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/ui/alert-messages/alert-messages.html" data-doc-id="core/components/ui/alert-messages/alert-messages">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Concorde — Concorde</title>
|
|
7
|
+
<meta name="description" content="Concorde documentation: Concorde">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert-messages/alert-messages, alert-messages, UI component, sonic-alert-messages, web component">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/ui/alert-messages/alert-messages">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/alert-messages/alert-messages.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/ui/alert-messages/alert-messages.md/alert-messages" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Concorde</strong>. Concorde documentation: Concorde <span>Doc ID: <code>core/components/ui/alert-messages/alert-messages</code>. Keywords: Concorde, supersoniks, core/components/ui/alert-messages/alert-messages, alert-messages, UI component, sonic-alert-messages, web component. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/alert-messages/alert-messages.html">https://concorde.supersoniks.org/crawl/core/components/ui/alert-messages/alert-messages.html</a>.</span></p>
|
|
19
|
+
|
|
20
|
+
</article>
|
|
21
|
+
</main>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" data-crawl-url="https://concorde.supersoniks.org/crawl/core/components/ui/badge/badge.html" data-doc-id="core/components/ui/badge/badge">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Badge — Concorde</title>
|
|
7
|
+
<meta name="description" content="A non-interactive pill for labels, counts, or highlights (counter, status, category). The API mirrors sonic-button (type, variant, size) without focus or click states.">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/badge/badge, badge, Badge, UI component, sonic-badge, web component, sonic-button, type, variant, size, --sc-primary, --sc-danger, default, base-100, neutral">
|
|
9
|
+
<meta name="concorde-doc-id" content="core/components/ui/badge/badge">
|
|
10
|
+
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/badge/badge.html">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<header>
|
|
14
|
+
<p><a href="../../../../index.html">Concorde documentation (crawl)</a> · <a href="https://concorde.supersoniks.org/#core/components/ui/badge/badge.md/badge" rel="nofollow">interactive version</a></p>
|
|
15
|
+
</header>
|
|
16
|
+
<main>
|
|
17
|
+
<article>
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Badge</strong>. A non-interactive pill for labels, counts, or highlights (counter, status, category). The API mirrors sonic-button (type, variant, size) without focus or click states. <span>Doc ID: <code>core/components/ui/badge/badge</code>. Keywords: Concorde, supersoniks, core/components/ui/badge/badge, badge, Badge, UI component, sonic-badge, web component, sonic-button, type, variant, size, --sc-primary, --sc-danger, default, base-100, neutral. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/badge/badge.html">https://concorde.supersoniks.org/crawl/core/components/ui/badge/badge.html</a>.</span></p>
|
|
19
|
+
<h1 id="badge">Badge</h1>
|
|
20
|
+
<p>A <strong>non-interactive</strong> pill for labels, counts, or highlights (counter, status, category). The API mirrors <code>sonic-button</code> (<code>type</code>, <code>variant</code>, <code>size</code>) without focus or click states.</p>
|
|
21
|
+
<p>Colors come from theme tokens (<code>--sc-primary</code>, <code>--sc-danger</code>, …) or the semantic <code>type</code> values below. </p>
|
|
22
|
+
<h2 id="type">Type</h2>
|
|
23
|
+
<p><code>default</code> — subtle background (<code>base-100</code>). <code>neutral</code> — dark fill (<code>base-content</code>) with light text, useful on light backgrounds.</p>
|
|
24
|
+
<pre><code><div class="flex flex-wrap gap-2">
|
|
25
|
+
<sonic-badge>Default</sonic-badge>
|
|
26
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
27
|
+
<sonic-badge type="neutral">Neutral</sonic-badge>
|
|
28
|
+
<sonic-badge type="warning">Warning</sonic-badge>
|
|
29
|
+
<sonic-badge type="info">Info</sonic-badge>
|
|
30
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
31
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
32
|
+
</div>
|
|
33
|
+
</code></pre>
|
|
34
|
+
<h2 id="variant">Variant</h2>
|
|
35
|
+
<p><code>outline</code> — border and text in the <code>type</code> color. <code>ghost</code> — text only, no padding (except in forced-colors mode).</p>
|
|
36
|
+
<h2 id="outline">Outline</h2>
|
|
37
|
+
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
38
|
+
<sonic-badge variant="outline">Default</sonic-badge>
|
|
39
|
+
<sonic-badge variant="outline" type="primary">Primary</sonic-badge>
|
|
40
|
+
<sonic-badge variant="outline" type="neutral">Neutral</sonic-badge>
|
|
41
|
+
<sonic-badge variant="outline" type="warning">Warning</sonic-badge>
|
|
42
|
+
<sonic-badge variant="outline" type="info">Info</sonic-badge>
|
|
43
|
+
<sonic-badge variant="outline" type="success">Success</sonic-badge>
|
|
44
|
+
<sonic-badge variant="outline" type="danger">Danger</sonic-badge>
|
|
45
|
+
</div>
|
|
46
|
+
</code></pre>
|
|
47
|
+
<h2 id="ghost">Ghost</h2>
|
|
48
|
+
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
49
|
+
<sonic-badge variant="ghost">Default</sonic-badge>
|
|
50
|
+
<sonic-badge variant="ghost" type="primary">Primary</sonic-badge>
|
|
51
|
+
<sonic-badge variant="ghost" type="neutral">Neutral</sonic-badge>
|
|
52
|
+
<sonic-badge variant="ghost" type="warning">Warning</sonic-badge>
|
|
53
|
+
<sonic-badge variant="ghost" type="info">Info</sonic-badge>
|
|
54
|
+
<sonic-badge variant="ghost" type="success">Success</sonic-badge>
|
|
55
|
+
<sonic-badge variant="ghost" type="danger">Danger</sonic-badge>
|
|
56
|
+
</div>
|
|
57
|
+
</code></pre>
|
|
58
|
+
<h2 id="size">Size</h2>
|
|
59
|
+
<p>Default size is <code>md</code> (omit the <code>size</code> attribute). Typography and padding follow <code>sonic-button</code>.</p>
|
|
60
|
+
<pre><code><div class="flex flex-wrap items-center gap-2">
|
|
61
|
+
<sonic-badge size="2xs">2Xs</sonic-badge>
|
|
62
|
+
<sonic-badge size="xs">Xs</sonic-badge>
|
|
63
|
+
<sonic-badge size="sm">Sm</sonic-badge>
|
|
64
|
+
<sonic-badge>Md</sonic-badge>
|
|
65
|
+
<sonic-badge size="lg">Lg</sonic-badge>
|
|
66
|
+
<sonic-badge size="xl">Xl</sonic-badge>
|
|
67
|
+
<sonic-badge size="2xl">2Xl</sonic-badge>
|
|
68
|
+
</div>
|
|
69
|
+
</code></pre>
|
|
70
|
+
<h2 id="prefix-and-suffix-slots">Prefix and suffix slots</h2>
|
|
71
|
+
<p>Icons or short text before / after the main label.</p>
|
|
72
|
+
<pre><code><sonic-badge type="info" size="sm">
|
|
73
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
74
|
+
Info
|
|
75
|
+
</sonic-badge>
|
|
76
|
+
<sonic-badge type="success">
|
|
77
|
+
Verified
|
|
78
|
+
<sonic-icon slot="suffix" name="check" library="iconoir"></sonic-icon>
|
|
79
|
+
</sonic-badge>
|
|
80
|
+
</code></pre>
|
|
81
|
+
<h2 id="empty-badges">Empty badges</h2>
|
|
82
|
+
<p>Badge with no text (visual dot). <code>min-width</code> / <code>min-height</code> keep a readable shape.</p>
|
|
83
|
+
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
84
|
+
<sonic-badge type="danger" size="2xs"></sonic-badge>
|
|
85
|
+
<sonic-badge type="danger" size="xs"></sonic-badge>
|
|
86
|
+
<sonic-badge type="danger" size="sm"></sonic-badge>
|
|
87
|
+
<sonic-badge type="danger"></sonic-badge>
|
|
88
|
+
<sonic-badge type="danger" size="lg"></sonic-badge>
|
|
89
|
+
<sonic-badge type="danger" size="xl"></sonic-badge>
|
|
90
|
+
<sonic-badge type="danger" size="2xl"></sonic-badge>
|
|
91
|
+
</div>
|
|
92
|
+
</code></pre>
|
|
93
|
+
<h2 id="ellipsis">Ellipsis</h2>
|
|
94
|
+
<p>With <code>ellipsis</code>, long labels truncate. The parent must constrain width (<code>max-width</code>, grid, etc.).</p>
|
|
95
|
+
<pre><code><div class="grid grid-cols-2 gap-4 max-w-xl">
|
|
96
|
+
<sonic-badge ellipsis size="sm" variant="outline">
|
|
97
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
98
|
+
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
99
|
+
</sonic-badge>
|
|
100
|
+
<sonic-badge ellipsis size="sm">
|
|
101
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
102
|
+
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
103
|
+
</sonic-badge>
|
|
104
|
+
</div>
|
|
105
|
+
</code></pre>
|
|
106
|
+
<h2 id="badge-in-button">Badge in button</h2>
|
|
107
|
+
<p>Count inside a button (<code>slot="suffix"</code>) or a badge absolutely positioned on a button / icon.</p>
|
|
108
|
+
<pre><code><div class="flex flex-wrap gap-4 items-center">
|
|
109
|
+
<sonic-button type="default">
|
|
110
|
+
Messages <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge>
|
|
111
|
+
</sonic-button>
|
|
112
|
+
<div class="relative inline-block">
|
|
113
|
+
<sonic-button type="success" class="relative">My account</sonic-button>
|
|
114
|
+
<sonic-badge
|
|
115
|
+
type="danger"
|
|
116
|
+
size="xs"
|
|
117
|
+
class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
118
|
+
>12</sonic-badge
|
|
119
|
+
>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="relative inline-block">
|
|
122
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
123
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
124
|
+
</sonic-button>
|
|
125
|
+
<sonic-badge
|
|
126
|
+
type="danger"
|
|
127
|
+
size="xs"
|
|
128
|
+
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
129
|
+
>33</sonic-badge
|
|
130
|
+
>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="relative inline-block">
|
|
133
|
+
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
134
|
+
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
135
|
+
</sonic-button>
|
|
136
|
+
<sonic-badge
|
|
137
|
+
type="danger"
|
|
138
|
+
size="xs"
|
|
139
|
+
class="absolute right-2 bottom-2 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
140
|
+
></sonic-badge>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</code></pre>
|
|
144
|
+
|
|
145
|
+
</article>
|
|
146
|
+
</main>
|
|
147
|
+
</body>
|
|
148
|
+
</html>
|