@supersoniks/concorde 5.0.3 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
- package/.agents/skills/concorde-component-docs/template.md +45 -0
- package/ai/cursor/rules/concorde-theme.mdc +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde/SKILL.md +1 -1
- package/ai/skills/concorde-theme/SKILL.md +21 -10
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +515 -521
- package/concorde-core.es.js +5151 -5056
- package/dist/concorde-core.bundle.js +515 -521
- package/dist/concorde-core.es.js +5151 -5056
- package/dist/docs-mock-api-sw.js +2 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/docs/assets/index-CD4WyL6o.css +1 -0
- package/docs/assets/{index-BnK6OS7w.js → index-wVZpLVYW.js} +815 -808
- package/docs/crawl/core/components/ui/alert/alert.html +76 -5
- package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
- package/docs/crawl/core/components/ui/badge/badge.html +57 -8
- package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
- package/docs/crawl/core/components/ui/card/card.html +122 -12
- package/docs/crawl/core/components/ui/divider/divider.html +117 -31
- package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
- package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
- package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
- package/docs/crawl/core/components/ui/group/group.html +60 -38
- package/docs/crawl/core/components/ui/icon/icon.html +136 -47
- package/docs/crawl/core/components/ui/image/image.html +118 -6
- package/docs/crawl/core/components/ui/link/link.html +65 -7
- package/docs/crawl/core/components/ui/loader/loader.html +97 -23
- package/docs/crawl/core/components/ui/menu/menu.html +162 -90
- package/docs/crawl/core/components/ui/modal/modal.html +275 -50
- package/docs/crawl/core/components/ui/pop/pop.html +242 -124
- package/docs/crawl/core/components/ui/progress/progress.html +103 -30
- package/docs/crawl/core/components/ui/table/table.html +303 -171
- package/docs/crawl/core/components/ui/theme/theme.html +131 -0
- package/docs/crawl/core/components/ui/toast/toast.html +170 -59
- package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
- package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
- package/docs/crawl/docs/_getting-started/start.html +1 -1
- package/docs/crawl/docs/_getting-started/theming.html +311 -63
- package/docs/crawl/hubs/form-components.html +71 -49
- package/docs/crawl/index.html +7 -6
- package/docs/docs-mock-api-sw.js +2 -0
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +6 -4
- package/docs/llms-full.txt +1468 -405
- package/docs/llms.txt +23 -30
- package/docs/sitemap.xml +3 -0
- package/docs/src/core/components/ui/alert/alert.md +21 -2
- package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/docs/src/core/components/ui/badge/badge.md +19 -6
- package/docs/src/core/components/ui/captcha/captcha.md +65 -6
- package/docs/src/core/components/ui/card/card.md +73 -10
- package/docs/src/core/components/ui/divider/divider.md +107 -13
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/docs/src/core/components/ui/group/group.md +36 -36
- package/docs/src/core/components/ui/icon/icon.md +132 -43
- package/docs/src/core/components/ui/image/image.md +35 -3
- package/docs/src/core/components/ui/link/link.md +43 -5
- package/docs/src/core/components/ui/loader/loader.md +79 -22
- package/docs/src/core/components/ui/menu/menu.md +133 -92
- package/docs/src/core/components/ui/modal/modal.md +163 -47
- package/docs/src/core/components/ui/pop/pop.md +217 -123
- package/docs/src/core/components/ui/progress/progress.md +76 -30
- package/docs/src/core/components/ui/table/table.md +147 -171
- package/docs/src/core/components/ui/theme/theme.md +122 -0
- package/docs/src/core/components/ui/toast/toast.md +108 -58
- package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/docs/src/docs/_getting-started/start.md +1 -1
- package/docs/src/docs/_getting-started/theming.md +223 -61
- package/docs/src/docs/search/docs-search.json +2504 -399
- package/docs/src/tsconfig.json +18 -0
- package/index.html +4 -2
- package/package.json +7 -1
- package/public/docs-mock-api-sw.js +2 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/src/core/components/ui/_css/align.ts +1 -0
- package/src/core/components/ui/_css/type.ts +86 -8
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
- package/src/core/components/ui/alert/alert.md +21 -2
- package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/src/core/components/ui/badge/badge.md +19 -6
- package/src/core/components/ui/badge/badge.ts +8 -9
- package/src/core/components/ui/button/button.ts +5 -15
- package/src/core/components/ui/captcha/captcha.md +65 -6
- package/src/core/components/ui/card/card.md +73 -10
- package/src/core/components/ui/card/card.ts +24 -22
- package/src/core/components/ui/divider/divider.md +107 -13
- package/src/core/components/ui/divider/divider.ts +40 -33
- package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
- package/src/core/components/ui/form/fieldset/legend.ts +13 -13
- package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
- package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
- package/src/core/components/ui/form/textarea/textarea.ts +4 -3
- package/src/core/components/ui/group/group.md +36 -36
- package/src/core/components/ui/group/group.ts +5 -10
- package/src/core/components/ui/icon/icon.md +132 -43
- package/src/core/components/ui/image/image.md +35 -3
- package/src/core/components/ui/link/link.md +43 -5
- package/src/core/components/ui/loader/loader.md +79 -22
- package/src/core/components/ui/loader/loader.ts +67 -27
- package/src/core/components/ui/loader/styles/fixed.ts +6 -11
- package/src/core/components/ui/menu/menu.md +133 -92
- package/src/core/components/ui/menu/menu.ts +53 -58
- package/src/core/components/ui/modal/modal.md +163 -47
- package/src/core/components/ui/modal/modal.ts +2 -4
- package/src/core/components/ui/pop/pop.md +217 -123
- package/src/core/components/ui/pop/pop.ts +0 -1
- package/src/core/components/ui/progress/progress.md +76 -30
- package/src/core/components/ui/progress/progress.ts +25 -56
- package/src/core/components/ui/table/table-caption.ts +2 -2
- package/src/core/components/ui/table/table-tbody.ts +3 -3
- package/src/core/components/ui/table/table-td.ts +23 -18
- package/src/core/components/ui/table/table-th.ts +8 -8
- package/src/core/components/ui/table/table-tr.ts +4 -4
- package/src/core/components/ui/table/table.md +147 -171
- package/src/core/components/ui/table/table.ts +20 -19
- package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
- package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
- package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
- package/src/core/components/ui/theme/theme.md +122 -0
- package/src/core/components/ui/theme/theme.ts +30 -7
- package/src/core/components/ui/toast/toast-item.ts +6 -9
- package/src/core/components/ui/toast/toast.md +108 -58
- package/src/core/components/ui/toast/types.ts +1 -1
- package/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/start.md +1 -1
- package/src/docs/_getting-started/theming.md +223 -61
- package/src/docs/code.ts +125 -58
- package/src/docs/header/header.ts +62 -54
- package/src/docs/mock-api/router.ts +2 -0
- package/src/docs/navigation/navigation.ts +6 -3
- package/src/docs/search/docs-search.json +2504 -399
- package/src/docs/search/markdown-renderer.ts +6 -6
- package/src/docs/search/search.ts +4 -4
- package/src/docs/tailwind/css/tailwind.css +6 -5
- package/src/tsconfig.json +18 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +19 -0
- package/docs/assets/index--GpD7R7a.css +0 -1
|
@@ -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 |
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Theme
|
|
2
|
+
|
|
3
|
+
**`sonic-theme`** wraps a Concorde UI: it registers **`--sc-*`** design tokens and provides the default slot for your app. With no **`theme`** attribute (or **`theme="custom"`**), only shared primitives and your overrides apply—built-in **`light`** / **`dark`** / **`auto`** palettes are opt-in. Set **`color`** and **`font`** when the host should carry base text and typography; add Tailwind **`bg-base`** and **`block`** (or **`min-h-screen`**) on the tag for a full surface fill. **Popovers**, **modals**, and **toasts** mount under the nearest connected theme (see [Pop container](#pop-container)). Import **`@supersoniks/concorde/theme`** once at the app entry. For the full public token list and brand overrides, see [Customization](#docs/_getting-started/theming.md/theming).
|
|
4
|
+
|
|
5
|
+
## Basic example
|
|
6
|
+
|
|
7
|
+
Wrap interactive components so tokens and overlays resolve from one root.
|
|
8
|
+
|
|
9
|
+
<sonic-code>
|
|
10
|
+
<template>
|
|
11
|
+
<sonic-theme color font class="block bg-base p-6 rounded-lg">
|
|
12
|
+
<sonic-button type="primary">Save changes</sonic-button>
|
|
13
|
+
</sonic-theme>
|
|
14
|
+
</template>
|
|
15
|
+
</sonic-code>
|
|
16
|
+
|
|
17
|
+
## Theme mode
|
|
18
|
+
|
|
19
|
+
**Default:** omit **`theme`** or set **`theme="custom"`**. The host loads core tokens (`--sc-rounded`, shadows, form defaults, …) and any **`--sc-*`** you set; it does **not** apply the built-in light or dark palette.
|
|
20
|
+
|
|
21
|
+
Set **`theme`** to **`light`** or **`dark`** for Concorde’s preset palettes. Set **`theme="auto"`** to follow **`prefers-color-scheme`** (light palette until the OS prefers dark).
|
|
22
|
+
|
|
23
|
+
<sonic-code>
|
|
24
|
+
<template>
|
|
25
|
+
<div class="grid gap-4 md:grid-cols-2">
|
|
26
|
+
<sonic-theme theme="light" color font class="block bg-base p-4 rounded-md border border-neutral-200">
|
|
27
|
+
<p class="text-sm mb-3 opacity-80">theme="light"</p>
|
|
28
|
+
<div class="flex flex-wrap gap-2">
|
|
29
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
30
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
31
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
32
|
+
</div>
|
|
33
|
+
</sonic-theme>
|
|
34
|
+
<sonic-theme theme="dark" color font class="block bg-base p-4 rounded-md">
|
|
35
|
+
<p class="text-sm mb-3 opacity-80">theme="dark"</p>
|
|
36
|
+
<div class="flex flex-wrap gap-2">
|
|
37
|
+
<sonic-badge type="primary">Primary</sonic-badge>
|
|
38
|
+
<sonic-badge type="success">Success</sonic-badge>
|
|
39
|
+
<sonic-badge type="danger">Danger</sonic-badge>
|
|
40
|
+
</div>
|
|
41
|
+
</sonic-theme>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
</sonic-code>
|
|
45
|
+
|
|
46
|
+
## Presentation
|
|
47
|
+
|
|
48
|
+
**`color`** sets text from **`--sc-base-content`**. **`font`** applies **`--sc-font-family-base`**, **`--sc-font-weight-base`**, and **`--sc-font-style-base`**. For the page or shell background, use **`bg-base`** on **`sonic-theme`** (maps to **`--sc-base`** in Tailwind) with **`block`** so the host paints the surface. Components keep their own fallbacks when **`color`** / **`font`** are omitted.
|
|
49
|
+
|
|
50
|
+
<sonic-code>
|
|
51
|
+
<template>
|
|
52
|
+
<sonic-theme theme="light" color font class="block bg-base p-6 min-h-[8rem] rounded-lg">
|
|
53
|
+
<p>Body copy inherits base content color and font from the theme host.</p>
|
|
54
|
+
</sonic-theme>
|
|
55
|
+
</template>
|
|
56
|
+
</sonic-code>
|
|
57
|
+
|
|
58
|
+
## Custom tokens
|
|
59
|
+
|
|
60
|
+
Override **primitives** on **`sonic-theme`** (or **`:root`** / a project stylesheet). Derived radii, shadows, and control rounding are computed from tokens such as **`--sc-rounded`**—avoid copying long lists of internal variables unless you have a specific need.
|
|
61
|
+
|
|
62
|
+
<sonic-code>
|
|
63
|
+
<template>
|
|
64
|
+
<sonic-theme
|
|
65
|
+
theme="custom"
|
|
66
|
+
color
|
|
67
|
+
font
|
|
68
|
+
class="block bg-base p-6 rounded-lg"
|
|
69
|
+
style="--sc-primary: #353429; --sc-rounded: 0.25rem;"
|
|
70
|
+
>
|
|
71
|
+
<sonic-button type="primary">Brand primary</sonic-button>
|
|
72
|
+
</sonic-theme>
|
|
73
|
+
</template>
|
|
74
|
+
</sonic-code>
|
|
75
|
+
|
|
76
|
+
## Pop container
|
|
77
|
+
|
|
78
|
+
**`Theme.getPopContainer()`** returns the last connected **`sonic-theme`**, or **`document.body`** if none is connected. When a theme disconnects, the previous connected instance is adopted. Imperative **`Modal.create()`** and declarative **`sonic-modal`** use the same container.
|
|
79
|
+
|
|
80
|
+
<sonic-code>
|
|
81
|
+
<template>
|
|
82
|
+
<sonic-theme theme="light" color font class="block bg-base p-4 rounded-lg">
|
|
83
|
+
<sonic-button onclick="document.getElementById('themePopModal').show()">
|
|
84
|
+
Open modal
|
|
85
|
+
</sonic-button>
|
|
86
|
+
<sonic-modal id="themePopModal">
|
|
87
|
+
<sonic-modal-title>Mounted on theme</sonic-modal-title>
|
|
88
|
+
<sonic-modal-content>
|
|
89
|
+
This dialog is appended under the nearest sonic-theme pop container.
|
|
90
|
+
</sonic-modal-content>
|
|
91
|
+
<sonic-modal-actions>
|
|
92
|
+
<sonic-button hideModal>Close</sonic-button>
|
|
93
|
+
</sonic-modal-actions>
|
|
94
|
+
</sonic-modal>
|
|
95
|
+
</sonic-theme>
|
|
96
|
+
</template>
|
|
97
|
+
</sonic-code>
|
|
98
|
+
|
|
99
|
+
## Embedded iframes
|
|
100
|
+
|
|
101
|
+
On connect, the theme publishes resolved **`--sc-*`** values and linked font stylesheet URLs (Google Fonts / Adobe Fonts) to the **`sonic-theme`** data channel and **`postMessage`**s them to same-page iframes. Iframes can request a refresh by posting **`{ type: "GetSonicTheme" }`**.
|
|
102
|
+
|
|
103
|
+
<sonic-code language="javascript">
|
|
104
|
+
<template>
|
|
105
|
+
// Inside the iframe — ask the parent theme to rebroadcast tokens
|
|
106
|
+
window.parent.postMessage({ type: "GetSonicTheme" }, "*");
|
|
107
|
+
</template>
|
|
108
|
+
</sonic-code>
|
|
109
|
+
|
|
110
|
+
## API reference
|
|
111
|
+
|
|
112
|
+
| Attribute | Values | Description |
|
|
113
|
+
|----------|---------|-------------|
|
|
114
|
+
| `theme` | omitted · `custom` (default) · `light` · `dark` · `auto` | Omitted or `custom`: core tokens and your `--sc-*` only. `light` / `dark`: fixed presets. `auto`: presets follow `prefers-color-scheme` |
|
|
115
|
+
| `color` | boolean | Host text color uses `--sc-base-content` |
|
|
116
|
+
| `font` | boolean | Host font uses `--sc-font-family-base` and related base weight/style tokens |
|
|
117
|
+
|
|
118
|
+
| Slot | Description |
|
|
119
|
+
|------|-------------|
|
|
120
|
+
| *(default)* | Application markup and Concorde components |
|
|
121
|
+
|
|
122
|
+
Surface background: Tailwind **`bg-base`** on **`sonic-theme`** (requires Concorde Tailwind color **`base`** → **`--sc-base`**).
|