@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,109 +1,63 @@
|
|
|
1
|
-
# Progress
|
|
1
|
+
# Progress bar
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Basic example
|
|
6
|
-
|
|
7
|
-
Set **`value`** from `0` to **`max`** (default `100`). Label text uses the type color.
|
|
8
|
-
|
|
9
|
-
<sonic-code>
|
|
10
|
-
<template>
|
|
11
|
-
<sonic-progress value="50">50%</sonic-progress>
|
|
12
|
-
</template>
|
|
13
|
-
</sonic-code>
|
|
3
|
+
Displays an indicator showing the completion progress of a task.
|
|
14
4
|
|
|
15
5
|
## Indeterminate
|
|
16
6
|
|
|
17
|
-
With no **`value`**, the bar animates until progress is known.
|
|
18
|
-
|
|
19
7
|
<sonic-code>
|
|
20
8
|
<template>
|
|
21
|
-
|
|
9
|
+
<sonic-progress></sonic-progress>
|
|
22
10
|
</template>
|
|
23
11
|
</sonic-code>
|
|
24
12
|
|
|
25
|
-
## Type
|
|
26
13
|
|
|
27
|
-
|
|
14
|
+
## Remaining
|
|
28
15
|
|
|
29
16
|
<sonic-code>
|
|
30
17
|
<template>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<sonic-progress type="neutral" value="50">50%</sonic-progress>
|
|
35
|
-
<sonic-progress type="info" value="50">50%</sonic-progress>
|
|
36
|
-
<sonic-progress type="warning" value="50">50%</sonic-progress>
|
|
37
|
-
<sonic-progress type="success" value="50">50%</sonic-progress>
|
|
38
|
-
<sonic-progress type="danger" value="50">50%</sonic-progress>
|
|
39
|
-
</div>
|
|
18
|
+
<sonic-progress type="danger" value="80">
|
|
19
|
+
80% Used <span slot="remaining">20% left</span>
|
|
20
|
+
</sonic-progress>
|
|
40
21
|
</template>
|
|
41
22
|
</sonic-code>
|
|
42
23
|
|
|
43
|
-
##
|
|
44
|
-
|
|
45
|
-
Bar height scales with typography via **`size`**. With no **`size`**, font size matches **`md`** (`1rem`).
|
|
24
|
+
## Sizes
|
|
46
25
|
|
|
47
26
|
<sonic-code>
|
|
48
27
|
<template>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
28
|
+
<div class="grid gap-3">
|
|
29
|
+
<sonic-progress size="2xs" value="25">25%</sonic-progress>
|
|
30
|
+
<sonic-progress size="xs" value="25">25%</sonic-progress>
|
|
31
|
+
<sonic-progress size="sm" value="25">25%</sonic-progress>
|
|
32
|
+
<sonic-progress size="md" value="25">25%</sonic-progress>
|
|
33
|
+
<sonic-progress size="lg" value="25">25%</sonic-progress>
|
|
34
|
+
<sonic-progress size="xl" value="25">25%</sonic-progress>
|
|
35
|
+
<sonic-progress size="2xl" value="25">25%</sonic-progress>
|
|
36
|
+
</div>
|
|
58
37
|
</template>
|
|
59
38
|
</sonic-code>
|
|
60
39
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
The default slot is the main label (left). **`remaining`** is right-aligned with lighter weight—use it for “left to complete” copy.
|
|
40
|
+
## Type
|
|
64
41
|
|
|
65
42
|
<sonic-code>
|
|
66
43
|
<template>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
44
|
+
<div class="grid gap-3">
|
|
45
|
+
<sonic-progress value="50">50%</sonic-progress>
|
|
46
|
+
<sonic-progress type="info" value="50">50%</sonic-progress>
|
|
47
|
+
<sonic-progress type="warning" value="50">50%</sonic-progress>
|
|
48
|
+
<sonic-progress type="success" value="50">50%</sonic-progress>
|
|
49
|
+
<sonic-progress type="danger" value="50">50%</sonic-progress>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
71
52
|
</sonic-code>
|
|
72
53
|
|
|
73
|
-
## Invert
|
|
74
54
|
|
|
75
|
-
|
|
55
|
+
## Invert
|
|
76
56
|
|
|
77
57
|
<sonic-code>
|
|
78
58
|
<template>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</sonic-card>
|
|
83
|
-
<sonic-card type="warning">
|
|
84
|
-
<sonic-progress invert type="warning" value="50">50%</sonic-progress>
|
|
85
|
-
</sonic-card>
|
|
86
|
-
<sonic-card type="success">
|
|
87
|
-
<sonic-progress invert type="success" value="50">50%</sonic-progress>
|
|
88
|
-
</sonic-card>
|
|
89
|
-
<sonic-card type="danger">
|
|
90
|
-
<sonic-progress invert type="danger" value="50">50%</sonic-progress>
|
|
91
|
-
</sonic-card>
|
|
92
|
-
</div>
|
|
59
|
+
<div class="bg-neutral-900 p-4 rounded-md">
|
|
60
|
+
<sonic-progress type="invert" value="50">50%</sonic-progress>
|
|
61
|
+
</div>
|
|
93
62
|
</template>
|
|
94
63
|
</sonic-code>
|
|
95
|
-
|
|
96
|
-
## API reference
|
|
97
|
-
|
|
98
|
-
| Attribute | Values | Description |
|
|
99
|
-
|----------|---------|-------------|
|
|
100
|
-
| `value` | number | Completion amount; omit for indeterminate state |
|
|
101
|
-
| `max` | number (default `100`) | Upper bound for **`value`** |
|
|
102
|
-
| `type` | `default` (default) · `primary` · `neutral` · `warning` · `info` · `success` · `danger` | Semantic bar and label color |
|
|
103
|
-
| `size` | `2xs` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `inherit` | Typography scale (bar height follows `em`) |
|
|
104
|
-
| `invert` | boolean | High-contrast tokens on colored backgrounds |
|
|
105
|
-
|
|
106
|
-
| Slot | Description |
|
|
107
|
-
|------|-------------|
|
|
108
|
-
| *(default)* | Primary label below the bar (left) |
|
|
109
|
-
| `remaining` | Secondary label below the bar (right) |
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# Table
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Basic example
|
|
6
|
-
|
|
7
|
-
A header row plus body rows is enough for static tables; **`sonic-thead`** / **`sonic-tbody`** are optional for simple layouts.
|
|
3
|
+
## Basic usage
|
|
8
4
|
|
|
9
5
|
<sonic-code>
|
|
10
6
|
<template>
|
|
@@ -33,9 +29,7 @@ A header row plus body rows is enough for static tables; **`sonic-thead`** / **`
|
|
|
33
29
|
</template>
|
|
34
30
|
</sonic-code>
|
|
35
31
|
|
|
36
|
-
## List
|
|
37
|
-
|
|
38
|
-
Place **`sonic-list`** inside **`sonic-tbody`** so each item template renders a **`sonic-tr`**. **`sonic-list`** sets row metadata (`even` / `odd` / `last`) on **`sonic-tr`** for striping and borders.
|
|
32
|
+
## List / fetch
|
|
39
33
|
|
|
40
34
|
<sonic-code>
|
|
41
35
|
<template>
|
|
@@ -45,7 +39,7 @@ Place **`sonic-list`** inside **`sonic-tbody`** so each item template renders a
|
|
|
45
39
|
<sonic-th>Id</sonic-th>
|
|
46
40
|
<sonic-th>Name</sonic-th>
|
|
47
41
|
<sonic-th>Email</sonic-th>
|
|
48
|
-
</sonic-tr>
|
|
42
|
+
</sonic-tr>
|
|
49
43
|
</sonic-thead>
|
|
50
44
|
<sonic-tbody>
|
|
51
45
|
<sonic-list debug fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
@@ -56,7 +50,7 @@ Place **`sonic-list`** inside **`sonic-tbody`** so each item template renders a
|
|
|
56
50
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
57
51
|
</sonic-tr>
|
|
58
52
|
</template>
|
|
59
|
-
|
|
53
|
+
<sonic-list>
|
|
60
54
|
</sonic-tbody>
|
|
61
55
|
</sonic-table>
|
|
62
56
|
</template>
|
|
@@ -64,8 +58,6 @@ Place **`sonic-list`** inside **`sonic-tbody`** so each item template renders a
|
|
|
64
58
|
|
|
65
59
|
## Size
|
|
66
60
|
|
|
67
|
-
Default font size is **`md`** (omit **`size`**). Sizes follow the shared scale (`2xs` … `2xl`).
|
|
68
|
-
|
|
69
61
|
<sonic-code>
|
|
70
62
|
<template>
|
|
71
63
|
<div class="grid grid-cols-4 gap-3">
|
|
@@ -99,8 +91,6 @@ Default font size is **`md`** (omit **`size`**). Sizes follow the shared scale (
|
|
|
99
91
|
|
|
100
92
|
## Bordered
|
|
101
93
|
|
|
102
|
-
Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules between rows.
|
|
103
|
-
|
|
104
94
|
<sonic-code>
|
|
105
95
|
<template>
|
|
106
96
|
<sonic-table bordered>
|
|
@@ -132,9 +122,7 @@ Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules
|
|
|
132
122
|
</template>
|
|
133
123
|
</sonic-code>
|
|
134
124
|
|
|
135
|
-
##
|
|
136
|
-
|
|
137
|
-
**`maxHeight`** applies to the scroll container (for example `8rem`), so the body scrolls vertically while the table can still scroll horizontally.
|
|
125
|
+
## MaxHeight
|
|
138
126
|
|
|
139
127
|
<sonic-code>
|
|
140
128
|
<template>
|
|
@@ -144,10 +132,10 @@ Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules
|
|
|
144
132
|
<sonic-th>Id</sonic-th>
|
|
145
133
|
<sonic-th>Name</sonic-th>
|
|
146
134
|
<sonic-th>Email</sonic-th>
|
|
147
|
-
</sonic-tr>
|
|
135
|
+
</sonic-tr>
|
|
148
136
|
</sonic-thead>
|
|
149
137
|
<sonic-tbody>
|
|
150
|
-
<sonic-list
|
|
138
|
+
<sonic-list fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
151
139
|
<template>
|
|
152
140
|
<sonic-tr>
|
|
153
141
|
<sonic-td data-bind ::inner-html="$id"></sonic-td>
|
|
@@ -155,7 +143,7 @@ Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules
|
|
|
155
143
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
156
144
|
</sonic-tr>
|
|
157
145
|
</template>
|
|
158
|
-
|
|
146
|
+
<sonic-list>
|
|
159
147
|
</sonic-tbody>
|
|
160
148
|
</sonic-table>
|
|
161
149
|
</template>
|
|
@@ -163,43 +151,42 @@ Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules
|
|
|
163
151
|
|
|
164
152
|
## Type
|
|
165
153
|
|
|
166
|
-
|
|
154
|
+
Values available : primary, info, success, warning, danger
|
|
167
155
|
|
|
168
156
|
<sonic-code>
|
|
169
157
|
<template>
|
|
170
158
|
<sonic-table bordered>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
159
|
+
<sonic-tr>
|
|
160
|
+
<sonic-th type="info">Attribute type set on</sonic-th>
|
|
161
|
+
<sonic-th type="info">sonic-th</sonic-th>
|
|
162
|
+
</sonic-tr>
|
|
163
|
+
<sonic-tr>
|
|
164
|
+
<sonic-td type="danger">Attribute type set on</sonic-td>
|
|
165
|
+
<sonic-td type="danger">sonic-td</sonic-td>
|
|
166
|
+
</sonic-tr>
|
|
167
|
+
<sonic-tr type="success">
|
|
168
|
+
<sonic-td>Attribute type set on</sonic-td>
|
|
169
|
+
<sonic-td>sonic-tr</sonic-td>
|
|
170
|
+
</sonic-tr>
|
|
171
|
+
</sonic-tbody>
|
|
183
172
|
</sonic-table>
|
|
184
173
|
</template>
|
|
185
174
|
</sonic-code>
|
|
186
175
|
|
|
187
|
-
## Colspan
|
|
188
|
-
|
|
189
|
-
Use **`colSpan`** and **`rowSpan`** on **`sonic-th`** or **`sonic-td`** (maps to `colspan` / `rowspan` on the cell).
|
|
176
|
+
## Colspan / rowspan
|
|
190
177
|
|
|
191
178
|
<sonic-code>
|
|
192
179
|
<template>
|
|
193
|
-
<sonic-table>
|
|
180
|
+
<sonic-table >
|
|
194
181
|
<sonic-tbody>
|
|
195
182
|
<sonic-tr>
|
|
196
|
-
<sonic-td colspan="2" class="bg-info text-neutral-0">colspan: 2</sonic-td>
|
|
183
|
+
<sonic-td colspan="2" class="bg-info text-neutral-0">colspan : 2</sonic-td>
|
|
197
184
|
<sonic-td>cell</sonic-td>
|
|
198
185
|
</sonic-tr>
|
|
199
186
|
<sonic-tr>
|
|
200
187
|
<sonic-td>cell</sonic-td>
|
|
201
188
|
<sonic-td>cell</sonic-td>
|
|
202
|
-
<sonic-td rowspan="2" class="bg-success text-neutral-0">rowspan: 2</sonic-td>
|
|
189
|
+
<sonic-td rowspan="2" class="bg-success text-neutral-0">rowspan : 2</sonic-td>
|
|
203
190
|
</sonic-tr>
|
|
204
191
|
<sonic-tr>
|
|
205
192
|
<sonic-td>cell</sonic-td>
|
|
@@ -210,9 +197,13 @@ Use **`colSpan`** and **`rowSpan`** on **`sonic-th`** or **`sonic-td`** (maps to
|
|
|
210
197
|
</template>
|
|
211
198
|
</sonic-code>
|
|
212
199
|
|
|
213
|
-
## Cell
|
|
200
|
+
## Cell style attributes
|
|
214
201
|
|
|
215
|
-
|
|
202
|
+
The following attributes will be used to set the style of the component :
|
|
203
|
+
- align
|
|
204
|
+
- minWidth
|
|
205
|
+
- maxWidth
|
|
206
|
+
- width
|
|
216
207
|
|
|
217
208
|
<sonic-code>
|
|
218
209
|
<template>
|
|
@@ -241,17 +232,17 @@ Use **`colSpan`** and **`rowSpan`** on **`sonic-th`** or **`sonic-td`** (maps to
|
|
|
241
232
|
<sonic-tr>
|
|
242
233
|
<sonic-td align="right">right</sonic-td>
|
|
243
234
|
<sonic-td>20rem</sonic-td>
|
|
244
|
-
<sonic-td
|
|
245
|
-
<sonic-td width="60rem">15rem
|
|
235
|
+
<sonic-td>5rem - Lorem ipsum dolor</sonic-td>
|
|
236
|
+
<sonic-td width="60rem">15rem - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam porta sollicitudin mollis. Curabitur sit amet nibh diam. Vivamus a pharetra mauris.</sonic-td>
|
|
246
237
|
</sonic-tr>
|
|
247
|
-
</sonic-tbody>
|
|
248
238
|
</sonic-table>
|
|
249
239
|
</template>
|
|
250
240
|
</sonic-code>
|
|
251
241
|
|
|
252
|
-
## Responsive layout
|
|
253
242
|
|
|
254
|
-
|
|
243
|
+
## Responsive
|
|
244
|
+
|
|
245
|
+
Every table is responsive by default
|
|
255
246
|
|
|
256
247
|
<sonic-code>
|
|
257
248
|
<template>
|
|
@@ -262,7 +253,7 @@ Tables scroll horizontally by default when columns exceed the viewport. Use **`m
|
|
|
262
253
|
<sonic-th>Name</sonic-th>
|
|
263
254
|
<sonic-th>Email</sonic-th>
|
|
264
255
|
<sonic-th>Comment</sonic-th>
|
|
265
|
-
</sonic-tr>
|
|
256
|
+
</sonic-tr>
|
|
266
257
|
</sonic-thead>
|
|
267
258
|
<sonic-tbody>
|
|
268
259
|
<sonic-list fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
@@ -272,19 +263,18 @@ Tables scroll horizontally by default when columns exceed the viewport. Use **`m
|
|
|
272
263
|
<sonic-td minWidth="10rem" data-bind ::inner-html="$first_name <b>$last_name</b>"></sonic-td>
|
|
273
264
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
274
265
|
<sonic-td minWidth="40rem">
|
|
275
|
-
|
|
266
|
+
hasellus suscipit vulputate lacus, in tempor turpis aliquam vel. Nunc eleifend, velit id ultrices elementum, ipsum felis porttitor dui, id laoreet diam nulla sed urna.
|
|
276
267
|
</sonic-td>
|
|
277
268
|
</sonic-tr>
|
|
278
269
|
</template>
|
|
279
|
-
|
|
270
|
+
<sonic-list>
|
|
280
271
|
</sonic-tbody>
|
|
281
272
|
</sonic-table>
|
|
282
273
|
</template>
|
|
283
274
|
</sonic-code>
|
|
284
275
|
|
|
285
|
-
## Sticky header and caption
|
|
286
276
|
|
|
287
|
-
|
|
277
|
+
## Sticky header
|
|
288
278
|
|
|
289
279
|
<sonic-code>
|
|
290
280
|
<template>
|
|
@@ -306,21 +296,53 @@ Tables scroll horizontally by default when columns exceed the viewport. Use **`m
|
|
|
306
296
|
<sonic-td>Germany</sonic-td>
|
|
307
297
|
<sonic-td align="center">2</sonic-td>
|
|
308
298
|
<sonic-td align="right">40€</sonic-td>
|
|
309
|
-
<sonic-td align="right"
|
|
310
|
-
|
|
311
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
312
|
-
|
|
299
|
+
<sonic-td td align="right"
|
|
300
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
301
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
302
|
+
></sonic-button>
|
|
313
303
|
</sonic-td>
|
|
314
304
|
</sonic-tr>
|
|
315
305
|
<sonic-tr>
|
|
316
306
|
<sonic-td>Centro comercial Moctezuma</sonic-td>
|
|
317
|
-
<sonic-td
|
|
307
|
+
<sonic-td
|
|
308
|
+
colspan="2"
|
|
309
|
+
align="center"
|
|
310
|
+
class="
|
|
311
|
+
text-center
|
|
312
|
+
text-neutral-400
|
|
313
|
+
"
|
|
314
|
+
>no information yet</sonic-td
|
|
315
|
+
>
|
|
318
316
|
<sonic-td align="center">3</sonic-td>
|
|
319
317
|
<sonic-td align="right">40€</sonic-td>
|
|
320
|
-
<sonic-td align="right"
|
|
321
|
-
|
|
322
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
323
|
-
|
|
318
|
+
<sonic-td td align="right"
|
|
319
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
320
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
321
|
+
></sonic-button>
|
|
322
|
+
</sonic-td>
|
|
323
|
+
</sonic-tr>
|
|
324
|
+
<sonic-tr>
|
|
325
|
+
<sonic-td>Ernst Handel</sonic-td>
|
|
326
|
+
<sonic-td>Roland Mendel</sonic-td>
|
|
327
|
+
<sonic-td>Austria</sonic-td>
|
|
328
|
+
<sonic-td align="center">4</sonic-td>
|
|
329
|
+
<sonic-td align="right">40€</sonic-td>
|
|
330
|
+
<sonic-td td align="right"
|
|
331
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
332
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
333
|
+
></sonic-button>
|
|
334
|
+
</sonic-td>
|
|
335
|
+
</sonic-tr>
|
|
336
|
+
<sonic-tr>
|
|
337
|
+
<sonic-td>Island Trading</sonic-td>
|
|
338
|
+
<sonic-td>Helen Bennett</sonic-td>
|
|
339
|
+
<sonic-td>UK</sonic-td>
|
|
340
|
+
<sonic-td align="center">1</sonic-td>
|
|
341
|
+
<sonic-td align="right">40€</sonic-td>
|
|
342
|
+
<sonic-td td align="right"
|
|
343
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
344
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
345
|
+
></sonic-button>
|
|
324
346
|
</sonic-td>
|
|
325
347
|
</sonic-tr>
|
|
326
348
|
<sonic-tr type="warning">
|
|
@@ -329,10 +351,10 @@ Tables scroll horizontally by default when columns exceed the viewport. Use **`m
|
|
|
329
351
|
<sonic-td>Canada</sonic-td>
|
|
330
352
|
<sonic-td align="center">0</sonic-td>
|
|
331
353
|
<sonic-td align="right">40€</sonic-td>
|
|
332
|
-
<sonic-td align="right"
|
|
333
|
-
|
|
334
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
335
|
-
|
|
354
|
+
<sonic-td td align="right"
|
|
355
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
356
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
357
|
+
></sonic-button>
|
|
336
358
|
</sonic-td>
|
|
337
359
|
</sonic-tr>
|
|
338
360
|
<sonic-tr>
|
|
@@ -341,91 +363,93 @@ Tables scroll horizontally by default when columns exceed the viewport. Use **`m
|
|
|
341
363
|
<sonic-td type="danger">Italy</sonic-td>
|
|
342
364
|
<sonic-td align="center">20</sonic-td>
|
|
343
365
|
<sonic-td align="right">40€</sonic-td>
|
|
344
|
-
<sonic-td align="right"
|
|
345
|
-
|
|
346
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
347
|
-
|
|
366
|
+
<sonic-td td align="right"
|
|
367
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
368
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
369
|
+
></sonic-button>
|
|
370
|
+
</sonic-td>
|
|
371
|
+
</sonic-tr>
|
|
372
|
+
<sonic-tr>
|
|
373
|
+
<sonic-td>Alfreds Futterkiste</sonic-td>
|
|
374
|
+
<sonic-td>Maria Anders</sonic-td>
|
|
375
|
+
<sonic-td>Germany</sonic-td>
|
|
376
|
+
<sonic-td align="center">2</sonic-td>
|
|
377
|
+
<sonic-td align="right">40€</sonic-td>
|
|
378
|
+
<sonic-td td align="right"
|
|
379
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
380
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
381
|
+
></sonic-button>
|
|
382
|
+
</sonic-td>
|
|
383
|
+
</sonic-tr>
|
|
384
|
+
<sonic-tr>
|
|
385
|
+
<sonic-td>Centro comercial Moctezuma</sonic-td>
|
|
386
|
+
<sonic-td
|
|
387
|
+
colspan="2"
|
|
388
|
+
align="center"
|
|
389
|
+
class="
|
|
390
|
+
text-center
|
|
391
|
+
text-neutral-400
|
|
392
|
+
"
|
|
393
|
+
>no information yet</sonic-td
|
|
394
|
+
>
|
|
395
|
+
<sonic-td align="center">3</sonic-td>
|
|
396
|
+
<sonic-td align="right">40€</sonic-td>
|
|
397
|
+
<sonic-td td align="right"
|
|
398
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
399
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
400
|
+
></sonic-button>
|
|
401
|
+
</sonic-td>
|
|
402
|
+
</sonic-tr>
|
|
403
|
+
<sonic-tr>
|
|
404
|
+
<sonic-td>Ernst Handel</sonic-td>
|
|
405
|
+
<sonic-td>Roland Mendel</sonic-td>
|
|
406
|
+
<sonic-td>Austria</sonic-td>
|
|
407
|
+
<sonic-td align="center">4</sonic-td>
|
|
408
|
+
<sonic-td align="right">40€</sonic-td>
|
|
409
|
+
<sonic-td td align="right"
|
|
410
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
411
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
412
|
+
></sonic-button>
|
|
413
|
+
</sonic-td>
|
|
414
|
+
</sonic-tr>
|
|
415
|
+
<sonic-tr>
|
|
416
|
+
<sonic-td>Island Trading</sonic-td>
|
|
417
|
+
<sonic-td>Helen Bennett</sonic-td>
|
|
418
|
+
<sonic-td>UK</sonic-td>
|
|
419
|
+
<sonic-td align="center">1</sonic-td>
|
|
420
|
+
<sonic-td align="right">40€</sonic-td>
|
|
421
|
+
<sonic-td td align="right"
|
|
422
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
423
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
424
|
+
></sonic-button>
|
|
425
|
+
</sonic-td>
|
|
426
|
+
</sonic-tr>
|
|
427
|
+
<sonic-tr type="warning">
|
|
428
|
+
<sonic-td>Laughing Bacchus Winecellars</sonic-td>
|
|
429
|
+
<sonic-td>Yoshi Tannamuri</sonic-td>
|
|
430
|
+
<sonic-td>Canada</sonic-td>
|
|
431
|
+
<sonic-td align="center">0</sonic-td>
|
|
432
|
+
<sonic-td align="right">40€</sonic-td>
|
|
433
|
+
<sonic-td td align="right"
|
|
434
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
435
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
436
|
+
></sonic-button>
|
|
437
|
+
</sonic-td>
|
|
438
|
+
</sonic-tr>
|
|
439
|
+
<sonic-tr>
|
|
440
|
+
<sonic-td>Magazzini Alimentari Riuniti</sonic-td>
|
|
441
|
+
<sonic-td>Giovanni Rovelli</sonic-td>
|
|
442
|
+
<sonic-td>Italy</sonic-td>
|
|
443
|
+
<sonic-td align="center">20</sonic-td>
|
|
444
|
+
<sonic-td align="right">40€</sonic-td>
|
|
445
|
+
<sonic-td td align="right"
|
|
446
|
+
><sonic-button shape="circle" variant="outline" size="sm">
|
|
447
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
448
|
+
></sonic-button>
|
|
348
449
|
</sonic-td>
|
|
349
450
|
</sonic-tr>
|
|
350
451
|
</sonic-tbody>
|
|
351
|
-
<sonic-caption>
|
|
452
|
+
<sonic-caption>table caption</sonic-caption>
|
|
352
453
|
</sonic-table>
|
|
353
454
|
</template>
|
|
354
|
-
</sonic-code>
|
|
355
|
-
|
|
356
|
-
## API reference
|
|
357
|
-
|
|
358
|
-
### `sonic-table`
|
|
359
|
-
|
|
360
|
-
| Attribute | Values | Description |
|
|
361
|
-
|----------|---------|-------------|
|
|
362
|
-
| `size` | `2xs` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `inherit` (default `md`) | Scales table font size via shared size tokens |
|
|
363
|
-
| `bordered` | boolean | Outer border and row dividers |
|
|
364
|
-
| `noCustomScroll` | boolean | Disables custom scrollbar styling on the horizontal scroll container |
|
|
365
|
-
| `rounded` | boolean | Reflected on the host; no default table styles |
|
|
366
|
-
| `maxHeight` | CSS length | Max height on the scroll container; enables vertical scrolling |
|
|
367
|
-
|
|
368
|
-
| Slot | Description |
|
|
369
|
-
|------|-------------|
|
|
370
|
-
| *(default)* | Table sections and rows (`sonic-thead`, `sonic-tbody`, `sonic-tr`, …) |
|
|
371
|
-
|
|
372
|
-
### `sonic-thead` · `sonic-tbody` · `sonic-tfoot`
|
|
373
|
-
|
|
374
|
-
| Slot | Description |
|
|
375
|
-
|------|-------------|
|
|
376
|
-
| *(default)* | Row elements (`sonic-tr`) |
|
|
377
|
-
|
|
378
|
-
`sonic-tbody` wraps slotted rows in a native `<tbody>` and applies zebra / hover backgrounds to **`sonic-tr`** children.
|
|
379
|
-
|
|
380
|
-
### `sonic-caption`
|
|
381
|
-
|
|
382
|
-
| Slot | Description |
|
|
383
|
-
|------|-------------|
|
|
384
|
-
| *(default)* | Caption text rendered as `table-caption` |
|
|
385
|
-
|
|
386
|
-
### `sonic-tr`
|
|
387
|
-
|
|
388
|
-
| Attribute | Values | Description |
|
|
389
|
-
|----------|---------|-------------|
|
|
390
|
-
| `type` | `default` · `primary` · `info` · `success` · `warning` · `danger` · `neutral` | Semantic text color for the row |
|
|
391
|
-
| `even` | boolean | Striping background; usually set by **`sonic-list`** metadata |
|
|
392
|
-
| `odd` | boolean | Alternate striping background; usually set by **`sonic-list`** |
|
|
393
|
-
| `last` | boolean | Removes bottom cell border on the last row when **`bordered`** |
|
|
394
|
-
|
|
395
|
-
| Slot | Description |
|
|
396
|
-
|------|-------------|
|
|
397
|
-
| *(default)* | Header or data cells (`sonic-th` / `sonic-td`) |
|
|
398
|
-
|
|
399
|
-
### `sonic-th`
|
|
400
|
-
|
|
401
|
-
| Attribute | Values | Description |
|
|
402
|
-
|----------|---------|-------------|
|
|
403
|
-
| `type` | `default` · `primary` · `info` · `success` · `warning` · `danger` · `neutral` | Semantic text color |
|
|
404
|
-
| `align` | `left` · `center` · `right` | Horizontal text alignment |
|
|
405
|
-
| `colSpan` | number | Column span |
|
|
406
|
-
| `rowSpan` | number | Row span |
|
|
407
|
-
| `minWidth` | CSS length | Minimum cell width |
|
|
408
|
-
| `maxWidth` | CSS length | Maximum cell width |
|
|
409
|
-
| `width` | CSS length | Cell width |
|
|
410
|
-
| `noBorder` | boolean | Removes the bottom border under the header cell |
|
|
411
|
-
|
|
412
|
-
| Slot | Description |
|
|
413
|
-
|------|-------------|
|
|
414
|
-
| *(default)* | Header label content |
|
|
415
|
-
|
|
416
|
-
### `sonic-td`
|
|
417
|
-
|
|
418
|
-
| Attribute | Values | Description |
|
|
419
|
-
|----------|---------|-------------|
|
|
420
|
-
| `type` | `default` · `primary` · `info` · `success` · `warning` · `danger` · `neutral` | Semantic text color |
|
|
421
|
-
| `align` | `left` · `center` · `right` | Horizontal text alignment |
|
|
422
|
-
| `vAlign` | CSS `vertical-align` value | Vertical alignment |
|
|
423
|
-
| `colSpan` | number | Column span |
|
|
424
|
-
| `rowSpan` | number | Row span |
|
|
425
|
-
| `minWidth` | CSS length | Minimum cell width |
|
|
426
|
-
| `maxWidth` | CSS length | Maximum cell width |
|
|
427
|
-
| `width` | CSS length | Cell width |
|
|
428
|
-
|
|
429
|
-
| Slot | Description |
|
|
430
|
-
|------|-------------|
|
|
431
|
-
| *(default)* | Cell content |
|
|
455
|
+
</sonic-code>
|