@supersoniks/concorde 5.0.5 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +21 -0
- package/.github-export-ignore +30 -0
- package/.tmp-cem/custom-elements.json +13705 -0
- package/CONTRIBUTING.md +59 -0
- package/DEV.md +54 -0
- package/LICENSE +21 -0
- package/OPEN_SOURCE_CHECKPOINT.md +133 -0
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3960 -0
- package/concorde-3d.es.js +33433 -0
- package/concorde-core.bundle.js +196 -196
- package/concorde-core.es.js +3685 -3405
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-interactive.bundle.js +1157 -0
- package/concorde-interactive.es.js +10734 -0
- package/concorde-shader.bundle.js +116 -0
- package/concorde-shader.es.js +8353 -0
- package/concorde-webgpu.bundle.js +307 -0
- package/concorde-webgpu.es.js +8627 -0
- package/custom-elements-manifest.config.mjs +14 -0
- package/dist/concorde-core.bundle.js +196 -196
- package/dist/concorde-core.es.js +3685 -3405
- package/docs/assets/{index-wVZpLVYW.js → index-D8MVWqY6.js} +1351 -1222
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/alert/alert.html +71 -172
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +5 -113
- package/docs/crawl/core/components/ui/badge/badge.html +79 -157
- package/docs/crawl/core/components/ui/button/button.html +0 -1
- package/docs/crawl/core/components/ui/captcha/captcha.html +8 -90
- package/docs/crawl/core/components/ui/card/card.html +68 -222
- package/docs/crawl/core/components/ui/divider/divider.html +31 -117
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +101 -232
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +52 -95
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +38 -97
- package/docs/crawl/core/components/ui/form/input/input.html +3 -3
- package/docs/crawl/core/components/ui/form/textarea/textarea.html +3 -3
- package/docs/crawl/core/components/ui/group/group.html +38 -60
- package/docs/crawl/core/components/ui/icon/icon.html +47 -136
- package/docs/crawl/core/components/ui/image/image.html +56 -244
- package/docs/crawl/core/components/ui/link/link.html +9 -67
- package/docs/crawl/core/components/ui/loader/loader.html +23 -97
- package/docs/crawl/core/components/ui/menu/menu.html +90 -162
- package/docs/crawl/core/components/ui/modal/modal.html +50 -275
- package/docs/crawl/core/components/ui/pop/pop.html +66 -260
- package/docs/crawl/core/components/ui/progress/progress.html +30 -103
- package/docs/crawl/core/components/ui/table/table.html +171 -303
- package/docs/crawl/core/components/ui/toast/toast.html +59 -170
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +29 -90
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +2 -3
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +63 -311
- package/docs/crawl/hubs/form-components.html +53 -75
- package/docs/crawl/index.html +6 -7
- package/docs/docs-mock-api-sw.js +0 -2
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +7 -9
- package/docs/llms-full.txt +456 -1703
- package/docs/llms.txt +32 -25
- package/docs/sitemap.xml +0 -3
- package/docs/src/core/components/functional/fetch/fetch.md +0 -0
- package/docs/src/core/components/functional/if/if.md +0 -0
- package/docs/src/core/components/functional/list/list.md +0 -0
- package/docs/src/core/components/functional/router/router.md +0 -0
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/functional/states/states.md +0 -0
- package/docs/src/core/components/functional/submit/submit.md +0 -0
- package/docs/src/core/components/ui/alert/alert.md +72 -147
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -85
- package/docs/src/core/components/ui/badge/badge.md +80 -141
- package/docs/src/core/components/ui/button/button.md +0 -1
- package/docs/src/core/components/ui/captcha/captcha.md +6 -65
- package/docs/src/core/components/ui/card/card.md +65 -183
- package/docs/src/core/components/ui/divider/divider.md +13 -107
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +99 -175
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +52 -75
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +34 -109
- package/docs/src/core/components/ui/form/input/input.md +1 -1
- package/docs/src/core/components/ui/form/radio/radio.md +0 -0
- package/docs/src/core/components/ui/form/select/select.md +0 -0
- package/docs/src/core/components/ui/form/switch/switch.md +0 -0
- package/docs/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +43 -132
- package/docs/src/core/components/ui/image/image.md +53 -179
- package/docs/src/core/components/ui/link/link.md +7 -45
- package/docs/src/core/components/ui/loader/loader.md +22 -79
- package/docs/src/core/components/ui/menu/menu.md +92 -133
- package/docs/src/core/components/ui/modal/modal.md +47 -163
- package/docs/src/core/components/ui/pop/pop.md +64 -262
- package/docs/src/core/components/ui/progress/progress.md +30 -76
- package/docs/src/core/components/ui/table/table.md +171 -147
- package/docs/src/core/components/ui/toast/toast.md +58 -108
- package/docs/src/core/components/ui/tooltip/tooltip.md +26 -68
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +2 -3
- package/docs/src/docs/_getting-started/concorde-outside.md +3 -3
- package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/docs/src/docs/_getting-started/pubsub.md +0 -0
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +61 -223
- package/docs/src/docs/search/docs-search.json +348 -3083
- package/docs/src/tsconfig.declarations.json +22 -0
- package/docs/src/tsconfig.emit.json +23 -0
- package/docs/src/tsconfig.json +3 -63
- package/gitlab/job_github_mirror.sh +39 -0
- package/package.json +36 -2
- package/scripts/generate-sdui-catalog.mjs +250 -0
- package/scripts/generate-sdui-catalog.spec.ts +91 -0
- package/scripts/github-export.mjs +150 -0
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -0
- package/scripts/pre-build.mjs +15 -0
- package/src/core/components/functional/fetch/fetch.md +0 -0
- package/src/core/components/functional/if/if.md +0 -0
- package/src/core/components/functional/if/if.ts +0 -0
- package/src/core/components/functional/list/list.demo.ts +0 -0
- package/src/core/components/functional/list/list.md +0 -0
- package/src/core/components/functional/router/router.md +0 -0
- package/src/core/components/functional/router/router.ts +0 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
- package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
- package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
- package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
- package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
- package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
- package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
- package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
- package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
- package/src/core/components/functional/sdui/sdui.md +122 -0
- package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
- package/src/core/components/functional/sdui/sdui.ts +442 -34
- package/src/core/components/functional/sdui/types.ts +49 -0
- package/src/core/components/functional/states/states.md +0 -0
- package/src/core/components/functional/submit/submit.md +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +0 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/form/radio/radio.md +0 -0
- package/src/core/components/ui/form/select/select.md +0 -0
- package/src/core/components/ui/form/switch/switch.md +0 -0
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/route.ts +0 -0
- package/src/css.d.ts +19 -0
- package/src/docs/_core-concept/subscriber.md +0 -0
- package/src/docs/_getting-started/my-first-subscriber.md +0 -0
- package/src/docs/_getting-started/pubsub.md +0 -0
- package/src/docs/example/users.ts +0 -0
- package/src/docs/search/page.ts +0 -0
- package/src/tsconfig.declarations.json +22 -0
- package/src/tsconfig.emit.json +23 -0
- package/src/tsconfig.json +90 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/docs/assets/index-CD4WyL6o.css +0 -1
- package/docs/crawl/core/components/ui/theme/theme.html +0 -131
- package/docs/src/core/components/ui/theme/theme.md +0 -122
|
@@ -1,129 +1,35 @@
|
|
|
1
1
|
# Divider
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Basic example
|
|
6
|
-
|
|
7
|
-
A bare divider is a full-width line with vertical margin. Omit **`size`** to use the host default spacing (`0.5rem` block margin).
|
|
8
|
-
|
|
3
|
+
## Default
|
|
9
4
|
<sonic-code>
|
|
10
5
|
<template>
|
|
11
|
-
|
|
6
|
+
<sonic-divider></sonic-divider>
|
|
12
7
|
</template>
|
|
13
8
|
</sonic-code>
|
|
14
9
|
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
**`label`** renders inside the line (HTML via the same pipeline as other form labels). **`align`** controls which side(s) of the line remain visible: **`left`** drops the leading segment, **`right`** drops the trailing segment, **`center`** keeps both.
|
|
18
|
-
|
|
10
|
+
## Align
|
|
19
11
|
<sonic-code>
|
|
20
12
|
<template>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<sonic-divider label="Right" align="right"></sonic-divider>
|
|
26
|
-
</div>
|
|
13
|
+
<sonic-divider label="Default centered label"></sonic-divider>
|
|
14
|
+
<sonic-divider label="Right" align="right"></sonic-divider>
|
|
15
|
+
<sonic-divider label="Center" align="center"></sonic-divider>
|
|
16
|
+
<sonic-divider label="Left" align="left"></sonic-divider>
|
|
27
17
|
</template>
|
|
28
18
|
</sonic-code>
|
|
29
19
|
|
|
30
20
|
## Size
|
|
31
|
-
|
|
32
|
-
**`size`** adjusts block margin and label font size. Values follow the shared Concorde scale (`2xs` … `2xl`).
|
|
33
|
-
|
|
34
|
-
<sonic-code>
|
|
35
|
-
<template>
|
|
36
|
-
<div class="grid gap-4">
|
|
37
|
-
<sonic-divider size="2xs" label="2xs"></sonic-divider>
|
|
38
|
-
<sonic-divider size="xs" label="xs"></sonic-divider>
|
|
39
|
-
<sonic-divider size="sm" label="sm"></sonic-divider>
|
|
40
|
-
<sonic-divider size="md" label="md"></sonic-divider>
|
|
41
|
-
<sonic-divider size="lg" label="lg"></sonic-divider>
|
|
42
|
-
<sonic-divider size="xl" label="xl"></sonic-divider>
|
|
43
|
-
<sonic-divider size="2xl" label="2xl"></sonic-divider>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
</sonic-code>
|
|
47
|
-
|
|
48
|
-
## Line style
|
|
49
|
-
|
|
50
|
-
**`lineStyle`** sets the stroke of the rule (`solid` · `dashed` · `dotted`). In HTML use the reflected attribute **`linestyle`** (case-insensitive).
|
|
51
|
-
|
|
52
21
|
<sonic-code>
|
|
53
22
|
<template>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</div>
|
|
23
|
+
<sonic-divider size="xs" label="xs"></sonic-divider>
|
|
24
|
+
<sonic-divider size="sm" label="sm"></sonic-divider>
|
|
25
|
+
<sonic-divider size="md" label="md"></sonic-divider>
|
|
26
|
+
<sonic-divider size="lg" label="lg"></sonic-divider>
|
|
59
27
|
</template>
|
|
60
28
|
</sonic-code>
|
|
61
29
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
Set **`vertical`** for a column rule (for example between toolbar actions). **`noMargin`** removes host margin when a parent layout already provides spacing.
|
|
65
|
-
|
|
30
|
+
## Custom
|
|
66
31
|
<sonic-code>
|
|
67
32
|
<template>
|
|
68
|
-
|
|
69
|
-
<span class="flex items-center px-2">Before</span>
|
|
70
|
-
<sonic-divider vertical noMargin></sonic-divider>
|
|
71
|
-
<span class="flex items-center px-2">After</span>
|
|
72
|
-
</div>
|
|
33
|
+
<sonic-divider><span class="mr-2">Lorem ipsum dolor sit amet</span><sonic-badge type="danger">+25</sonic-badge></sonic-divider>
|
|
73
34
|
</template>
|
|
74
35
|
</sonic-code>
|
|
75
|
-
|
|
76
|
-
## Default slot
|
|
77
|
-
|
|
78
|
-
Slotted content replaces or augments **`label`**. Useful for badges, icons, or mixed markup in menus.
|
|
79
|
-
|
|
80
|
-
<sonic-code>
|
|
81
|
-
<template>
|
|
82
|
-
<sonic-divider>
|
|
83
|
-
<span class="mr-2">Section title</span>
|
|
84
|
-
<sonic-badge type="danger">+25</sonic-badge>
|
|
85
|
-
</sonic-divider>
|
|
86
|
-
</template>
|
|
87
|
-
</sonic-code>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## Inside typed cards
|
|
91
|
-
|
|
92
|
-
On **`sonic-card`** with semantic **`type`** (`primary` · `warning` · `danger` · `info` · `success`), the rule uses the card’s text color at reduced opacity so it stays visible on tinted surfaces. **`label`** and slotted captions use the same foreground color as surrounding copy.
|
|
93
|
-
|
|
94
|
-
<sonic-code>
|
|
95
|
-
<template>
|
|
96
|
-
<div class="grid gap-4 max-w-xl">
|
|
97
|
-
<sonic-card type="danger">
|
|
98
|
-
<div>This action cannot be undone.</div>
|
|
99
|
-
<sonic-divider label="Affected resources"></sonic-divider>
|
|
100
|
-
<ul class="m-0 pl-5 text-sm">
|
|
101
|
-
<li>Project files</li>
|
|
102
|
-
<li>Shared links</li>
|
|
103
|
-
</ul>
|
|
104
|
-
</sonic-card>
|
|
105
|
-
<sonic-card type="info">
|
|
106
|
-
<div>Maintenance is scheduled for tonight.</div>
|
|
107
|
-
<sonic-divider></sonic-divider>
|
|
108
|
-
<div class="opacity-60">Expected downtime: about 15 minutes.</div>
|
|
109
|
-
</sonic-card>
|
|
110
|
-
</div>
|
|
111
|
-
</template>
|
|
112
|
-
</sonic-code>
|
|
113
|
-
|
|
114
|
-
## API reference
|
|
115
|
-
|
|
116
|
-
| Attribute | Values | Description |
|
|
117
|
-
|----------|---------|-------------|
|
|
118
|
-
| `label` | string (HTML) | Caption centered on the rule; combined with default-slot content when both are set |
|
|
119
|
-
| `align` | `left` · `center` · `right` (default `center`) | Hides the leading or trailing line segment for left/right alignment |
|
|
120
|
-
| `size` | `2xs` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `inherit` | Vertical margin and label `font-size`; omit for host defaults |
|
|
121
|
-
| `lineStyle` | `solid` · `dashed` · `dotted` (default `solid`) | Stroke style of the rule (HTML attribute `linestyle`) |
|
|
122
|
-
| `vertical` | boolean | Renders a vertical rule; swap block/inline margins |
|
|
123
|
-
| `noMargin` | boolean | Sets host margin to `0` |
|
|
124
|
-
|
|
125
|
-
| Slot | Description |
|
|
126
|
-
|------|-------------|
|
|
127
|
-
| *(default)* | Label markup when **`label`** is insufficient or empty |
|
|
128
|
-
|
|
129
|
-
The inner flex container exposes **`part="divider"`** for theme overrides.
|
|
@@ -1,205 +1,129 @@
|
|
|
1
1
|
# Fieldset
|
|
2
2
|
|
|
3
|
-
**`sonic-fieldset`** groups related form controls with a bordered container and an accessible **`<fieldset>`** semantics layer. Put fields in the **default slot**; add a title with **`sonic-legend`** or the shorthand **`label`** / **`description`** / **`iconName`** attributes. Default **`variant`** is `default`. Pair the body with **`sonic-form-layout`** for responsive columns.
|
|
4
|
-
|
|
5
|
-
## Basic example
|
|
6
|
-
|
|
7
|
-
<sonic-code>
|
|
8
|
-
<template>
|
|
9
|
-
<sonic-fieldset>
|
|
10
|
-
<sonic-legend label="Contact details"></sonic-legend>
|
|
11
|
-
<sonic-form-layout>
|
|
12
|
-
<sonic-input autocomplete="email" label="Email" name="email" type="email"></sonic-input>
|
|
13
|
-
<sonic-input autocomplete="tel" label="Phone" name="phone" type="tel"></sonic-input>
|
|
14
|
-
</sonic-form-layout>
|
|
15
|
-
</sonic-fieldset>
|
|
16
|
-
</template>
|
|
17
|
-
</sonic-code>
|
|
18
|
-
|
|
19
3
|
## Variant
|
|
20
|
-
|
|
21
|
-
**`ghost`** and **`shadow`** use a transparent border; **`shadow`** also applies **`--sc-shadow-lg`**.
|
|
22
|
-
|
|
23
4
|
<sonic-code>
|
|
24
5
|
<template>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</sonic-fieldset>
|
|
34
|
-
<sonic-fieldset variant="shadow">
|
|
35
|
-
<sonic-legend label="Shadow"></sonic-legend>
|
|
36
|
-
<sonic-input label="Field" name="c"></sonic-input>
|
|
37
|
-
</sonic-fieldset>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
</sonic-code>
|
|
41
|
-
|
|
42
|
-
## Tight layout
|
|
43
|
-
|
|
44
|
-
Set **`tight`** to remove horizontal padding and side borders (flat strip inside a parent).
|
|
45
|
-
|
|
46
|
-
<sonic-code>
|
|
47
|
-
<template>
|
|
48
|
-
<sonic-fieldset tight variant="ghost">
|
|
49
|
-
<sonic-legend label="Tight fieldset"></sonic-legend>
|
|
50
|
-
<sonic-input label="Field" name="tight"></sonic-input>
|
|
6
|
+
<sonic-fieldset variant="default" >
|
|
7
|
+
Default
|
|
8
|
+
</sonic-fieldset>
|
|
9
|
+
<sonic-fieldset variant="ghost" >
|
|
10
|
+
Ghost
|
|
11
|
+
</sonic-fieldset>
|
|
12
|
+
<sonic-fieldset variant="shadow" >
|
|
13
|
+
Shadow
|
|
51
14
|
</sonic-fieldset>
|
|
52
15
|
</template>
|
|
53
16
|
</sonic-code>
|
|
54
17
|
|
|
55
18
|
## Legend
|
|
56
|
-
|
|
57
|
-
Use **`sonic-legend`** for the group title. Set **`label`** and **`description`** for simple copy, or use the **default slot** for custom markup. Add secondary text with **`sonic-legend-description`**. Place actions in **`slot="suffix"`** on the legend.
|
|
58
|
-
|
|
59
|
-
Attribute values on **`sonic-legend`** are rendered as HTML—use only trusted content.
|
|
60
|
-
|
|
61
|
-
<sonic-code>
|
|
62
|
-
<template>
|
|
63
|
-
<div class="grid gap-4">
|
|
64
|
-
<sonic-fieldset>
|
|
65
|
-
<sonic-legend label="Attributes" description="Short description via attributes"></sonic-legend>
|
|
66
|
-
<sonic-input label="Field" name="attr"></sonic-input>
|
|
67
|
-
</sonic-fieldset>
|
|
68
|
-
<sonic-fieldset>
|
|
69
|
-
<sonic-legend iconLibrary="iconoir" iconName="pin-alt">
|
|
70
|
-
Custom title in the default slot
|
|
71
|
-
<sonic-legend-description>Description via sonic-legend-description</sonic-legend-description>
|
|
72
|
-
</sonic-legend>
|
|
73
|
-
<sonic-input label="Field" name="slot"></sonic-input>
|
|
74
|
-
</sonic-fieldset>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
77
|
-
</sonic-code>
|
|
78
|
-
|
|
79
|
-
## Shorthand legend on the fieldset
|
|
80
|
-
|
|
81
|
-
When **`label`** is set on **`sonic-fieldset`**, the component renders **`sonic-legend`** for you. Pass **`description`** **`iconName`** **`iconLibrary`** and **`iconPrefix`** the same way. Do not combine shorthand **`label`** with a separate slotted **`sonic-legend`**—you will get two legends.
|
|
82
|
-
|
|
83
19
|
<sonic-code>
|
|
84
20
|
<template>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
>
|
|
91
|
-
|
|
92
|
-
|
|
21
|
+
<sonic-fieldset>
|
|
22
|
+
<sonic-legend label="Legend via attribut : label" description="Description via attribut : description">
|
|
23
|
+
</sonic-legend>
|
|
24
|
+
</sonic-fieldset>
|
|
25
|
+
<sonic-fieldset>
|
|
26
|
+
<sonic-legend iconLibrary="iconoir" iconName="pin-alt">
|
|
27
|
+
Custom legend via <b>slot</b>
|
|
28
|
+
<sonic-legend-description>
|
|
29
|
+
Description via composant : sonic-legend-description
|
|
30
|
+
</sonic-legend-description>
|
|
31
|
+
</sonic-legend>
|
|
32
|
+
</sonic-fieldset>
|
|
93
33
|
</template>
|
|
94
34
|
</sonic-code>
|
|
95
35
|
|
|
96
|
-
## Legend actions
|
|
97
|
-
|
|
98
|
-
Use **`slot="suffix"`** on **`sonic-legend`** for menus or icon buttons aligned to the end of the legend row.
|
|
99
36
|
|
|
37
|
+
## Short hand
|
|
100
38
|
<sonic-code>
|
|
101
39
|
<template>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
<sonic-menu slot="content" minWidth="12rem">
|
|
109
|
-
<sonic-menu-item>Legal notice</sonic-menu-item>
|
|
110
|
-
<sonic-menu-item>Terms of use</sonic-menu-item>
|
|
111
|
-
</sonic-menu>
|
|
112
|
-
</sonic-pop>
|
|
113
|
-
</sonic-legend>
|
|
114
|
-
<sonic-form-layout>
|
|
115
|
-
<sonic-input autocomplete="family-name" label="Last name" name="last_name"></sonic-input>
|
|
116
|
-
<sonic-input autocomplete="given-name" label="First name" name="first_name"></sonic-input>
|
|
117
|
-
</sonic-form-layout>
|
|
118
|
-
</sonic-fieldset>
|
|
40
|
+
<sonic-fieldset
|
|
41
|
+
label="All props on fieldset tag"
|
|
42
|
+
description="Lorem ipsum dolor sit amet, consectetur adipiscing elit"
|
|
43
|
+
iconLibrary="iconoir"
|
|
44
|
+
iconName="user">
|
|
45
|
+
</sonic-fieldset>
|
|
119
46
|
</template>
|
|
120
47
|
</sonic-code>
|
|
121
48
|
|
|
122
|
-
##
|
|
123
|
-
|
|
124
|
-
### Associating a distant `form`
|
|
125
|
-
|
|
126
|
-
Set **`form`** on **`sonic-fieldset`** to the **`id`** of a **`<form>`** elsewhere in the page (same as the native **`form`** attribute on **`<fieldset>`**). Named fields in the fieldset then belong to that form for submit and constraint validation—for example a toolbar **`form`** and a field group rendered lower on the layout.
|
|
127
|
-
|
|
49
|
+
## Example of use
|
|
128
50
|
<sonic-code>
|
|
129
51
|
<template>
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
52
|
+
<sonic-div formDataProvider="user_create">
|
|
53
|
+
<form action="/inscription?lang=fr" method="POST" class="mb-20" accept-charset="UTF-8" id="youpla">
|
|
54
|
+
<sonic-fieldset form="formid" collapsible="true" collapsed="false">
|
|
55
|
+
<sonic-legend iconLibrary="iconoir" iconName="user">
|
|
56
|
+
Informations personnelles
|
|
57
|
+
<span slot="description">Description du fieldset lorem ipsum dolor</span>
|
|
58
|
+
<sonic-pop class="inline-block" slot="suffix">
|
|
59
|
+
<sonic-button shape="circle" variant="ghost">
|
|
60
|
+
<sonic-icon library="iconoir" size="lg" name="more-vert"></sonic-icon
|
|
61
|
+
></sonic-button>
|
|
62
|
+
<sonic-menu slot="content" minWidth="12rem">
|
|
63
|
+
<sonic-menu-item>Mentions légales</sonic-menu-item>
|
|
64
|
+
<sonic-menu-item>Conditions générales d'utilisation</sonic-menu-item>
|
|
65
|
+
</sonic-menu>
|
|
66
|
+
</sonic-pop>
|
|
67
|
+
</sonic-legend>
|
|
135
68
|
<sonic-form-layout>
|
|
136
|
-
<sonic-input
|
|
137
|
-
<sonic-input
|
|
138
|
-
<sonic-
|
|
69
|
+
<sonic-input autocomplete="family-name" label="Nom" name="nom"></sonic-input>
|
|
70
|
+
<sonic-input autocomplete="given-name" label="Prénom" name="prenom"></sonic-input>
|
|
71
|
+
<sonic-select autocomplete="sex" label="Sexe" name="sexe">
|
|
72
|
+
<option value="" selected="selected">- Sélectionner -</option>
|
|
73
|
+
<option value="-">Je préfère ne pas le dire</option>
|
|
74
|
+
<option value="Homme">Homme</option>
|
|
75
|
+
<option value="Femme">Femme</option>
|
|
76
|
+
</sonic-select>
|
|
77
|
+
<sonic-input autocomplete="bday" label="Date de naissance" name="date_naissance" type="date"></sonic-input>
|
|
78
|
+
<sonic-divider></sonic-divider>
|
|
79
|
+
<sonic-input autocomplete="email" label="e-mail" name="email" type="email"></sonic-input>
|
|
80
|
+
<sonic-input
|
|
81
|
+
autocomplete="email"
|
|
82
|
+
label="Confirmer votre e-mail"
|
|
83
|
+
name="email_confirmation"
|
|
84
|
+
type="email"
|
|
85
|
+
></sonic-input>
|
|
86
|
+
<sonic-input autocomplete="new-password" label="Mot de passe" name="password" type="password"></sonic-input>
|
|
87
|
+
<sonic-input
|
|
88
|
+
autocomplete="new-password"
|
|
89
|
+
label="Confirmer votre mot de passe"
|
|
90
|
+
name="password_confirmation"
|
|
91
|
+
type="password"
|
|
92
|
+
></sonic-input>
|
|
139
93
|
</sonic-form-layout>
|
|
140
94
|
</sonic-fieldset>
|
|
141
|
-
|
|
142
|
-
</
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
Set **`disabled`** on **`sonic-fieldset`** to disable the inner **`<fieldset>`** and every control in the group (same as a native fieldset). Use it for read-only steps or sections gated by permissions.
|
|
148
|
-
|
|
149
|
-
<sonic-code>
|
|
150
|
-
<template>
|
|
151
|
-
<div class="grid gap-4">
|
|
152
|
-
<sonic-fieldset label="Editable">
|
|
153
|
-
<sonic-input label="Display name" name="display_name"></sonic-input>
|
|
154
|
-
</sonic-fieldset>
|
|
155
|
-
<sonic-fieldset label="Locked" disabled>
|
|
156
|
-
<sonic-input label="Account ID" name="account_id" value="acct_42"></sonic-input>
|
|
95
|
+
<sonic-fieldset form="formid" collapsible="true" collapsed="false">
|
|
96
|
+
<sonic-legend iconLibrary="iconoir" iconName="pin-alt"> Coordonnées </sonic-legend>
|
|
97
|
+
<sonic-form-layout>
|
|
98
|
+
<sonic-input autocomplete="postal-code" label="Code postal" name="cp"></sonic-input>
|
|
99
|
+
<sonic-input autocomplete="address-level2" label="Ville" name="ville"></sonic-input>
|
|
100
|
+
</sonic-form-layout>
|
|
157
101
|
</sonic-fieldset>
|
|
102
|
+
<div class="">
|
|
103
|
+
<sonic-button submit type="primary">
|
|
104
|
+
<sonic-icon library="iconoir" name="check"></sonic-icon>
|
|
105
|
+
S'inscrire
|
|
106
|
+
</sonic-button>
|
|
107
|
+
<sonic-tooltip class="inline-flex" label="Vous êtes sûr(e) ? 🙄">
|
|
108
|
+
<sonic-button size="sm" variant="ghost"> Continuer sans m'inscrire </sonic-button>
|
|
109
|
+
</sonic-tooltip>
|
|
110
|
+
</div>
|
|
111
|
+
</form>
|
|
112
|
+
<div dataProvider="user_create" class="my-6 text-neutral-600 p-5 rounded-xl shadow-lg">
|
|
113
|
+
<div class="font-bold text-lg text-neutral-400">Submitted informations...</div>
|
|
114
|
+
<div class="text-lg my-2">
|
|
115
|
+
<sonic-value key="nom" class="font-bold"></sonic-value>
|
|
116
|
+
<sonic-value key="prenom"></sonic-value>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="text-sm">
|
|
119
|
+
<sonic-value key="sexe"></sonic-value>
|
|
120
|
+
<sonic-value key="date_naissance"></sonic-value>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="text-sm">
|
|
123
|
+
<sonic-value key="email"></sonic-value>
|
|
124
|
+
<sonic-value key="cp"></sonic-value>
|
|
125
|
+
<sonic-value key="ville"></sonic-value></div>
|
|
158
126
|
</div>
|
|
127
|
+
</sonic-div>
|
|
159
128
|
</template>
|
|
160
129
|
</sonic-code>
|
|
161
|
-
|
|
162
|
-
## Accessibility
|
|
163
|
-
|
|
164
|
-
The inner **`<fieldset>`** carries grouping semantics. **`disabled`** is applied on that element so nested controls are disabled in the usual way. **`sonic-legend`** renders a native **`<legend>`** for the group label.
|
|
165
|
-
|
|
166
|
-
## API reference
|
|
167
|
-
|
|
168
|
-
### `sonic-fieldset`
|
|
169
|
-
|
|
170
|
-
| Attribute | Values | Description |
|
|
171
|
-
|----------|---------|-------------|
|
|
172
|
-
| `variant` | `default` · `ghost` · `shadow` (default `default`) | Border and shadow treatment |
|
|
173
|
-
| `tight` | boolean | Removes horizontal padding and side borders |
|
|
174
|
-
| `label` | string | Shorthand legend title; renders **`sonic-legend`** when set |
|
|
175
|
-
| `description` | string | Shorthand legend description (HTML) |
|
|
176
|
-
| `iconName` | string | Shorthand legend icon **`name`** |
|
|
177
|
-
| `iconLibrary` | string | Shorthand legend icon **`library`** |
|
|
178
|
-
| `iconPrefix` | string | Shorthand legend icon **`prefix`** |
|
|
179
|
-
| `disabled` | boolean | Disables the native **`<fieldset>`** and its controls |
|
|
180
|
-
| `form` | string | **`id`** of an associated **`form`** |
|
|
181
|
-
| `dataProvider` | string | Subscriber key; can autofill properties that match publisher fields (e.g. **`label`**) |
|
|
182
|
-
|
|
183
|
-
| Slot | Description |
|
|
184
|
-
|------|-------------|
|
|
185
|
-
| *(default)* | Legend (optional) and field group content in visual order |
|
|
186
|
-
|
|
187
|
-
### `sonic-legend`
|
|
188
|
-
|
|
189
|
-
| Attribute | Values | Description |
|
|
190
|
-
|----------|---------|-------------|
|
|
191
|
-
| `label` | string | Title HTML when not using the default slot |
|
|
192
|
-
| `description` | string | Description HTML (wrapped in **`sonic-legend-description`**) |
|
|
193
|
-
| `iconName` | string | Leading **`sonic-icon`** **`name`** |
|
|
194
|
-
| `iconLibrary` | string | Icon **`library`** |
|
|
195
|
-
| `iconPrefix` | string | Icon **`prefix`** |
|
|
196
|
-
| `forceAutoFill` | boolean | Allows Subscriber autofill to override attribute-backed **`label`** / **`description`** |
|
|
197
|
-
|
|
198
|
-
| Slot | Description |
|
|
199
|
-
|------|-------------|
|
|
200
|
-
| *(default)* | Legend title and description components |
|
|
201
|
-
| `suffix` | Trailing actions (menus, icon buttons) |
|
|
202
|
-
|
|
203
|
-
### `sonic-legend-description`
|
|
204
|
-
|
|
205
|
-
Muted description line below the legend title. No attributes—project content through the **default slot**.
|
|
@@ -1,100 +1,77 @@
|
|
|
1
|
-
# Form
|
|
1
|
+
# Form-actions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Basic example
|
|
6
|
-
|
|
7
|
-
With no attributes, actions align to the **start** of the row (typical for left-to-right forms).
|
|
3
|
+
## Left by default
|
|
8
4
|
|
|
9
5
|
<sonic-code>
|
|
10
6
|
<template>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
<form>
|
|
8
|
+
<sonic-form-layout>
|
|
9
|
+
<sonic-input label="First name"></sonic-input>
|
|
10
|
+
<sonic-input label="Last name"></sonic-input>
|
|
11
|
+
<sonic-form-actions>
|
|
12
|
+
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
13
|
+
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
14
|
+
</sonic-form-actions>
|
|
15
|
+
</sonic-form-layout>
|
|
16
|
+
</form >
|
|
21
17
|
</template>
|
|
22
18
|
</sonic-code>
|
|
23
19
|
|
|
24
|
-
## Justify
|
|
25
|
-
|
|
26
|
-
**`justify`** maps to CSS **`justify-content`**. Use **`flex-end`** for dialog-style footers or **`center`** for balanced toolbars.
|
|
20
|
+
## Justify
|
|
27
21
|
|
|
28
22
|
<sonic-code>
|
|
29
23
|
<template>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
<form>
|
|
25
|
+
<sonic-form-layout>
|
|
26
|
+
<sonic-input label="First name"></sonic-input>
|
|
27
|
+
<sonic-input label="Last name"></sonic-input>
|
|
28
|
+
<sonic-form-actions justify="flex-end">
|
|
29
|
+
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
30
|
+
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
31
|
+
</sonic-form-actions>
|
|
32
|
+
</sonic-form-layout>
|
|
33
|
+
</form >
|
|
40
34
|
</template>
|
|
41
35
|
</sonic-code>
|
|
42
36
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
**`direction`** maps to **`flex-direction`**. **`row-reverse`** swaps visual order while keeping DOM order (focus order unchanged).
|
|
37
|
+
## Direction
|
|
46
38
|
|
|
47
39
|
<sonic-code>
|
|
48
40
|
<template>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
<form>
|
|
42
|
+
<sonic-form-layout>
|
|
43
|
+
<sonic-input label="First name"></sonic-input>
|
|
44
|
+
<sonic-input label="Last name"></sonic-input>
|
|
45
|
+
<sonic-form-actions direction="row-reverse">
|
|
46
|
+
<sonic-button type="success"><sonic-icon name="check" library="iconoir"></sonic-icon> Submit</sonic-button>
|
|
47
|
+
<sonic-button type="danger" variant="ghost"><sonic-icon name="undo" library="iconoir"></sonic-icon> Cancel</sonic-button>
|
|
48
|
+
</sonic-form-actions>
|
|
49
|
+
</sonic-form-layout>
|
|
50
|
+
</form >
|
|
59
51
|
</template>
|
|
60
52
|
</sonic-code>
|
|
61
53
|
|
|
62
|
-
##
|
|
63
|
-
|
|
64
|
-
Combine **`sonic-button`** with **`sonic-divider vertical`** or other slotted content. Default **`alignItems`** `center` keeps unlike heights aligned on the cross axis.
|
|
54
|
+
## Center
|
|
65
55
|
|
|
66
56
|
<sonic-code>
|
|
67
57
|
<template>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
58
|
+
<form>
|
|
59
|
+
<sonic-form-layout>
|
|
60
|
+
<sonic-input label="First name"></sonic-input>
|
|
61
|
+
<sonic-input label="Last name"></sonic-input>
|
|
62
|
+
<sonic-form-actions justify="center" >
|
|
63
|
+
<sonic-button type="info" minWidth="12rem">
|
|
64
|
+
<sonic-icon name="nav-arrow-left" library="iconoir" slot="prefix"></sonic-icon>
|
|
65
|
+
Left seats
|
|
66
|
+
</sonic-button>
|
|
67
|
+
<sonic-divider vertical></sonic-divider>
|
|
68
|
+
<sonic-button type="info" minWidth="12rem">
|
|
69
|
+
<sonic-icon name="nav-arrow-right" library="iconoir" slot="suffix"></sonic-icon>
|
|
70
|
+
Right seats
|
|
71
|
+
</sonic-button>
|
|
72
|
+
</sonic-form-actions>
|
|
73
|
+
</sonic-form-layout>
|
|
74
|
+
</form >
|
|
85
75
|
</template>
|
|
86
76
|
</sonic-code>
|
|
87
77
|
|
|
88
|
-
## API reference
|
|
89
|
-
|
|
90
|
-
| Attribute | Values | Description |
|
|
91
|
-
|----------|---------|-------------|
|
|
92
|
-
| `direction` | `row` (default) · `column` · `row-reverse` · `column-reverse` | Main-axis layout of slotted controls |
|
|
93
|
-
| `justify` | CSS justify-content (default `flex-start`) | Distribution along the main axis |
|
|
94
|
-
| `alignItems` | CSS align-items (default `center`) | Cross-axis alignment when items differ in height |
|
|
95
|
-
|
|
96
|
-
The component exposes a single unnamed slot; there are no named slots. Slotted nodes use the host’s flex **`gap`** (`0.3rem`) and **`flex-wrap`**.
|
|
97
|
-
|
|
98
|
-
| Slot | Description |
|
|
99
|
-
|------|-------------|
|
|
100
|
-
| *(default)* | Footer actions (**`sonic-button`** and related controls) |
|