@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>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
|
|
7
|
+
<meta name="description" content="Messages <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge>">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/badge/badge, badge, Badge, UI component, sonic-badge, web component">
|
|
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,181 +15,103 @@
|
|
|
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>. Messages <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge> <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. 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>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>
|
|
21
20
|
<h2 id="type">Type</h2>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<sonic-badge type="danger">Danger</sonic-badge>
|
|
31
|
-
</div>
|
|
21
|
+
<pre><code><sonic-badge>Default</sonic-badge>
|
|
22
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
23
|
+
<sonic-badge type="neutral">Neutral</sonic-badge>
|
|
24
|
+
<sonic-badge type="warning">Warning</sonic-badge>
|
|
25
|
+
<sonic-badge type="info">Info</sonic-badge>
|
|
26
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
27
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
28
|
+
<sonic-badge type="contrast">Contrast</sonic-badge>
|
|
32
29
|
</code></pre>
|
|
33
|
-
<h2 id="
|
|
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>
|
|
30
|
+
<h2 id="outline">Outline</h2>
|
|
36
31
|
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</
|
|
32
|
+
<sonic-badge variant="outline">Default</sonic-badge>
|
|
33
|
+
<sonic-badge variant="outline" type="primary">Primary</sonic-badge>
|
|
34
|
+
<sonic-badge variant="outline" type="neutral">Neutral</sonic-badge>
|
|
35
|
+
<sonic-badge variant="outline" type="warning">Warning</sonic-badge>
|
|
36
|
+
<sonic-badge variant="outline" type="info">Info</sonic-badge>
|
|
37
|
+
<sonic-badge variant="outline" type="success">Success</sonic-badge>
|
|
38
|
+
<sonic-badge variant="outline" type="danger">Danger</sonic-badge>
|
|
39
|
+
<sonic-badge variant="outline" type="contrast">Contrast</sonic-badge>
|
|
40
|
+
</div>
|
|
45
41
|
</code></pre>
|
|
46
|
-
<
|
|
42
|
+
<h2 id="ghost">Ghost</h2>
|
|
47
43
|
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</
|
|
44
|
+
<sonic-badge variant="ghost">Default</sonic-badge>
|
|
45
|
+
<sonic-badge variant="ghost" type="primary">Primary</sonic-badge>
|
|
46
|
+
<sonic-badge variant="ghost" type="neutral">Neutral</sonic-badge>
|
|
47
|
+
<sonic-badge variant="ghost" type="warning">Warning</sonic-badge>
|
|
48
|
+
<sonic-badge variant="ghost" type="info">Info</sonic-badge>
|
|
49
|
+
<sonic-badge variant="ghost" type="success">Success</sonic-badge>
|
|
50
|
+
<sonic-badge variant="ghost" type="danger">Danger</sonic-badge>
|
|
51
|
+
<sonic-badge variant="ghost" type="contrast">Contrast</sonic-badge>
|
|
52
|
+
</div>
|
|
56
53
|
</code></pre>
|
|
57
54
|
<h2 id="size">Size</h2>
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<sonic-badge size="xl">Xl</sonic-badge>
|
|
66
|
-
<sonic-badge size="2xl">2Xl</sonic-badge>
|
|
67
|
-
</div>
|
|
68
|
-
</code></pre>
|
|
69
|
-
<h2 id="prefix-and-suffix-slots">Prefix and suffix slots</h2>
|
|
70
|
-
<p>Icons or short text before / after the main label.</p>
|
|
71
|
-
<pre><code><sonic-badge type="info" size="sm">
|
|
72
|
-
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
73
|
-
Info
|
|
74
|
-
</sonic-badge>
|
|
75
|
-
<sonic-badge type="success">
|
|
76
|
-
Verified
|
|
77
|
-
<sonic-icon slot="suffix" name="check" library="iconoir"></sonic-icon>
|
|
78
|
-
</sonic-badge>
|
|
55
|
+
<pre><code><sonic-badge size="2xs">2Xs badge</sonic-badge>
|
|
56
|
+
<sonic-badge size="xs">Xs badge</sonic-badge>
|
|
57
|
+
<sonic-badge size="sm">Sm badge</sonic-badge>
|
|
58
|
+
<sonic-badge>Md badge</sonic-badge>
|
|
59
|
+
<sonic-badge size="lg">Lg badge</sonic-badge>
|
|
60
|
+
<sonic-badge size="xl">Xl badge</sonic-badge>
|
|
61
|
+
<sonic-badge size="2xl">2Xl badge</sonic-badge>
|
|
79
62
|
</code></pre>
|
|
80
63
|
<h2 id="empty-badges">Empty badges</h2>
|
|
81
|
-
<p>Badge with no text (visual dot). <code>min-width</code> / <code>min-height</code> keep a readable shape.</p>
|
|
82
64
|
<pre><code><div class="flex items-center flex-wrap gap-3">
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
<sonic-badge type="danger" size="2xs"></sonic-badge>
|
|
66
|
+
<sonic-badge type="danger" size="xs"></sonic-badge>
|
|
67
|
+
<sonic-badge type="danger" size="sm"></sonic-badge>
|
|
68
|
+
<sonic-badge type="danger"></sonic-badge>
|
|
69
|
+
<sonic-badge type="danger" size="lg"></sonic-badge>
|
|
70
|
+
<sonic-badge type="danger" size="xl"></sonic-badge>
|
|
71
|
+
<sonic-badge type="danger" size="2xl"></sonic-badge>
|
|
72
|
+
</div>
|
|
91
73
|
</code></pre>
|
|
92
74
|
<h2 id="ellipsis">Ellipsis</h2>
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
97
|
-
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
98
|
-
</sonic-badge>
|
|
99
|
-
<sonic-badge ellipsis size="sm">
|
|
100
|
-
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon>
|
|
101
|
-
Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod.
|
|
102
|
-
</sonic-badge>
|
|
75
|
+
<pre><code><div class="grid grid-cols-3 gap-4" >
|
|
76
|
+
<sonic-badge ellipsis size="sm" variant="outline" >
|
|
77
|
+
<sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon> Lorem ipsum dolor sit consectetur adipiscing elit. Lorem ipsum dolor sit consectetur adipiscing elit.</sonic-badge>
|
|
78
|
+
<sonic-badge ellipsis size="sm" > <sonic-icon slot="prefix" name="info-empty" library="iconoir"></sonic-icon> Lorem ipsum dolor sit consectetur adipiscing elit. Lorem ipsum dolor sit consectetur adipiscing elit.</sonic-badge>
|
|
103
79
|
</div>
|
|
104
80
|
</code></pre>
|
|
105
81
|
<h2 id="badge-in-button">Badge in button</h2>
|
|
106
|
-
<p>Count inside a button (<code>slot="suffix"</code>) or a badge absolutely positioned on a button / icon.</p>
|
|
107
82
|
<pre><code><div class="flex flex-wrap gap-4 items-center">
|
|
108
|
-
|
|
109
|
-
|
|
83
|
+
<sonic-button type="default">
|
|
84
|
+
Messages <sonic-badge slot="suffix" type="danger" size="xs">5</sonic-badge>
|
|
85
|
+
</sonic-button>
|
|
86
|
+
<div class="relative inline-block">
|
|
87
|
+
<sonic-button type="success" class="relative"> Mon compte </sonic-button>
|
|
88
|
+
<sonic-badge type="danger" size="xs" class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
89
|
+
>12</sonic-badge
|
|
90
|
+
>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="relative inline-block">
|
|
93
|
+
<sonic-button type="neutral" shape="circle" variant="outline"
|
|
94
|
+
><sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
95
|
+
</sonic-button>
|
|
96
|
+
<sonic-badge
|
|
97
|
+
type="danger"
|
|
98
|
+
size="xs"
|
|
99
|
+
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
100
|
+
>33</sonic-badge
|
|
101
|
+
>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="relative inline-block">
|
|
104
|
+
<sonic-button type="neutral" shape="circle" variant="outline"
|
|
105
|
+
><sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
110
106
|
</sonic-button>
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
&
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
class="absolute right-1 top-0 pe-none transform -translate-y-1/2"
|
|
117
|
-
>12</sonic-badge
|
|
118
|
-
>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="relative inline-block">
|
|
121
|
-
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
122
|
-
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
123
|
-
</sonic-button>
|
|
124
|
-
<sonic-badge
|
|
125
|
-
type="danger"
|
|
126
|
-
size="xs"
|
|
127
|
-
class="absolute right-1 bottom-1 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
128
|
-
>33</sonic-badge
|
|
129
|
-
>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="relative inline-block">
|
|
132
|
-
<sonic-button type="neutral" shape="circle" variant="outline">
|
|
133
|
-
<sonic-icon library="iconoir" name="user"></sonic-icon>
|
|
134
|
-
</sonic-button>
|
|
135
|
-
<sonic-badge
|
|
136
|
-
type="danger"
|
|
137
|
-
size="xs"
|
|
138
|
-
class="absolute right-2 bottom-2 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
139
|
-
></sonic-badge>
|
|
140
|
-
</div>
|
|
107
|
+
<sonic-badge
|
|
108
|
+
type="danger"
|
|
109
|
+
size="xs"
|
|
110
|
+
class="absolute right-2 bottom-2 pe-none transform translate-y-1/2 translate-x-1/2"
|
|
111
|
+
></sonic-badge>
|
|
141
112
|
</div>
|
|
113
|
+
</div>
|
|
142
114
|
</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>
|
|
193
115
|
|
|
194
116
|
</article>
|
|
195
117
|
</main>
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
<p>The length of the button depends on the size of its content</p>
|
|
67
67
|
<pre><code><sonic-button loading></sonic-button>
|
|
68
68
|
<sonic-button loading>Loading button</sonic-button>
|
|
69
|
-
<sonic-button loading><span slot="prefix">๐</span>Loading with prefix<span slot="suffix">๐</span></sonic-button>
|
|
70
69
|
</code></pre>
|
|
71
70
|
<h2 id="swap">Swap</h2>
|
|
72
71
|
<pre><code><sonic-button formDataProvider="button_swap_example" name="youpi" value="youpla" type="primary" shape="circle" variant="outline" class="mr-4">
|
|
@@ -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="Captcha: Submit with captcha">
|
|
8
|
+
<meta name="keywords" content="Concorde, supersoniks, core/components/ui/captcha/captcha, captcha, Captcha, UI component, sonic-captcha, web component">
|
|
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,96 +15,14 @@
|
|
|
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>. Captcha: Submit with captcha <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. 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
|
-
|
|
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>
|
|
20
|
+
<pre><code><sonic-captcha formDataProvider="captchaTestDataProvider" key="6Leq5V0iAAAAAB-41DlWN335jDlcIuXmhNtdd00t">
|
|
21
|
+
<sonic-submit serviceURL="/docs-mock-api" endPoint="api/unknown" onclick>
|
|
22
|
+
<sonic-button class="mt-4">Submit with captcha</sonic-button>
|
|
23
|
+
</sonic-submit>
|
|
24
|
+
</sonic-captcha>
|
|
38
25
|
</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>
|
|
108
26
|
|
|
109
27
|
</article>
|
|
110
28
|
</main>
|