@supersoniks/concorde 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
- package/.agents/skills/concorde-component-docs/template.md +45 -0
- package/ai/cursor/rules/concorde-theme.mdc +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde/SKILL.md +1 -1
- package/ai/skills/concorde-theme/SKILL.md +21 -10
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +528 -534
- package/concorde-core.es.js +4257 -4212
- package/dist/concorde-core.bundle.js +528 -534
- package/dist/concorde-core.es.js +4257 -4212
- package/dist/docs-mock-api-sw.js +2 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/docs/assets/index-CD4WyL6o.css +1 -0
- package/docs/assets/{index-D8MVWqY6.js → index-wVZpLVYW.js} +1221 -1350
- package/docs/crawl/core/components/ui/alert/alert.html +172 -71
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
- package/docs/crawl/core/components/ui/badge/badge.html +157 -79
- package/docs/crawl/core/components/ui/button/button.html +1 -0
- package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
- package/docs/crawl/core/components/ui/card/card.html +222 -68
- package/docs/crawl/core/components/ui/divider/divider.html +117 -31
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
- package/docs/crawl/core/components/ui/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 +60 -38
- package/docs/crawl/core/components/ui/icon/icon.html +136 -47
- package/docs/crawl/core/components/ui/image/image.html +244 -56
- package/docs/crawl/core/components/ui/link/link.html +67 -9
- package/docs/crawl/core/components/ui/loader/loader.html +97 -23
- package/docs/crawl/core/components/ui/menu/menu.html +162 -90
- package/docs/crawl/core/components/ui/modal/modal.html +275 -50
- package/docs/crawl/core/components/ui/pop/pop.html +260 -66
- package/docs/crawl/core/components/ui/progress/progress.html +103 -30
- package/docs/crawl/core/components/ui/table/table.html +303 -171
- package/docs/crawl/core/components/ui/theme/theme.html +131 -0
- package/docs/crawl/core/components/ui/toast/toast.html +170 -59
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
- package/docs/crawl/docs/_getting-started/concorde-outside.html +3 -3
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +311 -63
- package/docs/crawl/hubs/form-components.html +75 -53
- package/docs/crawl/index.html +7 -6
- package/docs/docs-mock-api-sw.js +2 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +9 -7
- package/docs/llms-full.txt +1703 -456
- package/docs/llms.txt +25 -32
- package/docs/sitemap.xml +3 -0
- 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 +147 -72
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +141 -80
- package/docs/src/core/components/ui/button/button.md +1 -0
- package/docs/src/core/components/ui/captcha/captcha.md +65 -6
- package/docs/src/core/components/ui/card/card.md +183 -65
- package/docs/src/core/components/ui/divider/divider.md +107 -13
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/docs/src/core/components/ui/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 +132 -43
- package/docs/src/core/components/ui/image/image.md +179 -53
- package/docs/src/core/components/ui/link/link.md +45 -7
- package/docs/src/core/components/ui/loader/loader.md +79 -22
- package/docs/src/core/components/ui/menu/menu.md +133 -92
- package/docs/src/core/components/ui/modal/modal.md +163 -47
- package/docs/src/core/components/ui/pop/pop.md +262 -64
- package/docs/src/core/components/ui/progress/progress.md +76 -30
- package/docs/src/core/components/ui/table/table.md +147 -171
- package/docs/src/core/components/ui/theme/theme.md +122 -0
- package/docs/src/core/components/ui/toast/toast.md +108 -58
- package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/docs/src/docs/_core-concept/subscriber.md +0 -0
- package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
- 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 +223 -61
- package/docs/src/docs/search/docs-search.json +3083 -348
- package/docs/src/tsconfig.json +63 -3
- package/gitlab/job_tests.sh +0 -0
- package/index.html +4 -2
- package/package.json +7 -1
- package/public/docs-mock-api-sw.js +2 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/post-build-docs.js +0 -0
- package/scripts/post-build.mjs +0 -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/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/sdui.md +0 -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/ui/_css/align.ts +1 -0
- package/src/core/components/ui/_css/size.ts +0 -0
- package/src/core/components/ui/_css/type.ts +86 -8
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
- package/src/core/components/ui/alert/alert.md +21 -2
- package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/src/core/components/ui/badge/badge.md +19 -6
- package/src/core/components/ui/badge/badge.ts +8 -9
- package/src/core/components/ui/button/button.ts +5 -15
- package/src/core/components/ui/captcha/altchaStyles.ts +0 -0
- package/src/core/components/ui/captcha/captcha.md +65 -6
- package/src/core/components/ui/card/card.md +73 -10
- package/src/core/components/ui/card/card.ts +24 -22
- package/src/core/components/ui/divider/divider.md +107 -13
- package/src/core/components/ui/divider/divider.ts +40 -33
- package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
- package/src/core/components/ui/form/fieldset/legend.ts +13 -13
- package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
- package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
- package/src/core/components/ui/form/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/components/ui/form/textarea/textarea.ts +4 -3
- package/src/core/components/ui/group/group.md +36 -36
- package/src/core/components/ui/group/group.ts +5 -10
- package/src/core/components/ui/icon/icon.md +132 -43
- package/src/core/components/ui/image/image.md +35 -3
- package/src/core/components/ui/link/link.md +43 -5
- package/src/core/components/ui/loader/loader.md +79 -22
- package/src/core/components/ui/loader/loader.ts +67 -27
- package/src/core/components/ui/loader/styles/fixed.ts +6 -11
- package/src/core/components/ui/menu/menu.md +133 -92
- package/src/core/components/ui/menu/menu.ts +53 -58
- package/src/core/components/ui/modal/modal.md +163 -47
- package/src/core/components/ui/modal/modal.ts +2 -4
- package/src/core/components/ui/pop/pop.md +217 -123
- package/src/core/components/ui/pop/pop.ts +0 -1
- package/src/core/components/ui/progress/progress.md +76 -30
- package/src/core/components/ui/progress/progress.ts +25 -56
- package/src/core/components/ui/table/table-caption.ts +2 -2
- package/src/core/components/ui/table/table-tbody.ts +3 -3
- package/src/core/components/ui/table/table-td.ts +23 -18
- package/src/core/components/ui/table/table-th.ts +8 -8
- package/src/core/components/ui/table/table-tr.ts +4 -4
- package/src/core/components/ui/table/table.md +147 -171
- package/src/core/components/ui/table/table.ts +20 -19
- package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
- package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
- package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
- package/src/core/components/ui/theme/theme.md +122 -0
- package/src/core/components/ui/theme/theme.ts +30 -7
- package/src/core/components/ui/toast/toast-item.ts +6 -9
- package/src/core/components/ui/toast/toast.md +108 -58
- package/src/core/components/ui/toast/types.ts +1 -1
- package/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/src/core/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/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/_getting-started/start.md +1 -1
- package/src/docs/_getting-started/theming.md +223 -61
- package/src/docs/code.ts +125 -58
- package/src/docs/example/users.ts +0 -0
- package/src/docs/header/header.ts +62 -54
- package/src/docs/mock-api/router.ts +2 -0
- package/src/docs/navigation/navigation.ts +6 -3
- package/src/docs/search/docs-search.json +2504 -399
- package/src/docs/search/markdown-renderer.ts +6 -6
- package/src/docs/search/page.ts +0 -0
- package/src/docs/search/search.ts +4 -4
- package/src/docs/tailwind/css/tailwind.css +6 -5
- package/src/tsconfig.json +18 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +19 -0
- package/.github/workflows/ci.yml +0 -21
- package/.github-export-ignore +0 -30
- package/CONTRIBUTING.md +0 -59
- package/DEV.md +0 -54
- package/LICENSE +0 -21
- package/OPEN_SOURCE_CHECKPOINT.md +0 -133
- package/docs/assets/index-DiD0qYvE.css +0 -1
- package/docs/src/tsconfig.declarations.json +0 -22
- package/docs/src/tsconfig.emit.json +0 -23
- package/gitlab/job_github_mirror.sh +0 -39
- package/scripts/github-export.mjs +0 -150
- package/src/css.d.ts +0 -19
- package/src/tsconfig.declarations.json +0 -22
- package/src/tsconfig.emit.json +0 -23
|
@@ -1,63 +1,109 @@
|
|
|
1
|
-
# Progress
|
|
1
|
+
# Progress
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shows **task completion** on a **`value`** / **`max`** scale via a native `<progress>` bar. Omit **`value`** for an **indeterminate** loading animation. Put primary copy in the default slot and optional secondary text in **`remaining`**; set **`invert`** when the bar sits on a colored surface such as **`sonic-card`**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Basic example
|
|
6
|
+
|
|
7
|
+
Set **`value`** from `0` to **`max`** (default `100`). Label text uses the type color.
|
|
6
8
|
|
|
7
9
|
<sonic-code>
|
|
8
10
|
<template>
|
|
9
|
-
|
|
11
|
+
<sonic-progress value="50">50%</sonic-progress>
|
|
10
12
|
</template>
|
|
11
13
|
</sonic-code>
|
|
12
14
|
|
|
15
|
+
## Indeterminate
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
With no **`value`**, the bar animates until progress is known.
|
|
15
18
|
|
|
16
19
|
<sonic-code>
|
|
17
20
|
<template>
|
|
18
|
-
|
|
19
|
-
80% Used <span slot="remaining">20% left</span>
|
|
20
|
-
</sonic-progress>
|
|
21
|
+
<sonic-progress></sonic-progress>
|
|
21
22
|
</template>
|
|
22
23
|
</sonic-code>
|
|
23
24
|
|
|
24
|
-
##
|
|
25
|
+
## Type
|
|
26
|
+
|
|
27
|
+
Semantic color follows **`type`**. With no **`type`**, behavior is `default`.
|
|
25
28
|
|
|
26
29
|
<sonic-code>
|
|
27
30
|
<template>
|
|
28
|
-
<div class="grid gap-3">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</div>
|
|
31
|
+
<div class="grid gap-3">
|
|
32
|
+
<sonic-progress value="50">50%</sonic-progress>
|
|
33
|
+
<sonic-progress type="primary" value="50">50%</sonic-progress>
|
|
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>
|
|
37
40
|
</template>
|
|
38
41
|
</sonic-code>
|
|
39
42
|
|
|
40
|
-
##
|
|
43
|
+
## Size
|
|
44
|
+
|
|
45
|
+
Bar height scales with typography via **`size`**. With no **`size`**, font size matches **`md`** (`1rem`).
|
|
41
46
|
|
|
42
47
|
<sonic-code>
|
|
43
48
|
<template>
|
|
44
|
-
<div class="grid gap-3">
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
<div class="grid gap-3">
|
|
50
|
+
<sonic-progress size="2xs" value="25">25%</sonic-progress>
|
|
51
|
+
<sonic-progress size="xs" value="25">25%</sonic-progress>
|
|
52
|
+
<sonic-progress size="sm" value="25">25%</sonic-progress>
|
|
53
|
+
<sonic-progress size="md" value="25">25%</sonic-progress>
|
|
54
|
+
<sonic-progress size="lg" value="25">25%</sonic-progress>
|
|
55
|
+
<sonic-progress size="xl" value="25">25%</sonic-progress>
|
|
56
|
+
<sonic-progress size="2xl" value="25">25%</sonic-progress>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
52
59
|
</sonic-code>
|
|
53
60
|
|
|
61
|
+
## Default and remaining slots
|
|
62
|
+
|
|
63
|
+
The default slot is the main label (left). **`remaining`** is right-aligned with lighter weight—use it for “left to complete” copy.
|
|
64
|
+
|
|
65
|
+
<sonic-code>
|
|
66
|
+
<template>
|
|
67
|
+
<sonic-progress type="danger" value="80">
|
|
68
|
+
80% Used <span slot="remaining">20% left</span>
|
|
69
|
+
</sonic-progress>
|
|
70
|
+
</template>
|
|
71
|
+
</sonic-code>
|
|
54
72
|
|
|
55
73
|
## Invert
|
|
56
74
|
|
|
75
|
+
On tinted backgrounds, **`invert`** adjusts track and fill tokens so the bar stays readable (pair with matching **`type`** on **`sonic-card`** or similar).
|
|
76
|
+
|
|
57
77
|
<sonic-code>
|
|
58
78
|
<template>
|
|
59
|
-
<div class="
|
|
60
|
-
|
|
61
|
-
|
|
79
|
+
<div class="grid gap-3">
|
|
80
|
+
<sonic-card type="info">
|
|
81
|
+
<sonic-progress invert type="info" value="50">50%</sonic-progress>
|
|
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>
|
|
62
93
|
</template>
|
|
63
94
|
</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,6 +1,10 @@
|
|
|
1
1
|
# Table
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**`sonic-table`** lays out tabular data with composable **`sonic-tr`** / **`sonic-th`** / **`sonic-td`** children. The root applies shared typography via **`size`**, scrolls horizontally when content overflows, and optionally caps height with **`maxHeight`**. Pair with **`sonic-thead`** and **`sonic-tbody`** for structure and with **`sonic-list`** to render fetched rows.
|
|
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.
|
|
4
8
|
|
|
5
9
|
<sonic-code>
|
|
6
10
|
<template>
|
|
@@ -29,7 +33,9 @@
|
|
|
29
33
|
</template>
|
|
30
34
|
</sonic-code>
|
|
31
35
|
|
|
32
|
-
## List
|
|
36
|
+
## List and fetch
|
|
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.
|
|
33
39
|
|
|
34
40
|
<sonic-code>
|
|
35
41
|
<template>
|
|
@@ -39,7 +45,7 @@
|
|
|
39
45
|
<sonic-th>Id</sonic-th>
|
|
40
46
|
<sonic-th>Name</sonic-th>
|
|
41
47
|
<sonic-th>Email</sonic-th>
|
|
42
|
-
</sonic-tr>
|
|
48
|
+
</sonic-tr>
|
|
43
49
|
</sonic-thead>
|
|
44
50
|
<sonic-tbody>
|
|
45
51
|
<sonic-list debug fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
@@ -50,7 +56,7 @@
|
|
|
50
56
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
51
57
|
</sonic-tr>
|
|
52
58
|
</template>
|
|
53
|
-
|
|
59
|
+
</sonic-list>
|
|
54
60
|
</sonic-tbody>
|
|
55
61
|
</sonic-table>
|
|
56
62
|
</template>
|
|
@@ -58,6 +64,8 @@
|
|
|
58
64
|
|
|
59
65
|
## Size
|
|
60
66
|
|
|
67
|
+
Default font size is **`md`** (omit **`size`**). Sizes follow the shared scale (`2xs` … `2xl`).
|
|
68
|
+
|
|
61
69
|
<sonic-code>
|
|
62
70
|
<template>
|
|
63
71
|
<div class="grid grid-cols-4 gap-3">
|
|
@@ -91,6 +99,8 @@
|
|
|
91
99
|
|
|
92
100
|
## Bordered
|
|
93
101
|
|
|
102
|
+
Set **`bordered`** on **`sonic-table`** for an outer frame and horizontal rules between rows.
|
|
103
|
+
|
|
94
104
|
<sonic-code>
|
|
95
105
|
<template>
|
|
96
106
|
<sonic-table bordered>
|
|
@@ -122,7 +132,9 @@
|
|
|
122
132
|
</template>
|
|
123
133
|
</sonic-code>
|
|
124
134
|
|
|
125
|
-
##
|
|
135
|
+
## Max height
|
|
136
|
+
|
|
137
|
+
**`maxHeight`** applies to the scroll container (for example `8rem`), so the body scrolls vertically while the table can still scroll horizontally.
|
|
126
138
|
|
|
127
139
|
<sonic-code>
|
|
128
140
|
<template>
|
|
@@ -132,10 +144,10 @@
|
|
|
132
144
|
<sonic-th>Id</sonic-th>
|
|
133
145
|
<sonic-th>Name</sonic-th>
|
|
134
146
|
<sonic-th>Email</sonic-th>
|
|
135
|
-
</sonic-tr>
|
|
147
|
+
</sonic-tr>
|
|
136
148
|
</sonic-thead>
|
|
137
149
|
<sonic-tbody>
|
|
138
|
-
<sonic-list
|
|
150
|
+
<sonic-list fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
139
151
|
<template>
|
|
140
152
|
<sonic-tr>
|
|
141
153
|
<sonic-td data-bind ::inner-html="$id"></sonic-td>
|
|
@@ -143,7 +155,7 @@
|
|
|
143
155
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
144
156
|
</sonic-tr>
|
|
145
157
|
</template>
|
|
146
|
-
|
|
158
|
+
</sonic-list>
|
|
147
159
|
</sonic-tbody>
|
|
148
160
|
</sonic-table>
|
|
149
161
|
</template>
|
|
@@ -151,42 +163,43 @@
|
|
|
151
163
|
|
|
152
164
|
## Type
|
|
153
165
|
|
|
154
|
-
|
|
166
|
+
Set **`type`** on **`sonic-th`** / **`sonic-td`** / **`sonic-tr`** for semantic text color (`primary` · `info` · `success` · `warning` · `danger` · `neutral` · `default`).
|
|
155
167
|
|
|
156
168
|
<sonic-code>
|
|
157
169
|
<template>
|
|
158
170
|
<sonic-table bordered>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
</sonic-tbody>
|
|
171
|
+
<sonic-tr>
|
|
172
|
+
<sonic-th type="info">Attribute type set on</sonic-th>
|
|
173
|
+
<sonic-th type="info">sonic-th</sonic-th>
|
|
174
|
+
</sonic-tr>
|
|
175
|
+
<sonic-tr>
|
|
176
|
+
<sonic-td type="danger">Attribute type set on</sonic-td>
|
|
177
|
+
<sonic-td type="danger">sonic-td</sonic-td>
|
|
178
|
+
</sonic-tr>
|
|
179
|
+
<sonic-tr type="success">
|
|
180
|
+
<sonic-td>Attribute type set on</sonic-td>
|
|
181
|
+
<sonic-td>sonic-tr</sonic-td>
|
|
182
|
+
</sonic-tr>
|
|
172
183
|
</sonic-table>
|
|
173
184
|
</template>
|
|
174
185
|
</sonic-code>
|
|
175
186
|
|
|
176
|
-
## Colspan
|
|
187
|
+
## Colspan and rowspan
|
|
188
|
+
|
|
189
|
+
Use **`colSpan`** and **`rowSpan`** on **`sonic-th`** or **`sonic-td`** (maps to `colspan` / `rowspan` on the cell).
|
|
177
190
|
|
|
178
191
|
<sonic-code>
|
|
179
192
|
<template>
|
|
180
|
-
<sonic-table
|
|
193
|
+
<sonic-table>
|
|
181
194
|
<sonic-tbody>
|
|
182
195
|
<sonic-tr>
|
|
183
|
-
<sonic-td colspan="2" class="bg-info text-neutral-0">colspan
|
|
196
|
+
<sonic-td colspan="2" class="bg-info text-neutral-0">colspan: 2</sonic-td>
|
|
184
197
|
<sonic-td>cell</sonic-td>
|
|
185
198
|
</sonic-tr>
|
|
186
199
|
<sonic-tr>
|
|
187
200
|
<sonic-td>cell</sonic-td>
|
|
188
201
|
<sonic-td>cell</sonic-td>
|
|
189
|
-
<sonic-td rowspan="2" class="bg-success text-neutral-0">rowspan
|
|
202
|
+
<sonic-td rowspan="2" class="bg-success text-neutral-0">rowspan: 2</sonic-td>
|
|
190
203
|
</sonic-tr>
|
|
191
204
|
<sonic-tr>
|
|
192
205
|
<sonic-td>cell</sonic-td>
|
|
@@ -197,13 +210,9 @@ Values available : primary, info, success, warning, danger
|
|
|
197
210
|
</template>
|
|
198
211
|
</sonic-code>
|
|
199
212
|
|
|
200
|
-
## Cell
|
|
213
|
+
## Cell alignment and width
|
|
201
214
|
|
|
202
|
-
|
|
203
|
-
- align
|
|
204
|
-
- minWidth
|
|
205
|
-
- maxWidth
|
|
206
|
-
- width
|
|
215
|
+
**`align`** sets horizontal alignment (`left` · `center` · `right`). **`minWidth`** / **`maxWidth`** / **`width`** set inline dimensions on the cell. **`vAlign`** is available on **`sonic-td`** only.
|
|
207
216
|
|
|
208
217
|
<sonic-code>
|
|
209
218
|
<template>
|
|
@@ -232,17 +241,17 @@ The following attributes will be used to set the style of the component :
|
|
|
232
241
|
<sonic-tr>
|
|
233
242
|
<sonic-td align="right">right</sonic-td>
|
|
234
243
|
<sonic-td>20rem</sonic-td>
|
|
235
|
-
<sonic-td>5rem
|
|
236
|
-
<sonic-td width="60rem">15rem
|
|
244
|
+
<sonic-td maxWidth="5rem">5rem — Lorem ipsum dolor</sonic-td>
|
|
245
|
+
<sonic-td width="60rem">15rem — Lorem ipsum dolor sit amet, consectetur adipiscing elit.</sonic-td>
|
|
237
246
|
</sonic-tr>
|
|
247
|
+
</sonic-tbody>
|
|
238
248
|
</sonic-table>
|
|
239
249
|
</template>
|
|
240
250
|
</sonic-code>
|
|
241
251
|
|
|
252
|
+
## Responsive layout
|
|
242
253
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
Every table is responsive by default
|
|
254
|
+
Tables scroll horizontally by default when columns exceed the viewport. Use **`minWidth`** on wide columns to preserve readable line length.
|
|
246
255
|
|
|
247
256
|
<sonic-code>
|
|
248
257
|
<template>
|
|
@@ -253,7 +262,7 @@ Every table is responsive by default
|
|
|
253
262
|
<sonic-th>Name</sonic-th>
|
|
254
263
|
<sonic-th>Email</sonic-th>
|
|
255
264
|
<sonic-th>Comment</sonic-th>
|
|
256
|
-
</sonic-tr>
|
|
265
|
+
</sonic-tr>
|
|
257
266
|
</sonic-thead>
|
|
258
267
|
<sonic-tbody>
|
|
259
268
|
<sonic-list fetch serviceURL="/docs-mock-api" dataProvider="api/users" key="data" displayContents>
|
|
@@ -263,18 +272,19 @@ Every table is responsive by default
|
|
|
263
272
|
<sonic-td minWidth="10rem" data-bind ::inner-html="$first_name <b>$last_name</b>"></sonic-td>
|
|
264
273
|
<sonic-td data-bind ::inner-html="$email"></sonic-td>
|
|
265
274
|
<sonic-td minWidth="40rem">
|
|
266
|
-
|
|
275
|
+
Phasellus suscipit vulputate lacus, in tempor turpis aliquam vel. Nunc eleifend, velit id ultrices elementum, ipsum felis porttitor dui, id laoreet diam nulla sed urna.
|
|
267
276
|
</sonic-td>
|
|
268
277
|
</sonic-tr>
|
|
269
278
|
</template>
|
|
270
|
-
|
|
279
|
+
</sonic-list>
|
|
271
280
|
</sonic-tbody>
|
|
272
281
|
</sonic-table>
|
|
273
282
|
</template>
|
|
274
283
|
</sonic-code>
|
|
275
284
|
|
|
285
|
+
## Sticky header and caption
|
|
276
286
|
|
|
277
|
-
|
|
287
|
+
**`sonic-th`** uses `position: sticky` with `top: 0` inside the table. For page-level sticky headers, set **`noCustomScroll`** on **`sonic-table`** and position **`sonic-thead`** (for example `class="sticky top-16"`). Add **`sonic-caption`** for a table title below the grid.
|
|
278
288
|
|
|
279
289
|
<sonic-code>
|
|
280
290
|
<template>
|
|
@@ -296,53 +306,21 @@ Every table is responsive by default
|
|
|
296
306
|
<sonic-td>Germany</sonic-td>
|
|
297
307
|
<sonic-td align="center">2</sonic-td>
|
|
298
308
|
<sonic-td align="right">40€</sonic-td>
|
|
299
|
-
<sonic-td
|
|
300
|
-
|
|
301
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
302
|
-
|
|
309
|
+
<sonic-td align="right">
|
|
310
|
+
<sonic-button shape="circle" variant="outline" size="sm">
|
|
311
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon>
|
|
312
|
+
</sonic-button>
|
|
303
313
|
</sonic-td>
|
|
304
314
|
</sonic-tr>
|
|
305
315
|
<sonic-tr>
|
|
306
316
|
<sonic-td>Centro comercial Moctezuma</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
|
-
>
|
|
317
|
+
<sonic-td colspan="2" align="center" class="text-center text-neutral-400">no information yet</sonic-td>
|
|
316
318
|
<sonic-td align="center">3</sonic-td>
|
|
317
319
|
<sonic-td align="right">40€</sonic-td>
|
|
318
|
-
<sonic-td
|
|
319
|
-
|
|
320
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
321
|
-
|
|
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>
|
|
320
|
+
<sonic-td align="right">
|
|
321
|
+
<sonic-button shape="circle" variant="outline" size="sm">
|
|
322
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon>
|
|
323
|
+
</sonic-button>
|
|
346
324
|
</sonic-td>
|
|
347
325
|
</sonic-tr>
|
|
348
326
|
<sonic-tr type="warning">
|
|
@@ -351,10 +329,10 @@ Every table is responsive by default
|
|
|
351
329
|
<sonic-td>Canada</sonic-td>
|
|
352
330
|
<sonic-td align="center">0</sonic-td>
|
|
353
331
|
<sonic-td align="right">40€</sonic-td>
|
|
354
|
-
<sonic-td
|
|
355
|
-
|
|
356
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
357
|
-
|
|
332
|
+
<sonic-td align="right">
|
|
333
|
+
<sonic-button shape="circle" variant="outline" size="sm">
|
|
334
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon>
|
|
335
|
+
</sonic-button>
|
|
358
336
|
</sonic-td>
|
|
359
337
|
</sonic-tr>
|
|
360
338
|
<sonic-tr>
|
|
@@ -363,93 +341,91 @@ Every table is responsive by default
|
|
|
363
341
|
<sonic-td type="danger">Italy</sonic-td>
|
|
364
342
|
<sonic-td align="center">20</sonic-td>
|
|
365
343
|
<sonic-td align="right">40€</sonic-td>
|
|
366
|
-
<sonic-td
|
|
367
|
-
|
|
368
|
-
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon
|
|
369
|
-
|
|
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>
|
|
344
|
+
<sonic-td align="right">
|
|
345
|
+
<sonic-button shape="circle" variant="outline" size="sm">
|
|
346
|
+
<sonic-icon library="iconoir" name="edit-pencil" size="lg"></sonic-icon>
|
|
347
|
+
</sonic-button>
|
|
449
348
|
</sonic-td>
|
|
450
349
|
</sonic-tr>
|
|
451
350
|
</sonic-tbody>
|
|
452
|
-
<sonic-caption>
|
|
351
|
+
<sonic-caption>Table caption</sonic-caption>
|
|
453
352
|
</sonic-table>
|
|
454
353
|
</template>
|
|
455
|
-
</sonic-code>
|
|
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 |
|