@bk2k/ui 0.7.0 → 0.7.1
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/CHANGELOG.md +63 -0
- package/USAGE.md +20 -9
- package/custom-elements.json +1 -1
- package/dist/charts/frame.d.ts +2 -0
- package/dist/components/bk-alert.js +1 -1
- package/dist/components/bk-button.d.ts +5 -0
- package/dist/components/bk-button.js +15 -4
- package/dist/components/bk-card.d.ts +6 -3
- package/dist/components/bk-card.js +15 -9
- package/dist/components/bk-chart-area.d.ts +4 -0
- package/dist/components/bk-chart-line.d.ts +15 -0
- package/dist/components/bk-chart-line.js +16 -6
- package/dist/components/bk-chip.d.ts +2 -0
- package/dist/components/bk-chip.js +3 -1
- package/dist/components/bk-combobox.d.ts +2 -2
- package/dist/components/bk-combobox.js +7 -20
- package/dist/components/bk-footnotes-item.d.ts +2 -2
- package/dist/components/bk-image-compare.d.ts +36 -1
- package/dist/components/bk-image-compare.js +47 -11
- package/dist/components/bk-image-viewer.d.ts +74 -3
- package/dist/components/bk-image-viewer.js +115 -28
- package/dist/components/bk-input-color.d.ts +2 -5
- package/dist/components/bk-input-color.js +0 -14
- package/dist/components/bk-input-file.d.ts +17 -0
- package/dist/components/bk-input-file.js +18 -8
- package/dist/components/bk-input-tags.d.ts +219 -0
- package/dist/components/bk-input-tags.js +293 -0
- package/dist/components/bk-input-text.d.ts +9 -0
- package/dist/components/bk-input-text.js +18 -2
- package/dist/components/bk-lightbox.d.ts +25 -1
- package/dist/components/bk-lightbox.js +7 -0
- package/dist/components/bk-page-cta.d.ts +2 -0
- package/dist/components/bk-page-cta.js +8 -1
- package/dist/components/bk-split-grid.js +7 -2
- package/dist/components/bk-stat.d.ts +2 -0
- package/dist/components/bk-stat.js +1 -1
- package/dist/components/bk-table.d.ts +2 -0
- package/dist/components/bk-table.js +1 -1
- package/dist/components/bk-tabs.d.ts +2 -1
- package/dist/components/bk-tabs.js +15 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/announcer.d.ts +6 -0
- package/dist/internal/announcer.js +7 -2
- package/dist/internal/cloak.js +1 -0
- package/dist/internal/define.d.ts +9 -0
- package/dist/internal/define.js +47 -1
- package/dist/internal/elements.d.ts +6 -0
- package/dist/internal/elements.js +5 -0
- package/dist/internal/hue.d.ts +8 -0
- package/dist/internal/hue.js +15 -4
- package/dist/internal/late/bk-tabs.d.ts +4 -0
- package/dist/internal/late/bk-tabs.js +8 -0
- package/dist/internal/late.js +3 -3
- package/dist/internal/tags.d.ts +15 -0
- package/dist/internal/tags.js +44 -0
- package/dist/internal/text-field.d.ts +2 -0
- package/dist/internal/text-field.js +8 -0
- package/dist/internal/toggle-control.js +3 -1
- package/dist/jsx.d.ts +85 -6
- package/dist/kit.d.ts +1 -0
- package/dist/kit.js +3 -0
- package/dist/reset.css +1 -1
- package/dist/standalone/all.js +106 -105
- package/dist/standalone/bk-accordion-item.js +3 -3
- package/dist/standalone/bk-accordion.js +1 -1
- package/dist/standalone/bk-action-bar.js +1 -1
- package/dist/standalone/bk-alert-offline.js +1 -1
- package/dist/standalone/bk-alert.js +7 -4
- package/dist/standalone/bk-app-state.js +1 -1
- package/dist/standalone/bk-attachment.js +2 -2
- package/dist/standalone/bk-avatar-group.js +1 -1
- package/dist/standalone/bk-avatar.js +3 -3
- package/dist/standalone/bk-badge.js +1 -1
- package/dist/standalone/bk-bar.js +1 -1
- package/dist/standalone/bk-brand.js +1 -1
- package/dist/standalone/bk-breadcrumbs.js +2 -2
- package/dist/standalone/bk-button-copy.js +4 -4
- package/dist/standalone/bk-button-group.js +2 -2
- package/dist/standalone/bk-button-share.js +4 -4
- package/dist/standalone/bk-button-top.js +1 -1
- package/dist/standalone/bk-button.js +14 -6
- package/dist/standalone/bk-calendar-event.js +1 -1
- package/dist/standalone/bk-calendar-week.js +1 -1
- package/dist/standalone/bk-calendar.js +2 -2
- package/dist/standalone/bk-card.js +17 -11
- package/dist/standalone/bk-carousel-controls.js +2 -2
- package/dist/standalone/bk-carousel-item.js +1 -1
- package/dist/standalone/bk-carousel.js +1 -1
- package/dist/standalone/bk-chart-area.js +1 -1
- package/dist/standalone/bk-chart-bar-list.js +2 -2
- package/dist/standalone/bk-chart-bar.js +1 -1
- package/dist/standalone/bk-chart-bridge.js +1 -1
- package/dist/standalone/bk-chart-bullet.js +1 -1
- package/dist/standalone/bk-chart-calendar.js +1 -1
- package/dist/standalone/bk-chart-heatmap.js +1 -1
- package/dist/standalone/bk-chart-histogram.js +1 -1
- package/dist/standalone/bk-chart-legend.js +1 -1
- package/dist/standalone/bk-chart-line.js +16 -8
- package/dist/standalone/bk-chart-mark.js +1 -1
- package/dist/standalone/bk-chart-scatter.js +1 -1
- package/dist/standalone/bk-chart-sparkline.js +1 -1
- package/dist/standalone/bk-chart-stacked-bar.js +1 -1
- package/dist/standalone/bk-chart-tracker.js +1 -1
- package/dist/standalone/bk-chart-waterfall.js +2 -2
- package/dist/standalone/bk-checkbox-group.js +5 -5
- package/dist/standalone/bk-checkbox.js +3 -3
- package/dist/standalone/bk-chip-group.js +4 -4
- package/dist/standalone/bk-chip.js +5 -3
- package/dist/standalone/bk-cluster.js +1 -1
- package/dist/standalone/bk-code-diff.js +2 -2
- package/dist/standalone/bk-code-stack.js +1 -1
- package/dist/standalone/bk-code.js +1 -1
- package/dist/standalone/bk-color-panel.js +2 -2
- package/dist/standalone/bk-columns.js +1 -1
- package/dist/standalone/bk-combobox.js +21 -30
- package/dist/standalone/bk-command-menu.js +3 -3
- package/dist/standalone/bk-command-palette.js +4 -4
- package/dist/standalone/bk-composer.js +4 -4
- 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-disclosure.js +2 -2
- package/dist/standalone/bk-divider.js +4 -4
- package/dist/standalone/bk-drawer.js +2 -2
- package/dist/standalone/bk-drop-target.js +1 -1
- package/dist/standalone/bk-empty-state.js +2 -2
- package/dist/standalone/bk-error-summary.js +1 -1
- package/dist/standalone/bk-facts-item.js +1 -1
- package/dist/standalone/bk-facts.js +1 -1
- package/dist/standalone/bk-feature.js +2 -2
- package/dist/standalone/bk-fieldset.js +1 -1
- package/dist/standalone/bk-filter-bar.js +2 -2
- package/dist/standalone/bk-folder-browser.js +2 -2
- package/dist/standalone/bk-footnote.js +1 -1
- package/dist/standalone/bk-footnotes-item.js +2 -2
- package/dist/standalone/bk-footnotes.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-grid.js +1 -1
- package/dist/standalone/bk-icon-tile.js +2 -2
- package/dist/standalone/bk-icon.js +1 -1
- package/dist/standalone/bk-image-compare.js +55 -27
- package/dist/standalone/bk-image-crop.js +3 -3
- package/dist/standalone/bk-image-editor.js +1 -1
- package/dist/standalone/bk-image-viewer.js +127 -57
- package/dist/standalone/bk-input-code.js +2 -2
- package/dist/standalone/bk-input-color.js +3 -13
- package/dist/standalone/bk-input-date-range.js +2 -2
- package/dist/standalone/bk-input-date.js +2 -2
- package/dist/standalone/bk-input-file.js +20 -13
- package/dist/standalone/bk-input-group.js +2 -2
- package/dist/standalone/bk-input-inline.js +1 -1
- package/dist/standalone/bk-input-number.js +4 -4
- package/dist/standalone/bk-input-rating.js +4 -4
- package/dist/standalone/bk-input-rich.js +1 -1
- package/dist/standalone/bk-input-search.js +4 -4
- package/dist/standalone/bk-input-slider-range.js +2 -2
- package/dist/standalone/bk-input-slider.js +2 -2
- package/dist/standalone/bk-input-tags.js +224 -0
- package/dist/standalone/bk-input-text.js +1 -1
- package/dist/standalone/bk-input-time-zone.js +1 -1
- package/dist/standalone/bk-input-time.js +4 -4
- package/dist/standalone/bk-item-group.js +2 -2
- package/dist/standalone/bk-item.js +2 -2
- package/dist/standalone/bk-kbd-shortcuts.js +1 -1
- package/dist/standalone/bk-kbd.js +1 -1
- package/dist/standalone/bk-lightbox.js +16 -3
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +2 -2
- package/dist/standalone/bk-listbox-columns.js +6 -6
- package/dist/standalone/bk-listbox-item.js +1 -1
- package/dist/standalone/bk-listbox-search.js +5 -5
- package/dist/standalone/bk-listbox-transfer.js +4 -4
- package/dist/standalone/bk-listbox.js +5 -5
- package/dist/standalone/bk-logo-wall.js +1 -1
- package/dist/standalone/bk-logo.js +2 -2
- package/dist/standalone/bk-menu-bar.js +1 -1
- package/dist/standalone/bk-menu-context.js +1 -1
- package/dist/standalone/bk-menu-divider.js +1 -1
- package/dist/standalone/bk-menu-item.js +2 -2
- package/dist/standalone/bk-menu-label.js +1 -1
- package/dist/standalone/bk-menu-list.js +1 -1
- package/dist/standalone/bk-menu.js +4 -4
- package/dist/standalone/bk-message-approval.js +2 -2
- 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 +2 -2
- package/dist/standalone/bk-message-list.js +2 -2
- package/dist/standalone/bk-message-reasoning.js +3 -3
- package/dist/standalone/bk-message-source.js +1 -1
- package/dist/standalone/bk-message-tool-group.js +3 -3
- package/dist/standalone/bk-message-tool.js +3 -3
- package/dist/standalone/bk-message.js +2 -2
- package/dist/standalone/bk-meter.js +1 -1
- package/dist/standalone/bk-model-viewer.js +1 -1
- package/dist/standalone/bk-nav-divider.js +1 -1
- package/dist/standalone/bk-nav-group.js +5 -5
- package/dist/standalone/bk-nav-item.js +2 -2
- 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-cta.js +10 -3
- package/dist/standalone/bk-page-footer-column.js +1 -1
- package/dist/standalone/bk-page-footer.js +1 -1
- package/dist/standalone/bk-page-header.js +2 -2
- package/dist/standalone/bk-page-hero.js +2 -2
- package/dist/standalone/bk-page-pager.js +2 -2
- package/dist/standalone/bk-page-section.js +2 -2
- package/dist/standalone/bk-pagination.js +3 -3
- package/dist/standalone/bk-pane.js +2 -2
- package/dist/standalone/bk-panel.js +2 -2
- package/dist/standalone/bk-period-nav.js +2 -2
- package/dist/standalone/bk-picture.js +1 -175
- package/dist/standalone/bk-popover-help.js +1 -1
- package/dist/standalone/bk-popover.js +1 -1
- package/dist/standalone/bk-presence-cursor.js +2 -2
- package/dist/standalone/bk-preview.js +2 -2
- package/dist/standalone/bk-progress.js +1 -1
- package/dist/standalone/bk-prose.js +1 -1
- package/dist/standalone/bk-qr-code.js +1 -1
- package/dist/standalone/bk-radio-group.js +5 -5
- package/dist/standalone/bk-radio.js +2 -2
- package/dist/standalone/bk-rating.js +3 -3
- package/dist/standalone/bk-scroll.js +1 -1
- package/dist/standalone/bk-segmented-item.js +2 -2
- package/dist/standalone/bk-segmented.js +4 -4
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +4 -4
- package/dist/standalone/bk-shell-app.js +1 -1
- package/dist/standalone/bk-shell-centered.js +1 -1
- package/dist/standalone/bk-shell-sites.js +1 -1
- package/dist/standalone/bk-skeleton.js +1 -1
- package/dist/standalone/bk-sortable.js +2 -2
- package/dist/standalone/bk-spinner.js +1 -1
- package/dist/standalone/bk-split-grid.js +10 -7
- package/dist/standalone/bk-split.js +6 -6
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +1 -1
- package/dist/standalone/bk-stat.js +3 -3
- package/dist/standalone/bk-status-dot.js +2 -2
- package/dist/standalone/bk-steps-item.js +2 -2
- package/dist/standalone/bk-steps.js +1 -1
- package/dist/standalone/bk-surface.js +1 -1
- package/dist/standalone/bk-swatch-group.js +6 -6
- package/dist/standalone/bk-swatch-palette.js +1 -1
- package/dist/standalone/bk-swatch.js +1 -1
- package/dist/standalone/bk-switch.js +2 -2
- package/dist/standalone/bk-table.js +1 -1
- package/dist/standalone/bk-tabs-item.js +2 -2
- package/dist/standalone/bk-tabs-panel.js +1 -1
- package/dist/standalone/bk-tabs.js +3 -414
- package/dist/standalone/bk-tasks-item.js +2 -2
- package/dist/standalone/bk-tasks.js +1 -1
- package/dist/standalone/bk-testimonial.js +2 -2
- package/dist/standalone/bk-text.js +3 -3
- package/dist/standalone/bk-time-countdown.js +2 -2
- package/dist/standalone/bk-time-relative.js +1 -1
- package/dist/standalone/bk-timeline-item.js +2 -2
- package/dist/standalone/bk-timeline.js +1 -1
- package/dist/standalone/bk-toast-group.js +1 -1
- package/dist/standalone/bk-toast.js +2 -2
- package/dist/standalone/bk-toolbar.js +1 -1
- package/dist/standalone/bk-tooltip.js +1 -1
- package/dist/standalone/bk-tree-item.js +3 -3
- package/dist/standalone/bk-tree.js +4 -4
- package/dist/standalone/bk-video.js +2 -2
- package/dist/standalone/bk-visually-hidden.js +1 -1
- package/dist/standalone/bk-zoom.js +3 -3
- package/dist/standalone/chunks/{announcer-D1zrRWwO.js → announcer-6tMlCOq1.js} +9 -4
- package/dist/standalone/chunks/{bk-alert-offline-Clw0ZSsH.js → bk-alert-offline-hCLuG-RM.js} +1 -1
- package/dist/standalone/chunks/{bk-carousel-Biz7t8sL.js → bk-carousel-_dudBMVq.js} +2 -2
- package/dist/standalone/chunks/{bk-diagram-D_fQf6SF.js → bk-diagram-BB2odomE.js} +2 -2
- package/dist/standalone/chunks/{bk-dialog-DwZyUUHh.js → bk-dialog-DcvwnOtN.js} +2 -2
- package/dist/standalone/chunks/{bk-icon-Bp_flKdv.js → bk-icon-D4kI4F18.js} +1 -1
- package/dist/standalone/chunks/{bk-image-editor-BADsoLRL.js → bk-image-editor-SRVkHI-4.js} +2 -2
- package/dist/standalone/chunks/{bk-input-date-range-DHcJ8-5g.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-CFhW6vRa.js → bk-input-rich-AmDv87E5.js} +3 -3
- package/dist/standalone/chunks/{bk-input-text-DviyLBqj.js → bk-input-text-2n89GDIT.js} +15 -5
- package/dist/standalone/chunks/{bk-model-viewer-w_Ah4Tvs.js → bk-model-viewer-BoNYBd6W.js} +2 -2
- package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
- package/dist/standalone/chunks/{bk-qr-code-CYMovNVl.js → bk-qr-code-CSFfc8As.js} +1 -1
- package/dist/standalone/chunks/{bk-shell-app-B2lxHit8.js → bk-shell-app-BlCOG25y.js} +31 -30
- package/dist/standalone/chunks/{bk-surface-D7e0tErs.js → bk-surface-BULRdKam.js} +1 -1
- package/dist/standalone/chunks/{bk-swatch-palette-x13JgJQi.js → bk-swatch-palette-Cqj85tSW.js} +1 -1
- package/dist/standalone/chunks/{bk-table-CP8n_jy7.js → bk-table-DWlD7yoM.js} +72 -71
- package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
- package/dist/standalone/chunks/{bk-toast-group-CoL6W7uk.js → bk-toast-group-5nZg7BaJ.js} +2 -2
- package/dist/standalone/chunks/{busy-BUB22mGY.js → busy-eG3uHonz.js} +1 -1
- package/dist/standalone/chunks/{choice-field-poOTerh1.js → choice-field-B0oe_9fI.js} +4 -4
- package/dist/standalone/chunks/{date-field-B-fCXa2D.js → date-field-Dy1_qxNv.js} +2 -2
- package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
- package/dist/standalone/chunks/{form-control-CHpfKAKa.js → form-control-Bmk0SRDX.js} +1 -1
- package/dist/standalone/chunks/{handle-menu-BgYUbGO2.js → handle-menu-BAe9fPYJ.js} +10 -36
- package/dist/standalone/chunks/{heading-text-CgnCa_q2.js → heading-text-B2kF-b8p.js} +1 -1
- package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
- package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
- package/dist/standalone/chunks/{options-BdC8-KKM.js → options-ySaDL-dW.js} +1 -1
- package/dist/standalone/chunks/{stars-BgKEjDQx.js → stars-BAUc_LqI.js} +1 -1
- package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
- package/dist/standalone/chunks/{text-field-CqhJSAwZ.js → text-field-CufOGdfr.js} +16 -10
- package/dist/standalone/chunks/{toggle-control-lvZbQtGW.js → toggle-control-Cgqp1jhf.js} +4 -2
- package/dist/standalone/chunks/{virtual-C_h6sHnm.js → virtual-D-qgACnE.js} +1 -1
- package/dist/standalone/confirm.js +2 -2
- package/dist/standalone/reset.css +1 -1
- package/dist/standalone/toast.js +1 -1
- package/dist/standalone/tokens.css +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +2 -2
- package/dist/standalone/chunks/define-DkVeu7e9.js +0 -30
- package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
- package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,69 @@
|
|
|
2
2
|
|
|
3
3
|
An app installs a release from npm: `"@bk2k/ui": "^<version>"`.
|
|
4
4
|
|
|
5
|
+
## 0.7.1
|
|
6
|
+
|
|
7
|
+
### Changes that need a line in the app
|
|
8
|
+
|
|
9
|
+
- New kit exports `nameHue(name)` and `nameColors(name)` (`@bk2k/ui/kit.js`): the hue and the colours `{ bg, fg }` that
|
|
10
|
+
`bk-avatar` and `bk-logo` give a name. An app paints a cover of the same person with them.
|
|
11
|
+
|
|
12
|
+
- `bk-card` with `href` moves up by 2 px and shows a gradient ring (from `--bk-accent-solid` to `--bk-info-solid`) on hover by
|
|
13
|
+
default. Set `--bk-card-lift-hover: 0` and `--bk-card-ring-hover: none` to keep the 0.7.0 hover. A `selected` card does
|
|
14
|
+
neither. With reduced motion the card stays in place, and forced colours show no ring.
|
|
15
|
+
|
|
16
|
+
- `bk-tabs` loads its "More" menu late, when the tabs do not fit in the row. A bundle with the condition `bk-static`
|
|
17
|
+
imports `@bk2k/ui/bk-menu.js` and `@bk2k/ui/bk-menu-item.js` for it.
|
|
18
|
+
|
|
19
|
+
### New
|
|
20
|
+
|
|
21
|
+
- `bk-input-tags`: a field for a list of tags. Enter or a comma adds the typed text, Backspace in the empty field removes the
|
|
22
|
+
last tag, and a pasted list adds one tag for each part. The value is a list (`values`, one form entry for each value).
|
|
23
|
+
The field shows its own removable chips. For a diff, put `bk-chip` elements in its slot: the field fires the cancelable
|
|
24
|
+
events `add` and `remove` (detail `{ value, chip }`), and the app marks the chips (`tone="success"`, `removed`).
|
|
25
|
+
- `bk-input-file`: the slot `preview` shows content of the app in the zone, for example a picture, a viewer or a crop tool. The
|
|
26
|
+
element then shows no file list and no tiles. Drop, browse, `actions` and `paste="page"` stay. The app reads `files`
|
|
27
|
+
in `change`. `--bk-input-file-preview-gap` sets the space between the preview and the row of buttons.
|
|
28
|
+
- `bk-chart-line`: `gaps="connect"`, or `gaps` in a series, draws a straight line from one real value to the next over missing
|
|
29
|
+
values. The tooltip says "no value" at a missing value. `--bk-chart-line-gap-dash` gives the bridge a dash pattern.
|
|
30
|
+
- The library writes a console warning when an element of the library is in the page and no code defines it:
|
|
31
|
+
`<bk-x> is in the page, but no code defines it. Add: import "@bk2k/ui/bk-x.js";`. It checks once when the browser is
|
|
32
|
+
idle, and again after a later import.
|
|
33
|
+
- `bk-button`: `--bk-button-lift-hover` (default 0) moves the button up on hover. `--bk-button-shadow` and
|
|
34
|
+
`--bk-button-shadow-hover` set its shadow (default: the shadow of the variant).
|
|
35
|
+
- `bk-button` has the custom state `:state(expanded)` while its popup is open, and the parts `icon-start` and `icon-end`. Turn a
|
|
36
|
+
chevron with `bk-button:state(expanded)::part(icon-end) { rotate: 180deg; }`.
|
|
37
|
+
- Uppercase labels: `--bk-table-head-transform` and `--bk-table-head-tracking`, `--bk-stat-label-transform` and
|
|
38
|
+
`--bk-stat-label-tracking`, `--bk-chip-transform` and `--bk-chip-tracking`. The defaults keep the current look.
|
|
39
|
+
- `bk-input-text` passes the `spellcheck` attribute of the host to its field. With `mono` spellcheck is off by default.
|
|
40
|
+
- `bk-image-viewer shaped` and `bk-image-compare shaped`: the box takes the shape of the picture. Under the height cap
|
|
41
|
+
(`--bk-image-viewer-max-height`, the new `--bk-image-compare-max-height`) the width follows the ratio of the image. The
|
|
42
|
+
box is never wider than its container or than the natural width.
|
|
43
|
+
- `bk-image-viewer` pages from outside: `pageable` shows the previous and next buttons also for one item, `first` and
|
|
44
|
+
`last` turn them off at the ends of the list of the app, and the cancelable event `page` (detail `{ direction }`)
|
|
45
|
+
says what the user asked for. `bk-lightbox` passes them through.
|
|
46
|
+
- `bk-image-compare`: `--bk-image-compare-label-transform` and `--bk-image-compare-label-tracking` set the case of the names of
|
|
47
|
+
the sides. The names stay centred in their tags.
|
|
48
|
+
- `bk-image-compare` fires `load` for each picture (detail `{ side, naturalWidth, naturalHeight }`), and each name of a side
|
|
49
|
+
has the part `label` in every variant.
|
|
50
|
+
- `--bk-card-ring` and `--bk-page-cta-ring`: an image, for example a gradient, as the ring of a card or of a call to action at
|
|
51
|
+
rest, over the border, in its radius. The default is none.
|
|
52
|
+
|
|
53
|
+
### Fixes
|
|
54
|
+
|
|
55
|
+
- `bk-input-tags` and `bk-combobox multiple`: the chips have the same gap above, below and at the start of the box, the
|
|
56
|
+
height of a button in a field and a concentric corner. One row of chips keeps the height of the field.
|
|
57
|
+
- `bk-image-compare variant="toggle"` loads `bk-segmented-item` itself.
|
|
58
|
+
- `bk-chip` with `--bk-chip-tracking` keeps its text centred: the chip takes the space after the last letter back.
|
|
59
|
+
- `bk-checkbox` and `bk-switch`: the native input is the pointer target. A test click on the element with the role
|
|
60
|
+
(`getByRole("checkbox").click()`) no longer waits for a timeout.
|
|
61
|
+
- `bk-image-viewer` keeps the last image visible while the next one loads. Paging through large images no longer flashes a
|
|
62
|
+
placeholder. The spinner shows over the old image after `--bk-loading-delay`.
|
|
63
|
+
- `bk-input-color editable` shows no chevron. The swatch is the only button that opens the panel.
|
|
64
|
+
- The shared live region reads every message of one short window, each as its own line. Before, two `live` alerts that
|
|
65
|
+
connected in the same update dropped the first message.
|
|
66
|
+
- The ghost of a `bk-split-grid` pane stays inside the viewport during a drag. Before, a drag to the edge of the window cut it.
|
|
67
|
+
|
|
5
68
|
## 0.7.0
|
|
6
69
|
|
|
7
70
|
### Changes that need a line in the app
|
package/USAGE.md
CHANGED
|
@@ -44,7 +44,8 @@ import "@bk2k/ui/i18n/de.js"; // the German texts, for an app in German
|
|
|
44
44
|
|
|
45
45
|
- A name without an icon import logs a warning and shows no icon. The icons that an element draws itself stay.
|
|
46
46
|
- A feature whose element no code defines logs a warning with the line to add, and the feature does not show. For
|
|
47
|
-
example, `bk-table` needs `bk-checkbox` for `selection
|
|
47
|
+
example, `bk-table` needs `bk-checkbox` for `selection`. `bk-shell-app` needs `bk-drawer` on a narrow screen.
|
|
48
|
+
`bk-tabs` needs `bk-menu` and `bk-menu-item` when its tabs do not fit in the row.
|
|
48
49
|
- English is not built in. A text that no loaded catalog contains shows its key and logs a warning.
|
|
49
50
|
- The brand marks (`github`, `linux`, …) are not registered. Register the marks that the page uses:
|
|
50
51
|
`registerIcons({ github: brandIcons.github })`, with `brandIcons` from `@bk2k/ui/icons/brands.js`.
|
|
@@ -182,6 +183,10 @@ import { openLightbox } from "@bk2k/ui/bk-lightbox.js";
|
|
|
182
183
|
|
|
183
184
|
Importing any component also adds the design tokens to the page. You set up nothing else.
|
|
184
185
|
|
|
186
|
+
Import each element that a view uses. Without its import, an element stays unknown and its content can disappear.
|
|
187
|
+
When the page is idle, about 2 s after the last import, the library logs a warning for each such element:
|
|
188
|
+
`@bk2k/ui: <bk-fieldset> is in the page, but no code defines it. Add: import "@bk2k/ui/bk-fieldset.js";`
|
|
189
|
+
|
|
185
190
|
A bundled app loads its scripts after the HTML. Link `@bk2k/ui/tokens.css` in the `<head>` of the page, so the page
|
|
186
191
|
does not show the elements as plain text until their scripts run: `tokens.css` hides each element of the library until
|
|
187
192
|
it is defined. Do not import it from the JavaScript of the app: in development (Vite) that CSS loads only after the
|
|
@@ -220,6 +225,7 @@ building blocks from `@bk2k/ui/kit.js`. It then behaves and looks like the contr
|
|
|
220
225
|
| `fieldTemplate`, `describedBy`, `requiredMarker`, `optionalMarker` | the label, hint, error and required marker of a field |
|
|
221
226
|
| `SlotController`, `slotHasContent` | a slot without content uses no space |
|
|
222
227
|
| `LocalizeController` | the locale of the element and the texts of the library |
|
|
228
|
+
| `nameHue`, `nameColors` | the hue (0–359) and the colours `{ bg, fg }` that `bk-avatar` and `bk-logo` give a name. Paint another surface of the same person with them (a cover without an image) |
|
|
223
229
|
| `Typeahead` | type the first letters to move to an item |
|
|
224
230
|
| `emit`, `emitDetail`, `emitLifecycle`, `emitToggle` | fire events with the flags of the conventions |
|
|
225
231
|
| `anchorPopover`, `setTriggerAria` | place a `[popover]` at its trigger; the ARIA of the trigger |
|
|
@@ -483,7 +489,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
483
489
|
| `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 |
|
|
484
490
|
| `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` |
|
|
485
491
|
| `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 |
|
|
486
|
-
| `bk-footnote` + `bk-footnotes` + `bk-footnotes-item` | footnotes and source references: `<bk-footnote note="cpi">` is a raised, numbered link in the text ("up to 155 €¹"); `<bk-footnotes-item id="cpi">` is the note (the source text, `href` for a link that shows the host, `date` as `YYYY`, `YYYY-MM` or `YYYY-MM-DD` for "As of Nov 2026") in a `<bk-footnotes>` list at the end of the content or in the footer. Each list numbers its notes in the order of their first marker on the screen, also markers in slots and shadow roots (`bk-stat` `label`/`value` slots, `bk-facts-item`, `bk-table` cells). Several markers can refer to one note: the note
|
|
492
|
+
| `bk-footnote` + `bk-footnotes` + `bk-footnotes-item` | footnotes and source references: `<bk-footnote note="cpi">` is a raised, numbered link in the text ("up to 155 €¹"); `<bk-footnotes-item id="cpi">` is the note (the source text, `href` for a link that shows the host, `date` as `YYYY`, `YYYY-MM` or `YYYY-MM-DD` for "As of Nov 2026") in a `<bk-footnotes>` list at the end of the content or in the footer. Each list numbers its notes in the order of their first marker on the screen, also markers in slots and shadow roots (`bk-stat` `label`/`value` slots, `bk-facts-item`, `bk-table` cells). Several markers can refer to one note: the note shows an arrow and a back link to each (↑ a b). A click moves the focus to the target and marks it (`:state(target)`). The browser sets the numbers: the HTML of a server has none. A marker without a note shows nothing |
|
|
487
493
|
| `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 |
|
|
488
494
|
| `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 |
|
|
489
495
|
| `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 |
|
|
@@ -505,15 +511,16 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
505
511
|
| `bk-breadcrumbs` | `<a>` children make a breadcrumb nav, and the last item is the current page; `<button>` children make a trail inside the page (a folder browser) |
|
|
506
512
|
| `bk-folder-browser` | browses a folder tree: a trail of buttons, `places` to jump to, the `folders` of `path` as a menu list; the app controls the tree (cancelable `navigate` `{ path }`, then the app sets `path` and `folders`); `/` and `C:\` paths (`pathSteps()`); `empty` slot |
|
|
507
513
|
| `bk-tabs` + `bk-tabs-item` + `bk-tabs-panel` | tabs paired by `value`; tabs that do not fit move into a "More" menu (`overflow="menu"`, the default; the entries of link tabs are links), or the row scrolls sideways with `overflow="scroll"` (a narrow screen; the selected tab scrolls into view); `removable` on an item shows a close button and fires `remove` (Delete too); `addable` shows a plus button that fires `add` (saved views: the app asks for a name and appends an item); `variant="pills"`; `orientation="vertical"` (the tabs fill the width, a `dot` is before the label, the `count` is at the end of the row, so the counts have the same end edge); tabs with `href` become a link nav; the tabs write no attributes on the items (the items render their ARIA state; `:state(selected)` and `:state(overflow)` are for CSS); a user switch first fires a cancelable `select` (cancel it to stay on the tab), then `change` (not cancelable) |
|
|
508
|
-
| `bk-button` | button or link (`href`); `variant` (solid/soft/outline/ghost/quiet) × `tone` (neutral/accent/info/success/warning/danger/attention); `type="submit"` works in forms, and the first submit button of a form is its default button (Enter in a field clicks it; a disabled one blocks Enter); a disabled `<fieldset>` disables it; `pressed` makes a toggle (`pressed="false"` is an unpressed toggle; the pressed look follows `tone`); `type="file"` (+ `accept`, `multiple`) opens the file dialog, then sets `files` and fires `change`; `disabled-reason` disables the button, keeps it focusable and shows the reason (tooltip). Icon-only: `icon` + `label` and no text makes a square button (`label` is the name and the tooltip). A `<bk-avatar>` alone in the slot makes the round trigger of an account menu, named by the avatar. An icon-only button can have `count` (badge, `99+`) or `dot` (new activity) |
|
|
514
|
+
| `bk-button` | button or link (`href`); `variant` (solid/soft/outline/ghost/quiet) × `tone` (neutral/accent/info/success/warning/danger/attention); `type="submit"` works in forms, and the first submit button of a form is its default button (Enter in a field clicks it; a disabled one blocks Enter); a disabled `<fieldset>` disables it; `pressed` makes a toggle (`pressed="false"` is an unpressed toggle; the pressed look follows `tone`); `type="file"` (+ `accept`, `multiple`) opens the file dialog, then sets `files` and fires `change`; `disabled-reason` disables the button, keeps it focusable and shows the reason (tooltip). Icon-only: `icon` + `label` and no text makes a square button (`label` is the name and the tooltip). A `<bk-avatar>` alone in the slot makes the round trigger of an account menu, named by the avatar. An icon-only button can have `count` (badge, `99+`) or `dot` (new activity). Hover tokens: `--bk-button-lift-hover` (moves the button up), `--bk-button-shadow` and `--bk-button-shadow-hover`. While a popup that the button controls is open (`aria-expanded`), the host has `:state(expanded)`. The end icon is `::part(icon-end)`: `bk-button:state(expanded)::part(icon-end) { rotate: 180deg; }` turns a chevron |
|
|
509
515
|
| `bk-button-group` | combines `bk-button`s and `bk-menu` triggers into one shape (no gap, shared borders); `orientation="vertical"`; a split button is a button + a menu with an icon trigger; `selection="single\|multiple"` makes a toggle group (`aria-pressed`, arrow keys, `name`, `value`/`values`) |
|
|
510
516
|
| `bk-icon` | registry icon (`name`), 1em, `currentColor`; `size` xs/sm/md/lg/xl; `spin` rotates it (busy); `tone` (the text colour of a meaning) or `muted`; the core set (Material Symbols) plus the brand marks `windows`, `linux`, `github`, `linkedin`, `mastodon`, `bluesky`, `youtube` and `rss` (a row of social links: icon buttons with `href` and `label` in a `bk-cluster` with `role="navigation"`) |
|
|
511
|
-
| `bk-input-text` | text field with `label`, `hint` (attribute or slot) and `error`; `label-position="start"`; `type` allows only the text types (`text`, `email`, `password`, `search`, `url`, `tel`): other types render as text with a warning, so use the component for the value (`bk-input-number`, `bk-input-date`, `bk-input-time`, `bk-input-color`, `bk-input-slider`, `bk-input-file`, `bk-checkbox`, `bk-radio-group`); `multiline` makes a textarea (`autogrow`, `max-rows`); `mono` for codes and keys; `clearable`; `mask` (`9` digit, `a` letter, `*` any) with a raw value and `formattedValue`; `enterkeyhint` (also on `bk-input-number`); a reveal toggle for passwords; `prefix`/`suffix` text; `counter` with `maxlength`; slots `start`/`end`; `shortcut` (a shortcut id of the registry or keys) sets `aria-keyshortcuts` on the input, show the keys with `<bk-kbd slot="end" shortcut="…">` |
|
|
517
|
+
| `bk-input-text` | text field with `label`, `hint` (attribute or slot) and `error`; `label-position="start"`; `type` allows only the text types (`text`, `email`, `password`, `search`, `url`, `tel`): other types render as text with a warning, so use the component for the value (`bk-input-number`, `bk-input-date`, `bk-input-time`, `bk-input-color`, `bk-input-slider`, `bk-input-file`, `bk-checkbox`, `bk-radio-group`); `multiline` makes a textarea (`autogrow`, `max-rows`); `mono` for codes and keys (the spell checker is off with `mono`; the `spellcheck` attribute of the host overrides it, also without `mono`); `clearable`; `mask` (`9` digit, `a` letter, `*` any) with a raw value and `formattedValue`; `enterkeyhint` (also on `bk-input-number`); a reveal toggle for passwords; `prefix`/`suffix` text; `counter` with `maxlength`; slots `start`/`end`; `shortcut` (a shortcut id of the registry or keys) sets `aria-keyshortcuts` on the input, show the keys with `<bk-kbd slot="end" shortcut="…">` |
|
|
512
518
|
| `bk-input-rich` | light editor for formatted text: bold, italic, inline code, links, headings 2 and 3, quotes, lists. `value` is clean HTML (only these formats, safe links; show it with `bk-prose`); the editor cleans pasted and dropped text. Toolbar: a built-in `bk-toolbar` (a block type select for paragraph, heading 2 and heading 3, and toggle buttons for the rest) or your own in the `toolbar` slot (`data-command="bold\|italic\|code\|link\|p\|h2\|h3\|quote\|ul\|ol"` runs a command and receives `pressed`; a `bk-select` with `data-command="block"` and options `p`/`h2`/`h3` is the block type select). Shortcuts: Ctrl/⌘+B, I, K, Shift+7, Shift+8; Markdown at the start of a line (`## `, `- `, `1. `, `> `). `format="markdown"` makes `value` and the form value Markdown (`markdownToRichHtml` returns the HTML for `bk-prose`). Also: `execCommand()`/`queryCommandState()`; `placeholder`, `readonly`, `size`; form-associated (`input` on each edit, `change` on blur) |
|
|
513
519
|
| `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 |
|
|
514
520
|
| `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 |
|
|
515
521
|
| `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 |
|
|
516
522
|
| `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 |
|
|
523
|
+
| `bk-input-tags` | a list of short values as chips in one text box (the tags of a record), form-associated: `values` (one form entry for each value), `required`, `readonly`, `placeholder`; Enter or a comma adds the typed text, Backspace in the empty text removes the last tag, a pasted list adds one tag for each part, a value is not added twice (case-sensitive); cancelable `add` `{ value }` and `remove` `{ value, chip }`, then `input` and `change`. Slotted `<bk-chip>` elements replace the chips of the field: the app controls them in `add` and `remove` (for example a diff: `tone="success"` for an added tag, `removed` with `restore`), and the value is the text of the chips that are not `removed`. The shared text box: `label`/`hint`/`error`, `size`, `start`/`end`, `prefix`/`suffix`, `clearable` |
|
|
517
524
|
| `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 |
|
|
518
525
|
| `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 |
|
|
519
526
|
| `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` |
|
|
@@ -526,7 +533,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
526
533
|
| `bk-listbox-columns` + `bk-listbox-item` | a hierarchy, one level at a time in columns (Miller columns), form-associated; nested `<bk-listbox-item value label icon description disabled>` or `.items`; `value` is the chosen leaf, `path` the values down to it; ←/→ move between columns, ↑/↓ move in a column, Enter chooses a leaf; below 480px of the nearest size container one column shows with a back button |
|
|
527
534
|
| `bk-listbox-transfer` | two lists, available and chosen, with buttons that move the selected rows across; form-associated; `<option selected>` children or `.options` with `values`; `filter` (a search field for each list); `reorder` (the chosen list keeps the order of the user: move up/down buttons and Alt + ↑/↓); Enter or a double click moves a row; a live region announces moves; `available-label`, `chosen-label` |
|
|
528
535
|
| `bk-listbox-search` | content of a filter panel: search field + multiple `bk-listbox` + count, Reset, Apply; `<option>` children or `options`; `values` also contains hidden choices; `input` fires for each change, `change` on Apply and Reset; `pin-selected`; it works inline or in a `bk-popover` |
|
|
529
|
-
| `bk-input-file` | drop zone + browse button for files, form-associated (the files are in `FormData` under `name`); `accept`, `multiple`, `required`; `folders` also allows folders (dropped or chosen; every file has its path: `pathOf(file)`; `FormData` has the file name). A list of the chosen files with remove buttons. `max-size` (bytes) flags larger files. `setFileState(file, { state: "uploading"\|"done"\|"failed", progress, error })` shows the upload progress in the `bk-attachment` look; a failed file has a retry button (fires `retry`, `detail.file`). A paste adds files to the focused field; `paste="page"` adds files from a paste anywhere on the page. `max-files` limits the number with `multiple`. A footer with the number and "Remove all" (`multiple`). Slot `actions` for other sources (`<button>` elements), which send their files to `addFiles()`. `replaceFile(old, next)` (for example a cropped image). `variant="tiles"` shows the files as square tiles instead of the zone, with an add tile (a set of images); `sortable` (tiles) lets the user reorder them, and the number on a tile is the handle |
|
|
536
|
+
| `bk-input-file` | drop zone + browse button for files, form-associated (the files are in `FormData` under `name`); `accept`, `multiple`, `required`; `folders` also allows folders (dropped or chosen; every file has its path: `pathOf(file)`; `FormData` has the file name). A list of the chosen files with remove buttons. `max-size` (bytes) flags larger files. `setFileState(file, { state: "uploading"\|"done"\|"failed", progress, error })` shows the upload progress in the `bk-attachment` look; a failed file has a retry button (fires `retry`, `detail.file`). A paste adds files to the focused field; `paste="page"` adds files from a paste anywhere on the page. `max-files` limits the number with `multiple`. A footer with the number and "Remove all" (`multiple`). Slot `actions` for other sources (`<button>` elements), which send their files to `addFiles()`. `replaceFile(old, next)` (for example a cropped image). `variant="tiles"` shows the files as square tiles instead of the zone, with an add tile (a set of images); `sortable` (tiles) lets the user reorder them, and the number on a tile is the handle. Slot `preview`: the zone shows the content of the app (a picture, a viewer, a crop tool) in place of its icon, with the browse button and the actions below it, and no list or tiles; the app makes the preview in `change` from `files`. Drop, paste and browse still work. To show the empty zone again, remove the preview and set `files = []` |
|
|
530
537
|
| `bk-calendar` | inline month/year grid, ISO `value`, `min`/`max`, `isDateDisabled`; `range` (`start-value`/`end-value`, hover preview); `months="2"` shows two months side by side; `presets` slot (also the content of `bk-input-date` and `bk-input-date-range`); `week-numbers` (ISO week column); `first-day` (0 Sunday … 6 Saturday); `selection="multiple"` with `values` (toggle days; `select` has `detail.values`); `dayInfo(iso) => { tone, label }` marks days with a dot and adds the label to the name of the day; `legend` lists the marks in view; a horizontal swipe (touch, pen) changes the month |
|
|
531
538
|
| `bk-calendar-week` + `bk-calendar-event` | week or day schedule (APG grid): `value`, `days` (1-7), `start-hour`, `end-hour`, `step`, `first-day`; `<bk-calendar-event start end tone>Title</bk-calendar-event>` children (`yyyy-mm-ddThh:mm`; overlapping events share the column); a now line in the column of today; cancelable `select` (`{ start, end, event? }`) for a slot, a range (Shift + arrows, Shift + click, mouse drag) or an event; `change` fires when the week moves |
|
|
532
539
|
| `bk-input-color` | colour field with a styled picker popup (the native colour input cannot be styled); `value` is a CSS colour in `format="hex\|rgb\|hsl\|oklch"`; `formats` limits the formats that the user can select (`formats="hex"` allows only hex; without it every format is free); `alpha` adds opacity; `swatches` (array) adds a row of colours. Typing allows any CSS colour; text that is not a colour shows "Enter a valid colour.". `editable` adds a text field for the value in the box (the swatch opens the panel; a hex colour without "#" is valid; bad text stays with the error and `invalid` until the user corrects it; Escape restores the last colour). An eyedropper shows where the browser has one. `clearable` (sets "", no colour) |
|
|
@@ -561,7 +568,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
561
568
|
| `bk-logo` | the mark of a project, organisation or service: the whole image (never cropped), else up to two initials on a colour from `name`; `size` sm/md/lg |
|
|
562
569
|
| `bk-logo-wall` | the logos of customers or partners in a row that wraps, each row in the centre, with an even space; the marks are muted and grey (`--bk-logo-wall-filter`); items are `bk-brand`, `bk-logo`, `img` or `svg` |
|
|
563
570
|
| `bk-badge` | a visual with a small badge on its corner (for example, the owner on the logo of a project) |
|
|
564
|
-
| `bk-lightbox` | image gallery and viewer (zoom, swipe, keyboard); the children are `<img>` or `<a>`; `variant="strip"` (a row at one height, for chat messages); with `items`, a child with `data-index` (a "+5" tile) opens that image; `openLightbox(items, index, { actions, loop })` opens it from script; `actions` slot for toolbar buttons; `current` is the image that it shows; previous and next stop at the ends, `loop` wraps around; the viewer is `immersive` |
|
|
571
|
+
| `bk-lightbox` | image gallery and viewer (zoom, swipe, keyboard); the children are `<img>` or `<a>`; `variant="strip"` (a row at one height, for chat messages); with `items`, a child with `data-index` (a "+5" tile) opens that image; `openLightbox(items, index, { actions, loop })` opens it from script; `actions` slot for toolbar buttons; `current` is the image that it shows; previous and next stop at the ends, `loop` wraps around; `pageable`, `first`, `last` and `page` pass to the viewer (the app shows one picture of its list); the viewer is `immersive` |
|
|
565
572
|
| `bk-empty-state` | `icon`, `heading`, `size` (`lg` for a page that shows only this state), text, `actions` slot |
|
|
566
573
|
| `bk-feature` | one feature of a product: `icon` (a neutral icon tile) or the `media` slot; `heading` + `level` (default 3) or the `heading` slot; a muted text; an `actions` slot (a `bk-link` "Learn more"); one gap, `--bk-feature-gap`. Put three or four in a `bk-grid`, or stack them in a column (`bk-stack`). In a column, each feature after the first adds `--bk-feature-spacing` above it (default `--bk-space-4`, in addition to the gap of the stack). A `bk-grid` uses only its gap |
|
|
567
574
|
| `bk-spinner` | loading indicator (1em); `variant="pulse"`: a pulse line with a running beat, for something alive that works |
|
|
@@ -626,8 +633,8 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
626
633
|
| `bk-picture` | a picture in a layout (it fires `load` with `{ src, naturalWidth, naturalHeight }` and `error` with `{ src }`; both bubble): it fills its column (`--bk-picture-width` sets a fixed width for a thumbnail); `ratio` (`4/3` or `4:3`; `--bk-picture-ratio` from a stylesheet) and `fit`; container corners; lazy loading with a placeholder; an empty frame without `src` (`empty` slot); an error icon with an icon-only retry button in a small picture; `--bk-picture-loaded-bg` for transparent images; optional caption (a figure); `href` (+ `target`, `rel`, `download`) makes it a link named by `alt` |
|
|
627
634
|
| `bk-testimonial` | a quote of a person (`<figure>`, `<blockquote>`, `<figcaption>`): `name`, `byline`, `avatar` and `logo` slots; `size` sm (dense grid), md (card) or lg (pull quote); a centred `bk-page-section` centres the mark, the quote and the person |
|
|
628
635
|
| `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 |
|
|
629
|
-
| `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`); slots `before` and `after` take any content instead of pictures (two cards with the same layout; the larger side gives the size, no zoom, both sides stay readable, hidden ends are `inert`); 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, also `side` by side (`view`, `resetZoom()`); `viewchange` when the user zooms or pans; parts `before` and `after` for a ring on one side; `input` and `change` |
|
|
630
|
-
| `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; without a height it takes the shape of the image (from `width`/`height`, the full image or the thumbnail), capped by `max-height` or `--bk-image-viewer-max-height`; Ctrl + wheel zooms, the plain wheel scrolls the page until the image is zoomed; previous and next stop at the ends, `loop` wraps around; `immersive` (main content of the screen or a dialog): the plain wheel zooms, a click steps the zoom 2×, 4×, fit, and the keys work from anywhere in the surrounding dialog; `view` (`{ zoom, x, y }` in fractions of the image) and `viewchange` mirror two viewers at different resolutions; `naturalWidth`, `naturalHeight` and `load` for a size chip in the `actions` slot |
|
|
636
|
+
| `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`); slots `before` and `after` take any content instead of pictures (two cards with the same layout; the larger side gives the size, no zoom, both sides stay readable, hidden ends are `inert`); 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, also `side` by side (`view`, `resetZoom()`); `viewchange` when the user zooms or pans; parts `before` and `after` for a ring on one side; part `label` on each name of a side in every variant (`::part(label)`); `--bk-image-compare-max-height` caps the height (full width, backdrop at the sides); `shaped`: the box takes the shape of the pictures under the cap, never wider than the container or the natural pictures (also `side`); `load` for each picture (`detail.side`, `naturalWidth`, `naturalHeight`); `input` and `change` |
|
|
637
|
+
| `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; without a height it takes the shape of the image (from `width`/`height`, the full image or the thumbnail), capped by `max-height` or `--bk-image-viewer-max-height`; Ctrl + wheel zooms, the plain wheel scrolls the page until the image is zoomed; previous and next stop at the ends, `loop` wraps around; `immersive` (main content of the screen or a dialog): the plain wheel zooms, a click steps the zoom 2×, 4×, fit, and the keys work from anywhere in the surrounding dialog; `view` (`{ zoom, x, y }` in fractions of the image) and `viewchange` mirror two viewers at different resolutions; `naturalWidth`, `naturalHeight` and `load` for a size chip in the `actions` slot; while the next image loads, the last image stays in view (a spinner after `--bk-loading-delay`); `shaped`: the box takes the shape of the image under `--bk-image-viewer-max-height`, never wider than the container or the natural image, the toolbar lies over the image; `pageable` (the app has the list): previous and next also for one item, `page` (`detail.direction` `previous` or `next`, cancelable) from the buttons, ← → and a swipe beyond the own items; `first` and `last` turn off a button at the ends of the list |
|
|
631
638
|
| `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") |
|
|
632
639
|
| `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 |
|
|
633
640
|
| `bk-command-palette` | ⌘K palette and global search: `items` and/or async `search(query)`; fires `select` |
|
|
@@ -716,7 +723,7 @@ attempt) and `:state(user-valid)`. It also has the read-only properties `touched
|
|
|
716
723
|
them. Use `bk-input-text:state(user-invalid) { … }` to show a problem only after the user touched the field.
|
|
717
724
|
|
|
718
725
|
The text-box fields (`bk-input-text`, `bk-input-number`, `bk-input-time`, `bk-input-date`,
|
|
719
|
-
`bk-input-date-range`, `bk-input-color`, `bk-select`, `bk-combobox`) share one box and its extras: `label`/`hint`/`error`,
|
|
726
|
+
`bk-input-date-range`, `bk-input-color`, `bk-select`, `bk-combobox`, `bk-input-tags`) share one box and its extras: `label`/`hint`/`error`,
|
|
720
727
|
`size`, the `start`/`end` slots with the `icon` shorthand, `prefix`/`suffix` text and `clearable`. The `prefix`
|
|
721
728
|
and `suffix` text is not part of the value, and a screen reader reads it in the description. `clearable` has
|
|
722
729
|
`clear-label`. Its button is not in the tab order, and it fires `input` and `change`. The shared tokens are
|
|
@@ -1072,6 +1079,10 @@ More charts: `bk-chart-area` (stacked layers over time, `variant="percent"` for
|
|
|
1072
1079
|
hides the series, and the value axis fits the visible ones. `hidden: true` in a series starts it hidden. The
|
|
1073
1080
|
last visible series stays on. The chart fires `change` with `{ visible }` (the keys) and stores them with
|
|
1074
1081
|
`persist-key`. The table lists every series. A `bk-chart-legend` entry with `pressed` is such a toggle button.
|
|
1082
|
+
- `gaps="connect"` on `bk-chart-line` bridges a missing value: a straight dashed segment goes from one real point to
|
|
1083
|
+
the next real point of the series. The default `break` breaks the line. `gaps` in a series sets the mode of that
|
|
1084
|
+
series. Use it for series that the app measures at different times. The tooltip says "no value" between the points,
|
|
1085
|
+
and the table and the summary list only real values. The bridge is solid; `--bk-chart-line-gap-dash` gives it a dash pattern.
|
|
1075
1086
|
- `variant="minimal"` on `bk-chart-bar` shows the baseline and the categories only, with no grid or value axis.
|
|
1076
1087
|
This is the quiet form for small charts in the own layout of an app (use it with `labels`).
|
|
1077
1088
|
- Clickable categories on `bk-chart-bar` (a week strip): `href="?day={x}"` makes each category a real link
|