@supersoniks/concorde 5.0.3 → 5.0.5
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/.agents/skills/concorde-component-docs/SKILL.md +194 -0
- package/.agents/skills/concorde-component-docs/template.md +45 -0
- package/ai/cursor/rules/concorde-theme.mdc +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde/SKILL.md +1 -1
- package/ai/skills/concorde-theme/SKILL.md +21 -10
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +515 -521
- package/concorde-core.es.js +5151 -5056
- package/dist/concorde-core.bundle.js +515 -521
- package/dist/concorde-core.es.js +5151 -5056
- package/dist/docs-mock-api-sw.js +2 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/docs/assets/index-CD4WyL6o.css +1 -0
- package/docs/assets/{index-BnK6OS7w.js → index-wVZpLVYW.js} +815 -808
- package/docs/crawl/core/components/ui/alert/alert.html +76 -5
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
- package/docs/crawl/core/components/ui/badge/badge.html +57 -8
- package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
- package/docs/crawl/core/components/ui/card/card.html +122 -12
- package/docs/crawl/core/components/ui/divider/divider.html +117 -31
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
- package/docs/crawl/core/components/ui/group/group.html +60 -38
- package/docs/crawl/core/components/ui/icon/icon.html +136 -47
- package/docs/crawl/core/components/ui/image/image.html +118 -6
- package/docs/crawl/core/components/ui/link/link.html +65 -7
- package/docs/crawl/core/components/ui/loader/loader.html +97 -23
- package/docs/crawl/core/components/ui/menu/menu.html +162 -90
- package/docs/crawl/core/components/ui/modal/modal.html +275 -50
- package/docs/crawl/core/components/ui/pop/pop.html +242 -124
- package/docs/crawl/core/components/ui/progress/progress.html +103 -30
- package/docs/crawl/core/components/ui/table/table.html +303 -171
- package/docs/crawl/core/components/ui/theme/theme.html +131 -0
- package/docs/crawl/core/components/ui/toast/toast.html +170 -59
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +311 -63
- package/docs/crawl/hubs/form-components.html +71 -49
- package/docs/crawl/index.html +7 -6
- package/docs/docs-mock-api-sw.js +2 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +6 -4
- package/docs/llms-full.txt +1468 -405
- package/docs/llms.txt +23 -30
- package/docs/sitemap.xml +3 -0
- package/docs/src/core/components/ui/alert/alert.md +21 -2
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +19 -6
- package/docs/src/core/components/ui/captcha/captcha.md +65 -6
- package/docs/src/core/components/ui/card/card.md +73 -10
- package/docs/src/core/components/ui/divider/divider.md +107 -13
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +132 -43
- package/docs/src/core/components/ui/image/image.md +35 -3
- package/docs/src/core/components/ui/link/link.md +43 -5
- package/docs/src/core/components/ui/loader/loader.md +79 -22
- package/docs/src/core/components/ui/menu/menu.md +133 -92
- package/docs/src/core/components/ui/modal/modal.md +163 -47
- package/docs/src/core/components/ui/pop/pop.md +217 -123
- package/docs/src/core/components/ui/progress/progress.md +76 -30
- package/docs/src/core/components/ui/table/table.md +147 -171
- package/docs/src/core/components/ui/theme/theme.md +122 -0
- package/docs/src/core/components/ui/toast/toast.md +108 -58
- package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +223 -61
- package/docs/src/docs/search/docs-search.json +2504 -399
- package/docs/src/tsconfig.json +18 -0
- package/index.html +4 -2
- package/package.json +7 -1
- package/public/docs-mock-api-sw.js +2 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/src/core/components/ui/_css/align.ts +1 -0
- package/src/core/components/ui/_css/type.ts +86 -8
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
- package/src/core/components/ui/alert/alert.md +21 -2
- package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/src/core/components/ui/badge/badge.md +19 -6
- package/src/core/components/ui/badge/badge.ts +8 -9
- package/src/core/components/ui/button/button.ts +5 -15
- package/src/core/components/ui/captcha/captcha.md +65 -6
- package/src/core/components/ui/card/card.md +73 -10
- package/src/core/components/ui/card/card.ts +24 -22
- package/src/core/components/ui/divider/divider.md +107 -13
- package/src/core/components/ui/divider/divider.ts +40 -33
- package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
- package/src/core/components/ui/form/fieldset/legend.ts +13 -13
- package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
- package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
- package/src/core/components/ui/form/textarea/textarea.ts +4 -3
- package/src/core/components/ui/group/group.md +36 -36
- package/src/core/components/ui/group/group.ts +5 -10
- package/src/core/components/ui/icon/icon.md +132 -43
- package/src/core/components/ui/image/image.md +35 -3
- package/src/core/components/ui/link/link.md +43 -5
- package/src/core/components/ui/loader/loader.md +79 -22
- package/src/core/components/ui/loader/loader.ts +67 -27
- package/src/core/components/ui/loader/styles/fixed.ts +6 -11
- package/src/core/components/ui/menu/menu.md +133 -92
- package/src/core/components/ui/menu/menu.ts +53 -58
- package/src/core/components/ui/modal/modal.md +163 -47
- package/src/core/components/ui/modal/modal.ts +2 -4
- package/src/core/components/ui/pop/pop.md +217 -123
- package/src/core/components/ui/pop/pop.ts +0 -1
- package/src/core/components/ui/progress/progress.md +76 -30
- package/src/core/components/ui/progress/progress.ts +25 -56
- package/src/core/components/ui/table/table-caption.ts +2 -2
- package/src/core/components/ui/table/table-tbody.ts +3 -3
- package/src/core/components/ui/table/table-td.ts +23 -18
- package/src/core/components/ui/table/table-th.ts +8 -8
- package/src/core/components/ui/table/table-tr.ts +4 -4
- package/src/core/components/ui/table/table.md +147 -171
- package/src/core/components/ui/table/table.ts +20 -19
- package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
- package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
- package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
- package/src/core/components/ui/theme/theme.md +122 -0
- package/src/core/components/ui/theme/theme.ts +30 -7
- package/src/core/components/ui/toast/toast-item.ts +6 -9
- package/src/core/components/ui/toast/toast.md +108 -58
- package/src/core/components/ui/toast/types.ts +1 -1
- package/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/start.md +1 -1
- package/src/docs/_getting-started/theming.md +223 -61
- package/src/docs/code.ts +125 -58
- package/src/docs/header/header.ts +62 -54
- package/src/docs/mock-api/router.ts +2 -0
- package/src/docs/navigation/navigation.ts +6 -3
- package/src/docs/search/docs-search.json +2504 -399
- package/src/docs/search/markdown-renderer.ts +6 -6
- package/src/docs/search/search.ts +4 -4
- package/src/docs/tailwind/css/tailwind.css +6 -5
- package/src/tsconfig.json +18 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +19 -0
- package/docs/assets/index--GpD7R7a.css +0 -1
|
@@ -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>Alert — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert/alert, alert, Alert, UI component, sonic-alert, web component, label, text, status, default,
|
|
7
|
+
<meta name="description" content="Alerts surface important feedback inline—errors, confirmations, or contextual help. Use label / text for simple copy, or the default slot for rich content (links, buttons). Set announce when the messa">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert/alert, alert, Alert, UI component, sonic-alert, web component, label, text, announce, status, default, role, aria-live">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/alert/alert">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/alert/alert.html">
|
|
11
11
|
</head>
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Alert</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Alert</strong>. Alerts surface important feedback inline—errors, confirmations, or contextual help. Use label / text for simple copy, or the default slot for rich content (links, buttons). Set announce when the messa <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, announce, status, default, role, aria-live. 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
19
|
<h1 id="alert">Alert</h1>
|
|
20
|
-
<p>
|
|
21
|
-
<
|
|
20
|
+
<p>Alerts <strong>surface important feedback</strong> inline—errors, confirmations, or contextual help. Use <strong><code>label</code></strong> / <strong><code>text</code></strong> for simple copy, or the <strong>default slot</strong> for rich content (links, buttons). Set <strong><code>announce</code></strong> when the message appears after an action so screen readers pick it up.</p>
|
|
21
|
+
<h2 id="basic-example">Basic example</h2>
|
|
22
22
|
<pre><code><sonic-alert status="error" label="Email error" text="This address is already in use" background></sonic-alert>
|
|
23
23
|
</code></pre>
|
|
24
24
|
<h2 id="status">Status</h2>
|
|
@@ -133,6 +133,77 @@
|
|
|
133
133
|
This address is already in use.
|
|
134
134
|
</sonic-alert>
|
|
135
135
|
</code></pre>
|
|
136
|
+
<h2 id="api-reference">API reference</h2>
|
|
137
|
+
<table>
|
|
138
|
+
<thead>
|
|
139
|
+
<tr>
|
|
140
|
+
<th>Attribute</th>
|
|
141
|
+
<th>Values</th>
|
|
142
|
+
<th>Description</th>
|
|
143
|
+
</tr>
|
|
144
|
+
</thead>
|
|
145
|
+
<tbody><tr>
|
|
146
|
+
<td><code>status</code></td>
|
|
147
|
+
<td><code>default</code> · <code>info</code> · <code>success</code> · <code>warning</code> · <code>error</code></td>
|
|
148
|
+
<td>Color and default icon</td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td><code>label</code></td>
|
|
152
|
+
<td>string</td>
|
|
153
|
+
<td>Title (plain text)</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td><code>text</code></td>
|
|
157
|
+
<td>string</td>
|
|
158
|
+
<td>Short body (plain text), rendered before the slot</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td><code>size</code></td>
|
|
162
|
+
<td><code>2xs</code> … <code>2xl</code></td>
|
|
163
|
+
<td>Corner radius and typography</td>
|
|
164
|
+
</tr>
|
|
165
|
+
<tr>
|
|
166
|
+
<td><code>background</code></td>
|
|
167
|
+
<td>boolean</td>
|
|
168
|
+
<td>Tinted background (<code>color-mix</code> on status color)</td>
|
|
169
|
+
</tr>
|
|
170
|
+
<tr>
|
|
171
|
+
<td><code>dismissible</code></td>
|
|
172
|
+
<td>boolean</td>
|
|
173
|
+
<td>Close control; removes the element from the DOM</td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr>
|
|
176
|
+
<td><code>dismissForever</code></td>
|
|
177
|
+
<td>boolean</td>
|
|
178
|
+
<td>Persists dismissal in <code>localStorage</code>; requires <strong><code>id</code></strong></td>
|
|
179
|
+
</tr>
|
|
180
|
+
<tr>
|
|
181
|
+
<td><code>noIcon</code></td>
|
|
182
|
+
<td>boolean</td>
|
|
183
|
+
<td>Hides the icon (including custom <code>icon</code> slot content)</td>
|
|
184
|
+
</tr>
|
|
185
|
+
<tr>
|
|
186
|
+
<td><code>announce</code></td>
|
|
187
|
+
<td>boolean</td>
|
|
188
|
+
<td><code>role="alert"</code> / <code>aria-live</code> for dynamically injected content</td>
|
|
189
|
+
</tr>
|
|
190
|
+
</tbody></table>
|
|
191
|
+
<table>
|
|
192
|
+
<thead>
|
|
193
|
+
<tr>
|
|
194
|
+
<th>Slot</th>
|
|
195
|
+
<th>Description</th>
|
|
196
|
+
</tr>
|
|
197
|
+
</thead>
|
|
198
|
+
<tbody><tr>
|
|
199
|
+
<td><em>(default)</em></td>
|
|
200
|
+
<td>Message body (HTML, actions); rendered after <code>text</code></td>
|
|
201
|
+
</tr>
|
|
202
|
+
<tr>
|
|
203
|
+
<td><code>icon</code></td>
|
|
204
|
+
<td>Replaces the default <code>sonic-icon</code></td>
|
|
205
|
+
</tr>
|
|
206
|
+
</tbody></table>
|
|
136
207
|
|
|
137
208
|
</article>
|
|
138
209
|
</main>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert-messages/alert-messages, alert-messages, UI component, sonic-alert-messages, web component">
|
|
6
|
+
<title>Alert messages — Concorde</title>
|
|
7
|
+
<meta name="description" content="sonic-alert-messages renders a vertical stack of sonic-alert items from a messages array on a linked data provider (typical pattern: submitResultDataProvider after a form submit). Only entries with ty">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/alert-messages/alert-messages, alert-messages, Alert messages, UI component, sonic-alert-messages, web component, sonic-alert, messages, submitResultDataProvider, type="public", announce, dataProvider, type">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/alert-messages/alert-messages">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/alert-messages/alert-messages.html">
|
|
11
11
|
</head>
|
|
@@ -15,8 +15,116 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component —
|
|
19
|
-
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Alert messages</strong>. sonic-alert-messages renders a vertical stack of sonic-alert items from a messages array on a linked data provider (typical pattern: submitResultDataProvider after a form submit). Only entries with ty <span>Doc ID: <code>core/components/ui/alert-messages/alert-messages</code>. Keywords: Concorde, supersoniks, core/components/ui/alert-messages/alert-messages, alert-messages, Alert messages, UI component, sonic-alert-messages, web component, sonic-alert, messages, submitResultDataProvider, type="public", announce, dataProvider, type. 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
|
+
<h1 id="alert-messages">Alert messages</h1>
|
|
20
|
+
<p><strong><code>sonic-alert-messages</code></strong> renders a vertical stack of <strong><code>sonic-alert</code></strong> items from a <strong><code>messages</code></strong> array on a linked <strong>data provider</strong> (typical pattern: <strong><code>submitResultDataProvider</code></strong> after a form submit). Only entries with <strong><code>type="public"</code></strong> are shown. Each alert gets <strong><code>announce</code></strong> so screen readers pick up feedback after the request.</p>
|
|
21
|
+
<h2 id="with-submit-result">With submit result</h2>
|
|
22
|
+
<p>Bind <strong><code>dataProvider</code></strong> to the same publisher as <strong><code>submitResultDataProvider</code></strong>. API <strong><code>messages</code></strong> entries need <strong><code>type</code></strong>: <strong><code>public</code></strong>, plus <strong><code>content</code></strong> and optional <strong><code>status</code></strong> (<code>warning</code> · <code>success</code> · <code>error</code> · <code>info</code>).</p>
|
|
23
|
+
<pre><code><sonic-scope
|
|
24
|
+
serviceURL="/docs-mock-api"
|
|
25
|
+
formDataProvider="submit-example"
|
|
26
|
+
submitResultDataProvider="submit-example-result"
|
|
27
|
+
>
|
|
28
|
+
<sonic-alert-messages dataProvider="submit-example-result" background class="mb-4"></sonic-alert-messages>
|
|
29
|
+
<div class="grid gap-4 max-w-md">
|
|
30
|
+
<sonic-input name="email" type="email" label="Email" value=""></sonic-input>
|
|
31
|
+
<sonic-input name="password" type="password" label="Password" value=""></sonic-input>
|
|
32
|
+
<sonic-submit endPoint="api/register" onClick>
|
|
33
|
+
<sonic-button type="primary">Submit (empty fields → error messages)</sonic-button>
|
|
34
|
+
</sonic-submit>
|
|
35
|
+
</div>
|
|
36
|
+
</sonic-scope>
|
|
37
|
+
</code></pre>
|
|
38
|
+
<h2 id="shared-alert-props">Shared alert props</h2>
|
|
39
|
+
<p><strong><code>size</code></strong> · <strong><code>background</code></strong> and <strong><code>noIcon</code></strong> apply to every rendered <strong><code>sonic-alert</code></strong> in the list.</p>
|
|
40
|
+
<pre><code><sonic-button
|
|
41
|
+
size="sm"
|
|
42
|
+
variant="outline"
|
|
43
|
+
class="mb-3"
|
|
44
|
+
onclick="SonicPublisherManager.get('submit-example-result').set({ messages: [{ type: 'public', content: 'Compact inline feedback without icons.', status: 'info' }] })"
|
|
45
|
+
>
|
|
46
|
+
Load sample messages
|
|
47
|
+
</sonic-button>
|
|
48
|
+
<sonic-alert-messages
|
|
49
|
+
dataProvider="submit-example-result"
|
|
50
|
+
size="sm"
|
|
51
|
+
background
|
|
52
|
+
noIcon
|
|
53
|
+
></sonic-alert-messages>
|
|
54
|
+
</code></pre>
|
|
55
|
+
<h2 id="message-shape">Message shape</h2>
|
|
56
|
+
<p>Example JSON on the result publisher (or API response merged into it):</p>
|
|
57
|
+
<pre><code class="language-typescript">{
|
|
58
|
+
"messages": [
|
|
59
|
+
{
|
|
60
|
+
"type": "public",
|
|
61
|
+
"content": "The product has been added to your cart",
|
|
62
|
+
"status": "success"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
</code></pre>
|
|
67
|
+
<h2 id="api-reference">API reference</h2>
|
|
68
|
+
<table>
|
|
69
|
+
<thead>
|
|
70
|
+
<tr>
|
|
71
|
+
<th>Attribute</th>
|
|
72
|
+
<th>Values</th>
|
|
73
|
+
<th>Description</th>
|
|
74
|
+
</tr>
|
|
75
|
+
</thead>
|
|
76
|
+
<tbody><tr>
|
|
77
|
+
<td><code>dataProvider</code></td>
|
|
78
|
+
<td>publisher id</td>
|
|
79
|
+
<td>Source object; <strong><code>messages</code></strong> array is auto-filled via <strong>Subscriber</strong></td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<td><code>size</code></td>
|
|
83
|
+
<td><code>2xs</code> … <code>2xl</code> (default <code>md</code>)</td>
|
|
84
|
+
<td>Passed to each <strong><code>sonic-alert</code></strong></td>
|
|
85
|
+
</tr>
|
|
86
|
+
<tr>
|
|
87
|
+
<td><code>background</code></td>
|
|
88
|
+
<td>boolean</td>
|
|
89
|
+
<td>Tinted background on each alert</td>
|
|
90
|
+
</tr>
|
|
91
|
+
<tr>
|
|
92
|
+
<td><code>noIcon</code></td>
|
|
93
|
+
<td>boolean</td>
|
|
94
|
+
<td>Hides icons on each alert</td>
|
|
95
|
+
</tr>
|
|
96
|
+
<tr>
|
|
97
|
+
<td><code>messages</code></td>
|
|
98
|
+
<td><code>Message[]</code></td>
|
|
99
|
+
<td>Usually set by the publisher; each item uses <strong><code>content</code></strong> as alert <strong><code>text</code></strong></td>
|
|
100
|
+
</tr>
|
|
101
|
+
</tbody></table>
|
|
102
|
+
<table>
|
|
103
|
+
<thead>
|
|
104
|
+
<tr>
|
|
105
|
+
<th>Message field</th>
|
|
106
|
+
<th>Values</th>
|
|
107
|
+
<th>Description</th>
|
|
108
|
+
</tr>
|
|
109
|
+
</thead>
|
|
110
|
+
<tbody><tr>
|
|
111
|
+
<td><code>type</code></td>
|
|
112
|
+
<td><code>public</code></td>
|
|
113
|
+
<td>Required for the message to render</td>
|
|
114
|
+
</tr>
|
|
115
|
+
<tr>
|
|
116
|
+
<td><code>content</code></td>
|
|
117
|
+
<td>string</td>
|
|
118
|
+
<td>Alert body (<strong><code>text</code></strong> on <strong><code>sonic-alert</code></strong>)</td>
|
|
119
|
+
</tr>
|
|
120
|
+
<tr>
|
|
121
|
+
<td><code>status</code></td>
|
|
122
|
+
<td><code>warning</code> · <code>success</code> · <code>error</code> · <code>info</code></td>
|
|
123
|
+
<td>Alert <strong><code>status</code></strong>; defaults to <strong><code>default</code></strong> when omitted</td>
|
|
124
|
+
</tr>
|
|
125
|
+
</tbody></table>
|
|
126
|
+
<p>No slots — alerts are generated from <strong><code>messages</code></strong>.</p>
|
|
127
|
+
|
|
20
128
|
</article>
|
|
21
129
|
</main>
|
|
22
130
|
</body>
|
|
@@ -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>Badge — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
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,
|
|
7
|
+
<meta name="description" content="Badges are compact, non-interactive labels for status, counts, or categories. They mirror sonic-button styling (type, variant, size) without focus rings or click handling—use a button when the control">
|
|
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, default, base-100, neutral, base-content, outline">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/badge/badge">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/badge/badge.html">
|
|
11
11
|
</head>
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Badge</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Badge</strong>. Badges are compact, non-interactive labels for status, counts, or categories. They mirror sonic-button styling (type, variant, size) without focus rings or click handling—use a button when the control <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, default, base-100, neutral, base-content, outline. 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
19
|
<h1 id="badge">Badge</h1>
|
|
20
|
-
<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>
|
|
20
|
+
<p>Badges are <strong>compact, non-interactive</strong> labels for status, counts, or categories. They mirror <strong><code>sonic-button</code></strong> styling (<code>type</code>, <code>variant</code>, <code>size</code>) without focus rings or click handling—use a button when the control should be actionable.</p>
|
|
22
21
|
<h2 id="type">Type</h2>
|
|
23
22
|
<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
23
|
<pre><code><div class="flex flex-wrap gap-2">
|
|
@@ -32,8 +31,8 @@
|
|
|
32
31
|
</div>
|
|
33
32
|
</code></pre>
|
|
34
33
|
<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
|
-
<
|
|
34
|
+
<p>Default <strong><code>variant</code></strong> is filled. <strong><code>outline</code></strong> — border and text in the <code>type</code> color. <strong><code>ghost</code></strong> — text only, no padding (except in forced-colors mode).</p>
|
|
35
|
+
<h3 id="outline">Outline</h3>
|
|
37
36
|
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
38
37
|
<sonic-badge variant="outline">Default</sonic-badge>
|
|
39
38
|
<sonic-badge variant="outline" type="primary">Primary</sonic-badge>
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
<sonic-badge variant="outline" type="danger">Danger</sonic-badge>
|
|
45
44
|
</div>
|
|
46
45
|
</code></pre>
|
|
47
|
-
<
|
|
46
|
+
<h3 id="ghost">Ghost</h3>
|
|
48
47
|
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
49
48
|
<sonic-badge variant="ghost">Default</sonic-badge>
|
|
50
49
|
<sonic-badge variant="ghost" type="primary">Primary</sonic-badge>
|
|
@@ -141,6 +140,56 @@
|
|
|
141
140
|
</div>
|
|
142
141
|
</div>
|
|
143
142
|
</code></pre>
|
|
143
|
+
<h2 id="api-reference">API reference</h2>
|
|
144
|
+
<table>
|
|
145
|
+
<thead>
|
|
146
|
+
<tr>
|
|
147
|
+
<th>Attribute</th>
|
|
148
|
+
<th>Values</th>
|
|
149
|
+
<th>Description</th>
|
|
150
|
+
</tr>
|
|
151
|
+
</thead>
|
|
152
|
+
<tbody><tr>
|
|
153
|
+
<td><code>type</code></td>
|
|
154
|
+
<td><code>default</code> (default) · <code>primary</code> · <code>neutral</code> · <code>warning</code> · <code>info</code> · <code>success</code> · <code>danger</code></td>
|
|
155
|
+
<td>Semantic color (<code>--sc-*</code> tokens)</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr>
|
|
158
|
+
<td><code>variant</code></td>
|
|
159
|
+
<td><code>default</code> (default) · <code>outline</code> · <code>ghost</code></td>
|
|
160
|
+
<td>Filled, bordered, or text-only</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr>
|
|
163
|
+
<td><code>size</code></td>
|
|
164
|
+
<td><code>2xs</code> … <code>2xl</code> (default <code>md</code>)</td>
|
|
165
|
+
<td>Typography and padding (aligned with <strong><code>sonic-button</code></strong>)</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr>
|
|
168
|
+
<td><code>ellipsis</code></td>
|
|
169
|
+
<td>boolean</td>
|
|
170
|
+
<td>Single-line truncation; parent must constrain width</td>
|
|
171
|
+
</tr>
|
|
172
|
+
</tbody></table>
|
|
173
|
+
<table>
|
|
174
|
+
<thead>
|
|
175
|
+
<tr>
|
|
176
|
+
<th>Slot</th>
|
|
177
|
+
<th>Description</th>
|
|
178
|
+
</tr>
|
|
179
|
+
</thead>
|
|
180
|
+
<tbody><tr>
|
|
181
|
+
<td><em>(default)</em></td>
|
|
182
|
+
<td>Main label</td>
|
|
183
|
+
</tr>
|
|
184
|
+
<tr>
|
|
185
|
+
<td><code>prefix</code></td>
|
|
186
|
+
<td>Icon or short text before the label</td>
|
|
187
|
+
</tr>
|
|
188
|
+
<tr>
|
|
189
|
+
<td><code>suffix</code></td>
|
|
190
|
+
<td>Icon or short text after the label</td>
|
|
191
|
+
</tr>
|
|
192
|
+
</tbody></table>
|
|
144
193
|
|
|
145
194
|
</article>
|
|
146
195
|
</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>Captcha — Concorde</title>
|
|
7
|
-
<meta name="description" content="
|
|
8
|
-
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/captcha/captcha, captcha, Captcha, UI component, sonic-captcha, web component">
|
|
7
|
+
<meta name="description" content="sonic-captcha embeds an ALTCHA widget and wires captchaToken / needsCaptchaValidation on the ancestor formDataProvider (or headersDataProvider). sonic-submit waits for a token before sending when vali">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/captcha/captcha, captcha, Captcha, UI component, sonic-captcha, web component, captchaToken, needsCaptchaValidation, formDataProvider, headersDataProvider, sonic-submit, key, generateEncryptedKey">
|
|
9
9
|
<meta name="concorde-doc-id" content="core/components/ui/captcha/captcha">
|
|
10
10
|
<link rel="canonical" href="https://concorde.supersoniks.org/crawl/core/components/ui/captcha/captcha.html">
|
|
11
11
|
</head>
|
|
@@ -15,14 +15,96 @@
|
|
|
15
15
|
</header>
|
|
16
16
|
<main>
|
|
17
17
|
<article>
|
|
18
|
-
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Captcha</strong>.
|
|
18
|
+
<p class="doc-lead" id="doc-summary"><strong>Concorde UI component — Captcha</strong>. sonic-captcha embeds an ALTCHA widget and wires captchaToken / needsCaptchaValidation on the ancestor formDataProvider (or headersDataProvider). sonic-submit waits for a token before sending when vali <span>Doc ID: <code>core/components/ui/captcha/captcha</code>. Keywords: Concorde, supersoniks, core/components/ui/captcha/captcha, captcha, Captcha, UI component, sonic-captcha, web component, captchaToken, needsCaptchaValidation, formDataProvider, headersDataProvider, sonic-submit, key, generateEncryptedKey. URL: <a href="https://concorde.supersoniks.org/crawl/core/components/ui/captcha/captcha.html">https://concorde.supersoniks.org/crawl/core/components/ui/captcha/captcha.html</a>.</span></p>
|
|
19
19
|
<h1 id="captcha">Captcha</h1>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
<p><strong><code>sonic-captcha</code></strong> embeds an <strong>ALTCHA</strong> widget and wires <strong><code>captchaToken</code></strong> / <strong><code>needsCaptchaValidation</code></strong> on the ancestor <strong><code>formDataProvider</code></strong> (or <strong><code>headersDataProvider</code></strong>). <strong><code>sonic-submit</code></strong> waits for a token before sending when validation is required. The widget loads only on <strong>HTTPS</strong>; on plain HTTP the host renders nothing.</p>
|
|
21
|
+
<blockquote>
|
|
22
|
+
<p>Live widget calls the Supersoniks challenge service — not part of <a href="../../../../docs/_misc/docs-mock-api.html#docs-mock-api">docs mock API</a>.</p>
|
|
23
|
+
</blockquote>
|
|
24
|
+
<h2 id="basic-example">Basic example</h2>
|
|
25
|
+
<p>Wrap the form scope and place <strong><code>sonic-submit</code></strong> in the default slot so the challenge appears above the action.</p>
|
|
26
|
+
<pre><code><sonic-scope
|
|
27
|
+
serviceURL="/docs-mock-api"
|
|
28
|
+
formDataProvider="captcha-docs-form"
|
|
29
|
+
submitResultDataProvider="captcha-docs-result"
|
|
30
|
+
>
|
|
31
|
+
<sonic-captcha formDataProvider="captcha-docs-form">
|
|
32
|
+
<sonic-input class="mb-3" name="email" type="email" label="Email" value="demo@example.com"></sonic-input>
|
|
33
|
+
<sonic-submit endPoint="api/register" onClick>
|
|
34
|
+
<sonic-button type="primary">Submit with captcha</sonic-button>
|
|
35
|
+
</sonic-submit>
|
|
36
|
+
</sonic-captcha>
|
|
37
|
+
</sonic-scope>
|
|
25
38
|
</code></pre>
|
|
39
|
+
<h2 id="encrypted-site-key">Encrypted site key</h2>
|
|
40
|
+
<p>Optional <strong><code>key</code></strong> skips client-side key generation. When omitted, the component derives an encrypted key on connect (after <strong><code>generateEncryptedKey</code></strong>).</p>
|
|
41
|
+
<pre><code><sonic-captcha formDataProvider="captcha-docs-form" key="6Leq5V0iAAAAAB-41DlWN335jDlcIuXmhNtdd00t">
|
|
42
|
+
<sonic-button type="outline" disabled>Complete the challenge above to enable submit</sonic-button>
|
|
43
|
+
</sonic-captcha>
|
|
44
|
+
</code></pre>
|
|
45
|
+
<h2 id="form-publisher-fields">Form publisher fields</h2>
|
|
46
|
+
<p>On connect (HTTPS only), <strong><code>needsCaptchaValidation</code></strong> is set to <strong><code>true</code></strong> and <strong><code>captchaToken</code></strong> is cleared. When the ALTCHA widget reaches <strong><code>verified</code></strong>, <strong><code>captchaToken</code></strong> is written on the form publisher and <strong><code>sonic-captcha-validate</code></strong> fires (<code>detail.valid</code> · <strong><code>detail.state</code></strong> · optional <strong><code>detail.token</code></strong> / <strong><code>detail.payload</code></strong>). <strong><code>sonic-submit</code></strong> still listens for <strong><code>request_token</code></strong> to refresh the token immediately before send.</p>
|
|
47
|
+
<pre><code class="language-typescript">{
|
|
48
|
+
needsCaptchaValidation: true,
|
|
49
|
+
captchaKey: "…",
|
|
50
|
+
captchaToken: "…"
|
|
51
|
+
}
|
|
52
|
+
</code></pre>
|
|
53
|
+
<h2 id="api-reference">API reference</h2>
|
|
54
|
+
<table>
|
|
55
|
+
<thead>
|
|
56
|
+
<tr>
|
|
57
|
+
<th>Attribute</th>
|
|
58
|
+
<th>Values</th>
|
|
59
|
+
<th>Description</th>
|
|
60
|
+
</tr>
|
|
61
|
+
</thead>
|
|
62
|
+
<tbody><tr>
|
|
63
|
+
<td><code>formDataProvider</code></td>
|
|
64
|
+
<td>publisher id</td>
|
|
65
|
+
<td>Same as ancestor form scope; reads/writes <strong><code>needsCaptchaValidation</code></strong> · <strong><code>captchaKey</code></strong> · <strong><code>captchaToken</code></strong></td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr>
|
|
68
|
+
<td><code>key</code></td>
|
|
69
|
+
<td>string</td>
|
|
70
|
+
<td>ALTCHA site key; auto-generated when empty</td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td><code>action</code></td>
|
|
74
|
+
<td>string</td>
|
|
75
|
+
<td>Optional action name forwarded to the widget</td>
|
|
76
|
+
</tr>
|
|
77
|
+
<tr>
|
|
78
|
+
<td><code>zIndex</code></td>
|
|
79
|
+
<td>number (default <code>9999</code>)</td>
|
|
80
|
+
<td>Stacking for the challenge overlay</td>
|
|
81
|
+
</tr>
|
|
82
|
+
</tbody></table>
|
|
83
|
+
<table>
|
|
84
|
+
<thead>
|
|
85
|
+
<tr>
|
|
86
|
+
<th>Slot</th>
|
|
87
|
+
<th>Description</th>
|
|
88
|
+
</tr>
|
|
89
|
+
</thead>
|
|
90
|
+
<tbody><tr>
|
|
91
|
+
<td><em>(default)</em></td>
|
|
92
|
+
<td>Form actions (typically <strong><code>sonic-submit</code></strong> and fields) rendered below the widget</td>
|
|
93
|
+
</tr>
|
|
94
|
+
</tbody></table>
|
|
95
|
+
<table>
|
|
96
|
+
<thead>
|
|
97
|
+
<tr>
|
|
98
|
+
<th>Event</th>
|
|
99
|
+
<th>Description</th>
|
|
100
|
+
</tr>
|
|
101
|
+
</thead>
|
|
102
|
+
<tbody><tr>
|
|
103
|
+
<td><code>sonic-captcha-validate</code></td>
|
|
104
|
+
<td>Fired when <strong><code>state</code></strong> is <strong><code>verified</code></strong> · <strong><code>error</code></strong> or <strong><code>expired</code></strong>; <strong><code>detail.valid</code></strong> is <strong><code>true</code></strong> only for <strong><code>verified</code></strong></td>
|
|
105
|
+
</tr>
|
|
106
|
+
</tbody></table>
|
|
107
|
+
<p>Related: <a href="../../functional/submit/submit.html#submit">Submit</a> — <strong><code>needsCaptchaValidation</code></strong> and deferred send.</p>
|
|
26
108
|
|
|
27
109
|
</article>
|
|
28
110
|
</main>
|