@bk2k/ui 0.6.7 → 0.6.8
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/BUILDING.md +32 -0
- package/CHANGELOG.md +57 -0
- package/USAGE.md +14 -8
- package/custom-elements.json +1 -1
- package/dist/charts/frame.d.ts +2 -0
- package/dist/charts/frame.js +2 -1
- package/dist/components/bk-button.d.ts +18 -3
- package/dist/components/bk-button.js +19 -8
- package/dist/components/bk-chart-bar.d.ts +46 -9
- package/dist/components/bk-chart-bar.js +127 -37
- package/dist/components/bk-combobox.d.ts +29 -5
- package/dist/components/bk-combobox.js +61 -19
- package/dist/components/bk-dialog.d.ts +4 -1
- package/dist/components/bk-dialog.js +6 -2
- package/dist/components/bk-facts-item.js +8 -6
- package/dist/components/bk-facts.d.ts +6 -4
- package/dist/components/bk-facts.js +19 -8
- package/dist/components/bk-input-time-zone.d.ts +3 -0
- package/dist/components/bk-model-viewer.d.ts +12 -1
- package/dist/components/bk-model-viewer.js +15 -2
- package/dist/components/bk-period-nav.d.ts +102 -0
- package/dist/components/bk-period-nav.js +69 -0
- package/dist/components/bk-select.js +2 -1
- package/dist/components/bk-shell-app.d.ts +3 -2
- package/dist/components/bk-shell-app.js +16 -3
- package/dist/components/bk-sortable.d.ts +3 -0
- package/dist/components/bk-sortable.js +3 -0
- package/dist/components/bk-split.d.ts +3 -0
- package/dist/components/bk-split.js +3 -0
- package/dist/components/bk-table.d.ts +16 -12
- package/dist/components/bk-table.js +96 -14
- package/dist/i18n/de.js +7 -0
- package/dist/i18n.d.ts +7 -0
- package/dist/i18n.js +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/cloak.d.ts +3 -0
- package/dist/internal/cloak.js +4 -0
- package/dist/internal/handle-menu.d.ts +2 -3
- package/dist/internal/handle-menu.js +14 -3
- package/dist/internal/late.d.ts +15 -0
- package/dist/internal/late.js +30 -0
- package/dist/jsx.d.ts +36 -5
- package/dist/standalone/all.js +119 -118
- package/dist/standalone/bk-action-bar.js +1 -1
- package/dist/standalone/bk-alert-offline.js +1 -1
- package/dist/standalone/bk-alert.js +1 -1
- package/dist/standalone/bk-attachment.js +1 -1
- package/dist/standalone/bk-avatar-group.js +1 -1
- package/dist/standalone/bk-avatar.js +1 -1
- package/dist/standalone/bk-breadcrumbs.js +1 -1
- package/dist/standalone/bk-button-copy.js +2 -2
- package/dist/standalone/bk-button-group.js +2 -2
- package/dist/standalone/bk-button-share.js +2 -2
- package/dist/standalone/bk-button-top.js +1 -1
- package/dist/standalone/bk-button.js +15 -7
- package/dist/standalone/bk-calendar-week.js +1 -1
- package/dist/standalone/bk-calendar.js +1 -1
- package/dist/standalone/bk-card.js +1 -1
- package/dist/standalone/bk-carousel-controls.js +2 -2
- package/dist/standalone/bk-carousel.js +1 -1
- package/dist/standalone/bk-chart-bar-list.js +3 -3
- package/dist/standalone/bk-chart-bar.js +164 -105
- package/dist/standalone/bk-chart-bridge.js +4 -4
- package/dist/standalone/bk-chart-bullet.js +3 -3
- package/dist/standalone/bk-chart-calendar.js +4 -4
- package/dist/standalone/bk-chart-heatmap.js +4 -4
- package/dist/standalone/bk-chart-histogram.js +2 -2
- package/dist/standalone/bk-chart-legend.js +3 -3
- package/dist/standalone/bk-chart-line.js +5 -5
- package/dist/standalone/bk-chart-scatter.js +3 -3
- package/dist/standalone/bk-chart-sparkline.js +3 -3
- package/dist/standalone/bk-chart-stacked-bar.js +4 -4
- package/dist/standalone/bk-chart-tracker.js +3 -3
- package/dist/standalone/bk-chart-waterfall.js +2 -2
- package/dist/standalone/bk-checkbox-group.js +2 -2
- package/dist/standalone/bk-checkbox.js +1 -1
- package/dist/standalone/bk-chip-group.js +2 -2
- package/dist/standalone/bk-chip.js +2 -2
- package/dist/standalone/bk-code-diff.js +1 -1
- package/dist/standalone/bk-code-stack.js +2 -2
- package/dist/standalone/bk-code.js +2 -2
- package/dist/standalone/bk-color-panel.js +2 -2
- package/dist/standalone/bk-columns.js +1 -1
- package/dist/standalone/bk-combobox.js +49 -30
- package/dist/standalone/bk-command-menu.js +2 -2
- package/dist/standalone/bk-command-palette.js +3 -3
- package/dist/standalone/bk-composer.js +2 -2
- package/dist/standalone/bk-delta.js +1 -1
- package/dist/standalone/bk-diagram.js +1 -1
- package/dist/standalone/bk-dialog.js +1 -1
- package/dist/standalone/bk-drawer.js +2 -2
- package/dist/standalone/bk-error-summary.js +1 -1
- package/dist/standalone/bk-facts-item.js +8 -6
- package/dist/standalone/bk-facts.js +19 -8
- package/dist/standalone/bk-fieldset.js +1 -1
- package/dist/standalone/bk-filter-bar.js +1 -1
- package/dist/standalone/bk-folder-browser.js +1 -1
- package/dist/standalone/bk-form-guard.js +1 -1
- package/dist/standalone/bk-form-steps.js +1 -1
- package/dist/standalone/bk-image-compare.js +1 -1
- package/dist/standalone/bk-image-crop.js +2 -2
- package/dist/standalone/bk-image-editor.js +2 -1
- package/dist/standalone/bk-image-viewer.js +1 -1
- package/dist/standalone/bk-input-code.js +2 -2
- package/dist/standalone/bk-input-color.js +1 -1
- package/dist/standalone/bk-input-date-range.js +2 -2
- package/dist/standalone/bk-input-date.js +1 -1
- package/dist/standalone/bk-input-file.js +2 -2
- package/dist/standalone/bk-input-group.js +2 -2
- package/dist/standalone/bk-input-inline.js +2 -2
- package/dist/standalone/bk-input-number.js +2 -2
- package/dist/standalone/bk-input-rating.js +2 -2
- package/dist/standalone/bk-input-rich.js +1 -1
- package/dist/standalone/bk-input-search.js +1 -1
- package/dist/standalone/bk-input-slider-range.js +2 -2
- package/dist/standalone/bk-input-slider.js +2 -2
- package/dist/standalone/bk-input-text.js +1 -1
- package/dist/standalone/bk-input-time.js +3 -3
- package/dist/standalone/bk-item.js +1 -1
- package/dist/standalone/bk-kbd-shortcuts.js +1 -1
- package/dist/standalone/bk-kbd.js +1 -1
- package/dist/standalone/bk-lightbox.js +2 -2
- package/dist/standalone/bk-listbox-columns.js +2 -2
- package/dist/standalone/bk-listbox-search.js +3 -3
- package/dist/standalone/bk-listbox-transfer.js +3 -3
- package/dist/standalone/bk-listbox.js +2 -2
- package/dist/standalone/bk-logo.js +1 -1
- package/dist/standalone/bk-menu-bar.js +1 -1
- package/dist/standalone/bk-menu-item.js +1 -1
- package/dist/standalone/bk-menu-list.js +1 -1
- package/dist/standalone/bk-menu.js +2 -2
- package/dist/standalone/bk-message-approval.js +1 -1
- package/dist/standalone/bk-message-branches.js +1 -1
- package/dist/standalone/bk-message-citation.js +1 -1
- package/dist/standalone/bk-message-feedback.js +1 -1
- package/dist/standalone/bk-message-list.js +1 -1
- package/dist/standalone/bk-message-reasoning.js +1 -1
- package/dist/standalone/bk-message-source.js +1 -1
- package/dist/standalone/bk-message-tool-group.js +1 -1
- package/dist/standalone/bk-message-tool.js +1 -1
- package/dist/standalone/bk-message.js +1 -1
- package/dist/standalone/bk-meter.js +1 -1
- package/dist/standalone/bk-model-viewer.js +1 -1
- package/dist/standalone/bk-nav-group.js +1 -1
- package/dist/standalone/bk-nav-item.js +1 -1
- package/dist/standalone/bk-nav-toc.js +1 -1
- package/dist/standalone/bk-nav.js +1 -1
- package/dist/standalone/bk-overflow.js +1 -1
- package/dist/standalone/bk-page-footer.js +1 -1
- package/dist/standalone/bk-page-pager.js +1 -1
- package/dist/standalone/bk-pagination.js +1 -1
- package/dist/standalone/bk-pane.js +1 -1
- package/dist/standalone/bk-panel.js +1 -1
- package/dist/standalone/bk-period-nav.js +69 -0
- package/dist/standalone/bk-picture.js +1 -1
- package/dist/standalone/bk-popover-help.js +1 -1
- package/dist/standalone/bk-popover.js +1 -1
- package/dist/standalone/bk-preview.js +1 -1
- package/dist/standalone/bk-progress.js +1 -1
- package/dist/standalone/bk-qr-code.js +1 -1
- package/dist/standalone/bk-radio-group.js +2 -2
- package/dist/standalone/bk-radio.js +1 -1
- package/dist/standalone/bk-rating.js +1 -1
- package/dist/standalone/bk-scroll.js +1 -1
- package/dist/standalone/bk-segmented.js +2 -2
- package/dist/standalone/bk-select-cascade.js +1 -1
- package/dist/standalone/bk-select-tree.js +1 -1
- package/dist/standalone/bk-select.js +3 -2
- package/dist/standalone/bk-shell-app.js +42 -38
- package/dist/standalone/bk-shell-sites.js +1 -1
- package/dist/standalone/bk-sortable.js +7 -4
- package/dist/standalone/bk-split-grid.js +1 -1
- package/dist/standalone/bk-split.js +7 -4
- package/dist/standalone/bk-stat.js +2 -2
- package/dist/standalone/bk-steps-item.js +1 -1
- package/dist/standalone/bk-swatch-group.js +2 -2
- package/dist/standalone/bk-switch.js +2 -2
- package/dist/standalone/bk-table.js +130 -80
- package/dist/standalone/bk-tabs-item.js +1 -1
- package/dist/standalone/bk-tabs.js +1 -1
- package/dist/standalone/bk-tasks-item.js +1 -1
- package/dist/standalone/bk-text.js +1 -1
- package/dist/standalone/bk-time-countdown.js +1 -1
- package/dist/standalone/bk-time-relative.js +1 -1
- package/dist/standalone/bk-timeline-item.js +1 -1
- package/dist/standalone/bk-toast-group.js +1 -1
- package/dist/standalone/bk-toast.js +1 -1
- package/dist/standalone/bk-tooltip.js +1 -1
- package/dist/standalone/bk-tree-item.js +2 -2
- package/dist/standalone/bk-video.js +1 -1
- package/dist/standalone/bk-zoom.js +3 -3
- package/dist/standalone/chunks/{bk-alert-offline-BoMEYxnE.js → bk-alert-offline-B1bQxOZp.js} +1 -1
- package/dist/standalone/chunks/{bk-carousel-B7-9OanA.js → bk-carousel-BCwIQhG5.js} +1 -1
- package/dist/standalone/chunks/{bk-diagram-CpOpicmo.js → bk-diagram-DWK8CvRZ.js} +2 -2
- package/dist/standalone/chunks/{bk-dialog-a2BtUBf2.js → bk-dialog-DX0cPJ1o.js} +7 -3
- package/dist/standalone/chunks/{bk-image-editor-z_Uj83fy.js → bk-image-editor-DXEj9gCu.js} +1 -1
- package/dist/standalone/chunks/{bk-input-date-range-BQkbPlSJ.js → bk-input-date-range-Cbx_lpf0.js} +1 -1
- package/dist/standalone/chunks/{bk-input-rich-Dte_b4Ev.js → bk-input-rich-ZB68vziu.js} +3 -3
- package/dist/standalone/chunks/{bk-input-text-CUNQG1ah.js → bk-input-text-DD32uWNO.js} +1 -1
- package/dist/standalone/chunks/{bk-kbd-B7bz8hmV.js → bk-kbd-B_TlKzWj.js} +1 -1
- package/dist/standalone/chunks/{bk-model-viewer-D1XJPgAG.js → bk-model-viewer-Dr81ahVv.js} +19 -5
- package/dist/standalone/chunks/{bk-qr-code-CbI9rdOK.js → bk-qr-code-QaYvZwOR.js} +1 -1
- package/dist/standalone/chunks/{bk-toast-group-Cix-Urgi.js → bk-toast-group-BSeO_rPs.js} +1 -1
- package/dist/standalone/chunks/{choice-field-BnuK9mp_.js → choice-field-CGvE4tyb.js} +1 -1
- package/dist/standalone/chunks/{clipboard-DBGdJ-1S.js → clipboard-BKlrP5rj.js} +1 -28
- package/dist/standalone/chunks/clipboard-Crzt1Sh9.js +29 -0
- package/dist/standalone/chunks/{date-field-BQ5k-DDL.js → date-field-BlI6grfT.js} +2 -2
- package/dist/standalone/chunks/{form-control-D7dqSP9M.js → form-control-CyXQIJ2x.js} +1 -1
- package/dist/standalone/chunks/{frame-BW1nKuoM.js → frame-abXBnl8a.js} +3 -1
- package/dist/standalone/chunks/handle-menu-ZVR_msk2.js +49 -0
- package/dist/standalone/chunks/{i18n-CNsBRNPu.js → i18n-B6Al9xCK.js} +7 -0
- package/dist/standalone/chunks/{i18n-CrZgrRu9.js → i18n-BI16HQmm.js} +1 -1
- package/dist/standalone/chunks/{marks-CdqbbJpM.js → marks-0kbeB4n8.js} +2 -2
- package/dist/standalone/chunks/{popover-base-oDhxsYMr.js → popover-base-ac49G87f.js} +1 -1
- package/dist/standalone/chunks/{ramp-EclrETaQ.js → ramp-ggoyjMvC.js} +1 -1
- package/dist/standalone/chunks/{summary-BwL-Gp8w.js → summary-BK-B4m5A.js} +1 -1
- package/dist/standalone/chunks/{text-field-CTp2b-Ai.js → text-field-4IUUpRHE.js} +2 -2
- package/dist/standalone/chunks/{toggle-control-DXkgmz7R.js → toggle-control-ioV2jhNY.js} +1 -1
- package/dist/standalone/confirm.js +3 -3
- package/dist/standalone/i18n-de.js +8 -1
- package/dist/standalone/toast.js +1 -1
- package/dist/standalone/tokens.css +4 -1
- package/dist/tokens.css +4 -1
- package/package.json +1 -1
- package/dist/standalone/chunks/handle-menu-DsxWvv4D.js +0 -22
package/BUILDING.md
CHANGED
|
@@ -336,6 +336,38 @@ Rules:
|
|
|
336
336
|
- One filter (a date range, a `bk-filter-bar`) drives every chart of the page.
|
|
337
337
|
- A list of things that need attention links each row to the record.
|
|
338
338
|
|
|
339
|
+
### Data that the server computes
|
|
340
|
+
|
|
341
|
+
**Job:** the server computes expensive data when the page asks for it. The user waits and then sees the result.
|
|
342
|
+
**Story:** `Patterns/Computing Data`.
|
|
343
|
+
|
|
344
|
+
```html
|
|
345
|
+
<bk-card heading="Traffic" aria-busy="true">
|
|
346
|
+
<bk-stack>
|
|
347
|
+
<!-- skeleton in the shape of the result -->
|
|
348
|
+
<bk-progress label="Progress of the calculation">Calculating the figures. This can take a minute.</bk-progress>
|
|
349
|
+
<span role="status" class="sr-only"></span>
|
|
350
|
+
</bk-stack>
|
|
351
|
+
</bk-card>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Rules:
|
|
355
|
+
- The server answers at once. Use `{ computing: true }`, optionally with `progress` (0 to 1) and `retryAfter` (seconds). The page asks again after `retryAfter`. Do not hold the request open.
|
|
356
|
+
- Show a `bk-skeleton` in the shape of the result. The layout does not move when the data arrives.
|
|
357
|
+
- Show a `bk-progress` with a value only when the server reports one. Otherwise leave out the value.
|
|
358
|
+
- Set `aria-busy="true"` on the region while it waits. Set it to `false` when the data is there.
|
|
359
|
+
- A fast answer shows no placeholder flash: show the skeleton and the note after `--bk-loading-delay` (`LoadingController`), and keep them at least `--bk-loading-min`.
|
|
360
|
+
- Poll with a back-off, for example after 2 s, 4 s, 8 s, then every 10 s. Stop after 2 minutes. Stop polling when the page is hidden.
|
|
361
|
+
- After about 20 s, change the note to a calmer one that says the user can leave and come back. Do not add a second progress element.
|
|
362
|
+
- When the app gives up, show a `bk-alert tone="danger"` with `Try again`. Try again starts a new poll from the first step.
|
|
363
|
+
- Announce once, when the data arrives: set the text of a `role="status"` region that is always in the page. Do not announce on each poll.
|
|
364
|
+
- The texts belong to the app. Write them as in "Texts on the screen".
|
|
365
|
+
|
|
366
|
+
Mistakes that agents made:
|
|
367
|
+
- A spinner for a page region. It hides the shape of the result.
|
|
368
|
+
- An announcement on each answer of the server.
|
|
369
|
+
- A poll without a limit.
|
|
370
|
+
|
|
339
371
|
### Source and rendering
|
|
340
372
|
|
|
341
373
|
**Job:** the user reads one Markdown document as its rendering, and can check its source or its plain text.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
An app installs a release from npm: `"@bk2k/ui": "^<version>"`.
|
|
4
4
|
|
|
5
|
+
## 0.6.8
|
|
6
|
+
|
|
7
|
+
### Changes that need a line in the app
|
|
8
|
+
|
|
9
|
+
- **`bk-table` in card mode sorts with one select.** Above the cards, a "Sort by" select and a direction button replace
|
|
10
|
+
the row of sort buttons. The select contains every sortable column, also a hidden one. The element fires `sort` as
|
|
11
|
+
before. An app test that clicks a sort button of the header in card mode uses the select instead
|
|
12
|
+
(`chooseOption()` of `@bk2k/ui/testing.js`, in the part `card-sort`).
|
|
13
|
+
- **`bk-table` and `bk-shell-app` load the elements of optional features late.** A plain table no longer contains the
|
|
14
|
+
checkbox, filter, menu, popover, skeleton and editor elements, and a wide shell no longer contains `bk-drawer` and
|
|
15
|
+
`bk-dialog` (table, shell and button: 104 kB instead of 147 kB gzip). The element loads them when a page uses the
|
|
16
|
+
feature, and `updateComplete` (and `settled()`) waits for the load. An app test that looks for the filter popover, the
|
|
17
|
+
column menu, the selection checkboxes or the shell drawer awaits `el.updateComplete` or `settled()` first. A page that
|
|
18
|
+
needs one of these elements earlier imports it itself.
|
|
19
|
+
- **`bk-facts layout="rows"` has one label column for all rows.** It is as wide as the widest label, up to
|
|
20
|
+
`--bk-facts-label-width` (default 60%, before 30%). In a list narrower than 24rem the value is under its label. An app
|
|
21
|
+
that set `--bk-facts-label-width` or `--bk-facts-rows-min` to work around the old layout removes them.
|
|
22
|
+
|
|
23
|
+
### New
|
|
24
|
+
|
|
25
|
+
- **New `bk-period-nav`:** the previous, next and current links of a period (a day, a week or a month), with the range
|
|
26
|
+
text (default slot) and a note (slot `note`). The links go through the link resolver. Without `next-href` the next
|
|
27
|
+
button is disabled, and the current button shows only with `current-href`.
|
|
28
|
+
- **`bk-model-viewer fill`:** the viewer takes the height of its container, for example the body of
|
|
29
|
+
`<bk-dialog size="full">`. The view takes the height that the control row leaves, and the details scroll on their own.
|
|
30
|
+
An app that set `--bk-model-viewer-height: calc(100dvh - …)` for a dialog removes it. New tokens
|
|
31
|
+
`--bk-model-viewer-min-height` and `--bk-model-viewer-details-height`.
|
|
32
|
+
- **`bk-chart-bar` for a band of days:** `detail` shows a second label under each category (a date), a missing value
|
|
33
|
+
draws an outline instead of a bar and has no link, `current` shows a mark under its label (not only a colour), and
|
|
34
|
+
`href="{field}"` takes the address of each row as it is. New i18n keys `chartNoValue` and `chartCategoryDetail`.
|
|
35
|
+
- **Pattern "Data that the server computes":** the story "Patterns/Computing Data" and a recipe in BUILDING.md for a
|
|
36
|
+
page that waits for data that the server computes (a placeholder, `aria-busy`, one announcement, polling with a limit).
|
|
37
|
+
- Before its module runs, a `bk-table` is never wider than its container (a rule in `tokens.css`). The table of the
|
|
38
|
+
server scrolls in its own box and does not make the page scroll sideways on a phone.
|
|
39
|
+
- `data-type="number"` on a `bk-facts-item` aligns its value at the end, with tabular figures.
|
|
40
|
+
- `bk-button` passes `aria-expanded` and `aria-controls` of the host to its inner control (a disclosure button of the
|
|
41
|
+
app). A popover, a menu or a tooltip that controls the button replaces them while it is attached.
|
|
42
|
+
|
|
43
|
+
### Fixes
|
|
44
|
+
|
|
45
|
+
- `bk-dialog`: an empty `start` slot takes no space. Before, the heading started 12px further in than the body.
|
|
46
|
+
- `bk-button collapse` with only `icon-end` keeps the end icon when it collapses. Before, an empty square was left.
|
|
47
|
+
- `bk-combobox` with `search`: `options` and `<option>` children give the label of the current value (a value from the
|
|
48
|
+
server shows its label, not its key). The list shows only the results.
|
|
49
|
+
- `bk-combobox` with `search`: text that the user clears stays empty when the results arrive. Before, the label of the
|
|
50
|
+
value came back, and the next key added to it.
|
|
51
|
+
- `bk-combobox` with `search`: the list is busy from the key until the search for the newest query ends. "No results"
|
|
52
|
+
shows only after a search for the query ends, and the spinner row waits for `--bk-loading-delay`.
|
|
53
|
+
- `bk-select fit` in a table cell is as wide as its longest option. Before, the chevron covered the text, because the
|
|
54
|
+
box took the min-content width of the cell.
|
|
55
|
+
- `bk-model-viewer` with `--bk-model-viewer-height` fills its column. Before, the view took its width from the height and
|
|
56
|
+
the ratio: it was wider than its column and covered the details, or narrower after a resize.
|
|
57
|
+
- `bk-table` in card mode: a selected row and the row under the pointer (`hover-rows`) tint the whole card. Before, only
|
|
58
|
+
the cells had the tint, and the padding of the card stayed white.
|
|
59
|
+
- `bk-table` with `th[data-card="meta"]`: the title of a card keeps the width of its longest word. A meta value that does
|
|
60
|
+
not fit next to the title moves under it. Before, a long title and the meta value could overlap.
|
|
61
|
+
|
|
5
62
|
## 0.6.7
|
|
6
63
|
|
|
7
64
|
### Changes that need a line in the app
|
package/USAGE.md
CHANGED
|
@@ -453,7 +453,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
453
453
|
| `bk-nav` + `bk-nav-item` + `bk-nav-group` + `bk-nav-divider` | app navigation; an item with `href` is a link, an item without `href` is a button for an action. A nested collapsible group is a plain menu group (`--bk-nav-group-bg`, `-shadow`, `-padding`, `-inset`, `-spacing` set a surface for it). A row sets the colour under it for its content (`--bk-ground-tint`, read by `bk-badge`). Layout: vertical (sidebar, or rail with tooltips and flyouts) or `orientation="horizontal"` (tab row, groups as dropdowns; `variant` marks the current item: `underline`, `pills`, `solid`, `text`). Items: `current`, `count`, `icon`; the `description` of an item is a second line; its `actions` slot shows on hover and focus. Groups: groups nest (a sub-tree; in a rail one button with the whole tree in its flyout); a group has `href`/`current` (the name is a link, a separate chevron opens it), `count`, an `end` slot (a summary of what a closed group contains) and `actions`. `bk-nav-divider` is a decorative hairline between zones. In a horizontal nav, a group with a `panel` slot is a mega menu (a wide panel that opens on hover, one open at a time; a sub-tree in the drawer) |
|
|
454
454
|
| `bk-text` | text in a type register: `variant` (body, small, caption, lead, eyebrow, h3 … display), `muted`, `tone`, `mono`, `tabular`; `overflow` (`ellipsis` shows one line with an ellipsis, `ellipsis="start"` shows the end of a path; `lines` with `lines="3"`; `nowrap`; `pre` shows typed line breaks); `expandable` (a "Show more" button for text cut at `lines`; `expanded`, `toggle`); `highlight` (marks matches in `<mark>`, case and accent insensitive). `variant="inherit"` uses the type of the parent: `<bk-text variant="inherit" muted>` is the muted second half of a two-tone heading (in the `heading` slot of `bk-page-hero` or `bk-page-section`). With `level` it is a heading. An icon, spinner or status dot in `start` is before the text |
|
|
455
455
|
| `bk-icon-tile` | icon on a small filled square (page header, card header, stat, row): `icon`, `tone`, `variant` soft/solid/outline (`outline` has a `--bk-line` hairline, no fill, and the icon in the colour of the tone), `size` |
|
|
456
|
-
| `bk-facts` + `bk-facts-item` | list of label and value pairs in columns (`min`); `wide` makes an item use a full row; `layout="rows"` shows the label, the value and the `actions` slot of each item on one line (a summary list; name each action with its row) |
|
|
456
|
+
| `bk-facts` + `bk-facts-item` | list of label and value pairs in columns (`min`); `wide` makes an item use a full row; `layout="rows"` shows the label, the value and the `actions` slot of each item on one line, with one label column as wide as the widest label up to `--bk-facts-label-width` (a summary list; name each action with its row); `data-type="number"` on an item aligns its value at the end |
|
|
457
457
|
| `bk-page-section` | a band of a page: edge to edge, with background and line, and the content in a shared width (`narrow`/`default`/`wide`/`full`). `prose` is a reading column of `--bk-measure-prose` at the body font size, as long as the lines of `bk-prose`; use it for a legal page or an article, where the head, a notice and the text share one column. Head: a head above the content with `heading` + `level`, `description` (lead), the `eyebrow` slot and `actions` at the end of the row. Space: `size="sm\|md\|lg"` sets the space above and below (`sm`: a short band, for example a legal row, a row of logos or results under a filter bar; `lg`: a larger band); a section after a section or a `bk-page-hero` on the same background has no space above; a section with a head starts a new topic and has its full space above the head (`--bk-page-section-joined-space` sets a smaller space). Aside: an `aside` slot beside the content with `aside-position="start\|end"` (`end`: a table of contents beside an article; the aside is wider than the content width; `--bk-page-section-aside-outset: 0px` sets it inside the content width, so a tool page has the same edges as the other bands; the app sets the aside size of a page with component tokens in a class of its bridge file, for example a tool page class with `--bk-page-section-aside-outset: 0px`, so tool pages and reading pages with a table of contents can both exist). Alignment: `align="start\|center"` (default `start`); `center` centres the head, the text, the wrapped rows of a `bk-cluster`, the items of a `bk-stack`, all rows of a `bk-stat`, and the quote mark, the quote and the person of a `bk-testimonial` (a block outside a stack, for example a table or a grid of cards, has the full width); centred rows come from a centred band or from the containers that centre (`bk-page-hero`, `bk-empty-state`, `bk-shell-centered`); an end-aligned sum or footnote is the `end` slot of a `bk-bar`. Other: `sticky` fixes a band (tabs, toolbar) below the header; `divider` draws a hairline below the band (`--bk-page-section-divider` sets the colour; a sticky band also has it). `layout="split"` shows the head in a start column (`--bk-page-section-split-head-width`, about one third) and the content in the end column; below `--bk-page-section-split-breakpoint` (default `--bk-width-narrow`) the head is above the content; an `aside` is beside the content in the end column. The footer of the app shell is a `bk-page-footer` or sections |
|
|
458
458
|
| `bk-page-hero` | the opening band of a page: `width="narrow\|default\|wide\|prose\|full"` as on `bk-page-section` (`prose`: a reading column); slots `eyebrow`, `heading` (or `heading` + `level`, default 1), lead text, `actions`, `proof` (small proof points under the actions, each a short text with a small icon, in a row that wraps) and `media`; `align="center\|start"` (centred: the media is below the actions and has the content width, at most `--bk-page-hero-media-max-width`; a block such as a `bk-card` preview uses this width, and an image with its own width is centred); `--bk-page-hero-bg` sets the glow |
|
|
459
459
|
| `bk-page-footer` + `bk-page-footer-column` | the footer of a site, in the `footer` slot of `bk-shell-app`: a band in the widths of `bk-page-section` (`width`; its edges are the same as the edges of the sections), `layer` for a background. Slots: `brand` (the start column: brand, a short text, a form); the default slot for `bk-page-footer-column`s (a `heading`, `level`, and quiet links; each column is a navigation named by its heading); the legal row under a hairline: `legal` (copyright, at the start), `notes` (short quiet notes after it), `legal-end` (legal links at the end, a navigation, `legal-label`, i18n `footerLegal`). The gaps separate the items; there are no separator characters. Below 40rem the brand uses the full width, the columns form rows with as many columns as fit `--bk-page-footer-column-min` (two on a phone), and the legal row stacks: copyright, notes, legal links |
|
|
@@ -483,7 +483,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
483
483
|
| `bk-select` | styled select; `<option>`/`<optgroup>` children or `.options`; `label-position="start"`; each option row has `data-value`; `placeholder`; `multiple` (`values`; the box lists the chosen labels); `clearable` (with `multiple`: empties all values); `prefix`/`suffix`; slots `start`/`end`; `collapse` (`sm`/`md`/`lg`) folds the box to its icon in a narrow size container, as `bk-button collapse` does; `select-all` with `multiple` (a tri-state row on top). Long lists render only the rows in view (above 100). Cancelable `loadmore` at the end of the list; `loading` (skeleton row). `.renderOption` renders the label part of each row, as in `bk-listbox`; `.renderValue = (option) => …` renders the chosen option in the closed box (for example a font in its own face). `open` (reflected) shows and sets the open state of the list; `toggle` fires after a change. A value that matches no option reads as `""`, as on a native select; if the app adds an option with that value later, the select chooses it |
|
|
484
484
|
| `bk-select-tree` | a select whose popup is a `bk-tree`: nested `<bk-tree-item value label>` children as data; single (any node, also a branch) or `multiple` (check boxes, tri-state branches; the value is the checked leaves); `search` filters the rows; the focus moves into the popup (Escape returns it); form-associated, as `bk-select` is |
|
|
485
485
|
| `bk-select-cascade` | a select whose popup is `bk-listbox-columns`: nested `<bk-listbox-item>` children or `.items`; the value is the chosen leaf, and `path`/`pathLabels` are the way down (the box shows "Germany / Bavaria / Munich"); form-associated, as `bk-select` is |
|
|
486
|
-
| `bk-combobox` | searchable select (APG combobox): typing filters `<option>` children or `.options` (`Intl.Collator` in the locale: case and accents are ignored by the rules of the language, matches are marked; `matchRanges(label, query, locale)`). Options: `multiple` (tags, `max`); `allow-custom` (free text; with `multiple` a tag input); `clearable` (value, text and tags); `type="search"` (the look of a search field: a magnifier, no chevron, a clear button; the role stays combobox); `prefix`/`suffix` (the prefix is before the tags); slots `start`/`end`; async `.search(query, signal)` with `loading
|
|
486
|
+
| `bk-combobox` | searchable select (APG combobox): typing filters `<option>` children or `.options` (`Intl.Collator` in the locale: case and accents are ignored by the rules of the language, matches are marked; `matchRanges(label, query, locale)`). Options: `multiple` (tags, `max`); `allow-custom` (free text; with `multiple` a tag input); `clearable` (value, text and tags); `type="search"` (the look of a search field: a magnifier, no chevron, a clear button; the role stays combobox); `prefix`/`suffix` (the prefix is before the tags); slots `start`/`end`; async `.search(query, signal)` with `loading` (the list is busy from the keystroke until the newest search ends; in search mode, `options` and `<option>` children give the labels of the current value, and the list shows only the results). Long lists render only the rows in view; cancelable `loadmore` at the end (`loading` with options: a skeleton row). A pasted list makes one tag for each part. `data-avatar` on an option shows the picture of a person (empty: initials). `.renderOption = (option, label) => …` renders the label part of each row (`label` has the match marked), as in `bk-listbox`. `open` (reflected) shows and sets the open state of the list; `toggle` fires after a change |
|
|
487
487
|
| `bk-input-number` | number field with − / + buttons (APG spinbutton); `label-position="start"`; `min`/`max`/`step`; typing in the format of the locale; the value is a plain number string; units and currency with `prefix`/`suffix` (`€`, `mm`); `clearable`; `scrub` changes the value when the user drags the label |
|
|
488
488
|
| `bk-input-slider` | range slider (APG slider); `min`/`max`/`step`; `show-value` (`Intl`, `formatOptions`; `.valueFormatter = (value) => text` for a text that is not the value); `editable` adds a synced number field for exact entry (`input-position="start\|end"`, width `--bk-input-slider-input-width`); slots `start`/`end`; `input` fires while dragging, `change` on release; `marks` (`true` = every `step`, or `[{ value, label }]`) shows ticks on the track and labels under it |
|
|
489
489
|
| `bk-input-slider-range` | two thumbs for a range (APG multi-thumb slider): `start-value`/`end-value`, `min`/`max`/`step`, `min-gap` (the thumbs never cross), `show-value` ("20–80" with `Intl`), `editable` (a number field before and after the track); submits `name=start&name=end`; the `--bk-input-slider-*` tokens style it; `marks` as on `bk-input-slider` |
|
|
@@ -520,9 +520,10 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
520
520
|
| `bk-attachment` | an attached file before it is sent: an image thumbnail (fires `select`) or an icon and name; `state` uploading/failed; `progress` (0..1) shows an upload bar and percent; `retryable` adds a retry button (fires `retry`); the remove button fires `remove`; use it in the `header` slot of `bk-composer` |
|
|
521
521
|
| `bk-card` | surface with `media`/`header`/default/`footer` slots; `heading` (+ `level`) and `description` (a muted line under the heading, as in a chart card). `href` makes the card a link that covers the card (header `actions`, `footer`, overlays and `data-card-control` children stay clickable; `label` names the link). Media: `media-start`/`media-end` and `media-bottom-start`/`media-bottom-end` overlays; a `media-bottom` strip (`data-reveal` shows an item only on hover or focus); `media-ratio`. Also: `tone`, `selected`; `busy` (+ `busy-label`) covers a reloading card with a veil and a spinner, and the content is inert (`bk-panel` and `bk-pane` share this); `selectable` adds a checkbox for `selected` (fires `change`) |
|
|
522
522
|
| `bk-item` + `bk-item-group` | content row: `start` visual (or `icon`; an `<img>` or `<bk-picture>` there is a thumbnail of `--bk-item-media-size` × `--bk-item-media-ratio`, covered), title, `description`, `end` meta or actions; `href` makes the row a link. The group adds list semantics, `divided` (lines also between link rows: their ends are on the edge of the group, and the hover fills the row; selectable and unread rows have a gap) and a visible `heading` (+ `level`). `selection="single\|multiple"` makes it a grid of rows to select (APG grid: one Tab stop, ↑/↓, Space/Enter, → into the `end` controls) with a cancelable `select` that has `{ values }` (the `value` of the items; in `single` the selected row fires it again). `unread` on an item (dot, tint, hidden "Unread"). `swipe-end`/`swipe-start` slots on an item (touch swipe, `openSwipe()`; offer the same actions in a menu). `editing` on a group (checkboxes with `selection="multiple"`, `handle` slot, announced, the focus moves in and back) |
|
|
523
|
-
| `bk-table` | wraps a native `<table>`. Look: `variant` line/striped/grid; `surface` (the table has its own surface: background, border, radius, clipped corners; in card mode it has no surface; the pattern "a table as a card" is `<bk-table surface …>`, one element; a `bk-card` around a table is for a card with a heading and other content, and then the table has no `surface`); `sticky-header`; `hover-rows`; `data-type="number"` cells; `data-selected` rows. Sort: `sortable` + `th[data-sort]` add sort buttons (`sort-key`/`sort-dir`, cancelable `sort` event; the app sorts the rows). The table scrolls sideways as a focusable region. Selection: `selection="single\|multiple"` + `tr[data-key]` add checkboxes (cancelable `select` `{ keys }`, `selectedKeys`, Shift+click range; the table stays a native table, and the checkbox is the state of the row). Columns and rows: `th[data-resizable]` (drag, arrow keys, or a click on the handle for a Wider/Narrower/Reset menu; `persist-key`); `th[data-pin="start"]`; `tr[data-expandable]` + `tr[data-detail]`; the table announces sort and selection. Filters: `th[data-filter]` + `slot="filter-<key>"` (popover, cancelable `filter` `{ filters }`, chips in a `bk-filter-bar`). `column-menu` (sort, pin, move, hide; `columns` `{ hidden, pinned }`; `hiddenColumns`). States: `busy` (skeleton rows, veil); `slot="empty"`; `slot="error"`; `sticky-footer`; `th[data-pin="end"]`. Cards: `responsive="cards"` (a short text is at the end beside its label, a long text wraps under it at the start edge, and a number is always at the end; `th[data-card="block"]` shows the value of a column under its label; `th[data-card="meta"]` shows a short value (a position, a change, the disclosure button in the first cell) in the head of the card, next to the title, without its label; `th[data-card="hidden"]` hides the column in card mode only: its cells have `display: none` there and show in table mode). Filter by removing rows, not by hiding them: the empty state counts the rows in the body. Also: `navigation="cell"` (APG grid) + `td[data-editable]` (`edit` `{ key, column, value, oldValue }`); `reorderable` rows and `th[data-reorderable]` columns (`reorder`, keyboard, drag, menu); `toCSV()` and Ctrl+C; `virtual` + `rows`/`renderRow`/`rowKey` (`loadmore`); `tr[data-level]`/`tr[data-group]` (treegrid); `a[data-row-link]` in a cell makes the whole row a link (the controls of the row stay clickable; use `data-row-action` for others); `data-type="check"` cells show yes/no as a mark with a hidden "Yes"/"No" (other values of the column stay text, centred); `th[data-highlight]` marks a column (a comparison of plans) |
|
|
523
|
+
| `bk-table` | wraps a native `<table>`. Look: `variant` line/striped/grid; `surface` (the table has its own surface: background, border, radius, clipped corners; in card mode it has no surface; the pattern "a table as a card" is `<bk-table surface …>`, one element; a `bk-card` around a table is for a card with a heading and other content, and then the table has no `surface`); `sticky-header`; `hover-rows`; `data-type="number"` cells; `data-selected` rows. Sort: `sortable` + `th[data-sort]` add sort buttons (`sort-key`/`sort-dir`, cancelable `sort` event; the app sorts the rows). The table scrolls sideways as a focusable region. Selection: `selection="single\|multiple"` + `tr[data-key]` add checkboxes (cancelable `select` `{ keys }`, `selectedKeys`, Shift+click range; the table stays a native table, and the checkbox is the state of the row). Columns and rows: `th[data-resizable]` (drag, arrow keys, or a click on the handle for a Wider/Narrower/Reset menu; `persist-key`); `th[data-pin="start"]`; `tr[data-expandable]` + `tr[data-detail]`; the table announces sort and selection. Filters: `th[data-filter]` + `slot="filter-<key>"` (popover, cancelable `filter` `{ filters }`, chips in a `bk-filter-bar`). `column-menu` (sort, pin, move, hide; `columns` `{ hidden, pinned }`; `hiddenColumns`). States: `busy` (skeleton rows, veil); `slot="empty"`; `slot="error"`; `sticky-footer`; `th[data-pin="end"]`. Cards: `responsive="cards"` (a short text is at the end beside its label, a long text wraps under it at the start edge, and a number is always at the end; `th[data-card="block"]` shows the value of a column under its label; `th[data-card="meta"]` shows a short value (a position, a change, the disclosure button in the first cell) in the head of the card, next to the title, without its label; `th[data-card="hidden"]` hides the column in card mode only: its cells have `display: none` there and show in table mode; a sortable table sorts its cards with one "Sort by" select and a direction button above the table, part `card-sort`). Filter by removing rows, not by hiding them: the empty state counts the rows in the body. Also: `navigation="cell"` (APG grid) + `td[data-editable]` (`edit` `{ key, column, value, oldValue }`); `reorderable` rows and `th[data-reorderable]` columns (`reorder`, keyboard, drag, menu); `toCSV()` and Ctrl+C; `virtual` + `rows`/`renderRow`/`rowKey` (`loadmore`); `tr[data-level]`/`tr[data-group]` (treegrid); `a[data-row-link]` in a cell makes the whole row a link (the controls of the row stay clickable; use `data-row-action` for others); `data-type="check"` cells show yes/no as a mark with a hidden "Yes"/"No" (other values of the column stay text, centred); `th[data-highlight]` marks a column (a comparison of plans) |
|
|
524
524
|
| `bk-pagination` | page navigation: `page`, `pages` or `total` + `page-size`, `siblings`, ellipsis; `href="?page={page}"` for links, else buttons; cancelable `select`, then `change` (both with `detail.page`); `show-summary` ("21–40 of 312"); in a narrow place it shows a compact form by itself; announces "Page 3 of 12" |
|
|
525
525
|
| `bk-page-pager` | the link to the next page of a page that the user reads in order: `previous-href`/`next-href`, optional page titles `previous-label`/`next-label` (or slots); real links with `rel="prev"`/`rel="next"`, no boxes; for docs and guides |
|
|
526
|
+
| `bk-period-nav` | navigation between periods of a dashboard (day, week, month): `previous-href`, `next-href`, `current-href`; the range is the default slot and the state of the period is the `note` slot, both formatted by the app; real links through the link resolver; without `next-href` the next button is disabled (newest period); the current button shows only with `current-href`; `previous-label`/`next-label`/`current-label`, `label`, `size`; cancelable `navigate` |
|
|
526
527
|
| `bk-accordion` + `bk-accordion-item` | sections that show and hide content (APG accordion); one is open at a time unless `multiple`; arrow keys; item `persist-key`; `description` (second line); `actions` slot beside the button; `variant="plain"` (rows without hairlines, the chevron is first); find-in-page finds closed items and opens them |
|
|
527
528
|
| `bk-carousel` + `bk-carousel-item` | slides in a scroll-snap track (APG carousel): previous/next, dots as tabs, `loop`, `autoplay` with a pause button first in the tab order (it stops on hover and focus, and is off for reduced motion); other slides are `inert`; announces "Slide n of m"; `change` event, `index`, `goTo()` |
|
|
528
529
|
| `bk-carousel-controls` | the previous and next buttons of the carousel with the `id` in `for`, in another place (the `actions` of a `bk-page-section`); the carousel then hides its own controls |
|
|
@@ -572,7 +573,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
572
573
|
| `bk-link` | text link, a real `<a>` in the size of the text around it: `variant="standalone"` (accent, faint underline, full underline on hover; for the end of a row), `inline` (the colour of the text, underlined; in a sentence) or `quiet` (muted, no underline at rest; for a list of links such as the link columns of a footer) |
|
|
573
574
|
| `bk-alert` | inline message with `tone`, `heading`, actions, `dismissible`, `banner`; `variant="soft"` tints the whole box in the tone; `variant="inline"` has no box (icon and text in the tone), for a short status next to a button ("Saved.", with `live`); `live` announces it once when it is inserted and when the text changes; `autofocus` moves the focus to it once when it renders (after a redirect), as a named region |
|
|
574
575
|
| `bk-alert-offline` | the band that says the connection is lost and, for 3 seconds, that it is back (a live `bk-alert banner`); put it in the `banner` slot; `OnlineController` is exported for your own components |
|
|
575
|
-
| `bk-dialog` | modal; `open`, `show()`, `close(value)`; children with `data-close value="…"` close it; a `<form method="dialog">` inside closes it on submit (the value of the submit button is the return value); `role="alert"` makes it an alert dialog (`alertdialog`, focus on Cancel, no dismiss on the backdrop); `floating` (+ `resizable`, `persist-key`): a non-modal window that the user moves by its header (arrow keys and click-then-click are the single-pointer ways); `<button commandfor="id" command="show-modal">` opens it without script (also `close`, `request-close`, `--show`, `--hide`, `--toggle`) |
|
|
576
|
+
| `bk-dialog` | modal; `open`, `show()`, `close(value)`; children with `data-close value="…"` close it; a `<form method="dialog">` inside closes it on submit (the value of the submit button is the return value); `role="alert"` makes it an alert dialog (`alertdialog`, focus on Cancel, no dismiss on the backdrop); `floating` (+ `resizable`, `persist-key`): a non-modal window that the user moves by its header (arrow keys and click-then-click are the single-pointer ways); `<button commandfor="id" command="show-modal">` opens it without script (also `close`, `request-close`, `--show`, `--hide`, `--toggle`); with `size="full"` (or `--bk-dialog-height`) the body takes the height that the header and the footer leave: content with `block-size: 100%` fills it, taller content scrolls in the body |
|
|
576
577
|
| `bk-drawer` | modal panel that slides in from an edge (`placement` start, end, top or bottom; `size`); otherwise it is a `bk-dialog`; `swipe` with `placement="bottom"` makes a bottom sheet: drag handle (`handle` part), swipe down to close, snap to the heights of `--bk-drawer-detents`; the drawer avoids the safe areas of the device |
|
|
577
578
|
| `bk-toast` | one notification as inline content (tone, heading, actions, dismiss) |
|
|
578
579
|
| `bk-toast-group` + `toast()` | notifications; `toast("Saved", { tone: "success" })`; a toast with an `action` or `loading` stays until the user dismisses it or the app updates it (`duration` 0); inside an open modal dialog the toaster moves into the dialog; `toast()` returns a handle (call it or `close()` to hide, `update(message, options)` to change); `toast.promise(promise, { loading, success, error })`; `stacked` folds toasts into a deck that opens on hover and focus; `max` (default 5) limits the toasts on screen: a new toast dismisses the oldest toasts that have a timer, and toasts without a timer wait behind a line "N more notifications"; a swipe toward the edge dismisses a toast (the close button is the alternative); timers wait while the tab is hidden; the group avoids the notch and the keyboard (`--bk-safe-*`, `--bk-keyboard-inset`) |
|
|
@@ -597,7 +598,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
597
598
|
| `bk-video` | a video with its own controls (play, position, time, mute, captions written above the controls, full screen); a `<video>` with sources and tracks in the slot, or `src`; `ambient` for a background video with only a pause button |
|
|
598
599
|
| `bk-image-compare` | two pictures of the same subject (before and after): `before-src`, `after-src`, `before-label`, `after-label`; `variant="slider"` (a divider, `position` in percent, arrow keys), `side` (next to each other, captions) or `toggle` (one at a time, a segmented control, `show`); without `before-src` it shows the after picture alone; `zoomable`: Ctrl + wheel, pinch, double click, drag, keys and a `bk-zoom`; both pictures show the same part (`view`, `resetZoom()`); `input` and `change` |
|
|
599
600
|
| `bk-image-viewer` | inline image viewer with zoom (level in real pixels, fit, actual size, sharp pixels from 300 %), swipe, keyboard, pan buttons while zoomed, filmstrip (content of the lightbox); the placeholder has the shape of the full image |
|
|
600
|
-
| `bk-model-viewer` | a 3D model (STL, 3MF, OBJ; `type` for an address without an extension) on a print bed: drag, wheel and keys turn, tilt and zoom it; a button for each move; `color` of the part (it replaces the colours of a 3MF or OBJ file; without it the file keeps its colours); `items` + `index` with `change` and a status line ("2 of 9 · name"); `details` slot beside the view (under it below `--bk-model-viewer-stack-below`); needs the optional peer dependency `three` (see "3D models") |
|
|
601
|
+
| `bk-model-viewer` | a 3D model (STL, 3MF, OBJ; `type` for an address without an extension) on a print bed: drag, wheel and keys turn, tilt and zoom it; a button for each move; `color` of the part (it replaces the colours of a 3MF or OBJ file; without it the file keeps its colours); `items` + `index` with `change` and a status line ("2 of 9 · name"); `details` slot beside the view (under it below `--bk-model-viewer-stack-below`); `fill`: the viewer takes the height of its container (for example the body of `<bk-dialog size="full">`), the view takes what the row under it leaves, the details scroll on their own; without `fill` the view keeps `--bk-model-viewer-ratio` or `--bk-model-viewer-height`; needs the optional peer dependency `three` (see "3D models") |
|
|
601
602
|
| `bk-surface` | the container primitive: a surface on one elevation layer (`layer`, `padding`, `radius`, `tone`); `layered` makes it the base of its content (a pane, a tool window): surfaces, fields and cards in it use the layer above its own colour |
|
|
602
603
|
| `bk-command-palette` | ⌘K palette and global search: `items` and/or async `search(query)`; fires `select` |
|
|
603
604
|
| `bk-kbd-shortcuts` | overview of all registered shortcuts (inline content; wrap it in `bk-dialog` for a dialog) |
|
|
@@ -1015,9 +1016,14 @@ More charts: `bk-chart-area` (stacked layers over time, `variant="percent"` for
|
|
|
1015
1016
|
- `variant="minimal"` on `bk-chart-bar` shows the baseline and the categories only, with no grid or value axis.
|
|
1016
1017
|
This is the quiet form for small charts in the own layout of an app (use it with `labels`).
|
|
1017
1018
|
- Clickable categories on `bk-chart-bar` (a week strip): `href="?day={x}"` makes each category a real link
|
|
1018
|
-
(`{x}` is the category, `{<field>}` is a field of the row).
|
|
1019
|
-
|
|
1020
|
-
|
|
1019
|
+
(`{x}` is the category, `{<field>}` is a field of the row). `href="{url}"` takes the address of each row as it is.
|
|
1020
|
+
The link resolver resolves each address. A plain click fires `navigate`. `clickable` makes each category a button
|
|
1021
|
+
that fires a cancelable `select` `{ category, index }`. `current` marks the chosen category: a bold label and a mark
|
|
1022
|
+
under it. The other bars use `--bk-chart-bar-rest`.
|
|
1023
|
+
- `detail="<field>"` on `bk-chart-bar` shows a second label under each category (a date, for example).
|
|
1024
|
+
`detail-label` names its column in the data table.
|
|
1025
|
+
- A null value on `bk-chart-bar` draws no bar, only a short outline at the baseline. A category without any value
|
|
1026
|
+
has no link or button, and its name says "no value".
|
|
1021
1027
|
- `bk-stat` shows numbers in full (242,118). `notation="compact"` shortens them from 10,000 (242.1K).
|
|
1022
1028
|
`variant="chip"` shows the change on a soft tone pill. Thin `bk-chart-stacked-bar`s list the numbers in
|
|
1023
1029
|
their legend.
|